@0x-jerry/x 2.12.8 → 2.12.9

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.
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "2.12.8";
2
+ var version = "2.12.9";
3
3
 
4
4
  export {
5
5
  version
package/dist/x.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  version
4
- } from "./chunk-P2FBA3GW.js";
4
+ } from "./chunk-DLLDG7JW.js";
5
5
 
6
6
  // src/x.ts
7
7
  import { sliver } from "@0x-jerry/silver";
package/dist/xn.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-RDZVDWJQ.js";
7
7
  import {
8
8
  version
9
- } from "./chunk-P2FBA3GW.js";
9
+ } from "./chunk-DLLDG7JW.js";
10
10
 
11
11
  // src/xn.ts
12
12
  import { sliver } from "@0x-jerry/silver";
package/dist/xr.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-RDZVDWJQ.js";
6
6
  import {
7
7
  version
8
- } from "./chunk-P2FBA3GW.js";
8
+ } from "./chunk-DLLDG7JW.js";
9
9
 
10
10
  // src/xr.ts
11
11
  import { sliver } from "@0x-jerry/silver";
@@ -187,11 +187,20 @@ async function defaultAction(_, arg) {
187
187
  const [commandOrFile, ...params] = arg._;
188
188
  try {
189
189
  if (isJsFile(commandOrFile)) {
190
- await exec(
191
- "node",
192
- ["--import", import.meta.resolve(`./hooks/register.js`), commandOrFile],
193
- { silent: true }
194
- );
190
+ const pkg = await detectPackageRoot(process.cwd());
191
+ if (pkg?.pm === "bun") {
192
+ await exec(
193
+ "bun",
194
+ ["run", commandOrFile],
195
+ { silent: true }
196
+ );
197
+ } else {
198
+ await exec(
199
+ "node",
200
+ ["--import", import.meta.resolve(`./hooks/register.js`), commandOrFile],
201
+ { silent: true }
202
+ );
203
+ }
195
204
  } else {
196
205
  await runScript(commandOrFile, params);
197
206
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0x-jerry/x",
3
- "version": "2.12.8",
3
+ "version": "2.12.9",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/0x-jerry/x.git"