@aws/nx-plugin 0.76.0 → 0.77.0

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.
Files changed (36) hide show
  1. package/LICENSE-THIRD-PARTY +60 -2
  2. package/package.json +9 -9
  3. package/src/infra/app/__snapshots__/generator.spec.ts.snap +378 -7
  4. package/src/infra/app/files/app/src/main.ts.template +17 -2
  5. package/src/infra/app/generator.js +34 -9
  6. package/src/infra/app/generator.js.map +1 -1
  7. package/src/infra/app/schema.d.ts +1 -0
  8. package/src/infra/app/schema.json +6 -0
  9. package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +2 -2
  10. package/src/py/strands-agent/__snapshots__/generator.spec.ts.snap +6 -6
  11. package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +1 -1
  12. package/src/ts/nx-plugin/__snapshots__/generator.spec.ts.snap +1 -1
  13. package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +13 -13
  14. package/src/utils/files/common/infra-config/src/index.ts.template +3 -0
  15. package/src/utils/files/common/infra-config/src/resolve-stage.ts.template +23 -0
  16. package/src/utils/files/common/infra-config/src/stages.config.ts.template +48 -0
  17. package/src/utils/files/common/infra-config/src/stages.types.ts.template +66 -0
  18. package/src/utils/files/common/scripts/src/index.ts.template +1 -0
  19. package/src/utils/files/common/scripts/src/infra-deploy.ts.template +2 -0
  20. package/src/utils/files/common/scripts/src/infra-destroy.ts.template +2 -0
  21. package/src/utils/files/common/scripts/src/stage-credentials/cdk-command.ts.template +18 -0
  22. package/src/utils/files/common/scripts/src/stage-credentials/credentials.ts.template +100 -0
  23. package/src/utils/files/common/scripts/src/stage-credentials/run.ts.template +52 -0
  24. package/src/utils/files/common/scripts/src/stage-credentials/stage-parser.ts.template +15 -0
  25. package/src/utils/shared-constructs-constants.d.ts +4 -0
  26. package/src/utils/shared-constructs-constants.js +5 -1
  27. package/src/utils/shared-constructs-constants.js.map +1 -1
  28. package/src/utils/shared-infra-config.d.ts +11 -0
  29. package/src/utils/shared-infra-config.js +47 -0
  30. package/src/utils/shared-infra-config.js.map +1 -0
  31. package/src/utils/shared-scripts.d.ts +12 -0
  32. package/src/utils/shared-scripts.js +49 -0
  33. package/src/utils/shared-scripts.js.map +1 -0
  34. package/src/utils/versions.d.ts +29 -28
  35. package/src/utils/versions.js +28 -27
  36. package/src/utils/versions.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/infra/app/generator.ts"],"names":[],"mappings":";;;AAyCA,4CAsKC;;AA/MD;;;GAGG;AACH,uCAYoB;AAEpB,4EAA6E;AAC7E,mDAAoD;AACpD,qDAAwE;AACxE,qEAA0E;AAC1E,yFAGiD;AACjD,wDAAwB;AACxB,+CAA0D;AAC1D,+CAAoD;AACpD,uCAIwB;AACxB,iDAAsE;AACtE,6CAA8C;AAC9C,uCAA4C;AAE/B,QAAA,wBAAwB,GACnC,IAAA,qBAAgB,EAAC,UAAU,CAAC,CAAC;AAE/B,SAAsB,gBAAgB,CACpC,IAAU,EACV,MAA8B;;QAE9B,MAAM,GAAG,GAAG,IAAA,2BAAe,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC1C,MAAM,IAAA,mBAAkB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAEvC,IAAA,yBAAoB,EAAC,IAAI,EAAE,GAAG,CAAC,kBAAkB,EAAE,gCAAwB,CAAC,CAAC;QAE7E,iEAAiE;QACjE,MAAM,IAAA,6CAAyB,EAAC,IAAI,EAAE;YACpC,WAAW,EAAE,KAAK;SACnB,CAAC,CAAC;QAEH,MAAM,mBAAmB,GACvB,GAAG,CAAC,GAAG;aACJ,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,GAAG,SAAS,GAAG,CAAC,GAAG,UAAU,CAAC;QAC5C,MAAM,sBAAsB,GAC1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AAI,0CAAY,EAAE,CAC/B,IAAI,mDAAqB,oBAAoB;iBAC/C;aACF,IACD,CAAC,CAAC;QAEJ,MAAM,IAAA,yCAA+B,EAAC,IAAI,EAAE,CAAC,gCAAwB,CAAC,CAAC,CAAC;QAExE,MAAM,IAAA,6BAAoB,EAAC,IAAI,CAAC,CAAC;QACjC,OAAO,GAAG,EAAE;YACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;QAC5B,CAAC,CAAC;IACJ,CAAC;CAAA;AACD,kBAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/infra/app/generator.ts"],"names":[],"mappings":";;;AA4CA,4CAiMC;;AA7OD;;;GAGG;AACH,uCAYoB;AAEpB,4EAA6E;AAC7E,mDAAoD;AACpD,qDAAwE;AACxE,qEAA0E;AAC1E,yEAA6E;AAC7E,+DAAoE;AACpE,yFAIiD;AACjD,wDAAwB;AACxB,+CAA0D;AAC1D,+CAAoD;AACpD,uCAIwB;AACxB,iDAAsE;AACtE,6CAA8C;AAC9C,uCAA4C;AAE/B,QAAA,wBAAwB,GACnC,IAAA,qBAAgB,EAAC,UAAU,CAAC,CAAC;AAE/B,SAAsB,gBAAgB,CACpC,IAAU,EACV,MAA8B;;;QAE9B,MAAM,GAAG,GAAG,IAAA,2BAAe,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC1C,MAAM,IAAA,mBAAkB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAEvC,IAAA,yBAAoB,EAAC,IAAI,EAAE,GAAG,CAAC,kBAAkB,EAAE,gCAAwB,CAAC,CAAC;QAE7E,iEAAiE;QACjE,MAAM,IAAA,6CAAyB,EAAC,IAAI,EAAE;YACpC,WAAW,EAAE,KAAK;SACnB,CAAC,CAAC;QAEH,oFAAoF;QACpF,MAAM,iBAAiB,GAAG,MAAA,MAAM,CAAC,iBAAiB,mCAAI,KAAK,CAAC;QAC5D,IAAI,iBA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estRunner?: 'jest' | 'vitest' | 'none';
9
9
  // linter?: Linter;
10
10
  skipInstall?: boolean;
11
+ enableStageConfig?: boolean;
11
12
  }
@@ -21,6 +21,12 @@
21
21
  "x-priority": "important",
22
22
  "default": "packages",
23
23
  "x-prompt": "What directory would you like to store your application in?"
24
+ },
25
+ "enableStageConfig": {
26
+ "description": "Enable centralized stage configuration (credentials, account, region) for multi-environment CDK deployments.",
27
+ "type": "boolean",
28
+ "default": false,
29
+ "x-prompt": "Would you like to enable centralized stage credential configuration?"
24
30
  }
25
31
  },
26
32
  "required": ["name"]
@@ -562,8 +562,8 @@ name = "proj.test_project"
562
562
  version = "0.1.0"
563
563
  dependencies = [
564
564
  "mcp==1.26.0",
565
- "uvicorn==0.40.0",
566
- "boto3==1.42.49",
565
+ "uvicorn==0.41.0",
566
+ "boto3==1.42.54",
567
567
  "aws-opentelemetry-distro==0.15.0"
568
568
  ]
569
569
 
@@ -589,16 +589,16 @@ version = "0.1.0"
589
589
  dependencies = [
590
590
  "aws-opentelemetry-distro==0.15.0",
591
591
  "bedrock-agentcore==0.1.7",
592
- "fastapi==0.129.0",
593
- "boto3==1.42.49",
592
+ "fastapi==0.131.0",
593
+ "boto3==1.42.54",
594
594
  "mcp==1.26.0",
595
- "strands-agents==1.26.0",
596
- "strands-agents-tools==0.2.20",
597
- "uvicorn==0.40.0"
595
+ "strands-agents==1.27.0",
596
+ "strands-agents-tools==0.2.21",
597
+ "uvicorn==0.41.0"
598
598
  ]
599
599
 
600
600
  [dependency-groups]
601
- dev = [ "fastapi[standard]==0.129.0" ]
601
+ dev = [ "fastapi[standard]==0.131.0" ]
602
602
 
603
603
  [tool.uv]
604
604
  dev-dependencies = [ ]
