@smoothbricks/nx-plugin 0.7.16 → 0.7.17

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/README.md CHANGED
@@ -1279,6 +1279,12 @@ Concrete targets come from concrete files:
1279
1279
  and never compiles one, and the inference guesses no workspace target. A declaration of another shape refuses the
1280
1280
  inference by its manifest path. Its compiler is the installed ttsc, which `bun.lock` and the patches in the check
1281
1281
  inputs already key. A project that depends only on typia stays on the pinned compiler.
1282
+ - A direct dependency whose ttsc plugin lowers by environment variables declares them in its manifest,
1283
+ `"smoo": { "compileEnv": ["NODE_ENV"] }` (`@smoothbricks/lmao-ttsc` does: it compiles trace statements away unless
1284
+ `NODE_ENV` is `test`). The transformed JavaScript is then a function of those variables, so `tsc-js` and every scriptc
1285
+ target hash each as an `{ "env": … }` input; `typecheck` does not, as no check reads them. A declaration of another
1286
+ shape refuses the inference by its manifest path. Targets a project declares itself, and test targets, list the input
1287
+ in their own `inputs`.
1282
1288
  - `typecheck-tests` is inferred from `tsconfig.test.json` and runs the same compiler on
1283
1289
  `-p tsconfig.test.json --noEmit`. It first rebuilds the current package's `tsc-js` output (or its non-TypeScript
1284
1290
  `build`) so self-imports resolve from its own outputs. Transform calls in test files are checked when the test runner
@@ -24,7 +24,9 @@
24
24
  "packages/nx-plugin/src/cargo-toolchain-paths.ts": "3c622c19ed7a43166e81f9a92e8ab0e3b607690add5408cd96e95912ecf4c4c1",
25
25
  "packages/nx-plugin/src/cargo-toolchain-policy.ts": "9c7bae572b57046dcc1e3d577b4abb25e877cf551efcca1b837c4bb5a8c62203",
26
26
  "packages/nx-plugin/src/cargo-workspace.ts": "ecbe5e0545e07a68ba02d18a2ed362a545e902e947a52af1dab112b71f91f633",
27
+ "packages/nx-plugin/src/compile-environment.ts": "8085b28e695f60306eefb91f3eca3e1bb908d7ea1676d028c7c85a6adda1a95c",
27
28
  "packages/nx-plugin/src/cross-check-policy.ts": "3a22f798805dca09f6452d929d86c0d76621bdd32d5d1f21fe02c75cf7335e2f",
29
+ "packages/nx-plugin/src/dependency-manifests.ts": "2acc8497dbf07e432a1a093c7c2fd8765bc4c3e089be7b332ea7d239e280d0b0",
28
30
  "packages/nx-plugin/src/deploy-policy.ts": "2f6202000dceca84d472f417affce50fd2ec3cab87c969443d83ec6e1d4ccf71",
29
31
  "packages/nx-plugin/src/disk-command-policy.ts": "fb8731ccf41cff47b88f30165b08dc8d551068c436f4e49cb2b62aa4b49be43c",
30
32
  "packages/nx-plugin/src/ensure-built-receipt.ts": "f80084d91d37c5132822bf26b45e6a9ae35e54e366cedbb9d69a2abd663ca419",
@@ -102,11 +104,11 @@
102
104
  "packages/nx-plugin/src/generators/make-public/schema.d.ts": "5e7bd2f1ce16795df4c919d6d53588ea85b574c84400940b6322275f96f60357",
103
105
  "packages/nx-plugin/src/go-tests.ts": "8e356b6ee276e6e836c404353b0ffb5ccec5beb261126f167f730e6e01e9c2b6",
104
106
  "packages/nx-plugin/src/graph-input-contract.ts": "8a1aec1294960ae80bcff55a0370c95004a911bf1afe6caa47e666da3baeac43",
105
- "packages/nx-plugin/src/index.ts": "8d021d230250f960beea3dcc7d52c0321839c40ce34e4972104254a4e0b05146",
107
+ "packages/nx-plugin/src/index.ts": "97cd2243f28c4bf75a2be30b2e21fb4573f6ce13ce96af6236590daee54f4744",
106
108
  "packages/nx-plugin/src/managed-assets.ts": "9cea959c09f3163992e666eecc5a65ec1f1b63c81fc56c5e99088507d02c5e3b",
