skuba 9.2.0-old-lang-opts-20250115050141 → 10.0.0-main-20250312042528

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.
Files changed (105) hide show
  1. package/lib/cli/configure/analyseDependencies.js +4 -1
  2. package/lib/cli/configure/analyseDependencies.js.map +2 -2
  3. package/lib/cli/init/index.js +2 -2
  4. package/lib/cli/init/index.js.map +2 -2
  5. package/lib/cli/init/prompts.d.ts +1 -1
  6. package/lib/cli/lint/internal.js +2 -1
  7. package/lib/cli/lint/internal.js.map +2 -2
  8. package/lib/cli/lint/internalLints/detectBadCodeowners.d.ts +4 -0
  9. package/lib/cli/lint/internalLints/detectBadCodeowners.js +72 -0
  10. package/lib/cli/lint/internalLints/detectBadCodeowners.js.map +7 -0
  11. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.d.ts +2 -0
  12. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js +35 -0
  13. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js.map +7 -0
  14. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.d.ts +2 -0
  15. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js +59 -0
  16. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js.map +7 -0
  17. package/lib/cli/migrate/index.js +10 -1
  18. package/lib/cli/migrate/index.js.map +2 -2
  19. package/lib/cli/migrate/nodeVersion/checks.d.ts +14 -0
  20. package/lib/cli/migrate/nodeVersion/checks.js +165 -0
  21. package/lib/cli/migrate/nodeVersion/checks.js.map +7 -0
  22. package/lib/cli/migrate/nodeVersion/getNodeTypesVersion.d.ts +6 -0
  23. package/lib/cli/migrate/nodeVersion/getNodeTypesVersion.js +58 -0
  24. package/lib/cli/migrate/nodeVersion/getNodeTypesVersion.js.map +7 -0
  25. package/lib/cli/migrate/nodeVersion/index.d.ts +5 -1
  26. package/lib/cli/migrate/nodeVersion/index.js +119 -36
  27. package/lib/cli/migrate/nodeVersion/index.js.map +2 -2
  28. package/lib/index.js +3 -3
  29. package/lib/utils/copy.d.ts +1 -1
  30. package/lib/utils/copy.js +11 -3
  31. package/lib/utils/copy.js.map +2 -2
  32. package/lib/utils/template.d.ts +2 -2
  33. package/lib/utils/template.js +0 -5
  34. package/lib/utils/template.js.map +2 -2
  35. package/lib/utils/version.d.ts +17 -1
  36. package/lib/utils/version.js +48 -18
  37. package/lib/utils/version.js.map +3 -3
  38. package/package.json +17 -19
  39. package/template/base/tsconfig.json +2 -2
  40. package/template/express-rest-api/.buildkite/pipeline.yml +4 -4
  41. package/template/express-rest-api/.gantry/common.yml +1 -3
  42. package/template/express-rest-api/.nvmrc +1 -1
  43. package/template/express-rest-api/Dockerfile +1 -1
  44. package/template/express-rest-api/Dockerfile.dev-deps +2 -2
  45. package/template/express-rest-api/package.json +4 -4
  46. package/template/greeter/.buildkite/pipeline.yml +1 -1
  47. package/template/greeter/.nvmrc +1 -1
  48. package/template/greeter/Dockerfile +2 -2
  49. package/template/greeter/README.md +1 -1
  50. package/template/greeter/package.json +4 -4
  51. package/template/koa-rest-api/.buildkite/pipeline.yml +4 -4
  52. package/template/koa-rest-api/.gantry/common.yml +1 -3
  53. package/template/koa-rest-api/.nvmrc +1 -1
  54. package/template/koa-rest-api/Dockerfile +1 -1
  55. package/template/koa-rest-api/Dockerfile.dev-deps +2 -2
  56. package/template/koa-rest-api/package.json +3 -3
  57. package/template/koa-rest-api/tsconfig.json +2 -2
  58. package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +2 -2
  59. package/template/lambda-sqs-worker-cdk/.nvmrc +1 -1
  60. package/template/lambda-sqs-worker-cdk/Dockerfile +3 -3
  61. package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +2 -2
  62. package/template/lambda-sqs-worker-cdk/infra/appStack.ts +4 -4
  63. package/template/lambda-sqs-worker-cdk/infra/config.ts +1 -1
  64. package/template/lambda-sqs-worker-cdk/infra/index.ts +3 -5
  65. package/template/lambda-sqs-worker-cdk/package.json +6 -6
  66. package/template/lambda-sqs-worker-cdk/tsconfig.json +2 -2
  67. package/template/oss-npm-package/.github/workflows/release.yml +1 -1
  68. package/template/oss-npm-package/.github/workflows/validate.yml +1 -1
  69. package/template/oss-npm-package/.nvmrc +1 -1
  70. package/template/oss-npm-package/_package.json +1 -1
  71. package/template/private-npm-package/.nvmrc +1 -1
  72. package/template/private-npm-package/_package.json +2 -2
  73. package/template/lambda-sqs-worker/.buildkite/pipeline.yml +0 -108
  74. package/template/lambda-sqs-worker/.env +0 -1
  75. package/template/lambda-sqs-worker/.nvmrc +0 -1
  76. package/template/lambda-sqs-worker/Dockerfile +0 -17
  77. package/template/lambda-sqs-worker/README.md +0 -132
  78. package/template/lambda-sqs-worker/_.npmrc +0 -13
  79. package/template/lambda-sqs-worker/docker-compose.yml +0 -10
  80. package/template/lambda-sqs-worker/package.json +0 -45
  81. package/template/lambda-sqs-worker/serverless.yml +0 -213
  82. package/template/lambda-sqs-worker/skuba.template.js +0 -33
  83. package/template/lambda-sqs-worker/src/app.test.ts +0 -116
  84. package/template/lambda-sqs-worker/src/app.ts +0 -57
  85. package/template/lambda-sqs-worker/src/config.ts +0 -62
  86. package/template/lambda-sqs-worker/src/framework/handler.test.ts +0 -61
  87. package/template/lambda-sqs-worker/src/framework/handler.ts +0 -43
  88. package/template/lambda-sqs-worker/src/framework/logging.ts +0 -27
  89. package/template/lambda-sqs-worker/src/framework/metrics.ts +0 -14
  90. package/template/lambda-sqs-worker/src/framework/validation.test.ts +0 -84
  91. package/template/lambda-sqs-worker/src/framework/validation.ts +0 -10
  92. package/template/lambda-sqs-worker/src/hooks.ts +0 -95
  93. package/template/lambda-sqs-worker/src/mapping/jobScorer.ts +0 -22
  94. package/template/lambda-sqs-worker/src/services/aws.ts +0 -5
  95. package/template/lambda-sqs-worker/src/services/jobScorer.test.ts +0 -44
  96. package/template/lambda-sqs-worker/src/services/jobScorer.ts +0 -59
  97. package/template/lambda-sqs-worker/src/services/pipelineEventSender.test.ts +0 -40
  98. package/template/lambda-sqs-worker/src/services/pipelineEventSender.ts +0 -33
  99. package/template/lambda-sqs-worker/src/testing/handler.ts +0 -13
  100. package/template/lambda-sqs-worker/src/testing/logging.ts +0 -19
  101. package/template/lambda-sqs-worker/src/testing/services.ts +0 -28
  102. package/template/lambda-sqs-worker/src/testing/types.ts +0 -33
  103. package/template/lambda-sqs-worker/src/types/jobScorer.ts +0 -15
  104. package/template/lambda-sqs-worker/src/types/pipelineEvents.ts +0 -21
  105. package/template/lambda-sqs-worker/tsconfig.json +0 -13
