Skip to content

Commit 63f362b

Browse files
Review fixes
1 parent d314c2a commit 63f362b

5 files changed

Lines changed: 26 additions & 7 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Once configured, you (or your AI agent) can process documents through natural la
4343

4444
## Installation
4545

46-
Once this extension is listed, install it from Claude Desktop Settings -> Extensions. Until the directory listing is live, use the manual setup below.
46+
Install it from Claude Desktop Settings -> Extensions if you are using Claude Desktop. If you are developing locally or using it before the directory listing is live, use the manual setup below.
4747

4848
### 1. Create a Nutrient Account
4949

manifest.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@
6565
],
6666
"compatibility": {
6767
"claude_desktop": ">=0.10.0",
68-
"platforms": [
69-
"darwin",
70-
"win32"
71-
],
7268
"runtimes": {
7369
"node": ">=18.0.0"
7470
}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@
4242
"build": "tsc && shx chmod +x dist/index.js",
4343
"format": "prettier --write .",
4444
"lint": "eslint .",
45-
"mcpb:validate": "npx -y @anthropic-ai/mcpb validate manifest.json",
46-
"mcpb:pack": "pnpm run build && node scripts/build-mcpb.mjs",
45+
"manifest:sync-version": "node scripts/sync-manifest-version.mjs",
46+
"mcpb:validate": "pnpm run manifest:sync-version && npx -y @anthropic-ai/mcpb validate manifest.json",
47+
"mcpb:pack": "pnpm run manifest:sync-version && pnpm run build && node scripts/build-mcpb.mjs",
4748
"pretest": "tsc --project tsconfig.test.json --noEmit",
4849
"test": "vitest run",
4950
"test:ci": "vitest run --exclude tests/build-api-examples.test.ts --exclude tests/signing-api-examples.test.ts",

scripts/build-mcpb.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ const rootDir = path.resolve(__dirname, '..')
1313
const outputPath = path.resolve(process.argv[2] ?? path.join(rootDir, 'dist', 'nutrient-dws.mcpb'))
1414
const cleanEnv = { ...process.env }
1515

16+
// pnpm injects npm_config_* environment variables that make npm print warnings
17+
// and can influence staging installs. Strip the known noisy ones for a clean,
18+
// reproducible npm install in the temporary bundle directory.
1619
for (const key of [
1720
'npm_config_supported_architectures',
1821
'npm_config_npm_globalconfig',

scripts/sync-manifest-version.mjs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env node
2+
3+
import { readFile, writeFile } from 'node:fs/promises'
4+
import path from 'node:path'
5+
import { fileURLToPath } from 'node:url'
6+
7+
const __filename = fileURLToPath(import.meta.url)
8+
const __dirname = path.dirname(__filename)
9+
const rootDir = path.resolve(__dirname, '..')
10+
const packageJsonPath = path.join(rootDir, 'package.json')
11+
const manifestJsonPath = path.join(rootDir, 'manifest.json')
12+
13+
const packageJson = JSON.parse(await readFile(packageJsonPath, 'utf8'))
14+
const manifestJson = JSON.parse(await readFile(manifestJsonPath, 'utf8'))
15+
16+
if (manifestJson.version !== packageJson.version) {
17+
manifestJson.version = packageJson.version
18+
await writeFile(manifestJsonPath, `${JSON.stringify(manifestJson, null, 2)}\n`, 'utf8')
19+
}

0 commit comments

Comments
 (0)