pipework 0.72.0 → 0.73.0
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/CHANGELOG.md +8 -0
- package/dist/async/jobs/run-script.d.ts +17 -0
- package/dist/async/jobs/run-script.d.ts.map +1 -0
- package/dist/async/jobs/run-script.js +48 -0
- package/dist/async/jobs/run-script.js.map +1 -0
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +2 -1
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/index.js +2 -2
- package/dist/core/config/discover.d.ts +2 -1
- package/dist/core/config/discover.d.ts.map +1 -1
- package/dist/core/config/discover.js +2 -56
- package/dist/core/config/discover.js.map +1 -1
- package/dist/core/config/ts-inline-hooks.d.ts +3 -0
- package/dist/core/config/ts-inline-hooks.d.ts.map +1 -0
- package/dist/core/config/ts-inline-hooks.js +75 -0
- package/dist/core/config/ts-inline-hooks.js.map +1 -0
- package/dist/core/config/ts-register.js +2 -0
- package/dist/core/config/ts-register.js.map +1 -1
- package/dist/core/config/ts-resolve-hooks.d.ts.map +1 -1
- package/dist/core/config/ts-resolve-hooks.js +2 -0
- package/dist/core/config/ts-resolve-hooks.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.73.0
|
|
4
|
+
|
|
5
|
+
- **Changed: `pipework run` runs the script in the same flow a job gets.** The script is traced (a `job` trace, job type `script` unless `--job-type` is given), its `@flow_step` functions are recorded and its `@touches` writes are audited. With `--tenant`, the default database's transaction is bound to the flow with the tenant session variables set, and the script runs in one transaction: it commits when the script returns, and a script that throws has all its writes rolled back. Without `--tenant` nothing changes except the trace. Every command that loads TypeScript in-process from the built package now applies `@flow_step` (#497).
|
|
6
|
+
|
|
7
|
+
## 0.72.1
|
|
8
|
+
|
|
9
|
+
- **Fixed: under `pipework serve` and `pipework dev`, `@flow_step` functions are now traced and their `@touches` writes audited.** Config discovery registered its own loader over the one that applies `@flow_step`, so request traces had no steps and no audit records were written (#486).
|
|
10
|
+
|
|
3
11
|
## 0.72.0
|
|
4
12
|
|
|
5
13
|
**Schema note: blueprint `support: {}` adds `support_ticket`, `support_message` and `support_link` (tenant-scoped with forced row-level security) and `support_event_delivery` (not tenant-scoped) to generated migrations. Run `pipework generate` and `pipework migrate` to add them.**
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Manifold } from '../../core/pipework.js';
|
|
2
|
+
export interface RunScriptOptions {
|
|
3
|
+
tenant?: string | null;
|
|
4
|
+
auth?: unknown;
|
|
5
|
+
jobType?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Runs an operator script in the flow a job gets: a trace (entry kind `job`) that
|
|
9
|
+
* is closed `closed` or `error`, and, with a tenant, the default database's
|
|
10
|
+
* transaction bound to the flow with the tenant session variables set. The
|
|
11
|
+
* transaction commits when `fn` returns and rolls back when it throws. Without a
|
|
12
|
+
* tenant nothing is bound, as for a tenantless job.
|
|
13
|
+
*
|
|
14
|
+
* The trace close is awaited, so the row is written before the caller closes the pool.
|
|
15
|
+
*/
|
|
16
|
+
export declare function runScript<T>(instance: Manifold, fn: () => T | Promise<T>, options?: RunScriptOptions): Promise<T>;
|
|
17
|
+
//# sourceMappingURL=run-script.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-script.d.ts","sourceRoot":"","sources":["../../../src/async/jobs/run-script.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAWtD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;GAQG;AACH,wBAAsB,SAAS,CAAC,CAAC,EAC/B,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EACxB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,CAAC,CAAC,CA8BZ"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { runInContext } from '../../request/context/store.js';
|
|
2
|
+
import { createJobContext } from '../../request/context/create.js';
|
|
3
|
+
import { executeInTransaction } from '../../request/context/run-in-transaction.js';
|
|
4
|
+
import { isTracingEnabled } from '../../trace/entry/tracing-enabled.js';
|
|
5
|
+
import { openTrace } from '../../trace/entry/open-trace.js';
|
|
6
|
+
import { parentTraceRef } from '../../trace/entry/parent-trace.js';
|
|
7
|
+
import { closeTrace } from '../../trace/entry/close-trace.js';
|
|
8
|
+
const SCRIPT_TRANSACTION_TIMEOUT_MS = 5000;
|
|
9
|
+
/**
|
|
10
|
+
* Runs an operator script in the flow a job gets: a trace (entry kind `job`) that
|
|
11
|
+
* is closed `closed` or `error`, and, with a tenant, the default database's
|
|
12
|
+
* transaction bound to the flow with the tenant session variables set. The
|
|
13
|
+
* transaction commits when `fn` returns and rolls back when it throws. Without a
|
|
14
|
+
* tenant nothing is bound, as for a tenantless job.
|
|
15
|
+
*
|
|
16
|
+
* The trace close is awaited, so the row is written before the caller closes the pool.
|
|
17
|
+
*/
|
|
18
|
+
export async function runScript(instance, fn, options = {}) {
|
|
19
|
+
const tenant = options.tenant ?? null;
|
|
20
|
+
const auth = options.auth ?? null;
|
|
21
|
+
const jobType = options.jobType ?? 'script';
|
|
22
|
+
const databases = tenant === null ? [] : [instance.config.defaultDatabaseName()];
|
|
23
|
+
const trace = isTracingEnabled(instance)
|
|
24
|
+
? openTrace({
|
|
25
|
+
instance,
|
|
26
|
+
entryKind: 'job',
|
|
27
|
+
parent: parentTraceRef(),
|
|
28
|
+
tenant,
|
|
29
|
+
auth,
|
|
30
|
+
requestId: null,
|
|
31
|
+
sessionId: null,
|
|
32
|
+
})
|
|
33
|
+
: null;
|
|
34
|
+
const ctx = createJobContext({ instance, jobType, auth, tenant, ...(trace !== null ? { trace } : {}) });
|
|
35
|
+
const run = async () => fn();
|
|
36
|
+
try {
|
|
37
|
+
const result = tenant === null
|
|
38
|
+
? await runInContext(ctx, run)
|
|
39
|
+
: await executeInTransaction(ctx, databases, null, SCRIPT_TRANSACTION_TIMEOUT_MS, run);
|
|
40
|
+
await closeTrace(instance, trace, 'closed');
|
|
41
|
+
return result;
|
|
42
|
+
}
|
|
43
|
+
catch (err) {
|
|
44
|
+
await closeTrace(instance, trace, 'error');
|
|
45
|
+
throw err;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=run-script.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-script.js","sourceRoot":"","sources":["../../../src/async/jobs/run-script.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAA;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAE7D,MAAM,6BAA6B,GAAG,IAAI,CAAA;AAQ1C;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,QAAkB,EAClB,EAAwB,EACxB,UAA4B,EAAE;IAE9B,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,IAAI,CAAA;IACrC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,IAAI,CAAA;IACjC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IA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":"","sources":["../../../src/cli/commands/run.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/run.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC7B;AAED,wBAAsB,GAAG,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CA0BnE"}
|
package/dist/cli/commands/run.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
3
|
import { pathToFileURL } from 'node:url';
|
|
4
|
+
import { runScript } from '../../async/jobs/run-script.js';
|
|
4
5
|
import { bold, success } from '../output.js';
|
|
5
6
|
export async function run(options) {
|
|
6
7
|
const scriptPath = resolve(options.cwd, options.script);
|
|
@@ -12,7 +13,7 @@ export async function run(options) {
|
|
|
12
13
|
const { discoverInstance } = await import('../../core/config/discover.js');
|
|
13
14
|
const instance = await discoverInstance(options.cwd);
|
|
14
15
|
try {
|
|
15
|
-
await instance
|
|
16
|
+
await runScript(instance, async () => {
|
|
16
17
|
await import(pathToFileURL(scriptPath).href);
|
|
17
18
|
}, {
|
|
18
19
|
jobType: options.jobType ?? 'script',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../../src/cli/commands/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cA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B,EAAE,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC,CAAA;IAE1E,MAAM,QAAQ,GAAG,MAAM,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;IAEpD,IAAI,CAAC;QACH,MAAM,SAAS,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;YACnC,MAAM,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAA;QAC9C,CAAC,EAAE;YACD,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,QAAQ;YACpC,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,IAAI;SAC/B,CAAC,CAAA;QACF,OAAO,CAAC,qBAAqB,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IAChD,CAAC;YAAS,CAAC;QACT,MAAM,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAA;IAChC,CAAC;AACH,CAAC"}
|
package/dist/cli/index.js
CHANGED
|
@@ -14,7 +14,7 @@ ${bold('Commands:')}
|
|
|
14
14
|
remove <pkg> Remove dependency from config, sync, and install
|
|
15
15
|
generate Generate SQL migrations from Drizzle schema changes
|
|
16
16
|
migrate Run pending migrations for all databases
|
|
17
|
-
run <script> Execute a script with
|
|
17
|
+
run <script> Execute a script as a traced, audited flow (with --tenant: one transaction, rolled back if it throws)
|
|
18
18
|
test Run tests with automatic database setup
|
|
19
19
|
check Type-check, lint, and boundary enforcement
|
|
20
20
|
codemod Fill missing @downstream cardinality across the corpus
|
|
@@ -27,7 +27,7 @@ ${bold('Options:')}
|
|
|
27
27
|
--version, -v Show version
|
|
28
28
|
--name Migration name (used with generate)
|
|
29
29
|
--confirm Required for production migrations
|
|
30
|
-
--tenant Tenant ID
|
|
30
|
+
--tenant Tenant ID; the script runs in one transaction on the default database
|
|
31
31
|
--job-type Override job type (default: "script")
|
|
32
32
|
|
|
33
33
|
${bold('Scoping (check, test):')}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Manifold } from '../pipework.js';
|
|
2
|
-
|
|
2
|
+
import { registerTsResolveHooks } from './ts-inline-hooks.js';
|
|
3
|
+
export { registerTsResolveHooks };
|
|
3
4
|
/**
|
|
4
5
|
* Loads the Manifold for `cwd` (default `process.cwd()`).
|
|
5
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../../src/core/config/discover.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../../src/core/config/discover.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAG9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,OAAO,EAAE,sBAAsB,EAAE,CAAA;AAIjC;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAetE;AAaD,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAYtD"}
|
|
@@ -1,64 +1,10 @@
|
|
|
1
1
|
import { resolve, dirname } from 'node:path';
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
|
-
import { register } from 'node:module';
|
|
4
3
|
import { ConfigError } from './errors.js';
|
|
5
4
|
import { importConfig } from './import-config.js';
|
|
5
|
+
import { registerTsResolveHooks } from './ts-inline-hooks.js';
|
|
6
|
+
export { registerTsResolveHooks };
|
|
6
7
|
const CONFIG_FILENAME = 'pipework.config.ts';
|
|
7
|
-
export function registerTsResolveHooks() {
|
|
8
|
-
{
|
|
9
|
-
// Self-contained mirror of ts-resolve-hooks.ts, registered as a `data:` URL so
|
|
10
|
-
// it works during pipework's own source-mode runs where the compiled
|
|
11
|
-
// ts-resolve-hooks.js does not exist yet. `resolve` maps a relative specifier
|
|
12
|
-
// to its backing TS file (.js→.ts + extensionless); `load` fully transpiles it
|
|
13
|
-
// (parameter properties, enums, namespaces) via Node's bundled
|
|
14
|
-
// `stripTypeScriptTypes` — `--experimental-strip-types` only erases annotations
|
|
15
|
-
// and rejects those features. Keep resolve and strip in sync with ts-resolve-hooks.ts, which also applies @flow_step.
|
|
16
|
-
const code = `
|
|
17
|
-
import { existsSync } from 'node:fs'
|
|
18
|
-
import { readFile } from 'node:fs/promises'
|
|
19
|
-
import { fileURLToPath } from 'node:url'
|
|
20
|
-
import { stripTypeScriptTypes } from 'node:module'
|
|
21
|
-
|
|
22
|
-
function tsCandidates(specifier) {
|
|
23
|
-
const jsMatch = specifier.match(/\\.([cm]?)js$/);
|
|
24
|
-
if (jsMatch !== null) {
|
|
25
|
-
return [specifier.slice(0, -jsMatch[0].length) + '.' + (jsMatch[1] || '') + 'ts'];
|
|
26
|
-
}
|
|
27
|
-
if (/\\.[cm]?tsx?$/.test(specifier)) return [];
|
|
28
|
-
return [specifier + '.ts', specifier + '.js', specifier + '/index.ts', specifier + '/index.js'];
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function resolve(specifier, context, nextResolve) {
|
|
32
|
-
const parent = context.parentURL || '';
|
|
33
|
-
const isLocal = (specifier.startsWith('./') || specifier.startsWith('../'))
|
|
34
|
-
&& !parent.includes('/node_modules/') && !parent.includes('/dist/');
|
|
35
|
-
if (isLocal) {
|
|
36
|
-
for (const candidate of tsCandidates(specifier)) {
|
|
37
|
-
let candidatePath = null;
|
|
38
|
-
try {
|
|
39
|
-
const url = new URL(candidate, parent);
|
|
40
|
-
if (url.protocol === 'file:') candidatePath = fileURLToPath(url);
|
|
41
|
-
} catch {}
|
|
42
|
-
if (candidatePath !== null && existsSync(candidatePath)) {
|
|
43
|
-
return nextResolve(candidate, context);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return nextResolve(specifier, context);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export async function load(url, context, nextLoad) {
|
|
51
|
-
if (url.endsWith('.ts') && !url.includes('/node_modules/')) {
|
|
52
|
-
const source = await readFile(fileURLToPath(url), 'utf8');
|
|
53
|
-
const transformed = stripTypeScriptTypes(source, { mode: 'transform', sourceMap: true, sourceUrl: url });
|
|
54
|
-
return { format: 'module', source: transformed, shortCircuit: true };
|
|
55
|
-
}
|
|
56
|
-
return nextLoad(url, context);
|
|
57
|
-
}
|
|
58
|
-
`;
|
|
59
|
-
register(`data:text/javascript,${encodeURIComponent(code)}`);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
8
|
/**
|
|
63
9
|
* Loads the Manifold for `cwd` (default `process.cwd()`).
|
|
64
10
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.js","sourceRoot":"","sources":["../../../src/core/config/discover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"discover.js","sourceRoot":"","sources":["../../../src/core/config/discover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,OAAO,EAAE,sBAAsB,EAAE,CAAA;AAEjC,MAAM,eAAe,GAAG,oBAAoB,CAAA;AAE5C;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,GAAY;IACjD,MAAM,KAAK,GAAG,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAA;IAClC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,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CAAA;AACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ts-inline-hooks.d.ts","sourceRoot":"","sources":["../../../src/core/config/ts-inline-hooks.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,eAAiC,CAAA;AAEtD,wBAAgB,sBAAsB,IAAI,IAAI,CAqE7C"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { register } from 'node:module';
|
|
2
|
+
import { existsSync } from 'node:fs';
|
|
3
|
+
export const TS_HOOKS = Symbol.for('pipework.tsHooks');
|
|
4
|
+
export function registerTsResolveHooks() {
|
|
5
|
+
if (Reflect.get(globalThis, TS_HOOKS) !== undefined)
|
|
6
|
+
return;
|
|
7
|
+
// Built package: the compiled transforming hook sits beside this file, so every
|
|
8
|
+
// in-process CLI path (run, seed, ...) applies @flow_step like serve and dev do.
|
|
9
|
+
if (existsSync(new URL('./ts-resolve-hooks.js', import.meta.url))) {
|
|
10
|
+
register('./ts-resolve-hooks.js', import.meta.url);
|
|
11
|
+
Reflect.set(globalThis, TS_HOOKS, 'transforming');
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
{
|
|
15
|
+
// Marker contract: globalThis[Symbol.for('pipework.tsHooks')] is 'transforming'
|
|
16
|
+
// once the @flow_step-applying loader is installed (by ts-register.js, or by this
|
|
17
|
+
// function when the built ts-resolve-hooks.js sits beside it); a hook registered
|
|
18
|
+
// later would run first and shadow it, so then nothing more is installed.
|
|
19
|
+
// Source-mode runs, where the compiled hook does not exist, install one inline
|
|
20
|
+
// hook and mark 'inline'.
|
|
21
|
+
// Self-contained mirror of ts-resolve-hooks.ts, registered as a `data:` URL so
|
|
22
|
+
// it works during pipework's own source-mode runs where the compiled
|
|
23
|
+
// ts-resolve-hooks.js does not exist yet. `resolve` maps a relative specifier
|
|
24
|
+
// to its backing TS file (.js→.ts + extensionless); `load` fully transpiles it
|
|
25
|
+
// (parameter properties, enums, namespaces) via Node's bundled
|
|
26
|
+
// `stripTypeScriptTypes` — `--experimental-strip-types` only erases annotations
|
|
27
|
+
// and rejects those features. Keep resolve and strip in sync with ts-resolve-hooks.ts, which also applies @flow_step.
|
|
28
|
+
const code = `
|
|
29
|
+
import { existsSync } from 'node:fs'
|
|
30
|
+
import { readFile } from 'node:fs/promises'
|
|
31
|
+
import { fileURLToPath } from 'node:url'
|
|
32
|
+
import { stripTypeScriptTypes } from 'node:module'
|
|
33
|
+
|
|
34
|
+
function tsCandidates(specifier) {
|
|
35
|
+
const jsMatch = specifier.match(/\\.([cm]?)js$/);
|
|
36
|
+
if (jsMatch !== null) {
|
|
37
|
+
return [specifier.slice(0, -jsMatch[0].length) + '.' + (jsMatch[1] || '') + 'ts'];
|
|
38
|
+
}
|
|
39
|
+
if (/\\.[cm]?tsx?$/.test(specifier)) return [];
|
|
40
|
+
return [specifier + '.ts', specifier + '.js', specifier + '/index.ts', specifier + '/index.js'];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function resolve(specifier, context, nextResolve) {
|
|
44
|
+
const parent = context.parentURL || '';
|
|
45
|
+
const isLocal = (specifier.startsWith('./') || specifier.startsWith('../'))
|
|
46
|
+
&& !parent.includes('/node_modules/') && !parent.includes('/dist/');
|
|
47
|
+
if (isLocal) {
|
|
48
|
+
for (const candidate of tsCandidates(specifier)) {
|
|
49
|
+
let candidatePath = null;
|
|
50
|
+
try {
|
|
51
|
+
const url = new URL(candidate, parent);
|
|
52
|
+
if (url.protocol === 'file:') candidatePath = fileURLToPath(url);
|
|
53
|
+
} catch {}
|
|
54
|
+
if (candidatePath !== null && existsSync(candidatePath)) {
|
|
55
|
+
return nextResolve(candidate, context);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return nextResolve(specifier, context);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export async function load(url, context, nextLoad) {
|
|
63
|
+
if (url.endsWith('.ts') && !url.includes('/node_modules/')) {
|
|
64
|
+
const source = await readFile(fileURLToPath(url), 'utf8');
|
|
65
|
+
const transformed = stripTypeScriptTypes(source, { mode: 'transform', sourceMap: true, sourceUrl: url });
|
|
66
|
+
return { format: 'module', source: transformed, shortCircuit: true };
|
|
67
|
+
}
|
|
68
|
+
return nextLoad(url, context);
|
|
69
|
+
}
|
|
70
|
+
`;
|
|
71
|
+
register(`data:text/javascript,${encodeURIComponent(code)}`);
|
|
72
|
+
Reflect.set(globalThis, TS_HOOKS, 'inline');
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=ts-inline-hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ts-inline-hooks.js","sourceRoot":"","sources":["../../../src/core/config/ts-inline-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEpC,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAA;AAEtD,MAAM,UAAU,sBAAsB;IACpC,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,KAAK,SAAS;QAAE,OAAM;IAC3D,gFAAgF;IAChF,iFAAiF;IACjF,IAAI,UAAU,CAAC,IAAI,GAAG,CAAC,uBAAuB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QAClE,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAClD,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAA;QACjD,OAAM;IACR,CAAC;IACD,CAAC;QACC,gFAAgF;QAChF,kFAAkF;QAClF,iFAAiF;QACjF,0EAA0E;QAC1E,+EAA+E;QAC/E,0BAA0B;QAC1B,+EAA+E;QAC/E,qEAAqE;QACrE,8EAA8E;QAC9E,+EAA+E;QAC/E,+DAA+D;QAC/D,gFAAgF;QAChF,sHAAsH;QACtH,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0CZ,CAAA;QACD,QAAQ,CAAC,wBAAwB,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAC5D,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAA;IAC7C,CAAC;AACH,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { register } from 'node:module';
|
|
2
2
|
register('./ts-resolve-hooks.js', import.meta.url);
|
|
3
|
+
// Tells registerTsResolveHooks() this loader is installed; it must not shadow it.
|
|
4
|
+
Reflect.set(globalThis, Symbol.for('pipework.tsHooks'), 'transforming');
|
|
3
5
|
//# sourceMappingURL=ts-register.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts-register.js","sourceRoot":"","sources":["../../../src/core/config/ts-register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"ts-register.js","sourceRoot":"","sources":["../../../src/core/config/ts-register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAClD,kFAAkF;AAClF,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,kBAAkB,CAAC,EAAE,cAAc,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts-resolve-hooks.d.ts","sourceRoot":"","sources":["../../../src/core/config/ts-resolve-hooks.ts"],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E;IAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CAAE,KAAK,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,GAC3G,OAAO,CAAC,UAAU,CAAC,CAYrB"}
|
|
@@ -62,6 +62,8 @@ function tsCandidates(specifier) {
|
|
|
62
62
|
return [];
|
|
63
63
|
return [specifier + '.ts', specifier + '.js', specifier + '/index.ts', specifier + '/index.js'];
|
|
64
64
|
}
|
|
65
|
+
// Installed by ts-register.js, which marks globalThis[Symbol.for('pipework.tsHooks')]
|
|
66
|
+
// so discovery's inline hook (ts-inline-hooks.ts) is not registered over it.
|
|
65
67
|
// `--experimental-strip-types` only erases annotations — it cannot emit the
|
|
66
68
|
// runtime code that parameter properties, enums, or namespaces require, and it
|
|
67
69
|
// rejects them outright (ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX). This `load` hook
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts-resolve-hooks.js","sourceRoot":"","sources":["../../../src/core/config/ts-resolve-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,oEAAoE;AACpE,uEAAuE;AACvE,2EAA2E;AAC3E,mFAAmF;AACnF,EAAE;AACF,6EAA6E;AAC7E,iFAAiF;AACjF,oEAAoE;AACpE,+EAA+E;AAC/E,oEAAoE;AACpE,EAAE;AACF,0EAA0E;AAC1E,0EAA0E;AAC1E,2EAA2E;AAC3E,6EAA6E;AAC7E,+EAA+E;AAC/E,2EAA2E;AAC3E,2EAA2E;AAC3E,4DAA4D;AAC5D,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,6DAA6D;AAC7D,MA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