bunosh 0.4.13 → 0.4.14
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/bunosh.js +1 -0
- package/package.json +1 -1
- package/src/program.js +28 -1
package/bunosh.js
CHANGED
package/package.json
CHANGED
package/src/program.js
CHANGED
|
@@ -32,7 +32,6 @@ export const banner = () => {
|
|
|
32
32
|
} catch (e) {
|
|
33
33
|
}
|
|
34
34
|
console.log(color.gray('🍲 ', color.yellowBright.bold('BUNOSH'), color.yellow(version)));
|
|
35
|
-
|
|
36
35
|
console.log();
|
|
37
36
|
};
|
|
38
37
|
|
|
@@ -203,6 +202,20 @@ export default async function bunosh(commands, sources) {
|
|
|
203
202
|
}
|
|
204
203
|
command.hook('preAction', (_thisCommand) => {
|
|
205
204
|
process.env.BUNOSH_COMMAND_STARTED = true;
|
|
205
|
+
|
|
206
|
+
const isBun = typeof Bun !== 'undefined';
|
|
207
|
+
const runtime = isBun ? 'Bun' : 'Node.js';
|
|
208
|
+
const runtimeColor = isBun ? color.red : color.green;
|
|
209
|
+
|
|
210
|
+
let runtimeVersion;
|
|
211
|
+
if (isBun) {
|
|
212
|
+
runtimeVersion = Bun.version;
|
|
213
|
+
} else {
|
|
214
|
+
runtimeVersion = process.version;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
console.log(color.gray(`Runtime: `, runtimeColor.bold(runtime), color.gray(` (${runtimeVersion})`)));
|
|
218
|
+
console.log();
|
|
206
219
|
})
|
|
207
220
|
|
|
208
221
|
let argsAndOptsDescription = [];
|
|
@@ -275,6 +288,20 @@ export default async function bunosh(commands, sources) {
|
|
|
275
288
|
}
|
|
276
289
|
command.hook('preAction', (_thisCommand) => {
|
|
277
290
|
process.env.BUNOSH_COMMAND_STARTED = true;
|
|
291
|
+
|
|
292
|
+
const isBun = typeof Bun !== 'undefined';
|
|
293
|
+
const runtime = isBun ? 'Bun' : 'Node.js';
|
|
294
|
+
const runtimeColor = isBun ? color.red : color.green;
|
|
295
|
+
|
|
296
|
+
let runtimeVersion;
|
|
297
|
+
if (isBun) {
|
|
298
|
+
runtimeVersion = Bun.version;
|
|
299
|
+
} else {
|
|
300
|
+
runtimeVersion = process.version;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
console.log(color.gray(`Runtime: `, runtimeColor.bold(runtime), color.gray(` (${runtimeVersion})`)));
|
|
304
|
+
console.log();
|
|
278
305
|
})
|
|
279
306
|
|
|
280
307
|
let argsAndOptsDescription = [];
|