skuba 12.0.2 → 13.0.0-subpath-imports-20250721062938
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/11.1.0/index.d.ts +2 -0
- package/lib/cli/lint/internalLints/upgrade/patches/11.1.0/index.js +35 -0
- package/lib/cli/lint/internalLints/upgrade/patches/11.1.0/index.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/11.1.0/rewriteSrcImports.d.ts +6 -0
- package/lib/cli/lint/internalLints/upgrade/patches/11.1.0/rewriteSrcImports.js +104 -0
- package/lib/cli/lint/internalLints/upgrade/patches/11.1.0/rewriteSrcImports.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 +1 -0
- package/template/base/jest.config.ts +12 -3
- 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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { StatsD } from 'hot-shots';
|
|
2
2
|
import { createStatsDClient } from 'seek-datadog-custom-metrics';
|
|
3
3
|
|
|
4
|
-
import { config } from 'src/config.js';
|
|
5
|
-
|
|
6
4
|
import { logger } from './logging.js';
|
|
7
5
|
|
|
6
|
+
import { config } from '#src/config.js';
|
|
7
|
+
|
|
8
8
|
/* istanbul ignore next: StatsD client is not our responsibility */
|
|
9
9
|
export const metricsClient = createStatsDClient(StatsD, config, (err) =>
|
|
10
10
|
logger.error({ err }, 'StatsD error'),
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
"name": "@seek/greeter",
|
|
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
|
"build": "skuba build",
|
|
7
13
|
"format": "skuba format",
|
|
@@ -17,7 +23,7 @@
|
|
|
17
23
|
},
|
|
18
24
|
"devDependencies": {
|
|
19
25
|
"@types/node": "^22.13.10",
|
|
20
|
-
"skuba": "
|
|
26
|
+
"skuba": "13.0.0-subpath-imports-20250721062938"
|
|
21
27
|
},
|
|
22
28
|
"packageManager": "pnpm@10.12.4",
|
|
23
29
|
"engines": {
|
|
@@ -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
|
"build": "skuba build",
|
|
7
13
|
"format": "skuba format",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { logger } from 'src/framework/logging.js';
|
|
2
|
-
import { metricsClient } from 'src/framework/metrics.js';
|
|
3
|
-
import * as storage from 'src/storage/jobs.js';
|
|
4
|
-
import type { Middleware } from 'src/types/koa.js';
|
|
1
|
+
import { logger } from '#src/framework/logging.js';
|
|
2
|
+
import { metricsClient } from '#src/framework/metrics.js';
|
|
3
|
+
import * as storage from '#src/storage/jobs.js';
|
|
4
|
+
import type { Middleware } from '#src/types/koa.js';
|
|
5
5
|
|
|
6
6
|
export const getJobsHandler: Middleware = async (ctx) => {
|
|
7
7
|
const jobs = await storage.readJobs();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import Router from '@koa/router';
|
|
2
2
|
|
|
3
|
-
import { jsonBodyParser } from 'src/framework/bodyParser.js';
|
|
4
|
-
|
|
5
3
|
import { getJobsHandler } from './getJobs.js';
|
|
6
4
|
import { postJobHandler } from './postJob.js';
|
|
7
5
|
|
|
6
|
+
import { jsonBodyParser } from '#src/framework/bodyParser.js';
|
|
7
|
+
|
|
8
8
|
export const jobRouter = new Router()
|
|
9
9
|
.get('/', getJobsHandler)
|
|
10
10
|
.post('/', jsonBodyParser, postJobHandler);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { agentFromRouter } from 'src/testing/server.js';
|
|
2
|
-
import { mockJobInput } from 'src/testing/types.js';
|
|
3
|
-
|
|
4
1
|
import { jobRouter } from './index.js';
|
|
5
2
|
|
|
3
|
+
import { agentFromRouter } from '#src/testing/server.js';
|
|
4
|
+
import { mockJobInput } from '#src/testing/types.js';
|
|
5
|
+
|
|
6
6
|
const agent = agentFromRouter(jobRouter);
|
|
7
7
|
|
|
8
8
|
describe('postJobHandler', () => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { logger } from 'src/framework/logging.js';
|
|
2
|
-
import { metricsClient } from 'src/framework/metrics.js';
|
|
3
|
-
import { validateRequestBody } from 'src/framework/validation.js';
|
|
4
|
-
import * as storage from 'src/storage/jobs.js';
|
|
5
|
-
import { JobInputSchema } from 'src/types/jobs.js';
|
|
6
|
-
import type { Middleware } from 'src/types/koa.js';
|
|
1
|
+
import { logger } from '#src/framework/logging.js';
|
|
2
|
+
import { metricsClient } from '#src/framework/metrics.js';
|
|
3
|
+
import { validateRequestBody } from '#src/framework/validation.js';
|
|
4
|
+
import * as storage from '#src/storage/jobs.js';
|
|
5
|
+
import { JobInputSchema } from '#src/types/jobs.js';
|
|
6
|
+
import type { Middleware } from '#src/types/koa.js';
|
|
7
7
|
|
|
8
8
|
export const postJobHandler: Middleware = async (ctx) => {
|
|
9
9
|
const jobInput = validateRequestBody(ctx, JobInputSchema);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { smokeTestJobStorage } from 'src/storage/jobs.js';
|
|
2
|
-
import type { Middleware } from 'src/types/koa.js';
|
|
1
|
+
import { smokeTestJobStorage } from '#src/storage/jobs.js';
|
|
2
|
+
import type { Middleware } from '#src/types/koa.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Tests connectivity to ensure appropriate access and network configuration.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import createLogger, { createDestination } from '@seek/logger';
|
|
2
2
|
import { RequestLogging } from 'seek-koala';
|
|
3
3
|
|
|
4
|
-
import { config } from 'src/config.js';
|
|
4
|
+
import { config } from '#src/config.js';
|
|
5
5
|
|
|
6
6
|
const { createContextMiddleware, mixin } =
|
|
7
7
|
RequestLogging.createContextStorage();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { StatsD } from 'hot-shots';
|
|
2
2
|
import { createStatsDClient } from 'seek-datadog-custom-metrics';
|
|
3
3
|
|
|
4
|
-
import { config } from 'src/config.js';
|
|
5
|
-
|
|
6
4
|
import { logger } from './logging.js';
|
|
7
5
|
|
|
6
|
+
import { config } from '#src/config.js';
|
|
7
|
+
|
|
8
8
|
/* istanbul ignore next: StatsD client is not our responsibility */
|
|
9
9
|
export const metricsClient = createStatsDClient(StatsD, config, (err) =>
|
|
10
10
|
logger.error({ err }, 'StatsD error'),
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import Router from '@koa/router';
|
|
2
2
|
|
|
3
|
-
import { metricsClient } from 'src/testing/metrics.js';
|
|
4
|
-
import { agentFromRouter } from 'src/testing/server.js';
|
|
5
|
-
import { chance } from 'src/testing/types.js';
|
|
6
|
-
import type { Middleware } from 'src/types/koa.js';
|
|
7
|
-
|
|
8
3
|
import { stdoutMock } from './logging.js';
|
|
9
4
|
|
|
5
|
+
import { metricsClient } from '#src/testing/metrics.js';
|
|
6
|
+
import { agentFromRouter } from '#src/testing/server.js';
|
|
7
|
+
import { chance } from '#src/testing/types.js';
|
|
8
|
+
import type { Middleware } from '#src/types/koa.js';
|
|
9
|
+
|
|
10
10
|
const middleware = jest.fn<void, Parameters<Middleware>>();
|
|
11
11
|
|
|
12
12
|
const router = new Router()
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
VersionMiddleware,
|
|
9
9
|
} from 'seek-koala';
|
|
10
10
|
|
|
11
|
-
import { config } from 'src/config.js';
|
|
12
|
-
import { contextMiddleware, logger } from 'src/framework/logging.js';
|
|
13
|
-
import { metricsClient } from 'src/framework/metrics.js';
|
|
11
|
+
import { config } from '#src/config.js';
|
|
12
|
+
import { contextMiddleware, logger } from '#src/framework/logging.js';
|
|
13
|
+
import { metricsClient } from '#src/framework/metrics.js';
|
|
14
14
|
|
|
15
15
|
const metrics = MetricsMiddleware.create(
|
|
16
16
|
metricsClient,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsonBodyParser } from './bodyParser.js';
|
|
2
|
+
import { validate } from './validation.js';
|
|
3
|
+
|
|
4
|
+
import { agentFromMiddleware } from '#src/testing/server.js';
|
|
2
5
|
import {
|
|
3
6
|
IdDescriptionSchema,
|
|
4
7
|
chance,
|
|
5
8
|
mockIdDescription,
|
|
6
|
-
} from 'src/testing/types.js';
|
|
7
|
-
|
|
8
|
-
import { jsonBodyParser } from './bodyParser.js';
|
|
9
|
-
import { validate } from './validation.js';
|
|
9
|
+
} from '#src/testing/types.js';
|
|
10
10
|
|
|
11
11
|
const agent = agentFromMiddleware(jsonBodyParser, (ctx) => {
|
|
12
12
|
const result = validate({
|
|
@@ -2,7 +2,7 @@ import { ErrorMiddleware } from 'seek-koala';
|
|
|
2
2
|
import type * as z from 'zod/v4';
|
|
3
3
|
import type * as core from 'zod/v4/core';
|
|
4
4
|
|
|
5
|
-
import type { Context } from 'src/types/koa.js';
|
|
5
|
+
import type { Context } from '#src/types/koa.js';
|
|
6
6
|
|
|
7
7
|
type InvalidFields = Record<string, string>;
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import type Router from '@koa/router';
|
|
|
2
2
|
import type Koa from 'koa';
|
|
3
3
|
import request from 'supertest';
|
|
4
4
|
|
|
5
|
-
import { createApp } from 'src/framework/server.js';
|
|
5
|
+
import { createApp } from '#src/framework/server.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Create a new SuperTest agent from a Koa application.
|
|
@@ -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-subpath-imports-20250721062938"
|
|
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';
|