@aws/agentcore 1.0.0-preview.21 → 1.0.0-preview.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap +27 -18
- package/dist/assets/__tests__/googleadk-observability.test.ts +23 -0
- package/dist/assets/cdk/package.json +9 -9
- package/dist/assets/python/a2a/googleadk/base/pyproject.toml +2 -0
- package/dist/assets/python/agui/googleadk/base/pyproject.toml +3 -2
- package/dist/assets/python/http/autogen/base/README.md +2 -1
- package/dist/assets/python/http/googleadk/base/README.md +2 -1
- package/dist/assets/python/http/googleadk/base/pyproject.toml +3 -2
- package/dist/assets/python/http/langchain_langgraph/base/README.md +2 -1
- package/dist/assets/python/http/openaiagents/base/README.md +2 -1
- package/dist/assets/python/http/strands/base/README.md +2 -1
- package/dist/cli/index.mjs +548 -538
- package/dist/lib/dependency-management/index.d.ts +5 -0
- package/dist/lib/dependency-management/index.d.ts.map +1 -0
- package/dist/lib/dependency-management/index.js +8 -0
- package/dist/lib/dependency-management/index.js.map +1 -0
- package/dist/lib/dependency-management/messages.d.ts +30 -0
- package/dist/lib/dependency-management/messages.d.ts.map +1 -0
- package/dist/lib/dependency-management/messages.js +86 -0
- package/dist/lib/dependency-management/messages.js.map +1 -0
- package/dist/lib/dependency-management/plan.d.ts +25 -0
- package/dist/lib/dependency-management/plan.d.ts.map +1 -0
- package/dist/lib/dependency-management/plan.js +67 -0
- package/dist/lib/dependency-management/plan.js.map +1 -0
- package/dist/lib/dependency-management/semver.d.ts +21 -0
- package/dist/lib/dependency-management/semver.d.ts.map +1 -0
- package/dist/lib/dependency-management/semver.js +51 -0
- package/dist/lib/dependency-management/semver.js.map +1 -0
- package/dist/lib/dependency-management/sync.d.ts +26 -0
- package/dist/lib/dependency-management/sync.d.ts.map +1 -0
- package/dist/lib/dependency-management/sync.js +141 -0
- package/dist/lib/dependency-management/sync.js.map +1 -0
- package/dist/lib/dependency-management/types.d.ts +85 -0
- package/dist/lib/dependency-management/types.d.ts.map +1 -0
- package/dist/lib/dependency-management/types.js +3 -0
- package/dist/lib/dependency-management/types.js.map +1 -0
- package/dist/lib/errors/types.d.ts +15 -0
- package/dist/lib/errors/types.d.ts.map +1 -1
- package/dist/lib/errors/types.js +22 -1
- package/dist/lib/errors/types.js.map +1 -1
- package/dist/lib/result.d.ts +7 -0
- package/dist/lib/result.d.ts.map +1 -1
- package/dist/lib/result.js +14 -1
- package/dist/lib/result.js.map +1 -1
- package/dist/lib/schemas/io/global-config.d.ts +1 -0
- package/dist/lib/schemas/io/global-config.d.ts.map +1 -1
- package/dist/lib/schemas/io/global-config.js +1 -0
- package/dist/lib/schemas/io/global-config.js.map +1 -1
- package/npm-shrinkwrap.json +257 -212
- package/package.json +5 -2
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { syncManagedDependencies } from './sync';
|
|
2
|
+
export { computeSyncPlan } from './plan';
|
|
3
|
+
export type { SkewFinding, SyncPlan } from './plan';
|
|
4
|
+
export type { DependencyChange, DependencySyncOutcome, DependencySyncResult, PackageManifest, RestoredDependency, SkippedDependency, SyncManagedDependenciesOptions, } from './types';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/dependency-management/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACzC,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACpD,YAAY,EACV,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,8BAA8B,GAC/B,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.computeSyncPlan = exports.syncManagedDependencies = void 0;
|
|
4
|
+
var sync_1 = require("./sync");
|
|
5
|
+
Object.defineProperty(exports, "syncManagedDependencies", { enumerable: true, get: function () { return sync_1.syncManagedDependencies; } });
|
|
6
|
+
var plan_1 = require("./plan");
|
|
7
|
+
Object.defineProperty(exports, "computeSyncPlan", { enumerable: true, get: function () { return plan_1.computeSyncPlan; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/dependency-management/index.ts"],"names":[],"mappings":";;;AAAA,+BAAiD;AAAxC,+GAAA,uBAAuB,OAAA;AAChC,+BAAyC;AAAhC,uGAAA,eAAe,OAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { SkewFinding } from './plan';
|
|
2
|
+
import type { DependencyChange, RestoredDependency, SkippedDependency } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Single source of user-facing wording for dependency management, so the
|
|
5
|
+
* headless and TUI deploy paths (and any future CLI) can't drift apart.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Fallback CLI install command when the caller doesn't thread one in. The CLI layer
|
|
9
|
+
* passes `getDistroConfig().installCommand` (dist-tag/registry aware); this default
|
|
10
|
+
* keeps the lib module usable standalone.
|
|
11
|
+
*/
|
|
12
|
+
export declare const DEFAULT_CLI_INSTALL_COMMAND = "npm install -g @aws/agentcore@latest";
|
|
13
|
+
export declare const OPT_OUT_HINT = "To manage these versions yourself: agentcore config disableDependencyManagement true";
|
|
14
|
+
/**
|
|
15
|
+
* Error text for newer-than-CLI skew. Names the skewed dependencies, gives the
|
|
16
|
+
* distro-correct upgrade command, and — because the skew may be a deliberate manual
|
|
17
|
+
* bump rather than a newer CLI — points at the opt-out as the alternative.
|
|
18
|
+
*/
|
|
19
|
+
export declare function formatCliUpgradeError(skew: SkewFinding[], installCommand: string): string;
|
|
20
|
+
export declare function formatSyncNotice(options: {
|
|
21
|
+
migratedFromCaret: boolean;
|
|
22
|
+
changes: DependencyChange[];
|
|
23
|
+
restored: RestoredDependency[];
|
|
24
|
+
reinstalled: boolean;
|
|
25
|
+
/** False in check mode — nothing was written, so speak in the future tense. */
|
|
26
|
+
applied: boolean;
|
|
27
|
+
}): string | null;
|
|
28
|
+
export declare function formatSkewWarning(skew: SkewFinding[], installCommand: string): string;
|
|
29
|
+
export declare function formatSkippedWarning(skipped: SkippedDependency): string;
|
|
30
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/lib/dependency-management/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEvF;;;GAGG;AAEH;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,yCAAyC,CAAC;AAElF,eAAO,MAAM,YAAY,yFAAyF,CAAC;AAiBnH;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAUzF;AAYD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE;IACxC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,QAAQ,EAAE,kBAAkB,EAAE,CAAC;IAC/B,WAAW,EAAE,OAAO,CAAC;IACrB,+EAA+E;IAC/E,OAAO,EAAE,OAAO,CAAC;CAClB,GAAG,MAAM,GAAG,IAAI,CA6BhB;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAKrF;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAEvE"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OPT_OUT_HINT = exports.DEFAULT_CLI_INSTALL_COMMAND = void 0;
|
|
4
|
+
exports.formatCliUpgradeError = formatCliUpgradeError;
|
|
5
|
+
exports.formatSyncNotice = formatSyncNotice;
|
|
6
|
+
exports.formatSkewWarning = formatSkewWarning;
|
|
7
|
+
exports.formatSkippedWarning = formatSkippedWarning;
|
|
8
|
+
/**
|
|
9
|
+
* Single source of user-facing wording for dependency management, so the
|
|
10
|
+
* headless and TUI deploy paths (and any future CLI) can't drift apart.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Fallback CLI install command when the caller doesn't thread one in. The CLI layer
|
|
14
|
+
* passes `getDistroConfig().installCommand` (dist-tag/registry aware); this default
|
|
15
|
+
* keeps the lib module usable standalone.
|
|
16
|
+
*/
|
|
17
|
+
exports.DEFAULT_CLI_INSTALL_COMMAND = 'npm install -g @aws/agentcore@latest';
|
|
18
|
+
exports.OPT_OUT_HINT = 'To manage these versions yourself: agentcore config disableDependencyManagement true';
|
|
19
|
+
const MIGRATION_PREAMBLE = 'Your project was created before the AgentCore CLI managed dependency versions.\n' +
|
|
20
|
+
"We've updated agentcore/cdk/package.json so the CLI keeps these dependencies\n" +
|
|
21
|
+
'on versions it has been tested with (patch updates still apply automatically):';
|
|
22
|
+
// Check-mode variant: nothing was written, so the wording must promise rather than claim.
|
|
23
|
+
const MIGRATION_PREAMBLE_PENDING = 'Your project was created before the AgentCore CLI managed dependency versions.\n' +
|
|
24
|
+
'agentcore/cdk/package.json will be updated on the next deploy so the CLI keeps these\n' +
|
|
25
|
+
'dependencies on versions it has been tested with (patch updates still apply automatically):';
|
|
26
|
+
function formatSkewList(skew) {
|
|
27
|
+
return skew.map(s => `${s.name} (${s.declared}, CLI expects ${s.expected})`).join(', ');
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Error text for newer-than-CLI skew. Names the skewed dependencies, gives the
|
|
31
|
+
* distro-correct upgrade command, and — because the skew may be a deliberate manual
|
|
32
|
+
* bump rather than a newer CLI — points at the opt-out as the alternative.
|
|
33
|
+
*/
|
|
34
|
+
function formatCliUpgradeError(skew, installCommand) {
|
|
35
|
+
const plural = skew.length > 1;
|
|
36
|
+
return (`This project requires a newer version of the AgentCore CLI: ${formatSkewList(skew)} ` +
|
|
37
|
+
`${plural ? 'are' : 'is'} newer than this CLI was tested with. ` +
|
|
38
|
+
`Run \`${installCommand}\` and retry.\n` +
|
|
39
|
+
`If you intentionally updated ${plural ? 'these dependencies' : 'this dependency'} yourself, ` +
|
|
40
|
+
'you can disable managed dependency versions instead:\n' +
|
|
41
|
+
exports.OPT_OUT_HINT);
|
|
42
|
+
}
|
|
43
|
+
function formatChangeTable(changes, restored) {
|
|
44
|
+
const rows = [
|
|
45
|
+
...changes.map(c => ({ name: c.name, from: c.from, to: c.to })),
|
|
46
|
+
...restored.map(r => ({ name: r.name, from: '(removed)', to: r.to })),
|
|
47
|
+
];
|
|
48
|
+
const nameWidth = Math.max(...rows.map(r => r.name.length));
|
|
49
|
+
const fromWidth = Math.max(...rows.map(r => r.from.length));
|
|
50
|
+
return rows.map(r => ` ${r.name.padEnd(nameWidth)} ${r.from.padEnd(fromWidth)} → ${r.to}`).join('\n');
|
|
51
|
+
}
|
|
52
|
+
function formatSyncNotice(options) {
|
|
53
|
+
const { migratedFromCaret, changes, restored, reinstalled, applied } = options;
|
|
54
|
+
if (changes.length === 0 && restored.length === 0)
|
|
55
|
+
return null;
|
|
56
|
+
const lines = [];
|
|
57
|
+
if (migratedFromCaret) {
|
|
58
|
+
lines.push(applied ? MIGRATION_PREAMBLE : MIGRATION_PREAMBLE_PENDING);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
lines.push(applied
|
|
62
|
+
? 'Updated managed dependencies in agentcore/cdk/package.json:'
|
|
63
|
+
: 'Managed dependencies in agentcore/cdk/package.json will be updated on the next deploy:');
|
|
64
|
+
}
|
|
65
|
+
lines.push('');
|
|
66
|
+
lines.push(formatChangeTable(changes, restored));
|
|
67
|
+
lines.push('');
|
|
68
|
+
if (reinstalled) {
|
|
69
|
+
lines.push('Ran npm install in agentcore/cdk to apply the updates.');
|
|
70
|
+
}
|
|
71
|
+
lines.push(applied
|
|
72
|
+
? 'Dependencies you added yourself were not changed.'
|
|
73
|
+
: 'Dependencies you added yourself will not be changed.');
|
|
74
|
+
if (migratedFromCaret) {
|
|
75
|
+
lines.push(exports.OPT_OUT_HINT);
|
|
76
|
+
}
|
|
77
|
+
return lines.join('\n');
|
|
78
|
+
}
|
|
79
|
+
function formatSkewWarning(skew, installCommand) {
|
|
80
|
+
return (`${formatSkewList(skew)} ${skew.length === 1 ? 'is' : 'are'} newer than this CLI was tested with; ` +
|
|
81
|
+
`deploy may fail — upgrade the CLI with \`${installCommand}\`. ${exports.OPT_OUT_HINT}`);
|
|
82
|
+
}
|
|
83
|
+
function formatSkippedWarning(skipped) {
|
|
84
|
+
return `${skipped.name} (${skipped.raw}) ${skipped.reason}.`;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/lib/dependency-management/messages.ts"],"names":[],"mappings":";;;AAqCA,sDAUC;AAYD,4CAoCC;AAED,8CAKC;AAED,oDAEC;AAvGD;;;GAGG;AAEH;;;;GAIG;AACU,QAAA,2BAA2B,GAAG,sCAAsC,CAAC;AAErE,QAAA,YAAY,GAAG,sFAAsF,CAAC;AAEnH,MAAM,kBAAkB,GACtB,kFAAkF;IAClF,gFAAgF;IAChF,gFAAgF,CAAC;AAEnF,0FAA0F;AAC1F,MAAM,0BAA0B,GAC9B,kFAAkF;IAClF,wFAAwF;IACxF,6F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AAC;IACvE,CAAC;IACD,KAAK,CAAC,IAAI,CACR,OAAO;QACL,CAAC,CAAC,mDAAmD;QACrD,CAAC,CAAC,sDAAsD,CAC3D,CAAC;IACF,IAAI,iBAAiB,EAAE,CAAC;QACtB,KAAK,CAAC,IAAI,CAAC,oBAAY,CAAC,CAAC;IAC3B,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,SAAgB,iBAAiB,CAAC,IAAmB,EAAE,cAAsB;IAC3E,OAAO,CACL,GAAG,cAAc,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,wCAAwC;QACnG,4CAA4C,cAAc,OAAO,oBAAY,EAAE,CAChF,CAAC;AACJ,CAAC;AAED,SAAgB,oBAAoB,CAAC,OAA0B;IAC7D,OAAO,GAAG,OAAO,CAAC,IAAI,KAAK,OAAO,CAAC,GAAG,KAAK,OAAO,CAAC,MAAM,GAAG,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { DependencyChange, PackageManifest, RestoredDependency, SkippedDependency } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Pure policy computation for managed-dependency syncing. No I/O.
|
|
4
|
+
*
|
|
5
|
+
* A dependency is "managed" iff its name appears in the vended manifest
|
|
6
|
+
* (dependencies or devDependencies). The vended specifier is authoritative:
|
|
7
|
+
* the sync copies it verbatim, so the pinning policy (tilde for stable deps,
|
|
8
|
+
* exact for L3 constructs) lives entirely in the vended asset.
|
|
9
|
+
*/
|
|
10
|
+
export interface SkewFinding {
|
|
11
|
+
name: string;
|
|
12
|
+
declared: string;
|
|
13
|
+
expected: string;
|
|
14
|
+
}
|
|
15
|
+
export interface SyncPlan {
|
|
16
|
+
/** Managed deps where the project declares a newer minor/major than the CLI expects. */
|
|
17
|
+
skew: SkewFinding[];
|
|
18
|
+
changes: DependencyChange[];
|
|
19
|
+
restored: RestoredDependency[];
|
|
20
|
+
skipped: SkippedDependency[];
|
|
21
|
+
/** True when any managed dep had a caret range — the project predates pinning. */
|
|
22
|
+
migratedFromCaret: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare function computeSyncPlan(vended: PackageManifest, project: PackageManifest): SyncPlan;
|
|
25
|
+
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/lib/dependency-management/plan.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAEhB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAGjB;;;;;;;GAOG;AAEH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,QAAQ;IACvB,wFAAwF;IACxF,IAAI,EAAE,WAAW,EAAE,CAAC;IACpB,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,QAAQ,EAAE,kBAAkB,EAAE,CAAC;IAC/B,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,kFAAkF;IAClF,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AA2BD,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,eAAe,GAAG,QAAQ,CAuC3F"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.computeSyncPlan = computeSyncPlan;
|
|
4
|
+
const semver_1 = require("./semver");
|
|
5
|
+
const semver_2 = require("semver");
|
|
6
|
+
const SECTIONS = ['dependencies', 'devDependencies'];
|
|
7
|
+
function findDeclared(manifest, name) {
|
|
8
|
+
for (const section of SECTIONS) {
|
|
9
|
+
const raw = manifest[section]?.[name];
|
|
10
|
+
if (raw !== undefined)
|
|
11
|
+
return { section, raw };
|
|
12
|
+
}
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Skew exists when the project's declared base version is ahead of the CLI's
|
|
17
|
+
* expectation in a way patch-floating can't explain: a higher major.minor for
|
|
18
|
+
* ranged deps, or any prerelease-aware greater-than for exact pins (so an
|
|
19
|
+
* alpha.20 project is never silently downgraded to an alpha.19 CLI's pin).
|
|
20
|
+
*/
|
|
21
|
+
function isSkewed(declared, expected) {
|
|
22
|
+
if (declared.kind === 'unsupported' || expected.kind === 'unsupported')
|
|
23
|
+
return false;
|
|
24
|
+
const d = declared.version;
|
|
25
|
+
const e = expected.version;
|
|
26
|
+
if (expected.kind === 'exact')
|
|
27
|
+
return (0, semver_2.compare)(d, e) > 0;
|
|
28
|
+
if (d.major !== e.major)
|
|
29
|
+
return d.major > e.major;
|
|
30
|
+
return d.minor > e.minor;
|
|
31
|
+
}
|
|
32
|
+
function computeSyncPlan(vended, project) {
|
|
33
|
+
const plan = { skew: [], changes: [], restored: [], skipped: [], migratedFromCaret: false };
|
|
34
|
+
for (const section of SECTIONS) {
|
|
35
|
+
for (const [name, expectedRaw] of Object.entries(vended[section] ?? {})) {
|
|
36
|
+
const expected = (0, semver_1.parseSpecifier)(expectedRaw);
|
|
37
|
+
const declared = findDeclared(project, name);
|
|
38
|
+
if (!declared) {
|
|
39
|
+
// Managed dep deleted by the user — the vended CDK app can't build without it.
|
|
40
|
+
plan.restored.push({ name, section, to: expectedRaw });
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
if (declared.raw === expectedRaw)
|
|
44
|
+
continue;
|
|
45
|
+
const declaredSpec = (0, semver_1.parseSpecifier)(declared.raw);
|
|
46
|
+
if (declaredSpec.kind === 'unsupported') {
|
|
47
|
+
// file:/git:/tag/range specifiers (incl. the bundled-tarball override) are
|
|
48
|
+
// deliberate local overrides — never rewrite, never skew-check.
|
|
49
|
+
plan.skipped.push({
|
|
50
|
+
name,
|
|
51
|
+
raw: declared.raw,
|
|
52
|
+
reason: 'uses a non-semver specifier and was left unmanaged',
|
|
53
|
+
});
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
if (isSkewed(declaredSpec, expected)) {
|
|
57
|
+
plan.skew.push({ name, declared: declared.raw, expected: expectedRaw });
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
if (declaredSpec.kind === 'caret')
|
|
61
|
+
plan.migratedFromCaret = true;
|
|
62
|
+
plan.changes.push({ name, section: declared.section, from: declared.raw, to: expectedRaw });
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return plan;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=plan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../src/lib/dependency-management/plan.ts"],"names":[],"mappings":";;AA6DA,0CAuCC;AApGD,qCAA0C;AAS1C,mCAAiC;AA2BjC,MAAM,QAAQ,GAAwB,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;AAE1E,SAAS,YAAY,CAAC,QAAyB,EAAE,IAAY;IAC3D,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,GAAG,KAAK,SAAS;YAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;IACjD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,SAAS,QAAQ,CAAC,QAAyB,EAAE,QAAyB;IACpE,IAAI,QAAQ,CAAC,IAAI,KAAK,aAAa,IAAI,QAAQ,CAAC,IAAI,KAAK,aAAa;QAAE,OAAO,KAAK,CAAC;IACrF,MAAM,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC;IAC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Aa,EAAE,CAAC;gBACxC,2EAA2E;gBAC3E,gEAAgE;gBAChE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;oBAChB,IAAI;oBACJ,GAAG,EAAE,QAAQ,CAAC,GAAG;oBACjB,MAAM,EAAE,oDAAoD;iBAC7D,CAAC,CAAC;gBACH,SAAS;YACX,CAAC;YAED,IAAI,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE,CAAC;gBACrC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,GAAG,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC;gBACxE,SAAS;YACX,CAAC;YAED,IAAI,YAAY,CAAC,IAAI,KAAK,OAAO;gBAAE,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;YACjE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,GAAG,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;QAC9F,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { SemVer } from 'semver';
|
|
2
|
+
/** A parsed version: node-semver's SemVer (major / minor / patch / prerelease). */
|
|
3
|
+
export type ParsedVersion = SemVer;
|
|
4
|
+
export type SpecifierKind = 'exact' | 'tilde' | 'caret';
|
|
5
|
+
export type ParsedSpecifier = {
|
|
6
|
+
kind: SpecifierKind;
|
|
7
|
+
version: ParsedVersion;
|
|
8
|
+
raw: string;
|
|
9
|
+
} | {
|
|
10
|
+
kind: 'unsupported';
|
|
11
|
+
raw: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function parseVersion(version: string): ParsedVersion | null;
|
|
14
|
+
/**
|
|
15
|
+
* Parse an npm dependency specifier into exact / tilde / caret + base version.
|
|
16
|
+
* Anything else (file:, git:, workspace:, URLs, wildcards, compound ranges, tags)
|
|
17
|
+
* is 'unsupported' — the sync skips those rather than guessing. Strict parsing
|
|
18
|
+
* (no loose/coerce) keeps `1.x`, `*`, `latest`, and `>=1.2.3` unsupported.
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseSpecifier(raw: string): ParsedSpecifier;
|
|
21
|
+
//# sourceMappingURL=semver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semver.d.ts","sourceRoot":"","sources":["../../../src/lib/dependency-management/semver.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,mFAAmF;AACnF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAExD,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,OAAO,EAAE,aAAa,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAC5D;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzC,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAKlE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAkB3D"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseVersion = parseVersion;
|
|
4
|
+
exports.parseSpecifier = parseSpecifier;
|
|
5
|
+
/**
|
|
6
|
+
* Semver parsing and comparison for managed-dependency syncing.
|
|
7
|
+
*
|
|
8
|
+
* Version parsing and comparison are delegated to node-semver (the `semver`
|
|
9
|
+
* package), which implements full semver precedence including prerelease
|
|
10
|
+
* ordering (0.1.0-alpha.19 < 0.1.0-alpha.20 < 0.1.0) — the dependency-check
|
|
11
|
+
* parser in src/cli/external-requirements/versions.ts does not, as it drops
|
|
12
|
+
* prerelease tags, which here would make an alpha downgrade look like a no-op.
|
|
13
|
+
* The specifier classifier stays hand-rolled because the sync policy needs to
|
|
14
|
+
* know whether a declared range was written as tilde, caret, or an exact pin,
|
|
15
|
+
* and node-semver's Range API erases that distinction (it expands `~`/`^` into
|
|
16
|
+
* plain comparators).
|
|
17
|
+
*/
|
|
18
|
+
const semver_1 = require("semver");
|
|
19
|
+
function parseVersion(version) {
|
|
20
|
+
// npm accepts a single leading 'v' or 'V' on version strings (v1.2.3, ~v1.2.3);
|
|
21
|
+
// node-semver only recognizes the lowercase form, so normalize before parsing.
|
|
22
|
+
const normalized = version.trim().replace(/^V/, 'v');
|
|
23
|
+
return (0, semver_1.parse)(normalized, { loose: false });
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Parse an npm dependency specifier into exact / tilde / caret + base version.
|
|
27
|
+
* Anything else (file:, git:, workspace:, URLs, wildcards, compound ranges, tags)
|
|
28
|
+
* is 'unsupported' — the sync skips those rather than guessing. Strict parsing
|
|
29
|
+
* (no loose/coerce) keeps `1.x`, `*`, `latest`, and `>=1.2.3` unsupported.
|
|
30
|
+
*/
|
|
31
|
+
function parseSpecifier(raw) {
|
|
32
|
+
const trimmed = raw.trim();
|
|
33
|
+
let kind = 'exact';
|
|
34
|
+
let versionPart = trimmed;
|
|
35
|
+
if (trimmed.startsWith('~')) {
|
|
36
|
+
kind = 'tilde';
|
|
37
|
+
versionPart = trimmed.slice(1);
|
|
38
|
+
}
|
|
39
|
+
else if (trimmed.startsWith('^')) {
|
|
40
|
+
kind = 'caret';
|
|
41
|
+
versionPart = trimmed.slice(1);
|
|
42
|
+
}
|
|
43
|
+
else if (trimmed.startsWith('=')) {
|
|
44
|
+
versionPart = trimmed.slice(1);
|
|
45
|
+
}
|
|
46
|
+
const version = parseVersion(versionPart);
|
|
47
|
+
if (!version)
|
|
48
|
+
return { kind: 'unsupported', raw };
|
|
49
|
+
return { kind, version, raw };
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=semver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semver.js","sourceRoot":"","sources":["../../../src/lib/dependency-management/semver.ts"],"names":[],"mappings":";;AAyBA,oCAKC;AAQD,wCAkBC;AAxDD;;;;;;;;;;;;GAYG;AACH,mCAA+B;AAY/B,SAAgB,YAAY,CAAC,OAAe;IAC1C,gFAAgF;IAChF,+EAA+E;IAC/E,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACrD,OAAO,IAAA,cAAK,EAAC,UAAU,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,GAAW;IACxC,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IAC3B,IAAI,IAAI,GAAkB,OAAO,CAAC;IAClC,IAAI,WAAW,GAAG,OAAO,CAAC;IAE1B,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAC5B,IAAI,GAAG,OAAO,CAAC;QACf,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC;SAAM,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACnC,IAAI,GAAG,OAAO,CAAC;QACf,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC;SAAM,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACnC,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,OAAO,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;IAC1C,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC;IAClD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { DependencySyncResult, SyncManagedDependenciesOptions } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Sync the managed dependencies of a vended CDK project to the versions this CLI
|
|
4
|
+
* release was tested with.
|
|
5
|
+
*
|
|
6
|
+
* The vended asset package.json is the source of truth: every dependency named in it
|
|
7
|
+
* is managed and rewritten to its vended specifier (tilde for stable deps so patches
|
|
8
|
+
* float, exact for the L3 constructs); everything else in the user's file is untouched.
|
|
9
|
+
* Projects that predate pinning (caret ranges) are migrated automatically. If the
|
|
10
|
+
* project declares a managed dependency newer than this CLI expects, the project was
|
|
11
|
+
* updated by a newer CLI (or the user bumped it manually) and this throws
|
|
12
|
+
* CliVersionTooOldError (downgraded to a warning when `disabled` or
|
|
13
|
+
* `treatSkewAsWarning`). When anything changed — or node_modules is missing —
|
|
14
|
+
* `npm install` reconciles the edited package.json against the existing lockfile
|
|
15
|
+
* incrementally; node_modules and the lockfile are never deleted, so user-added deps
|
|
16
|
+
* keep their resolved versions. If the install fails, the pre-rewrite package.json is
|
|
17
|
+
* restored so a retry recomputes the same plan and re-attempts the install.
|
|
18
|
+
*
|
|
19
|
+
* `mode: 'check'` computes the same plan/warnings/notice without writing or
|
|
20
|
+
* installing, for preview flows that must not mutate the working tree.
|
|
21
|
+
*
|
|
22
|
+
* All user-facing wording is returned on the result (`notice`, `warnings`) — callers
|
|
23
|
+
* only display it. Throws CliVersionTooOldError | DependencySyncError; never exits.
|
|
24
|
+
*/
|
|
25
|
+
export declare function syncManagedDependencies(options: SyncManagedDependenciesOptions): Promise<DependencySyncResult>;
|
|
26
|
+
//# sourceMappingURL=sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../src/lib/dependency-management/sync.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,oBAAoB,EAAmB,8BAA8B,EAAE,MAAM,SAAS,CAAC;AAsBrG;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,8BAA8B,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAkHpH"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.syncManagedDependencies = syncManagedDependencies;
|
|
4
|
+
const types_1 = require("../errors/types");
|
|
5
|
+
const subprocess_1 = require("../utils/subprocess");
|
|
6
|
+
const messages_1 = require("./messages");
|
|
7
|
+
const plan_1 = require("./plan");
|
|
8
|
+
const node_fs_1 = require("node:fs");
|
|
9
|
+
const promises_1 = require("node:fs/promises");
|
|
10
|
+
const node_path_1 = require("node:path");
|
|
11
|
+
async function readManifest(path, fileDescription) {
|
|
12
|
+
let raw;
|
|
13
|
+
try {
|
|
14
|
+
raw = await (0, promises_1.readFile)(path, 'utf-8');
|
|
15
|
+
}
|
|
16
|
+
catch (err) {
|
|
17
|
+
throw new types_1.DependencySyncError(`Could not read ${fileDescription} at ${path}: ${String(err)}`, { cause: err });
|
|
18
|
+
}
|
|
19
|
+
try {
|
|
20
|
+
return { manifest: JSON.parse(raw), raw };
|
|
21
|
+
}
|
|
22
|
+
catch (err) {
|
|
23
|
+
throw new types_1.DependencySyncError(`Could not parse ${fileDescription} at ${path}: ${String(err)}`, { cause: err });
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Sync the managed dependencies of a vended CDK project to the versions this CLI
|
|
28
|
+
* release was tested with.
|
|
29
|
+
*
|
|
30
|
+
* The vended asset package.json is the source of truth: every dependency named in it
|
|
31
|
+
* is managed and rewritten to its vended specifier (tilde for stable deps so patches
|
|
32
|
+
* float, exact for the L3 constructs); everything else in the user's file is untouched.
|
|
33
|
+
* Projects that predate pinning (caret ranges) are migrated automatically. If the
|
|
34
|
+
* project declares a managed dependency newer than this CLI expects, the project was
|
|
35
|
+
* updated by a newer CLI (or the user bumped it manually) and this throws
|
|
36
|
+
* CliVersionTooOldError (downgraded to a warning when `disabled` or
|
|
37
|
+
* `treatSkewAsWarning`). When anything changed — or node_modules is missing —
|
|
38
|
+
* `npm install` reconciles the edited package.json against the existing lockfile
|
|
39
|
+
* incrementally; node_modules and the lockfile are never deleted, so user-added deps
|
|
40
|
+
* keep their resolved versions. If the install fails, the pre-rewrite package.json is
|
|
41
|
+
* restored so a retry recomputes the same plan and re-attempts the install.
|
|
42
|
+
*
|
|
43
|
+
* `mode: 'check'` computes the same plan/warnings/notice without writing or
|
|
44
|
+
* installing, for preview flows that must not mutate the working tree.
|
|
45
|
+
*
|
|
46
|
+
* All user-facing wording is returned on the result (`notice`, `warnings`) — callers
|
|
47
|
+
* only display it. Throws CliVersionTooOldError | DependencySyncError; never exits.
|
|
48
|
+
*/
|
|
49
|
+
async function syncManagedDependencies(options) {
|
|
50
|
+
const { vendedPackageJsonPath, projectDir, disabled = false, mode = 'apply', treatSkewAsWarning = false, installCommand = messages_1.DEFAULT_CLI_INSTALL_COMMAND, } = options;
|
|
51
|
+
const checkOnly = mode === 'check';
|
|
52
|
+
const projectPackageJsonPath = (0, node_path_1.join)(projectDir, 'package.json');
|
|
53
|
+
const { manifest: vended } = await readManifest(vendedPackageJsonPath, 'the vended CDK package.json');
|
|
54
|
+
// Keep the raw pre-rewrite text: it's restored verbatim if npm install fails, so a
|
|
55
|
+
// retry recomputes the same plan instead of seeing an already-matching manifest.
|
|
56
|
+
const { manifest: project, raw: projectRaw } = await readManifest(projectPackageJsonPath, "the project's CDK package.json");
|
|
57
|
+
const plan = (0, plan_1.computeSyncPlan)(vended, project);
|
|
58
|
+
// `disabled` wins over check mode: an opted-out sync never writes regardless of mode.
|
|
59
|
+
const outcome = disabled ? 'opted-out' : checkOnly ? 'check-only' : 'synced';
|
|
60
|
+
const result = {
|
|
61
|
+
outcome,
|
|
62
|
+
optedOut: disabled,
|
|
63
|
+
checkOnly,
|
|
64
|
+
migratedFromCaret: plan.migratedFromCaret,
|
|
65
|
+
reinstalled: false,
|
|
66
|
+
skewWarning: false,
|
|
67
|
+
changes: plan.changes,
|
|
68
|
+
restored: plan.restored,
|
|
69
|
+
skipped: plan.skipped,
|
|
70
|
+
warnings: plan.skipped.map(messages_1.formatSkippedWarning),
|
|
71
|
+
notice: null,
|
|
72
|
+
};
|
|
73
|
+
if (plan.skew.length > 0) {
|
|
74
|
+
if (!disabled && !treatSkewAsWarning && !checkOnly) {
|
|
75
|
+
throw new types_1.CliVersionTooOldError((0, messages_1.formatCliUpgradeError)(plan.skew, installCommand));
|
|
76
|
+
}
|
|
77
|
+
result.skewWarning = true;
|
|
78
|
+
result.warnings.push((0, messages_1.formatSkewWarning)(plan.skew, installCommand));
|
|
79
|
+
}
|
|
80
|
+
if (disabled) {
|
|
81
|
+
return result;
|
|
82
|
+
}
|
|
83
|
+
const hasPlannedChanges = plan.changes.length > 0 || plan.restored.length > 0;
|
|
84
|
+
if (checkOnly) {
|
|
85
|
+
// Report what WOULD change without touching the working tree (future-tense wording).
|
|
86
|
+
result.notice = (0, messages_1.formatSyncNotice)({
|
|
87
|
+
migratedFromCaret: result.migratedFromCaret,
|
|
88
|
+
changes: result.changes,
|
|
89
|
+
restored: result.restored,
|
|
90
|
+
reinstalled: false,
|
|
91
|
+
applied: false,
|
|
92
|
+
});
|
|
93
|
+
return result;
|
|
94
|
+
}
|
|
95
|
+
if (hasPlannedChanges) {
|
|
96
|
+
// Mutate the parsed manifest in place so user key order and unknown fields survive.
|
|
97
|
+
for (const change of plan.changes) {
|
|
98
|
+
(project[change.section] ??= {})[change.name] = change.to;
|
|
99
|
+
}
|
|
100
|
+
for (const restoredDep of plan.restored) {
|
|
101
|
+
const section = (project[restoredDep.section] ??= {});
|
|
102
|
+
section[restoredDep.name] = restoredDep.to;
|
|
103
|
+
}
|
|
104
|
+
try {
|
|
105
|
+
await (0, promises_1.writeFile)(projectPackageJsonPath, JSON.stringify(project, null, 2) + '\n', 'utf-8');
|
|
106
|
+
}
|
|
107
|
+
catch (err) {
|
|
108
|
+
throw new types_1.DependencySyncError(`Failed to update the CDK project's dependencies: ${String(err)}`, { cause: err });
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
// Install when the manifest changed OR node_modules is missing (e.g. the user deleted it, or
|
|
112
|
+
// `create --no-install` never populated it). npm >=7 reconciles the edited package.json
|
|
113
|
+
// against the existing lockfile incrementally, so we never delete node_modules or the
|
|
114
|
+
// lockfile: user-added deps keep their resolved versions and installs stay warm.
|
|
115
|
+
const needsInstall = hasPlannedChanges || !(0, node_fs_1.existsSync)((0, node_path_1.join)(projectDir, 'node_modules'));
|
|
116
|
+
if (!needsInstall) {
|
|
117
|
+
return result;
|
|
118
|
+
}
|
|
119
|
+
const installResult = await (0, subprocess_1.runSubprocessCapture)('npm', ['install'], { cwd: projectDir });
|
|
120
|
+
if (installResult.code !== 0) {
|
|
121
|
+
// Restore the pre-rewrite package.json before failing. Without this, the retry would see a
|
|
122
|
+
// manifest that already matches the pins and an existing node_modules (a failed install
|
|
123
|
+
// doesn't remove it), skip the install, and deploy against the stale installed tree — the
|
|
124
|
+
// exact skew this sync exists to prevent. Restoring makes the retry recompute the same plan
|
|
125
|
+
// and re-attempt the install. Best-effort: a restore failure must not mask the install error.
|
|
126
|
+
if (hasPlannedChanges) {
|
|
127
|
+
await (0, promises_1.writeFile)(projectPackageJsonPath, projectRaw, 'utf-8').catch(() => undefined);
|
|
128
|
+
}
|
|
129
|
+
throw new types_1.DependencySyncError(`npm install failed after updating managed dependencies (exit ${String(installResult.code)}): ${installResult.stderr}`);
|
|
130
|
+
}
|
|
131
|
+
result.reinstalled = true;
|
|
132
|
+
result.notice = (0, messages_1.formatSyncNotice)({
|
|
133
|
+
migratedFromCaret: result.migratedFromCaret,
|
|
134
|
+
changes: result.changes,
|
|
135
|
+
restored: result.restored,
|
|
136
|
+
reinstalled: result.reinstalled,
|
|
137
|
+
applied: true,
|
|
138
|
+
});
|
|
139
|
+
return result;
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../../src/lib/dependency-management/sync.ts"],"names":[],"mappings":";;AAuDA,0DAkHC;AAzKD,2CAA6E;AAC7E,oDAA2D;AAC3D,yCAMoB;AACpB,iCAAyC;AAEzC,qCAAqC;AACrC,+CAAuD;AACvD,yCAAiC;AAEjC,KAAK,UAAU,YAAY,CACzB,IAAY,EACZ,eAAuB;IAEvB,IAAI,GAAW,CAAC;IAChB,IAAI,CAAC;QACH,GAAG,GAAG,MAAM,IAAA,mBAAQ,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,2BAAmB,CAAC,kBAAkB,eAAe,OAAO,IAAI,KAAK,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;IAChH,CAAC;IACD,IAAI,CAAC;QACH,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAoB,EAAE,GAAG,EAAE,CAAC;IAC/D,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,2BAAmB,CAAC,mBAAmB,eAAe,OAAO,IAAI,KAAK,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;IACjH,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACI,KAAK,UAAU,uBAAuB,CAAC,OAAuC;IACnF,MAAM,EACJ,qBAAqB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,WAAW,GAAG,IAAI,CAAC;IAE1B,MAAM,CAAC,MAAM,GAAG,IAAA,2BAAgB,EAAC;QAC/B,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;QAC3C,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,OAAO,EAAE,IAAI;KACd,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export type DependencySection = 'dependencies' | 'devDependencies';
|
|
2
|
+
/** A package.json shape that preserves unknown fields verbatim. */
|
|
3
|
+
export interface PackageManifest {
|
|
4
|
+
dependencies?: Record<string, string>;
|
|
5
|
+
devDependencies?: Record<string, string>;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface DependencyChange {
|
|
9
|
+
name: string;
|
|
10
|
+
section: DependencySection;
|
|
11
|
+
from: string;
|
|
12
|
+
to: string;
|
|
13
|
+
}
|
|
14
|
+
export interface RestoredDependency {
|
|
15
|
+
name: string;
|
|
16
|
+
section: DependencySection;
|
|
17
|
+
to: string;
|
|
18
|
+
}
|
|
19
|
+
export interface SkippedDependency {
|
|
20
|
+
name: string;
|
|
21
|
+
raw: string;
|
|
22
|
+
reason: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* How the sync concluded:
|
|
26
|
+
* - 'synced': the sync ran in apply mode (rewrites/installs happened as needed).
|
|
27
|
+
* - 'check-only': `mode: 'check'` — plan computed, nothing written or installed.
|
|
28
|
+
* - 'opted-out': dependency management disabled via global config — nothing written.
|
|
29
|
+
* - 'skipped': the CLI layer skipped the sync entirely (AGENTCORE_SKIP_INSTALL).
|
|
30
|
+
* - 'failure-suppressed': the sync threw on a teardown deploy and the failure was
|
|
31
|
+
* downgraded to a warning so the teardown could proceed.
|
|
32
|
+
* - 'failed': the sync threw and the deploy failed with it (CliVersionTooOldError, or
|
|
33
|
+
* DependencySyncError on a non-teardown deploy). Attached by the CLI layer's failure
|
|
34
|
+
* path purely so dep_sync_* telemetry records that the sync itself was the failure.
|
|
35
|
+
*/
|
|
36
|
+
export type DependencySyncOutcome = 'synced' | 'check-only' | 'opted-out' | 'skipped' | 'failure-suppressed' | 'failed';
|
|
37
|
+
export interface DependencySyncResult {
|
|
38
|
+
/**
|
|
39
|
+
* Primary classification of the sync run. The booleans below preserve overlapping detail
|
|
40
|
+
* (e.g. an opted-out run in check mode also has `checkOnly: true`).
|
|
41
|
+
*/
|
|
42
|
+
outcome: DependencySyncOutcome;
|
|
43
|
+
/** True when dependency management is disabled via global config — nothing was written. */
|
|
44
|
+
optedOut: boolean;
|
|
45
|
+
/** True when this was a check-only run (`mode: 'check'`) — plan computed, nothing written or installed. */
|
|
46
|
+
checkOnly: boolean;
|
|
47
|
+
/** True when the project predated pinning (caret ranges on managed deps were rewritten). */
|
|
48
|
+
migratedFromCaret: boolean;
|
|
49
|
+
/** True when `npm install` was run to reconcile the installed tree (manifest changed, or node_modules was missing). */
|
|
50
|
+
reinstalled: boolean;
|
|
51
|
+
/** True when a newer-than-CLI managed dep was found but downgraded to a warning (opted out or skew-as-warning). */
|
|
52
|
+
skewWarning: boolean;
|
|
53
|
+
changes: DependencyChange[];
|
|
54
|
+
restored: RestoredDependency[];
|
|
55
|
+
skipped: SkippedDependency[];
|
|
56
|
+
/** Ready-to-print warning lines (downgraded skew, skipped specifiers). */
|
|
57
|
+
warnings: string[];
|
|
58
|
+
/** Ready-to-print user notice (migration message and/or change summary), null if nothing to say. */
|
|
59
|
+
notice: string | null;
|
|
60
|
+
}
|
|
61
|
+
export interface SyncManagedDependenciesOptions {
|
|
62
|
+
/** Path to the CLI's vended CDK package.json — source of truth for managed names + versions. */
|
|
63
|
+
vendedPackageJsonPath: string;
|
|
64
|
+
/** The user project's CDK directory (contains package.json, node_modules, lockfile). */
|
|
65
|
+
projectDir: string;
|
|
66
|
+
/** From global config `disableDependencyManagement`. When true: no writes, skew becomes a warning. */
|
|
67
|
+
disabled?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* 'apply' (default) rewrites package.json and installs; 'check' only computes the plan and
|
|
70
|
+
* user-facing wording — no writes, no install. Used by preview modes (--dry-run / --diff),
|
|
71
|
+
* which must never mutate the working tree.
|
|
72
|
+
*/
|
|
73
|
+
mode?: 'apply' | 'check';
|
|
74
|
+
/**
|
|
75
|
+
* Downgrade newer-than-CLI skew from CliVersionTooOldError to a warning even when managed.
|
|
76
|
+
* Used by teardown deploys, where skew must not block destroying a cost-incurring stack.
|
|
77
|
+
*/
|
|
78
|
+
treatSkewAsWarning?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* CLI upgrade command used in skew errors/warnings. The CLI layer passes the distro-aware
|
|
81
|
+
* `getDistroConfig().installCommand`; defaults keep the lib module usable standalone.
|
|
82
|
+
*/
|
|
83
|
+
installCommand?: string;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/dependency-management/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,cAAc,GAAG,iBAAiB,CAAC;AAEnE,mEAAmE;AACnE,MAAM,WAAW,eAAe;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,iBAAiB,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,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