Commit da8e395
fix(apps-cli): drop oclif manifest from build so tests load src, not lib [DX-9770]
Root cause of the 12 apps-cli deploy/update CI failures: apps-cli's tests stub the
SRC command classes (BaseCommand/Update/initMarketplaceSDK). oclif only loads commands
from src (via ts-node in dev) when NO oclif.manifest.json exists; when a manifest is
present it loads the compiled lib, so the src stubs never apply and the command makes a
real developer-hub HTTP call -> 401 'session timed out'.
The build script had been changed to `pnpm compile && oclif manifest && oclif readme`,
which created the manifest during the CI build step; v2-dev's build was `tsc -b` (no
manifest), which is why v2-dev stayed green. Reproduced locally: no manifest -> tests
pass; manifest present -> tests fail.
Fix: build = `pnpm compile` only. The manifest is still generated by prepack for
publishing. Reverts the exploratory hermetic/diagnostic edits to the test files (not
needed once the manifest cause was found). apps-cli: 61 passing.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NbgqgVDTDmh6c9LwDtMEf91 parent a4a44d5 commit da8e395
3 files changed
Lines changed: 1 addition & 31 deletions
File tree
- packages/contentstack-apps-cli
- test/unit/commands/app
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
Lines changed: 0 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | 15 | | |
26 | 16 | | |
27 | 17 | | |
28 | 18 | | |
29 | 19 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | 20 | | |
37 | 21 | | |
38 | 22 | | |
| |||
Lines changed: 0 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | 15 | | |
24 | 16 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | 17 | | |
32 | 18 | | |
33 | 19 | | |
| |||
0 commit comments