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 CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
 
2
3
  // Set up global variables BEFORE any imports
3
4
  globalThis._bunoshStartTime = Date.now();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunosh",
3
- "version": "0.4.13",
3
+ "version": "0.4.14",
4
4
  "type": "module",
5
5
  "module": "index.js",
6
6
  "bin": {
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 = [];