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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { defineCommand, runMain } from 'citty';
3
3
 
4
- const version = "0.24.13";
4
+ const version = "0.24.14";
5
5
  const packageJson = {
6
6
  version: version};
7
7
 
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
- " storage: useStorage(),",
54
+ " putStorage: useStorage(),",
50
55
  " runtimeConfig: useRuntimeConfig(),",
51
56
  " },",
52
57
  " )",
@@ -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
- } : object;
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>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.24.13",
4
+ "version": "0.24.14",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {