@goldstack/template-lambda-trigger-cli 0.1.1
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/README.md +3 -0
- package/dist/scripts/generateSchemas.d.ts +2 -0
- package/dist/scripts/generateSchemas.d.ts.map +1 -0
- package/dist/scripts/generateSchemas.js +5 -0
- package/dist/scripts/generateSchemas.js.map +1 -0
- package/dist/src/templateLambdaTrigger.d.ts +2 -0
- package/dist/src/templateLambdaTrigger.d.ts.map +1 -0
- package/dist/src/templateLambdaTrigger.js +6 -0
- package/dist/src/templateLambdaTrigger.js.map +1 -0
- package/dist/src/types/LambdaTriggerPackage.d.ts +52 -0
- package/dist/src/types/LambdaTriggerPackage.d.ts.map +1 -0
- package/dist/src/types/LambdaTriggerPackage.js +3 -0
- package/dist/src/types/LambdaTriggerPackage.js.map +1 -0
- package/package.json +82 -0
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateSchemas.d.ts","sourceRoot":"","sources":["../../scripts/generateSchemas.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_package_config_generate_1 = require("@goldstack/utils-package-config-generate");
|
|
4
|
+
(0, utils_package_config_generate_1.run)(process.argv);
|
|
5
|
+
//# sourceMappingURL=generateSchemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateSchemas.js","sourceRoot":"","sources":["../../scripts/generateSchemas.ts"],"names":[],"mappings":";;AAAA,4FAA+D;AAE/D,IAAA,mCAAG,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templateLambdaTrigger.d.ts","sourceRoot":"","sources":["../../src/templateLambdaTrigger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.run = void 0;
|
|
4
|
+
var template_lambda_cli_1 = require("@goldstack/template-lambda-cli");
|
|
5
|
+
Object.defineProperty(exports, "run", { enumerable: true, get: function () { return template_lambda_cli_1.run; } });
|
|
6
|
+
//# sourceMappingURL=templateLambdaTrigger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templateLambdaTrigger.js","sourceRoot":"","sources":["../../src/templateLambdaTrigger.ts"],"names":[],"mappings":";;;AAAA,sEAAqD;AAA5C,0GAAA,GAAG,OAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { AWSDeployment } from '@goldstack/infra-aws';
|
|
2
|
+
import { TerraformDeployment } from '@goldstack/utils-terraform';
|
|
3
|
+
import { Deployment, DeploymentConfiguration } from '@goldstack/infra';
|
|
4
|
+
import { Package, Configuration } from '@goldstack/utils-package';
|
|
5
|
+
import { LambdaDeployment, LambdaDeploymentConfiguration, LambdaPackage } from '@goldstack/template-lambda-cli';
|
|
6
|
+
/**
|
|
7
|
+
* Optional schedule in which the lambda is triggered. Example: "rate(1 minute)".
|
|
8
|
+
* For more information see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-scheduled-rule-pattern.html#eb-rate-expressions">AWS Schedule Pattern documentation</a>
|
|
9
|
+
*
|
|
10
|
+
* @title LambdaSchedule
|
|
11
|
+
*/
|
|
12
|
+
export declare type LambdaSchedule = string;
|
|
13
|
+
/**
|
|
14
|
+
* Name of the SQS queue that is used to trigger the lambda. SQS queue should not exist and will be created when the name is provided.
|
|
15
|
+
*
|
|
16
|
+
* @title SQS Queue Name
|
|
17
|
+
*/
|
|
18
|
+
export declare type SQSQueueName = string;
|
|
19
|
+
export interface ThisDeploymentConfiguration extends DeploymentConfiguration, LambdaDeploymentConfiguration {
|
|
20
|
+
schedule?: LambdaSchedule;
|
|
21
|
+
sqsQueueName?: SQSQueueName;
|
|
22
|
+
}
|
|
23
|
+
export interface ThisDeployment extends Deployment, AWSDeployment, LambdaDeployment, TerraformDeployment {
|
|
24
|
+
configuration: ThisDeploymentConfiguration;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Places where the lambda should be deployed to.
|
|
28
|
+
*
|
|
29
|
+
* @title Deployments
|
|
30
|
+
*/
|
|
31
|
+
export declare type LambdaTriggerDeployments = ThisDeployment[];
|
|
32
|
+
/**
|
|
33
|
+
* Configures this lambda.
|
|
34
|
+
*
|
|
35
|
+
* @title Lambda Configuration
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
export declare type ThisPackageConfiguration = Configuration;
|
|
39
|
+
/**
|
|
40
|
+
* A lambda deployment for a lambda that is triggered.
|
|
41
|
+
*
|
|
42
|
+
* @title Lambda Trigger Package
|
|
43
|
+
*/
|
|
44
|
+
export interface ThisPackage extends Package, LambdaPackage {
|
|
45
|
+
configuration: ThisPackageConfiguration;
|
|
46
|
+
deployments: LambdaTriggerDeployments;
|
|
47
|
+
}
|
|
48
|
+
export { ThisDeploymentConfiguration as LambdaTriggerDeploymentConfiguration };
|
|
49
|
+
export { ThisDeployment as LambdaTriggerDeployment };
|
|
50
|
+
export { ThisPackageConfiguration as LambdaTriggerConfiguration };
|
|
51
|
+
export { ThisPackage as LambdaTriggerPackage };
|
|
52
|
+
//# sourceMappingURL=LambdaTriggerPackage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LambdaTriggerPackage.d.ts","sourceRoot":"","sources":["../../../src/types/LambdaTriggerPackage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAEL,gBAAgB,EAChB,6BAA6B,EAE7B,aAAa,EACd,MAAM,gCAAgC,CAAC;AAExC;;;;;GAKG;AACH,oBAAY,cAAc,GAAG,MAAM,CAAC;AAEpC;;;;GAIG;AACH,oBAAY,YAAY,GAAG,MAAM,CAAC;AAElC,MAAM,WAAW,2BACf,SAAQ,uBAAuB,EAC7B,6BAA6B;IAC/B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAED,MAAM,WAAW,cACf,SAAQ,UAAU,EAChB,aAAa,EACb,gBAAgB,EAChB,mBAAmB;IACrB,aAAa,EAAE,2BAA2B,CAAC;CAC5C;AAED;;;;GAIG;AACH,oBAAY,wBAAwB,GAAG,cAAc,EAAE,CAAC;AAExD;;;;;GAKG;AACH,oBAAY,wBAAwB,GAAG,aAAa,CAAC;AAErD;;;;GAIG;AACH,MAAM,WAAW,WAAY,SAAQ,OAAO,EAAE,aAAa;IACzD,aAAa,EAAE,wBAAwB,CAAC;IACxC,WAAW,EAAE,wBAAwB,CAAC;CACvC;AAED,OAAO,EAAE,2BAA2B,IAAI,oCAAoC,EAAE,CAAC;AAC/E,OAAO,EAAE,cAAc,IAAI,uBAAuB,EAAE,CAAC;AACrD,OAAO,EAAE,wBAAwB,IAAI,0BAA0B,EAAE,CAAC;AAClE,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LambdaTriggerPackage.js","sourceRoot":"","sources":["../../../src/types/LambdaTriggerPackage.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@goldstack/template-lambda-trigger-cli",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Utilities for templates that allow a Lambda to be triggered.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"goldstack",
|
|
7
|
+
"utility",
|
|
8
|
+
"trigger",
|
|
9
|
+
"lambda",
|
|
10
|
+
"aws",
|
|
11
|
+
"serverless",
|
|
12
|
+
"infrastructure",
|
|
13
|
+
"IaC",
|
|
14
|
+
"configuration"
|
|
15
|
+
],
|
|
16
|
+
"homepage": "https://goldstack.party",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/goldstack/goldstack/issues"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/goldstack/goldstack.git"
|
|
23
|
+
},
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"author": "Max Rohde",
|
|
26
|
+
"sideEffects": false,
|
|
27
|
+
"main": "dist/src/templateLambdaTrigger.js",
|
|
28
|
+
"bin": {
|
|
29
|
+
"template": "./bin/template",
|
|
30
|
+
"template-lambda-http-cli": "./bin/template"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "yarn clean && yarn compile",
|
|
34
|
+
"build:watch": "yarn clean && yarn compile-watch",
|
|
35
|
+
"clean": "rimraf ./dist",
|
|
36
|
+
"cli": "ts-node bin/template.ts",
|
|
37
|
+
"compile": "tsc -p tsconfig.json",
|
|
38
|
+
"compile-watch": "tsc -p tsconfig.json --watch",
|
|
39
|
+
"compile-watch:light": "nodemon --watch ./src/ -e '*' --exec 'yarn compile'",
|
|
40
|
+
"coverage": "jest --collect-coverage --passWithNoTests --config=./jest.config.js --runInBand",
|
|
41
|
+
"generate-schema": "ts-node scripts/generateSchemas.ts && cp schemas/* ../../../templates/packages/lambda-python-job/schemas && cp schemas/* ../../../templates/packages/lambda-node-trigger/schemas",
|
|
42
|
+
"prepublishOnly": "yarn run build",
|
|
43
|
+
"publish": "utils-git changed --exec \"yarn npm publish $@\"",
|
|
44
|
+
"test-ci": "jest --passWithNoTests --config=./jest.config.js --runInBand",
|
|
45
|
+
"version:apply": "utils-git changed --exec \"yarn version $@ && yarn version apply\"",
|
|
46
|
+
"version:apply:force": "yarn version $@ && yarn version apply"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@goldstack/infra": "0.4.12",
|
|
50
|
+
"@goldstack/infra-aws": "0.4.20",
|
|
51
|
+
"@goldstack/template-lambda-cli": "0.1.2",
|
|
52
|
+
"@goldstack/utils-aws-lambda": "0.3.26",
|
|
53
|
+
"@goldstack/utils-cli": "0.3.10",
|
|
54
|
+
"@goldstack/utils-config": "0.4.12",
|
|
55
|
+
"@goldstack/utils-log": "0.3.11",
|
|
56
|
+
"@goldstack/utils-package": "0.4.12",
|
|
57
|
+
"@goldstack/utils-package-config": "0.4.12",
|
|
58
|
+
"@goldstack/utils-template": "0.4.12",
|
|
59
|
+
"@goldstack/utils-terraform": "0.4.23",
|
|
60
|
+
"@goldstack/utils-terraform-aws": "0.4.26",
|
|
61
|
+
"source-map-support": "^0.5.21",
|
|
62
|
+
"yargs": "^17.5.1"
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@goldstack/utils-docs-cli": "0.3.11",
|
|
66
|
+
"@goldstack/utils-git": "0.2.9",
|
|
67
|
+
"@goldstack/utils-package-config-generate": "0.3.10",
|
|
68
|
+
"@swc/core": "^1.3.74",
|
|
69
|
+
"@swc/jest": "^0.2.27",
|
|
70
|
+
"@types/jest": "^29.0.1",
|
|
71
|
+
"@types/node": "^18.7.13",
|
|
72
|
+
"@types/yargs": "^17.0.10",
|
|
73
|
+
"jest": "^29.3.1",
|
|
74
|
+
"rimraf": "^3.0.2",
|
|
75
|
+
"ts-json-schema-generator": "^1.0.0",
|
|
76
|
+
"ts-node": "^10.9.1",
|
|
77
|
+
"typescript": "^4.8.4"
|
|
78
|
+
},
|
|
79
|
+
"publishConfig": {
|
|
80
|
+
"main": "dist/src/templateLambdaTrigger.js"
|
|
81
|
+
}
|
|
82
|
+
}
|