Commit cf9fdc6
fix: bundle @run402/sdk dist into run402 and run402-mcp tarballs
v1.40.1 shipped broken — both run402-mcp and run402 imported the SDK
via a monorepo-relative path (`../sdk/dist/node/index.js` and
`../../sdk/dist/node/index.js`) that points outside the tarball after
npm install. Every command threw ERR_MODULE_NOT_FOUND before running.
Fix by including the already-built SDK inside each tarball, mirroring
the existing core/dist bundling pattern:
- Root package.json: add sdk/dist and sdk/core-dist to the MCP files
allowlist. Source import path `../sdk/dist/node/index.js` from
dist/sdk.js now resolves self-contained.
- cli/package.json: add sdk/ to files, extend prepack to copy
../sdk/dist and ../sdk/core-dist.
- cli/lib/sdk.mjs: rewrite import from ../../sdk/dist to ../sdk/dist
so it resolves inside the package root.
- Root build script: also populate cli/sdk/dist and cli/sdk/core-dist
so dev and e2e tests match the tarball layout.
- .gitignore: cli/sdk/ is build output.
Bump all three to 1.40.2 to keep the monorepo invariant (SDK tarball
content is unchanged from 1.40.1).
Verified by `npm pack` + extract + install + import on both tarballs
before publishing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 4f77ffb commit cf9fdc6
6 files changed
Lines changed: 13 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | | - | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments