silgi 0.17.5 → 0.17.7
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/_chunks/index.mjs +1 -1
- package/dist/cli/writeTypesAndFiles.mjs +10 -4
- package/dist/meta/index.d.mts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/dist/presets/nitro/preset.mjs +9 -9
- package/dist/presets/npmpackage/preset.mjs +4 -12
- package/dist/presets/nuxt/preset.mjs +9 -9
- package/package.json +1 -1
package/dist/_chunks/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import consola$1, { consola } from 'consola';
|
|
|
4
4
|
import { createHooks, createDebugger } from 'hookable';
|
|
5
5
|
import { join, resolve, isAbsolute, relative, dirname, basename, extname } from 'pathe';
|
|
6
6
|
import { useSilgiCLI, silgiCLICtx } from 'silgi/core';
|
|
7
|
-
import { relativeWithDot, hash, resolveAlias, resolvePath, writeFile, parseServices, normalizeTemplate, useLogger, addTemplate, initRuntimeConfig, hasError as hasError$1, isDirectory } from 'silgi/kit';
|
|
7
|
+
import { relativeWithDot, hash, resolveAlias, resolvePath, writeFile, parseServices, normalizeTemplate, useLogger, addTemplate, initRuntimeConfig, hasError as hasError$1, resolveSilgiPath, isDirectory } from 'silgi/kit';
|
|
8
8
|
import { runtimeDir } from 'silgi/runtime/meta';
|
|
9
9
|
import { autoImportTypes } from 'silgi/types';
|
|
10
10
|
import { scanExports, createUnimport, toExports } from 'unimport';
|
|
@@ -1483,9 +1483,15 @@ async function createSilgiCLI(config = {}, opts = {}) {
|
|
|
1483
1483
|
await generateApp(silgi);
|
|
1484
1484
|
if (silgi.options.imports) {
|
|
1485
1485
|
silgi.options.imports.dirs ??= [];
|
|
1486
|
-
silgi.options.imports.dirs.
|
|
1487
|
-
|
|
1488
|
-
|
|
1486
|
+
silgi.options.imports.dirs = silgi.options.imports.dirs.map((dir) => {
|
|
1487
|
+
if (typeof dir === "string") {
|
|
1488
|
+
if (dir.startsWith("!")) {
|
|
1489
|
+
return `!${resolveSilgiPath(dir.slice(1), options, silgi.options.rootDir)}`;
|
|
1490
|
+
}
|
|
1491
|
+
return resolveSilgiPath(dir, options, silgi.options.rootDir);
|
|
1492
|
+
}
|
|
1493
|
+
return dir;
|
|
1494
|
+
});
|
|
1489
1495
|
silgi.options.imports.presets.push({
|
|
1490
1496
|
from: "silgi/types",
|
|
1491
1497
|
imports: autoImportTypes.map((type) => type),
|
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED
|
@@ -13,15 +13,15 @@ const nitro = defineSilgiPreset(
|
|
|
13
13
|
prefix: "NITRO_"
|
|
14
14
|
},
|
|
15
15
|
imports: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/
|
|
19
|
-
/
|
|
20
|
-
/
|
|
21
|
-
/
|
|
22
|
-
/
|
|
23
|
-
/
|
|
24
|
-
|
|
16
|
+
dirs: [
|
|
17
|
+
"{{ serverDir }}/**",
|
|
18
|
+
"!{{ serverDir }}/runtime/**",
|
|
19
|
+
"!{{ serverDir }}/api/**",
|
|
20
|
+
"!{{ serverDir }}/routers/**",
|
|
21
|
+
"!{{ serverDir }}/modules/**",
|
|
22
|
+
"!{{ serverDir }}/assets/**",
|
|
23
|
+
"!{{ serverDir }}/public/**",
|
|
24
|
+
"!{{ silgi.serverDir }}/**"
|
|
25
25
|
]
|
|
26
26
|
},
|
|
27
27
|
storages: ["data", "/assets"]
|
|
@@ -14,18 +14,10 @@ const npmPackage = defineSilgiPreset(
|
|
|
14
14
|
removeFileExtension: true
|
|
15
15
|
},
|
|
16
16
|
imports: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
/
|
|
20
|
-
|
|
21
|
-
/[/\\]static[/\\]/,
|
|
22
|
-
/[/\\]api[/\\]/,
|
|
23
|
-
/[/\\]routers[/\\]/,
|
|
24
|
-
/[/\\]modules[/\\]/,
|
|
25
|
-
/[/\\]generated[/\\]/,
|
|
26
|
-
/[/\\]runtime[/\\]/,
|
|
27
|
-
/[/\\]types[/\\]/,
|
|
28
|
-
/[/\\]src[/\\][^/\\]+\.ts$/
|
|
17
|
+
dirs: [
|
|
18
|
+
"{{ serverDir }}/**",
|
|
19
|
+
"!{{ serverDir }}/runtime/**",
|
|
20
|
+
"!{{ silgi.serverDir }}/**"
|
|
29
21
|
]
|
|
30
22
|
}
|
|
31
23
|
},
|
|
@@ -14,15 +14,15 @@ const nuxt = defineSilgiPreset(
|
|
|
14
14
|
altPrefix: "NUXT_"
|
|
15
15
|
},
|
|
16
16
|
imports: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
/
|
|
20
|
-
/
|
|
21
|
-
/
|
|
22
|
-
/
|
|
23
|
-
/
|
|
24
|
-
/
|
|
25
|
-
|
|
17
|
+
dirs: [
|
|
18
|
+
"{{ serverDir }}/**",
|
|
19
|
+
"!{{ serverDir }}/runtime/**",
|
|
20
|
+
"!{{ serverDir }}/api/**",
|
|
21
|
+
"!{{ serverDir }}/routers/**",
|
|
22
|
+
"!{{ serverDir }}/modules/**",
|
|
23
|
+
"!{{ serverDir }}/assets/**",
|
|
24
|
+
"!{{ serverDir }}/public/**",
|
|
25
|
+
"!{{ silgi.serverDir }}/**"
|
|
26
26
|
]
|
|
27
27
|
},
|
|
28
28
|
storages: ["data", "/assets"]
|