@@ -640,7 +640,7 @@ exports[`ts#mcp-server generator > should match snapshot for generated files > u
640
640
  "snapshot-server": "./src/snapshot-server/stdio.js"
641
641
  },
642
642
  "dependencies": {
643
- "@modelcontextprotocol/sdk": "1.26.0",
643
+ "@modelcontextprotocol/sdk": "1.27.0",
644
644
  "express": "5.2.1",
645
645
  "zod": "4.3.6"
646
646
  },
@@ -248,7 +248,7 @@ export const registerCreateWorkspaceCommandTool = (server: McpServer) => {
248
248
  text: \`Run the following command to create a workspace:
249
249
 
250
250
  \\\`\\\`\\\`bash
251
- npx create-nx-workspace@22.5.0 \${workspaceName} --pm=\${packageManager} --preset=@aws/nx-plugin --ci=skip --aiAgents
251
+ npx create-nx-workspace@22.5.1 \${workspaceName} --pm=\${packageManager} --preset=@aws/nx-plugin --ci=skip --aiAgents
252
252
  \\\`\\\`\\\`
253
253
 
254
254
  This will create a new workspace within the \${workspaceName} directory.
@@ -1045,11 +1045,11 @@ exports[`react-website generator > Tanstack router integration > should generate
1045
1045
  "{
1046
1046
  "name": "@proj/source",
1047
1047
  "dependencies": {
1048
- "@cloudscape-design/board-components": "3.0.147",
1049
- "@cloudscape-design/components": "3.0.1200",
1048
+ "@cloudscape-design/board-components": "3.0.149",
1049
+ "@cloudscape-design/components": "3.0.1204",
1050
1050
  "@cloudscape-design/global-styles": "1.0.50",
1051
1051
  "aws-cdk-lib": "2.238.0",
1052
- "constructs": "10.4.5",
1052
+ "constructs": "10.5.0",
1053
1053
  "react": "19.2.4",
1054
1054
  "react-dom": "19.2.4",
1055
1055
  "tailwindcss": "4.1.18"
@@ -2460,12 +2460,12 @@ exports[`react-website generator > Tanstack router integration > should generate
2460
2460
  "{
2461
2461
  "name": "@proj/source",
2462
2462
  "dependencies": {
2463
- "@cloudscape-design/board-components": "3.0.147",
2464
- "@cloudscape-design/components": "3.0.1200",
2463
+ "@cloudscape-design/board-components": "3.0.149",
2464
+ "@cloudscape-design/components": "3.0.1204",
2465
2465
  "@cloudscape-design/global-styles": "1.0.50",
2466
- "@tanstack/react-router": "1.159.5",
2466
+ "@tanstack/react-router": "1.160.2",
2467
2467
  "aws-cdk-lib": "2.238.0",
2468
- "constructs": "10.4.5",
2468
+ "constructs": "10.5.0",
2469
2469
  "react": "19.2.4",
2470
2470
  "react-dom": "19.2.4",
2471
2471
  "tailwindcss": "4.1.18"
@@ -2484,8 +2484,8 @@ exports[`react-website generator > Tanstack router integration > should generate
2484
2484
  "@swc/core": "~1.15.5",
2485
2485
  "@swc/helpers": "~0.5.18",
2486
2486
  "@tailwindcss/vite": "4.1.18",
2487
- "@tanstack/router-generator": "1.159.4",
2488
- "@tanstack/router-plugin": "1.159.5",
2487
+ "@tanstack/router-generator": "1.160.1",
2488
+ "@tanstack/router-plugin": "1.160.2",
2489
2489
  "@tanstack/router-utils": "1.158.0",
2490
2490
  "@tanstack/virtual-file-routes": "1.154.7",
2491
2491
  "@testing-library/dom": "10.4.0",
@@ -4529,12 +4529,12 @@ root &&
4529
4529
 
4530
4530
  exports[`react-website generator > should handle npm scope prefix correctly > scoped-dependencies 1`] = `
4531
4531
  {
4532
- "@cloudscape-design/board-components": "3.0.147",
4533
- "@cloudscape-design/components": "3.0.1200",
4532
+ "@cloudscape-design/board-components": "3.0.149",
4533
+ "@cloudscape-design/components": "3.0.1204",
4534
4534
  "@cloudscape-design/global-styles": "1.0.50",
4535
- "@tanstack/react-router": "1.159.5",
4535
+ "@tanstack/react-router": "1.160.2",
4536
4536
  "aws-cdk-lib": "2.238.0",
4537
- "constructs": "10.4.5",
4537
+ "constructs": "10.5.0",
4538
4538
  "react": "19.2.4",
4539
4539
  "react-dom": "19.2.4",
4540
4540
  "tailwindcss": "4.1.18",
@@ -0,0 +1,3 @@
1
+ export * from './stages.types.js';
2
+ export { default } from './stages.config.js';
3
+ export { resolveStage } from './resolve-stage.js';
@@ -0,0 +1,23 @@
1
+ import type { StageConfig, StagesConfig } from './stages.types.js';
2
+ import stagesConfig from './stages.config.js';
3
+
4
+ // Widen the narrow `as const` type to StagesConfig for dynamic key access
5
+ const config: StagesConfig = stagesConfig;
6
+
7
+ /**
8
+ * Resolves stage config for a given project and stage name.
9
+ * Project-specific fields take priority over shared ones.
10
+ *
11
+ * @param projectPath - Project path relative to workspace root (e.g., 'packages/infra')
12
+ * @param stageName - CDK stage name (e.g., 'my-app-dev')
13
+ * @returns Merged StageConfig or undefined if no config exists for this stage
14
+ */
15
+ export function resolveStage(
16
+ projectPath: string,
17
+ stageName: string,
18
+ ): StageConfig | undefined {
19
+ const shared = config.shared?.stages?.[stageName];
20
+ const project = config.projects?.[projectPath]?.stages?.[stageName];
21
+ if (!shared && !project) return undefined;
22
+ return { ...shared, ...project } as StageConfig;
23
+ }
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Stage configuration for CDK deployments.
3
+ *
4
+ * This file maps CDK stage names to their deployment settings. When you run
5
+ * `<%= pkgMgrRunNx %> run <project>:deploy <stage-name>/*`, the infra-deploy script
6
+ * automatically resolves and applies the correct credentials.
7
+ *
8
+ * Project keys are the project path relative to the workspace root
9
+ * (e.g., 'packages/infra').
10
+ *
11
+ * Stage names must match the CDK stage identifiers defined in your main.ts —
12
+ * the first argument to `new ApplicationStage(app, '<stage-name>', ...)`.
13
+ * For example, if main.ts has `new ApplicationStage(app, 'my-app-dev', ...)`
14
+ * then the stage name here is 'my-app-dev'.
15
+ *
16
+ * We recommend committing this file so the team shares a single source of truth.
17
+ * If it contains personal profile names, you can add it to .gitignore instead.
18
+ */
19
+ import type { StagesConfig } from './stages.types.js';
20
+
21
+ export default {
22
+ projects: {
23
+ // Example: map stages for a specific infra project
24
+ // 'packages/infra': {
25
+ // stages: {
26
+ // 'my-app-dev': {
27
+ // credentials: { type: 'profile', profile: 'dev-account' },
28
+ // region: 'us-east-1',
29
+ // // account is optional — if omitted, CDK infers from the profile
30
+ // },
31
+ // 'my-app-prod': {
32
+ // credentials: { type: 'assumeRole', assumeRole: 'arn:aws:iam::123456789012:role/DeployRole' },
33
+ // region: 'us-west-2',
34
+ // account: '123456789012',
35
+ // },
36
+ // },
37
+ // },
38
+ },
39
+ shared: {
40
+ stages: {
41
+ // Example: shared sandbox stage available to all projects
42
+ // 'sandbox': {
43
+ // credentials: { type: 'profile', profile: 'sandbox-profile' },
44
+ // region: 'us-east-1',
45
+ // },
46
+ },
47
+ },
48
+ } as const satisfies StagesConfig;
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Type definitions for stage and project configuration.
3
+ *
4
+ * These types are used by both stages.config.ts and the infra-deploy/
5
+ * infra-destroy scripts. They live in a shared package so any
6
+ * project in the workspace can import them.
7
+ */
8
+
9
+ /** Use an AWS CLI profile from ~/.aws/config */
10
+ export type ProfileCredentials = {
11
+ type: 'profile';
12
+ /** AWS CLI profile name */
13
+ profile: string;
14
+ };
15
+
16
+ /** Assume an IAM role via STS, optionally using a profile as the source credentials */
17
+ export type AssumeRoleCredentials = {
18
+ type: 'assumeRole';
19
+ /** IAM Role ARN to assume */
20
+ assumeRole: string;
21
+ /** Optional: AWS CLI profile to use as source credentials for the AssumeRole call */
22
+ profile?: string;
23
+ /** Optional: External ID required by the role's trust policy */
24
+ externalId?: string;
25
+ /** Optional: Session duration in seconds (default: 3600). Increase for long deployments. */
26
+ sessionDuration?: number;
27
+ };
28
+
29
+ /**
30
+ * Credentials for deploying to a specific CDK stage.
31
+ * The `type` field determines which credential strategy is used.
32
+ */
33
+ export type StageCredentials = ProfileCredentials | AssumeRoleCredentials;
34
+
35
+ /**
36
+ * Configuration for a single CDK stage.
37
+ * Includes credentials, region, and optionally account.
38
+ */
39
+ export type StageConfig = {
40
+ /** How to authenticate when deploying this stage */
41
+ credentials: StageCredentials;
42
+ /** AWS region for this stage (e.g., 'us-east-1') */
43
+ region: string;
44
+ /** AWS account ID. If omitted, CDK infers it from the active credentials. */
45
+ account?: string;
46
+ };
47
+
48
+ /**
49
+ * Configuration for a single infrastructure project.
50
+ * The key in the parent map is the project path relative to workspace root
51
+ * (e.g., 'packages/infra').
52
+ */
53
+ export type ProjectConfig = {
54
+ /** Map of CDK stage names to their configuration */
55
+ stages: { [stageName: string]: StageConfig };
56
+ };
57
+
58
+ /** Top-level configuration mapping projects and stages to their settings. */
59
+ export type StagesConfig = {
60
+ /** Project-specific config. Key is the project path relative to workspace root. */
61
+ projects?: { [projectPath: string]: ProjectConfig };
62
+ /** Shared stage config available to all projects. */
63
+ shared?: {
64
+ stages: { [stageName: string]: StageConfig };
65
+ };
66
+ };
@@ -0,0 +1 @@
1
+ // Scripts (infra-deploy, infra-destroy) are the public interface of this package.
@@ -0,0 +1,2 @@
1
+ import { run } from './stage-credentials/run.js';
2
+ run('deploy');
@@ -0,0 +1,2 @@
1
+ import { run } from './stage-credentials/run.js';
2
+ run('destroy');
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Builds the CDK command as an array of arguments for spawnSync.
3
+ *
4
+ * Defaults to --require-approval=never (standard for local dev deploys).
5
+ * If the user explicitly passes --require-approval with any value, we
6
+ * respect their choice and don't add the default.
7
+ */
8
+ export function buildCdkCommand(
9
+ action: string,
10
+ remainingArgs: string[],
11
+ ): string[] {
12
+ const hasRequireApproval = remainingArgs.some(
13
+ (a) => a === '--require-approval' || a.startsWith('--require-approval='),
14
+ );
15
+ return hasRequireApproval
16
+ ? ['cdk', action, ...remainingArgs]
17
+ : ['cdk', action, '--require-approval=never', ...remainingArgs];
18
+ }
@@ -0,0 +1,100 @@
1
+ import type {
2
+ StageCredentials,
3
+ StagesConfig,
4
+ } from '<%= scopeAlias %>common-infra-config';
5
+
6
+ /**
7
+ * Looks up credentials for a given project + stage combination.
8
+ *
9
+ * Lookup order:
10
+ * 1. Project-specific: config.projects[projectPath].stages[stageName].credentials
11
+ * 2. Shared: config.shared.stages[stageName].credentials
12
+ * 3. No match: returns undefined — caller falls back to env vars
13
+ */
14
+ export function lookupCredentials(
15
+ config: StagesConfig | undefined,
16
+ projectPath: string,
17
+ stageName: string,
18
+ ): { credentials: StageCredentials | undefined; source: string } {
19
+ const projectCreds =
20
+ config?.projects?.[projectPath]?.stages?.[stageName]?.credentials;
21
+ if (projectCreds) {
22
+ return { credentials: projectCreds, source: 'project-specific' };
23
+ }
24
+
25
+ const sharedCreds = config?.shared?.stages?.[stageName]?.credentials;
26
+ if (sharedCreds) {
27
+ return { credentials: sharedCreds, source: 'shared' };
28
+ }
29
+
30
+ return { credentials: undefined, source: 'environment fallback' };
31
+ }
32
+
33
+ /**
34
+ * Builds a child process environment with the resolved credentials overlaid.
35
+ * Never modifies process.env — returns a new object.
36
+ */
37
+ export async function buildChildEnv(
38
+ credentials: StageCredentials,
39
+ projectPath: string,
40
+ ): Promise<Record<string, string | undefined>> {
41
+ const env = { ...process.env };
42
+
43
+ switch (credentials.type) {
44
+ case 'profile': {
45
+ env.AWS_PROFILE = credentials.profile;
46
+ break;
47
+ }
48
+ case 'assumeRole': {
49
+ let STSClient: typeof import('@aws-sdk/client-sts').STSClient;
50
+ let AssumeRoleCommand: typeof import('@aws-sdk/client-sts').AssumeRoleCommand;
51
+ try {
52
+ ({ STSClient, AssumeRoleCommand } =
53
+ await import('@aws-sdk/client-sts'));
54
+ } catch {
55
+ console.error(
56
+ '[infra-deploy] Error: @aws-sdk/client-sts is required for assumeRole credentials but is not installed.',
57
+ );
58
+ console.error('[infra-deploy] Please install @aws-sdk/client-sts');
59
+ process.exit(1);
60
+ }
61
+
62
+ // If a source profile is specified, configure the STS client to use it
63
+ const stsClientOptions: Record<string, unknown> = {};
64
+ if (credentials.profile) {
65
+ const { fromIni } = await import('@aws-sdk/credential-providers');
66
+ stsClientOptions.credentials = fromIni({
67
+ profile: credentials.profile,
68
+ });
69
+ }
70
+
71
+ const response = await new STSClient(stsClientOptions).send(
72
+ new AssumeRoleCommand({
73
+ RoleArn: credentials.assumeRole,
74
+ RoleSessionName: `infra-deploy-${projectPath.replace(/\//g, '-')}`,
75
+ ...(credentials.externalId
76
+ ? { ExternalId: credentials.externalId }
77
+ : {}),
78
+ ...(credentials.sessionDuration
79
+ ? { DurationSeconds: credentials.sessionDuration }
80
+ : {}),
81
+ }),
82
+ );
83
+
84
+ env.AWS_ACCESS_KEY_ID = response.Credentials?.AccessKeyId;
85
+ env.AWS_SECRET_ACCESS_KEY = response.Credentials?.SecretAccessKey;
86
+ env.AWS_SESSION_TOKEN = response.Credentials?.SessionToken;
87
+ delete env.AWS_PROFILE;
88
+ break;
89
+ }
90
+ }
91
+
92
+ return env;
93
+ }
94
+
95
+ /** Human-readable description of credentials for logging */
96
+ export function describeCredentials(creds: StageCredentials): string {
97
+ return creds.type === 'profile'
98
+ ? `profile '${creds.profile}'`
99
+ : `role '${creds.assumeRole}'`;
100
+ }
@@ -0,0 +1,52 @@
1
+ import { spawnSync } from 'child_process';
2
+ import stagesConfig from '<%= scopeAlias %>common-infra-config';
3
+ import { parseStageName } from './stage-parser.js';
4
+ import {
5
+ lookupCredentials,
6
+ buildChildEnv,
7
+ describeCredentials,
8
+ } from './credentials.js';
9
+ import { buildCdkCommand } from './cdk-command.js';
10
+
11
+ const log = (msg: string) => console.error(`[infra-deploy] ${msg}`);
12
+
13
+ export async function run(action: 'deploy' | 'destroy'): Promise<void> {
14
+ const [projectPath, ...remainingArgs] = process.argv.slice(2);
15
+
16
+ if (!projectPath) {
17
+ log(`Usage: infra-${action} <project-path> [stage/*] [cdk-args...]`);
18
+ process.exit(1);
19
+ }
20
+
21
+ const stageName = parseStageName(remainingArgs[0]);
22
+ let childEnv: Record<string, string | undefined> = { ...process.env };
23
+
24
+ if (stageName) {
25
+ const { credentials, source } = lookupCredentials(
26
+ stagesConfig,
27
+ projectPath,
28
+ stageName,
29
+ );
30
+
31
+ if (credentials) {
32
+ log(
33
+ `Using ${describeCredentials(credentials)} for '${stageName}' (${source})`,
34
+ );
35
+ childEnv = await buildChildEnv(credentials, projectPath);
36
+ } else {
37
+ log(`No credentials for '${stageName}' — using environment`);
38
+ }
39
+ } else {
40
+ log('No stage specified — using environment credentials');
41
+ }
42
+
43
+ // Run CDK from the project directory so it finds cdk.json
44
+ const cmd = buildCdkCommand(action, remainingArgs);
45
+ const { status } = spawnSync(cmd[0], cmd.slice(1), {
46
+ stdio: 'inherit',
47
+ env: childEnv,
48
+ cwd: projectPath,
49
+ });
50
+
51
+ process.exit(status ?? 1);
52
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Extracts the CDK stage name from the first positional argument.
3
+ *
4
+ * Examples:
5
+ * parseStageName('my-app-dev/*') → 'my-app-dev'
6
+ * parseStageName('my-app-dev') → 'my-app-dev'
7
+ * parseStageName('--verbose') → undefined (flag, not a stage)
8
+ * parseStageName(undefined) → undefined
9
+ */
10
+ export function parseStageName(
11
+ firstArg: string | undefined,
12
+ ): string | undefined {
13
+ if (!firstArg || firstArg.startsWith('-')) return undefined;
14
+ return firstArg.includes('/') ? firstArg.split('/')[0] : firstArg;
15
+ }
@@ -9,3 +9,7 @@ export declare const SHARED_TERRAFORM_NAME = "terraform";
9
9
  export declare const SHARED_TERRAFORM_DIR = "common/terraform";
10
10
  export declare const SHARED_SHADCN_NAME = "common-shadcn";
11
11
  export declare const SHARED_SHADCN_DIR = "common/shadcn";
12
+ export declare const SHARED_INFRA_CONFIG_NAME = "common-infra-config";
13
+ export declare const SHARED_INFRA_CONFIG_DIR = "common/infra-config";
14
+ export declare const SHARED_SCRIPTS_NAME = "common-scripts";
15
+ export declare const SHARED_SCRIPTS_DIR = "common/scripts";
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.SHARED_SHADCN_DIR = exports.SHARED_SHADCN_NAME = exports.SHARED_TERRAFORM_DIR = exports.SHARED_TERRAFORM_NAME = exports.SHARED_CONSTRUCTS_DIR = exports.SHARED_CONSTRUCTS_NAME = exports.PACKAGES_DIR = void 0;
7
+ exports.SHARED_SCRIPTS_DIR = exports.SHARED_SCRIPTS_NAME = exports.SHARED_INFRA_CONFIG_DIR = exports.SHARED_INFRA_CONFIG_NAME = exports.SHARED_SHADCN_DIR = exports.SHARED_SHADCN_NAME = exports.SHARED_TERRAFORM_DIR = exports.SHARED_TERRAFORM_NAME = exports.SHARED_CONSTRUCTS_DIR = exports.SHARED_CONSTRUCTS_NAME = exports.PACKAGES_DIR = void 0;
8
8
  exports.PACKAGES_DIR = 'packages';
9
9
  exports.SHARED_CONSTRUCTS_NAME = 'common-constructs';
10
10
  exports.SHARED_CONSTRUCTS_DIR = 'common/constructs';
@@ -12,4 +12,8 @@ exports.SHARED_TERRAFORM_NAME = 'terraform';
12
12
  exports.SHARED_TERRAFORM_DIR = 'common/terraform';
13
13
  exports.SHARED_SHADCN_NAME = 'common-shadcn';
14
14
  exports.SHARED_SHADCN_DIR = 'common/shadcn';
15
+ exports.SHARED_INFRA_CONFIG_NAME = 'common-infra-config';
16
+ exports.SHARED_INFRA_CONFIG_DIR = 'common/infra-config';
17
+ exports.SHARED_SCRIPTS_NAME = 'common-scripts';
18
+ exports.SHARED_SCRIPTS_DIR = 'common/scripts';
15
19
  //# sourceMappingURL=shared-constructs-constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared-constructs-constants.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/shared-constructs-constants.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEU,QAAA,YAAY,GAAG,UAAU,CAAC;AAC1B,QAAA,sBAAsB,GAAG,mBAAmB,CAAC;AAC7C,QAAA,qBAAqB,GAAG,mBAAmB,CAAC;AAC5C,QAAA,qBAAqB,GAAG,WAAW,CAAC;AACpC,QAAA,oBAAoB,GAAG,kBAAkB,CAAC;AAC1C,QAAA,kBAAkB,GAAG,eAAe,CAAC;AACrC,QAAA,iBAAiB,GAAG,eAAe,CAAC"}
1
+ {"version":3,"file":"shared-constructs-constants.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/shared-constructs-constants.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEU,QAAA,YAAY,GAAG,UAAU,CAAC;AAC1B,QAAA,sBAAsB,GAAG,mBAAmB,CAAC;AAC7C,QAAA,qBAAqB,GAAG,mBAAmB,CAAC;AAC5C,QAAA,qBAAqB,GAAG,WAAW,CAAC;AACpC,QAAA,oBAAoB,GAAG,kBAAkB,CAAC;AAC1C,QAAA,kBAAkB,GAAG,eAAe,CAAC;AACrC,QAAA,iBAAiB,GAAG,eAAe,CAAC;AACpC,QAAA,wBAAwB,GAAG,qBAAqB,CAAC;AACjD,QAAA,uBAAuB,GAAG,qBAAqB,CAAC;AAChD,QAAA,mBAAmB,GAAG,gBAAgB,CAAC;AACvC,QAAA,kBAAkB,GAAG,gBAAgB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { Tree } from '@nx/devkit';
6
+ /**
7
+ * Lazily creates the shared infra-config package at packages/common/infra-config/.
8
+ * Contains stage configuration types and the user's stage-to-credential mappings.
9
+ * Importable from any package via ts project references.
10
+ */
11
+ export declare function sharedInfraConfigGenerator(tree: Tree): Promise<void>;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sharedInfraConfigGenerator = sharedInfraConfigGenerator;
4
+ const tslib_1 = require("tslib");
5
+ /**
6
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
7
+ * SPDX-License-Identifier: Apache-2.0
8
+ */
9
+ const devkit_1 = require("@nx/devkit");
10
+ const npm_scope_1 = require("./npm-scope");
11
+ const generator_1 = tslib_1.__importDefault(require("../ts/lib/generator"));
12
+ const format_1 = require("./format");
13
+ const shared_constructs_constants_1 = require("./shared-constructs-constants");
14
+ /**
15
+ * Lazily creates the shared infra-config package at packages/common/infra-config/.
16
+ * Contains stage configuration types and the user's stage-to-credential mappings.
17
+ * Importable from any package via ts project references.
18
+ */
19
+ function sharedInfraConfigGenerator(tree) {
20
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
21
+ const configDir = (0, devkit_1.joinPathFragments)(shared_constructs_constants_1.PACKAGES_DIR, shared_constructs_constants_1.SHARED_INFRA_CONFIG_DIR);
22
+ // Don't recreate if it already exists
23
+ if (tree.exists((0, devkit_1.joinPathFragments)(configDir, 'project.json'))) {
24
+ return;
25
+ }
26
+ const npmScopePrefix = (0, npm_scope_1.getNpmScopePrefix)(tree);
27
+ const pkgMgrCmd = (0, devkit_1.getPackageManagerCommand)();
28
+ yield (0, generator_1.default)(tree, {
29
+ name: shared_constructs_constants_1.SHARED_INFRA_CONFIG_NAME,
30
+ directory: shared_constructs_constants_1.PACKAGES_DIR,
31
+ subDirectory: shared_constructs_constants_1.SHARED_INFRA_CONFIG_DIR,
32
+ });
33
+ // Replace default src/ with our templates
34
+ tree.delete((0, devkit_1.joinPathFragments)(configDir, 'src'));
35
+ (0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, 'files', shared_constructs_constants_1.SHARED_INFRA_CONFIG_DIR, 'src'), (0, devkit_1.joinPathFragments)(configDir, 'src'), {
36
+ pkgMgrRunNx: `${pkgMgrCmd.exec} nx`,
37
+ }, { overwriteStrategy: devkit_1.OverwriteStrategy.KeepExisting });
38
+ // Generate README
39
+ (0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, 'files', 'common', 'readme'), configDir, {
40
+ fullyQualifiedName: `${npmScopePrefix}${shared_constructs_constants_1.SHARED_INFRA_CONFIG_NAME}`,
41
+ name: shared_constructs_constants_1.SHARED_INFRA_CONFIG_NAME,
42
+ pkgMgrCmd: pkgMgrCmd.exec,
43
+ }, { overwriteStrategy: devkit_1.OverwriteStrategy.Overwrite });
44
+ yield (0, format_1.formatFilesInSubtree)(tree);
45
+ });
46
+ }
47
+ //# sourceMappingURL=shared-infra-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-infra-config.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/shared-infra-config.ts"],"names":[],"mappings":";;AAyBA,gEA2CC;;AApED;;;GAGG;AACH,uCAMoB;AACpB,2CAAgD;AAChD,4EAAqD;AACrD,qCAAgD;AAChD,+EAIuC;AAEvC;;;;GAIG;AACH,SAAsB,0BAA0B,CAAC,IAAU;;QACzD,MAAM,SAAS,GAAG,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-0,0 +1,12 @@
1
+ /**
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { Tree } from '@nx/devkit';
6
+ /**
7
+ * Lazily creates the shared scripts package at packages/common/scripts/.
8
+ * Contains infra-deploy and infra-destroy scripts that resolve
9
+ * credentials from infra-config and call CDK.
10
+ * Invoked via `tsx packages/common/scripts/src/infra-deploy.ts` from NX targets.
11
+ */
12
+ export declare function sharedScriptsGenerator(tree: Tree): Promise<void>;