skuba 3.17.0-beta.5 → 4.0.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.
- package/jest/moduleNameMapper.js +16 -4
- package/lib/cli/configure/processing/typescript.js +1 -1
- package/lib/cli/configure/processing/typescript.js.map +1 -1
- package/lib/cli/init/git.js +5 -9
- package/lib/cli/init/git.js.map +1 -1
- package/lib/cli/lint/index.d.ts +2 -1
- package/lib/cli/lint/index.js.map +1 -1
- package/lib/cli/lint/types.d.ts +2 -1
- package/lib/cli/node.js +1 -1
- package/lib/cli/node.js.map +1 -1
- package/lib/utils/exec.d.ts +2 -1
- package/lib/utils/exec.js +1 -1
- package/lib/utils/exec.js.map +1 -1
- package/package.json +19 -19
- package/template/express-rest-api/.buildkite/pipeline.yml +3 -3
- package/template/express-rest-api/Dockerfile +3 -0
- package/template/koa-rest-api/.buildkite/pipeline.yml +3 -3
- package/template/koa-rest-api/.gantry/dev.yml +3 -0
- package/template/koa-rest-api/.gantry/prod.yml +3 -0
- package/template/koa-rest-api/Dockerfile +4 -1
- package/template/koa-rest-api/README.md +1 -1
- package/template/koa-rest-api/gantry.apply.yml +8 -0
- package/template/koa-rest-api/package.json +7 -1
- package/template/koa-rest-api/src/tracing.ts +61 -0
- package/template/lambda-sqs-worker/.buildkite/pipeline.yml +1 -0
- package/template/lambda-sqs-worker/package.json +2 -2
- package/template/lambda-sqs-worker/serverless.yml +18 -14
- package/template/lambda-sqs-worker/src/hooks.ts +3 -2
- package/template/lambda-sqs-worker-cdk/cdk.json +0 -1
- package/template/lambda-sqs-worker-cdk/docker-compose.yml +1 -0
- package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +10 -142
- package/template/lambda-sqs-worker-cdk/infra/appStack.test.ts +14 -9
- package/template/lambda-sqs-worker-cdk/infra/appStack.ts +25 -18
- package/template/lambda-sqs-worker-cdk/infra/index.ts +2 -2
- package/template/lambda-sqs-worker-cdk/package.json +11 -12
package/jest/moduleNameMapper.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
|
|
3
|
-
const { pathsToModuleNameMapper } = require('ts-jest
|
|
3
|
+
const { pathsToModuleNameMapper } = require('ts-jest');
|
|
4
4
|
const {
|
|
5
5
|
sys,
|
|
6
6
|
findConfigFile,
|
|
@@ -11,7 +11,7 @@ const {
|
|
|
11
11
|
/**
|
|
12
12
|
* Set a default `src` module alias for backward compatibility.
|
|
13
13
|
*
|
|
14
|
-
* TODO: drop this default in skuba
|
|
14
|
+
* TODO: drop this default in skuba v5.
|
|
15
15
|
*/
|
|
16
16
|
const DEFAULT_PATHS = { src: ['src'], 'src/*': ['src/*'] };
|
|
17
17
|
|
|
@@ -20,7 +20,7 @@ const DEFAULT_PATHS = { src: ['src'], 'src/*': ['src/*'] };
|
|
|
20
20
|
*/
|
|
21
21
|
const getConfigFromDisk = () => {
|
|
22
22
|
const filename =
|
|
23
|
-
findConfigFile('.', sys.fileExists.bind(this))
|
|
23
|
+
findConfigFile('.', sys.fileExists.bind(this)) ?? 'tsconfig.json';
|
|
24
24
|
|
|
25
25
|
return readConfigFile(filename, sys.readFile.bind(this)).config;
|
|
26
26
|
};
|
|
@@ -34,19 +34,28 @@ module.exports.createModuleNameMapper = (getConfig = getConfigFromDisk) => {
|
|
|
34
34
|
const paths = Object.fromEntries(
|
|
35
35
|
Object.entries(parsedConfig.options.paths ?? DEFAULT_PATHS).flatMap(
|
|
36
36
|
([key, values]) => [
|
|
37
|
+
// Pass through the input path entry almost verbatim.
|
|
38
|
+
// We trim a trailing slash because TypeScript allows `import 'src'`
|
|
39
|
+
// to be resolved by the alias `src/`, but Jest's mapper does not.
|
|
37
40
|
[
|
|
38
41
|
key.replace(/\/$/, ''),
|
|
39
42
|
values.map((value) => value.replace(/\/$/, '')),
|
|
40
43
|
],
|
|
44
|
+
// Append a variant of the input path entry.
|
|
45
|
+
// As TypeScript allows both `import 'src'` and `import 'src/nested'`
|
|
46
|
+
// to be resolved by the alias `src/*` (and likewise for plain `src`),
|
|
47
|
+
// we need to seed two Jest mappings per path.
|
|
41
48
|
...(key.endsWith('/*')
|
|
42
49
|
? [
|
|
43
50
|
[
|
|
51
|
+
// Given a path `src/*`, seed an extra `src`.
|
|
44
52
|
key.replace(/\/\*$/, ''),
|
|
45
53
|
values.map((value) => value.replace(/\/\*$/, '')),
|
|
46
54
|
],
|
|
47
55
|
]
|
|
48
56
|
: [
|
|
49
57
|
[
|
|
58
|
+
// Given a path `src`, seed an extra `src/*`.
|
|
50
59
|
path.join(key, '*'),
|
|
51
60
|
values.map((value) => path.join(value, '*')),
|
|
52
61
|
],
|
|
@@ -55,10 +64,13 @@ module.exports.createModuleNameMapper = (getConfig = getConfigFromDisk) => {
|
|
|
55
64
|
),
|
|
56
65
|
);
|
|
57
66
|
|
|
58
|
-
const prefix = path.join('<rootDir>', parsedConfig.options.baseUrl
|
|
67
|
+
const prefix = path.join('<rootDir>', parsedConfig.options.baseUrl ?? '.');
|
|
59
68
|
|
|
60
69
|
const moduleNameMapper = pathsToModuleNameMapper(paths, { prefix });
|
|
61
70
|
|
|
71
|
+
// Normalise away any `..`s that may crop up from `baseUrl` usage.
|
|
72
|
+
// For example, a `baseUrl` of `src` and a path of `../cli` will result in
|
|
73
|
+
// `<rootDir>/src/../cli`, which can be normalised to `<rootDir>/cli`.
|
|
62
74
|
return Object.fromEntries(
|
|
63
75
|
Object.entries(moduleNameMapper).map(([key, values]) => [
|
|
64
76
|
key,
|
|
@@ -30,7 +30,7 @@ const createExportDefaultObjectLiteralExpression = (factory, props, callExpressi
|
|
|
30
30
|
const createImportFromExpression = (factory, moduleName, importNames) => {
|
|
31
31
|
const importClause = typeof importNames === 'string'
|
|
32
32
|
? factory.createImportClause(false, factory.createIdentifier(importNames), undefined)
|
|
33
|
-
: factory.createImportClause(false, undefined, factory.createNamedImports(importNames.map((importName) => factory.createImportSpecifier(
|
|
33
|
+
: factory.createImportClause(false, undefined, factory.createNamedImports(importNames.map((importName) => factory.createImportSpecifier(undefined, factory.createIdentifier(importName)))));
|
|
34
34
|
return factory.createImportDeclaration(undefined, undefined, importClause, factory.createStringLiteral(moduleName));
|
|
35
35
|
};
|
|
36
36
|
const getPropName = (prop) => typescript_1.default.isPropertyAssignment(prop) && typescript_1.default.isIdentifier(prop.name)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../../../src/cli/configure/processing/typescript.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4B;AAE5B,yCAA4C;AAM5C,MAAM,sBAAsB,GAAG,6BAA6B,CAAC;AAC7D,MAAM,iBAAiB,GAAG,IAAI,MAAM,CAAC,KAAK,sBAAsB,EAAE,EAAE,GAAG,CAAC,CAAC;AAEzE;;;;;GAKG;AACH,MAAM,+BAA+B,GAAG,CAAoB,IAAO,EAAE,EAAE,CACrE,oBAAE,CAAC,0BAA0B,CAC3B,IAAI,EACJ,oBAAE,CAAC,UAAU,CAAC,uBAAuB,EACrC,sBAAsB,EACtB,IAAI,CACL,CAAC;AAEJ;;;;;;GAMG;AACH,MAAM,0CAA0C,GAAG,CACjD,OAAuB,EACvB,KAAY,EACZ,cAA8B,EACT,EAAE,CACvB,OAAO,CAAC,sBAAsB,CAC5B,SAAS,EACT,SAAS,EACT,SAAS,EACT,cAAc,KAAK,SAAS;IAC1B,CAAC,CAAC,OAAO,CAAC,6BAA6B,CAAC,KAAK,EAAE,IAAI,CAAC;IACpD,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,cAAc,EAAE,SAAS,EAAE;QACtD,OAAO,CAAC,6BAA6B,CAAC,KAAK,EAAE,IAAI,CAAC;KACnD,CAAC,CACP,CAAC;AAEJ,MAAM,0BAA0B,GAAG,CACjC,OAAuB,EACvB,UAAkB,EAClB,WAA8B,EAC9B,EAAE;IACF,MAAM,YAAY,GAChB,OAAO,WAAW,KAAK,QAAQ;QAC7B,CAAC,CAAC,OAAO,CAAC,kBAAkB,CACxB,KAAK,EACL,OAAO,CAAC,gBAAgB,CAAC,WAAW,CAAC,EACrC,SAAS,CACV;QACH,CAAC,CAAC,OAAO,CAAC,kBAAkB,CACxB,KAAK,EACL,SAAS,EACT,OAAO,CAAC,kBAAkB,CACxB,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAC7B,OAAO,CAAC,qBAAqB,CAC3B,
|
|
1
|
+
{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../../../src/cli/configure/processing/typescript.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4B;AAE5B,yCAA4C;AAM5C,MAAM,sBAAsB,GAAG,6BAA6B,CAAC;AAC7D,MAAM,iBAAiB,GAAG,IAAI,MAAM,CAAC,KAAK,sBAAsB,EAAE,EAAE,GAAG,CAAC,CAAC;AAEzE;;;;;GAKG;AACH,MAAM,+BAA+B,GAAG,CAAoB,IAAO,EAAE,EAAE,CACrE,oBAAE,CAAC,0BAA0B,CAC3B,IAAI,EACJ,oBAAE,CAAC,UAAU,CAAC,uBAAuB,EACrC,sBAAsB,EACtB,IAAI,CACL,CAAC;AAEJ;;;;;;GAMG;AACH,MAAM,0CAA0C,GAAG,CACjD,OAAuB,EACvB,KAAY,EACZ,cAA8B,EACT,EAAE,CACvB,OAAO,CAAC,sBAAsB,CAC5B,SAAS,EACT,SAAS,EACT,SAAS,EACT,cAAc,KAAK,SAAS;IAC1B,CAAC,CAAC,OAAO,CAAC,6BAA6B,CAAC,KAAK,EAAE,IAAI,CAAC;IACpD,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,cAAc,EAAE,SAAS,EAAE;QACtD,OAAO,CAAC,6BAA6B,CAAC,KAAK,EAAE,IAAI,CAAC;KACnD,CAAC,CACP,CAAC;AAEJ,MAAM,0BAA0B,GAAG,CACjC,OAAuB,EACvB,UAAkB,EAClB,WAA8B,EAC9B,EAAE;IACF,MAAM,YAAY,GAChB,OAAO,WAAW,KAAK,QAAQ;QA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,CAAC;SAC9D,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;IAElC,OAAO,IAAA,yBAAc,EAAC,IAAI,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC;AACxD,CAAC,CAAC;AAtBW,QAAA,gCAAgC,oCAsB3C"}
|
package/lib/cli/init/git.js
CHANGED
|
@@ -35,7 +35,7 @@ exports.downloadGitHubTemplate = exports.commitChanges = exports.initialiseRepo
|
|
|
35
35
|
const path_1 = __importDefault(require("path"));
|
|
36
36
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
37
37
|
const isomorphic_git_1 = __importDefault(require("isomorphic-git"));
|
|
38
|
-
const
|
|
38
|
+
const simple_git_1 = __importDefault(require("simple-git"));
|
|
39
39
|
const Git = __importStar(require("../../api/git"));
|
|
40
40
|
const dir_1 = require("../../utils/dir");
|
|
41
41
|
const logging_1 = require("../../utils/logging");
|
|
@@ -70,14 +70,10 @@ exports.commitChanges = commitChanges;
|
|
|
70
70
|
const downloadGitHubTemplate = (gitHubPath, destinationDir) => __awaiter(void 0, void 0, void 0, function* () {
|
|
71
71
|
logging_1.log.newline();
|
|
72
72
|
logging_1.log.plain('Downloading', logging_1.log.bold(gitHubPath), 'from GitHub...');
|
|
73
|
-
yield
|
|
74
|
-
depth
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
http: node_1.default,
|
|
78
|
-
singleBranch: true,
|
|
79
|
-
url: `git@github.com:${gitHubPath}.git`,
|
|
80
|
-
});
|
|
73
|
+
yield (0, simple_git_1.default)().clone(`git@github.com:${gitHubPath}.git`, destinationDir, [
|
|
74
|
+
'--depth=1',
|
|
75
|
+
'--quiet',
|
|
76
|
+
]);
|
|
81
77
|
yield fs_extra_1.default.promises.rm(path_1.default.join(destinationDir, '.git'), {
|
|
82
78
|
force: true,
|
|
83
79
|
recursive: true,
|
package/lib/cli/init/git.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../../src/cli/init/git.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AAExB,wDAA0B;AAC1B,oEAAiC;AACjC,
|
|
1
|
+
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../../src/cli/init/git.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AAExB,wDAA0B;AAC1B,oEAAiC;AACjC,4DAAmC;AAEnC,mDAAqC;AACrC,yCAAiD;AACjD,iDAA0C;AAOnC,MAAM,cAAc,GAAG,CAC5B,GAAW,EACX,EAAE,OAAO,EAAE,QAAQ,EAAiB,EACpC,EAAE;IACF,MAAM,wBAAG,CAAC,IAAI,CAAC;QACb,wCAAwC;QACxC,aAAa,EAAE,QAAQ;QACvB,GAAG;QACH,EAAE,EAAF,kBAAE;KACH,CAAC,CAAC;IAEH,MAAM,GAAG,CAAC,MAAM,CAAC;QACf,GAAG;QACH,OAAO,EAAE,gBAAgB;KAC1B,CAAC,CAAC;IAEH,MAAM,wBAAG,CAAC,SAAS,CAAC;QAClB,GAAG;QACH,EAAE,EAAF,kBAAE;QACF,MAAM,EAAE,QAAQ;QAChB,GAAG,EAAE,kBAAkB,OAAO,IAAI,QAAQ,MAAM;KACjD,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAtBW,QAAA,cAAc,kBAsBzB;AAEK,MAAM,aAAa,GAAG,CAAO,GAAW,EAAE,OAAe,EAAE,EAAE;IAClE,MAAM,SAAS,GAAG,MAAM,IAAA,oBAAc,EAAC,GAAG,CAAC,CAAC;IAE5C,MAAM,OAAO,CAAC,GAAG,CACf,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,wBAAG,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAF,kBAAE,EAAE,CAAC,CAAC,CAC5D,CAAC;IAEF,MAAM,GAAG,CAAC,MAAM,CAAC;QACf,GAAG;QACH,OAAO;KACR,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAXW,QAAA,aAAa,iBAWxB;AAEK,MAAM,sBAAsB,GAAG,CACpC,UAAkB,EAClB,cAAsB,EACtB,EAAE;IACF,aAAG,CAAC,OAAO,EAAE,CAAC;IACd,aAAG,CAAC,KAAK,CAAC,aAAa,EAAE,aAAG,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,gBAAgB,CAAC,CAAC;IAEjE,MAAM,IAAA,oBAAS,GAAE,CAAC,KAAK,CAAC,kBAAkB,UAAU,MAAM,EAAE,cAAc,EAAE;QAC1E,WAAW;QACX,SAAS;KACV,CAAC,CAAC;IAEH,MAAM,kBAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,cAAI,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,EAAE;QACtD,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;IAEH,aAAG,CAAC,OAAO,EAAE,CAAC;IACd,aAAG,CAAC,IAAI,CACN,qBAAqB,EACrB,aAAG,CAAC,IAAI,CAAC,sBAAsB,CAAC,EAChC,oBAAoB,CACrB,CAAC;AACJ,CAAC,CAAA,CAAC;AAvBW,QAAA,sBAAsB,0BAuBjC"}
|
package/lib/cli/lint/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Writable } from 'stream';
|
|
2
|
+
export declare const lint: (args?: string[], tscOutputStream?: Writable | undefined, workerThreads?: boolean) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/lint/index.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/lint/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,2CAA+D;AAC/D,wEAAwE;AAExE,yCAA0C;AAC1C,yCAA0C;AAGnC,MAAM,IAAI,GAAG,CAClB,IAAI,GAAG,OAAO,CAAC,IAAI,EACnB,kBAAwC,SAAS,EACjD,aAAa,GAAG,IAAI,EACpB,EAAE;IACF,MAAM,IAAA,0CAAqB,GAAE,CAAC;IAE9B,MAAM,IAAI,GAAU;QAClB,KAAK,EAAE,IAAA,mBAAY,EAAC,IAAI,CAAC;QACzB,MAAM,EAAE,IAAA,oBAAa,EAAC,IAAI,CAAC;QAC3B,eAAe;QACf,aAAa;KACd,CAAC;IAEF,MAAM,IAAA,uBAAY,EAAC,IAAI,CAAC,CAAC;IAEzB,MAAM,IAAA,uBAAY,GAAE,CAAC;AACvB,CAAC,CAAA,CAAC;AAjBW,QAAA,IAAI,QAiBf"}
|
package/lib/cli/lint/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
import type { Writable } from 'stream';
|
|
2
3
|
export interface Input {
|
|
3
4
|
/**
|
|
4
5
|
* Whether to enable verbose debug logging.
|
|
@@ -20,7 +21,7 @@ export interface Input {
|
|
|
20
21
|
*
|
|
21
22
|
* Defaults to `process.stdout`.
|
|
22
23
|
*/
|
|
23
|
-
tscOutputStream?:
|
|
24
|
+
tscOutputStream?: Writable;
|
|
24
25
|
/**
|
|
25
26
|
* Whether to allow usage of Node.js worker threads.
|
|
26
27
|
*
|
package/lib/cli/node.js
CHANGED
|
@@ -56,7 +56,7 @@ const node = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
56
56
|
return tsNode
|
|
57
57
|
.createRepl({
|
|
58
58
|
service: tsNode.register({
|
|
59
|
-
require: [
|
|
59
|
+
require: ['tsconfig-paths/register'],
|
|
60
60
|
transpileOnly: true,
|
|
61
61
|
}),
|
|
62
62
|
})
|
package/lib/cli/node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../src/cli/node.ts"],"names":[],"mappings":";;;;;;;;;;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AAM,IAAI,GAAG,IAAA,mBAAY,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAEjD,MAAM,aAAa,GAAG,MAAM,IAAA,kBAAO,GAAE,CAAC;IAEtC,IAAI,IAAI,CAAC,UAAU,EAAE;QACnB,MAAM,IAAI,GAAG,IAAA,iBAAU,EAAC;YACtB,GAAG,EAAE;gBACH,mBAAmB,EAAE,IAAI,CAAC,UAAU;gBACpC,YAAY,EAAE,MAAM,CAAC,IAAA,qBAAQ,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC;aACtE;SACF,CAAC,CAAC;QAEH,+DAA+D;QAC/D,qDAAqD;QACrD,OAAO,IAAI,CACT,MAAM,EACN,GAAG,IAAI,CAAC,IAAI,EACZ,WAAW,EACX,yBAAyB,EACzB,WAAW,EACX,iCAAiC,EACjC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,SAAS,CAAC,EACrC,GAAG,IAAI,CAAC,MAAM,CACf,CAAC;KACH;IAED,oDAAoD;IACpD,OAAO,MAAM;SACV,UAAU,CAAC;QACV,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC;YACvB,OAAO,EAAE,CAAC,yBAAyB,CAAC;YACpC,aAAa,EAAE,IAAI;SACpB,CAAC;KACH,CAAC;SACD,KAAK,EAAE,CAAC;AACb,CAAC,CAAA,CAAC;AApCW,QAAA,IAAI,QAoCf"}
|
package/lib/utils/exec.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
import stream from 'stream';
|
|
2
3
|
import type { Color } from 'chalk';
|
|
3
4
|
import type { ExecaChildProcess } from 'execa';
|
|
4
5
|
import execa from 'execa';
|
|
@@ -26,7 +27,7 @@ interface ExecConcurrentlyOptions {
|
|
|
26
27
|
*
|
|
27
28
|
* Defaults to `process.stdout`.
|
|
28
29
|
*/
|
|
29
|
-
outputStream?:
|
|
30
|
+
outputStream?: stream.Writable;
|
|
30
31
|
}
|
|
31
32
|
declare type ExecOptions = execa.Options & {
|
|
32
33
|
streamStdio?: true | 'yarn';
|
package/lib/utils/exec.js
CHANGED
|
@@ -90,7 +90,7 @@ const execConcurrently = (commands, { maxProcesses, nameLength, outputStream } =
|
|
|
90
90
|
outputStream,
|
|
91
91
|
// Use a minimalist logging prefix.
|
|
92
92
|
prefix: '{name} │',
|
|
93
|
-
});
|
|
93
|
+
}).result;
|
|
94
94
|
}
|
|
95
95
|
catch (err) {
|
|
96
96
|
const result = error_1.ConcurrentlyErrors.validate(err);
|
package/lib/utils/exec.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exec.js","sourceRoot":"","sources":["../../src/utils/exec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2BAA0B;AAC1B,oDAA4B;AAC5B,gDAAwB;AAGxB,gEAAwC;AAExC,kDAA0B;AAC1B,gEAAsC;AACtC,0DAAiC;AAEjC,mCAA8D;AAC9D,uCAAgC;AAEhC,MAAM,cAAe,SAAQ,gBAAM,CAAC,SAAS;IAA7C;;QACE,aAAQ,GAAG,KAAK,CAAC;IAwBnB,CAAC;IAtBC,UAAU,CACR,KAAU,EACV,SAAyB,EACzB,QAAkC;QAElC,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC;QAE1C,qEAAqE;QACrE,IAAI,GAAG,CAAC,UAAU,CAAC,0BAA0B,CAAC,EAAE;YAC9C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;SACtB;QAED,IACE,CAAC,IAAI,CAAC,QAAQ;YACd,gEAAgE;YAChE,CAAC,GAAG,CAAC,UAAU,CAAC,wBAAwB,CAAC,EACzC;YACA,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAClB;QAED,QAAQ,EAAE,CA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AAe,EAAC,GAAG,EAAE,QAAQ,CAAC,EAAE;YAClC,OAAO,KAAK,CAAC;SACd;QAED,MAAM,GAAG,CAAC;KACX;AACH,CAAC,CAAA,CAAC;AAZW,QAAA,UAAU,cAYrB"}
|
package/package.json
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
"skuba": "lib/skuba.js"
|
|
6
6
|
},
|
|
7
7
|
"engines": {
|
|
8
|
-
"node": ">=
|
|
8
|
+
"node": ">=14.18"
|
|
9
9
|
},
|
|
10
|
-
"version": "
|
|
10
|
+
"version": "4.0.0",
|
|
11
11
|
"main": "lib/index.js",
|
|
12
12
|
"typings": "lib/index.d.ts",
|
|
13
13
|
"files": [
|
|
@@ -41,10 +41,9 @@
|
|
|
41
41
|
"url": "https://github.com/seek-oss/skuba.git"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@changesets/cli": "2.
|
|
44
|
+
"@changesets/cli": "2.19.0",
|
|
45
45
|
"@changesets/get-github-info": "0.5.0",
|
|
46
|
-
"@jest/reporters": "27.
|
|
47
|
-
"@types/concurrently": "6.4.0",
|
|
46
|
+
"@jest/reporters": "27.4.6",
|
|
48
47
|
"@types/ejs": "3.1.0",
|
|
49
48
|
"@types/express": "4.17.13",
|
|
50
49
|
"@types/fs-extra": "9.0.13",
|
|
@@ -54,24 +53,24 @@
|
|
|
54
53
|
"@types/npm-which": "3.0.1",
|
|
55
54
|
"@types/picomatch": "2.3.0",
|
|
56
55
|
"@types/supertest": "2.0.11",
|
|
57
|
-
"express": "4.17.
|
|
56
|
+
"express": "4.17.2",
|
|
58
57
|
"jsonfile": "6.1.0",
|
|
59
58
|
"koa": "2.13.4",
|
|
60
|
-
"memfs": "3.
|
|
59
|
+
"memfs": "3.4.1",
|
|
61
60
|
"semver": "7.3.5",
|
|
62
|
-
"supertest": "6.1
|
|
63
|
-
"type-fest": "2.
|
|
61
|
+
"supertest": "6.2.1",
|
|
62
|
+
"type-fest": "2.9.0"
|
|
64
63
|
},
|
|
65
64
|
"dependencies": {
|
|
66
65
|
"@octokit/rest": "^18.12.0",
|
|
67
66
|
"@octokit/types": "^6.34.0",
|
|
68
|
-
"@types/jest": "^27.0
|
|
67
|
+
"@types/jest": "^27.4.0",
|
|
69
68
|
"chalk": "^4.1.0",
|
|
70
|
-
"concurrently": "^
|
|
69
|
+
"concurrently": "^7.0.0",
|
|
71
70
|
"ejs": "^3.1.6",
|
|
72
71
|
"enquirer": "^2.3.6",
|
|
73
72
|
"eslint": "^7.27.0",
|
|
74
|
-
"eslint-config-skuba": "1.0.
|
|
73
|
+
"eslint-config-skuba": "1.0.14",
|
|
75
74
|
"execa": "^5.0.0",
|
|
76
75
|
"fdir": "^5.0.0",
|
|
77
76
|
"fs-extra": "^10.0.0",
|
|
@@ -79,29 +78,30 @@
|
|
|
79
78
|
"get-port": "^5.1.1",
|
|
80
79
|
"ignore": "^5.1.8",
|
|
81
80
|
"is-installed-globally": "^0.4.0",
|
|
82
|
-
"isomorphic-git": "^1.
|
|
83
|
-
"jest": "^27.
|
|
81
|
+
"isomorphic-git": "^1.11.1",
|
|
82
|
+
"jest": "^27.4.5",
|
|
84
83
|
"latest-version": "^5.1.0",
|
|
85
84
|
"lodash.mergewith": "^4.6.2",
|
|
86
85
|
"normalize-package-data": "^3.0.0",
|
|
87
86
|
"npm-run-path": "^4.0.1",
|
|
88
87
|
"npm-which": "^3.0.1",
|
|
89
88
|
"picomatch": "^2.2.2",
|
|
90
|
-
"prettier": "~2.
|
|
89
|
+
"prettier": "~2.5.0",
|
|
91
90
|
"read-pkg-up": "^7.0.1",
|
|
92
91
|
"runtypes": "^6.0.0",
|
|
93
|
-
"semantic-release": "^
|
|
92
|
+
"semantic-release": "^19.0.0",
|
|
94
93
|
"serialize-error": "^8.0.1",
|
|
94
|
+
"simple-git": "^3.0.0",
|
|
95
95
|
"strip-ansi": "^6.0.1",
|
|
96
|
-
"ts-jest": "^27.
|
|
96
|
+
"ts-jest": "^27.1.2",
|
|
97
97
|
"ts-node": "^9.1.1",
|
|
98
98
|
"ts-node-dev": "^1.1.8",
|
|
99
99
|
"tsconfig-paths": "^3.11.0",
|
|
100
100
|
"tsconfig-seek": "1.0.2",
|
|
101
|
-
"typescript": "~4.
|
|
101
|
+
"typescript": "~4.4.4"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
|
-
"skuba-dive": "1"
|
|
104
|
+
"skuba-dive": "1 || 2"
|
|
105
105
|
},
|
|
106
106
|
"peerDependenciesMeta": {
|
|
107
107
|
"skuba-dive": {
|
|
@@ -69,7 +69,7 @@ steps:
|
|
|
69
69
|
- *aws-sm
|
|
70
70
|
- *private-npm
|
|
71
71
|
- *docker-ecr-cache
|
|
72
|
-
- seek-jobs/gantry#v1.
|
|
72
|
+
- seek-jobs/gantry#v1.6.1:
|
|
73
73
|
command: build
|
|
74
74
|
file: gantry.build.yml
|
|
75
75
|
region: <%- region %>
|
|
@@ -85,7 +85,7 @@ steps:
|
|
|
85
85
|
concurrency_group: <%- teamName %>/deploy/gantry/<%- devGantryEnvironmentName %>
|
|
86
86
|
key: deploy-dev
|
|
87
87
|
plugins:
|
|
88
|
-
- seek-jobs/gantry#v1.
|
|
88
|
+
- seek-jobs/gantry#v1.6.1:
|
|
89
89
|
command: apply
|
|
90
90
|
environment: <%- devGantryEnvironmentName %>
|
|
91
91
|
file: gantry.apply.yml
|
|
@@ -101,7 +101,7 @@ steps:
|
|
|
101
101
|
concurrency_group: <%- teamName %>/deploy/gantry/<%- prodGantryEnvironmentName %>
|
|
102
102
|
depends_on: deploy-dev
|
|
103
103
|
plugins:
|
|
104
|
-
- seek-jobs/gantry#v1.
|
|
104
|
+
- seek-jobs/gantry#v1.6.1:
|
|
105
105
|
command: apply
|
|
106
106
|
environment: <%- prodGantryEnvironmentName %>
|
|
107
107
|
file: gantry.apply.yml
|
|
@@ -69,7 +69,7 @@ steps:
|
|
|
69
69
|
- *aws-sm
|
|
70
70
|
- *private-npm
|
|
71
71
|
- *docker-ecr-cache
|
|
72
|
-
- seek-jobs/gantry#v1.
|
|
72
|
+
- seek-jobs/gantry#v1.6.1:
|
|
73
73
|
command: build
|
|
74
74
|
file: gantry.build.yml
|
|
75
75
|
region: <%- region %>
|
|
@@ -85,7 +85,7 @@ steps:
|
|
|
85
85
|
concurrency_group: <%- teamName %>/deploy/gantry/<%- devGantryEnvironmentName %>
|
|
86
86
|
key: deploy-dev
|
|
87
87
|
plugins:
|
|
88
|
-
- seek-jobs/gantry#v1.
|
|
88
|
+
- seek-jobs/gantry#v1.6.1:
|
|
89
89
|
command: apply
|
|
90
90
|
environment: <%- devGantryEnvironmentName %>
|
|
91
91
|
file: gantry.apply.yml
|
|
@@ -101,7 +101,7 @@ steps:
|
|
|
101
101
|
concurrency_group: <%- teamName %>/deploy/gantry/<%- prodGantryEnvironmentName %>
|
|
102
102
|
depends_on: deploy-dev
|
|
103
103
|
plugins:
|
|
104
|
-
- seek-jobs/gantry#v1.
|
|
104
|
+
- seek-jobs/gantry#v1.6.1:
|
|
105
105
|
command: apply
|
|
106
106
|
environment: <%- prodGantryEnvironmentName %>
|
|
107
107
|
file: gantry.apply.yml
|
|
@@ -27,8 +27,11 @@ COPY --from=deps /workdir/node_modules node_modules
|
|
|
27
27
|
|
|
28
28
|
ENV NODE_ENV production
|
|
29
29
|
|
|
30
|
+
# https://nodejs.org/api/cli.html#cli_node_options_options
|
|
31
|
+
ENV NODE_OPTIONS --enable-source-maps
|
|
32
|
+
|
|
30
33
|
ARG PORT=8001
|
|
31
34
|
ENV PORT ${PORT}
|
|
32
35
|
EXPOSE ${PORT}
|
|
33
36
|
|
|
34
|
-
CMD ["lib/listen.js"]
|
|
37
|
+
CMD ["--require", "./lib/tracing.js", "./lib/listen.js"]
|
|
@@ -36,7 +36,7 @@ This would be replaced with an external data store in production.
|
|
|
36
36
|
|
|
37
37
|
This project is deployed as a containerised application with [Gantry].
|
|
38
38
|
A typical resource API instance does not require more than 1 vCPU,
|
|
39
|
-
so we
|
|
39
|
+
so we eschew clustering configurations in favour of a single Node.js process per container.
|
|
40
40
|
Under load, we autoscale horizontally in terms of container count up to `autoScaling.maxCount`.
|
|
41
41
|
|
|
42
42
|
Gantry configures [CodeDeploy] for a blue-green deployment approach.
|
|
@@ -11,6 +11,7 @@ env:
|
|
|
11
11
|
AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1'
|
|
12
12
|
|
|
13
13
|
ENVIRONMENT: '{{.Environment}}'
|
|
14
|
+
OPENTELEMETRY_ENABLED: '{{.Values.openTelemetry.enabled | default false}}'
|
|
14
15
|
SERVICE: '{{values "service"}}'
|
|
15
16
|
|
|
16
17
|
{{range $key, $value := .Values.env}}
|
|
@@ -21,6 +22,13 @@ env:
|
|
|
21
22
|
datadogSecretId: '{{values "datadogSecretId"}}'
|
|
22
23
|
{{end}}
|
|
23
24
|
|
|
25
|
+
openTelemetry:
|
|
26
|
+
enabled: {{.Values.openTelemetry.enabled | default false}}
|
|
27
|
+
{{if .Values.isProduction}}
|
|
28
|
+
datadogEnvironmentName: production
|
|
29
|
+
{{else}}
|
|
30
|
+
datadogEnvironmentName: development
|
|
31
|
+
{{end}}
|
|
24
32
|
{{if .Values.pagerDutyEndpoint}}
|
|
25
33
|
pagerDutyEndpoint: '{{values "pagerDutyEndpoint"}}'
|
|
26
34
|
{{end}}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
3
|
"@koa/router": "^10.1.1",
|
|
4
|
+
"@opentelemetry/api": "^1.0.4",
|
|
5
|
+
"@opentelemetry/exporter-collector-grpc": "^0.25.0",
|
|
6
|
+
"@opentelemetry/instrumentation-aws-sdk": "^0.5.0",
|
|
7
|
+
"@opentelemetry/instrumentation-http": "^0.27.0",
|
|
8
|
+
"@opentelemetry/sdk-node": "^0.27.0",
|
|
4
9
|
"@seek/logger": "^5.0.1",
|
|
5
|
-
"
|
|
10
|
+
"aws-sdk": "^2.1039.0",
|
|
6
11
|
"hot-shots": "^9.0.0",
|
|
7
12
|
"koa": "^2.13.4",
|
|
8
13
|
"koa-bodyparser": "^4.3.0",
|
|
@@ -11,6 +16,7 @@
|
|
|
11
16
|
"runtypes-filter": "^0.6.0",
|
|
12
17
|
"seek-datadog-custom-metrics": "^4.0.0",
|
|
13
18
|
"seek-koala": "^5.1.0",
|
|
19
|
+
"skuba-dive": "^1.2.0",
|
|
14
20
|
"uuid": "^8.3.2"
|
|
15
21
|
},
|
|
16
22
|
"devDependencies": {
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenTelemetry tracing initialisation. This is a standalone TS/JS module that is not
|
|
3
|
+
* referenced by application source code directly. It is required at runtime using the
|
|
4
|
+
* node command's `--require` argument, see Dockerfile for details.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { propagation } from '@opentelemetry/api';
|
|
8
|
+
import { CompositePropagator } from '@opentelemetry/core';
|
|
9
|
+
import { CollectorTraceExporter } from '@opentelemetry/exporter-collector-grpc';
|
|
10
|
+
import { AwsInstrumentation } from '@opentelemetry/instrumentation-aws-sdk';
|
|
11
|
+
import { HttpInstrumentation } from '@opentelemetry/instrumentation-http';
|
|
12
|
+
import { B3InjectEncoding, B3Propagator } from '@opentelemetry/propagator-b3';
|
|
13
|
+
import { NodeSDK } from '@opentelemetry/sdk-node';
|
|
14
|
+
|
|
15
|
+
const app = 'opentelemetry';
|
|
16
|
+
const log = (level: string, msg: string, extra = {}) => {
|
|
17
|
+
const toLog = { msg, level, app, time: new Date().toISOString(), ...extra };
|
|
18
|
+
console.log(JSON.stringify(toLog)); // eslint-disable-line no-console
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const main = () => {
|
|
22
|
+
// Use B3 propagation to ensure proper propagation between systems that use
|
|
23
|
+
// OpenTelemetry and native Datadog APM, such as Istio/Envoy.
|
|
24
|
+
propagation.setGlobalPropagator(
|
|
25
|
+
new CompositePropagator({
|
|
26
|
+
propagators: [
|
|
27
|
+
new B3Propagator(),
|
|
28
|
+
new B3Propagator({ injectEncoding: B3InjectEncoding.MULTI_HEADER }),
|
|
29
|
+
],
|
|
30
|
+
}),
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
const sdk = new NodeSDK({
|
|
34
|
+
traceExporter: new CollectorTraceExporter(),
|
|
35
|
+
autoDetectResources: false,
|
|
36
|
+
instrumentations: [new HttpInstrumentation(), new AwsInstrumentation()],
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
sdk
|
|
40
|
+
.start()
|
|
41
|
+
.then(() => log('info', 'OpenTelemetry initialised'))
|
|
42
|
+
.catch((err: Error) =>
|
|
43
|
+
log('error', 'OpenTelemetry not initialised', { err }),
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
process.on('SIGTERM', () => {
|
|
47
|
+
sdk
|
|
48
|
+
.shutdown()
|
|
49
|
+
.then(() => log('info', 'OpenTelemetry successfully terminated'))
|
|
50
|
+
.catch((err: Error) =>
|
|
51
|
+
log('error', 'OpenTelemetry failed to terminate', { err }),
|
|
52
|
+
)
|
|
53
|
+
.finally(() => process.exit(0)); // eslint-disable-line no-process-exit
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
if (process.env.OPENTELEMETRY_ENABLED === 'true') {
|
|
58
|
+
main();
|
|
59
|
+
} else {
|
|
60
|
+
log('info', 'OpenTelemetry not enabled');
|
|
61
|
+
}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
"@types/node": "^14.0.0",
|
|
14
14
|
"chance": "^1.1.8",
|
|
15
15
|
"pino-pretty": "^7.1.0",
|
|
16
|
-
"serverless": "^
|
|
16
|
+
"serverless": "^3.0.0",
|
|
17
17
|
"serverless-plugin-canary-deployments": "^0.7.0",
|
|
18
|
-
"serverless-prune-plugin": "^
|
|
18
|
+
"serverless-prune-plugin": "^2.0.0",
|
|
19
19
|
"skuba": "*"
|
|
20
20
|
},
|
|
21
21
|
"engines": {
|
|
@@ -3,16 +3,17 @@ service: <%- serviceName %>
|
|
|
3
3
|
configValidationMode: error
|
|
4
4
|
variablesResolutionMode: 20210326
|
|
5
5
|
|
|
6
|
+
params:
|
|
7
|
+
default:
|
|
8
|
+
description: <%- description %>
|
|
9
|
+
dev:
|
|
10
|
+
deploymentBucket: 'TODO: deploymentBucketName'
|
|
11
|
+
isProduction: false
|
|
12
|
+
prod:
|
|
13
|
+
deploymentBucket: 'TODO: deploymentBucketName'
|
|
14
|
+
isProduction: true
|
|
15
|
+
|
|
6
16
|
custom:
|
|
7
|
-
description: <%- description %>
|
|
8
|
-
env: ${self:custom.envs.${env:ENVIRONMENT}}
|
|
9
|
-
envs:
|
|
10
|
-
dev:
|
|
11
|
-
deploymentBucket: 'TODO: deploymentBucketName'
|
|
12
|
-
isProduction: false
|
|
13
|
-
prod:
|
|
14
|
-
deploymentBucket: 'TODO: deploymentBucketName'
|
|
15
|
-
isProduction: true
|
|
16
17
|
prune:
|
|
17
18
|
automatic: true
|
|
18
19
|
number: 3
|
|
@@ -22,7 +23,6 @@ plugins:
|
|
|
22
23
|
- serverless-prune-plugin
|
|
23
24
|
|
|
24
25
|
provider:
|
|
25
|
-
lambdaHashingVersion: 20201221
|
|
26
26
|
logRetentionInDays: 30
|
|
27
27
|
name: aws
|
|
28
28
|
region: ap-southeast-2
|
|
@@ -34,7 +34,7 @@ provider:
|
|
|
34
34
|
deploymentBucket:
|
|
35
35
|
# Use a shared account-level bucket for Lambda bundles and other artefacts.
|
|
36
36
|
# This is easier to manage in terms of access, deployment, and tagging.
|
|
37
|
-
name: ${
|
|
37
|
+
name: ${param:deploymentBucket}
|
|
38
38
|
iam:
|
|
39
39
|
role:
|
|
40
40
|
statements:
|
|
@@ -59,7 +59,7 @@ provider:
|
|
|
59
59
|
# https://rfc.skinfra.xyz/RFC019-AWS-Tagging-Standard.html#seekdatatypes
|
|
60
60
|
# seek:data:types:restricted: job-ads
|
|
61
61
|
seek:env:label: ${env:ENVIRONMENT}
|
|
62
|
-
seek:env:production: ${
|
|
62
|
+
seek:env:production: ${param:isProduction}
|
|
63
63
|
seek:owner:team: '<%- teamName %>'
|
|
64
64
|
seek:source:sha: ${env:BUILDKITE_COMMIT, 'na'}
|
|
65
65
|
seek:source:url: 'https://github.com/SEEK-Jobs/<%- repoName %>'
|
|
@@ -74,7 +74,7 @@ functions:
|
|
|
74
74
|
Worker:
|
|
75
75
|
name: ${self:service}
|
|
76
76
|
handler: lib/app.handler
|
|
77
|
-
description: ${
|
|
77
|
+
description: ${param:description}
|
|
78
78
|
memorySize: 128
|
|
79
79
|
reservedConcurrency: 20
|
|
80
80
|
timeout: 30
|
|
@@ -85,6 +85,8 @@ functions:
|
|
|
85
85
|
environment:
|
|
86
86
|
# https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/node-reusing-connections.html
|
|
87
87
|
AWS_NODEJS_CONNECTION_REUSE_ENABLED: 1
|
|
88
|
+
# https://nodejs.org/api/cli.html#cli_node_options_options
|
|
89
|
+
NODE_OPTIONS: --enable-source-maps
|
|
88
90
|
|
|
89
91
|
ENVIRONMENT: ${env:ENVIRONMENT}
|
|
90
92
|
SERVICE: ${self:service}
|
|
@@ -104,12 +106,14 @@ functions:
|
|
|
104
106
|
environment:
|
|
105
107
|
# https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/node-reusing-connections.html
|
|
106
108
|
AWS_NODEJS_CONNECTION_REUSE_ENABLED: 1
|
|
109
|
+
# https://nodejs.org/api/cli.html#cli_node_options_options
|
|
110
|
+
NODE_OPTIONS: --enable-source-maps
|
|
107
111
|
|
|
108
112
|
FUNCTION_NAME_TO_INVOKE: ${self:functions.Worker.name}
|
|
109
113
|
|
|
110
114
|
resources:
|
|
111
115
|
# This becomes the Lambda application's description
|
|
112
|
-
Description: ${
|
|
116
|
+
Description: ${param:description}
|
|
113
117
|
|
|
114
118
|
Resources:
|
|
115
119
|
DeadLetterQueue:
|
|
@@ -49,8 +49,9 @@ const smokeTestLambdaFunction = async (): Promise<Status> => {
|
|
|
49
49
|
InvocationType: 'RequestResponse',
|
|
50
50
|
// Treat an empty object as our smoke test event.
|
|
51
51
|
Payload: '{}',
|
|
52
|
-
//
|
|
53
|
-
|
|
52
|
+
// An unqualified reference implicitly invokes $LATEST, which has been
|
|
53
|
+
// updated to point to the new version when this pre hook runs.
|
|
54
|
+
Qualifier: undefined,
|
|
54
55
|
})
|
|
55
56
|
.promise();
|
|
56
57
|
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`returns expected
|
|
3
|
+
exports[`returns expected CloudFormation stack for dev 1`] = `
|
|
4
4
|
Object {
|
|
5
|
-
"Parameters": Object {
|
|
6
|
-
"AssetParameters...": Object {
|
|
7
|
-
"Description": "Artifact hash for asset...",
|
|
8
|
-
"Type": "String",
|
|
9
|
-
},
|
|
10
|
-
},
|
|
11
5
|
"Resources": Object {
|
|
12
6
|
"kmskey49FBC3B3": Object {
|
|
13
7
|
"DeletionPolicy": "Retain",
|
|
@@ -17,23 +11,7 @@ Object {
|
|
|
17
11
|
"KeyPolicy": Object {
|
|
18
12
|
"Statement": Array [
|
|
19
13
|
Object {
|
|
20
|
-
"Action":
|
|
21
|
-
"kms:Create*",
|
|
22
|
-
"kms:Describe*",
|
|
23
|
-
"kms:Enable*",
|
|
24
|
-
"kms:List*",
|
|
25
|
-
"kms:Put*",
|
|
26
|
-
"kms:Update*",
|
|
27
|
-
"kms:Revoke*",
|
|
28
|
-
"kms:Disable*",
|
|
29
|
-
"kms:Get*",
|
|
30
|
-
"kms:Delete*",
|
|
31
|
-
"kms:ScheduleKeyDeletion",
|
|
32
|
-
"kms:CancelKeyDeletion",
|
|
33
|
-
"kms:GenerateDataKey",
|
|
34
|
-
"kms:TagResource",
|
|
35
|
-
"kms:UntagResource",
|
|
36
|
-
],
|
|
14
|
+
"Action": "kms:*",
|
|
37
15
|
"Effect": "Allow",
|
|
38
16
|
"Principal": Object {
|
|
39
17
|
"AWS": Object {
|
|
@@ -120,19 +98,6 @@ Object {
|
|
|
120
98
|
},
|
|
121
99
|
"Resource": "*",
|
|
122
100
|
},
|
|
123
|
-
Object {
|
|
124
|
-
"Action": "kms:Decrypt",
|
|
125
|
-
"Effect": "Allow",
|
|
126
|
-
"Principal": Object {
|
|
127
|
-
"AWS": Object {
|
|
128
|
-
"Fn::GetAtt": Array [
|
|
129
|
-
"workerServiceRole2130CC7F",
|
|
130
|
-
"Arn",
|
|
131
|
-
],
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
"Resource": "*",
|
|
135
|
-
},
|
|
136
101
|
Object {
|
|
137
102
|
"Action": Array [
|
|
138
103
|
"kms:Decrypt",
|
|
@@ -183,45 +148,14 @@ Object {
|
|
|
183
148
|
"Properties": Object {
|
|
184
149
|
"Code": Object {
|
|
185
150
|
"S3Bucket": Object {
|
|
186
|
-
"
|
|
187
|
-
},
|
|
188
|
-
"S3Key": Object {
|
|
189
|
-
"Fn::Join": Array [
|
|
190
|
-
"",
|
|
191
|
-
Array [
|
|
192
|
-
Object {
|
|
193
|
-
"Fn::Select": Array [
|
|
194
|
-
0,
|
|
195
|
-
Object {
|
|
196
|
-
"Fn::Split": Array [
|
|
197
|
-
"||",
|
|
198
|
-
Object {
|
|
199
|
-
"Ref": "AssetParameters...",
|
|
200
|
-
},
|
|
201
|
-
],
|
|
202
|
-
},
|
|
203
|
-
],
|
|
204
|
-
},
|
|
205
|
-
Object {
|
|
206
|
-
"Fn::Select": Array [
|
|
207
|
-
1,
|
|
208
|
-
Object {
|
|
209
|
-
"Fn::Split": Array [
|
|
210
|
-
"||",
|
|
211
|
-
Object {
|
|
212
|
-
"Ref": "AssetParameters...",
|
|
213
|
-
},
|
|
214
|
-
],
|
|
215
|
-
},
|
|
216
|
-
],
|
|
217
|
-
},
|
|
218
|
-
],
|
|
219
|
-
],
|
|
151
|
+
"Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}",
|
|
220
152
|
},
|
|
153
|
+
"S3Key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.zip",
|
|
221
154
|
},
|
|
222
155
|
"Environment": Object {
|
|
223
156
|
"Variables": Object {
|
|
224
157
|
"AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
|
|
158
|
+
"NODE_OPTIONS": "--enable-source-maps",
|
|
225
159
|
"SOMETHING": "dev",
|
|
226
160
|
},
|
|
227
161
|
},
|
|
@@ -421,14 +355,8 @@ Object {
|
|
|
421
355
|
}
|
|
422
356
|
`;
|
|
423
357
|
|
|
424
|
-
exports[`returns expected
|
|
358
|
+
exports[`returns expected CloudFormation stack for prod 1`] = `
|
|
425
359
|
Object {
|
|
426
|
-
"Parameters": Object {
|
|
427
|
-
"AssetParameters...": Object {
|
|
428
|
-
"Description": "Artifact hash for asset...",
|
|
429
|
-
"Type": "String",
|
|
430
|
-
},
|
|
431
|
-
},
|
|
432
360
|
"Resources": Object {
|
|
433
361
|
"kmskey49FBC3B3": Object {
|
|
434
362
|
"DeletionPolicy": "Retain",
|
|
@@ -438,23 +366,7 @@ Object {
|
|
|
438
366
|
"KeyPolicy": Object {
|
|
439
367
|
"Statement": Array [
|
|
440
368
|
Object {
|
|
441
|
-
"Action":
|
|
442
|
-
"kms:Create*",
|
|
443
|
-
"kms:Describe*",
|
|
444
|
-
"kms:Enable*",
|
|
445
|
-
"kms:List*",
|
|
446
|
-
"kms:Put*",
|
|
447
|
-
"kms:Update*",
|
|
448
|
-
"kms:Revoke*",
|
|
449
|
-
"kms:Disable*",
|
|
450
|
-
"kms:Get*",
|
|
451
|
-
"kms:Delete*",
|
|
452
|
-
"kms:ScheduleKeyDeletion",
|
|
453
|
-
"kms:CancelKeyDeletion",
|
|
454
|
-
"kms:GenerateDataKey",
|
|
455
|
-
"kms:TagResource",
|
|
456
|
-
"kms:UntagResource",
|
|
457
|
-
],
|
|
369
|
+
"Action": "kms:*",
|
|
458
370
|
"Effect": "Allow",
|
|
459
371
|
"Principal": Object {
|
|
460
372
|
"AWS": Object {
|
|
@@ -541,19 +453,6 @@ Object {
|
|
|
541
453
|
},
|
|
542
454
|
"Resource": "*",
|
|
543
455
|
},
|
|
544
|
-
Object {
|
|
545
|
-
"Action": "kms:Decrypt",
|
|
546
|
-
"Effect": "Allow",
|
|
547
|
-
"Principal": Object {
|
|
548
|
-
"AWS": Object {
|
|
549
|
-
"Fn::GetAtt": Array [
|
|
550
|
-
"workerServiceRole2130CC7F",
|
|
551
|
-
"Arn",
|
|
552
|
-
],
|
|
553
|
-
},
|
|
554
|
-
},
|
|
555
|
-
"Resource": "*",
|
|
556
|
-
},
|
|
557
456
|
Object {
|
|
558
457
|
"Action": Array [
|
|
559
458
|
"kms:Decrypt",
|
|
@@ -604,45 +503,14 @@ Object {
|
|
|
604
503
|
"Properties": Object {
|
|
605
504
|
"Code": Object {
|
|
606
505
|
"S3Bucket": Object {
|
|
607
|
-
"
|
|
608
|
-
},
|
|
609
|
-
"S3Key": Object {
|
|
610
|
-
"Fn::Join": Array [
|
|
611
|
-
"",
|
|
612
|
-
Array [
|
|
613
|
-
Object {
|
|
614
|
-
"Fn::Select": Array [
|
|
615
|
-
0,
|
|
616
|
-
Object {
|
|
617
|
-
"Fn::Split": Array [
|
|
618
|
-
"||",
|
|
619
|
-
Object {
|
|
620
|
-
"Ref": "AssetParameters...",
|
|
621
|
-
},
|
|
622
|
-
],
|
|
623
|
-
},
|
|
624
|
-
],
|
|
625
|
-
},
|
|
626
|
-
Object {
|
|
627
|
-
"Fn::Select": Array [
|
|
628
|
-
1,
|
|
629
|
-
Object {
|
|
630
|
-
"Fn::Split": Array [
|
|
631
|
-
"||",
|
|
632
|
-
Object {
|
|
633
|
-
"Ref": "AssetParameters...",
|
|
634
|
-
},
|
|
635
|
-
],
|
|
636
|
-
},
|
|
637
|
-
],
|
|
638
|
-
},
|
|
639
|
-
],
|
|
640
|
-
],
|
|
506
|
+
"Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}",
|
|
641
507
|
},
|
|
508
|
+
"S3Key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.zip",
|
|
642
509
|
},
|
|
643
510
|
"Environment": Object {
|
|
644
511
|
"Variables": Object {
|
|
645
512
|
"AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
|
|
513
|
+
"NODE_OPTIONS": "--enable-source-maps",
|
|
646
514
|
"SOMETHING": "prod",
|
|
647
515
|
},
|
|
648
516
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SynthUtils } from '@aws-cdk/assert';
|
|
2
|
-
import { App } from '
|
|
2
|
+
import { App } from 'aws-cdk-lib';
|
|
3
3
|
|
|
4
4
|
import cdkJson from '../cdk.json';
|
|
5
5
|
|
|
@@ -17,13 +17,18 @@ const contexts = [
|
|
|
17
17
|
},
|
|
18
18
|
];
|
|
19
19
|
|
|
20
|
-
it.each(contexts)(
|
|
21
|
-
|
|
20
|
+
it.each(contexts)(
|
|
21
|
+
'returns expected CloudFormation stack for $stage',
|
|
22
|
+
(context) => {
|
|
23
|
+
const app = new App({ context });
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
const stack = new AppStack(app, 'appStack');
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
const json = JSON.stringify(SynthUtils.toCloudFormation(stack)).replace(
|
|
28
|
+
/"S3Key":"([0-9a-f]+)\.zip"/g,
|
|
29
|
+
(_, hash) => `"S3Key":"${'x'.repeat(hash.length)}.zip"`,
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
expect(JSON.parse(json)).toMatchSnapshot();
|
|
33
|
+
},
|
|
34
|
+
);
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import {
|
|
2
|
+
Stack,
|
|
3
|
+
StackProps,
|
|
4
|
+
aws_iam,
|
|
5
|
+
aws_kms,
|
|
6
|
+
aws_lambda,
|
|
7
|
+
aws_lambda_event_sources,
|
|
8
|
+
aws_sns,
|
|
9
|
+
aws_sns_subscriptions,
|
|
10
|
+
aws_sqs,
|
|
11
|
+
} from 'aws-cdk-lib';
|
|
12
|
+
import type { Construct } from 'constructs';
|
|
9
13
|
|
|
10
14
|
import { envContext, stageContext } from '../shared/context-types';
|
|
11
15
|
|
|
@@ -16,9 +20,9 @@ export class AppStack extends Stack {
|
|
|
16
20
|
const stage = stageContext.check(this.node.tryGetContext('stage'));
|
|
17
21
|
const context = envContext.check(this.node.tryGetContext(stage));
|
|
18
22
|
|
|
19
|
-
const accountPrincipal = new AccountPrincipal(this.account);
|
|
23
|
+
const accountPrincipal = new aws_iam.AccountPrincipal(this.account);
|
|
20
24
|
|
|
21
|
-
const kmsKey = new Key(this, 'kms-key', {
|
|
25
|
+
const kmsKey = new aws_kms.Key(this, 'kms-key', {
|
|
22
26
|
description: '<%- serviceName %>',
|
|
23
27
|
enableKeyRotation: true,
|
|
24
28
|
admins: [accountPrincipal],
|
|
@@ -27,17 +31,17 @@ export class AppStack extends Stack {
|
|
|
27
31
|
|
|
28
32
|
kmsKey.grantEncrypt(accountPrincipal);
|
|
29
33
|
|
|
30
|
-
const topic = new Topic(this, 'topic', {
|
|
34
|
+
const topic = new aws_sns.Topic(this, 'topic', {
|
|
31
35
|
topicName: '<%- serviceName %>',
|
|
32
36
|
masterKey: kmsKey,
|
|
33
37
|
});
|
|
34
38
|
|
|
35
|
-
const deadLetterQueue = new Queue(this, 'worker-queue-dlq', {
|
|
39
|
+
const deadLetterQueue = new aws_sqs.Queue(this, 'worker-queue-dlq', {
|
|
36
40
|
queueName: '<%- serviceName %>-dlq',
|
|
37
41
|
encryptionMasterKey: kmsKey,
|
|
38
42
|
});
|
|
39
43
|
|
|
40
|
-
const queue = new Queue(this, 'worker-queue', {
|
|
44
|
+
const queue = new aws_sqs.Queue(this, 'worker-queue', {
|
|
41
45
|
queueName: '<%- serviceName %>',
|
|
42
46
|
deadLetterQueue: {
|
|
43
47
|
maxReceiveCount: 3,
|
|
@@ -46,20 +50,23 @@ export class AppStack extends Stack {
|
|
|
46
50
|
encryptionMasterKey: kmsKey,
|
|
47
51
|
});
|
|
48
52
|
|
|
49
|
-
const worker = new Function(this, 'worker', {
|
|
50
|
-
code: new AssetCode('./lib'),
|
|
51
|
-
runtime: Runtime.NODEJS_14_X,
|
|
53
|
+
const worker = new aws_lambda.Function(this, 'worker', {
|
|
54
|
+
code: new aws_lambda.AssetCode('./lib'),
|
|
55
|
+
runtime: aws_lambda.Runtime.NODEJS_14_X,
|
|
52
56
|
handler: 'app.handler',
|
|
53
57
|
functionName: '<%- serviceName %>',
|
|
54
58
|
environmentEncryption: kmsKey,
|
|
55
59
|
environment: {
|
|
60
|
+
// https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/node-reusing-connections.html
|
|
56
61
|
AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1',
|
|
62
|
+
// https://nodejs.org/api/cli.html#cli_node_options_options
|
|
63
|
+
NODE_OPTIONS: '--enable-source-maps',
|
|
57
64
|
...context.workerLambda.environment,
|
|
58
65
|
},
|
|
59
66
|
});
|
|
60
67
|
|
|
61
|
-
worker.addEventSource(new SqsEventSource(queue));
|
|
68
|
+
worker.addEventSource(new aws_lambda_event_sources.SqsEventSource(queue));
|
|
62
69
|
|
|
63
|
-
topic.addSubscription(new SqsSubscription(queue));
|
|
70
|
+
topic.addSubscription(new aws_sns_subscriptions.SqsSubscription(queue));
|
|
64
71
|
}
|
|
65
72
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { App } from '@aws-cdk/core';
|
|
1
|
+
import { App } from 'aws-cdk-lib';
|
|
3
2
|
|
|
4
3
|
import { globalContext } from '../shared/context-types';
|
|
5
4
|
|
|
@@ -9,6 +8,7 @@ const app = new App();
|
|
|
9
8
|
|
|
10
9
|
const context = globalContext.check(app.node.tryGetContext('global'));
|
|
11
10
|
|
|
11
|
+
// eslint-disable-next-line no-new
|
|
12
12
|
new AppStack(app, 'appStack', {
|
|
13
13
|
stackName: context.appName,
|
|
14
14
|
});
|
|
@@ -4,30 +4,29 @@
|
|
|
4
4
|
"runtypes": "^6.3.2"
|
|
5
5
|
},
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@aws-cdk/assert": "^
|
|
8
|
-
"@aws-cdk/aws-iam": "^1.118.0",
|
|
9
|
-
"@aws-cdk/aws-kms": "^1.118.0",
|
|
10
|
-
"@aws-cdk/aws-lambda": "^1.118.0",
|
|
11
|
-
"@aws-cdk/aws-lambda-event-sources": "^1.118.0",
|
|
12
|
-
"@aws-cdk/aws-sns": "^1.118.0",
|
|
13
|
-
"@aws-cdk/aws-sns-subscriptions": "^1.118.0",
|
|
14
|
-
"@aws-cdk/aws-sqs": "^1.118.0",
|
|
15
|
-
"@aws-cdk/core": "^1.118.0",
|
|
7
|
+
"@aws-cdk/assert": "^2.3.0",
|
|
16
8
|
"@types/aws-lambda": "^8.10.82",
|
|
17
9
|
"@types/node": "^14.0.0",
|
|
18
|
-
"aws-cdk": "^
|
|
19
|
-
"
|
|
10
|
+
"aws-cdk": "^2.3.0",
|
|
11
|
+
"aws-cdk-lib": "^2.3.0",
|
|
12
|
+
"constructs": "^10.0.17"
|
|
20
13
|
},
|
|
21
14
|
"license": "UNLICENSED",
|
|
22
15
|
"private": true,
|
|
23
16
|
"scripts": {
|
|
24
17
|
"build": "skuba build",
|
|
25
|
-
"deploy": "cdk deploy appStack --require-approval never --context stage=${ENVIRONMENT}",
|
|
18
|
+
"deploy": "cdk deploy appStack --require-approval never --context stage=${ENVIRONMENT} --progress events",
|
|
26
19
|
"format": "skuba format",
|
|
27
20
|
"lint": "skuba lint",
|
|
28
21
|
"package": "yarn install --ignore-optional --ignore-scripts --modules-folder ./lib/node_modules --non-interactive --offline --production",
|
|
29
22
|
"test": "skuba test",
|
|
30
23
|
"test:ci": "skuba test --coverage",
|
|
31
24
|
"test:watch": "skuba test --watch"
|
|
25
|
+
},
|
|
26
|
+
"skuba": {
|
|
27
|
+
"entryPoint": "src/app.ts#handler",
|
|
28
|
+
"template": "lambda-sqs-worker-cdk",
|
|
29
|
+
"type": "application",
|
|
30
|
+
"version": "3.16.2"
|
|
32
31
|
}
|
|
33
32
|
}
|