@vercube/devkit 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%2Fdevkit?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%2Fdevkit?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">DevKit Module</a>
26
- The DevKit module provides essential development tools and utilities for building and maintaining Vercube applications. It includes a powerful CLI interface, build tools, testing utilities, and development server capabilities. The module streamlines the development workflow by offering features like hot reloading, debugging tools, and project scaffolding. It's designed to enhance developer productivity while maintaining flexibility for custom build configurations and development environments.
27
29
 
30
+ The DevKit module provides essential development tools and utilities for building and maintaining Vercube applications. It includes a powerful CLI interface, build tools, testing utilities, and development server capabilities. The module streamlines the development workflow by offering features like hot reloading, debugging tools, and project scaffolding. It's designed to enhance developer productivity while maintaining flexibility for custom build configurations and development environments.
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,5 +1,5 @@
1
+ import { ConfigTypes, DeepPartial } from "@vercube/core";
1
2
  import { Hookable } from "hookable";
2
- import { ConfigTypes } from "@vercube/core";
3
3
  import { Worker } from "node:worker_threads";
4
4
 
5
5
  //#region src/Types/DevKitTypes.d.ts
@@ -64,9 +64,10 @@ declare namespace DevKitTypes {
64
64
  //#region src/Common/App.d.ts
65
65
  /**
66
66
  * Creates a development server application.
67
+ * @param {DeepPartial<ConfigTypes.Config>} cfg - The configuration for the application.
67
68
  * @returns {DevKitTypes.App} The development server application instance.
68
69
  */
69
- declare function createVercube(): Promise<DevKitTypes.App>;
70
+ declare function createVercube(cfg?: DeepPartial<ConfigTypes.Config>): Promise<DevKitTypes.App>;
70
71
  //#endregion
71
72
  //#region src/Build/Build.d.ts
72
73
  /**
package/dist/index.mjs CHANGED
@@ -1,21 +1,25 @@
1
1
  import { builtinModules } from "node:module";
2
- import { createHooks } from "hookable";
3
2
  import { loadVercubeConfig } from "@vercube/core";
3
+ import { createHooks } from "hookable";
4
4
  import { rolldown, watch as watch$1 } from "rolldown";
5
5
  import { resolve } from "pathe";
6
6
  import UnpluginIsolatedDecl from "unplugin-isolated-decl/rolldown";
7
7
  import consola from "consola";
8
- import { resolve as resolve$1 } from "node:path";
9
8
  import { fork } from "node:child_process";
9
+ import { resolve as resolve$1 } from "node:path";
10
10
 
11
11
  //#region src/Common/App.ts
12
12
  /**
13
13
  * Creates a development server application.
14
+ * @param {DeepPartial<ConfigTypes.Config>} cfg - The configuration for the application.
14
15
  * @returns {DevKitTypes.App} The development server application instance.
15
16
  */
16
- async function createVercube() {
17
+ async function createVercube(cfg) {
17
18
  const hooks = createHooks();
18
- const config = await loadVercubeConfig({ dev: true });
19
+ const config = await loadVercubeConfig({
20
+ ...cfg,
21
+ dev: true
22
+ });
19
23
  return {
20
24
  hooks,
21
25
  config
@@ -26,7 +30,7 @@ async function createVercube() {
26
30
  //#region src/Bundlers/Rolldown/Config.ts
27
31
  /**
28
32
  * Generates a Rolldown configuration based on the provided build options.
29
- *
33
+ *
30
34
  * @param {ConfigTypes.BuildOptions} [ctx] - Build configuration options
31
35
  * @returns {Promise<RolldownOptions>} A promise that resolves to the Rolldown configuration
32
36
  */
@@ -37,7 +41,7 @@ async function getRolldownConfig(ctx) {
37
41
  const output = ctx?.output?.dir ?? "dist";
38
42
  return {
39
43
  input: { index: input },
40
- resolve: { tsconfigFilename: resolve(root, "tsconfig.json") },
44
+ tsconfig: resolve(root, "tsconfig.json"),
41
45
  define: { ...ctx?.define },
42
46
  external: [
43
47
  ...builtinModules,
@@ -67,7 +71,7 @@ async function getRolldownConfig(ctx) {
67
71
  //#region src/Bundlers/Rolldown/Build.ts
68
72
  /**
69
73
  * Builds the application using Rolldown bundler
70
- *
74
+ *
71
75
  * @async
72
76
  * @function build
73
77
  * @param {ConfigTypes.BuildOptions} ctx - The build context and configuration options
@@ -98,22 +102,18 @@ async function watch$2(app) {
98
102
  });
99
103
  watcher.on("event", (event) => {
100
104
  switch (event.code) {
101
- case "START": {
105
+ case "START":
102
106
  app.hooks.callHook("bundler-watch:init");
103
107
  return;
104
- }
105
- case "BUNDLE_START": {
108
+ case "BUNDLE_START":
106
109
  app.hooks.callHook("bundler-watch:start");
107
110
  return;
108
- }
109
- case "END": {
111
+ case "END":
110
112
  app.hooks.callHook("bundler-watch:end");
111
113
  return;
112
- }
113
- case "ERROR": {
114
+ case "ERROR":
114
115
  console.error(event.error);
115
116
  app.hooks.callHook("bundler-watch:error", event.error);
116
- }
117
117
  }
118
118
  });
119
119
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercube/devkit",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "description": "Devkit module for Vercube framework",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,16 +22,16 @@
22
22
  "README.md"
23
23
  ],
24
24
  "dependencies": {
25
- "@oxc-project/runtime": "0.78.0",
25
+ "@oxc-project/runtime": "0.82.3",
26
26
  "consola": "3.4.2",
27
27
  "dotenv": "17.2.1",
28
28
  "hookable": "5.5.3",
29
- "oxc-parser": "0.78.0",
30
- "oxc-transform": "0.78.0",
29
+ "oxc-parser": "0.82.3",
30
+ "oxc-transform": "0.82.3",
31
31
  "pathe": "2.0.3",
32
- "rolldown": "1.0.0-beta.29",
33
- "unplugin-isolated-decl": "0.14.5",
34
- "@vercube/core": "0.0.21"
32
+ "rolldown": "1.0.0-beta.34",
33
+ "unplugin-isolated-decl": "0.15.1",
34
+ "@vercube/core": "0.0.23"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"