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.
@@ -1,6 +1,6 @@
1
1
  const name = "silgi";
2
2
  const type = "module";
3
- const version = "0.4.0";
3
+ const version = "0.4.1";
4
4
  const packageManager = "pnpm@9.15.1";
5
5
  const sideEffects = false;
6
6
  const exports = {
@@ -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);
@@ -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.DSHNePNA.mjs';
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';
@@ -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.D8h2AAVk.js';
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';
@@ -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 normalizedModule(inlineOptions, silgi = tryUseSilgiCLI()) {
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
- normalizedModule.getMeta = () => Promise.resolve(module.meta);
231
- normalizedModule.getOptions = getOptions;
232
- return normalizedModule;
230
+ silgiNormalizedModule.getMeta = () => Promise.resolve(module.meta);
231
+ silgiNormalizedModule.getOptions = getOptions;
232
+ return silgiNormalizedModule;
233
233
  }
234
234
 
235
235
  function defineSilgiPreset(preset, meta) {
@@ -1,3 +1,3 @@
1
- const version = "0.4.0";
1
+ const version = "0.4.1";
2
2
 
3
3
  export { version };
@@ -1,3 +1,3 @@
1
- const version = "0.4.0";
1
+ const version = "0.4.1";
2
2
 
3
3
  export { version };
@@ -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,2 @@
1
+ declare const _default: readonly [any];
2
+ export default _default;
@@ -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];
@@ -43,7 +43,7 @@ type BaseSchemaType<T extends StandardSchemaV1> = {
43
43
  [Action in BaseSilgiMethodType]?: Record<string, {
44
44
  input?: T;
45
45
  output?: T;
46
- routerParams?: T;
46
+ router?: T;
47
47
  }>;
48
48
  };
49
49
 
@@ -43,7 +43,7 @@ type BaseSchemaType<T extends StandardSchemaV1> = {
43
43
  [Action in BaseSilgiMethodType]?: Record<string, {
44
44
  input?: T;
45
45
  output?: T;
46
- routerParams?: T;
46
+ router?: T;
47
47
  }>;
48
48
  };
49
49
 
@@ -1,5 +1,5 @@
1
- import { D as DefaultNamespaces, B as BaseSchemaType, S as SilgiServiceInterface } from '../shared/silgi.DSHNePNA.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.DSHNePNA.mjs';
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';
@@ -1,5 +1,5 @@
1
- import { D as DefaultNamespaces, B as BaseSchemaType, S as SilgiServiceInterface } from '../shared/silgi.D8h2AAVk.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.D8h2AAVk.js';
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';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.4.0",
4
+ "version": "0.4.1",
5
5
  "sideEffects": false,
6
6
  "exports": {
7
7
  "./cli": {