skuba 4.2.0-beta.6 → 4.2.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 +1 -1
- package/lib/api/buildkite/annotate.js +8 -19
- package/lib/api/buildkite/annotate.js.map +1 -1
- package/lib/api/git/commit.js +6 -17
- package/lib/api/git/commit.js.map +1 -1
- package/lib/api/git/commitAllChanges.js +4 -13
- package/lib/api/git/commitAllChanges.js.map +1 -1
- package/lib/api/git/currentBranch.js +5 -14
- package/lib/api/git/currentBranch.js.map +1 -1
- package/lib/api/git/getChangedFiles.js +3 -12
- package/lib/api/git/getChangedFiles.js.map +1 -1
- package/lib/api/git/log.js +7 -17
- package/lib/api/git/log.js.map +1 -1
- package/lib/api/git/push.js +7 -19
- package/lib/api/git/push.js.map +1 -1
- package/lib/api/git/remote.js +5 -14
- package/lib/api/git/remote.js.map +1 -1
- package/lib/api/git/reset.js +6 -15
- package/lib/api/git/reset.js.map +1 -1
- package/lib/api/github/checkRun.js +4 -13
- package/lib/api/github/checkRun.js.map +1 -1
- package/lib/api/github/environment.js +2 -3
- package/lib/api/github/environment.js.map +1 -1
- package/lib/api/github/issueComment.js +15 -28
- package/lib/api/github/issueComment.js.map +1 -1
- package/lib/api/github/pullRequest.js +8 -17
- package/lib/api/github/pullRequest.js.map +1 -1
- package/lib/api/jest/index.d.ts +26 -11
- package/lib/api/net/compose.js +3 -12
- package/lib/api/net/compose.js.map +1 -1
- package/lib/api/net/socket.js +30 -43
- package/lib/api/net/socket.js.map +1 -1
- package/lib/api/net/waitFor.js +4 -13
- package/lib/api/net/waitFor.js.map +1 -1
- package/lib/cli/adapter/eslint.d.ts +2 -1
- package/lib/cli/adapter/eslint.js +10 -15
- package/lib/cli/adapter/eslint.js.map +1 -1
- package/lib/cli/adapter/prettier.js +12 -24
- package/lib/cli/adapter/prettier.js.map +1 -1
- package/lib/cli/build/tsc.js +2 -11
- package/lib/cli/build/tsc.js.map +1 -1
- package/lib/cli/configure/analyseConfiguration.js +7 -16
- package/lib/cli/configure/analyseConfiguration.js.map +1 -1
- package/lib/cli/configure/analyseDependencies.js +22 -28
- package/lib/cli/configure/analyseDependencies.js.map +1 -1
- package/lib/cli/configure/analysis/files.js +3 -12
- package/lib/cli/configure/analysis/files.js.map +1 -1
- package/lib/cli/configure/analysis/git.js +4 -13
- package/lib/cli/configure/analysis/git.js.map +1 -1
- package/lib/cli/configure/analysis/package.js +7 -13
- package/lib/cli/configure/analysis/package.js.map +1 -1
- package/lib/cli/configure/analysis/project.js +13 -23
- package/lib/cli/configure/analysis/project.js.map +1 -1
- package/lib/cli/configure/ensureTemplateCompletion.js +6 -15
- package/lib/cli/configure/ensureTemplateCompletion.js.map +1 -1
- package/lib/cli/configure/getEntryPoint.js +3 -12
- package/lib/cli/configure/getEntryPoint.js.map +1 -1
- package/lib/cli/configure/getProjectType.js +3 -13
- package/lib/cli/configure/getProjectType.js.map +1 -1
- package/lib/cli/configure/index.js +21 -30
- package/lib/cli/configure/index.js.map +1 -1
- package/lib/cli/configure/modules/eslint.js +10 -29
- package/lib/cli/configure/modules/eslint.js.map +1 -1
- package/lib/cli/configure/modules/ignore.js +3 -12
- package/lib/cli/configure/modules/ignore.js.map +1 -1
- package/lib/cli/configure/modules/jest.js +14 -33
- package/lib/cli/configure/modules/jest.js.map +1 -1
- package/lib/cli/configure/modules/package.js +21 -21
- package/lib/cli/configure/modules/package.js.map +1 -1
- package/lib/cli/configure/modules/prettier.js +9 -28
- package/lib/cli/configure/modules/prettier.js.map +1 -1
- package/lib/cli/configure/modules/renovate.js +13 -30
- package/lib/cli/configure/modules/renovate.js.map +1 -1
- package/lib/cli/configure/modules/skubaDive.js +7 -5
- package/lib/cli/configure/modules/skubaDive.js.map +1 -1
- package/lib/cli/configure/modules/tsconfig.js +12 -18
- package/lib/cli/configure/modules/tsconfig.js.map +1 -1
- package/lib/cli/configure/processing/json.js +1 -1
- package/lib/cli/configure/processing/json.js.map +1 -1
- package/lib/cli/configure/processing/package.js +5 -5
- package/lib/cli/configure/processing/package.js.map +1 -1
- package/lib/cli/configure/processing/prettier.js +4 -1
- package/lib/cli/configure/processing/prettier.js.map +1 -1
- package/lib/cli/configure/processing/typescript.js +4 -7
- package/lib/cli/configure/processing/typescript.js.map +1 -1
- package/lib/cli/configure/refreshIgnoreFiles.js +13 -21
- package/lib/cli/configure/refreshIgnoreFiles.js.map +1 -1
- package/lib/cli/format.js +5 -14
- package/lib/cli/format.js.map +1 -1
- package/lib/cli/help.js +3 -12
- package/lib/cli/help.js.map +1 -1
- package/lib/cli/init/getConfig.js +63 -56
- package/lib/cli/init/getConfig.js.map +1 -1
- package/lib/cli/init/git.js +9 -18
- package/lib/cli/init/git.js.map +1 -1
- package/lib/cli/init/index.js +14 -23
- package/lib/cli/init/index.js.map +1 -1
- package/lib/cli/init/prompts.js +3 -12
- package/lib/cli/init/prompts.js.map +1 -1
- package/lib/cli/init/types.js +7 -2
- package/lib/cli/init/types.js.map +1 -1
- package/lib/cli/init/writePackageJson.js +5 -14
- package/lib/cli/init/writePackageJson.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/index.js +3 -12
- package/lib/cli/lint/annotate/buildkite/index.js.map +1 -1
- package/lib/cli/lint/annotate/github/eslint.js +10 -2
- package/lib/cli/lint/annotate/github/eslint.js.map +1 -1
- package/lib/cli/lint/annotate/github/index.js +3 -12
- package/lib/cli/lint/annotate/github/index.js.map +1 -1
- package/lib/cli/lint/annotate/github/tsc.js +1 -1
- package/lib/cli/lint/annotate/github/tsc.js.map +1 -1
- package/lib/cli/lint/annotate/index.js +3 -12
- package/lib/cli/lint/annotate/index.js.map +1 -1
- package/lib/cli/lint/autofix.d.ts +7 -1
- package/lib/cli/lint/autofix.js +26 -27
- package/lib/cli/lint/autofix.js.map +1 -1
- package/lib/cli/lint/external.js +37 -59
- package/lib/cli/lint/external.js.map +1 -1
- package/lib/cli/lint/index.js +5 -14
- package/lib/cli/lint/index.js.map +1 -1
- package/lib/cli/lint/internal.js +7 -16
- package/lib/cli/lint/internal.js.map +1 -1
- package/lib/cli/lint/tsc.js +4 -13
- package/lib/cli/lint/tsc.js.map +1 -1
- package/lib/cli/node.js +3 -12
- package/lib/cli/node.js.map +1 -1
- package/lib/cli/release.js +3 -12
- package/lib/cli/release.js.map +1 -1
- package/lib/cli/start.js +4 -14
- package/lib/cli/start.js.map +1 -1
- package/lib/cli/test/index.js +1 -2
- package/lib/cli/test/index.js.map +1 -1
- package/lib/cli/test/reporters/github/annotations.js +7 -7
- package/lib/cli/test/reporters/github/annotations.js.map +1 -1
- package/lib/cli/test/reporters/github/index.d.ts +2 -2
- package/lib/cli/test/reporters/github/index.js +37 -37
- package/lib/cli/test/reporters/github/index.js.map +1 -1
- package/lib/cli/version.js +3 -12
- package/lib/cli/version.js.map +1 -1
- package/lib/skuba.js +3 -12
- package/lib/skuba.js.map +1 -1
- package/lib/utils/args.d.ts +1 -1
- package/lib/utils/args.js +7 -11
- package/lib/utils/args.js.map +1 -1
- package/lib/utils/command.d.ts +1 -1
- package/lib/utils/command.js +0 -1
- package/lib/utils/command.js.map +1 -1
- package/lib/utils/copy.js +11 -20
- package/lib/utils/copy.js.map +1 -1
- package/lib/utils/dir.js +9 -18
- package/lib/utils/dir.js.map +1 -1
- package/lib/utils/error.d.ts +14 -0
- package/lib/utils/error.js +16 -2
- package/lib/utils/error.js.map +1 -1
- package/lib/utils/exec.js +25 -29
- package/lib/utils/exec.js.map +1 -1
- package/lib/utils/logo.js +4 -14
- package/lib/utils/logo.js.map +1 -1
- package/lib/utils/manifest.js +6 -15
- package/lib/utils/manifest.js.map +1 -1
- package/lib/utils/version.js +12 -22
- package/lib/utils/version.js.map +1 -1
- package/lib/utils/wait.d.ts +17 -0
- package/lib/utils/wait.js +32 -0
- package/lib/utils/wait.js.map +1 -0
- package/lib/utils/worker.js +4 -12
- package/lib/utils/worker.js.map +1 -1
- package/lib/wrapper/functionHandler.js +2 -11
- package/lib/wrapper/functionHandler.js.map +1 -1
- package/lib/wrapper/http.js +6 -15
- package/lib/wrapper/http.js.map +1 -1
- package/lib/wrapper/main.js +2 -11
- package/lib/wrapper/main.js.map +1 -1
- package/lib/wrapper/requestListener.js +3 -13
- package/lib/wrapper/requestListener.js.map +1 -1
- package/package.json +19 -29
- package/template/base/tsconfig.json +2 -1
- package/template/express-rest-api/.buildkite/pipeline.yml +5 -4
- package/template/express-rest-api/Dockerfile +3 -3
- package/template/greeter/.buildkite/pipeline.yml +2 -1
- package/template/koa-rest-api/.buildkite/pipeline.yml +5 -4
- package/template/koa-rest-api/Dockerfile +3 -3
- package/template/koa-rest-api/package.json +5 -5
- package/template/koa-rest-api/src/api/jobs/getJobs.ts +2 -2
- package/template/koa-rest-api/src/api/jobs/postJob.ts +2 -2
- package/template/koa-rest-api/src/framework/logging.ts +8 -5
- package/template/koa-rest-api/src/framework/metrics.ts +2 -2
- package/template/koa-rest-api/src/framework/server.test.ts +21 -21
- package/template/koa-rest-api/src/framework/server.ts +4 -3
- package/template/koa-rest-api/src/listen.ts +2 -2
- package/template/koa-rest-api/src/testing/logging.ts +5 -20
- package/template/lambda-sqs-worker/.buildkite/pipeline.yml +2 -1
- package/template/lambda-sqs-worker/.nvmrc +1 -1
- package/template/lambda-sqs-worker/Dockerfile +1 -1
- package/template/lambda-sqs-worker/package.json +4 -4
- package/template/lambda-sqs-worker/serverless.yml +2 -2
- package/template/lambda-sqs-worker/src/app.test.ts +9 -9
- package/template/lambda-sqs-worker/src/app.ts +2 -1
- package/template/lambda-sqs-worker/src/framework/handler.test.ts +10 -10
- package/template/lambda-sqs-worker/src/framework/handler.ts +14 -17
- package/template/lambda-sqs-worker/src/framework/logging.ts +11 -6
- package/template/lambda-sqs-worker/src/testing/logging.ts +7 -5
- package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +2 -1
- package/template/lambda-sqs-worker-cdk/.nvmrc +1 -1
- package/template/lambda-sqs-worker-cdk/Dockerfile +1 -1
- package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +2 -2
- package/template/lambda-sqs-worker-cdk/infra/appStack.ts +1 -1
- package/template/lambda-sqs-worker-cdk/package.json +9 -11
- package/template/oss-npm-package/tsconfig.json +2 -1
- package/template/private-npm-package/.buildkite/pipeline.yml +1 -1
- package/template/private-npm-package/tsconfig.json +2 -1
- package/lib/cli/changesets/coreAdapter.d.ts +0 -9
- package/lib/cli/changesets/coreAdapter.js +0 -19
- package/lib/cli/changesets/coreAdapter.js.map +0 -1
- package/lib/cli/changesets/gitUtils.d.ts +0 -17
- package/lib/cli/changesets/gitUtils.js +0 -128
- package/lib/cli/changesets/gitUtils.js.map +0 -1
- package/lib/cli/changesets/githubAdapter.d.ts +0 -3
- package/lib/cli/changesets/githubAdapter.js +0 -8
- package/lib/cli/changesets/githubAdapter.js.map +0 -1
- package/lib/cli/changesets/index.d.ts +0 -1
- package/lib/cli/changesets/index.js +0 -94
- package/lib/cli/changesets/index.js.map +0 -1
- package/lib/cli/changesets/readChangesetState.d.ts +0 -6
- package/lib/cli/changesets/readChangesetState.js +0 -34
- package/lib/cli/changesets/readChangesetState.js.map +0 -1
- package/lib/cli/changesets/run.d.ts +0 -22
- package/lib/cli/changesets/run.js +0 -196
- package/lib/cli/changesets/run.js.map +0 -1
- package/lib/cli/changesets/utils.d.ts +0 -30
- package/lib/cli/changesets/utils.js +0 -130
- package/lib/cli/changesets/utils.js.map +0 -1
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"@types/aws-lambda": "^8.10.84",
|
|
12
12
|
"@types/chance": "^1.1.3",
|
|
13
|
-
"@types/node": "^
|
|
13
|
+
"@types/node": "^16.0.0",
|
|
14
14
|
"chance": "^1.1.8",
|
|
15
15
|
"pino-pretty": "^7.1.0",
|
|
16
|
-
"serverless": "^3.
|
|
17
|
-
"serverless-plugin-canary-deployments": "^0.
|
|
16
|
+
"serverless": "^3.17.0",
|
|
17
|
+
"serverless-plugin-canary-deployments": "^0.8.0",
|
|
18
18
|
"serverless-prune-plugin": "^2.0.0",
|
|
19
19
|
"skuba": "*"
|
|
20
20
|
},
|
|
21
21
|
"engines": {
|
|
22
|
-
"node": ">=
|
|
22
|
+
"node": ">=16"
|
|
23
23
|
},
|
|
24
24
|
"license": "UNLICENSED",
|
|
25
25
|
"private": true,
|
|
@@ -25,11 +25,11 @@ provider:
|
|
|
25
25
|
logRetentionInDays: 30
|
|
26
26
|
name: aws
|
|
27
27
|
region: ap-southeast-2
|
|
28
|
-
runtime:
|
|
28
|
+
runtime: nodejs16.x
|
|
29
29
|
architecture: arm64
|
|
30
|
+
deploymentMethod: direct
|
|
30
31
|
stackName: ${self:service}
|
|
31
32
|
stage: ${env:ENVIRONMENT}
|
|
32
|
-
versionFunctions: true
|
|
33
33
|
deploymentBucket:
|
|
34
34
|
# Use a shared account-level bucket for Lambda bundles and other artefacts.
|
|
35
35
|
# This is easier to manage in terms of access, deployment, and tagging.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { metricsClient } from 'src/framework/metrics';
|
|
2
2
|
import { createCtx, createSqsEvent } from 'src/testing/handler';
|
|
3
|
-
import {
|
|
3
|
+
import { logger } from 'src/testing/logging';
|
|
4
4
|
import { scoringService, sns } from 'src/testing/services';
|
|
5
5
|
import { chance, mockJobPublishedEvent } from 'src/testing/types';
|
|
6
6
|
|
|
@@ -19,7 +19,7 @@ describe('handler', () => {
|
|
|
19
19
|
|
|
20
20
|
const increment = jest.spyOn(metricsClient, 'increment').mockReturnValue();
|
|
21
21
|
|
|
22
|
-
beforeAll(
|
|
22
|
+
beforeAll(logger.spy);
|
|
23
23
|
beforeAll(scoringService.spy);
|
|
24
24
|
beforeAll(sns.spy);
|
|
25
25
|
|
|
@@ -31,7 +31,7 @@ describe('handler', () => {
|
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
afterEach(() => {
|
|
34
|
-
|
|
34
|
+
logger.clear();
|
|
35
35
|
increment.mockClear();
|
|
36
36
|
scoringService.clear();
|
|
37
37
|
sns.clear();
|
|
@@ -44,9 +44,9 @@ describe('handler', () => {
|
|
|
44
44
|
|
|
45
45
|
expect(scoringService.request).toBeCalledTimes(1);
|
|
46
46
|
|
|
47
|
-
expect(
|
|
47
|
+
expect(logger.error).not.toBeCalled();
|
|
48
48
|
|
|
49
|
-
expect(
|
|
49
|
+
expect(logger.info.mock.calls).toEqual([
|
|
50
50
|
[{ count: 1 }, 'received jobs'],
|
|
51
51
|
[{ snsMessageId: expect.any(String) }, 'scored job'],
|
|
52
52
|
['request'],
|
|
@@ -75,7 +75,7 @@ describe('handler', () => {
|
|
|
75
75
|
|
|
76
76
|
await expect(app.handler(event, ctx)).rejects.toThrow('invoke error');
|
|
77
77
|
|
|
78
|
-
expect(
|
|
78
|
+
expect(logger.error).toBeCalledWith({ err }, 'request');
|
|
79
79
|
});
|
|
80
80
|
|
|
81
81
|
it('bubbles up SNS error', async () => {
|
|
@@ -87,7 +87,7 @@ describe('handler', () => {
|
|
|
87
87
|
|
|
88
88
|
await expect(app.handler(event, ctx)).rejects.toThrow('invoke error');
|
|
89
89
|
|
|
90
|
-
expect(
|
|
90
|
+
expect(logger.error).toBeCalledWith({ err }, 'request');
|
|
91
91
|
});
|
|
92
92
|
|
|
93
93
|
it('throws on zero records', async () => {
|
|
@@ -97,7 +97,7 @@ describe('handler', () => {
|
|
|
97
97
|
|
|
98
98
|
await expect(app.handler(event, ctx)).rejects.toThrow('invoke error');
|
|
99
99
|
|
|
100
|
-
expect(
|
|
100
|
+
expect(logger.error).toBeCalledWith({ err }, 'request');
|
|
101
101
|
});
|
|
102
102
|
|
|
103
103
|
it('throws on multiple records', async () => {
|
|
@@ -110,6 +110,6 @@ describe('handler', () => {
|
|
|
110
110
|
|
|
111
111
|
await expect(app.handler(event, ctx)).rejects.toThrow('invoke error');
|
|
112
112
|
|
|
113
|
-
expect(
|
|
113
|
+
expect(logger.error).toBeCalledWith({ err }, 'request');
|
|
114
114
|
});
|
|
115
115
|
});
|
|
@@ -3,6 +3,7 @@ import 'skuba-dive/register';
|
|
|
3
3
|
import { SQSEvent } from 'aws-lambda';
|
|
4
4
|
|
|
5
5
|
import { createHandler } from 'src/framework/handler';
|
|
6
|
+
import { logger } from 'src/framework/logging';
|
|
6
7
|
import { metricsClient } from 'src/framework/metrics';
|
|
7
8
|
import { validateJson } from 'src/framework/validation';
|
|
8
9
|
import { scoreJobPublishedEvent, scoringService } from 'src/services/jobScorer';
|
|
@@ -16,7 +17,7 @@ const smokeTest = async () => {
|
|
|
16
17
|
await Promise.all([scoringService.smokeTest(), sendPipelineEvent({}, true)]);
|
|
17
18
|
};
|
|
18
19
|
|
|
19
|
-
export const handler = createHandler<SQSEvent>(async (event
|
|
20
|
+
export const handler = createHandler<SQSEvent>(async (event) => {
|
|
20
21
|
// Treat an empty object as our smoke test event.
|
|
21
22
|
if (!Object.keys(event).length) {
|
|
22
23
|
logger.info('received smoke test request');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createCtx } from 'src/testing/handler';
|
|
2
|
-
import {
|
|
2
|
+
import { logger } from 'src/testing/logging';
|
|
3
3
|
import { chance } from 'src/testing/types';
|
|
4
4
|
|
|
5
5
|
import { createHandler } from './handler';
|
|
@@ -8,14 +8,14 @@ describe('createHandler', () => {
|
|
|
8
8
|
const ctx = createCtx();
|
|
9
9
|
const input = chance.paragraph();
|
|
10
10
|
|
|
11
|
-
beforeAll(
|
|
11
|
+
beforeAll(logger.spy);
|
|
12
12
|
|
|
13
|
-
afterEach(
|
|
13
|
+
afterEach(logger.clear);
|
|
14
14
|
|
|
15
15
|
it('handles happy path', async () => {
|
|
16
16
|
const output = chance.paragraph();
|
|
17
17
|
|
|
18
|
-
const handler = createHandler((event
|
|
18
|
+
const handler = createHandler((event) => {
|
|
19
19
|
expect(event).toBe(input);
|
|
20
20
|
|
|
21
21
|
logger.info('hello from handler');
|
|
@@ -25,9 +25,9 @@ describe('createHandler', () => {
|
|
|
25
25
|
|
|
26
26
|
await expect(handler(input, ctx)).resolves.toBe(output);
|
|
27
27
|
|
|
28
|
-
expect(
|
|
28
|
+
expect(logger.error).not.toBeCalled();
|
|
29
29
|
|
|
30
|
-
expect(
|
|
30
|
+
expect(logger.info.mock.calls).toEqual([
|
|
31
31
|
['hello from handler'],
|
|
32
32
|
['request'],
|
|
33
33
|
]);
|
|
@@ -40,9 +40,9 @@ describe('createHandler', () => {
|
|
|
40
40
|
|
|
41
41
|
await expect(handler(input, ctx)).rejects.toThrow('invoke error');
|
|
42
42
|
|
|
43
|
-
expect(
|
|
43
|
+
expect(logger.error.mock.calls).toEqual([[{ err }, 'request']]);
|
|
44
44
|
|
|
45
|
-
expect(
|
|
45
|
+
expect(logger.info).not.toBeCalled();
|
|
46
46
|
});
|
|
47
47
|
|
|
48
48
|
it('handles sync error', async () => {
|
|
@@ -54,8 +54,8 @@ describe('createHandler', () => {
|
|
|
54
54
|
|
|
55
55
|
await expect(handler(input, ctx)).rejects.toThrow('invoke error');
|
|
56
56
|
|
|
57
|
-
expect(
|
|
57
|
+
expect(logger.error.mock.calls).toEqual([[{ err }, 'request']]);
|
|
58
58
|
|
|
59
|
-
expect(
|
|
59
|
+
expect(logger.info).not.toBeCalled();
|
|
60
60
|
});
|
|
61
61
|
});
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
import { Logger } from '@seek/logger';
|
|
2
1
|
import { Context } from 'aws-lambda';
|
|
3
2
|
|
|
4
|
-
import {
|
|
3
|
+
import { logger, loggerContext } from 'src/framework/logging';
|
|
5
4
|
|
|
6
|
-
export const createHandler =
|
|
7
|
-
fn: (event: Event
|
|
8
|
-
) =>
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
export const createHandler =
|
|
6
|
+
<Event, Output = unknown>(fn: (event: Event) => Promise<Output>) =>
|
|
7
|
+
(event: Event, { awsRequestId }: Context) =>
|
|
8
|
+
loggerContext.run({ awsRequestId }, async () => {
|
|
9
|
+
try {
|
|
10
|
+
const output = await fn(event);
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
const output = await fn(event, { logger });
|
|
12
|
+
logger.info('request');
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
return output;
|
|
15
|
+
} catch (err) {
|
|
16
|
+
logger.error({ err }, 'request');
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
throw new Error('invoke error');
|
|
22
|
-
}
|
|
23
|
-
};
|
|
18
|
+
throw new Error('invoke error');
|
|
19
|
+
}
|
|
20
|
+
});
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from 'async_hooks';
|
|
2
|
+
|
|
1
3
|
import createLogger from '@seek/logger';
|
|
2
|
-
import { Context } from 'aws-lambda';
|
|
3
4
|
|
|
4
5
|
import { config } from 'src/config';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
interface LoggerContext {
|
|
8
|
+
awsRequestId: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const loggerContext = new AsyncLocalStorage<LoggerContext>();
|
|
12
|
+
|
|
13
|
+
export const logger = createLogger({
|
|
7
14
|
base: {
|
|
8
15
|
environment: config.environment,
|
|
9
16
|
version: config.version,
|
|
@@ -11,12 +18,10 @@ export const rootLogger = createLogger({
|
|
|
11
18
|
|
|
12
19
|
level: config.logLevel,
|
|
13
20
|
|
|
21
|
+
mixin: () => loggerContext.getStore() ?? {},
|
|
22
|
+
|
|
14
23
|
name: config.name,
|
|
15
24
|
|
|
16
25
|
transport:
|
|
17
26
|
config.environment === 'local' ? { target: 'pino-pretty' } : undefined,
|
|
18
27
|
});
|
|
19
|
-
|
|
20
|
-
/* istanbul ignore next: @seek/logger interface */
|
|
21
|
-
export const contextLogger = ({ awsRequestId }: Context) =>
|
|
22
|
-
rootLogger.child({ awsRequestId });
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import * as logging from 'src/framework/logging';
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const logger = {
|
|
4
4
|
error: jest.fn(),
|
|
5
5
|
info: jest.fn(),
|
|
6
6
|
|
|
7
7
|
clear: () => {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
logger.error.mockClear();
|
|
9
|
+
logger.info.mockClear();
|
|
10
10
|
},
|
|
11
11
|
|
|
12
|
-
spy: () =>
|
|
13
|
-
jest.spyOn(logging, '
|
|
12
|
+
spy: () => {
|
|
13
|
+
jest.spyOn(logging.logger, 'error').mockImplementation(logger.error);
|
|
14
|
+
jest.spyOn(logging.logger, 'info').mockImplementation(logger.info);
|
|
15
|
+
},
|
|
14
16
|
};
|
|
@@ -9,7 +9,7 @@ configs:
|
|
|
9
9
|
NPM_READ_TOKEN: arn:aws:secretsmanager:ap-southeast-2:987872074697:secret:npm/npm-read-token
|
|
10
10
|
|
|
11
11
|
- &docker-ecr-cache
|
|
12
|
-
seek-oss/docker-ecr-cache#
|
|
12
|
+
seek-oss/docker-ecr-cache#v2.0.0:
|
|
13
13
|
cache-on:
|
|
14
14
|
- package.json
|
|
15
15
|
- yarn.lock
|
|
@@ -59,6 +59,7 @@ steps:
|
|
|
59
59
|
- *docker-ecr-cache
|
|
60
60
|
- docker-compose#v3.9.0:
|
|
61
61
|
run: app
|
|
62
|
+
timeout_in_minutes: 10
|
|
62
63
|
|
|
63
64
|
- agents:
|
|
64
65
|
queue: <%- devBuildkiteQueueName %>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
16
|
|
@@ -174,7 +174,7 @@ Object {
|
|
|
174
174
|
"Arn",
|
|
175
175
|
],
|
|
176
176
|
},
|
|
177
|
-
"Runtime": "
|
|
177
|
+
"Runtime": "nodejs16.x",
|
|
178
178
|
},
|
|
179
179
|
"Type": "AWS::Lambda::Function",
|
|
180
180
|
},
|
|
@@ -530,7 +530,7 @@ Object {
|
|
|
530
530
|
"Arn",
|
|
531
531
|
],
|
|
532
532
|
},
|
|
533
|
-
"Runtime": "
|
|
533
|
+
"Runtime": "nodejs16.x",
|
|
534
534
|
},
|
|
535
535
|
"Type": "AWS::Lambda::Function",
|
|
536
536
|
},
|
|
@@ -52,7 +52,7 @@ export class AppStack extends Stack {
|
|
|
52
52
|
|
|
53
53
|
const worker = new aws_lambda.Function(this, 'worker', {
|
|
54
54
|
code: new aws_lambda.AssetCode('./lib'),
|
|
55
|
-
runtime: aws_lambda.Runtime.
|
|
55
|
+
runtime: aws_lambda.Runtime.NODEJS_16_X,
|
|
56
56
|
handler: 'app.handler',
|
|
57
57
|
functionName: '<%- serviceName %>',
|
|
58
58
|
environmentEncryption: kmsKey,
|
|
@@ -4,12 +4,16 @@
|
|
|
4
4
|
"runtypes": "^6.3.2"
|
|
5
5
|
},
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@aws-cdk/assert": "^2.
|
|
7
|
+
"@aws-cdk/assert": "^2.24.0",
|
|
8
8
|
"@types/aws-lambda": "^8.10.82",
|
|
9
|
-
"@types/node": "^
|
|
10
|
-
"aws-cdk": "^2.
|
|
11
|
-
"aws-cdk-lib": "^2.
|
|
12
|
-
"constructs": "^10.0.17"
|
|
9
|
+
"@types/node": "^16.0.0",
|
|
10
|
+
"aws-cdk": "^2.24.0",
|
|
11
|
+
"aws-cdk-lib": "^2.24.0",
|
|
12
|
+
"constructs": "^10.0.17",
|
|
13
|
+
"skuba": "*"
|
|
14
|
+
},
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=16"
|
|
13
17
|
},
|
|
14
18
|
"license": "UNLICENSED",
|
|
15
19
|
"private": true,
|
|
@@ -22,11 +26,5 @@
|
|
|
22
26
|
"test": "skuba test",
|
|
23
27
|
"test:ci": "skuba test --coverage",
|
|
24
28
|
"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"
|
|
31
29
|
}
|
|
32
30
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
declare const inputs: {
|
|
2
|
-
readonly publish: "yarn changeset publish";
|
|
3
|
-
readonly commit: "Version Packages";
|
|
4
|
-
readonly title: "Version Packages";
|
|
5
|
-
readonly branch: "changeset-release/";
|
|
6
|
-
};
|
|
7
|
-
export declare const getInput: (name: keyof typeof inputs) => string;
|
|
8
|
-
export declare const setFailed: (message: string) => never;
|
|
9
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setFailed = exports.getInput = void 0;
|
|
4
|
-
const inputs = {
|
|
5
|
-
publish: 'yarn changeset publish',
|
|
6
|
-
commit: 'Version Packages',
|
|
7
|
-
title: 'Version Packages',
|
|
8
|
-
branch: 'changeset-release/',
|
|
9
|
-
};
|
|
10
|
-
const getInput = (name) => inputs[name];
|
|
11
|
-
exports.getInput = getInput;
|
|
12
|
-
// Maybe we could store these in a checkrun..?
|
|
13
|
-
const setFailed = (message) => {
|
|
14
|
-
// eslint-disable-next-line no-console
|
|
15
|
-
console.error(message);
|
|
16
|
-
throw new Error();
|
|
17
|
-
};
|
|
18
|
-
exports.setFailed = setFailed;
|
|
19
|
-
//# sourceMappingURL=coreAdapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coreAdapter.js","sourceRoot":"","sources":["../../../src/cli/changesets/coreAdapter.ts"],"names":[],"mappings":";;;AAAA,MAAM,MAAM,GAAG;IACb,OAAO,EAAE,wBAAwB;IACjC,MAAM,EAAE,kBAAkB;IAC1B,KAAK,EAAE,kBAAkB;IACzB,MAAM,EAAE,oBAAoB;CACpB,CAAC;AAEJ,MAAM,QAAQ,GAAG,CAAC,IAAyB,EAAU,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAA/D,QAAA,QAAQ,YAAuD;AAE5E,8CAA8C;AACvC,MAAM,SAAS,GAAG,CAAC,OAAe,EAAE,EAAE;IAC3C,sCAAsC;IACtC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACvB,MAAM,IAAI,KAAK,EAAE,CAAC;AACpB,CAAC,CAAC;AAJW,QAAA,SAAS,aAIpB"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare const push: (dir: string, branch: string, { force }?: {
|
|
2
|
-
force?: boolean | undefined;
|
|
3
|
-
}) => Promise<void>;
|
|
4
|
-
export declare const listTags: (dir: string) => Promise<string[]>;
|
|
5
|
-
export declare const pushTags: (dir: string, tags: string[]) => Promise<void>;
|
|
6
|
-
export declare const switchToMaybeExistingBranch: (dir: string, branch: string) => Promise<void>;
|
|
7
|
-
export declare const reset: (dir: string, commitId: string, branch: string) => Promise<void>;
|
|
8
|
-
export declare const commitAll: (dir: string, message: string) => Promise<void>;
|
|
9
|
-
export declare const checkIfClean: (dir: string) => Promise<boolean>;
|
|
10
|
-
export declare const context: (dir: string) => Promise<{
|
|
11
|
-
sha: string;
|
|
12
|
-
ref: string;
|
|
13
|
-
repo: {
|
|
14
|
-
repo: string;
|
|
15
|
-
owner: string;
|
|
16
|
-
};
|
|
17
|
-
}>;
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Adapted from https://github.com/changesets/action/blob/21240c3cd1d2efa2672d64e0235a03cf139b83e6/src/utils.ts
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
-
if (mod && mod.__esModule) return mod;
|
|
21
|
-
var result = {};
|
|
22
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
-
__setModuleDefault(result, mod);
|
|
24
|
-
return result;
|
|
25
|
-
};
|
|
26
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
27
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
28
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
29
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
30
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
31
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
32
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.context = exports.checkIfClean = exports.commitAll = exports.reset = exports.switchToMaybeExistingBranch = exports.pushTags = exports.listTags = exports.push = void 0;
|
|
40
|
-
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
41
|
-
const isomorphic_git_1 = __importDefault(require("isomorphic-git"));
|
|
42
|
-
const Git = __importStar(require("../../api/git"));
|
|
43
|
-
const push = (dir, branch, { force } = {}) => __awaiter(void 0, void 0, void 0, function* () {
|
|
44
|
-
yield Git.push({
|
|
45
|
-
dir,
|
|
46
|
-
auth: { type: 'gitHubApp' },
|
|
47
|
-
ref: branch,
|
|
48
|
-
force,
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
exports.push = push;
|
|
52
|
-
const listTags = (dir) => __awaiter(void 0, void 0, void 0, function* () {
|
|
53
|
-
return isomorphic_git_1.default.listTags({
|
|
54
|
-
fs: fs_extra_1.default,
|
|
55
|
-
dir,
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
exports.listTags = listTags;
|
|
59
|
-
const pushTags = (dir, tags) => __awaiter(void 0, void 0, void 0, function* () {
|
|
60
|
-
yield Promise.all(tags.map((tag) => Git.push({
|
|
61
|
-
auth: { type: 'gitHubApp' },
|
|
62
|
-
ref: tag,
|
|
63
|
-
dir,
|
|
64
|
-
})));
|
|
65
|
-
});
|
|
66
|
-
exports.pushTags = pushTags;
|
|
67
|
-
const switchToMaybeExistingBranch = (dir, branch) => __awaiter(void 0, void 0, void 0, function* () {
|
|
68
|
-
try {
|
|
69
|
-
yield isomorphic_git_1.default.branch({
|
|
70
|
-
fs: fs_extra_1.default,
|
|
71
|
-
dir,
|
|
72
|
-
ref: branch,
|
|
73
|
-
checkout: true,
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
catch (error) {
|
|
77
|
-
if (error instanceof isomorphic_git_1.default.Errors.AlreadyExistsError) {
|
|
78
|
-
yield isomorphic_git_1.default.deleteBranch({
|
|
79
|
-
fs: fs_extra_1.default,
|
|
80
|
-
dir,
|
|
81
|
-
ref: branch,
|
|
82
|
-
});
|
|
83
|
-
yield isomorphic_git_1.default.branch({
|
|
84
|
-
fs: fs_extra_1.default,
|
|
85
|
-
dir,
|
|
86
|
-
ref: branch,
|
|
87
|
-
checkout: true,
|
|
88
|
-
});
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
throw error;
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
exports.switchToMaybeExistingBranch = switchToMaybeExistingBranch;
|
|
95
|
-
const reset = (dir, commitId, branch) => __awaiter(void 0, void 0, void 0, function* () { return Git.reset({ dir, branch, commitId, hard: true }); });
|
|
96
|
-
exports.reset = reset;
|
|
97
|
-
const commitAll = (dir, message) => __awaiter(void 0, void 0, void 0, function* () {
|
|
98
|
-
yield Git.commitAllChanges({
|
|
99
|
-
dir,
|
|
100
|
-
message,
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
exports.commitAll = commitAll;
|
|
104
|
-
const checkIfClean = (dir) => __awaiter(void 0, void 0, void 0, function* () {
|
|
105
|
-
const changedFiles = yield Git.getChangedFiles({ dir });
|
|
106
|
-
return !changedFiles.length;
|
|
107
|
-
});
|
|
108
|
-
exports.checkIfClean = checkIfClean;
|
|
109
|
-
const context = (dir) => __awaiter(void 0, void 0, void 0, function* () {
|
|
110
|
-
const [{ owner, repo }, currentBranch, headSha] = yield Promise.all([
|
|
111
|
-
Git.getOwnerAndRepo({ dir }),
|
|
112
|
-
Git.currentBranch({ dir }),
|
|
113
|
-
Git.getHeadCommitId({ dir }),
|
|
114
|
-
]);
|
|
115
|
-
if (!currentBranch) {
|
|
116
|
-
throw new Error('Could not determine the current Git branch from environment variables or local directory');
|
|
117
|
-
}
|
|
118
|
-
return {
|
|
119
|
-
sha: headSha,
|
|
120
|
-
ref: currentBranch,
|
|
121
|
-
repo: {
|
|
122
|
-
repo,
|
|
123
|
-
owner,
|
|
124
|
-
},
|
|
125
|
-
};
|
|
126
|
-
});
|
|
127
|
-
exports.context = context;
|
|
128
|
-
//# sourceMappingURL=gitUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gitUtils.js","sourceRoot":"","sources":["../../../src/cli/changesets/gitUtils.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const getOctokit: () => import("@octokit/core").Octokit & {
|
|
2
|
-
paginate: import("@octokit/plugin-paginate-rest").PaginateInterface;
|
|
3
|
-
} & import("@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types").RestEndpointMethods & import("@octokit/plugin-rest-endpoint-methods/dist-types/types").Api;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOctokit = void 0;
|
|
4
|
-
const rest_1 = require("@octokit/rest");
|
|
5
|
-
const environment_1 = require("../../api/github/environment");
|
|
6
|
-
const getOctokit = () => new rest_1.Octokit({ auth: (0, environment_1.apiTokenFromEnvironment)() });
|
|
7
|
-
exports.getOctokit = getOctokit;
|
|
8
|
-
//# sourceMappingURL=githubAdapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"githubAdapter.js","sourceRoot":"","sources":["../../../src/cli/changesets/githubAdapter.ts"],"names":[],"mappings":";;;AAAA,wCAAwC;AAExC,8DAAuE;AAEhE,MAAM,UAAU,GAAG,GAAG,EAAE,CAC7B,IAAI,cAAO,CAAC,EAAE,IAAI,EAAE,IAAA,qCAAuB,GAAE,EAAE,CAAC,CAAC;AADtC,QAAA,UAAU,cAC4B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const changesets: () => Promise<void>;
|