skuba 12.0.2 → 13.0.0-custom-conditions-exports-20250729005607
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/config/tsconfig.json +4 -3
- package/jest/moduleNameMapper.js +12 -1
- package/lib/cli/buildPackage/index.js +2 -2
- package/lib/cli/buildPackage/index.js.map +1 -1
- package/lib/cli/configure/ensureTemplateCompletion.js +1 -1
- package/lib/cli/configure/ensureTemplateCompletion.js.map +2 -2
- package/lib/cli/init/getConfig.d.ts +1 -1
- package/lib/cli/init/getConfig.js +7 -5
- package/lib/cli/init/getConfig.js.map +3 -3
- package/lib/cli/init/prompts.d.ts +5 -5
- package/lib/cli/init/prompts.js +5 -4
- package/lib/cli/init/prompts.js.map +3 -3
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.0/index.d.ts +2 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.0/index.js +35 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.0/index.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.0/rewriteSrcImports.d.ts +6 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.0/rewriteSrcImports.js +107 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.0/rewriteSrcImports.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/configureTsConfigForESM.d.ts +5 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/configureTsConfigForESM.js +182 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/configureTsConfigForESM.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.d.ts +2 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js +35 -0
- package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js.map +7 -0
- package/package.json +8 -2
- package/template/base/_.prettierrc.js +1 -1
- package/template/base/_eslint.config.js +1 -1
- package/template/base/_pnpm-workspace.yaml +4 -2
- package/template/base/tsconfig.json +2 -3
- package/template/express-rest-api/package.json +6 -0
- package/template/express-rest-api/src/app.ts +0 -2
- package/template/express-rest-api/src/framework/logging.ts +1 -1
- package/template/express-rest-api/src/framework/metrics.ts +2 -2
- package/template/express-rest-api/src/listen.ts +0 -2
- package/template/greeter/package.json +7 -1
- package/template/greeter/src/app.ts +2 -2
- package/template/koa-rest-api/package.json +6 -0
- package/template/koa-rest-api/src/api/healthCheck.ts +1 -1
- package/template/koa-rest-api/src/api/jobs/getJobs.test.ts +2 -2
- package/template/koa-rest-api/src/api/jobs/getJobs.ts +4 -4
- package/template/koa-rest-api/src/api/jobs/index.ts +2 -2
- package/template/koa-rest-api/src/api/jobs/postJob.test.ts +3 -3
- package/template/koa-rest-api/src/api/jobs/postJob.ts +6 -6
- package/template/koa-rest-api/src/api/smokeTest.ts +2 -2
- package/template/koa-rest-api/src/app.test.ts +2 -2
- package/template/koa-rest-api/src/app.ts +0 -2
- package/template/koa-rest-api/src/framework/logging.ts +1 -1
- package/template/koa-rest-api/src/framework/metrics.ts +2 -2
- package/template/koa-rest-api/src/framework/server.test.ts +5 -5
- package/template/koa-rest-api/src/framework/server.ts +3 -3
- package/template/koa-rest-api/src/framework/validation.test.ts +5 -5
- package/template/koa-rest-api/src/framework/validation.ts +1 -1
- package/template/koa-rest-api/src/listen.ts +0 -2
- package/template/koa-rest-api/src/storage/jobs.ts +1 -1
- package/template/koa-rest-api/src/testing/metrics.ts +1 -1
- package/template/koa-rest-api/src/testing/server.ts +1 -1
- package/template/koa-rest-api/src/testing/types.ts +1 -1
- package/template/lambda-sqs-worker-cdk/package.json +7 -1
- package/template/lambda-sqs-worker-cdk/src/app.test.ts +5 -5
- package/template/lambda-sqs-worker-cdk/src/app.ts +7 -9
- package/template/lambda-sqs-worker-cdk/src/framework/handler.test.ts +3 -3
- package/template/lambda-sqs-worker-cdk/src/framework/handler.ts +2 -2
- package/template/lambda-sqs-worker-cdk/src/framework/logging.ts +1 -1
- package/template/lambda-sqs-worker-cdk/src/framework/metrics.ts +1 -1
- package/template/lambda-sqs-worker-cdk/src/framework/validation.test.ts +3 -3
- package/template/lambda-sqs-worker-cdk/src/mapping/jobScorer.ts +2 -2
- package/template/lambda-sqs-worker-cdk/src/services/jobScorer.test.ts +3 -3
- package/template/lambda-sqs-worker-cdk/src/services/jobScorer.ts +3 -3
- package/template/lambda-sqs-worker-cdk/src/services/pipelineEventSender.test.ts +3 -3
- package/template/lambda-sqs-worker-cdk/src/services/pipelineEventSender.ts +2 -2
- package/template/lambda-sqs-worker-cdk/src/testing/services.ts +2 -2
- package/template/lambda-sqs-worker-cdk/src/testing/types.ts +1 -1
- package/template/lambda-sqs-worker-cdk/tsconfig.json +4 -3
- package/template/oss-npm-package/_package.json +6 -0
- package/template/oss-npm-package/skuba.template.js +1 -1
- package/template/oss-npm-package/tsconfig.json +1 -0
- package/template/private-npm-package/_package.json +6 -0
- package/template/private-npm-package/tsconfig.json +1 -0
- package/template/express-rest-api/src/register.ts +0 -1
- package/template/koa-rest-api/src/register.ts +0 -1
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
"name": "@seek/<%- serviceName %>",
|
|
3
3
|
"private": true,
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
|
+
"imports": {
|
|
6
|
+
"#src/*": {
|
|
7
|
+
"@seek/<%- serviceName %>/source": "./src/*",
|
|
8
|
+
"default": "./lib/*"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
5
11
|
"scripts": {
|
|
6
12
|
"deploy": "cdk deploy appStack --require-approval never",
|
|
7
13
|
"deploy:hotswap": "pnpm --silent run deploy --hotswap",
|
|
@@ -37,7 +43,7 @@
|
|
|
37
43
|
"constructs": "^10.0.17",
|
|
38
44
|
"datadog-cdk-constructs-v2": "^2.0.0",
|
|
39
45
|
"pino-pretty": "^13.0.0",
|
|
40
|
-
"skuba": "
|
|
46
|
+
"skuba": "13.0.0-custom-conditions-exports-20250729005607"
|
|
41
47
|
},
|
|
42
48
|
"packageManager": "pnpm@10.12.4",
|
|
43
49
|
"engines": {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { PublishCommand } from '@aws-sdk/client-sns';
|
|
2
2
|
|
|
3
|
-
import { metricsClient } from 'src/framework/metrics.js';
|
|
4
|
-
import { createCtx, createSqsEvent } from 'src/testing/handler.js';
|
|
5
|
-
import { scoringService, sns } from 'src/testing/services.js';
|
|
6
|
-
import { chance, mockJobPublishedEvent } from 'src/testing/types.js';
|
|
7
|
-
|
|
8
3
|
import * as app from './app.js';
|
|
9
4
|
import { stdoutMock } from './framework/logging.js';
|
|
10
5
|
|
|
6
|
+
import { metricsClient } from '#src/framework/metrics.js';
|
|
7
|
+
import { createCtx, createSqsEvent } from '#src/testing/handler.js';
|
|
8
|
+
import { scoringService, sns } from '#src/testing/services.js';
|
|
9
|
+
import { chance, mockJobPublishedEvent } from '#src/testing/types.js';
|
|
10
|
+
|
|
11
11
|
describe('app', () => {
|
|
12
12
|
it('exports a handler', () => expect(app).toHaveProperty('handler'));
|
|
13
13
|
});
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import 'skuba-dive/register';
|
|
2
|
-
|
|
3
1
|
import { isLambdaHook } from '@seek/aws-codedeploy-hooks';
|
|
4
2
|
import type { SQSEvent } from 'aws-lambda';
|
|
5
3
|
|
|
6
|
-
import { createHandler } from 'src/framework/handler.js';
|
|
7
|
-
import { logger } from 'src/framework/logging.js';
|
|
8
|
-
import { metricsClient } from 'src/framework/metrics.js';
|
|
9
|
-
import { validateJson } from 'src/framework/validation.js';
|
|
4
|
+
import { createHandler } from '#src/framework/handler.js';
|
|
5
|
+
import { logger } from '#src/framework/logging.js';
|
|
6
|
+
import { metricsClient } from '#src/framework/metrics.js';
|
|
7
|
+
import { validateJson } from '#src/framework/validation.js';
|
|
10
8
|
import {
|
|
11
9
|
scoreJobPublishedEvent,
|
|
12
10
|
scoringService,
|
|
13
|
-
} from 'src/services/jobScorer.js';
|
|
14
|
-
import { sendPipelineEvent } from 'src/services/pipelineEventSender.js';
|
|
15
|
-
import { JobPublishedEventSchema } from 'src/types/pipelineEvents.js';
|
|
11
|
+
} from '#src/services/jobScorer.js';
|
|
12
|
+
import { sendPipelineEvent } from '#src/services/pipelineEventSender.js';
|
|
13
|
+
import { JobPublishedEventSchema } from '#src/types/pipelineEvents.js';
|
|
16
14
|
|
|
17
15
|
/**
|
|
18
16
|
* Tests connectivity to ensure appropriate access and network configuration.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createCtx } from 'src/testing/handler.js';
|
|
2
|
-
import { chance } from 'src/testing/types.js';
|
|
3
|
-
|
|
4
1
|
import { createHandler } from './handler.js';
|
|
5
2
|
import { logger, stdoutMock } from './logging.js';
|
|
6
3
|
|
|
4
|
+
import { createCtx } from '#src/testing/handler.js';
|
|
5
|
+
import { chance } from '#src/testing/types.js';
|
|
6
|
+
|
|
7
7
|
describe('createHandler', () => {
|
|
8
8
|
const ctx = createCtx();
|
|
9
9
|
const input = chance.paragraph();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Context as LambdaContext } from 'aws-lambda';
|
|
2
2
|
import { datadog } from 'datadog-lambda-js';
|
|
3
3
|
|
|
4
|
-
import { config } from 'src/config.js';
|
|
5
|
-
import { logger, loggerContext } from 'src/framework/logging.js';
|
|
4
|
+
import { config } from '#src/config.js';
|
|
5
|
+
import { logger, loggerContext } from '#src/framework/logging.js';
|
|
6
6
|
|
|
7
7
|
type Handler<Event, Output> = (
|
|
8
8
|
event: Event,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { validateJson } from './validation.js';
|
|
2
|
+
|
|
1
3
|
import {
|
|
2
4
|
IdDescriptionSchema,
|
|
3
5
|
chance,
|
|
4
6
|
mockIdDescription,
|
|
5
|
-
} from 'src/testing/types.js';
|
|
6
|
-
|
|
7
|
-
import { validateJson } from './validation.js';
|
|
7
|
+
} from '#src/testing/types.js';
|
|
8
8
|
|
|
9
9
|
describe('validateJson', () => {
|
|
10
10
|
const idDescription = mockIdDescription();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { JobScorerInput, JobScorerOutput } from 'src/types/jobScorer.js';
|
|
1
|
+
import type { JobScorerInput, JobScorerOutput } from '#src/types/jobScorer.js';
|
|
2
2
|
import type {
|
|
3
3
|
JobPublishedEvent,
|
|
4
4
|
JobScoredEvent,
|
|
5
|
-
} from 'src/types/pipelineEvents.js';
|
|
5
|
+
} from '#src/types/pipelineEvents.js';
|
|
6
6
|
|
|
7
7
|
export const jobPublishedEventToScorerInput = (
|
|
8
8
|
record: JobPublishedEvent,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { scoringService } from 'src/testing/services.js';
|
|
2
|
-
import { chance, mockJobPublishedEvent } from 'src/testing/types.js';
|
|
3
|
-
|
|
4
1
|
import * as jobScorer from './jobScorer.js';
|
|
5
2
|
|
|
3
|
+
import { scoringService } from '#src/testing/services.js';
|
|
4
|
+
import { chance, mockJobPublishedEvent } from '#src/testing/types.js';
|
|
5
|
+
|
|
6
6
|
describe('scoreJobPublishedEvent', () => {
|
|
7
7
|
beforeAll(scoringService.spy);
|
|
8
8
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
jobPublishedEventToScorerInput,
|
|
3
3
|
jobScorerOutputToScoredEvent,
|
|
4
|
-
} from 'src/mapping/jobScorer.js';
|
|
4
|
+
} from '#src/mapping/jobScorer.js';
|
|
5
5
|
import {
|
|
6
6
|
type JobScorerInput,
|
|
7
7
|
type JobScorerOutput,
|
|
8
8
|
JobScorerOutputSchema,
|
|
9
|
-
} from 'src/types/jobScorer.js';
|
|
9
|
+
} from '#src/types/jobScorer.js';
|
|
10
10
|
import type {
|
|
11
11
|
JobPublishedEvent,
|
|
12
12
|
JobScoredEvent,
|
|
13
|
-
} from 'src/types/pipelineEvents.js';
|
|
13
|
+
} from '#src/types/pipelineEvents.js';
|
|
14
14
|
|
|
15
15
|
/* istanbul ignore next: simulation of an external service */
|
|
16
16
|
export const scoringService = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { PublishCommand } from '@aws-sdk/client-sns';
|
|
2
2
|
|
|
3
|
-
import { sns } from 'src/testing/services.js';
|
|
4
|
-
import { chance } from 'src/testing/types.js';
|
|
5
|
-
|
|
6
3
|
import { sendPipelineEvent } from './pipelineEventSender.js';
|
|
7
4
|
|
|
5
|
+
import { sns } from '#src/testing/services.js';
|
|
6
|
+
import { chance } from '#src/testing/types.js';
|
|
7
|
+
|
|
8
8
|
describe('sendPipelineEvent', () => {
|
|
9
9
|
afterEach(() => {
|
|
10
10
|
jest.clearAllMocks();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PublishCommand } from '@aws-sdk/client-sns';
|
|
2
2
|
|
|
3
|
-
import { config } from 'src/config.js';
|
|
4
|
-
|
|
5
3
|
import { sns } from './aws.js';
|
|
6
4
|
|
|
5
|
+
import { config } from '#src/config.js';
|
|
6
|
+
|
|
7
7
|
export const sendPipelineEvent = async (
|
|
8
8
|
event: unknown,
|
|
9
9
|
smokeTest: boolean = false,
|
|
@@ -3,8 +3,8 @@ import 'aws-sdk-client-mock-jest';
|
|
|
3
3
|
import { PublishCommand } from '@aws-sdk/client-sns';
|
|
4
4
|
import { mockClient } from 'aws-sdk-client-mock';
|
|
5
5
|
|
|
6
|
-
import { sns as snsClient } from 'src/services/aws.js';
|
|
7
|
-
import * as jobScorer from 'src/services/jobScorer.js';
|
|
6
|
+
import { sns as snsClient } from '#src/services/aws.js';
|
|
7
|
+
import * as jobScorer from '#src/services/jobScorer.js';
|
|
8
8
|
|
|
9
9
|
export const scoringService = {
|
|
10
10
|
request: jest.fn(),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Chance } from 'chance';
|
|
2
2
|
import * as z from 'zod/v4';
|
|
3
3
|
|
|
4
|
-
import type { JobPublishedEvent } from 'src/types/pipelineEvents.js';
|
|
4
|
+
import type { JobPublishedEvent } from '#src/types/pipelineEvents.js';
|
|
5
5
|
|
|
6
6
|
export type IdDescription = z.infer<typeof IdDescriptionSchema>;
|
|
7
7
|
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
+
"customConditions": ["@seek/<%- serviceName %>/source"],
|
|
3
4
|
"baseUrl": ".",
|
|
5
|
+
"module": "node18",
|
|
6
|
+
"moduleResolution": "node16",
|
|
4
7
|
"lib": ["ES2024"],
|
|
5
8
|
"outDir": "lib",
|
|
6
|
-
"
|
|
7
|
-
"src": ["src"]
|
|
8
|
-
},
|
|
9
|
+
"rootDir": ".",
|
|
9
10
|
"target": "ES2024"
|
|
10
11
|
},
|
|
11
12
|
"exclude": ["lib*/**/*"],
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
"name": "<%- moduleName %>",
|
|
3
3
|
"version": "0.0.0-semantically-released",
|
|
4
4
|
"description": "<%- description %>",
|
|
5
|
+
"imports": {
|
|
6
|
+
"#src/*": {
|
|
7
|
+
"@seek/<%- serviceName %>/source": "./src/*",
|
|
8
|
+
"default": "./lib/*"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
5
11
|
"repository": {
|
|
6
12
|
"type": "git",
|
|
7
13
|
"url": "git+ssh://git@github.com/<%- orgName %>/<%- repoName %>.git"
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
"name": "<%- moduleName %>",
|
|
3
3
|
"version": "0.0.0-semantically-released",
|
|
4
4
|
"description": "<%- description %>",
|
|
5
|
+
"imports": {
|
|
6
|
+
"#src/*": {
|
|
7
|
+
"@seek/<%- serviceName %>/source": "./src/*",
|
|
8
|
+
"default": "./lib/*"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
5
11
|
"repository": {
|
|
6
12
|
"type": "git",
|
|
7
13
|
"url": "git+ssh://git@github.com/<%- orgName %>/<%- repoName %>.git"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import 'skuba-dive/register';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import 'skuba-dive/register';
|