107
109
  "packages/nx-plugin/src/managed-files/ci-workflow.ts": "c48f80cf3b215a8b41fdeb220e653a3a26ee288e833b1bb215f8f15de006e5ae",
108
110
  "packages/nx-plugin/src/managed-files/context.ts": "472553c8e15f5bb72f7167ca3f3c5ce5171f479a3cdf2fb4b9f86d1f1addf4bd",
109
- "packages/nx-plugin/src/managed-files/files.ts": "e26217a7833ff16a3bd5d6925f184f07cdffdc5a15f4ea41e22866edeb957a5e",
111
+ "packages/nx-plugin/src/managed-files/files.ts": "0e4010a194cc3ae89cc05ba1d3482d607fd3e39dd776edf0eaa8e38804e5d897",
110
112
  "packages/nx-plugin/src/managed-files/generator.ts": "8cf1a1b121645c5ead86c163c9da03f612efb2fff6aabed3ea858d87d6cbd0b3",
111
113
  "packages/nx-plugin/src/managed-files/github-runs-on.ts": "a049ca60a79dec57f77e5d18090569a9b8b78818219f236fe352e7705500f531",
112
114
  "packages/nx-plugin/src/managed-files/json-edit.ts": "81bc6dd10fffff583cc9f2269f0c2fd2f76b1c5aedbc7d068cf29878371497c2",
@@ -145,7 +147,7 @@
145
147
  "packages/nx-plugin/src/testing.ts": "ef26d48eb7b90d682778cbbff678c9cc25df57a6775cb58b8c925e8fb829fe6a",
146
148
  "packages/nx-plugin/src/tool-bins.ts": "8e5b194d76ce854fd33ad464017c021af401a2d92383f5c31168652b73656601",
147
149
  "packages/nx-plugin/src/type-guards.ts": "87d87a9bb83f0f4614b9f615d8cc7347772cb1418dc1946978987147c0d6ef0c",
148
- "packages/nx-plugin/src/typecheck-route.ts": "c2e1256582670ad18e3b2cb18d34dbf6a647c6575d4b43715f08b58bce50f84d",
150
+ "packages/nx-plugin/src/typecheck-route.ts": "90d47be308cb510b252451747d1eaaa2675f79c1687070e39fc7d2578abdb476",
149
151
  "packages/nx-plugin/src/typecheck-test-policy.ts": "5f6b1ff0dbf4bcac84721e60452790fb5e4ce41ee35ca2f1d033d51575ed53d7",
150
152
  "packages/nx-plugin/src/version-actions.cts": "c579ed33d5641bd487024429758582fe1f7bde376cfbd4a4a4325aa70fb71883",
151
153
  "packages/nx-plugin/src/wait-why-policy.ts": "f10a5370665c0c38dc778d7532b2cd2b008221efea097b788aeaba8ee63745ea",
