silgi 0.24.13 → 0.24.14
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/cli/index.mjs +1 -1
- package/dist/cli/init.mjs +7 -2
- package/dist/types/index.d.mts +2 -1
- package/package.json +1 -1
package/dist/cli/index.mjs
CHANGED
package/dist/cli/init.mjs
CHANGED
|
@@ -39,14 +39,19 @@ const init = defineCommand({
|
|
|
39
39
|
];
|
|
40
40
|
if (framework === "nitro" || framework === "nuxt") {
|
|
41
41
|
const plugin = [
|
|
42
|
-
`import { buildSilgi } from '../silgi'`,
|
|
42
|
+
`import { buildSilgi } from '../silgi/core'`,
|
|
43
43
|
"",
|
|
44
44
|
"export default defineNitroPlugin(async (nitro) => {",
|
|
45
|
+
"if (!globalThis.__nitro__) {",
|
|
46
|
+
" globalThis.__nitro__ = {}",
|
|
47
|
+
"}",
|
|
48
|
+
"globalThis.__nitro__.useRuntimeConfig = useRuntimeConfig",
|
|
49
|
+
"",
|
|
45
50
|
" const _silgi = buildSilgi(",
|
|
46
51
|
" nitro,",
|
|
47
52
|
" {},",
|
|
48
53
|
" {",
|
|
49
|
-
"
|
|
54
|
+
" putStorage: useStorage(),",
|
|
50
55
|
" runtimeConfig: useRuntimeConfig(),",
|
|
51
56
|
" },",
|
|
52
57
|
" )",
|
package/dist/types/index.d.mts
CHANGED
|
@@ -591,6 +591,7 @@ interface SilgiCLIOptions extends PresetOptions {
|
|
|
591
591
|
path: string;
|
|
592
592
|
packageImport: string;
|
|
593
593
|
}[];
|
|
594
|
+
baseURL: string;
|
|
594
595
|
compatibilityDate: CompatibilityDates;
|
|
595
596
|
modules: (SilgiModule<any> | string | [SilgiModule | string, Record<string, any>] | undefined | null | false)[];
|
|
596
597
|
_modules: (SilgiModule<any> | string | [SilgiModule | string, Record<string, any>] | undefined | null | false)[];
|
|
@@ -821,7 +822,7 @@ type ExtractPathParams<T extends string> = T extends `${infer _Start}:${infer Pa
|
|
|
821
822
|
[K in Param]: string;
|
|
822
823
|
} & ExtractPathParams<Rest> : T extends `${infer _Start}:${infer Param}` ? {
|
|
823
824
|
[K in Param]: string;
|
|
824
|
-
} :
|
|
825
|
+
} : unknown;
|
|
825
826
|
|
|
826
827
|
type HttpMethod = 'get' | 'GET' | 'HEAD' | 'PATCH' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'head' | 'patch' | 'post' | 'put' | 'delete' | 'connect' | 'options' | 'trace';
|
|
827
828
|
type RouterParams<R extends AllPaths | (string & {})> = ExtractPathParams<R>;
|