@@ -1,19 +0,0 @@
1
- import * as logging from 'src/framework/logging';
2
-
3
- export const logger = {
4
- error: jest.fn(),
5
- info: jest.fn(),
6
- debug: jest.fn(),
7
-
8
- clear: () => {
9
- logger.error.mockClear();
10
- logger.info.mockClear();
11
- logger.debug.mockClear();
12
- },
13
-
14
- spy: () => {
15
- jest.spyOn(logging.logger, 'error').mockImplementation(logger.error);
16
- jest.spyOn(logging.logger, 'info').mockImplementation(logger.info);
17
- jest.spyOn(logging.logger, 'debug').mockImplementation(logger.debug);
18
- },
19
- };
@@ -1,28 +0,0 @@
1
- import 'aws-sdk-client-mock-jest';
2
-
3
- import { PublishCommand } from '@aws-sdk/client-sns';
4
- import { mockClient } from 'aws-sdk-client-mock';
5
-
6
- import { sns as snsClient } from 'src/services/aws';
7
- import * as jobScorer from 'src/services/jobScorer';
8
-
9
- export const scoringService = {
10
- request: jest.fn(),
11
-
12
- clear: () => scoringService.request.mockClear(),
13
-
14
- spy: () =>
15
- jest
16
- .spyOn(jobScorer.scoringService, 'request')
17
- .mockImplementation(scoringService.request),
18
- };
19
-
20
- const snsMock = mockClient(snsClient);
21
-
22
- export const sns = {
23
- publish: snsMock.on(PublishCommand),
24
-
25
- clear: () => snsMock.resetHistory(),
26
-
27
- client: snsMock,
28
- };
@@ -1,33 +0,0 @@
1
- import { Chance } from 'chance';
2
- import { z } from 'zod';
3
-
4
- import type { JobPublishedEvent } from 'src/types/pipelineEvents';
5
-
6
- export type IdDescription = z.infer<typeof IdDescriptionSchema>;
7
-
8
- export const IdDescriptionSchema = z.object({
9
- id: z.string(),
10
- description: z.string(),
11
- });
12
-
13
- export const chance = new Chance();
14
-
15
- export const mockIdDescription = (): IdDescription => ({
16
- id: chance.guid({ version: 4 }),
17
- description: chance.sentence(),
18
- });
19
-
20
- export const mockIdDescriptionJson = (): string =>
21
- JSON.stringify(mockIdDescription());
22
-
23
- export const mockJobPublishedEvent = ({
24
- entityId,
25
- }: {
26
- entityId: string;
27
- }): JobPublishedEvent => ({
28
- data: {
29
- details: chance.paragraph(),
30
- },
31
- entityId,
32
- eventType: 'JobPublished',
33
- });
@@ -1,15 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- export type JobScorerInput = z.infer<typeof JobScorerInputSchema>;
4
-
5
- export const JobScorerInputSchema = z.object({
6
- id: z.string(),
7
- details: z.string(),
8
- });
9
-
10
- export type JobScorerOutput = z.infer<typeof JobScorerOutputSchema>;
11
-
12
- export const JobScorerOutputSchema = z.object({
13
- id: z.string(),
14
- score: z.number(),
15
- });
@@ -1,21 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- export type JobPublishedEvent = z.infer<typeof JobPublishedEventSchema>;
4
-
5
- export const JobPublishedEventSchema = z.object({
6
- data: z.object({
7
- details: z.string(),
8
- }),
9
- entityId: z.string(),
10
- eventType: z.literal('JobPublished'),
11
- });
12
-
13
- export type JobScoredEvent = z.infer<typeof JobScoredEventSchema>;
14
-
15
- export const JobScoredEventSchema = z.object({
16
- data: z.object({
17
- score: z.number(),
18
- }),
19
- entityId: z.string(),
20
- eventType: z.literal('JobScored'),
21
- });
@@ -1,13 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "baseUrl": ".",
4
- "lib": ["ES2022"],
5
- "outDir": "lib",
6
- "paths": {
7
- "src": ["src"]
8
- },
9
- "target": "ES2022"
10
- },
11
- "exclude": ["lib*/**/*"],
12
- "extends": "skuba/config/tsconfig.json"
13
- }