@@ -0,0 +1,8 @@
1
+ import type { DependencyManifest } from './dependency-manifests.js';
2
+ /**
3
+ * The environment variables a project's transformed output depends on, over its direct dependencies' manifests, once
4
+ * each in declaration order. A manifest that declares `smoo.compileEnv` in another shape refuses the inference by its
5
+ * path and the field it got wrong.
6
+ */
7
+ export declare function compileEnvironment(manifests: readonly DependencyManifest[]): string[];
8
+ //# sourceMappingURL=compile-environment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compile-environment.d.ts","sourceRoot":"","sources":["../src/compile-environment.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAcpE;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,SAAS,kBAAkB,EAAE,GAAG,MAAM,EAAE,CAcrF"}
@@ -0,0 +1,80 @@
1
+ import * as _validateReport_1 from "typia/lib/internal/_validateReport";
2
+ import * as _createStandardSchema_1 from "typia/lib/internal/_createStandardSchema";
3
+ import typia from 'typia';
4
+ const validateManifest = (() => {
5
+ let errors;
6
+ let _report;
7
+ const _io0 = input => undefined === input.smoo || "object" === typeof input.smoo && null !== input.smoo && false === Array.isArray(input.smoo) && _io1(input.smoo);
8
+ const _io1 = input => undefined === input.compileEnv || Array.isArray(input.compileEnv) && input.compileEnv.every(elem => "string" === typeof elem);
9
+ const _vo0 = (input, _path, _exceptionable = true) => [undefined === input.smoo || ("object" === typeof input.smoo && null !== input.smoo && false === Array.isArray(input.smoo) || _report(_exceptionable, {
10
+ path: _path + ".smoo",
11
+ expected: "(undefined | { readonly compileEnv?: readonly string[] | undefined; })",
12
+ value: input.smoo
13
+ })) && _vo1(input.smoo, _path + ".smoo", true && _exceptionable) || _report(_exceptionable, {
14
+ path: _path + ".smoo",
15
+ expected: "(undefined | { readonly compileEnv?: readonly string[] | undefined; })",
16
+ value: input.smoo
17
+ })].every(flag => flag);
18
+ const _vo1 = (input, _path, _exceptionable = true) => [undefined === input.compileEnv || (Array.isArray(input.compileEnv) || _report(_exceptionable, {
19
+ path: _path + ".compileEnv",
20
+ expected: "(ReadonlyArray<string> | undefined)",
21
+ value: input.compileEnv
22
+ })) && input.compileEnv.map((elem, _index2) => "string" === typeof elem || _report(_exceptionable, {
23
+ path: _path + ".compileEnv[" + _index2 + "]",
24
+ expected: "string",
25
+ value: elem
26
+ })).every(flag => flag) || _report(_exceptionable, {
27
+ path: _path + ".compileEnv",
28
+ expected: "(ReadonlyArray<string> | undefined)",
29
+ value: input.compileEnv
30
+ })].every(flag => flag);
31
+ const __is = input => "object" === typeof input && null !== input && false === Array.isArray(input) && _io0(input);
32
+ return _createStandardSchema_1._createStandardSchema(input => {
33
+ if (false === __is(input)) {
34
+ errors = [];
35
+ _report = _validateReport_1._validateReport(errors);
36
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input && false === Array.isArray(input) || _report(true, {
37
+ path: _path + "",
38
+ expected: "DeclaringManifest",
39
+ value: input
40
+ })) && _vo0(input, _path + "", true) || _report(true, {
41
+ path: _path + "",
42
+ expected: "DeclaringManifest",
43
+ value: input
44
+ }))(input, "$input", true);
45
+ const success = 0 === errors.length;
46
+ return success ? {
47
+ success,
48
+ data: input
49
+ } : {
50
+ success,
51
+ errors,
52
+ data: input
53
+ };
54
+ }
55
+ return {
56
+ success: true,
57
+ data: input
58
+ };
59
+ });
60
+ })();
61
+ /**
62
+ * The environment variables a project's transformed output depends on, over its direct dependencies' manifests, once
63
+ * each in declaration order. A manifest that declares `smoo.compileEnv` in another shape refuses the inference by its
64
+ * path and the field it got wrong.
65
+ */
66
+ export function compileEnvironment(manifests) {
67
+ const names = [];
68
+ for (const manifest of manifests) {
69
+ const checked = validateManifest(manifest.json);
70
+ if (!checked.success) {
71
+ throw new Error(`${manifest.path}: smoo.compileEnv must be ['<VARIABLE>', ...]: ${checked.errors
72
+ .map((error) => `${error.path} expected ${error.expected}`)
73
+ .join('; ')}`);
74
+ }
75
+ for (const name of checked.data.smoo?.compileEnv ?? [])
76
+ if (!names.includes(name))
77
+ names.push(name);
78
+ }
79
+ return names;
80
+ }
@@ -0,0 +1,13 @@
1
+ /** One installed direct dependency's manifest: its package name, where it is, and its parsed JSON. */
2
+ export interface DependencyManifest {
3
+ readonly name: string;
4
+ readonly path: string;
5
+ readonly json: unknown;
6
+ }
7
+ /**
8
+ * The manifests of a project's direct dependencies, the ones ttsc discovers plugins on (`dependencies` and
9
+ * `devDependencies`), once per name. Each is the manifest Node resolution reaches from the project, as ttsc reads it;
10
+ * a dependency that is not installed has none. Read once per project, for every declaration inference reads from them.
11
+ */
12
+ export declare function directDependencyManifests(packageJsonPath: string, dependencies: readonly string[]): DependencyManifest[];
13
+ //# sourceMappingURL=dependency-manifests.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dependency-manifests.d.ts","sourceRoot":"","sources":["../src/dependency-manifests.ts"],"names":[],"mappings":"AAIA,sGAAsG;AACtG,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,SAAS,MAAM,EAAE,GAC9B,kBAAkB,EAAE,CAUtB"}
@@ -0,0 +1,20 @@
1
+ import { existsSync, readFileSync } from 'node:fs';
2
+ import { createRequire } from 'node:module';
3
+ import { join } from 'node:path';
4
+ /**
5
+ * The manifests of a project's direct dependencies, the ones ttsc discovers plugins on (`dependencies` and
6
+ * `devDependencies`), once per name. Each is the manifest Node resolution reaches from the project, as ttsc reads it;
7
+ * a dependency that is not installed has none. Read once per project, for every declaration inference reads from them.
8
+ */
9
+ export function directDependencyManifests(packageJsonPath, dependencies) {
10
+ const lookup = createRequire(packageJsonPath);
11
+ const manifests = [];
12
+ for (const name of new Set(dependencies)) {
13
+ const path = (lookup.resolve.paths(name) ?? [])
14
+ .map((root) => join(root, ...name.split('/'), 'package.json'))
15
+ .find((candidate) => existsSync(candidate));
16
+ if (path !== undefined)
17
+ manifests.push({ name, path, json: JSON.parse(readFileSync(path, 'utf-8')) });
18
+ }
19
+ return manifests;
20
+ }
@@ -1 +1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F;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAGhC,CAAC;AAEF,+GAA+G;AAC/G,eAAO,MAAM,cAAc,EAAE,cAI5B,CAAC;;;;;;;;;AAiDF,+GAA+G;AAC/G,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EACjC,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,MAAM,EACvB,cAAc,EAAE,MAAM,GACrB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAmCxB"}
package/dist/index.js CHANGED
@@ -15,7 +15,9 @@ import { CARGO_CLOSURE_INPUT, CARGO_LOCK_NODE_PREFIX, cargoClosureInputs, cargoL
15
15
  import { CARGO_PRODUCER_METADATA, postTasksExecution as postCargoRetention } from './cargo-retention-hook.js';
16
16
  import { CARGO_TOOLCHAIN_NAMED_INPUT, cargoRuntimeInput, cargoToolchainInputs } from './cargo-toolchain-policy.js';
17
17
  import { attributeCargoWorkspacePackages, CARGO_TEST_BUILD_TARGET, CARGO_TEST_EXCEPTIONS_SUFFIX, CARGO_TEST_TARGET, cargoPackageTestInputs, cargoTestGroupTargetName, cargoTestPackageTargetName, createCargoInputsCache, EXTERNAL_RUST_CRATES_INPUT, exceptionalTestFilter, listCargoCrossTestTargets, listCargoWorkspacePackages, NEXTEST_REPO_CONFIG_PATH, nextestToolConfigArg, PLUGIN_NEXTEST_CONFIG_PATH, requireExternalRustCratesInput, serialTestGroups, } from './cargo-workspace.js';
18
+ import { compileEnvironment } from './compile-environment.js';
18
19
  import { CARGO_CROSS_LINT_COMMAND, CARGO_CROSS_LINT_TARGET, CARGO_FETCH_COMMAND, CARGO_FETCH_TARGET, CARGO_LINT_CLIPPY_COMMAND, cargoCrossTestArchiveFile, cargoCrossTestArchiveTargetName, cargoCrossTestTargetName, cargoFrozen, runsFrozenCargo, } from './cross-check-policy.js';
20
+ import { directDependencyManifests } from './dependency-manifests.js';
19
21
  import { eslintConfigClosure } from './eslint-config-closure.js';
20
22
  import { ESLINT_SOURCES_GLOB, eslintSources } from './eslint-sources.js';
21
23
  import { ALL_VERDICTS_EXECUTOR, ESLINT_SOURCES_TOKEN, } from './executors/all-verdicts/schema.js';
@@ -70,11 +72,8 @@ function typecheckCommand(args) {
70
72
  * which bun.lock and the patches in its check inputs already key, and it waits for the targets the declaring package
71
73
  * names to prepare the plugin binaries ttsc loads. Every other project runs the pinned native compiler.
72
74
  */
73
- function typecheckTargets(packageJsonPath, packageJson) {
74
- const route = typecheckRoute(packageJsonPath, [
75
- ...Object.keys(packageJson.dependencies ?? {}),
76
- ...Object.keys(packageJson.devDependencies ?? {}),
77
- ]);
75
+ function typecheckTargets(manifests) {
76
+ const route = typecheckRoute(manifests);
78
77
  return route.declaredBy.length === 0
79
78
  ? { command: typecheckCommand, inputs: [TYPECHECK_COMPILER_INPUT], dependsOn: [] }
80
79
  : { command: (args) => `ttsc ${args}`, inputs: [], dependsOn: route.dependsOn };
@@ -1291,7 +1290,14 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
1291
1290
  const projectRoot = dirname(packageJsonPath);
1292
1291
  const absoluteProjectRoot = join(workspaceRoot, projectRoot);
1293
1292
  const packageJson = await readPackageJson(join(workspaceRoot, packageJsonPath));
1294
- const typecheck = typecheckTargets(join(workspaceRoot, packageJsonPath), packageJson);
1293
+ const dependencyManifests = directDependencyManifests(join(workspaceRoot, packageJsonPath), [
1294
+ ...Object.keys(packageJson.dependencies ?? {}),
1295
+ ...Object.keys(packageJson.devDependencies ?? {}),
1296
+ ]);
1297
+ const typecheck = typecheckTargets(dependencyManifests);
1298
+ // The environment a direct dependency's ttsc plugin lowers by (compile-environment.ts): the emitted JavaScript is a
1299
+ // function of it, so every target whose output is the transformed compile hashes it. A check never is.
1300
+ const compileEnvInputs = compileEnvironment(dependencyManifests).map((name) => ({ env: name }));
1295
1301
  const projectName = packageJson.nx?.name ?? packageJson.name;
1296
1302
  if (typeof projectName !== 'string' || projectName.length === 0) {
1297
1303
  throw new Error(`${packageJsonPath} must declare a non-empty package or nx project name`);
@@ -1367,7 +1373,7 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
1367
1373
  targets['tsc-js'] = {
1368
1374
  executor: '@smoothbricks/nx-plugin:typescript-emit',
1369
1375
  cache: true,
1370
- inputs: ['production', '^production', ...toolchainInputs, '{projectRoot}/tsconfig.lib.json'],
1376
+ inputs: ['production', '^production', ...toolchainInputs, ...compileEnvInputs, '{projectRoot}/tsconfig.lib.json'],
1371
1377
  outputs: inferTypescriptOutputs(libOutDir),
1372
1378
  dependsOn: ['^*-js', ...(cargoWasmConfig ? ['cargo-wasm'] : [])],
1373
1379
  options: {
@@ -1393,7 +1399,10 @@ async function createProjectTargets(packageJsonPath, workspaceRoot, hostPlatform
1393
1399
  cwd: projectRoot,
1394
1400
  },
1395
1401
  };
1396
- Object.assign(targets, scriptcPlatformTargets(packageJson, packageJsonPath, projectRoot, libTsconfigPath, toolchainInputs));
1402
+ Object.assign(targets, scriptcPlatformTargets(packageJson, packageJsonPath, projectRoot, libTsconfigPath, [
1403
+ ...toolchainInputs,
1404
+ ...compileEnvInputs,
1405
+ ]));
1397
1406
  }
1398
1407
  if (hasTestTsconfig) {
1399
1408
  targets['typecheck-tests'] = {
@@ -44,9 +44,9 @@ export interface ManagedFileContext {
44
44
  }
45
45
  /** Temporary upstream compiler repairs distributed to smoo-managed Bun workspaces. */
46
46
  export declare const managedTtscPatch: {
47
- readonly version: '0.34.1';
48
- readonly key: 'ttsc@0.34.1';
49
- readonly path: 'patches/ttsc@0.34.1.patch';
47
+ readonly version: '0.36.3';
48
+ readonly key: 'ttsc@0.36.3';
49
+ readonly path: 'patches/ttsc@0.36.3.patch';
50
50
  };
51
51
  /** Maintained Nx 24.0.3 repairs, applied as an ordinary Bun patchedDependency over the registry release. */
52
52
  export declare const managedNxPatch: {
@@ -7,9 +7,9 @@ import { renderPrPreviewCleanupWorkflowYaml, renderPrStageSweepWorkflowYaml } fr
7
7
  import { renderPublishWorkflowYaml } from './publish-workflow.js';
8
8
  /** Temporary upstream compiler repairs distributed to smoo-managed Bun workspaces. */
9
9
  export const managedTtscPatch = {
10
- version: '0.34.1',
11
- key: 'ttsc@0.34.1',
12
- path: 'patches/ttsc@0.34.1.patch',
10
+ version: '0.36.3',
11
+ key: 'ttsc@0.36.3',
12
+ path: 'patches/ttsc@0.36.3.patch',
13
13
  };
14
14
  /** Maintained Nx 24.0.3 repairs, applied as an ordinary Bun patchedDependency over the registry release. */
15
15
  export const managedNxPatch = {
@@ -1,3 +1,4 @@
1
+ import type { DependencyManifest } from './dependency-manifests.js';
1
2
  /**
2
3
  * What a package whose ttsc plugin lowers a dialect declares in its manifest, as `smoo.typecheck`: every project that
3
4
  * depends on it directly compiles sources the stock checker refuses (a construct the plugin's ProgramPlugin rewrites
@@ -19,10 +20,8 @@ export interface TypecheckRoute {
19
20
  readonly dependsOn: readonly string[];
20
21
  }
21
22
  /**
22
- * The typecheck route of the project whose manifest is `packageJsonPath`, over its direct dependencies (the ones ttsc
23
- * discovers plugins on: `dependencies` and `devDependencies`). Each dependency's manifest is the one Node resolution
24
- * reaches from the project, as ttsc reads it; a dependency that is not installed declares nothing. A manifest that
23
+ * The typecheck route of a project over its direct dependencies' manifests (dependency-manifests.ts). A manifest that
25
24
  * declares `smoo.typecheck` in another shape refuses the inference by its path and the field it got wrong.
26
25
  */
27
- export declare function typecheckRoute(packageJsonPath: string, dependencies: readonly string[]): TypecheckRoute;
26
+ export declare function typecheckRoute(manifests: readonly DependencyManifest[]): TypecheckRoute;
28
27
  //# sourceMappingURL=typecheck-route.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typecheck-route.d.ts","sourceRoot":"","sources":["../src/typecheck-route.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yDAAyD;IACzD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AASD,yHAAyH;AACzH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,cAAc,CAuBvG"}
1
+ {"version":3,"file":"typecheck-route.d.ts","sourceRoot":"","sources":["../src/typecheck-route.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yDAAyD;IACzD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AASD,yHAAyH;AACzH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,SAAS,kBAAkB,EAAE,GAAG,cAAc,CAkBvF"}
@@ -1,8 +1,5 @@
1
1
  import * as _validateReport_1 from "typia/lib/internal/_validateReport";
2
2
  import * as _createStandardSchema_1 from "typia/lib/internal/_createStandardSchema";
3
- import { existsSync, readFileSync } from 'node:fs';
4
- import { createRequire } from 'node:module';
5
- import { join } from 'node:path';
6
3
  import typia from 'typia';
7
4
  const validateManifest = (() => {
8
5
  let errors;
@@ -76,22 +73,14 @@ const validateManifest = (() => {
76
73
  });
77
74
  })();
78
75
  /**
79
- * The typecheck route of the project whose manifest is `packageJsonPath`, over its direct dependencies (the ones ttsc
80
- * discovers plugins on: `dependencies` and `devDependencies`). Each dependency's manifest is the one Node resolution
81
- * reaches from the project, as ttsc reads it; a dependency that is not installed declares nothing. A manifest that
76
+ * The typecheck route of a project over its direct dependencies' manifests (dependency-manifests.ts). A manifest that
82
77
  * declares `smoo.typecheck` in another shape refuses the inference by its path and the field it got wrong.
83
78
  */
84
- export function typecheckRoute(packageJsonPath, dependencies) {
79
+ export function typecheckRoute(manifests) {
85
80
  const declaredBy = [];
86
81
  const dependsOn = [];
87
- const lookup = createRequire(packageJsonPath);
88
- for (const name of new Set(dependencies)) {
89
- const manifest = (lookup.resolve.paths(name) ?? [])
90
- .map((root) => join(root, ...name.split('/'), 'package.json'))
91
- .find((candidate) => existsSync(candidate));
92
- if (manifest === undefined)
93
- continue;
94
- const checked = validateManifest(JSON.parse(readFileSync(manifest, 'utf-8')));
82
+ for (const { name, path: manifest, json } of manifests) {
83
+ const checked = validateManifest(json);
95
84
  if (!checked.success) {
96
85
  throw new Error(`${manifest}: smoo.typecheck must be { compiler: 'ttsc', dependsOn: ['<project>:<target>', ...] }: ${checked.errors
97
86
  .map((error) => `${error.path} expected ${error.expected}`)