target-run 0.1.0 → 1.0.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/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Carlos Menezes
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,70 +1,66 @@
1
1
  # target-run
2
2
 
3
- OS & architecture-aware script dispatcher. Define platform-specific scripts
4
- in `package.json` and let `target-run` pick the right one at runtime.
3
+ ![NPM Version](https://img.shields.io/npm/v/target-run) ![NPM Downloads](https://img.shields.io/npm/dt/target-run) ![NPM License](https://img.shields.io/npm/l/target-run)
5
4
 
6
- ## Installation
5
+ Platform-aware script runner for Node.js projects.
7
6
 
8
7
  ```sh
9
- npm install --save-dev target-run
10
- # or
11
8
  pnpm add -D target-run
12
- # or
13
- yarn add -D target-run
14
9
  ```
15
10
 
16
- ## How it works
11
+ Set a script body to `target-run`, then define platform/arch variants:
17
12
 
18
- Replace any script body with `target-run`, then add variants using the naming convention:
19
-
20
- ```sh
21
- <script>:<platform>:<arch>
13
+ ```json
14
+ {
15
+ "scripts": {
16
+ "test": "target-run",
17
+ "test:darwin:arm64": "jest --config jest.apple-silicon.config.ts",
18
+ "test:linux:x64": "jest --config jest.linux.config.ts",
19
+ "test:default": "jest"
20
+ }
21
+ }
22
22
  ```
23
23
 
24
- `target-run` tries candidates in this order and runs the first match:
24
+ Candidates are resolved in order:
25
25
 
26
- 1. `<script>:<platform>:<arch>`: exact (e.g. `test:linux:x64`)
27
- 2. `<script>:<platform>`: OS-only (e.g. `test:darwin`)
28
- 3. `<script>:<arch>`: arch-only (e.g. `test:arm64`)
29
- 4. `<script>:default`: explicit fallback
26
+ 1. `<script>:<platform>:<arch>`
27
+ 2. `<script>:<platform>`
28
+ 3. `<script>:<arch>`
29
+ 4. `<script>:default`
30
30
 
31
- Platform values come from `os.platform()` (`win32`, `darwin`, `linux`, etc) and
32
- arch values from `os.arch()` (`x64`, `arm64`, `ia32`, etc).
31
+ Platform values come from `os.platform()` and arch from `os.arch()`.
33
32
 
34
33
  ## Example
35
34
 
35
+ Given this `package.json` on a Linux x64 machine:
36
+
36
37
  ```json
37
38
  {
38
39
  "scripts": {
39
- "test": "target-run",
40
- "test:darwin:arm64": "jest --config jest.apple-silicon.config.ts",
41
- "test:linux:x64": "jest --config jest.linux.config.ts",
42
- "test:default": "jest"
40
+ "build": "target-run",
41
+ "build:linux:x64": "node dist/index-linux-x64.js",
42
+ "build:darwin:arm64": "node dist/index-darwin-arm64.js",
43
+ "build:default": "node dist/index.js"
43
44
  }
44
45
  }
45
46
  ```
46
47
 
47
- Running `npm test` (or `pnpm test`, `yarn test`, `bun run test`) dispatches
48
- to the variant that matches the current machine.
48
+ ```sh
49
+ $ pnpm build
50
+ # linux/x64 → node dist/index-linux-x64.js
51
+ # darwin/arm64 → node dist/index-darwin-arm64.js
52
+ # win32/x64 → node dist/index.js (fallback)
53
+ ```
49
54
 
50
55
  ## CLI options
51
56
 
52
- ```sh
53
- Usage: target-run [options]
54
-
55
- Options:
56
- --help, -h Print this help message
57
- --version, -v Print the package version
58
- --dry-run Resolve and print the target script key without executing
59
- --verbose Print platform, arch, resolved key, and runner details
60
- --optional Exit 0 silently when no matching script is found
61
- --required Exit 1 when no matching script is found (overrides lifecycle hook skip)
62
- --script <name> Override the base script name (bypasses npm_lifecycle_event)
63
- --cwd <path> Set the working directory for package.json lookup
57
+ | Flag | Description |
58
+ |---|---|
59
+ | `--dry-run` | Print the resolved key without executing |
60
+ | `--verbose` | Print platform, arch, resolved key and runner |
61
+ | `--optional` | Exit 0 silently when no match is found |
62
+ | `--required` | Exit 1 when no match is found |
63
+ | `--script <name>` | Override the base script name[^1] |
64
+ | `--cwd <path>` | Set the working directory for `package.json` lookup |
64
65
 
65
- Naming convention:
66
- <script>:<platform>:<arch> Exact match (e.g. test:linux:x64)
67
- <script>:<platform> OS-only fallback (e.g. test:linux)
68
- <script>:<arch> Arch-only fallback (e.g. test:x64)
69
- <script>:default Explicit default
70
- ```
66
+ [^1]: Useful when invoking `target-run` outside of an npm lifecycle, e.g. `target-run --script build` in a shell script or CI step where `npm_lifecycle_event` is not set.
@@ -6,7 +6,7 @@ import { dispatch } from "../src/dispatcher.js";
6
6
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
7
7
  const args = process.argv.slice(2);
8
8
  if (args.includes("--help") || args.includes("-h")) {
9
- console.log(`target-run — OS & architecture-aware script dispatcher
9
+ console.log(`target-run: platform-aware script runner for Node.js projects.
10
10
 
11
11
  Usage: target-run [options]
12
12
 
@@ -14,12 +14,12 @@ Options:
14
14
  --help, -h Print this help message
15
15
  --version, -v Print the package version
16
16
  --dry-run Resolve and print the target script key without executing
17
- --verbose Print platform, arch, resolved key, and runner details
17
+ --verbose Print platform, arch, resolved key and runner details
18
18
  --optional Exit 0 silently when no matching script is found instead of
19
- erroring useful for hooks that only apply to some platforms
19
+ erroring; useful for hooks that only apply to some platforms
20
20
  --required Exit 1 when no matching script is found, even for lifecycle hooks
21
21
  (e.g. preinstall) whose missing variant would normally be skipped
22
- silently use this to enforce that every platform has a variant
22
+ silently; use this to enforce that every platform has a variant
23
23
  --script <name> Override the base script name (bypasses npm_lifecycle_event)
24
24
  --cwd <path> Set the working directory for package.json lookup
25
25
 
@@ -49,4 +49,3 @@ dispatch({
49
49
  baseScript: getArg("--script"),
50
50
  cwd: getArg("--cwd"),
51
51
  });
52
- //# sourceMappingURL=target-run.js.map
@@ -15,4 +15,3 @@ export const createDetector = (osModule) => ({
15
15
  getArch: () => osModule.arch(),
16
16
  });
17
17
  export const defaultDetector = createDetector(os);
18
- //# sourceMappingURL=detector.js.map
@@ -37,7 +37,7 @@ const readScripts = (pkgPath) => {
37
37
  };
38
38
  /**
39
39
  * Main entry point. Resolves the correct platform/arch script and runs it.
40
- * All errors are caught, printed to stderr, and result in exit code 1.
40
+ * All errors are caught, printed to stderr and result in exit code 1.
41
41
  */
42
42
  export const dispatch = (options = {}) => {
43
43
  try {
@@ -64,14 +64,14 @@ export const dispatch = (options = {}) => {
64
64
  }
65
65
  const result = resolveScript({ base: baseScript, platform, arch, scripts });
66
66
  if (result.key === null) {
67
- // Level 5 lifecycle hook self-reference, no platform variant found.
67
+ // Level 5: lifecycle hook self-reference, no platform variant found.
68
68
  if (result.skipped && !options.required) {
69
69
  if (options.verbose) {
70
70
  console.error(`[target-run] No platform variant for '${baseScript}', skipping silently (self-reference).`);
71
71
  }
72
72
  process.exit(0);
73
73
  }
74
- // Level 6 genuinely no match (or --required forces hard failure on level 5).
74
+ // Level 6: genuinely no match (or --required forces hard failure on level 5).
75
75
  if (options.optional) {
76
76
  if (options.verbose) {
77
77
  console.error(`[target-run] No matching script found, exiting 0 (--optional).`);
@@ -95,11 +95,11 @@ export const dispatch = (options = {}) => {
95
95
  catch (err) {
96
96
  if (err instanceof ScriptNotFoundError) {
97
97
  console.error("[target-run] ERROR: No matching script found.");
98
- console.error(` Calling script : ${err.baseScript}`);
99
- console.error(` Platform : ${err.platform}`);
100
- console.error(` Architecture : ${err.arch}`);
101
- console.error(` Tried keys : ${err.tried.join(", ")}`);
102
- console.error(` Available : ${err.available.join(", ") || "(none)"}`);
98
+ console.error(` Script\t: ${err.baseScript}`);
99
+ console.error(` Platform\t: ${err.platform}`);
100
+ console.error(` Architecture\t: ${err.arch}`);
101
+ console.error(` Tried keys\t: ${err.tried.join(", ")}`);
102
+ console.error(` Available\t: ${err.available.join(", ") || "(none)"}`);
103
103
  }
104
104
  else if (err instanceof Error) {
105
105
  console.error(`[target-run] ERROR: ${err.message}`);
@@ -107,4 +107,3 @@ export const dispatch = (options = {}) => {
107
107
  process.exit(1);
108
108
  }
109
109
  };
110
- //# sourceMappingURL=dispatcher.js.map
@@ -60,4 +60,3 @@ export class CircularDispatchError extends DispatcherError {
60
60
  this.name = "CircularDispatchError";
61
61
  }
62
62
  }
63
- //# sourceMappingURL=errors.js.map
package/dist/src/index.js CHANGED
@@ -3,4 +3,3 @@ export { createDetector, defaultDetector } from "./detector.js";
3
3
  export { dispatch } from "./dispatcher.js";
4
4
  export { CircularDispatchError, DispatcherError, LifecycleEventError, PackageJsonError, ScriptNotFoundError, } from "./errors.js";
5
5
  export { resolveScript, } from "./resolver.js";
6
- //# sourceMappingURL=index.js.map
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * Resolves the correct script key using the fallback chain:
3
3
  *
4
- * 1. `<base>:<platform>:<arch>` exact match
5
- * 2. `<base>:<platform>` OS-only match
6
- * 3. `<base>:<arch>` arch-only match
7
- * 4. `<base>:default` explicit default
8
- * 5. Self-reference skip if base script value is "target-run", skipped=true
4
+ * 1. `<base>:<platform>:<arch>` : exact match
5
+ * 2. `<base>:<platform>` : OS-only match
6
+ * 3. `<base>:<arch>` : arch-only match
7
+ * 4. `<base>:default` : explicit default
8
+ * 5. Self-reference skip : if base script value is "target-run", skipped=true
9
9
  *
10
10
  * Returns `{ key: null, command: null, tried }` (with optional `skipped`)
11
11
  * when nothing matches.
@@ -31,4 +31,3 @@ export const resolveScript = (params) => {
31
31
  }
32
32
  return { key: null, command: null, tried };
33
33
  };
34
- //# sourceMappingURL=resolver.js.map
@@ -4,7 +4,7 @@ import { CircularDispatchError } from "./errors.js";
4
4
  * Infers the package manager by inspecting npm_execpath, which all major
5
5
  * package managers (npm, pnpm, yarn, bun) set automatically when running scripts.
6
6
  */
7
- export const detectPackageManager = () => {
7
+ const detectPackageManager = () => {
8
8
  const execPath = process.env["npm_execpath"];
9
9
  if (!execPath)
10
10
  return "npm";
@@ -49,4 +49,3 @@ export const run = (options) => {
49
49
  }
50
50
  return result.status ?? 1;
51
51
  };
52
- //# sourceMappingURL=runner.js.map
package/package.json CHANGED
@@ -1,7 +1,21 @@
1
1
  {
2
2
  "name": "target-run",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "description": "OS & architecture-aware script dispatcher",
5
+ "keywords": [
6
+ "cross-platform",
7
+ "script",
8
+ "dispatcher",
9
+ "platform",
10
+ "architecture",
11
+ "cli",
12
+ "npm-scripts",
13
+ "os"
14
+ ],
15
+ "repository": {
16
+ "url": "https://github.com/carlos-menezes/target-run",
17
+ "type": "git"
18
+ },
5
19
  "type": "module",
6
20
  "author": "Carlos Menezes",
7
21
  "license": "MIT",
@@ -23,8 +37,11 @@
23
37
  "devDependencies": {
24
38
  "@biomejs/biome": "2.4.7",
25
39
  "@changesets/cli": "^2.30.0",
40
+ "@commitlint/cli": "^20.5.0",
41
+ "@commitlint/config-conventional": "^20.5.0",
26
42
  "@types/node": "^22.0.0",
27
- "tsx": "^4.19.3",
43
+ "husky": "^9.1.7",
44
+ "knip": "^5.87.0",
28
45
  "typescript": "^5.9.3",
29
46
  "vitest": "^3.1.1"
30
47
  },
@@ -37,6 +54,7 @@
37
54
  "check": "biome check .",
38
55
  "changeset": "changeset",
39
56
  "version": "changeset version",
40
- "release": "pnpm build && pnpm publish --access public"
57
+ "release": "pnpm build && pnpm publish --access public",
58
+ "knip": "knip"
41
59
  }
42
60
  }
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
3
- //# sourceMappingURL=target-run.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"target-run.d.ts","sourceRoot":"","sources":["../../bin/target-run.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"target-run.js","sourceRoot":"","sources":["../../bin/target-run.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/D,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAEnC,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;IACpD,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;CAsBZ,CAAC,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC;AAED,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;IACvD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;IACxD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAEtD,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACzB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC;AAED,MAAM,MAAM,GAAG,CAAC,IAAY,EAAsB,EAAE;IACnD,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC/C,CAAC,CAAC;AAEF,QAAQ,CAAC;IACR,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;IAClC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;IACnC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC;IACrC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC;IACrC,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;IAC9B,GAAG,EAAE,MAAM,CAAC,OAAO,CAAC;CACpB,CAAC,CAAC"}
@@ -1,21 +0,0 @@
1
- import os from "node:os";
2
- export type Detector = {
3
- getPlatform: () => string;
4
- getArch: () => string;
5
- };
6
- type OsModule = Pick<typeof os, "platform" | "arch">;
7
- /**
8
- * Creates a Detector from any object that exposes platform() and arch().
9
- *
10
- * @example
11
- * // production
12
- * import { defaultDetector } from "./detect.js";
13
- *
14
- * @example
15
- * // test
16
- * const detector = createDetector({ platform: () => "win32", arch: () => "x64" });
17
- */
18
- export declare const createDetector: (osModule: OsModule) => Detector;
19
- export declare const defaultDetector: Detector;
20
- export {};
21
- //# sourceMappingURL=detector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"detector.d.ts","sourceRoot":"","sources":["../../src/detector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,MAAM,MAAM,QAAQ,GAAG;IACtB,WAAW,EAAE,MAAM,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,MAAM,CAAC;CACtB,CAAC;AAEF,KAAK,QAAQ,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,UAAU,GAAG,MAAM,CAAC,CAAC;AAErD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU,QAAQ,KAAG,QAGlD,CAAC;AAEH,eAAO,MAAM,eAAe,EAAE,QAA6B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"detector.js","sourceRoot":"","sources":["../../src/detector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AASzB;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAAkB,EAAY,EAAE,CAAC,CAAC;IAChE,WAAW,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE;IACtC,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE;CAC9B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAa,cAAc,CAAC,EAAE,CAAC,CAAC"}
@@ -1,33 +0,0 @@
1
- import { type Detector } from "./detector.js";
2
- export type DispatcherOptions = {
3
- /** Resolve and print the script key without executing anything. */
4
- dryRun?: boolean;
5
- /** Print platform, arch, resolved key, and runner details to stderr. */
6
- verbose?: boolean;
7
- /**
8
- * Exit 0 silently when no matching script is found instead of erroring.
9
- * Useful for hooks that only apply to some platforms.
10
- */
11
- optional?: boolean;
12
- /**
13
- * Exit 1 when no matching script is found, even for lifecycle hooks (e.g.
14
- * `preinstall`) whose missing platform variant would normally be skipped
15
- * silently. Use this to enforce that every target platform has a variant.
16
- */
17
- required?: boolean;
18
- /** Working directory used to locate package.json. Defaults to process.cwd(). */
19
- cwd?: string;
20
- /**
21
- * Override the base script name instead of reading npm_lifecycle_event.
22
- * Useful when invoking the dispatcher programmatically or from --script flag.
23
- */
24
- baseScript?: string;
25
- /** Injectable OS detector — supply a stub in unit tests. */
26
- detector?: Detector;
27
- };
28
- /**
29
- * Main entry point. Resolves the correct platform/arch script and runs it.
30
- * All errors are caught, printed to stderr, and result in exit code 1.
31
- */
32
- export declare const dispatch: (options?: DispatcherOptions) => void;
33
- //# sourceMappingURL=dispatcher.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dispatcher.d.ts","sourceRoot":"","sources":["../../src/dispatcher.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,EAAmB,MAAM,eAAe,CAAC;AAS/D,MAAM,MAAM,iBAAiB,GAAG;IAC/B,mEAAmE;IACnE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,wEAAwE;IACxE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gFAAgF;IAChF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACpB,CAAC;AAgCF;;;GAGG;AACH,eAAO,MAAM,QAAQ,GAAI,UAAS,iBAAsB,KAAG,IA8F1D,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"dispatcher.js","sourceRoot":"","sources":["../../src/dispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAiB,eAAe,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EACN,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AA6BlC;;GAEG;A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AC,sBAAsB,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC;YACtD,OAAO,CAAC,KAAK,CAAC,sBAAsB,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;YACpD,OAAO,CAAC,KAAK,CAAC,sBAAsB,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;YAChD,OAAO,CAAC,KAAK,CAAC,sBAAsB,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC5D,OAAO,CAAC,KAAK,CACZ,sBAAsB,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,QAAQ,EAAE,CAC5D,CAAC;QACH,CAAC;aAAM,IAAI,GAAG,YAAY,KAAK,EAAE,CAAC;YACjC,OAAO,CAAC,KAAK,CAAC,uBAAuB,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;QACrD,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC;AACF,CAAC,CAAC"}
@@ -1,41 +0,0 @@
1
- /**
2
- * Base error class for all target-run errors.
3
- */
4
- export declare class DispatcherError extends Error {
5
- constructor(message: string);
6
- }
7
- /**
8
- * Thrown when package.json cannot be found or parsed.
9
- */
10
- export declare class PackageJsonError extends DispatcherError {
11
- constructor(message: string);
12
- }
13
- /**
14
- * Thrown when no matching script is found and the invocation is not optional.
15
- * Carries diagnostic metadata for a human-readable error message.
16
- */
17
- export declare class ScriptNotFoundError extends DispatcherError {
18
- readonly baseScript: string;
19
- readonly platform: string;
20
- readonly arch: string;
21
- readonly tried: string[];
22
- readonly available: string[];
23
- constructor(message: string, baseScript: string, platform: string, arch: string, tried: string[], available: string[]);
24
- }
25
- /**
26
- * Thrown when npm_lifecycle_event is not set, meaning the tool was not
27
- * invoked through a package manager script.
28
- */
29
- export declare class LifecycleEventError extends DispatcherError {
30
- constructor();
31
- }
32
- /**
33
- * Thrown when a resolved platform-specific script command would invoke
34
- * target-run again, creating an infinite subprocess loop.
35
- */
36
- export declare class CircularDispatchError extends DispatcherError {
37
- readonly scriptKey: string;
38
- readonly command: string;
39
- constructor(scriptKey: string, command: string);
40
- }
41
- //# sourceMappingURL=errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM;CAI3B;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,eAAe;gBACxC,OAAO,EAAE,MAAM;CAI3B;AAED;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,eAAe;aAGtC,UAAU,EAAE,MAAM;aAClB,QAAQ,EAAE,MAAM;aAChB,IAAI,EAAE,MAAM;aACZ,KAAK,EAAE,MAAM,EAAE;aACf,SAAS,EAAE,MAAM,EAAE;gBALnC,OAAO,EAAE,MAAM,EACC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EAAE,EACf,SAAS,EAAE,MAAM,EAAE;CAKpC;AAED;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,eAAe;;CAOvD;AAED;;;GAGG;AACH,qBAAa,qBAAsB,SAAQ,eAAe;aAExC,SAAS,EAAE,MAAM;aACjB,OAAO,EAAE,MAAM;gBADf,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM;CAOhC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACzC,YAAY,OAAe;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAC/B,CAAC;CACD;AAED;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,eAAe;IACpD,YAAY,OAAe;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IAChC,CAAC;CACD;AAED;;;GAGG;AACH,MAAM,OAAO,mBAAoB,SAAQ,eAAe;IAGtC;IACA;IACA;IACA;IACA;IANjB,YACC,OAAe,EACC,UAAkB,EAClB,QAAgB,EAChB,IAAY,EACZ,KAAe,EACf,SAAmB;QAEnC,KAAK,CAAC,OAAO,CAAC,CAAC;QANC,eAAU,GAAV,UAAU,CAAQ;QAClB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,SAAI,GAAJ,IAAI,CAAQ;QACZ,UAAK,GAAL,KAAK,CAAU;QACf,cAAS,GAAT,SAAS,CAAU;QAGnC,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACnC,CAAC;CACD;AAED;;;GAGG;AACH,MAAM,OAAO,mBAAoB,SAAQ,eAAe;IACvD;QACC,KAAK,CACJ,0FAA0F,CAC1F,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACnC,CAAC;CACD;AAED;;;GAGG;AACH,MAAM,OAAO,qBAAsB,SAAQ,eAAe;IAExC;IACA;IAFjB,YACiB,SAAiB,EACjB,OAAe;QAE/B,KAAK,CACJ,gCAAgC,SAAS,kBAAkB,OAAO,yCAAyC,CAC3G,CAAC;QALc,cAAS,GAAT,SAAS,CAAQ;QACjB,YAAO,GAAP,OAAO,CAAQ;QAK/B,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;IACrC,CAAC;CACD"}
@@ -1,5 +0,0 @@
1
- export { createDetector, type Detector, defaultDetector } from "./detector.js";
2
- export { type DispatcherOptions, dispatch } from "./dispatcher.js";
3
- export { CircularDispatchError, DispatcherError, LifecycleEventError, PackageJsonError, ScriptNotFoundError, } from "./errors.js";
4
- export { type ResolveScriptParams, type ResolveScriptResult, resolveScript, } from "./resolver.js";
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,KAAK,QAAQ,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,KAAK,iBAAiB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EACN,qBAAqB,EACrB,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,aAAa,GACb,MAAM,eAAe,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B,OAAO,EAAE,cAAc,EAAiB,eAAe,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAA0B,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EACN,qBAAqB,EACrB,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAGN,aAAa,GACb,MAAM,eAAe,CAAC"}
@@ -1,38 +0,0 @@
1
- export type ResolveScriptParams = {
2
- base: string;
3
- platform: string;
4
- arch: string;
5
- scripts: Record<string, string>;
6
- };
7
- /** A script was found — key and command are both guaranteed non-null. */
8
- type ResolveScriptFound = {
9
- key: string;
10
- command: string;
11
- tried: string[];
12
- skipped?: never;
13
- };
14
- /** No script matched — key/command are null; skipped signals a silent skip. */
15
- type ResolveScriptMissed = {
16
- key: null;
17
- command: null;
18
- tried: string[];
19
- /** True when the base script is `target-run` itself and no platform variant
20
- * was found — the canonical signal for a silent lifecycle-hook skip. */
21
- skipped?: boolean;
22
- };
23
- export type ResolveScriptResult = ResolveScriptFound | ResolveScriptMissed;
24
- /**
25
- * Resolves the correct script key using the fallback chain:
26
- *
27
- * 1. `<base>:<platform>:<arch>` — exact match
28
- * 2. `<base>:<platform>` — OS-only match
29
- * 3. `<base>:<arch>` — arch-only match
30
- * 4. `<base>:default` — explicit default
31
- * 5. Self-reference skip — if base script value is "target-run", skipped=true
32
- *
33
- * Returns `{ key: null, command: null, tried }` (with optional `skipped`)
34
- * when nothing matches.
35
- */
36
- export declare const resolveScript: (params: ResolveScriptParams) => ResolveScriptResult;
37
- export {};
38
- //# sourceMappingURL=resolver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../src/resolver.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC,CAAC;AAEF,yEAAyE;AACzE,KAAK,kBAAkB,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,KAAK,CAAC;CAChB,CAAC;AAEF,+EAA+E;AAC/E,KAAK,mBAAmB,GAAG;IAC1B,GAAG,EAAE,IAAI,CAAC;IACV,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB;6EACyE;IACzE,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,kBAAkB,GAAG,mBAAmB,CAAC;AAE3E;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,GACzB,QAAQ,mBAAmB,KACzB,mBAwBF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolver.js","sourceRoot":"","sources":["../../src/resolver.ts"],"names":[],"mappings":"AA2BA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC5B,MAA2B,EACL,EAAE;IACxB,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;IACjD,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,MAAM,UAAU,GAAG;QAClB,GAAG,IAAI,IAAI,QAAQ,IAAI,IAAI,EAAE;QAC7B,GAAG,IAAI,IAAI,QAAQ,EAAE;QACrB,GAAG,IAAI,IAAI,IAAI,EAAE;QACjB,GAAG,IAAI,UAAU;KACjB,CAAC;IAEF,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAC9B,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChB,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;YAClB,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAW,EAAE,KAAK,EAAE,CAAC;QACxD,CAAC;IACF,CAAC;IAED,6DAA6D;IAC7D,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,YAAY,EAAE,CAAC;QACpC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3D,CAAC;IAED,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AAC5C,CAAC,CAAC"}
@@ -1,20 +0,0 @@
1
- /**
2
- * Infers the package manager by inspecting npm_execpath, which all major
3
- * package managers (npm, pnpm, yarn, bun) set automatically when running scripts.
4
- */
5
- export declare const detectPackageManager: () => string;
6
- export type RunnerOptions = {
7
- scriptKey: string;
8
- command: string;
9
- dryRun?: boolean;
10
- verbose?: boolean;
11
- };
12
- /**
13
- * Spawns the resolved script via the detected package manager.
14
- * Returns the exit code of the child process.
15
- *
16
- * @throws {CircularDispatchError} If the resolved command would invoke target-run again.
17
- * @throws {Error} If the spawned process fails to start.
18
- */
19
- export declare const run: (options: RunnerOptions) => number;
20
- //# sourceMappingURL=runner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/runner.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAAO,MAQvC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,GAAG,GAAI,SAAS,aAAa,KAAG,MAiC5C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEpD;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAW,EAAE;IAChD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC7C,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5B,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC9D,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,MAAM,CAAC;IAC/C,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,MAAM,CAAC;IAC/C,IAAI,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC7C,OAAO,KAAK,CAAC;AACd,CAAC,CAAC;AASF;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