silgi 0.4.0 → 0.4.1
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/prepare.mjs +4 -0
- package/dist/kit/index.d.mts +1 -1
- package/dist/kit/index.d.ts +1 -1
- package/dist/kit/index.mjs +4 -4
- package/dist/meta/index.d.mts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/dist/presets/_all.gen.d.ts +1 -1
- package/dist/presets/_all.gen.mjs +3 -1
- package/dist/presets/_types.gen.d.ts +2 -2
- package/dist/presets/nuxt/preset.d.ts +2 -0
- package/dist/presets/nuxt/preset.mjs +26 -0
- package/dist/shared/{silgi.DSHNePNA.d.mts → silgi.CzUPBllI.d.mts} +1 -1
- package/dist/shared/{silgi.D8h2AAVk.d.ts → silgi.D_LzzCtJ.d.ts} +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/_chunks/index.mjs
CHANGED
package/dist/cli/prepare.mjs
CHANGED
|
@@ -875,6 +875,10 @@ async function installModules(silgi) {
|
|
|
875
875
|
default: true,
|
|
876
876
|
conditions: silgi.options.conditions
|
|
877
877
|
});
|
|
878
|
+
if (silgiModule.name !== "silgiNormalizedModule") {
|
|
879
|
+
silgi.scanModules = silgi.scanModules.filter((m) => m.entryPath !== module.entryPath);
|
|
880
|
+
continue;
|
|
881
|
+
}
|
|
878
882
|
await installModule(silgiModule, silgi);
|
|
879
883
|
} catch (err) {
|
|
880
884
|
silgi.logger.error(err);
|
package/dist/kit/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Buffer } from 'node:buffer';
|
|
2
2
|
import { GraphQLSchema } from 'graphql';
|
|
3
3
|
import { SilgiCLI, GraphQLJSON, SilgiPreset, SilgiPresetMeta } from 'silgi/types';
|
|
4
|
-
import { w as ModuleOptions, y as ModuleDefinition, F as SilgiModule } from '../shared/silgi.
|
|
4
|
+
import { w as ModuleOptions, y as ModuleDefinition, F as SilgiModule } from '../shared/silgi.CzUPBllI.mjs';
|
|
5
5
|
import 'defu';
|
|
6
6
|
import '@graphql-tools/utils';
|
|
7
7
|
import 'pkg-types';
|
package/dist/kit/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Buffer } from 'node:buffer';
|
|
2
2
|
import { GraphQLSchema } from 'graphql';
|
|
3
3
|
import { SilgiCLI, GraphQLJSON, SilgiPreset, SilgiPresetMeta } from 'silgi/types';
|
|
4
|
-
import { w as ModuleOptions, y as ModuleDefinition, F as SilgiModule } from '../shared/silgi.
|
|
4
|
+
import { w as ModuleOptions, y as ModuleDefinition, F as SilgiModule } from '../shared/silgi.D_LzzCtJ.js';
|
|
5
5
|
import 'defu';
|
|
6
6
|
import '@graphql-tools/utils';
|
|
7
7
|
import 'pkg-types';
|
package/dist/kit/index.mjs
CHANGED
|
@@ -185,7 +185,7 @@ function _defineSilgiModule(definition) {
|
|
|
185
185
|
const options = defu(inlineOptions, nuxtConfigOptions, optionsDefaults);
|
|
186
186
|
return Promise.resolve(options);
|
|
187
187
|
}
|
|
188
|
-
async function
|
|
188
|
+
async function silgiNormalizedModule(inlineOptions, silgi = tryUseSilgiCLI()) {
|
|
189
189
|
if (!silgi) {
|
|
190
190
|
throw new TypeError("Cannot use module outside of Silgi context");
|
|
191
191
|
}
|
|
@@ -227,9 +227,9 @@ ${issues.toString()}`);
|
|
|
227
227
|
}
|
|
228
228
|
});
|
|
229
229
|
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
return
|
|
230
|
+
silgiNormalizedModule.getMeta = () => Promise.resolve(module.meta);
|
|
231
|
+
silgiNormalizedModule.getOptions = getOptions;
|
|
232
|
+
return silgiNormalizedModule;
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
function defineSilgiPreset(preset, meta) {
|
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: readonly [any, any, any];
|
|
1
|
+
declare const _default: readonly [any, any, any, any];
|
|
2
2
|
export default _default;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import _h3 from "./h3/preset.mjs";
|
|
2
2
|
import _nitro from "./nitro/preset.mjs";
|
|
3
3
|
import _npmpackage from "./npmpackage/preset.mjs";
|
|
4
|
+
import _nuxt from "./nuxt/preset.mjs";
|
|
4
5
|
export default [
|
|
5
6
|
..._h3,
|
|
6
7
|
..._nitro,
|
|
7
|
-
..._npmpackage
|
|
8
|
+
..._npmpackage,
|
|
9
|
+
..._nuxt
|
|
8
10
|
];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface PresetOptions {
|
|
2
2
|
}
|
|
3
3
|
export declare const presetsWithConfig: readonly [];
|
|
4
|
-
export type PresetName = "h3" | "nitro" | "npm-package";
|
|
5
|
-
export type PresetNameInput = "h3" | "nitro" | "npm-package" | "npmPackage" | "npm_package" | (string & {});
|
|
4
|
+
export type PresetName = "h3" | "nitro" | "npm-package" | "nuxt";
|
|
5
|
+
export type PresetNameInput = "h3" | "nitro" | "npm-package" | "npmPackage" | "npm_package" | "nuxt" | (string & {});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineSilgiPreset } from "silgi/kit";
|
|
2
|
+
const nuxt = defineSilgiPreset(
|
|
3
|
+
{
|
|
4
|
+
static: true,
|
|
5
|
+
output: {
|
|
6
|
+
dir: "{{ rootDir }}/.output",
|
|
7
|
+
publicDir: "{{ output.dir }}/public"
|
|
8
|
+
},
|
|
9
|
+
prerender: {
|
|
10
|
+
crawlLinks: true
|
|
11
|
+
},
|
|
12
|
+
typescript: {
|
|
13
|
+
generateTsConfig: false,
|
|
14
|
+
tsconfigPath: ".nuxt/silgi.tsconfig.json"
|
|
15
|
+
},
|
|
16
|
+
commands: {
|
|
17
|
+
preview: "npx serve ./public"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: "nuxt",
|
|
22
|
+
static: true,
|
|
23
|
+
url: import.meta.url
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
export default [nuxt];
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DefaultNamespaces, B as BaseSchemaType, S as SilgiServiceInterface } from '../shared/silgi.
|
|
2
|
-
export { A as AppConfig, o as Awaitable, l as BaseSilgiMethodType, W as CaptureError, V as CapturedErrorContext, C as CreateScope, n as DeepPartial, m as DefaultHooks, N as EventHandlerResponse, a2 as ExtendShared, ae as ExtractInputFromURI, af as ExtractOutputFromURI, ag as ExtractRouterParamsFromURI, a3 as FrameworkContext, a7 as ImportItem, L as LoadConfigOptions, Y as MergedSilgiSchema, O as MethodHandlerType, Q as MethodResponse, K as MethodSchemaType, G as ModuleConfigurations, y as ModuleDefinition, v as ModuleHookContext, M as ModuleMeta, w as ModuleOptions, z as ModuleSetupInstallResult, E as ModuleSetupReturn, ab as NitroBuildInfo, _ as RequiredServiceType, P as ResolvedMethodHandlerType, R as ResolvedModuleMeta, x as ResolvedModuleOptions, $ as ResolvedServiceType, Z as ServiceType, a4 as Silgi, U as SilgiAppPlugin, a8 as SilgiCLI, b as SilgiCLIConfig, a9 as SilgiCLIDynamicConfig, c as SilgiCLIHooks, a as SilgiCLIOptions, u as SilgiCompatibility, d as SilgiCompatibilityIssue, e as SilgiCompatibilityIssues, a5 as SilgiConfig, a0 as SilgiDefaultShared, g as SilgiEvent, aa as SilgiFrameworkInfo, a6 as SilgiFunction, k as SilgiHook, p as SilgiHooks, h as SilgiMethods, F as SilgiModule, t as SilgiModuleInput, r as SilgiModuleMethods, s as SilgiModuleOptions, a1 as SilgiModuleShared, q as SilgiModules, i as SilgiNamespaces, H as SilgiOperation, f as SilgiOptions, I as SilgiPreset, J as SilgiPresetMeta, j as SilgiRouterTypes, X as SilgiSchema, ai as SilgiStorageBase, ac as SilgiURIs, ak as StorageConfig, aj as StorageKeyGenerator, al as StorageKeyParams, ah as StorageMounts, T as TSReference, ad as URIsTypes } from '../shared/silgi.
|
|
1
|
+
import { D as DefaultNamespaces, B as BaseSchemaType, S as SilgiServiceInterface } from '../shared/silgi.CzUPBllI.mjs';
|
|
2
|
+
export { A as AppConfig, o as Awaitable, l as BaseSilgiMethodType, W as CaptureError, V as CapturedErrorContext, C as CreateScope, n as DeepPartial, m as DefaultHooks, N as EventHandlerResponse, a2 as ExtendShared, ae as ExtractInputFromURI, af as ExtractOutputFromURI, ag as ExtractRouterParamsFromURI, a3 as FrameworkContext, a7 as ImportItem, L as LoadConfigOptions, Y as MergedSilgiSchema, O as MethodHandlerType, Q as MethodResponse, K as MethodSchemaType, G as ModuleConfigurations, y as ModuleDefinition, v as ModuleHookContext, M as ModuleMeta, w as ModuleOptions, z as ModuleSetupInstallResult, E as ModuleSetupReturn, ab as NitroBuildInfo, _ as RequiredServiceType, P as ResolvedMethodHandlerType, R as ResolvedModuleMeta, x as ResolvedModuleOptions, $ as ResolvedServiceType, Z as ServiceType, a4 as Silgi, U as SilgiAppPlugin, a8 as SilgiCLI, b as SilgiCLIConfig, a9 as SilgiCLIDynamicConfig, c as SilgiCLIHooks, a as SilgiCLIOptions, u as SilgiCompatibility, d as SilgiCompatibilityIssue, e as SilgiCompatibilityIssues, a5 as SilgiConfig, a0 as SilgiDefaultShared, g as SilgiEvent, aa as SilgiFrameworkInfo, a6 as SilgiFunction, k as SilgiHook, p as SilgiHooks, h as SilgiMethods, F as SilgiModule, t as SilgiModuleInput, r as SilgiModuleMethods, s as SilgiModuleOptions, a1 as SilgiModuleShared, q as SilgiModules, i as SilgiNamespaces, H as SilgiOperation, f as SilgiOptions, I as SilgiPreset, J as SilgiPresetMeta, j as SilgiRouterTypes, X as SilgiSchema, ai as SilgiStorageBase, ac as SilgiURIs, ak as StorageConfig, aj as StorageKeyGenerator, al as StorageKeyParams, ah as StorageMounts, T as TSReference, ad as URIsTypes } from '../shared/silgi.CzUPBllI.mjs';
|
|
3
3
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
4
4
|
import 'defu';
|
|
5
5
|
import '@graphql-tools/utils';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DefaultNamespaces, B as BaseSchemaType, S as SilgiServiceInterface } from '../shared/silgi.
|
|
2
|
-
export { A as AppConfig, o as Awaitable, l as BaseSilgiMethodType, W as CaptureError, V as CapturedErrorContext, C as CreateScope, n as DeepPartial, m as DefaultHooks, N as EventHandlerResponse, a2 as ExtendShared, ae as ExtractInputFromURI, af as ExtractOutputFromURI, ag as ExtractRouterParamsFromURI, a3 as FrameworkContext, a7 as ImportItem, L as LoadConfigOptions, Y as MergedSilgiSchema, O as MethodHandlerType, Q as MethodResponse, K as MethodSchemaType, G as ModuleConfigurations, y as ModuleDefinition, v as ModuleHookContext, M as ModuleMeta, w as ModuleOptions, z as ModuleSetupInstallResult, E as ModuleSetupReturn, ab as NitroBuildInfo, _ as RequiredServiceType, P as ResolvedMethodHandlerType, R as ResolvedModuleMeta, x as ResolvedModuleOptions, $ as ResolvedServiceType, Z as ServiceType, a4 as Silgi, U as SilgiAppPlugin, a8 as SilgiCLI, b as SilgiCLIConfig, a9 as SilgiCLIDynamicConfig, c as SilgiCLIHooks, a as SilgiCLIOptions, u as SilgiCompatibility, d as SilgiCompatibilityIssue, e as SilgiCompatibilityIssues, a5 as SilgiConfig, a0 as SilgiDefaultShared, g as SilgiEvent, aa as SilgiFrameworkInfo, a6 as SilgiFunction, k as SilgiHook, p as SilgiHooks, h as SilgiMethods, F as SilgiModule, t as SilgiModuleInput, r as SilgiModuleMethods, s as SilgiModuleOptions, a1 as SilgiModuleShared, q as SilgiModules, i as SilgiNamespaces, H as SilgiOperation, f as SilgiOptions, I as SilgiPreset, J as SilgiPresetMeta, j as SilgiRouterTypes, X as SilgiSchema, ai as SilgiStorageBase, ac as SilgiURIs, ak as StorageConfig, aj as StorageKeyGenerator, al as StorageKeyParams, ah as StorageMounts, T as TSReference, ad as URIsTypes } from '../shared/silgi.
|
|
1
|
+
import { D as DefaultNamespaces, B as BaseSchemaType, S as SilgiServiceInterface } from '../shared/silgi.D_LzzCtJ.js';
|
|
2
|
+
export { A as AppConfig, o as Awaitable, l as BaseSilgiMethodType, W as CaptureError, V as CapturedErrorContext, C as CreateScope, n as DeepPartial, m as DefaultHooks, N as EventHandlerResponse, a2 as ExtendShared, ae as ExtractInputFromURI, af as ExtractOutputFromURI, ag as ExtractRouterParamsFromURI, a3 as FrameworkContext, a7 as ImportItem, L as LoadConfigOptions, Y as MergedSilgiSchema, O as MethodHandlerType, Q as MethodResponse, K as MethodSchemaType, G as ModuleConfigurations, y as ModuleDefinition, v as ModuleHookContext, M as ModuleMeta, w as ModuleOptions, z as ModuleSetupInstallResult, E as ModuleSetupReturn, ab as NitroBuildInfo, _ as RequiredServiceType, P as ResolvedMethodHandlerType, R as ResolvedModuleMeta, x as ResolvedModuleOptions, $ as ResolvedServiceType, Z as ServiceType, a4 as Silgi, U as SilgiAppPlugin, a8 as SilgiCLI, b as SilgiCLIConfig, a9 as SilgiCLIDynamicConfig, c as SilgiCLIHooks, a as SilgiCLIOptions, u as SilgiCompatibility, d as SilgiCompatibilityIssue, e as SilgiCompatibilityIssues, a5 as SilgiConfig, a0 as SilgiDefaultShared, g as SilgiEvent, aa as SilgiFrameworkInfo, a6 as SilgiFunction, k as SilgiHook, p as SilgiHooks, h as SilgiMethods, F as SilgiModule, t as SilgiModuleInput, r as SilgiModuleMethods, s as SilgiModuleOptions, a1 as SilgiModuleShared, q as SilgiModules, i as SilgiNamespaces, H as SilgiOperation, f as SilgiOptions, I as SilgiPreset, J as SilgiPresetMeta, j as SilgiRouterTypes, X as SilgiSchema, ai as SilgiStorageBase, ac as SilgiURIs, ak as StorageConfig, aj as StorageKeyGenerator, al as StorageKeyParams, ah as StorageMounts, T as TSReference, ad as URIsTypes } from '../shared/silgi.D_LzzCtJ.js';
|
|
3
3
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
4
4
|
import 'defu';
|
|
5
5
|
import '@graphql-tools/utils';
|