skuba 14.0.0-migrate-to-inquirer-20251031060542 → 14.0.0-node-24-20251204234639
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/lib/cli/adapter/eslint.js +3 -3
- package/lib/cli/adapter/eslint.js.map +3 -3
- package/lib/cli/build/assets.d.ts +3 -2
- package/lib/cli/build/assets.js +2 -2
- package/lib/cli/build/assets.js.map +3 -3
- package/lib/cli/build/index.js +3 -13
- package/lib/cli/build/index.js.map +3 -3
- package/lib/cli/build/tsc.js +1 -2
- package/lib/cli/build/tsc.js.map +2 -2
- package/lib/cli/configure/analysis/diff.js +3 -13
- package/lib/cli/configure/analysis/diff.js.map +3 -3
- package/lib/cli/configure/ensureTemplateCompletion.js +5 -2
- package/lib/cli/configure/ensureTemplateCompletion.js.map +3 -3
- package/lib/cli/configure/getEntryPoint.js +3 -3
- package/lib/cli/configure/getEntryPoint.js.map +3 -3
- package/lib/cli/configure/index.js +3 -3
- package/lib/cli/configure/index.js.map +2 -2
- package/lib/cli/format/index.js +4 -14
- package/lib/cli/format/index.js.map +3 -3
- package/lib/cli/init/getConfig.js +8 -10
- package/lib/cli/init/getConfig.js.map +3 -3
- package/lib/cli/init/prompts.d.ts +4 -4
- package/lib/cli/init/prompts.js +8 -8
- package/lib/cli/init/prompts.js.map +2 -2
- package/lib/cli/lint/eslint.js +2 -2
- package/lib/cli/lint/eslint.js.map +3 -3
- package/lib/cli/lint/index.js +1 -3
- package/lib/cli/lint/index.js.map +2 -2
- package/lib/cli/lint/internal.js +6 -14
- package/lib/cli/lint/internal.js.map +3 -3
- package/lib/cli/lint/internalLints/noSkubaTemplateJs.js +1 -3
- package/lib/cli/lint/internalLints/noSkubaTemplateJs.js.map +2 -2
- package/lib/cli/lint/internalLints/refreshConfigFiles.js +1 -3
- package/lib/cli/lint/internalLints/refreshConfigFiles.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/index.js +1 -3
- package/lib/cli/lint/internalLints/upgrade/index.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js +14 -11
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/{9.1.0 → 13.1.1}/index.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/{9.1.0 → 13.1.1}/index.js.map +3 -3
- package/lib/cli/lint/internalLints/upgrade/patches/{9.1.0 → 13.1.1}/upgradeNode.js +2 -5
- package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/upgradeNode.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js +0 -5
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js.map +2 -2
- package/lib/cli/lint/prettier.js +2 -2
- package/lib/cli/lint/prettier.js.map +3 -3
- package/lib/cli/migrate/index.d.ts +5 -0
- package/lib/cli/migrate/index.js +38 -6
- package/lib/cli/migrate/index.js.map +2 -2
- package/lib/cli/migrate/nodeVersion/checks.d.ts +1 -14
- package/lib/cli/migrate/nodeVersion/checks.js +24 -133
- package/lib/cli/migrate/nodeVersion/checks.js.map +3 -3
- package/lib/cli/migrate/nodeVersion/index.d.ts +8 -2
- package/lib/cli/migrate/nodeVersion/index.js +193 -49
- package/lib/cli/migrate/nodeVersion/index.js.map +2 -2
- package/lib/cli/migrate/nodeVersion/upgrade.d.ts +8 -0
- package/lib/cli/migrate/nodeVersion/upgrade.js +144 -0
- package/lib/cli/migrate/nodeVersion/upgrade.js.map +7 -0
- package/lib/utils/exec.d.ts +3 -2
- package/lib/utils/exec.js +1 -1
- package/lib/utils/exec.js.map +2 -2
- package/lib/utils/fs.js +1 -1
- package/lib/utils/fs.js.map +2 -2
- package/lib/utils/logging.d.ts +9 -10
- package/lib/utils/logging.js +9 -19
- package/lib/utils/logging.js.map +3 -3
- package/lib/utils/logo.js +11 -18
- package/lib/utils/logo.js.map +3 -3
- package/lib/utils/worker.d.ts +3 -3
- package/lib/wrapper/http.d.ts +0 -6
- package/lib/wrapper/http.js +4 -12
- package/lib/wrapper/http.js.map +2 -2
- package/lib/wrapper/requestListener.js +3 -2
- package/lib/wrapper/requestListener.js.map +2 -2
- package/lib/wrapper/server.d.ts +7 -0
- package/lib/wrapper/server.js +35 -0
- package/lib/wrapper/server.js.map +7 -0
- package/package.json +16 -26
- package/template/base/_pnpm-workspace.yaml +2 -0
- package/template/express-rest-api/.buildkite/pipeline.yml +1 -1
- package/template/express-rest-api/.nvmrc +1 -1
- package/template/express-rest-api/package.json +6 -6
- package/template/greeter/.buildkite/pipeline.yml +1 -1
- package/template/greeter/.nvmrc +1 -1
- package/template/greeter/package.json +4 -4
- package/template/koa-rest-api/.buildkite/pipeline.yml +1 -1
- package/template/koa-rest-api/.nvmrc +1 -1
- package/template/koa-rest-api/package.json +6 -6
- package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +2 -2
- package/template/lambda-sqs-worker-cdk/.nvmrc +1 -1
- package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +2 -4
- package/template/lambda-sqs-worker-cdk/infra/appStack.ts +1 -1
- package/template/lambda-sqs-worker-cdk/infra/config.ts +2 -4
- package/template/lambda-sqs-worker-cdk/package.json +5 -4
- package/template/lambda-sqs-worker-cdk/skuba.template.js +12 -0
- package/template/oss-npm-package/.github/workflows/release.yml +1 -1
- package/template/oss-npm-package/.github/workflows/validate.yml +1 -1
- package/template/oss-npm-package/.nvmrc +1 -1
- package/template/private-npm-package/.nvmrc +1 -1
- package/template/private-npm-package/_package.json +1 -1
- package/template/private-npm-package/skuba.template.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.d.ts +0 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.js +0 -144
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.js.map +0 -7
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js.map +0 -7
- package/lib/eslint.d.js +0 -2
- package/lib/eslint.d.js.map +0 -7
- /package/lib/cli/lint/internalLints/upgrade/patches/{9.1.0 → 13.1.1}/index.d.ts +0 -0
- /package/lib/cli/lint/internalLints/upgrade/patches/{9.1.0 → 13.1.1}/upgradeNode.d.ts +0 -0
package/lib/utils/fs.js
CHANGED
|
@@ -35,7 +35,7 @@ var import_fs_extra = __toESM(require("fs-extra"));
|
|
|
35
35
|
var import_error = require("./error.js");
|
|
36
36
|
const pathExists = async (filePath) => {
|
|
37
37
|
try {
|
|
38
|
-
await import_fs_extra.default.access(filePath);
|
|
38
|
+
await import_fs_extra.default.promises.access(filePath);
|
|
39
39
|
return true;
|
|
40
40
|
} catch (error) {
|
|
41
41
|
if ((0, import_error.isErrorWithCode)(error, "ENOENT")) {
|
package/lib/utils/fs.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/fs.ts"],
|
|
4
|
-
"sourcesContent": ["import fs from 'fs-extra';\n\nimport { isErrorWithCode } from './error.js';\n\nexport const pathExists = async (filePath: string): Promise<boolean> => {\n try {\n await fs.access(filePath);\n\n return true; // Path exists and is accessible\n } catch (error: unknown) {\n if (isErrorWithCode(error, 'ENOENT')) {\n return false; // Path does not exist\n }\n\n throw error; // Other errors (include permission issues)\n }\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAe;AAEf,mBAAgC;AAEzB,MAAM,aAAa,OAAO,aAAuC;AACtE,MAAI;AACF,UAAM,gBAAAA,QAAG,OAAO,QAAQ;
|
|
4
|
+
"sourcesContent": ["import fs from 'fs-extra';\n\nimport { isErrorWithCode } from './error.js';\n\nexport const pathExists = async (filePath: string): Promise<boolean> => {\n try {\n await fs.promises.access(filePath);\n\n return true; // Path exists and is accessible\n } catch (error: unknown) {\n if (isErrorWithCode(error, 'ENOENT')) {\n return false; // Path does not exist\n }\n\n throw error; // Other errors (include permission issues)\n }\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAe;AAEf,mBAAgC;AAEzB,MAAM,aAAa,OAAO,aAAuC;AACtE,MAAI;AACF,UAAM,gBAAAA,QAAG,SAAS,OAAO,QAAQ;AAEjC,WAAO;AAAA,EACT,SAAS,OAAgB;AACvB,YAAI,8BAAgB,OAAO,QAAQ,GAAG;AACpC,aAAO;AAAA,IACT;AAEA,UAAM;AAAA,EACR;AACF;",
|
|
6
6
|
"names": ["fs"]
|
|
7
7
|
}
|
package/lib/utils/logging.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
1
|
export type Logger = typeof log;
|
|
3
2
|
export declare const createLogger: ({ debug, prefixes, suffixes, }: {
|
|
4
3
|
debug: boolean;
|
|
@@ -10,9 +9,9 @@ export declare const createLogger: ({ debug, prefixes, suffixes, }: {
|
|
|
10
9
|
prefixes: unknown[];
|
|
11
10
|
suffixes: unknown[];
|
|
12
11
|
};
|
|
13
|
-
bold:
|
|
14
|
-
dim:
|
|
15
|
-
formatSubtle:
|
|
12
|
+
bold: (text: string) => string;
|
|
13
|
+
dim: (text: string) => string;
|
|
14
|
+
formatSubtle: (text: string) => string;
|
|
16
15
|
timing: (start: bigint, end: bigint) => string;
|
|
17
16
|
debug: (...message: unknown[]) => void;
|
|
18
17
|
subtle: (...message: unknown[]) => void;
|
|
@@ -28,9 +27,9 @@ export declare const log: {
|
|
|
28
27
|
prefixes: unknown[];
|
|
29
28
|
suffixes: unknown[];
|
|
30
29
|
};
|
|
31
|
-
bold:
|
|
32
|
-
dim:
|
|
33
|
-
formatSubtle:
|
|
30
|
+
bold: (text: string) => string;
|
|
31
|
+
dim: (text: string) => string;
|
|
32
|
+
formatSubtle: (text: string) => string;
|
|
34
33
|
timing: (start: bigint, end: bigint) => string;
|
|
35
34
|
debug: (...message: unknown[]) => void;
|
|
36
35
|
subtle: (...message: unknown[]) => void;
|
|
@@ -46,9 +45,9 @@ export declare const childLogger: (logger: Logger, settings: Partial<Logger["set
|
|
|
46
45
|
prefixes: unknown[];
|
|
47
46
|
suffixes: unknown[];
|
|
48
47
|
};
|
|
49
|
-
bold:
|
|
50
|
-
dim:
|
|
51
|
-
formatSubtle:
|
|
48
|
+
bold: (text: string) => string;
|
|
49
|
+
dim: (text: string) => string;
|
|
50
|
+
formatSubtle: (text: string) => string;
|
|
52
51
|
timing: (start: bigint, end: bigint) => string;
|
|
53
52
|
debug: (...message: unknown[]) => void;
|
|
54
53
|
subtle: (...message: unknown[]) => void;
|
package/lib/utils/logging.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
var logging_exports = {};
|
|
30
20
|
__export(logging_exports, {
|
|
@@ -34,7 +24,7 @@ __export(logging_exports, {
|
|
|
34
24
|
pluralise: () => pluralise
|
|
35
25
|
});
|
|
36
26
|
module.exports = __toCommonJS(logging_exports);
|
|
37
|
-
var
|
|
27
|
+
var import_node_util = require("node:util");
|
|
38
28
|
const createLogger = ({
|
|
39
29
|
debug,
|
|
40
30
|
prefixes = [],
|
|
@@ -44,17 +34,17 @@ const createLogger = ({
|
|
|
44
34
|
const log2 = (...message) => logWithoutSuffixes(...message, ...suffixes);
|
|
45
35
|
return {
|
|
46
36
|
settings: { debug, prefixes, suffixes },
|
|
47
|
-
bold:
|
|
48
|
-
dim:
|
|
49
|
-
formatSubtle:
|
|
37
|
+
bold: (text) => (0, import_node_util.styleText)("bold", text),
|
|
38
|
+
dim: (text) => (0, import_node_util.styleText)("dim", text),
|
|
39
|
+
formatSubtle: (text) => (0, import_node_util.styleText)("gray", text),
|
|
50
40
|
timing: (start, end) => `${Number((end - start) / BigInt(1e7)) / 100}s`,
|
|
51
|
-
debug: (...message) => debug ? log2(
|
|
52
|
-
subtle: (...message) => log2(
|
|
53
|
-
err: (...message) => log2(
|
|
41
|
+
debug: (...message) => debug ? log2(...message.map((m) => (0, import_node_util.styleText)("gray", String(m)))) : void 0,
|
|
42
|
+
subtle: (...message) => log2(...message.map((m) => (0, import_node_util.styleText)("gray", String(m)))),
|
|
43
|
+
err: (...message) => log2(...message.map((m) => (0, import_node_util.styleText)("red", String(m)))),
|
|
54
44
|
newline: () => logWithoutSuffixes(),
|
|
55
|
-
ok: (...message) => log2(
|
|
45
|
+
ok: (...message) => log2(...message.map((m) => (0, import_node_util.styleText)("green", String(m)))),
|
|
56
46
|
plain: (...message) => log2(...message),
|
|
57
|
-
warn: (...message) => log2(
|
|
47
|
+
warn: (...message) => log2(...message.map((m) => (0, import_node_util.styleText)("yellow", String(m))))
|
|
58
48
|
};
|
|
59
49
|
};
|
|
60
50
|
const log = createLogger({ debug: false });
|
package/lib/utils/logging.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/logging.ts"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable no-console */\n\nimport
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["log"
|
|
4
|
+
"sourcesContent": ["/* eslint-disable no-console */\n\nimport { styleText } from 'node:util';\n\nexport type Logger = typeof log;\n\nexport const createLogger = ({\n debug,\n prefixes = [],\n suffixes = [],\n}: {\n debug: boolean;\n prefixes?: unknown[];\n suffixes?: unknown[];\n}) => {\n const logWithoutSuffixes = (...message: unknown[]) =>\n console.log(...prefixes, ...message);\n\n const log = (...message: unknown[]) =>\n logWithoutSuffixes(...message, ...suffixes);\n\n return {\n settings: { debug, prefixes, suffixes },\n\n bold: (text: string) => styleText('bold', text),\n dim: (text: string) => styleText('dim', text),\n formatSubtle: (text: string) => styleText('gray', text),\n\n timing: (start: bigint, end: bigint) =>\n `${Number((end - start) / BigInt(10_000_000)) / 100}s`,\n\n debug: (...message: unknown[]) =>\n debug\n ? log(...message.map((m) => styleText('gray', String(m))))\n : undefined,\n subtle: (...message: unknown[]) =>\n log(...message.map((m) => styleText('gray', String(m)))),\n err: (...message: unknown[]) =>\n log(...message.map((m) => styleText('red', String(m)))),\n newline: () => logWithoutSuffixes(),\n ok: (...message: unknown[]) =>\n log(...message.map((m) => styleText('green', String(m)))),\n plain: (...message: unknown[]) => log(...message),\n warn: (...message: unknown[]) =>\n log(...message.map((m) => styleText('yellow', String(m)))),\n };\n};\n\nexport const log = createLogger({ debug: false });\n\nexport const childLogger = (\n logger: Logger,\n settings: Partial<Logger['settings']>,\n) =>\n createLogger({\n debug: settings.debug ?? logger.settings.debug,\n prefixes: [...(settings.prefixes ?? []), ...logger.settings.prefixes],\n suffixes: [...logger.settings.suffixes, ...(settings.suffixes ?? [])],\n });\n\nexport const pluralise = (count: number, subject: string) =>\n `${count} ${subject}${count === 1 ? '' : 's'}`;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,uBAA0B;AAInB,MAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA,WAAW,CAAC;AAAA,EACZ,WAAW,CAAC;AACd,MAIM;AACJ,QAAM,qBAAqB,IAAI,YAC7B,QAAQ,IAAI,GAAG,UAAU,GAAG,OAAO;AAErC,QAAMA,OAAM,IAAI,YACd,mBAAmB,GAAG,SAAS,GAAG,QAAQ;AAE5C,SAAO;AAAA,IACL,UAAU,EAAE,OAAO,UAAU,SAAS;AAAA,IAEtC,MAAM,CAAC,aAAiB,4BAAU,QAAQ,IAAI;AAAA,IAC9C,KAAK,CAAC,aAAiB,4BAAU,OAAO,IAAI;AAAA,IAC5C,cAAc,CAAC,aAAiB,4BAAU,QAAQ,IAAI;AAAA,IAEtD,QAAQ,CAAC,OAAe,QACtB,GAAG,QAAQ,MAAM,SAAS,OAAO,GAAU,CAAC,IAAI,GAAG;AAAA,IAErD,OAAO,IAAI,YACT,QACIA,KAAI,GAAG,QAAQ,IAAI,CAAC,UAAM,4BAAU,QAAQ,OAAO,CAAC,CAAC,CAAC,CAAC,IACvD;AAAA,IACN,QAAQ,IAAI,YACVA,KAAI,GAAG,QAAQ,IAAI,CAAC,UAAM,4BAAU,QAAQ,OAAO,CAAC,CAAC,CAAC,CAAC;AAAA,IACzD,KAAK,IAAI,YACPA,KAAI,GAAG,QAAQ,IAAI,CAAC,UAAM,4BAAU,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;AAAA,IACxD,SAAS,MAAM,mBAAmB;AAAA,IAClC,IAAI,IAAI,YACNA,KAAI,GAAG,QAAQ,IAAI,CAAC,UAAM,4BAAU,SAAS,OAAO,CAAC,CAAC,CAAC,CAAC;AAAA,IAC1D,OAAO,IAAI,YAAuBA,KAAI,GAAG,OAAO;AAAA,IAChD,MAAM,IAAI,YACRA,KAAI,GAAG,QAAQ,IAAI,CAAC,UAAM,4BAAU,UAAU,OAAO,CAAC,CAAC,CAAC,CAAC;AAAA,EAC7D;AACF;AAEO,MAAM,MAAM,aAAa,EAAE,OAAO,MAAM,CAAC;AAEzC,MAAM,cAAc,CACzB,QACA,aAEA,aAAa;AAAA,EACX,OAAO,SAAS,SAAS,OAAO,SAAS;AAAA,EACzC,UAAU,CAAC,GAAI,SAAS,YAAY,CAAC,GAAI,GAAG,OAAO,SAAS,QAAQ;AAAA,EACpE,UAAU,CAAC,GAAG,OAAO,SAAS,UAAU,GAAI,SAAS,YAAY,CAAC,CAAE;AACtE,CAAC;AAEI,MAAM,YAAY,CAAC,OAAe,YACvC,GAAG,KAAK,IAAI,OAAO,GAAG,UAAU,IAAI,KAAK,GAAG;",
|
|
6
|
+
"names": ["log"]
|
|
7
7
|
}
|
package/lib/utils/logo.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,30 +15,25 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
var logo_exports = {};
|
|
30
20
|
__export(logo_exports, {
|
|
31
21
|
showLogoAndVersionInfo: () => showLogoAndVersionInfo
|
|
32
22
|
});
|
|
33
23
|
module.exports = __toCommonJS(logo_exports);
|
|
34
|
-
var
|
|
24
|
+
var import_node_util = require("node:util");
|
|
35
25
|
var import_logging = require("./logging.js");
|
|
36
26
|
var import_packageManager = require("./packageManager.js");
|
|
37
27
|
var import_version = require("./version.js");
|
|
38
|
-
const LOGO =
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
\
|
|
42
|
-
\
|
|
43
|
-
|
|
28
|
+
const LOGO = (0, import_node_util.styleText)(
|
|
29
|
+
"blueBright",
|
|
30
|
+
`
|
|
31
|
+
\u256D\u2500\u256E ${(0, import_node_util.styleText)("magentaBright", " ")}\u256D\u2500\u256E
|
|
32
|
+
\u256D\u2500\u2500\u2500\u2502 \u2570\u2500${(0, import_node_util.styleText)("magentaBright", "\u256D\u2500\u252C\u2500\u256E")} \u2570\u2500\u256E\u2500\u2500\u2500\u256E
|
|
33
|
+
\u2502_ \u2500\u2524 <${(0, import_node_util.styleText)("magentaBright", "\u2502 \u2575 \u2502")} \u2022 \u2502 \u2022 \u2502
|
|
34
|
+
\u2570\u2500\u2500\u2500\u2570\u2500\u2534\u2500${(0, import_node_util.styleText)("magentaBright", "\u2570\u2500\u2500\u2500\u256F")}\u2500\u2500\u2500\u256F\u2500\u2500 \u2570
|
|
35
|
+
`
|
|
36
|
+
);
|
|
44
37
|
const showLogoAndVersionInfo = async () => {
|
|
45
38
|
const [versionInfo, packageManager] = await Promise.all([
|
|
46
39
|
(0, import_version.getSkubaVersionInfo)(),
|
|
@@ -59,7 +52,7 @@ const showLogoAndVersionInfo = async () => {
|
|
|
59
52
|
import_logging.log.warn("Consider upgrading:");
|
|
60
53
|
import_logging.log.newline();
|
|
61
54
|
import_logging.log.warn(
|
|
62
|
-
import_logging.log.bold(packageManager.print.update
|
|
55
|
+
import_logging.log.bold(`${packageManager.print.update} skuba@${versionInfo.latest}`)
|
|
63
56
|
);
|
|
64
57
|
import_logging.log.newline();
|
|
65
58
|
}
|
package/lib/utils/logo.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/logo.ts"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["import { styleText } from 'node:util';\n\nimport { log } from './logging.js';\nimport { detectPackageManager } from './packageManager.js';\nimport { getSkubaVersionInfo } from './version.js';\n\nconst LOGO = styleText(\n 'blueBright',\n `\n \u256D\u2500\u256E ${styleText('magentaBright', ' ')}\u256D\u2500\u256E\n\u256D\u2500\u2500\u2500\u2502 \u2570\u2500${styleText('magentaBright', '\u256D\u2500\u252C\u2500\u256E')} \u2570\u2500\u256E\u2500\u2500\u2500\u256E\n\u2502_ \u2500\u2524 <${styleText('magentaBright', '\u2502 \u2575 \u2502')} \u2022 \u2502 \u2022 \u2502\n\u2570\u2500\u2500\u2500\u2570\u2500\u2534\u2500${styleText('magentaBright', '\u2570\u2500\u2500\u2500\u256F')}\u2500\u2500\u2500\u256F\u2500\u2500 \u2570\n`,\n);\n\nexport const showLogoAndVersionInfo = async () => {\n const [versionInfo, packageManager] = await Promise.all([\n getSkubaVersionInfo(),\n detectPackageManager(),\n ]);\n\n log.plain(LOGO);\n log.subtle(\n log.bold(versionInfo.local),\n '|',\n 'latest',\n log.bold(versionInfo.latest ?? 'offline \u2708'),\n );\n log.newline();\n\n if (versionInfo.isStale) {\n log.warn('Your skuba installation is out of date.');\n log.warn('Consider upgrading:');\n log.newline();\n log.warn(\n log.bold(`${packageManager.print.update} skuba@${versionInfo.latest}`),\n );\n log.newline();\n }\n\n return versionInfo;\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAA0B;AAE1B,qBAAoB;AACpB,4BAAqC;AACrC,qBAAoC;AAEpC,MAAM,WAAO;AAAA,EACX;AAAA,EACA;AAAA,6BACQ,4BAAU,iBAAiB,MAAM,CAAC;AAAA,iDAClC,4BAAU,iBAAiB,gCAAO,CAAC;AAAA,6BACnC,4BAAU,iBAAiB,sBAAO,CAAC;AAAA,sDACnC,4BAAU,iBAAiB,gCAAO,CAAC;AAAA;AAE7C;AAEO,MAAM,yBAAyB,YAAY;AAChD,QAAM,CAAC,aAAa,cAAc,IAAI,MAAM,QAAQ,IAAI;AAAA,QACtD,oCAAoB;AAAA,QACpB,4CAAqB;AAAA,EACvB,CAAC;AAED,qBAAI,MAAM,IAAI;AACd,qBAAI;AAAA,IACF,mBAAI,KAAK,YAAY,KAAK;AAAA,IAC1B;AAAA,IACA;AAAA,IACA,mBAAI,KAAK,YAAY,UAAU,gBAAW;AAAA,EAC5C;AACA,qBAAI,QAAQ;AAEZ,MAAI,YAAY,SAAS;AACvB,uBAAI,KAAK,yCAAyC;AAClD,uBAAI,KAAK,qBAAqB;AAC9B,uBAAI,QAAQ;AACZ,uBAAI;AAAA,MACF,mBAAI,KAAK,GAAG,eAAe,MAAM,MAAM,UAAU,YAAY,MAAM,EAAE;AAAA,IACvE;AACA,uBAAI,QAAQ;AAAA,EACd;AAEA,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/lib/utils/worker.d.ts
CHANGED
|
@@ -12,9 +12,9 @@ export declare const postWorkerOutput: <Input, Output>(fn: (input: Input) => Pro
|
|
|
12
12
|
prefixes: unknown[];
|
|
13
13
|
suffixes: unknown[];
|
|
14
14
|
};
|
|
15
|
-
bold:
|
|
16
|
-
dim:
|
|
17
|
-
formatSubtle:
|
|
15
|
+
bold: (text: string) => string;
|
|
16
|
+
dim: (text: string) => string;
|
|
17
|
+
formatSubtle: (text: string) => string;
|
|
18
18
|
timing: (start: bigint, end: bigint) => string;
|
|
19
19
|
debug: (...message: unknown[]) => void;
|
|
20
20
|
subtle: (...message: unknown[]) => void;
|
package/lib/wrapper/http.d.ts
CHANGED
|
@@ -12,9 +12,3 @@ export declare const createRequestListenerFromFunction: (fn: (...args: unknown[]
|
|
|
12
12
|
* This function resolves when the server is closed.
|
|
13
13
|
*/
|
|
14
14
|
export declare const serveRequestListener: (requestListener: http.RequestListener, port?: number) => Promise<void>;
|
|
15
|
-
/**
|
|
16
|
-
* Returns a HTTP server wrapped in a promise
|
|
17
|
-
*
|
|
18
|
-
* This function resolves when the server is closed.
|
|
19
|
-
*/
|
|
20
|
-
export declare const startServer: (server: http.Server, port?: number) => Promise<void>;
|
package/lib/wrapper/http.js
CHANGED
|
@@ -29,13 +29,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
var http_exports = {};
|
|
30
30
|
__export(http_exports, {
|
|
31
31
|
createRequestListenerFromFunction: () => createRequestListenerFromFunction,
|
|
32
|
-
serveRequestListener: () => serveRequestListener
|
|
33
|
-
startServer: () => startServer
|
|
32
|
+
serveRequestListener: () => serveRequestListener
|
|
34
33
|
});
|
|
35
34
|
module.exports = __toCommonJS(http_exports);
|
|
36
35
|
var import_http = __toESM(require("http"));
|
|
37
36
|
var import_util = __toESM(require("util"));
|
|
38
|
-
var
|
|
37
|
+
var import_server = require("./server.js");
|
|
39
38
|
const createRequestListenerFromFunction = (fn) => async (req, res) => {
|
|
40
39
|
const writeResponse = (response) => new Promise(
|
|
41
40
|
(resolve, reject) => response === void 0 ? res.end(resolve) : res.write(
|
|
@@ -61,18 +60,11 @@ const createRequestListenerFromFunction = (fn) => async (req, res) => {
|
|
|
61
60
|
};
|
|
62
61
|
const serveRequestListener = (requestListener, port) => {
|
|
63
62
|
const server = import_http.default.createServer(requestListener);
|
|
64
|
-
return startServer(server, port);
|
|
63
|
+
return (0, import_server.startServer)(server, port);
|
|
65
64
|
};
|
|
66
|
-
const startServer = (server, port) => new Promise(
|
|
67
|
-
(resolve, reject) => server.listen(port).on("close", resolve).on("error", reject).on("listening", () => {
|
|
68
|
-
const address = server.address();
|
|
69
|
-
import_logging.log.ok("listening on port", import_logging.log.bold(address.port));
|
|
70
|
-
})
|
|
71
|
-
);
|
|
72
65
|
// Annotate the CommonJS export names for ESM import in node:
|
|
73
66
|
0 && (module.exports = {
|
|
74
67
|
createRequestListenerFromFunction,
|
|
75
|
-
serveRequestListener
|
|
76
|
-
startServer
|
|
68
|
+
serveRequestListener
|
|
77
69
|
});
|
|
78
70
|
//# sourceMappingURL=http.js.map
|
package/lib/wrapper/http.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/wrapper/http.ts"],
|
|
4
|
-
"sourcesContent": ["import http from 'http';\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA
|
|
4
|
+
"sourcesContent": ["import http from 'http';\nimport util from 'util';\n\nimport { startServer } from './server.js';\n\n/**\n * Create an HTTP request listener based on the supplied function.\n *\n * - The request body is JSON parsed and passed into the function as parameters.\n * - The function's return value is JSON stringified into the response body.\n */\nexport const createRequestListenerFromFunction =\n (fn: (...args: unknown[]) => Promise<unknown>): http.RequestListener =>\n async (req, res) => {\n const writeResponse = (response: unknown) =>\n new Promise<void>((resolve, reject) =>\n response === undefined\n ? res.end(resolve)\n : res.write(response, 'utf8', (err) =>\n err ? reject(err) : res.end(resolve),\n ),\n );\n\n try {\n const requestBody = await new Promise<string>((resolve, reject) => {\n const data: Buffer[] = [];\n\n req\n .on('data', (chunk: Buffer) => data.push(chunk))\n .on('end', () => resolve(Buffer.concat(data).toString()))\n .on('error', (err) => reject(err));\n });\n\n // Treat an empty body as no arguments\n const jsonRequest: unknown = requestBody ? JSON.parse(requestBody) : [];\n\n // Pass a non-array request body as the first parameter\n const args: unknown[] = Array.isArray(jsonRequest)\n ? jsonRequest\n : [jsonRequest];\n\n const response: unknown = await fn(...args);\n\n res.writeHead(200, { 'Content-Type': 'application/json' });\n\n await writeResponse(JSON.stringify(response, null, 2));\n } catch (err) {\n res.writeHead(500);\n\n await writeResponse(util.inspect(err));\n }\n };\n\n/**\n * Create a HTTP server based on the supplied `http.RequestListener`.\n *\n * This function resolves when the server is closed.\n */\nexport const serveRequestListener = (\n requestListener: http.RequestListener,\n port?: number,\n) => {\n const server = http.createServer(requestListener);\n return startServer(server, port);\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,kBAAiB;AAEjB,oBAA4B;AAQrB,MAAM,oCACX,CAAC,OACD,OAAO,KAAK,QAAQ;AAClB,QAAM,gBAAgB,CAAC,aACrB,IAAI;AAAA,IAAc,CAAC,SAAS,WAC1B,aAAa,SACT,IAAI,IAAI,OAAO,IACf,IAAI;AAAA,MAAM;AAAA,MAAU;AAAA,MAAQ,CAAC,QAC3B,MAAM,OAAO,GAAG,IAAI,IAAI,IAAI,OAAO;AAAA,IACrC;AAAA,EACN;AAEF,MAAI;AACF,UAAM,cAAc,MAAM,IAAI,QAAgB,CAAC,SAAS,WAAW;AACjE,YAAM,OAAiB,CAAC;AAExB,UACG,GAAG,QAAQ,CAAC,UAAkB,KAAK,KAAK,KAAK,CAAC,EAC9C,GAAG,OAAO,MAAM,QAAQ,OAAO,OAAO,IAAI,EAAE,SAAS,CAAC,CAAC,EACvD,GAAG,SAAS,CAAC,QAAQ,OAAO,GAAG,CAAC;AAAA,IACrC,CAAC;AAGD,UAAM,cAAuB,cAAc,KAAK,MAAM,WAAW,IAAI,CAAC;AAGtE,UAAM,OAAkB,MAAM,QAAQ,WAAW,IAC7C,cACA,CAAC,WAAW;AAEhB,UAAM,WAAoB,MAAM,GAAG,GAAG,IAAI;AAE1C,QAAI,UAAU,KAAK,EAAE,gBAAgB,mBAAmB,CAAC;AAEzD,UAAM,cAAc,KAAK,UAAU,UAAU,MAAM,CAAC,CAAC;AAAA,EACvD,SAAS,KAAK;AACZ,QAAI,UAAU,GAAG;AAEjB,UAAM,cAAc,YAAAA,QAAK,QAAQ,GAAG,CAAC;AAAA,EACvC;AACF;AAOK,MAAM,uBAAuB,CAClC,iBACA,SACG;AACH,QAAM,SAAS,YAAAC,QAAK,aAAa,eAAe;AAChD,aAAO,2BAAY,QAAQ,IAAI;AACjC;",
|
|
6
6
|
"names": ["util", "http"]
|
|
7
7
|
}
|
|
@@ -34,6 +34,7 @@ module.exports = __toCommonJS(requestListener_exports);
|
|
|
34
34
|
var import_http = __toESM(require("http"));
|
|
35
35
|
var import_validation = require("../utils/validation.js");
|
|
36
36
|
var import_http2 = require("./http.js");
|
|
37
|
+
var import_server = require("./server.js");
|
|
37
38
|
const isConfig = (data) => (0, import_validation.isFunction)(data) || (0, import_validation.isObject)(data);
|
|
38
39
|
const runRequestListener = async ({
|
|
39
40
|
availablePort,
|
|
@@ -51,10 +52,10 @@ const runRequestListener = async ({
|
|
|
51
52
|
}
|
|
52
53
|
const port = (0, import_validation.isIpPort)(config.port) ? config.port : availablePort;
|
|
53
54
|
if (typeof config !== "function" && config instanceof import_http.default.Server) {
|
|
54
|
-
return (0,
|
|
55
|
+
return (0, import_server.startServer)(config, port);
|
|
55
56
|
}
|
|
56
57
|
if (typeof config !== "function" && config.server && config.server instanceof import_http.default.Server) {
|
|
57
|
-
return (0,
|
|
58
|
+
return (0, import_server.startServer)(config.server, port);
|
|
58
59
|
}
|
|
59
60
|
const requestListener = typeof config === "function" ? config : config.requestListener ?? config.callback?.();
|
|
60
61
|
if (typeof requestListener !== "function") {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/wrapper/requestListener.ts"],
|
|
4
|
-
"sourcesContent": ["import http from 'http';\n\nimport { isFunction, isIpPort, isObject } from '../utils/validation.js';\n\nimport { serveRequestListener
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAEjB,wBAA+C;AAE/C,IAAAA,
|
|
4
|
+
"sourcesContent": ["import http from 'http';\n\nimport { isFunction, isIpPort, isObject } from '../utils/validation.js';\n\nimport { serveRequestListener } from './http.js';\nimport { startServer } from './server.js';\n\n// Express compatibility\ninterface FunctionConfig extends http.RequestListener {\n port?: number;\n}\n\ninterface ObjectConfig {\n // Koa compatibility\n callback?: () => http.RequestListener;\n\n requestListener?: http.RequestListener;\n\n // Fastify compatibility\n server?: http.Server;\n\n default?: Promise<unknown>;\n port?: unknown;\n}\n\nconst isConfig = (\n data: unknown,\n): data is Promise<FunctionConfig> | Promise<ObjectConfig> =>\n isFunction(data) || isObject(data);\n\ninterface Args {\n availablePort?: number;\n entryPoint: unknown;\n}\n\n/**\n * Create an HTTP server that calls into an exported `http.RequestListener`.\n *\n * This supports Express and Koa applications out of the box.\n */\nexport const runRequestListener = async ({\n availablePort,\n entryPoint,\n}: Args): Promise<void> => {\n if (!isConfig(entryPoint)) {\n // Assume an executable script with weird exports\n return;\n }\n\n let config: FunctionConfig | ObjectConfig = await entryPoint;\n\n if (typeof config === 'object' && isConfig(config.default)) {\n // Prefer `export default` over `export =`\n config = await config.default;\n }\n\n if (Object.keys(config).length === 0) {\n // Assume an executable script with no exports\n return;\n }\n\n const port = isIpPort(config.port) ? config.port : availablePort;\n\n // http.Server support\n if (typeof config !== 'function' && config instanceof http.Server) {\n return startServer(config, port);\n }\n\n // Fastify workaround\n if (\n typeof config !== 'function' &&\n config.server &&\n config.server instanceof http.Server\n ) {\n return startServer(config.server, port);\n }\n\n const requestListener =\n typeof config === 'function'\n ? config\n : (config.requestListener ?? config.callback?.());\n\n if (typeof requestListener !== 'function') {\n // Assume an executable script with non-request listener exports\n return;\n }\n\n return serveRequestListener(requestListener, port);\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAEjB,wBAA+C;AAE/C,IAAAA,eAAqC;AACrC,oBAA4B;AAoB5B,MAAM,WAAW,CACf,aAEA,8BAAW,IAAI,SAAK,4BAAS,IAAI;AAY5B,MAAM,qBAAqB,OAAO;AAAA,EACvC;AAAA,EACA;AACF,MAA2B;AACzB,MAAI,CAAC,SAAS,UAAU,GAAG;AAEzB;AAAA,EACF;AAEA,MAAI,SAAwC,MAAM;AAElD,MAAI,OAAO,WAAW,YAAY,SAAS,OAAO,OAAO,GAAG;AAE1D,aAAS,MAAM,OAAO;AAAA,EACxB;AAEA,MAAI,OAAO,KAAK,MAAM,EAAE,WAAW,GAAG;AAEpC;AAAA,EACF;AAEA,QAAM,WAAO,4BAAS,OAAO,IAAI,IAAI,OAAO,OAAO;AAGnD,MAAI,OAAO,WAAW,cAAc,kBAAkB,YAAAC,QAAK,QAAQ;AACjE,eAAO,2BAAY,QAAQ,IAAI;AAAA,EACjC;AAGA,MACE,OAAO,WAAW,cAClB,OAAO,UACP,OAAO,kBAAkB,YAAAA,QAAK,QAC9B;AACA,eAAO,2BAAY,OAAO,QAAQ,IAAI;AAAA,EACxC;AAEA,QAAM,kBACJ,OAAO,WAAW,aACd,SACC,OAAO,mBAAmB,OAAO,WAAW;AAEnD,MAAI,OAAO,oBAAoB,YAAY;AAEzC;AAAA,EACF;AAEA,aAAO,mCAAqB,iBAAiB,IAAI;AACnD;",
|
|
6
6
|
"names": ["import_http", "http"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var server_exports = {};
|
|
20
|
+
__export(server_exports, {
|
|
21
|
+
startServer: () => startServer
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(server_exports);
|
|
24
|
+
var import_logging = require("../utils/logging.js");
|
|
25
|
+
const startServer = (server, port) => new Promise(
|
|
26
|
+
(resolve, reject) => server.listen(port).on("close", resolve).on("error", reject).on("listening", () => {
|
|
27
|
+
const address = server.address();
|
|
28
|
+
import_logging.log.ok("listening on port", import_logging.log.bold(String(address.port)));
|
|
29
|
+
})
|
|
30
|
+
);
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
startServer
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/wrapper/server.ts"],
|
|
4
|
+
"sourcesContent": ["import type http from 'http';\nimport type { AddressInfo } from 'net';\n\nimport { log } from '../utils/logging.js';\n\n/**\n * Returns a HTTP server wrapped in a promise\n *\n * This function resolves when the server is closed.\n */\nexport const startServer = (server: http.Server, port?: number) =>\n new Promise<void>((resolve, reject) =>\n server\n .listen(port)\n .on('close', resolve)\n .on('error', reject)\n .on('listening', () => {\n const address = server.address() as AddressInfo;\n\n log.ok('listening on port', log.bold(String(address.port)));\n }),\n );\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAoB;AAOb,MAAM,cAAc,CAAC,QAAqB,SAC/C,IAAI;AAAA,EAAc,CAAC,SAAS,WAC1B,OACG,OAAO,IAAI,EACX,GAAG,SAAS,OAAO,EACnB,GAAG,SAAS,MAAM,EAClB,GAAG,aAAa,MAAM;AACrB,UAAM,UAAU,OAAO,QAAQ;AAE/B,uBAAI,GAAG,qBAAqB,mBAAI,KAAK,OAAO,QAAQ,IAAI,CAAC,CAAC;AAAA,EAC5D,CAAC;AACL;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skuba",
|
|
3
|
-
"version": "14.0.0-
|
|
3
|
+
"version": "14.0.0-node-24-20251204234639",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "SEEK development toolkit for backend applications and packages",
|
|
6
6
|
"homepage": "https://github.com/seek-oss/skuba#readme",
|
|
@@ -56,20 +56,18 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@esbuild-plugins/tsconfig-paths": "^0.1.0",
|
|
59
|
-
"@eslint/migrate-config": "~1.3.8",
|
|
60
59
|
"@inquirer/prompts": "^7.9.0",
|
|
61
60
|
"@jest/types": "^30.0.0",
|
|
62
61
|
"@octokit/graphql": "^9.0.0",
|
|
63
62
|
"@octokit/graphql-schema": "^15.3.0",
|
|
64
63
|
"@octokit/rest": "^22.0.0",
|
|
65
|
-
"@octokit/types": "^
|
|
64
|
+
"@octokit/types": "^16.0.0",
|
|
66
65
|
"@types/jest": "^30.0.0",
|
|
67
66
|
"@types/node": "^22.0.0",
|
|
68
|
-
"chalk": "^4.1.0",
|
|
69
67
|
"concurrently": "^9.0.0",
|
|
70
68
|
"ejs": "^3.1.6",
|
|
71
|
-
"esbuild": "~0.
|
|
72
|
-
"eslint": "^9.
|
|
69
|
+
"esbuild": "~0.27.0",
|
|
70
|
+
"eslint": "^9.39.1",
|
|
73
71
|
"execa": "^5.0.0",
|
|
74
72
|
"fast-glob": "^3.3.2",
|
|
75
73
|
"find-up": "^5.0.0",
|
|
@@ -89,7 +87,7 @@
|
|
|
89
87
|
"npm-run-path": "^4.0.1",
|
|
90
88
|
"npm-which": "^3.0.1",
|
|
91
89
|
"picomatch": "^4.0.0",
|
|
92
|
-
"prettier": "~3.
|
|
90
|
+
"prettier": "~3.7.0",
|
|
93
91
|
"prettier-plugin-packagejson": "^2.4.10",
|
|
94
92
|
"read-pkg-up": "^7.0.1",
|
|
95
93
|
"semantic-release": "^24.2.3",
|
|
@@ -102,56 +100,48 @@
|
|
|
102
100
|
"tsx": "^4.16.2",
|
|
103
101
|
"typescript": "~5.9.0",
|
|
104
102
|
"zod": "^4.0.0",
|
|
105
|
-
"@skuba-lib/api": "^
|
|
106
|
-
"eslint-config-skuba": "7.2.
|
|
103
|
+
"@skuba-lib/api": "^2.0.0-node-24-20251204234639",
|
|
104
|
+
"eslint-config-skuba": "7.2.1"
|
|
107
105
|
},
|
|
108
106
|
"devDependencies": {
|
|
109
|
-
"@changesets/cli": "2.29.
|
|
110
|
-
"@changesets/get-github-info": "0.
|
|
107
|
+
"@changesets/cli": "2.29.8",
|
|
108
|
+
"@changesets/get-github-info": "0.7.0",
|
|
111
109
|
"@jest/reporters": "30.2.0",
|
|
112
110
|
"@jest/test-result": "30.2.0",
|
|
113
111
|
"@types/ejs": "3.1.5",
|
|
114
112
|
"@types/express": "5.0.3",
|
|
115
113
|
"@types/fs-extra": "11.0.4",
|
|
116
|
-
"@types/koa": "3.0.
|
|
114
|
+
"@types/koa": "3.0.1",
|
|
117
115
|
"@types/lodash.mergewith": "4.6.9",
|
|
118
116
|
"@types/minimist": "1.2.5",
|
|
119
117
|
"@types/module-alias": "2.0.4",
|
|
120
|
-
"@types/npm-registry-fetch": "8.0.
|
|
118
|
+
"@types/npm-registry-fetch": "8.0.9",
|
|
121
119
|
"@types/npm-which": "3.0.4",
|
|
122
120
|
"@types/picomatch": "4.0.2",
|
|
123
121
|
"@types/semver": "7.7.1",
|
|
124
122
|
"@types/supertest": "6.0.3",
|
|
125
123
|
"enhanced-resolve": "5.18.3",
|
|
126
124
|
"express": "5.1.0",
|
|
127
|
-
"fastify": "5.6.
|
|
125
|
+
"fastify": "5.6.2",
|
|
128
126
|
"jest-diff": "30.2.0",
|
|
129
127
|
"jsonfile": "6.2.0",
|
|
130
|
-
"koa": "3.
|
|
131
|
-
"memfs": "4.
|
|
128
|
+
"koa": "3.1.1",
|
|
129
|
+
"memfs": "4.51.0",
|
|
132
130
|
"remark-cli": "12.0.1",
|
|
133
131
|
"remark-preset-lint-recommended": "7.0.1",
|
|
134
132
|
"semver": "7.7.3",
|
|
135
133
|
"supertest": "7.1.4",
|
|
136
134
|
"type-fest": "2.19.0"
|
|
137
135
|
},
|
|
138
|
-
"peerDependencies": {
|
|
139
|
-
"skuba-dive": "3.0.0-migrate-to-inquirer-20251031060542"
|
|
140
|
-
},
|
|
141
|
-
"peerDependenciesMeta": {
|
|
142
|
-
"skuba-dive": {
|
|
143
|
-
"optional": true
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
136
|
"engines": {
|
|
147
|
-
"node": ">=
|
|
137
|
+
"node": ">=22.14.0"
|
|
148
138
|
},
|
|
149
139
|
"skuba": {
|
|
150
140
|
"build": "esbuild",
|
|
151
141
|
"entryPoint": "src/index.ts",
|
|
152
142
|
"template": null,
|
|
153
143
|
"type": "package",
|
|
154
|
-
"version": "13.
|
|
144
|
+
"version": "13.1.1"
|
|
155
145
|
},
|
|
156
146
|
"scripts": {
|
|
157
147
|
"build": "scripts/build.sh",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
24
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@opentelemetry/api": "^1.9.0",
|
|
23
23
|
"@opentelemetry/core": "^2.0.0",
|
|
24
|
-
"@opentelemetry/exporter-trace-otlp-grpc": "^0.
|
|
25
|
-
"@opentelemetry/instrumentation-aws-sdk": "^0.
|
|
26
|
-
"@opentelemetry/instrumentation-http": "^0.
|
|
24
|
+
"@opentelemetry/exporter-trace-otlp-grpc": "^0.208.0",
|
|
25
|
+
"@opentelemetry/instrumentation-aws-sdk": "^0.64.0",
|
|
26
|
+
"@opentelemetry/instrumentation-http": "^0.208.0",
|
|
27
27
|
"@opentelemetry/propagator-b3": "^2.0.0",
|
|
28
|
-
"@opentelemetry/sdk-node": "^0.
|
|
28
|
+
"@opentelemetry/sdk-node": "^0.208.0",
|
|
29
29
|
"@seek/logger": "^11.1.0",
|
|
30
30
|
"express": "^5.0.0",
|
|
31
31
|
"hot-shots": "^11.0.0",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"skuba": "*",
|
|
41
41
|
"supertest": "^7.0.0"
|
|
42
42
|
},
|
|
43
|
-
"packageManager": "pnpm@10.
|
|
43
|
+
"packageManager": "pnpm@10.24.0",
|
|
44
44
|
"engines": {
|
|
45
|
-
"node": ">=
|
|
45
|
+
"node": ">=24"
|
|
46
46
|
}
|
|
47
47
|
}
|
package/template/greeter/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
24
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"test:watch": "skuba test --watch"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"skuba-dive": "
|
|
22
|
+
"skuba-dive": "4.0.0-node-24-20251204234639"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/node": "^22.13.10",
|
|
26
|
-
"skuba": "14.0.0-
|
|
26
|
+
"skuba": "14.0.0-node-24-20251204234639"
|
|
27
27
|
},
|
|
28
|
-
"packageManager": "pnpm@10.
|
|
28
|
+
"packageManager": "pnpm@10.24.0",
|
|
29
29
|
"engines": {
|
|
30
|
-
"node": ">=
|
|
30
|
+
"node": ">=24"
|
|
31
31
|
}
|
|
32
32
|
}
|