@vercube/devkit 1.0.0-beta.2 → 1.1.1
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.mjs +8 -8
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { builtinModules } from "node:module";
|
|
|
2
2
|
import { invokeVercubePluginDevHooks, loadVercubeConfig } from "@vercube/core";
|
|
3
3
|
import { createHooks } from "hookable";
|
|
4
4
|
import { join, resolve } from "node:path";
|
|
5
|
-
import consola, { consola
|
|
5
|
+
import consola$1, { consola } from "consola";
|
|
6
6
|
import { colors } from "consola/utils";
|
|
7
7
|
import { rolldown, watch as watch$1 } from "rolldown";
|
|
8
8
|
import { defu } from "defu";
|
|
@@ -102,13 +102,13 @@ async function build$1(ctx) {
|
|
|
102
102
|
const bundlerConfig = await getRolldownConfig(ctx);
|
|
103
103
|
const build = await rolldown({ ...bundlerConfig });
|
|
104
104
|
const outputs = Array.isArray(bundlerConfig.output) ? bundlerConfig.output : [bundlerConfig.output];
|
|
105
|
-
consola
|
|
105
|
+
consola.info(`📦 Building \`${ctx.entry || "<no name>"}\``);
|
|
106
106
|
let results = [];
|
|
107
107
|
for (const output of outputs) {
|
|
108
108
|
const { output: result } = await build.write(output);
|
|
109
109
|
results.push(...result);
|
|
110
110
|
}
|
|
111
|
-
for (const result of results.filter((o) => o.type === "chunk")) consola
|
|
111
|
+
for (const result of results.filter((o) => o.type === "chunk")) consola.success({
|
|
112
112
|
tag: "build",
|
|
113
113
|
message: colors.gray(`Built ${colors.cyan(join(ctx?.output?.dir ?? "", result?.fileName ?? ""))} - ${(Buffer.byteLength(result?.code ?? "") / 1024).toFixed(2)}kb`)
|
|
114
114
|
});
|
|
@@ -223,14 +223,14 @@ async function watch(app) {
|
|
|
223
223
|
let start;
|
|
224
224
|
app.hooks.hook("bundler-watch:start", () => {
|
|
225
225
|
console.clear();
|
|
226
|
-
consola.info({
|
|
226
|
+
consola$1.info({
|
|
227
227
|
tag: "build",
|
|
228
228
|
message: "Start building..."
|
|
229
229
|
});
|
|
230
230
|
start = Date.now();
|
|
231
231
|
});
|
|
232
232
|
app.hooks.hook("bundler-watch:end", () => {
|
|
233
|
-
consola.success({
|
|
233
|
+
consola$1.success({
|
|
234
234
|
tag: "build",
|
|
235
235
|
message: `Built in ${Date.now() - start}ms`
|
|
236
236
|
});
|
|
@@ -238,7 +238,7 @@ async function watch(app) {
|
|
|
238
238
|
});
|
|
239
239
|
app.hooks.hook("bundler-watch:restart", () => {
|
|
240
240
|
console.clear();
|
|
241
|
-
consola.info({
|
|
241
|
+
consola$1.info({
|
|
242
242
|
tag: "build",
|
|
243
243
|
message: "Configuration changed, rebuilding..."
|
|
244
244
|
});
|
|
@@ -303,12 +303,12 @@ function createDevServer(app) {
|
|
|
303
303
|
*/
|
|
304
304
|
const reload = () => {
|
|
305
305
|
reloadPromise = (reloadPromise ?? Promise.resolve()).then(() => _reload()).then(() => {
|
|
306
|
-
consola.success({
|
|
306
|
+
consola$1.success({
|
|
307
307
|
tag: "worker",
|
|
308
308
|
message: "Worker reloaded successfully"
|
|
309
309
|
});
|
|
310
310
|
}).catch((error) => {
|
|
311
|
-
consola.error({
|
|
311
|
+
consola$1.error({
|
|
312
312
|
tag: "worker",
|
|
313
313
|
message: "Failed to reload worker",
|
|
314
314
|
error
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercube/devkit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Devkit module for Vercube framework",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,19 +22,19 @@
|
|
|
22
22
|
"README.md"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@oxc-project/runtime": "0.
|
|
25
|
+
"@oxc-project/runtime": "0.138.0",
|
|
26
26
|
"c12": "4.0.0-beta.5",
|
|
27
27
|
"chokidar": "5.0.0",
|
|
28
28
|
"consola": "3.4.2",
|
|
29
29
|
"defu": "6.1.7",
|
|
30
30
|
"dotenv": "17.4.2",
|
|
31
31
|
"hookable": "6.1.1",
|
|
32
|
-
"oxc-parser": "0.
|
|
33
|
-
"oxc-transform": "0.
|
|
32
|
+
"oxc-parser": "0.138.0",
|
|
33
|
+
"oxc-transform": "0.138.0",
|
|
34
34
|
"pathe": "2.0.3",
|
|
35
|
-
"rolldown": "1.1.
|
|
35
|
+
"rolldown": "1.1.3",
|
|
36
36
|
"unplugin-isolated-decl": "0.16.0",
|
|
37
|
-
"@vercube/core": "1.
|
|
37
|
+
"@vercube/core": "1.1.1"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|