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.
- package/dist/_chunks/index.mjs +1 -1
- package/dist/cli/run.mjs +6 -4
- package/dist/meta/index.d.mts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/dist/presets/_all.gen.mjs +2 -2
- package/dist/runtime/internal/ofetch.d.ts +3 -3
- package/package.json +1 -1
- /package/dist/presets/{npmPackage → npmpackage}/preset.d.ts +0 -0
- /package/dist/presets/{npmPackage → npmpackage}/preset.mjs +0 -0
package/dist/_chunks/index.mjs
CHANGED
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: "
|
|
128
|
-
{ label: "
|
|
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({
|
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _h3 from "./h3/preset.mjs";
|
|
2
2
|
import _nitro from "./nitro/preset.mjs";
|
|
3
|
-
import
|
|
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
|
-
...
|
|
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<
|
|
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 = <
|
|
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<
|
|
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
|
File without changes
|
|
File without changes
|