From a51744382870e2fca787178d53dfe19c88eea9e6 Mon Sep 17 00:00:00 2001 From: Michal Date: Fri, 17 Jul 2026 22:32:41 +0100 Subject: [PATCH] fix(pulumi): drop exports map so Pulumi can serialize the provider (v0.0.2) Pulumi's closure serializer reaches the dynamic provider's internal submodules (dist/engine.js, dist/kinds.js) by subpath. An `exports` allowlist with only "." blocks that: `pulumi preview` failed with "package.json export path for .../dist/kinds.js not found". Removing `exports` (keeping main/types) lets the serializer resolve them. Verified end-to-end: a real `pulumi up` from kubernetes-deployment updated mcpd's qwen3-thinking llm and it probes 200. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/pulumi/README.md | 8 ++++++-- src/pulumi/package.json | 8 +------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/pulumi/README.md b/src/pulumi/README.md index e0e5660..ea1f989 100644 --- a/src/pulumi/README.md +++ b/src/pulumi/README.md @@ -92,5 +92,9 @@ of the project it is attached to (the project-scope guard only gates encrypted, in Pulumi state. Use an encrypted state backend. - **Serialization:** this package is CommonJS on purpose — Pulumi serializes the provider object, and the CJS build lets its module references (`./engine`, - `./kinds`) be captured and re-required at runtime. Validate end-to-end with a - real `pulumi up` against a disposable mcpd before relying on it in production. + `./kinds`) be captured and re-required at runtime. For the same reason the + package intentionally has **no `exports` map**: Pulumi's closure serializer + reaches the internal `dist/*.js` submodules by subpath, which an `exports` + allowlist would block ("package.json export path ... not found"). Validate + end-to-end with a real `pulumi up` against a disposable mcpd before relying on + it in production. diff --git a/src/pulumi/package.json b/src/pulumi/package.json index c22a535..1e91cc4 100644 --- a/src/pulumi/package.json +++ b/src/pulumi/package.json @@ -1,18 +1,12 @@ { "name": "@mcpctl/pulumi", - "version": "0.0.1", + "version": "0.0.2", "description": "Pulumi dynamic provider for mcpctl resources (llms, servers, projects, ...). Manage mcpctl declaratively from any TypeScript Pulumi program.", "main": "./dist/index.js", "types": "./dist/index.d.ts", "files": [ "dist" ], - "exports": { - ".": { - "require": "./dist/index.js", - "types": "./dist/index.d.ts" - } - }, "scripts": { "build": "tsc --build", "clean": "rimraf dist",