@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.
- package/dist/{chunk-P2FBA3GW.js → chunk-DLLDG7JW.js} +1 -1
- package/dist/x.js +1 -1
- package/dist/xn.js +1 -1
- package/dist/xr.js +15 -6
- package/package.json +1 -1
package/dist/x.js
CHANGED
package/dist/xn.js
CHANGED
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-
|
|
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
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
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
|
}
|