@vixt/core 0.13.2 → 0.13.3
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/node/index.d.mts +9 -0
- package/dist/node/index.mjs +10 -6
- package/package.json +2 -2
package/dist/node/index.d.mts
CHANGED
|
@@ -371,6 +371,15 @@ interface VixtConfig {
|
|
|
371
371
|
* Define the monorepo workspace directory of your application.
|
|
372
372
|
*/
|
|
373
373
|
workspaceDir?: string;
|
|
374
|
+
/**
|
|
375
|
+
* Whether your app is running in with vixt-cli.
|
|
376
|
+
* @internal
|
|
377
|
+
*/
|
|
378
|
+
_cli?: boolean;
|
|
379
|
+
/**
|
|
380
|
+
* @internal
|
|
381
|
+
*/
|
|
382
|
+
_prepare?: boolean;
|
|
374
383
|
}
|
|
375
384
|
/**
|
|
376
385
|
* This is a global declared interface for module `@vixt/core`,
|
package/dist/node/index.mjs
CHANGED
|
@@ -90,10 +90,10 @@ async function loadVixtConfig(opts) {
|
|
|
90
90
|
config.srcDir ??= resolve(config.rootDir, "src");
|
|
91
91
|
config.modulesDir ??= resolve(config.srcDir, "modules");
|
|
92
92
|
config.pluginsDir ??= resolve(config.srcDir, "plugins");
|
|
93
|
-
config.debug
|
|
93
|
+
config.debug ??= cliOptions.debug;
|
|
94
94
|
config.dev = env.NODE_ENV === "development";
|
|
95
95
|
config.test = env.NODE_ENV === "test";
|
|
96
|
-
config._cli =
|
|
96
|
+
config._cli = _cli;
|
|
97
97
|
config._prepare = cliOptions.command === "prepare";
|
|
98
98
|
cliOptions.force && fs.removeSync(config.buildDir);
|
|
99
99
|
return result;
|
|
@@ -474,8 +474,10 @@ var imports_default = defineVixtModule({
|
|
|
474
474
|
].flat()
|
|
475
475
|
};
|
|
476
476
|
},
|
|
477
|
-
setup(options) {
|
|
478
|
-
|
|
477
|
+
setup(options, vixt) {
|
|
478
|
+
const autoImportPlugin = AutoImport(options);
|
|
479
|
+
if (vixt.options._prepare) autoImportPlugin.buildStart();
|
|
480
|
+
return autoImportPlugin;
|
|
479
481
|
}
|
|
480
482
|
});
|
|
481
483
|
//#endregion
|
|
@@ -502,7 +504,10 @@ var nitro_default = defineVixtModule({
|
|
|
502
504
|
serverDir: "./server",
|
|
503
505
|
typescript: { generatedTypesDir: vixt.options.buildTypesDir },
|
|
504
506
|
modules: [(nitro) => {
|
|
505
|
-
nitro.hooks.hook("build:before",
|
|
507
|
+
nitro.hooks.hook("build:before", (ctx) => {
|
|
508
|
+
setNitroCtx(ctx);
|
|
509
|
+
writeTypes$1();
|
|
510
|
+
});
|
|
506
511
|
}]
|
|
507
512
|
};
|
|
508
513
|
},
|
|
@@ -513,7 +518,6 @@ var nitro_default = defineVixtModule({
|
|
|
513
518
|
{
|
|
514
519
|
name: "vixt:nitro-types",
|
|
515
520
|
configureServer(server) {
|
|
516
|
-
writeTypes$1();
|
|
517
521
|
const routesDirs = vixt._layers.map((e) => `${e.cwd}/server/routes`);
|
|
518
522
|
const watcher = server.watcher;
|
|
519
523
|
watcher.add(routesDirs);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vixt/core",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.3",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"nuxt",
|
|
6
6
|
"react",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@types/fs-extra": "^11.0.4",
|
|
34
34
|
"@vitejs/plugin-basic-ssl": "^2.3.0",
|
|
35
35
|
"@vitejs/plugin-legacy": "^8.2.3",
|
|
36
|
-
"@vixt/cli": "0.13.
|
|
36
|
+
"@vixt/cli": "0.13.3",
|
|
37
37
|
"@vue/tsconfig": "^0.9.1",
|
|
38
38
|
"c12": "^3.3.4",
|
|
39
39
|
"defu": "^6.1.7",
|