@aws-blocks/core 0.1.2 → 0.1.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cdk/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,WAAW,IAAI,eAAe,EACnC,KAAK,WAAW,EAChB,KAAK,YAAY,EAElB,MAAM,oBAAoB,CAAC;AAK5B,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,gCAAgC,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEvD,qBAAa,WAAY,SAAQ,GAAG,CAAC,KAAM,YAAW,eAAe;IACnE,SAAgB,EAAE,EAAE,MAAM,CAAC;IAC3B,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAgB,OAAO,EAAE,GAAG,CAAC,cAAc,CAAC,OAAO,CAAC;IACpD,SAAgB,OAAO,EAAE,GAAG,CAAC,iBAAiB,CAAC,cAAc,CAAC;IAC9D,SAAgB,kBAAkB,EAAE,MAAM,CAAC;IAE3C,OAAO;WAcM,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB;CA6B1E;AAED,q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AAO,CAAC,IAAI,CAAC,GAAG,IAAI;IACrH,IAAI,gBAAgB,IAAI,SAAS,MAAM,EAAE,CAAe;IACxD,IAAI,cAAc,IAAI,SAAS,MAAM,EAAE,CAAe;CACvD"}
package/dist/cdk/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  import * as cdk from 'aws-cdk-lib';
4
4
  import { Construct } from 'constructs';
5
5
  import { pathToFileURL } from 'node:url';
6
+ import { __PIPELINE_STAGE_SCOPE__ } from '@aws-blocks/pipeline';
6
7
  import { computeScopeFullId, } from '../common/index.js';
7
8
  import { setupBlocksInfra, BlocksBackend, assertCdkConditionActive } from './blocks-backend.js';
8
9
  import { addBlocksStackMetadata } from './stack-metadata.js';
