@xube/kit-aws-infrastructure 0.0.103 → 0.0.105

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":"helpers.d.ts","sourceRoot":"","sources":["../../src/pipeline/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,eAAO,MAAM,cAAc,QACpB,eAAe,QACd,MAAM,KACX,MAC0D,CAAC"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/pipeline/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,eAAO,MAAM,cAAc,QAAS,eAAe,QAAQ,MAAM,KAAG,MACC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getPipelineArn = void 0;
4
- const getPipelineArn = (env, name) => `arn:aws:codepipeline:${env.region}:${env.account}:${name}`;
4
+ const getPipelineArn = (env, name) => `arn:aws:codepipeline:${env.env.region}:${env.env.account}:${name}`;
5
5
  exports.getPipelineArn = getPipelineArn;
@@ -30,7 +30,7 @@ interface XubeBuildStepProps extends XubeEnvironment {
30
30
  buildStepName: string;
31
31
  }
32
32
  export declare class XubeBuildStep extends Construct {
33
- synthCodeBuildStep: CodeBuildStep;
33
+ buildStep: CodeBuildStep;
34
34
  constructor(scope: Construct, id: string, props: XubeBuildStepProps);
35
35
  }
36
36
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"xube-build-step.d.ts","sourceRoot":"","sources":["../../src/pipeline/xube-build-step.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAY1E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAQvD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,UAAU,kBAAmB,SAAQ,eAAe;IAClD,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,kBAAkB,CAAC;IACnC,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,qBAAa,aAAc,SAAQ,SAAS;IAC1C,kBAAkB,EAAE,aAAa,CAAC;gBACtB,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB;CA6BpE"}
1
+ {"version":3,"file":"xube-build-step.d.ts","sourceRoot":"","sources":["../../src/pipeline/xube-build-step.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAY1E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAQvD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,UAAU,kBAAmB,SAAQ,eAAe;IAClD,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,kBAAkB,CAAC;IACnC,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,qBAAa,aAAc,SAAQ,SAAS;IAC1C,SAAS,EAAE,aAAa,CAAC;gBACb,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB;CA6BpE"}
@@ -8,7 +8,7 @@ const constants_1 = require("./constants");
8
8
  class XubeBuildStep extends constructs_1.Construct {
9
9
  constructor(scope, id, props) {
10
10
  super(scope, id);
11
- this.synthCodeBuildStep = new pipelines_1.CodeBuildStep(id + "synth-step", {
11
+ this.buildStep = new pipelines_1.CodeBuildStep(id + "synth-step", {
12
12
  input: props.pipelineSource,
13
13
  env: {},
14
14
  role: new aws_iam_1.Role(scope, id + "-build-synth-role", {
@@ -5,7 +5,7 @@ const aws_cdk_lib_1 = require("aws-cdk-lib");
5
5
  class XubeDeploymentStage extends aws_cdk_lib_1.Stage {
6
6
  constructor(scope, id, props) {
7
7
  super(scope, id, {
8
- env: props,
8
+ ...props,
9
9
  stageName: props.stageName,
10
10
  });
11
11
  this.stacks = [];
@@ -1,11 +1,11 @@
1
1
  import { Construct } from "constructs";
2
+ import { CodeBuildStep } from "aws-cdk-lib/pipelines";
3
+ import { Stage } from "aws-cdk-lib";
2
4
  import { XubeEnvironment } from "@xube/kit-aws-schema";
3
- import { XubeBuildStep } from "./xube-build-step";
4
- import { XubeDeploymentStage } from "./xube-deploy-stage";
5
5
  interface XubeDeployPipelineProps extends XubeEnvironment {
6
- name: string;
7
- xubeBuildStep: XubeBuildStep;
8
- xubeDeployStage: XubeDeploymentStage;
6
+ pipelineName: string;
7
+ buildStep: CodeBuildStep;
8
+ deployStage: Stage;
9
9
  }
10
10
  export declare class XubeDeployPipeline extends Construct {
11
11
  constructor(scope: Construct, id: string, props: XubeDeployPipelineProps);
@@ -1 +1 @@
1
- {"version":3,"file":"xube-pipeline.d.ts","sourceRoot":"","sources":["../../src/pipeline/xube-pipeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAGvC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,UAAU,uBAAwB,SAAQ,eAAe;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,aAAa,CAAC;IAC7B,eAAe,EAAE,mBAAmB,CAAC;CACtC;AAED,qBAAa,kBAAmB,SAAQ,SAAS;gBACnC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,uBAAuB;CAYzE"}
1
+ {"version":3,"file":"xube-pipeline.d.ts","sourceRoot":"","sources":["../../src/pipeline/xube-pipeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAAa,EAAgB,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,UAAU,uBAAwB,SAAQ,eAAe;IACvD,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,aAAa,CAAC;IACzB,WAAW,EAAE,KAAK,CAAC;CACpB;AAED,qBAAa,kBAAmB,SAAQ,SAAS;gBACnC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,uBAAuB;CAYzE"}
@@ -7,12 +7,12 @@ class XubeDeployPipeline extends constructs_1.Construct {
7
7
  constructor(scope, id, props) {
8
8
  super(scope, id);
9
9
  const pipeline = new pipelines_1.CodePipeline(this, id + "Pipeline", {
10
- pipelineName: props.name,
11
- synth: props.xubeBuildStep.synthCodeBuildStep,
10
+ pipelineName: props.pipelineName,
11
+ synth: props.buildStep,
12
12
  dockerEnabledForSynth: true,
13
13
  dockerEnabledForSelfMutation: true,
14
14
  });
15
- pipeline.addStage(props.xubeDeployStage);
15
+ pipeline.addStage(props.deployStage);
16
16
  }
17
17
  }
18
18
  exports.XubeDeployPipeline = XubeDeployPipeline;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xube/kit-aws-infrastructure",
3
- "version": "0.0.103",
3
+ "version": "0.0.105",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -17,13 +17,13 @@
17
17
  },
18
18
  "homepage": "https://github.com/XubeLtd/dev-kit#readme",
19
19
  "devDependencies": {
20
- "@xube/kit-build": "^0.0.103",
20
+ "@xube/kit-build": "^0.0.105",
21
21
  "aws-cdk": "^2.159.1"
22
22
  },
23
23
  "dependencies": {
24
- "@xube/kit-aws-schema": "^0.0.103",
25
- "@xube/kit-log": "^0.0.103",
26
- "@xube/kit-request": "^0.0.103",
24
+ "@xube/kit-aws-schema": "^0.0.105",
25
+ "@xube/kit-log": "^0.0.105",
26
+ "@xube/kit-request": "^0.0.105",
27
27
  "aws-cdk-lib": "^2.159.1",
28
28
  "aws-lambda": "^1.0.7",
29
29
  "constructs": "^10.3.0"
@@ -1,7 +1,4 @@
1
1
  import { XubeEnvironment } from "@xube/kit-aws-schema";
2
2
 
3
- export const getPipelineArn = (
4
- env: XubeEnvironment,
5
- name: string
6
- ): string =>
7
- `arn:aws:codepipeline:${env.region}:${env.account}:${name}`;
3
+ export const getPipelineArn = (env: XubeEnvironment, name: string): string =>
4
+ `arn:aws:codepipeline:${env.env.region}:${env.env.account}:${name}`;
@@ -49,11 +49,11 @@ interface XubeBuildStepProps extends XubeEnvironment {
49
49
  }
50
50
 
51
51
  export class XubeBuildStep extends Construct {
52
- synthCodeBuildStep: CodeBuildStep;
52
+ buildStep: CodeBuildStep;
53
53
  constructor(scope: Construct, id: string, props: XubeBuildStepProps) {
54
54
  super(scope, id);
55
55
 
56
- this.synthCodeBuildStep = new CodeBuildStep(id + "synth-step", {
56
+ this.buildStep = new CodeBuildStep(id + "synth-step", {
57
57
  input: props.pipelineSource,
58
58
  env: {},
59
59
  role: new Role(scope, id + "-build-synth-role", {
@@ -12,7 +12,7 @@ export class XubeDeploymentStage extends Stage {
12
12
 
13
13
  constructor(scope: Construct, id: string, props: XubeDeploymentStageProps) {
14
14
  super(scope, id, {
15
- env: props,
15
+ ...props,
16
16
  stageName: props.stageName,
17
17
  });
18
18
 
@@ -1,14 +1,12 @@
1
1
  import { Construct } from "constructs";
2
- import { CodePipeline } from "aws-cdk-lib/pipelines";
3
- import { pipelines } from "aws-cdk-lib";
2
+ import { CodeBuildStep, CodePipeline } from "aws-cdk-lib/pipelines";
3
+ import { Stage } from "aws-cdk-lib";
4
4
  import { XubeEnvironment } from "@xube/kit-aws-schema";
5
- import { XubeBuildStep } from "./xube-build-step";
6
- import { XubeDeploymentStage } from "./xube-deploy-stage";
7
5
 
8
6
  interface XubeDeployPipelineProps extends XubeEnvironment {
9
- name: string;
10
- xubeBuildStep: XubeBuildStep;
11
- xubeDeployStage: XubeDeploymentStage;
7
+ pipelineName: string;
8
+ buildStep: CodeBuildStep;
9
+ deployStage: Stage;
12
10
  }
13
11
 
14
12
  export class XubeDeployPipeline extends Construct {
@@ -16,12 +14,12 @@ export class XubeDeployPipeline extends Construct {
16
14
  super(scope, id);
17
15
 
18
16
  const pipeline = new CodePipeline(this, id + "Pipeline", {
19
- pipelineName: props.name,
20
- synth: props.xubeBuildStep.synthCodeBuildStep,
17
+ pipelineName: props.pipelineName,
18
+ synth: props.buildStep,
21
19
  dockerEnabledForSynth: true,
22
20
  dockerEnabledForSelfMutation: true,
23
21
  });
24
22
 
25
- pipeline.addStage(props.xubeDeployStage);
23
+ pipeline.addStage(props.deployStage);
26
24
  }
27
25
  }