silgi 0.8.44 → 0.8.46

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,4 +1,4 @@
1
- const version = "0.8.44";
1
+ const version = "0.8.46";
2
2
  const devDependencies = {
3
3
  "@antfu/eslint-config": "^4.2.0",
4
4
  "@fastify/deepmerge": "^2.0.2",
package/dist/cli/run.mjs CHANGED
@@ -123,9 +123,11 @@ const run = defineCommand({
123
123
  label: env.fileName,
124
124
  value: env.fileName
125
125
  })) : [
126
- { label: "Development (.env)", value: "dev" },
127
- { label: "Production (.env.prod)", value: "prod" },
128
- { label: "Docker (.env.docker)", value: "docker" }
126
+ { label: "Development (.env.dev)", value: "dev" },
127
+ { label: "Docker (.env.docker)", value: "docker" },
128
+ { label: "Staging (.env.staging)", value: "staging" },
129
+ { label: "Testing (.env.testing)", value: "testing" },
130
+ { label: "Production (.env)", value: ".env" }
129
131
  ]
130
132
  });
131
133
  const findEnv = customEnvironments?.find((env) => env.fileName === environment);
@@ -140,7 +142,7 @@ const run = defineCommand({
140
142
  await setupDotenv({
141
143
  cwd: silgiConfig.rootDir,
142
144
  interpolate: true,
143
- fileName: `.env.${environment}`
145
+ fileName: environment === "prod" ? ".env" : `.env.${environment}`
144
146
  });
145
147
  }
146
148
  const commandName = await p.select({
@@ -1,4 +1,4 @@
1
- const version = "0.8.44";
1
+ const version = "0.8.46";
2
2
  const devDependencies = {
3
3
  "@antfu/eslint-config": "^4.2.0",
4
4
  "@fastify/deepmerge": "^2.0.2",
@@ -1,4 +1,4 @@
1
- const version = "0.8.44";
1
+ const version = "0.8.46";
2
2
  const devDependencies = {
3
3
  "@antfu/eslint-config": "^4.2.0",
4
4
  "@fastify/deepmerge": "^2.0.2",
@@ -1,10 +1,10 @@
1
1
  import _h3 from "./h3/preset.mjs";
2
2
  import _nitro from "./nitro/preset.mjs";
3
- import _npmPackage from "./npmPackage/preset.mjs";
3
+ import _npmpackage from "./npmpackage/preset.mjs";
4
4
  import _nuxt from "./nuxt/preset.mjs";
5
5
  export default [
6
6
  ..._h3,
7
7
  ..._nitro,
8
- ..._npmPackage,
8
+ ..._npmpackage,
9
9
  ..._nuxt
10
10
  ];
@@ -10,13 +10,13 @@ type ExtractPathParams<T extends string> = T extends `${infer _Start}:${infer Pa
10
10
  [K in Param]: string;
11
11
  } : object;
12
12
  export type RouterParams<R extends AllPaths | (string & {})> = ExtractPathParams<R>;
13
- type SilgiFetchOptions<T, P extends AllPaths | (string & {}), BasePath extends keyof SilgiRouterTypes = TrimAfterFourSlashes<P> extends keyof SilgiRouterTypes ? TrimAfterFourSlashes<P> : never, M extends keyof SilgiRouterTypes[BasePath] = keyof SilgiRouterTypes[BasePath]> = {
13
+ type SilgiFetchOptions<P extends AllPaths | (string & {}), BasePath extends keyof SilgiRouterTypes = TrimAfterFourSlashes<P> extends keyof SilgiRouterTypes ? TrimAfterFourSlashes<P> : never, M extends keyof SilgiRouterTypes[BasePath] = keyof SilgiRouterTypes[BasePath]> = {
14
14
  method?: M;
15
15
  params?: ExtractPathParams<P>;
16
16
  body?: SilgiRouterTypes[BasePath][M]['input'];
17
17
  } & Omit<FetchOptions, 'method' | 'body' | 'params'>;
18
- export type SilgiFetchClient = <T, P extends AllPaths | (string & {}), BasePath extends keyof SilgiRouterTypes = TrimAfterFourSlashes<P> extends keyof SilgiRouterTypes ? TrimAfterFourSlashes<P> : never, M extends keyof SilgiRouterTypes[BasePath] = keyof SilgiRouterTypes[BasePath]>(url: BasePath, options: SilgiFetchOptions<T, P, BasePath, M>) => Promise<FetchResponse<SilgiRouterTypes[BasePath][M]['output']>>;
18
+ export type SilgiFetchClient = <P extends AllPaths | (string & {}), BasePath extends keyof SilgiRouterTypes = TrimAfterFourSlashes<P> extends keyof SilgiRouterTypes ? TrimAfterFourSlashes<P> : never, M extends keyof SilgiRouterTypes[BasePath] = keyof SilgiRouterTypes[BasePath]>(url: BasePath, options?: SilgiFetchOptions<P, BasePath, M>) => Promise<FetchResponse<SilgiRouterTypes[BasePath][M]['output']>>;
19
19
  export declare function silgiFetchRequestInterceptor(ctx: FetchContext): void;
20
20
  export declare function createSilgiFetch(options: FetchOptions | ((options: FetchOptions) => FetchOptions), localFetch?: typeof globalThis.$fetch): SilgiFetchClient;
21
- export declare function silgi$fetch<T, P extends AllPaths | (string & {}), BasePath extends keyof SilgiRouterTypes = TrimAfterFourSlashes<P> extends keyof SilgiRouterTypes ? TrimAfterFourSlashes<P> : never, M extends keyof SilgiRouterTypes[BasePath] = keyof SilgiRouterTypes[BasePath]>(url: P, opts?: SilgiFetchOptions<T, P, BasePath, M>): Promise<FetchResponse<SilgiRouterTypes[BasePath][M]['output']>>;
21
+ export declare function silgi$fetch<P extends AllPaths | (string & {}), BasePath extends keyof SilgiRouterTypes = TrimAfterFourSlashes<P> extends keyof SilgiRouterTypes ? TrimAfterFourSlashes<P> : never, M extends keyof SilgiRouterTypes[BasePath] = keyof SilgiRouterTypes[BasePath]>(url: P, opts?: SilgiFetchOptions<P, BasePath, M>): Promise<FetchResponse<SilgiRouterTypes[BasePath][M]['output']>>;
22
22
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.8.44",
4
+ "version": "0.8.46",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {