nitro-graphql 1.0.3 → 1.0.5

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
- import * as _nuxt_schema3 from "@nuxt/schema";
1
+ import * as _nuxt_schema7 from "@nuxt/schema";
2
2
 
3
3
  //#region src/ecosystem/nuxt.d.ts
4
4
  interface ModuleOptions {}
5
- declare const _default: _nuxt_schema3.NuxtModule<ModuleOptions, ModuleOptions, false>;
5
+ declare const _default: _nuxt_schema7.NuxtModule<ModuleOptions, ModuleOptions, false>;
6
6
  //#endregion
7
7
  export { ModuleOptions, _default as default };
@@ -1,6 +1,6 @@
1
- import * as h30 from "h3";
1
+ import * as h33 from "h3";
2
2
 
3
3
  //#region src/routes/apollo-server.d.ts
4
- declare const _default: h30.EventHandler<h30.EventHandlerRequest, any>;
4
+ declare const _default: h33.EventHandler<h33.EventHandlerRequest, any>;
5
5
  //#endregion
6
6
  export { _default as default };
@@ -1,6 +1,6 @@
1
- import * as h34 from "h3";
1
+ import * as h35 from "h3";
2
2
 
3
3
  //#region src/routes/graphql-yoga.d.ts
4
- declare const _default: h34.EventHandler<h34.EventHandlerRequest, Promise<Response>>;
4
+ declare const _default: h35.EventHandler<h35.EventHandlerRequest, Promise<Response>>;
5
5
  //#endregion
6
6
  export { _default as default };
@@ -1,7 +1,7 @@
1
- import * as h36 from "h3";
1
+ import * as h30 from "h3";
2
2
 
3
3
  //#region src/routes/health.d.ts
4
- declare const _default: h36.EventHandler<h36.EventHandlerRequest, Promise<{
4
+ declare const _default: h30.EventHandler<h30.EventHandlerRequest, Promise<{
5
5
  status: string;
6
6
  message: string;
7
7
  timestamp: string;
@@ -68,7 +68,7 @@ async function generateClientTypes(schema, docs, config = {}, sdkConfig = {}, ou
68
68
  Currency: "string"
69
69
  }
70
70
  };
71
- const mergedConfig = defu$1(config, defaultConfig);
71
+ const mergedConfig = defu$1(defaultConfig, config);
72
72
  const defaultSdkConfig = {
73
73
  documentMode: "string",
74
74
  pureMagicComment: true,
@@ -84,7 +84,7 @@ async function generateClientTypes(schema, docs, config = {}, sdkConfig = {}, ou
84
84
  Currency: "string"
85
85
  }
86
86
  };
87
- const mergedSdkConfig = defu$1(sdkConfig, defaultSdkConfig);
87
+ const mergedSdkConfig = defu$1(defaultSdkConfig, sdkConfig);
88
88
  try {
89
89
  const output = await codegen({
90
90
  filename: outputPath || "client-types.generated.ts",
@@ -39,7 +39,7 @@ async function generateTypes(schema, config = {}, outputPath) {
39
39
  declarationKind: "interface",
40
40
  enumsAsTypes: true
41
41
  };
42
- const mergedConfig = defu$1(config, defaultConfig);
42
+ const mergedConfig = defu$1(defaultConfig, config);
43
43
  const output = await codegen({
44
44
  filename: outputPath || "types.generated.ts",
45
45
  schema: parse(printSchemaWithDirectives(schema)),
@@ -78,7 +78,9 @@ async function clientTypeGeneration(nitro) {
78
78
  if (types === false) return;
79
79
  const clientTypesPath = resolve(nitro.options.buildDir, "types", "nitro-graphql-client.d.ts");
80
80
  const sdkTypesPath = resolve(nitro.graphql.clientDir, "sdk.ts");
81
+ mkdirSync(dirname(clientTypesPath), { recursive: true });
81
82
  writeFileSync(clientTypesPath, types.types, "utf-8");
83
+ mkdirSync(dirname(sdkTypesPath), { recursive: true });
82
84
  writeFileSync(sdkTypesPath, types.sdk, "utf-8");
83
85
  if (nitro.options.framework?.name === "nuxt") generateNuxtOfetchClient(nitro.graphql.clientDir);
84
86
  } catch (error) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nitro-graphql",
3
3
  "type": "module",
4
- "version": "1.0.3",
4
+ "version": "1.0.5",
5
5
  "description": "GraphQL integration for Nitro",
6
6
  "license": "MIT",
7
7
  "sideEffects": false,