skuba 0.0.0-master-20230319220011 → 0.0.0-master-20230815032514
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/config/tsconfig.json +3 -1
- package/jest-preset.js +7 -1
- package/lib/api/buildkite/md.js.map +1 -1
- package/lib/api/git/commitAllChanges.d.ts +2 -2
- package/lib/api/git/commitAllChanges.js.map +2 -2
- package/lib/api/git/currentBranch.js +2 -1
- package/lib/api/git/currentBranch.js.map +2 -2
- package/lib/api/git/findRoot.d.ts +9 -0
- package/lib/api/git/findRoot.js +52 -0
- package/lib/api/git/findRoot.js.map +7 -0
- package/lib/api/git/index.d.ts +1 -0
- package/lib/api/git/index.js +3 -0
- package/lib/api/git/index.js.map +2 -2
- package/lib/api/git/pull.js.map +1 -1
- package/lib/api/git/push.js.map +1 -1
- package/lib/api/git/remote.js +2 -1
- package/lib/api/git/remote.js.map +2 -2
- package/lib/api/git/reset.js.map +1 -1
- package/lib/api/github/checkRun.d.ts +1 -1
- package/lib/api/github/checkRun.js.map +2 -2
- package/lib/api/github/environment.js.map +1 -1
- package/lib/api/github/issueComment.js.map +1 -1
- package/lib/api/github/pullRequest.js +3 -2
- package/lib/api/github/pullRequest.js.map +2 -2
- package/lib/api/github/push.js.map +1 -1
- package/lib/api/jest/index.d.ts +24 -21
- package/lib/api/net/compose.js.map +1 -1
- package/lib/api/net/socket.js.map +1 -1
- package/lib/api/net/waitFor.d.ts +1 -1
- package/lib/api/net/waitFor.js.map +2 -2
- package/lib/cli/adapter/eslint.d.ts +2 -2
- package/lib/cli/adapter/eslint.js +0 -24
- package/lib/cli/adapter/eslint.js.map +2 -2
- package/lib/cli/adapter/prettier.d.ts +9 -2
- package/lib/cli/adapter/prettier.js +20 -15
- package/lib/cli/adapter/prettier.js.map +2 -2
- package/lib/cli/build/assets.d.ts +10 -0
- package/lib/cli/build/assets.js +107 -0
- package/lib/cli/build/assets.js.map +7 -0
- package/lib/cli/build/esbuild.js +7 -42
- package/lib/cli/build/esbuild.js.map +3 -3
- package/lib/cli/build/index.js +12 -2
- package/lib/cli/build/index.js.map +2 -2
- package/lib/cli/build/tsc.d.ts +3 -0
- package/lib/cli/build/tsc.js +66 -0
- package/lib/cli/build/tsc.js.map +3 -3
- package/lib/cli/buildPackage.js +13 -0
- package/lib/cli/buildPackage.js.map +2 -2
- package/lib/cli/configure/addEmptyExports.js +1 -1
- package/lib/cli/configure/addEmptyExports.js.map +2 -2
- package/lib/cli/configure/analyseDependencies.js +1 -1
- package/lib/cli/configure/analyseDependencies.js.map +2 -2
- package/lib/cli/configure/analysis/files.js.map +1 -1
- package/lib/cli/configure/analysis/package.js.map +2 -2
- package/lib/cli/configure/analysis/project.js +7 -3
- package/lib/cli/configure/analysis/project.js.map +2 -2
- package/lib/cli/configure/ensureTemplateCompletion.d.ts +1 -1
- package/lib/cli/configure/ensureTemplateCompletion.js +1 -1
- package/lib/cli/configure/ensureTemplateCompletion.js.map +2 -2
- package/lib/cli/configure/getEntryPoint.js +3 -0
- package/lib/cli/configure/getEntryPoint.js.map +3 -3
- package/lib/cli/configure/index.js +1 -1
- package/lib/cli/configure/index.js.map +2 -2
- package/lib/cli/configure/modules/jest.js +2 -2
- package/lib/cli/configure/modules/jest.js.map +2 -2
- package/lib/cli/configure/modules/skubaDive.js.map +1 -1
- package/lib/cli/configure/modules/tsconfig.js.map +1 -1
- package/lib/cli/configure/patchDockerfile.d.ts +1 -0
- package/lib/cli/configure/patchDockerfile.js +65 -0
- package/lib/cli/configure/patchDockerfile.js.map +7 -0
- package/lib/cli/configure/patchRenovateConfig.js +9 -4
- package/lib/cli/configure/patchRenovateConfig.js.map +2 -2
- package/lib/cli/configure/patchServerListener.js +1 -1
- package/lib/cli/configure/patchServerListener.js.map +2 -2
- package/lib/cli/configure/processing/ignoreFile.js.map +1 -1
- package/lib/cli/configure/processing/javascript.js.map +1 -1
- package/lib/cli/configure/processing/json.d.ts +1 -1
- package/lib/cli/configure/processing/json.js.map +1 -1
- package/lib/cli/configure/processing/module.js.map +1 -1
- package/lib/cli/configure/processing/package.d.ts +2 -2
- package/lib/cli/configure/processing/prettier.d.ts +1 -1
- package/lib/cli/configure/processing/typescript.d.ts +2 -2
- package/lib/cli/configure/processing/typescript.js +15 -7
- package/lib/cli/configure/processing/typescript.js.map +2 -2
- package/lib/cli/configure/refreshIgnoreFiles.js.map +1 -1
- package/lib/cli/configure/types.d.ts +1 -1
- package/lib/cli/configure/types.js.map +1 -1
- package/lib/cli/format.js +2 -0
- package/lib/cli/format.js.map +2 -2
- package/lib/cli/init/getConfig.d.ts +2 -2
- package/lib/cli/init/getConfig.js +5 -2
- package/lib/cli/init/getConfig.js.map +2 -2
- package/lib/cli/init/git.js.map +1 -1
- package/lib/cli/init/index.js.map +1 -1
- package/lib/cli/init/prompts.d.ts +1 -1
- package/lib/cli/init/prompts.js +1 -1
- package/lib/cli/init/prompts.js.map +2 -2
- package/lib/cli/init/writePackageJson.js +1 -1
- package/lib/cli/init/writePackageJson.js.map +2 -2
- package/lib/cli/lint/annotate/buildkite/prettier.js.map +2 -2
- package/lib/cli/lint/annotate/github/eslint.js.map +1 -1
- 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 +2 -2
- package/lib/cli/lint/autofix.js +21 -0
- package/lib/cli/lint/autofix.js.map +2 -2
- package/lib/cli/lint/eslint.d.ts +1 -1
- package/lib/cli/lint/eslint.js.map +2 -2
- package/lib/cli/lint/external.js.map +1 -1
- package/lib/cli/lint/internal.js.map +1 -1
- package/lib/cli/lint/prettier.d.ts +1 -1
- package/lib/cli/lint/prettier.js.map +2 -2
- package/lib/cli/lint/tsc.js.map +1 -1
- package/lib/cli/test/reporters/github/annotations.js +1 -1
- package/lib/cli/test/reporters/github/annotations.js.map +2 -2
- package/lib/cli/test/reporters/github/index.js +0 -2
- package/lib/cli/test/reporters/github/index.js.map +1 -1
- package/lib/cli/test/reporters/prettier/index.d.ts +4 -0
- package/lib/cli/test/reporters/prettier/index.js +67 -0
- package/lib/cli/test/reporters/prettier/index.js.map +7 -0
- package/lib/index.js.map +1 -1
- package/lib/skuba.js +1 -0
- package/lib/skuba.js.map +2 -2
- package/lib/utils/args.d.ts +1 -1
- package/lib/utils/args.js.map +2 -2
- package/lib/utils/command.js +1 -1
- package/lib/utils/command.js.map +2 -2
- package/lib/utils/copy.d.ts +2 -1
- package/lib/utils/copy.js +6 -1
- package/lib/utils/copy.js.map +2 -2
- package/lib/utils/dir.d.ts +3 -2
- package/lib/utils/dir.js +6 -6
- package/lib/utils/dir.js.map +2 -2
- package/lib/utils/exec.d.ts +1 -2
- package/lib/utils/exec.js.map +2 -2
- package/lib/utils/logging.js.map +1 -1
- package/lib/utils/logo.js.map +1 -1
- package/lib/utils/manifest.d.ts +2 -2
- package/lib/utils/manifest.js +8 -2
- package/lib/utils/manifest.js.map +2 -2
- package/lib/utils/validation.d.ts +3 -3
- package/lib/utils/validation.js.map +2 -2
- package/lib/utils/version.js.map +1 -1
- package/lib/utils/wait.js.map +1 -1
- package/lib/utils/worker.js.map +1 -1
- package/lib/wrapper/functionHandler.js.map +1 -1
- package/lib/wrapper/http.d.ts +1 -1
- package/lib/wrapper/http.js.map +2 -2
- package/lib/wrapper/index.js.map +1 -1
- package/lib/wrapper/main.js.map +2 -2
- package/lib/wrapper/requestListener.js +3 -0
- package/lib/wrapper/requestListener.js.map +2 -2
- package/package.json +29 -26
- package/template/base/.github/CODEOWNERS +0 -4
- package/template/base/_.prettierignore +1 -13
- package/template/express-rest-api/.buildkite/pipeline.yml +1 -1
- package/template/express-rest-api/Dockerfile +1 -1
- package/template/express-rest-api/gantry.apply.yml +0 -2
- package/template/express-rest-api/package.json +2 -2
- package/template/express-rest-api/src/api/healthCheck.ts +1 -1
- package/template/express-rest-api/src/api/smokeTest.ts +1 -1
- package/template/greeter/.buildkite/pipeline.yml +1 -1
- package/template/greeter/package.json +1 -1
- package/template/koa-rest-api/.buildkite/pipeline.yml +1 -1
- package/template/koa-rest-api/Dockerfile +1 -1
- package/template/koa-rest-api/gantry.apply.yml +0 -2
- package/template/koa-rest-api/package.json +7 -7
- package/template/koa-rest-api/src/api/healthCheck.ts +1 -1
- package/template/koa-rest-api/src/api/jobs/getJobs.ts +1 -1
- package/template/koa-rest-api/src/api/jobs/postJob.ts +1 -1
- package/template/koa-rest-api/src/api/smokeTest.ts +1 -1
- package/template/koa-rest-api/src/framework/server.test.ts +1 -1
- package/template/koa-rest-api/src/framework/server.ts +1 -1
- package/template/koa-rest-api/src/framework/validation.ts +2 -2
- package/template/koa-rest-api/src/storage/jobs.ts +1 -1
- package/template/koa-rest-api/src/testing/server.ts +3 -3
- package/template/koa-rest-api/src/testing/types.ts +1 -1
- package/template/lambda-sqs-worker/.buildkite/pipeline.yml +2 -2
- package/template/lambda-sqs-worker/package.json +9 -9
- package/template/lambda-sqs-worker/src/app.test.ts +1 -1
- package/template/lambda-sqs-worker/src/app.ts +10 -5
- package/template/lambda-sqs-worker/src/framework/handler.test.ts +4 -4
- package/template/lambda-sqs-worker/src/framework/handler.ts +1 -1
- package/template/lambda-sqs-worker/src/framework/validation.ts +1 -1
- package/template/lambda-sqs-worker/src/mapping/jobScorer.ts +5 -2
- package/template/lambda-sqs-worker/src/services/jobScorer.ts +6 -3
- package/template/lambda-sqs-worker/src/testing/handler.ts +3 -3
- package/template/lambda-sqs-worker/src/testing/logging.ts +3 -0
- package/template/lambda-sqs-worker/src/testing/types.ts +1 -1
- package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +2 -2
- package/template/lambda-sqs-worker-cdk/infra/appStack.ts +1 -1
- package/template/lambda-sqs-worker-cdk/package.json +2 -2
- package/template/lambda-sqs-worker-cdk/src/app.ts +1 -1
- package/template/oss-npm-package/.github/workflows/release.yml +1 -0
- package/template/oss-npm-package/_package.json +4 -1
- package/template/private-npm-package/_package.json +1 -1
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { JobScorerInput, JobScorerOutput } from 'src/types/jobScorer';
|
|
2
|
-
import {
|
|
1
|
+
import type { JobScorerInput, JobScorerOutput } from 'src/types/jobScorer';
|
|
2
|
+
import type {
|
|
3
|
+
JobPublishedEvent,
|
|
4
|
+
JobScoredEvent,
|
|
5
|
+
} from 'src/types/pipelineEvents';
|
|
3
6
|
|
|
4
7
|
export const jobPublishedEventToScorerInput = (
|
|
5
8
|
record: JobPublishedEvent,
|
|
@@ -3,11 +3,14 @@ import {
|
|
|
3
3
|
jobScorerOutputToScoredEvent,
|
|
4
4
|
} from 'src/mapping/jobScorer';
|
|
5
5
|
import {
|
|
6
|
-
JobScorerInput,
|
|
7
|
-
JobScorerOutput,
|
|
6
|
+
type JobScorerInput,
|
|
7
|
+
type JobScorerOutput,
|
|
8
8
|
JobScorerOutputSchema,
|
|
9
9
|
} from 'src/types/jobScorer';
|
|
10
|
-
import {
|
|
10
|
+
import type {
|
|
11
|
+
JobPublishedEvent,
|
|
12
|
+
JobScoredEvent,
|
|
13
|
+
} from 'src/types/pipelineEvents';
|
|
11
14
|
|
|
12
15
|
/* istanbul ignore next: simulation of an external service */
|
|
13
16
|
export const scoringService = {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Context, SQSEvent } from 'aws-lambda';
|
|
1
|
+
import type { Context, SQSEvent } from 'aws-lambda';
|
|
2
2
|
|
|
3
3
|
import { chance } from './types';
|
|
4
4
|
|
|
5
5
|
export const createCtx = () =>
|
|
6
6
|
({
|
|
7
7
|
awsRequestId: chance.guid({ version: 4 }),
|
|
8
|
-
} as Context
|
|
8
|
+
}) as Context;
|
|
9
9
|
|
|
10
10
|
export const createSqsEvent = (bodies: string[]) =>
|
|
11
11
|
({
|
|
12
12
|
Records: bodies.map((body) => ({ body })),
|
|
13
|
-
} as SQSEvent
|
|
13
|
+
}) as SQSEvent;
|
|
@@ -3,14 +3,17 @@ import * as logging from 'src/framework/logging';
|
|
|
3
3
|
export const logger = {
|
|
4
4
|
error: jest.fn(),
|
|
5
5
|
info: jest.fn(),
|
|
6
|
+
debug: jest.fn(),
|
|
6
7
|
|
|
7
8
|
clear: () => {
|
|
8
9
|
logger.error.mockClear();
|
|
9
10
|
logger.info.mockClear();
|
|
11
|
+
logger.debug.mockClear();
|
|
10
12
|
},
|
|
11
13
|
|
|
12
14
|
spy: () => {
|
|
13
15
|
jest.spyOn(logging.logger, 'error').mockImplementation(logger.error);
|
|
14
16
|
jest.spyOn(logging.logger, 'info').mockImplementation(logger.info);
|
|
17
|
+
jest.spyOn(logging.logger, 'debug').mockImplementation(logger.debug);
|
|
15
18
|
},
|
|
16
19
|
};
|
|
@@ -32,7 +32,7 @@ configs:
|
|
|
32
32
|
- *aws-sm
|
|
33
33
|
- *private-npm
|
|
34
34
|
- *docker-ecr-cache
|
|
35
|
-
- docker-compose#v4.
|
|
35
|
+
- docker-compose#v4.14.0:
|
|
36
36
|
dependencies: false
|
|
37
37
|
run: app
|
|
38
38
|
retry:
|
|
@@ -57,7 +57,7 @@ steps:
|
|
|
57
57
|
- *aws-sm
|
|
58
58
|
- *private-npm
|
|
59
59
|
- *docker-ecr-cache
|
|
60
|
-
- docker-compose#v4.
|
|
60
|
+
- docker-compose#v4.14.0:
|
|
61
61
|
run: app
|
|
62
62
|
timeout_in_minutes: 10
|
|
63
63
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"test:watch": "skuba test --watch"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@seek/logger": "^
|
|
15
|
+
"@seek/logger": "^6.0.0",
|
|
16
16
|
"zod": "^3.19.1"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
@@ -25,6 +25,6 @@
|
|
|
25
25
|
"skuba": "*"
|
|
26
26
|
},
|
|
27
27
|
"engines": {
|
|
28
|
-
"node": ">=18"
|
|
28
|
+
"node": ">=18.12"
|
|
29
29
|
}
|
|
30
30
|
}
|