@vercube/cli 0.0.24 → 0.0.26

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.
Files changed (2) hide show
  1. package/dist/index.mjs +6 -12
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -11,7 +11,7 @@ import { hasTTY } from "std-env";
11
11
  import { x } from "tinyexec";
12
12
 
13
13
  //#region package.json
14
- var version = "0.0.23";
14
+ var version = "0.0.25";
15
15
 
16
16
  //#endregion
17
17
  //#region src/commands/build.ts
@@ -25,8 +25,7 @@ const buildCommand = defineCommand({
25
25
  description: "Entry file"
26
26
  } },
27
27
  run: async (ctx) => {
28
- const app = await createVercube({ build: { entry: ctx?.args?.entry ?? void 0 } });
29
- await build(app);
28
+ await build(await createVercube({ build: { entry: ctx?.args?.entry ?? void 0 } }));
30
29
  }
31
30
  });
32
31
 
@@ -67,16 +66,12 @@ const icon = [
67
66
  " "
68
67
  ];
69
68
  function interpolateColor(startColor$1, endColor$1, factor) {
70
- const r = Math.round(startColor$1.r + factor * (endColor$1.r - startColor$1.r));
71
- const g = Math.round(startColor$1.g + factor * (endColor$1.g - startColor$1.g));
72
- const b = Math.round(startColor$1.b + factor * (endColor$1.b - startColor$1.b));
73
- return `\u001B[38;2;${r};${g};${b}m`;
69
+ return `\u001B[38;2;${Math.round(startColor$1.r + factor * (endColor$1.r - startColor$1.r))};${Math.round(startColor$1.g + factor * (endColor$1.g - startColor$1.g))};${Math.round(startColor$1.b + factor * (endColor$1.b - startColor$1.b))}m`;
74
70
  }
75
71
  function applyGradient(icon$1, startColor$1, endColor$1) {
76
72
  const totalLines = icon$1.length;
77
73
  return icon$1.map((line, index) => {
78
- const factor = index / (totalLines - 1);
79
- return interpolateColor(startColor$1, endColor$1, factor) + line;
74
+ return interpolateColor(startColor$1, endColor$1, index / (totalLines - 1)) + line;
80
75
  }).join("\n");
81
76
  }
82
77
  const vercubeIcon = applyGradient(icon, startColor, endColor);
@@ -221,7 +216,7 @@ const initCommand = defineCommand({
221
216
 
222
217
  //#endregion
223
218
  //#region src/index.ts
224
- const main = defineCommand({
219
+ runMain(defineCommand({
225
220
  meta: {
226
221
  name: "Vercube",
227
222
  version,
@@ -232,8 +227,7 @@ const main = defineCommand({
232
227
  dev: devCommand,
233
228
  init: initCommand
234
229
  }
235
- });
236
- runMain(main);
230
+ }));
237
231
 
238
232
  //#endregion
239
233
  export { };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercube/cli",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "description": "CLI module for Vercube framework",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,7 +32,7 @@
32
32
  "pathe": "2.0.3",
33
33
  "std-env": "3.9.0",
34
34
  "tinyexec": "1.0.1",
35
- "@vercube/devkit": "0.0.24"
35
+ "@vercube/devkit": "0.0.26"
36
36
  },
37
37
  "publishConfig": {
38
38
  "access": "public"