@venturekit/infra 0.0.52 → 0.0.54
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/cdk/app-stack.d.ts.map +1 -1
- package/dist/cdk/app-stack.js +24 -24
- package/dist/cdk/app-stack.js.map +1 -1
- package/dist/cdk/compute-stack.d.ts.map +1 -1
- package/dist/cdk/compute-stack.js +3 -1
- package/dist/cdk/compute-stack.js.map +1 -1
- package/dist/cdk/data-stack.d.ts.map +1 -1
- package/dist/cdk/data-stack.js +51 -33
- package/dist/cdk/data-stack.js.map +1 -1
- package/dist/cdk/index.d.ts +2 -0
- package/dist/cdk/index.d.ts.map +1 -1
- package/dist/cdk/index.js +2 -0
- package/dist/cdk/index.js.map +1 -1
- package/dist/cdk/migration-runner.js +3 -3
- package/dist/cdk/network-stack.d.ts.map +1 -1
- package/dist/cdk/network-stack.js +3 -1
- package/dist/cdk/network-stack.js.map +1 -1
- package/dist/cdk/services-stack.d.ts.map +1 -1
- package/dist/cdk/services-stack.js +2 -0
- package/dist/cdk/services-stack.js.map +1 -1
- package/dist/cdk/shared/ec2-descriptions.d.ts +13 -0
- package/dist/cdk/shared/ec2-descriptions.d.ts.map +1 -0
- package/dist/cdk/shared/ec2-descriptions.js +39 -0
- package/dist/cdk/shared/ec2-descriptions.js.map +1 -0
- package/dist/cdk/shared/lambda-helpers.js +2 -2
- package/dist/cdk/shared/retained-exports.d.ts +24 -0
- package/dist/cdk/shared/retained-exports.d.ts.map +1 -0
- package/dist/cdk/shared/retained-exports.js +38 -0
- package/dist/cdk/shared/retained-exports.js.map +1 -0
- package/package.json +2 -2
|
@@ -64,7 +64,7 @@ export function bundleHandlerCodeWithEsbuild(handlerFile, projectDir, externalMo
|
|
|
64
64
|
entryPoints: [handlerFile],
|
|
65
65
|
bundle: true,
|
|
66
66
|
platform: 'node',
|
|
67
|
-
target: '
|
|
67
|
+
target: 'node22',
|
|
68
68
|
outfile,
|
|
69
69
|
// `externalModules` (envConfig.lambda) are provided at runtime by a
|
|
70
70
|
// layer, e.g. a native module esbuild can't bundle.
|
|
@@ -92,7 +92,7 @@ export function toLambdaRuntime(envConfig) {
|
|
|
92
92
|
case 'nodejs18.x':
|
|
93
93
|
return lambda.Runtime.NODEJS_18_X;
|
|
94
94
|
default:
|
|
95
|
-
return lambda.Runtime.
|
|
95
|
+
return lambda.Runtime.NODEJS_22_X;
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
export function toLambdaArchitecture(envConfig) {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keep the CloudFormation exports other stacks still import.
|
|
3
|
+
*
|
|
4
|
+
* The tiers pass values in-process (the generated app hands the data
|
|
5
|
+
* tier's database to the app tier), and CDK turns each cross-stack
|
|
6
|
+
* reference into an export of the producer. When a change stops
|
|
7
|
+
* referencing one, CDK stops generating it — but the producer deploys
|
|
8
|
+
* BEFORE its consumers, which still import it, and CloudFormation
|
|
9
|
+
* refuses the update ("Cannot delete export … as it is in use by …").
|
|
10
|
+
*
|
|
11
|
+
* `vk deploy` lists the venture's exports that are still imported
|
|
12
|
+
* (`resolveImportedExports`); for each one a producer's new template no
|
|
13
|
+
* longer generates, this publishes it again — same name, same deployed
|
|
14
|
+
* value, so CloudFormation sees no change. Once its consumers have
|
|
15
|
+
* redeployed nothing imports it, and the next deploy drops it.
|
|
16
|
+
*/
|
|
17
|
+
import { type Stack } from 'aws-cdk-lib';
|
|
18
|
+
/** An export the deployed stacks hold, with its deployed value. */
|
|
19
|
+
export interface ImportedExport {
|
|
20
|
+
name: string;
|
|
21
|
+
value: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function retainImportedExports(stack: Stack, exports: readonly ImportedExport[]): void;
|
|
24
|
+
//# sourceMappingURL=retained-exports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retained-exports.d.ts","sourceRoot":"","sources":["../../../src/cdk/shared/retained-exports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAa,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpD,mEAAmE;AACnE,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,cAAc,EAAE,GAAG,IAAI,CAmB5F"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keep the CloudFormation exports other stacks still import.
|
|
3
|
+
*
|
|
4
|
+
* The tiers pass values in-process (the generated app hands the data
|
|
5
|
+
* tier's database to the app tier), and CDK turns each cross-stack
|
|
6
|
+
* reference into an export of the producer. When a change stops
|
|
7
|
+
* referencing one, CDK stops generating it — but the producer deploys
|
|
8
|
+
* BEFORE its consumers, which still import it, and CloudFormation
|
|
9
|
+
* refuses the update ("Cannot delete export … as it is in use by …").
|
|
10
|
+
*
|
|
11
|
+
* `vk deploy` lists the venture's exports that are still imported
|
|
12
|
+
* (`resolveImportedExports`); for each one a producer's new template no
|
|
13
|
+
* longer generates, this publishes it again — same name, same deployed
|
|
14
|
+
* value, so CloudFormation sees no change. Once its consumers have
|
|
15
|
+
* redeployed nothing imports it, and the next deploy drops it.
|
|
16
|
+
*/
|
|
17
|
+
import { CfnOutput } from 'aws-cdk-lib';
|
|
18
|
+
export function retainImportedExports(stack, exports) {
|
|
19
|
+
if (exports.length === 0)
|
|
20
|
+
return;
|
|
21
|
+
// A validation runs once CDK has generated the stack's cross-stack
|
|
22
|
+
// exports (prepare) and before the template is written — the only
|
|
23
|
+
// point where "would this export disappear?" can be answered.
|
|
24
|
+
stack.node.addValidation({
|
|
25
|
+
validate: () => {
|
|
26
|
+
const present = new Set(stack.node.findAll().flatMap((c) => (c instanceof CfnOutput && c.exportName ? [stack.resolve(c.exportName)] : [])));
|
|
27
|
+
for (const { name, value } of exports) {
|
|
28
|
+
if (present.has(name))
|
|
29
|
+
continue;
|
|
30
|
+
// CDK names its exports `<stack>:<output logical id>`: keep that id.
|
|
31
|
+
const id = name.slice(name.indexOf(':') + 1).replace(/[^A-Za-z0-9]/g, '') || 'RetainedExport';
|
|
32
|
+
new CfnOutput(stack, `Retained${id}`, { value, exportName: name }).overrideLogicalId(id);
|
|
33
|
+
}
|
|
34
|
+
return [];
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=retained-exports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retained-exports.js","sourceRoot":"","sources":["../../../src/cdk/shared/retained-exports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,SAAS,EAAc,MAAM,aAAa,CAAC;AAQpD,MAAM,UAAU,qBAAqB,CAAC,KAAY,EAAE,OAAkC;IACpF,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IACjC,mEAAmE;IACnE,kEAAkE;IAClE,8DAA8D;IAC9D,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC;QACvB,QAAQ,EAAE,GAAG,EAAE;YACb,MAAM,OAAO,GAAG,IAAI,GAAG,CACrB,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,SAAS,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CACnH,CAAC;YACF,KAAK,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,OAAO,EAAE,CAAC;gBACtC,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;oBAAE,SAAS;gBAChC,qEAAqE;gBACrE,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,IAAI,gBAAgB,CAAC;gBAC9F,IAAI,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;YAC3F,CAAC;YACD,OAAO,EAAE,CAAC;QACZ,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venturekit/infra",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.54",
|
|
4
4
|
"description": "VentureKit infrastructure - AWS CDK constructs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
],
|
|
42
42
|
"license": "Apache-2.0",
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@venturekit/core": "0.0.
|
|
44
|
+
"@venturekit/core": "0.0.54",
|
|
45
45
|
"aws-cdk-lib": "^2.268.0",
|
|
46
46
|
"constructs": "^10.7.1",
|
|
47
47
|
"esbuild": "^0.28.1"
|