skuba 12.1.0-conditions-20250808085844 → 12.1.0-main-20250810101347
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/build/tsc.d.ts +5 -1
- package/lib/cli/build/tsc.js +12 -0
- package/lib/cli/build/tsc.js.map +3 -3
- package/lib/cli/node/index.js +2 -2
- package/lib/cli/node/index.js.map +2 -2
- package/lib/cli/start/index.js +2 -2
- package/lib/cli/start/index.js.map +2 -2
- package/lib/cli/test/index.d.ts +1 -1
- package/lib/cli/test/index.js +18 -4
- package/lib/cli/test/index.js.map +2 -2
- package/package.json +3 -3
- package/template/base/_pnpm-workspace.yaml +1 -0
- package/template/greeter/package.json +1 -1
- package/template/lambda-sqs-worker-cdk/package.json +1 -1
- package/lib/utils/tsconfig.d.ts +0 -4
- package/lib/utils/tsconfig.js +0 -39
- package/lib/utils/tsconfig.js.map +0 -7
package/lib/cli/build/tsc.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import ts from 'typescript';
|
|
2
|
-
import type
|
|
2
|
+
import { type Logger } from '../../utils/logging.js';
|
|
3
3
|
export declare const tsc: (args?: string[]) => Promise<import("execa").ExecaReturnValue<string>>;
|
|
4
4
|
export declare const readTsconfig: (args: string[] | undefined, log: Logger) => ts.ParsedCommandLine | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* Extract custom conditions from tsconfig that should be passed to tsx
|
|
7
|
+
*/
|
|
8
|
+
export declare const getCustomConditions: () => string[];
|
package/lib/cli/build/tsc.js
CHANGED
|
@@ -28,12 +28,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var tsc_exports = {};
|
|
30
30
|
__export(tsc_exports, {
|
|
31
|
+
getCustomConditions: () => getCustomConditions,
|
|
31
32
|
readTsconfig: () => readTsconfig,
|
|
32
33
|
tsc: () => tsc
|
|
33
34
|
});
|
|
34
35
|
module.exports = __toCommonJS(tsc_exports);
|
|
35
36
|
var import_typescript = __toESM(require("typescript"));
|
|
36
37
|
var import_exec = require("../../utils/exec.js");
|
|
38
|
+
var import_logging = require("../../utils/logging.js");
|
|
37
39
|
var import_args = require("./args.js");
|
|
38
40
|
const DEFAULT_ARGS = ["--project", "tsconfig.build.json"];
|
|
39
41
|
const formatHost = {
|
|
@@ -94,8 +96,18 @@ const readTsconfig = (args = process.argv.slice(2), log) => {
|
|
|
94
96
|
}
|
|
95
97
|
return parsedCommandLine;
|
|
96
98
|
};
|
|
99
|
+
const getCustomConditions = () => {
|
|
100
|
+
try {
|
|
101
|
+
const parsedConfig = readTsconfig([], import_logging.log);
|
|
102
|
+
const customConditions = parsedConfig?.options.customConditions;
|
|
103
|
+
return Array.isArray(customConditions) ? customConditions : [];
|
|
104
|
+
} catch {
|
|
105
|
+
return [];
|
|
106
|
+
}
|
|
107
|
+
};
|
|
97
108
|
// Annotate the CommonJS export names for ESM import in node:
|
|
98
109
|
0 && (module.exports = {
|
|
110
|
+
getCustomConditions,
|
|
99
111
|
readTsconfig,
|
|
100
112
|
tsc
|
|
101
113
|
});
|
package/lib/cli/build/tsc.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/build/tsc.ts"],
|
|
4
|
-
"sourcesContent": ["import ts from 'typescript';\n\nimport { exec } from '../../utils/exec.js';\nimport type
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAe;AAEf,kBAAqB;
|
|
6
|
-
"names": ["ts"]
|
|
4
|
+
"sourcesContent": ["import ts from 'typescript';\n\nimport { exec } from '../../utils/exec.js';\nimport { type Logger, log as logger } from '../../utils/logging.js';\n\nimport { parseTscArgs } from './args.js';\n\nconst DEFAULT_ARGS = ['--project', 'tsconfig.build.json'] as const;\n\nconst formatHost: ts.FormatDiagnosticsHost = {\n getCanonicalFileName: (fileName) => fileName,\n getCurrentDirectory: ts.sys.getCurrentDirectory.bind(undefined),\n getNewLine: () => ts.sys.newLine,\n};\n\nconst tsconfigCache = new Map<string, ts.ParsedCommandLine>();\nconst computeCacheKey = (args: string[]) => Array.from(args).sort().toString();\n\nexport const tsc = async (args = process.argv.slice(2)) => {\n const tscArgs = parseTscArgs(args);\n\n // Build flag is incompatible with project flag.\n const defaultArgs = tscArgs.build || tscArgs.project ? [] : DEFAULT_ARGS;\n\n return exec('tsc', ...defaultArgs, ...args);\n};\n\nexport const readTsconfig = (args = process.argv.slice(2), log: Logger) => {\n const tscArgs = parseTscArgs(args);\n\n let parsedCommandLine = tsconfigCache.get(computeCacheKey(args));\n\n if (!parsedCommandLine) {\n log.debug(\n log.bold(\n 'tsconfig',\n ...(tscArgs.project ? ['--project', tscArgs.project] : []),\n ),\n );\n log.debug(tscArgs.pathname);\n\n const tsconfigFile = ts.findConfigFile(\n tscArgs.dirname,\n ts.sys.fileExists.bind(undefined),\n tscArgs.basename,\n );\n if (!tsconfigFile) {\n log.err(`Could not find ${tscArgs.pathname}.`);\n process.exitCode = 1;\n return;\n }\n\n const readConfigFile = ts.readConfigFile(\n tsconfigFile,\n ts.sys.readFile.bind(undefined),\n );\n if (readConfigFile.error) {\n log.err(`Could not read ${tscArgs.pathname}.`);\n log.subtle(ts.formatDiagnostic(readConfigFile.error, formatHost));\n process.exitCode = 1;\n return;\n }\n\n parsedCommandLine = ts.parseJsonConfigFileContent(\n readConfigFile.config,\n ts.sys,\n tscArgs.dirname,\n );\n tsconfigCache.set(computeCacheKey(args), parsedCommandLine);\n }\n\n if (parsedCommandLine.errors.length) {\n log.err(`Could not parse ${tscArgs.pathname}.`);\n log.subtle(ts.formatDiagnostics(parsedCommandLine.errors, formatHost));\n process.exitCode = 1;\n return;\n }\n\n return parsedCommandLine;\n};\n\n/**\n * Extract custom conditions from tsconfig that should be passed to tsx\n */\nexport const getCustomConditions = (): string[] => {\n try {\n const parsedConfig = readTsconfig([], logger);\n const customConditions = parsedConfig?.options.customConditions;\n return Array.isArray(customConditions) ? customConditions : [];\n } catch {\n return [];\n }\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAe;AAEf,kBAAqB;AACrB,qBAA2C;AAE3C,kBAA6B;AAE7B,MAAM,eAAe,CAAC,aAAa,qBAAqB;AAExD,MAAM,aAAuC;AAAA,EAC3C,sBAAsB,CAAC,aAAa;AAAA,EACpC,qBAAqB,kBAAAA,QAAG,IAAI,oBAAoB,KAAK,MAAS;AAAA,EAC9D,YAAY,MAAM,kBAAAA,QAAG,IAAI;AAC3B;AAEA,MAAM,gBAAgB,oBAAI,IAAkC;AAC5D,MAAM,kBAAkB,CAAC,SAAmB,MAAM,KAAK,IAAI,EAAE,KAAK,EAAE,SAAS;AAEtE,MAAM,MAAM,OAAO,OAAO,QAAQ,KAAK,MAAM,CAAC,MAAM;AACzD,QAAM,cAAU,0BAAa,IAAI;AAGjC,QAAM,cAAc,QAAQ,SAAS,QAAQ,UAAU,CAAC,IAAI;AAE5D,aAAO,kBAAK,OAAO,GAAG,aAAa,GAAG,IAAI;AAC5C;AAEO,MAAM,eAAe,CAAC,OAAO,QAAQ,KAAK,MAAM,CAAC,GAAG,QAAgB;AACzE,QAAM,cAAU,0BAAa,IAAI;AAEjC,MAAI,oBAAoB,cAAc,IAAI,gBAAgB,IAAI,CAAC;AAE/D,MAAI,CAAC,mBAAmB;AACtB,QAAI;AAAA,MACF,IAAI;AAAA,QACF;AAAA,QACA,GAAI,QAAQ,UAAU,CAAC,aAAa,QAAQ,OAAO,IAAI,CAAC;AAAA,MAC1D;AAAA,IACF;AACA,QAAI,MAAM,QAAQ,QAAQ;AAE1B,UAAM,eAAe,kBAAAA,QAAG;AAAA,MACtB,QAAQ;AAAA,MACR,kBAAAA,QAAG,IAAI,WAAW,KAAK,MAAS;AAAA,MAChC,QAAQ;AAAA,IACV;AACA,QAAI,CAAC,cAAc;AACjB,UAAI,IAAI,kBAAkB,QAAQ,QAAQ,GAAG;AAC7C,cAAQ,WAAW;AACnB;AAAA,IACF;AAEA,UAAM,iBAAiB,kBAAAA,QAAG;AAAA,MACxB;AAAA,MACA,kBAAAA,QAAG,IAAI,SAAS,KAAK,MAAS;AAAA,IAChC;AACA,QAAI,eAAe,OAAO;AACxB,UAAI,IAAI,kBAAkB,QAAQ,QAAQ,GAAG;AAC7C,UAAI,OAAO,kBAAAA,QAAG,iBAAiB,eAAe,OAAO,UAAU,CAAC;AAChE,cAAQ,WAAW;AACnB;AAAA,IACF;AAEA,wBAAoB,kBAAAA,QAAG;AAAA,MACrB,eAAe;AAAA,MACf,kBAAAA,QAAG;AAAA,MACH,QAAQ;AAAA,IACV;AACA,kBAAc,IAAI,gBAAgB,IAAI,GAAG,iBAAiB;AAAA,EAC5D;AAEA,MAAI,kBAAkB,OAAO,QAAQ;AACnC,QAAI,IAAI,mBAAmB,QAAQ,QAAQ,GAAG;AAC9C,QAAI,OAAO,kBAAAA,QAAG,kBAAkB,kBAAkB,QAAQ,UAAU,CAAC;AACrE,YAAQ,WAAW;AACnB;AAAA,EACF;AAEA,SAAO;AACT;AAKO,MAAM,sBAAsB,MAAgB;AACjD,MAAI;AACF,UAAM,eAAe,aAAa,CAAC,GAAG,eAAAC,GAAM;AAC5C,UAAM,mBAAmB,cAAc,QAAQ;AAC/C,WAAO,MAAM,QAAQ,gBAAgB,IAAI,mBAAmB,CAAC;AAAA,EAC/D,QAAQ;AACN,WAAO,CAAC;AAAA,EACV;AACF;",
|
|
6
|
+
"names": ["ts", "logger"]
|
|
7
7
|
}
|
package/lib/cli/node/index.js
CHANGED
|
@@ -37,12 +37,12 @@ var import_execa = __toESM(require("execa"));
|
|
|
37
37
|
var import_get_port = __toESM(require("get-port"));
|
|
38
38
|
var import_args = require("../../utils/args.js");
|
|
39
39
|
var import_exec = require("../../utils/exec.js");
|
|
40
|
-
var import_tsconfig = require("../../utils/tsconfig.js");
|
|
41
40
|
var import_validation = require("../../utils/validation.js");
|
|
41
|
+
var import_tsc = require("../build/tsc.js");
|
|
42
42
|
const longRunning = true;
|
|
43
43
|
const node = async () => {
|
|
44
44
|
const args = (0, import_args.parseRunArgs)(process.argv.slice(2));
|
|
45
|
-
const customConditions = (0,
|
|
45
|
+
const customConditions = (0, import_tsc.getCustomConditions)();
|
|
46
46
|
const uniqueConditions = [
|
|
47
47
|
.../* @__PURE__ */ new Set([...args.conditions ?? [], ...customConditions])
|
|
48
48
|
];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/node/index.ts"],
|
|
4
|
-
"sourcesContent": ["import path from 'path';\n\nimport execa from 'execa';\nimport getPort from 'get-port';\n\nimport { parseRunArgs } from '../../utils/args.js';\nimport { createExec } from '../../utils/exec.js';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAEjB,mBAAkB;AAClB,sBAAoB;AAEpB,kBAA6B;AAC7B,kBAA2B;AAC3B,
|
|
4
|
+
"sourcesContent": ["import path from 'path';\n\nimport execa from 'execa';\nimport getPort from 'get-port';\n\nimport { parseRunArgs } from '../../utils/args.js';\nimport { createExec } from '../../utils/exec.js';\nimport { isIpPort } from '../../utils/validation.js';\nimport { getCustomConditions } from '../build/tsc.js';\n\nexport const longRunning = true;\n\nexport const node = async () => {\n const args = parseRunArgs(process.argv.slice(2));\n const customConditions = getCustomConditions();\n\n const uniqueConditions = [\n ...new Set([...(args.conditions ?? []), ...customConditions]),\n ];\n\n const availablePort = await getPort();\n\n const commonArgs = [\n ...args.node,\n ...uniqueConditions.map((condition) => `--conditions=${condition}`),\n '--env-file-if-exists',\n '.env',\n '--require',\n require.resolve('tsconfig-paths/register'),\n ];\n\n if (args.entryPoint) {\n const exec = createExec({\n env: {\n __SKUBA_ENTRY_POINT: args.entryPoint,\n __SKUBA_PORT: String(isIpPort(args.port) ? args.port : availablePort),\n },\n });\n\n return exec(\n 'tsx',\n ...commonArgs,\n path.join(__dirname, '..', '..', 'wrapper', 'index.js'),\n ...args.script,\n );\n }\n\n return execa(\n require.resolve('tsx/cli'),\n [\n ...commonArgs,\n '--require',\n // Unsure if bug or feature that this is needed, but tsx appears to not do anything typescript in the REPL without this!\n // Doesn't occur when just running the tsx binary directly \uD83E\uDDD0\n require.resolve('tsx/patch-repl'),\n ],\n {\n stdio: 'inherit',\n },\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAEjB,mBAAkB;AAClB,sBAAoB;AAEpB,kBAA6B;AAC7B,kBAA2B;AAC3B,wBAAyB;AACzB,iBAAoC;AAE7B,MAAM,cAAc;AAEpB,MAAM,OAAO,YAAY;AAC9B,QAAM,WAAO,0BAAa,QAAQ,KAAK,MAAM,CAAC,CAAC;AAC/C,QAAM,uBAAmB,gCAAoB;AAE7C,QAAM,mBAAmB;AAAA,IACvB,GAAG,oBAAI,IAAI,CAAC,GAAI,KAAK,cAAc,CAAC,GAAI,GAAG,gBAAgB,CAAC;AAAA,EAC9D;AAEA,QAAM,gBAAgB,UAAM,gBAAAA,SAAQ;AAEpC,QAAM,aAAa;AAAA,IACjB,GAAG,KAAK;AAAA,IACR,GAAG,iBAAiB,IAAI,CAAC,cAAc,gBAAgB,SAAS,EAAE;AAAA,IAClE;AAAA,IACA;AAAA,IACA;AAAA,IACA,gBAAgB,yBAAyB;AAAA,EAC3C;AAEA,MAAI,KAAK,YAAY;AACnB,UAAM,WAAO,wBAAW;AAAA,MACtB,KAAK;AAAA,QACH,qBAAqB,KAAK;AAAA,QAC1B,cAAc,WAAO,4BAAS,KAAK,IAAI,IAAI,KAAK,OAAO,aAAa;AAAA,MACtE;AAAA,IACF,CAAC;AAED,WAAO;AAAA,MACL;AAAA,MACA,GAAG;AAAA,MACH,YAAAC,QAAK,KAAK,WAAW,MAAM,MAAM,WAAW,UAAU;AAAA,MACtD,GAAG,KAAK;AAAA,IACV;AAAA,EACF;AAEA,aAAO,aAAAC;AAAA,IACL,gBAAgB,SAAS;AAAA,IACzB;AAAA,MACE,GAAG;AAAA,MACH;AAAA;AAAA;AAAA,MAGA,gBAAgB,gBAAgB;AAAA,IAClC;AAAA,IACA;AAAA,MACE,OAAO;AAAA,IACT;AAAA,EACF;AACF;",
|
|
6
6
|
"names": ["getPort", "path", "execa"]
|
|
7
7
|
}
|
package/lib/cli/start/index.js
CHANGED
|
@@ -36,10 +36,10 @@ var import_get_port = __toESM(require("get-port"));
|
|
|
36
36
|
var import_args = require("../../utils/args.js");
|
|
37
37
|
var import_exec = require("../../utils/exec.js");
|
|
38
38
|
var import_manifest = require("../../utils/manifest.js");
|
|
39
|
-
var import_tsconfig = require("../../utils/tsconfig.js");
|
|
40
39
|
var import_validation = require("../../utils/validation.js");
|
|
40
|
+
var import_tsc = require("../build/tsc.js");
|
|
41
41
|
const start = async () => {
|
|
42
|
-
const customConditions = (0,
|
|
42
|
+
const customConditions = (0, import_tsc.getCustomConditions)();
|
|
43
43
|
const [args, availablePort] = await Promise.all([
|
|
44
44
|
(0, import_args.parseRunArgs)(process.argv.slice(2)),
|
|
45
45
|
(0, import_get_port.default)()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/start/index.ts"],
|
|
4
|
-
"sourcesContent": ["import path from 'path';\n\nimport getPort from 'get-port';\n\nimport { parseRunArgs } from '../../utils/args.js';\nimport { createExec } from '../../utils/exec.js';\nimport { getEntryPointFromManifest } from '../../utils/manifest.js';\nimport {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAEjB,sBAAoB;AAEpB,kBAA6B;AAC7B,kBAA2B;AAC3B,sBAA0C;AAC1C,
|
|
4
|
+
"sourcesContent": ["import path from 'path';\n\nimport getPort from 'get-port';\n\nimport { parseRunArgs } from '../../utils/args.js';\nimport { createExec } from '../../utils/exec.js';\nimport { getEntryPointFromManifest } from '../../utils/manifest.js';\nimport { isIpPort } from '../../utils/validation.js';\nimport { getCustomConditions } from '../build/tsc.js';\n\nexport const start = async () => {\n const customConditions = getCustomConditions();\n const [args, availablePort] = await Promise.all([\n parseRunArgs(process.argv.slice(2)),\n getPort(),\n ]);\n\n const uniqueConditions = [\n ...new Set([...(args.conditions ?? []), ...customConditions]),\n ];\n\n args.entryPoint ??= await getEntryPointFromManifest();\n\n const execProcess = createExec({\n env: {\n __SKUBA_ENTRY_POINT: args.entryPoint,\n __SKUBA_PORT: String(isIpPort(args.port) ? args.port : availablePort),\n },\n });\n\n return execProcess(\n 'tsx',\n 'watch',\n '--clear-screen=false',\n ...args.node,\n ...uniqueConditions.map((condition) => `--conditions=${condition}`),\n '--env-file-if-exists',\n '.env',\n '--require',\n 'tsconfig-paths/register',\n path.join(__dirname, '..', '..', 'wrapper', 'index.js'),\n ...args.script,\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAEjB,sBAAoB;AAEpB,kBAA6B;AAC7B,kBAA2B;AAC3B,sBAA0C;AAC1C,wBAAyB;AACzB,iBAAoC;AAE7B,MAAM,QAAQ,YAAY;AAC/B,QAAM,uBAAmB,gCAAoB;AAC7C,QAAM,CAAC,MAAM,aAAa,IAAI,MAAM,QAAQ,IAAI;AAAA,QAC9C,0BAAa,QAAQ,KAAK,MAAM,CAAC,CAAC;AAAA,QAClC,gBAAAA,SAAQ;AAAA,EACV,CAAC;AAED,QAAM,mBAAmB;AAAA,IACvB,GAAG,oBAAI,IAAI,CAAC,GAAI,KAAK,cAAc,CAAC,GAAI,GAAG,gBAAgB,CAAC;AAAA,EAC9D;AAEA,OAAK,eAAe,UAAM,2CAA0B;AAEpD,QAAM,kBAAc,wBAAW;AAAA,IAC7B,KAAK;AAAA,MACH,qBAAqB,KAAK;AAAA,MAC1B,cAAc,WAAO,4BAAS,KAAK,IAAI,IAAI,KAAK,OAAO,aAAa;AAAA,IACtE;AAAA,EACF,CAAC;AAED,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG,KAAK;AAAA,IACR,GAAG,iBAAiB,IAAI,CAAC,cAAc,gBAAgB,SAAS,EAAE;AAAA,IAClE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAAC,QAAK,KAAK,WAAW,MAAM,MAAM,WAAW,UAAU;AAAA,IACtD,GAAG,KAAK;AAAA,EACV;AACF;",
|
|
6
6
|
"names": ["getPort", "path"]
|
|
7
7
|
}
|
package/lib/cli/test/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const test: () => Promise<
|
|
1
|
+
export declare const test: () => Promise<import("execa").ExecaReturnValue<string>>;
|
package/lib/cli/test/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,18 +17,30 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
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
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
var test_exports = {};
|
|
20
30
|
__export(test_exports, {
|
|
21
31
|
test: () => test
|
|
22
32
|
});
|
|
23
33
|
module.exports = __toCommonJS(test_exports);
|
|
24
|
-
var
|
|
34
|
+
var import_exec = require("../../utils/exec.js");
|
|
25
35
|
const test = async () => {
|
|
26
|
-
process.env.NODE_ENV ??= "test";
|
|
27
|
-
process.env.TS_JEST_LOG ??= "stdout:error";
|
|
28
36
|
const argv = process.argv.slice(2);
|
|
29
|
-
|
|
37
|
+
const nodeOptions = process.env.NODE_OPTIONS ?? "";
|
|
38
|
+
const execWithEnv = (0, import_exec.createExec)({
|
|
39
|
+
env: {
|
|
40
|
+
NODE_OPTIONS: !nodeOptions.includes("--experimental-vm-modules") ? `${nodeOptions} --experimental-vm-modules --no-warnings=ExperimentalWarning` : nodeOptions
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
return execWithEnv(require.resolve("jest/bin/jest"), ...argv);
|
|
30
44
|
};
|
|
31
45
|
// Annotate the CommonJS export names for ESM import in node:
|
|
32
46
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/test/index.ts"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { createExec } from '../../utils/exec.js';\n\nexport const test = async () => {\n const argv = process.argv.slice(2);\n\n const nodeOptions = process.env.NODE_OPTIONS ?? '';\n\n const execWithEnv = createExec({\n env: {\n NODE_OPTIONS: !nodeOptions.includes('--experimental-vm-modules')\n ? `${nodeOptions} --experimental-vm-modules --no-warnings=ExperimentalWarning`\n : nodeOptions,\n },\n });\n\n // Run Jest in a child process with proper environment\n return execWithEnv(require.resolve('jest/bin/jest'), ...argv);\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA2B;AAEpB,MAAM,OAAO,YAAY;AAC9B,QAAM,OAAO,QAAQ,KAAK,MAAM,CAAC;AAEjC,QAAM,cAAc,QAAQ,IAAI,gBAAgB;AAEhD,QAAM,kBAAc,wBAAW;AAAA,IAC7B,KAAK;AAAA,MACH,cAAc,CAAC,YAAY,SAAS,2BAA2B,IAC3D,GAAG,WAAW,iEACd;AAAA,IACN;AAAA,EACF,CAAC;AAGD,SAAO,YAAY,gBAAgB,eAAe,GAAG,GAAG,IAAI;AAC9D;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skuba",
|
|
3
|
-
"version": "12.1.0-
|
|
3
|
+
"version": "12.1.0-main-20250810101347",
|
|
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",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"tsx": "^4.16.2",
|
|
98
98
|
"typescript": "~5.9.0",
|
|
99
99
|
"zod": "^4.0.0",
|
|
100
|
-
"eslint-config-skuba": "7.1.0-
|
|
100
|
+
"eslint-config-skuba": "7.1.0-main-20250810101347"
|
|
101
101
|
},
|
|
102
102
|
"devDependencies": {
|
|
103
103
|
"@changesets/cli": "2.29.5",
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"lint:packages": "pnpm --filter '!./template/**' lint",
|
|
163
163
|
"release": "pnpm --silent build && changeset publish",
|
|
164
164
|
"skuba": "pnpm --silent build && pnpm --silent skuba:exec",
|
|
165
|
-
"skuba:exec": "node
|
|
165
|
+
"skuba:exec": "node lib/skuba",
|
|
166
166
|
"stage": "changeset version && node ./.changeset/inject.js && pnpm format",
|
|
167
167
|
"test": "pnpm --silent skuba test --selectProjects unit",
|
|
168
168
|
"test:ci": "pnpm --silent skuba test --runInBand",
|
package/lib/utils/tsconfig.d.ts
DELETED
package/lib/utils/tsconfig.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
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 tsconfig_exports = {};
|
|
20
|
-
__export(tsconfig_exports, {
|
|
21
|
-
getCustomConditions: () => getCustomConditions
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(tsconfig_exports);
|
|
24
|
-
var import_tsc = require("../cli/build/tsc.js");
|
|
25
|
-
var import_logging = require("./logging.js");
|
|
26
|
-
const getCustomConditions = () => {
|
|
27
|
-
try {
|
|
28
|
-
const parsedConfig = (0, import_tsc.readTsconfig)([], import_logging.log);
|
|
29
|
-
const customConditions = parsedConfig?.options.customConditions;
|
|
30
|
-
return Array.isArray(customConditions) ? customConditions : [];
|
|
31
|
-
} catch {
|
|
32
|
-
return [];
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
-
0 && (module.exports = {
|
|
37
|
-
getCustomConditions
|
|
38
|
-
});
|
|
39
|
-
//# sourceMappingURL=tsconfig.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/utils/tsconfig.ts"],
|
|
4
|
-
"sourcesContent": ["import { readTsconfig } from '../cli/build/tsc.js';\n\nimport { log } from './logging.js';\n\n/**\n * Extract custom conditions from tsconfig that should be passed to tsx\n */\nexport const getCustomConditions = (): string[] => {\n try {\n const parsedConfig = readTsconfig([], log);\n const customConditions = parsedConfig?.options.customConditions;\n return Array.isArray(customConditions) ? customConditions : [];\n } catch {\n return [];\n }\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAA6B;AAE7B,qBAAoB;AAKb,MAAM,sBAAsB,MAAgB;AACjD,MAAI;AACF,UAAM,mBAAe,yBAAa,CAAC,GAAG,kBAAG;AACzC,UAAM,mBAAmB,cAAc,QAAQ;AAC/C,WAAO,MAAM,QAAQ,gBAAgB,IAAI,mBAAmB,CAAC;AAAA,EAC/D,QAAQ;AACN,WAAO,CAAC;AAAA,EACV;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|