@@ -33,7 +34,7 @@ export class BlocksStack extends cdk.Stack {
33
34
  static async create(scope, id, props) {
34
35
  assertCdkConditionActive();
35
36
  // Detect ambient pipeline stage scope set by Pipeline appFile imports
36
- const pipelineScope = globalThis.__PIPELINE_STAGE_SCOPE__;
37
+ const pipelineScope = globalThis[__PIPELINE_STAGE_SCOPE__];
37
38
  const actualScope = pipelineScope || scope;
38
39
  const stack = new BlocksStack(actualScope, id, props);
39
40
  // file:// URL (not a raw path) so the cache-busting query works on Windows,
@@ -9,5 +9,5 @@ export { BlocksStack, Scope, SandboxDisableDeletionProtection, BlocksBackend, re
9
9
  export { Hosting, type HostingProps, type BlocksStackApi, type FrameworkType, type ComputeConfig, type HostingDomainConfig, type HostingWafConfig, } from './hosting.js';
10
10
  export { RawRoute, RawRouteErrors, type RawRouteOptions, type HttpMethod, } from './raw-route.cdk.js';
11
11
  export { registerRoute, matchRoute, getRegisteredRoutes, clearRouteRegistry, lockRouteRegistry, unlockRouteRegistry, type RegisteredRoute, } from './raw-route.js';
12
- export { Pipeline, DeployStage, type DeployStageProps, type BranchConfig, type PipelineProps, type PipelineSourceConfig, type PipelineSynthConfig, type PipelineStageConfig, } from './pipeline/index.js';
12
+ export { Pipeline, DeployStage, __PIPELINE_STAGE_SCOPE__, type DeployStageProps, type BranchConfig, type PipelineProps, type PipelineSourceConfig, type PipelineSynthConfig, type PipelineStageConfig, } from './pipeline/index.js';
13
13
  //# sourceMappingURL=index.cdk.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cdk.d.ts","sourceRoot":"","sources":["../src/index.cdk.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC9H,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACxH,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,gCAAgC,EAAE,aAAa,EAAE,cAAc,EAAE,sBAAsB,EAAE,UAAU,EAAE,oBAAoB,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACxM,OAAO,EACL,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,GACtB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,QAAQ,EACR,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,UAAU,GAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,aAAa,EACb,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,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oBAAoB,CAAC;AAC5B,OAAO,EACL,aAAa,EACb,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,KAAK,eAAe,GACrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,WAAW,EACX,wBAAwB,EACxB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,qBAAqB,CAAC"}
package/dist/index.cdk.js CHANGED
@@ -10,4 +10,4 @@ export { BlocksStack, Scope, SandboxDisableDeletionProtection, BlocksBackend, re
10
10
  export { Hosting, } from './hosting.js';
11
11
  export { RawRoute, RawRouteErrors, } from './raw-route.cdk.js';
12
12
  export { registerRoute, matchRoute, getRegisteredRoutes, clearRouteRegistry, lockRouteRegistry, unlockRouteRegistry, } from './raw-route.js';
13
- export { Pipeline, DeployStage, } from './pipeline/index.js';
13
+ export { Pipeline, DeployStage, __PIPELINE_STAGE_SCOPE__, } from './pipeline/index.js';
@@ -1,4 +1,3 @@
1
- export { Pipeline, DeployStage } from './pipeline-construct.js';
2
- export type { DeployStageProps } from './pipeline-construct.js';
3
- export type { BranchConfig, PipelineProps, PipelineSourceConfig, PipelineSynthConfig, PipelineStageConfig, } from './types.js';
1
+ export { Pipeline, DeployStage, __PIPELINE_STAGE_SCOPE__, } from '@aws-blocks/pipeline';
2
+ export type { DeployStageProps, BranchConfig, PipelineProps, PipelineSourceConfig, PipelineSynthConfig, PipelineStageConfig, } from '@aws-blocks/pipeline';
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pipeline/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EACV,YAAY,EACZ,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pipeline/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,QAAQ,EACR,WAAW,EACX,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC"}
@@ -1,3 +1,3 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
- export { Pipeline, DeployStage } from './pipeline-construct.js';
3
+ export { Pipeline, DeployStage, __PIPELINE_STAGE_SCOPE__, } from '@aws-blocks/pipeline';
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const CORE_VERSION = "0.1.2";
1
+ export declare const CORE_VERSION = "0.1.3";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Auto-generated by scripts/generate-version.mjs — do not edit manually
2
- export const CORE_VERSION = '0.1.2';
2
+ export const CORE_VERSION = '0.1.3';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-blocks/core",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "author": "Amazon Web Services",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -63,6 +63,7 @@
63
63
  },
64
64
  "dependencies": {
65
65
  "@aws-blocks/hosting": "*",
66
+ "@aws-blocks/pipeline": "*",
66
67
  "@aws-sdk/client-s3": "^3.700.0",
67
68
  "@aws-sdk/client-ssm": "^3.700.0",
68
69
  "cross-spawn": "^7.0.6",
package/src/cdk/index.ts CHANGED
@@ -4,6 +4,7 @@
4
4
  import * as cdk from 'aws-cdk-lib';
5
5
  import { Construct } from 'constructs';
6
6
  import { pathToFileURL } from 'node:url';
7
+ import { __PIPELINE_STAGE_SCOPE__ } from '@aws-blocks/pipeline';
7
8
  import {
8
9
  type BlocksStackProps,
9
10
  type BlocksStack as BaseBlocksStack,
@@ -48,7 +49,7 @@ export class BlocksStack extends cdk.Stack implements BaseBlocksStack {
48
49
  assertCdkConditionActive();
49
50
 
50
51
  // Detect ambient pipeline stage scope set by Pipeline appFile imports
51
- const pipelineScope = (globalThis as any).__PIPELINE_STAGE_SCOPE__;
52
+ const pipelineScope = (globalThis as any)[__PIPELINE_STAGE_SCOPE__];
52
53
  const actualScope = pipelineScope || scope;
53
54
 
54
55
  const stack = new BlocksStack(actualScope, id, props);
package/src/index.cdk.ts CHANGED
@@ -36,6 +36,7 @@ export {
36
36
  export {
37
37
  Pipeline,
38
38
  DeployStage,
39
+ __PIPELINE_STAGE_SCOPE__,
39
40
  type DeployStageProps,
40
41
  type BranchConfig,
41
42
  type PipelineProps,
@@ -1,12 +1,16 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- export { Pipeline, DeployStage } from './pipeline-construct.js';
5
- export type { DeployStageProps } from './pipeline-construct.js';
4
+ export {
5
+ Pipeline,
6
+ DeployStage,
7
+ __PIPELINE_STAGE_SCOPE__,
8
+ } from '@aws-blocks/pipeline';
6
9
  export type {
10
+ DeployStageProps,
7
11
  BranchConfig,
8
12
  PipelineProps,
9
13
  PipelineSourceConfig,
10
14
  PipelineSynthConfig,
11
15
  PipelineStageConfig,
12
- } from './types.js';
16
+ } from '@aws-blocks/pipeline';
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Auto-generated by scripts/generate-version.mjs — do not edit manually
2
- export const CORE_VERSION = '0.1.2';
2
+ export const CORE_VERSION = '0.1.3';
@@ -1,130 +0,0 @@
1
- import * as cdk from 'aws-cdk-lib';
2
- import { CodePipeline } from 'aws-cdk-lib/pipelines';
3
- import { Construct } from 'constructs';
4
- import type { PipelineProps, PipelineStageConfig } from './types.js';
5
- /**
6
- * CDK Pipelines-based CI/CD pipeline construct (L3).
7
- *
8
- * Creates one self-mutating CodePipeline V2 per branch entry. Each pipeline:
9
- * - Pulls source from GitHub via CodeConnections (OAuth, no tokens)
10
- * - Runs synth (install + cdk synth)
11
- * - Self-mutates if the pipeline definition changes
12
- * - Deploys to ordered stages with optional manual approval and baking time
13
- *
14
- * Multiple branches each get their own independent pipeline, named
15
- * `${id}-${branch}`. This allows different branches to have different
16
- * stage configurations and deployment topologies.
17
- *
18
- * **Sync vs. Async stageFactory:**
19
- * - Sync factory: use `new Pipeline(scope, id, props)` directly
20
- * - Async factory (e.g., `BlocksStack.create()`): use `await Pipeline.create(scope, id, props)`
21
- *
22
- * @typeParam TConfig - Type of the user-defined `config` object passed to each stage.
23
- *
24
- * @example Sync stageFactory
25
- * ```ts
26
- * new Pipeline(stack, 'Pipeline', {
27
- * source: {
28
- * repo: 'my-org/my-app',
29
- * connectionArn: 'arn:aws:codeconnections:us-east-1:123456789:connection/abc',
30
- * },
31
- * branches: [
32
- * {
33
- * branch: 'main',
34
- * stages: [
35
- * { name: 'beta' },
36
- * { name: 'prod', requireApproval: true, config: { domain: 'myapp.com' } },
37
- * ],
38
- * },
39
- * ],
40
- * stageFactory: (scope, stageConfig) => {
41
- * new MyAppStack(scope, 'App', { env: stageConfig.env });
42
- * },
43
- * });
44
- * ```
45
- *
46
- * @example Async stageFactory with BlocksStack
47
- * ```ts
48
- * await Pipeline.create(stack, 'Pipeline', {
49
- * source: { repo: 'my-org/my-app', connectionArn: '...' },
50
- * branches: [{ branch: 'main', stages: [{ name: 'prod' }] }],
51
- * stageFactory: async (scope, stageConfig) => {
52
- * const blocksStack = await BlocksStack.create(scope, 'App', {
53
- * backendHandlerPath: './handler.ts',
54
- * backendCDKPath: './infra.ts',
55
- * });
56
- * new Hosting(blocksStack, 'Hosting', { root: '.', buildCommand: 'npm run build', api: blocksStack });
57
- * },
58
- * });
59
- * ```
60
- */
61
- export declare class Pipeline<TConfig = Record<string, unknown>> extends Construct {
62
- /** The underlying CDK Pipelines CodePipeline instances, keyed by branch name. */
63
- readonly codePipelines: ReadonlyMap<string, CodePipeline>;
64
- /** Internal marker to allow async create() to bypass sync validation. */
65
- private static readonly _ASYNC_INIT;
66
- /**
67
- * Create a Pipeline with a synchronous stageFactory.
68
- *
69
- * For async stageFactory (e.g., when using `BlocksStack.create()`), use
70
- * the static `Pipeline.create()` method instead.
71
- */
72
- constructor(scope: Construct, id: string, props: PipelineProps<TConfig>, _internal?: {
73
- marker: symbol;
74
- pipelines: Map<string, CodePipeline>;
75
- });
76
- /**
77
- * Async factory for Pipelines that use an async stageFactory.
78
- *
79
- * Use this when your stageFactory needs to `await` async operations
80
- * (e.g., `BlocksStack.create()`). The method awaits each stage factory call
81
- * before proceeding, ensuring all CDK constructs are fully initialized
82
- * before synthesis.
83
- *
84
- * @example
85
- * ```ts
86
- * await Pipeline.create(stack, 'Pipeline', {
87
- * source: { repo: 'org/app', connectionArn: '...' },
88
- * branches: [{ branch: 'main', stages: [{ name: 'prod' }] }],
89
- * stageFactory: async (scope, stageConfig) => {
90
- * const blocksStack = await BlocksStack.create(scope, 'App', {
91
- * backendHandlerPath: './handler.ts',
92
- * backendCDKPath: './infra.ts',
93
- * });
94
- * new Hosting(blocksStack, 'Hosting', { root: '.', buildCommand: 'npm run build', api: blocksStack });
95
- * },
96
- * });
97
- * ```
98
- */
99
- static create<TConfig = Record<string, unknown>>(scope: Construct, id: string, props: PipelineProps<TConfig>): Promise<Pipeline<TConfig>>;
100
- }
101
- /**
102
- * Validates that the resolved appFile path is safe for dynamic import.
103
- *
104
- * Checks:
105
- * 1. The file extension is an allowed module type (.ts, .js, .mjs, .cjs).
106
- * 2. The resolved real path is contained within the project root directory,
107
- * preventing path traversal attacks (e.g., `../../etc/passwd.ts`).
108
- *
109
- * @throws Error if the file extension is not allowed or the path escapes the project root.
110
- * @internal Exported for testing only.
111
- */
112
- export declare function validateAppFilePath(resolvedAppFile: string): void;
113
- /**
114
- * Props for the {@link DeployStage} construct.
115
- */
116
- export interface DeployStageProps<TConfig = Record<string, unknown>> extends cdk.StageProps {
117
- /** The stage configuration (name, env, config, etc.). */
118
- readonly stageConfig: PipelineStageConfig<TConfig>;
119
- }
120
- /**
121
- * A CDK Stage used by Pipeline to represent a deployment environment.
122
- *
123
- * The stageFactory populates this Stage with stacks externally (not in
124
- * the constructor), allowing both sync and async factory patterns.
125
- */
126
- export declare class DeployStage<TConfig = Record<string, unknown>> extends cdk.Stage {
127
- readonly stageConfig: PipelineStageConfig<TConfig>;
128
- constructor(scope: Construct, id: string, props: DeployStageProps<TConfig>);
129
- }
130
- //# sourceMappingURL=pipeline-construct.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pipeline-construct.d.ts","sourceRoot":"","sources":["../../src/pipeline/pipeline-construct.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AAInC,OAAO,EAEL,YAAY,EAIb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAIvC,OAAO,KAAK,EAEV,aAAa,EACb,mBAAmB,EACpB,MAAM,YAAY,CAAC;AA6CpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,qBAAa,QAAQ,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAE,SAAQ,SAAS;IACxE,iFAAiF;IACjF,SAAgB,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAEjE,yEAAyE;IACzE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAuB;IAE1D;;;;;OAKG;gBACS,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAA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