@esmx/core 3.0.0-rc.13 → 3.0.0-rc.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.
@@ -1,3 +1,6 @@
1
1
  #!/usr/bin/env node --no-warnings --experimental-vm-modules --experimental-import-meta-resolve --experimental-strip-types
2
+ import { styleText } from "node:util";
3
+ import pkg from "../../package.json" with { type: "json" };
2
4
  import { cli } from "./cli.mjs";
5
+ console.log(`\u{1F525} ${styleText("yellow", "Esmx")} v${pkg.version}`);
3
6
  cli(process.argv.slice(2)[0] || "");
package/dist/esmx.mjs CHANGED
@@ -359,10 +359,13 @@ export class Esmx {
359
359
  */
360
360
  async build() {
361
361
  const startTime = Date.now();
362
- console.log("[esmx]: build start");
363
362
  const successful = await this.readied.app.build?.();
364
363
  const endTime = Date.now();
365
- console.log(`[esmx]: build end, cost: ${endTime - startTime}ms`);
364
+ const duration = endTime - startTime;
365
+ const status = successful ? "\x1B[32m\u2713\x1B[0m".padEnd(3) : "\x1B[31m\u2717\x1B[0m".padEnd(3);
366
+ console.log(
367
+ `${status.padEnd(2)} Build ${successful ? "completed" : "failed"} in ${duration}ms`
368
+ );
366
369
  return successful ?? true;
367
370
  }
368
371
  /**
package/package.json CHANGED
@@ -48,7 +48,7 @@
48
48
  "esmx": "./dist/cli/index.mjs"
49
49
  },
50
50
  "engines": {
51
- "node": ">=22.6"
51
+ "node": ">=22.11.0"
52
52
  },
53
53
  "scripts": {
54
54
  "lint:js": "biome check --write --no-errors-on-unmatched",
@@ -59,7 +59,7 @@
59
59
  "build": "unbuild"
60
60
  },
61
61
  "dependencies": {
62
- "@esmx/import": "3.0.0-rc.13",
62
+ "@esmx/import": "3.0.0-rc.14",
63
63
  "@types/serialize-javascript": "^5.0.4",
64
64
  "es-module-lexer": "^1.6.0",
65
65
  "find": "^0.3.0",
@@ -69,7 +69,7 @@
69
69
  },
70
70
  "devDependencies": {
71
71
  "@biomejs/biome": "1.9.4",
72
- "@esmx/lint": "3.0.0-rc.13",
72
+ "@esmx/lint": "3.0.0-rc.14",
73
73
  "@gez/lint": "3.0.0-rc.9",
74
74
  "@types/find": "^0.2.4",
75
75
  "@types/node": "22.13.10",
@@ -81,7 +81,7 @@
81
81
  "unbuild": "2.0.0",
82
82
  "vitest": "3.0.8"
83
83
  },
84
- "version": "3.0.0-rc.13",
84
+ "version": "3.0.0-rc.14",
85
85
  "type": "module",
86
86
  "private": false,
87
87
  "exports": {
@@ -104,5 +104,5 @@
104
104
  "template",
105
105
  "public"
106
106
  ],
107
- "gitHead": "801082f89364db5e1137431e3cc1121f689fa7ca"
107
+ "gitHead": "e0349256d64a50d86be8a585a498bc4278014324"
108
108
  }
package/src/cli/index.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  #!/usr/bin/env node --no-warnings --experimental-vm-modules --experimental-import-meta-resolve --experimental-strip-types
2
-
2
+ import { styleText } from 'node:util';
3
+ import pkg from '../../package.json' with { type: 'json' };
3
4
  import { cli } from './cli';
4
5
 
6
+ console.log(`🔥 ${styleText('yellow', 'Esmx')} v${pkg.version}`);
7
+
5
8
  cli(process.argv.slice(2)[0] || '');
package/src/esmx.ts CHANGED
@@ -507,12 +507,17 @@ export class Esmx {
507
507
  */
508
508
  public async build(): Promise<boolean> {
509
509
  const startTime = Date.now();
510
- console.log('[esmx]: build start');
511
510
 
512
511
  const successful = await this.readied.app.build?.();
513
512
 
514
513
  const endTime = Date.now();
515
- console.log(`[esmx]: build end, cost: ${endTime - startTime}ms`);
514
+ const duration = endTime - startTime;
515
+ const status = successful
516
+ ? '\x1b[32m✓\x1b[0m'.padEnd(3)
517
+ : '\x1b[31m✗\x1b[0m'.padEnd(3);
518
+ console.log(
519
+ `${status.padEnd(2)} Build ${successful ? 'completed' : 'failed'} in ${duration}ms`
520
+ );
516
521
 
517
522
  return successful ?? true;
518
523
  }