@vercube/cli 0.0.21 → 0.0.23

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/README.md CHANGED
@@ -3,10 +3,10 @@
3
3
  <br>
4
4
  <br>
5
5
 
6
- # Vercube
7
-
8
- Next generation HTTP framework
9
-
6
+ # Vercube
7
+
8
+ Next generation HTTP framework
9
+
10
10
  <a href="https://www.npmjs.com/package/@vercube/cli">
11
11
  <img src="https://img.shields.io/npm/v/%40vercube%2Fcli?style=for-the-badge&logo=npm&color=%23767eff" alt="npm"/>
12
12
  </a>
@@ -16,6 +16,9 @@
16
16
  <a href="https://github.com/vercube/vercube/blob/main/LICENSE" target="_blank">
17
17
  <img src="https://img.shields.io/npm/l/%40vercube%2Fcli?style=for-the-badge&color=%23767eff" alt="License"/>
18
18
  </a>
19
+ <a href="https://codecov.io/gh/vercube/vercube" target="_blank">
20
+ <img src="https://img.shields.io/codecov/c/github/vercube/vercube?style=for-the-badge&color=%23767eff" alt="Coverage"/>
21
+ </a>
19
22
  <br/>
20
23
  <br/>
21
24
  </div>
@@ -23,8 +26,9 @@
23
26
  An ultra-efficient JavaScript server framework that runs anywhere - Node.js, Bun, or Deno - with unmatched flexibility and complete configurability for developers who refuse to sacrifice speed or control.
24
27
 
25
28
  ## <a name="module">Command Line Interface</a>
26
- The CLI module provides a powerful command-line interface for Vercube applications, making it easy to create, develop, and manage your projects. It offers intuitive commands for project scaffolding, development server management, and production builds.
27
29
 
30
+ The CLI module provides a powerful command-line interface for Vercube applications, making it easy to create, develop, and manage your projects. It offers intuitive commands for project scaffolding, development server management, and production builds.
28
31
 
29
32
  ## <a name="documentation">📖 Documentation</a>
30
- Comprehensive documentation is available at [vercube.dev](https://vercube.dev). There you'll find detailed module descriptions, project information, guides, and everything else you need to know about Vercube.
33
+
34
+ Comprehensive documentation is available at [vercube.dev](https://vercube.dev). There you'll find detailed module descriptions, project information, guides, and everything else you need to know about Vercube.
package/dist/index.d.mts CHANGED
@@ -1 +1,2 @@
1
- export { };
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/index.mjs CHANGED
@@ -1,17 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
  import { defineCommand, runMain } from "citty";
3
3
  import { build, createDevServer, createVercube, watch } from "@vercube/devkit";
4
+ import { existsSync } from "node:fs";
4
5
  import { consola } from "consola";
5
6
  import { colors } from "consola/utils";
6
- import { hasTTY } from "std-env";
7
- import { relative, resolve } from "pathe";
8
- import { existsSync } from "node:fs";
9
7
  import { downloadTemplate, startShell } from "giget";
10
8
  import { installDependencies } from "nypm";
9
+ import { relative, resolve } from "pathe";
10
+ import { hasTTY } from "std-env";
11
11
  import { x } from "tinyexec";
12
12
 
13
13
  //#region package.json
14
- var version = "0.0.20";
14
+ var version = "0.0.22";
15
15
 
16
16
  //#endregion
17
17
  //#region src/commands/build.ts
@@ -20,8 +20,13 @@ const buildCommand = defineCommand({
20
20
  name: "build",
21
21
  description: "Build the project"
22
22
  },
23
- run: async () => {
24
- const app = await createVercube();
23
+ args: { entry: {
24
+ type: "string",
25
+ description: "Entry file",
26
+ default: "./src/index.ts"
27
+ } },
28
+ run: async (ctx) => {
29
+ const app = await createVercube({ build: { entry: ctx.args.entry } });
25
30
  await build(app);
26
31
  }
27
32
  });
@@ -147,17 +152,15 @@ const initCommand = defineCommand({
147
152
  ]
148
153
  });
149
154
  switch (selectedAction) {
150
- case "Override its contents": {
155
+ case "Override its contents":
151
156
  shouldForce = true;
152
157
  break;
153
- }
154
- case "Select different directory": {
158
+ case "Select different directory":
155
159
  templateDownloadPath = resolve(cwd, await logger.prompt("Please specify a different directory:", {
156
160
  type: "text",
157
161
  cancel: "reject"
158
162
  }).catch(() => process.exit(1)));
159
163
  break;
160
- }
161
164
  default: process.exit(1);
162
165
  }
163
166
  }
@@ -239,4 +242,5 @@ const main = defineCommand({
239
242
  });
240
243
  runMain(main);
241
244
 
242
- //#endregion
245
+ //#endregion
246
+ export { };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercube/cli",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "description": "CLI module for Vercube framework",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,11 +28,11 @@
28
28
  "citty": "0.1.6",
29
29
  "consola": "3.4.2",
30
30
  "giget": "2.0.0",
31
- "nypm": "0.6.0",
31
+ "nypm": "0.6.1",
32
32
  "pathe": "2.0.3",
33
33
  "std-env": "3.9.0",
34
34
  "tinyexec": "1.0.1",
35
- "@vercube/devkit": "0.0.21"
35
+ "@vercube/devkit": "0.0.23"
36
36
  },
37
37
  "publishConfig": {
38
38
  "access": "public"