@vercube/devkit 0.0.3 → 0.0.4
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/dist/index.d.mts +98 -0
- package/dist/index.mjs +18 -11672
- package/package.json +9 -14
- package/dist/Build/Build.d.ts +0 -7
- package/dist/Build/Watch.d.ts +0 -8
- package/dist/Bundlers/Rolldown/Build.d.ts +0 -12
- package/dist/Bundlers/Rolldown/Config.d.ts +0 -9
- package/dist/Bundlers/Rolldown/Watch.d.ts +0 -8
- package/dist/Bundlers/Rolldown/index.d.ts +0 -2
- package/dist/Common/App.d.ts +0 -6
- package/dist/Server/DevServer.d.ts +0 -9
- package/dist/Types/DevKitTypes.d.ts +0 -60
- package/dist/Utils/Utils.d.ts +0 -13
- package/dist/index.cjs +0 -11855
- package/dist/index.d.ts +0 -7
package/package.json
CHANGED
|
@@ -1,35 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercube/devkit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Devkit module for Vercube framework",
|
|
5
5
|
"repository": "@vercube/devkit",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"type": "module",
|
|
9
9
|
"exports": {
|
|
10
|
-
".":
|
|
11
|
-
"types": "./dist/index.d.ts",
|
|
12
|
-
"import": "./dist/index.mjs",
|
|
13
|
-
"require": "./dist/index.cjs"
|
|
14
|
-
}
|
|
10
|
+
".": "./dist/index.mjs"
|
|
15
11
|
},
|
|
16
|
-
"
|
|
17
|
-
"module": "./dist/index.mjs",
|
|
18
|
-
"types": "./dist/index.d.ts",
|
|
12
|
+
"types": "./dist/index.d.mts",
|
|
19
13
|
"files": [
|
|
20
14
|
"dist",
|
|
21
15
|
"README.md"
|
|
22
16
|
],
|
|
23
17
|
"dependencies": {
|
|
24
|
-
"@oxc-project/runtime": "0.
|
|
18
|
+
"@oxc-project/runtime": "0.72.2",
|
|
25
19
|
"consola": "3.4.2",
|
|
26
20
|
"dotenv": "16.5.0",
|
|
27
21
|
"hookable": "5.5.3",
|
|
28
|
-
"oxc-parser": "0.
|
|
29
|
-
"oxc-transform": "0.
|
|
22
|
+
"oxc-parser": "0.72.2",
|
|
23
|
+
"oxc-transform": "0.72.2",
|
|
30
24
|
"pathe": "2.0.3",
|
|
31
|
-
"rolldown": "1.0.0-beta.
|
|
32
|
-
"
|
|
25
|
+
"rolldown": "1.0.0-beta.11",
|
|
26
|
+
"unplugin-isolated-decl": "0.14.2",
|
|
27
|
+
"@vercube/core": "0.0.4"
|
|
33
28
|
},
|
|
34
29
|
"publishConfig": {
|
|
35
30
|
"access": "public"
|
package/dist/Build/Build.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { DevKitTypes } from "../Types/DevKitTypes.js";
|
|
2
|
-
/**
|
|
3
|
-
* Builds the application using the given application instance.
|
|
4
|
-
* @param {DevKitTypes.App} app - The application instance.
|
|
5
|
-
* @returns {Promise<void>} A promise that resolves when the build is complete.
|
|
6
|
-
*/
|
|
7
|
-
export declare function build(app: DevKitTypes.App): Promise<void>;
|
package/dist/Build/Watch.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { DevKitTypes } from "../Types/DevKitTypes.js";
|
|
2
|
-
/**
|
|
3
|
-
* Creates a watcher for the given application.
|
|
4
|
-
* @param {DevKitTypes.App} app - The application instance.
|
|
5
|
-
* This file is highly inspired by Nitro
|
|
6
|
-
* @see https://github.com/nitrojs/nitro/blob/v2/src/core/build/dev.ts
|
|
7
|
-
*/
|
|
8
|
-
export declare function watch(app: DevKitTypes.App): Promise<void>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ConfigTypes } from "@vercube/core";
|
|
2
|
-
/**
|
|
3
|
-
* Builds the application using Rolldown bundler
|
|
4
|
-
*
|
|
5
|
-
* @async
|
|
6
|
-
* @function build
|
|
7
|
-
* @param {ConfigTypes.BuildOptions} ctx - The build context and configuration options
|
|
8
|
-
* @returns {Promise<void>} A promise that resolves when the build is complete
|
|
9
|
-
* @description This function takes build options, configures Rolldown bundler,
|
|
10
|
-
* executes the build process, and writes the output to the specified location(s).
|
|
11
|
-
*/
|
|
12
|
-
export declare function build(ctx: ConfigTypes.BuildOptions): Promise<void>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ConfigTypes } from "@vercube/core";
|
|
2
|
-
import type { RolldownOptions } from "rolldown";
|
|
3
|
-
/**
|
|
4
|
-
* Generates a Rolldown configuration based on the provided build options.
|
|
5
|
-
*
|
|
6
|
-
* @param {ConfigTypes.BuildOptions} [ctx] - Build configuration options
|
|
7
|
-
* @returns {Promise<RolldownOptions>} A promise that resolves to the Rolldown configuration
|
|
8
|
-
*/
|
|
9
|
-
export declare function getRolldownConfig(ctx?: ConfigTypes.BuildOptions): Promise<RolldownOptions>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DevKitTypes } from "../../Types/DevKitTypes.js";
|
|
2
|
-
/**
|
|
3
|
-
* Creates a watcher for rolldown
|
|
4
|
-
* @param {DevKitTypes.App} app - The application instance.
|
|
5
|
-
* This file is highly inspired by Nitro
|
|
6
|
-
* @see https://github.com/nitrojs/nitro/blob/v2/src/core/build/dev.ts
|
|
7
|
-
*/
|
|
8
|
-
export declare function watch(app: DevKitTypes.App): Promise<void>;
|
package/dist/Common/App.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { DevKitTypes } from "../Types/DevKitTypes.js";
|
|
2
|
-
/**
|
|
3
|
-
* Creates a development server for the given application.
|
|
4
|
-
* @param {DevKitTypes.App} app - The application instance.
|
|
5
|
-
* @returns {DevKitTypes.DevServer} The development server instance.
|
|
6
|
-
* This file is highly inspired by Nitro
|
|
7
|
-
* @see https://github.com/nitrojs/nitro/blob/v2/src/core/dev-server/server.ts
|
|
8
|
-
*/
|
|
9
|
-
export declare function createDevServer(app: DevKitTypes.App): DevKitTypes.DevServer;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { ConfigTypes } from "@vercube/core";
|
|
2
|
-
import type { Hookable } from "hookable";
|
|
3
|
-
import { type Worker as _Worker } from "node:worker_threads";
|
|
4
|
-
export declare namespace DevKitTypes {
|
|
5
|
-
export type BuildFunc = (ctx?: ConfigTypes.BuildOptions) => void | Promise<void>;
|
|
6
|
-
export type WatchFunc = (app?: App) => void | Promise<void>;
|
|
7
|
-
type HookResult = void | Promise<void>;
|
|
8
|
-
export interface Hooks {
|
|
9
|
-
"dev:reload": () => HookResult;
|
|
10
|
-
"bundler-watch:init": () => HookResult;
|
|
11
|
-
"bundler-watch:start": () => HookResult;
|
|
12
|
-
"bundler-watch:end": () => HookResult;
|
|
13
|
-
"bundler-watch:error": (_error: Error) => HookResult;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Represents an application with hooks.
|
|
17
|
-
*/
|
|
18
|
-
export interface App {
|
|
19
|
-
/**
|
|
20
|
-
* The hooks associated with the application.
|
|
21
|
-
*/
|
|
22
|
-
hooks: Hookable<Hooks>;
|
|
23
|
-
/**
|
|
24
|
-
* The configuration object for the application.
|
|
25
|
-
*/
|
|
26
|
-
config: ConfigTypes.Config;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Represents a development server.
|
|
30
|
-
*/
|
|
31
|
-
export interface DevServer {
|
|
32
|
-
/**
|
|
33
|
-
* The application associated with the development server.
|
|
34
|
-
*/
|
|
35
|
-
app: App;
|
|
36
|
-
/**
|
|
37
|
-
* Reloads the development server.
|
|
38
|
-
* @returns {Promise<void>} A promise that resolves when the server is reloaded.
|
|
39
|
-
*/
|
|
40
|
-
reload: () => Promise<void>;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Represents a worker instance.
|
|
44
|
-
*/
|
|
45
|
-
export interface Worker {
|
|
46
|
-
/**
|
|
47
|
-
* The worker thread instance.
|
|
48
|
-
*/
|
|
49
|
-
worker: _Worker | null;
|
|
50
|
-
/**
|
|
51
|
-
* The address information of the worker.
|
|
52
|
-
*/
|
|
53
|
-
address: {
|
|
54
|
-
host: string
|
|
55
|
-
port: number
|
|
56
|
-
socketPath?: string
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
export {};
|
|
60
|
-
}
|
package/dist/Utils/Utils.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { DevKitTypes } from "../Types/DevKitTypes.js";
|
|
2
|
-
/**
|
|
3
|
-
* Returns the appropriate build function based on the specified bundler
|
|
4
|
-
* @param {string} bundler - The bundler to use ('rollup' or 'rolldown')
|
|
5
|
-
* @returns {DevKitTypes.BuildFunc} The build function for the specified bundler
|
|
6
|
-
*/
|
|
7
|
-
export declare function getBuildFunc(bundler: string): DevKitTypes.BuildFunc;
|
|
8
|
-
/**
|
|
9
|
-
* Returns the appropriate watch function based on the specified bundler
|
|
10
|
-
* @param {string} bundler - The bundler to use ('rollup' or 'rolldown')
|
|
11
|
-
* @returns {DevKitTypes.WatchFunc} The watch function for the specified bundler
|
|
12
|
-
*/
|
|
13
|
-
export declare function getWatchFunc(bundler: string): DevKitTypes.WatchFunc;
|