nitro-graphql 2.0.0-beta.67 → 2.0.0-beta.68

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.
Files changed (81) hide show
  1. package/dist/cli/adapter.d.mts +0 -1
  2. package/dist/cli/commands/build.d.mts +7 -8
  3. package/dist/cli/commands/dev.d.mts +22 -23
  4. package/dist/cli/commands/generate.d.mts +0 -1
  5. package/dist/cli/commands/generate.mjs +5 -5
  6. package/dist/cli/commands/init.d.mts +0 -1
  7. package/dist/cli/commands/validate.d.mts +0 -1
  8. package/dist/cli/completions.d.mts +0 -1
  9. package/dist/cli/config.d.mts +0 -1
  10. package/dist/cli/index.d.mts +0 -2
  11. package/dist/cli/server/debug-handler.d.mts +0 -1
  12. package/dist/cli/server/dev-server.d.mts +0 -1
  13. package/dist/cli/server/dev-server.mjs +1 -1
  14. package/dist/cli/server/graphql-handler.d.mts +0 -1
  15. package/dist/cli/server/loader.d.mts +0 -1
  16. package/dist/cli/server/watcher.d.mts +0 -1
  17. package/dist/cli/server/ws-handler.d.mts +0 -1
  18. package/dist/core/codegen/client.d.mts +0 -1
  19. package/dist/core/codegen/client.mjs +3 -3
  20. package/dist/core/codegen/document-loader.d.mts +0 -1
  21. package/dist/core/codegen/plugin.d.mts +0 -1
  22. package/dist/core/codegen/runtime.d.mts +0 -1
  23. package/dist/core/codegen/schema-loader.d.mts +0 -1
  24. package/dist/core/codegen/server.d.mts +0 -1
  25. package/dist/core/config.d.mts +0 -1
  26. package/dist/core/extend/loader.d.mts +0 -1
  27. package/dist/core/scanning/ast-scanner.d.mts +0 -1
  28. package/dist/core/scanning/common.d.mts +0 -1
  29. package/dist/core/scanning/directives.d.mts +0 -1
  30. package/dist/core/scanning/documents.d.mts +0 -1
  31. package/dist/core/scanning/documents.mjs +1 -1
  32. package/dist/core/scanning/resolvers.d.mts +0 -1
  33. package/dist/core/scanning/schemas.d.mts +0 -1
  34. package/dist/core/schema/builder.d.mts +0 -1
  35. package/dist/core/schema/builder.mjs +1 -1
  36. package/dist/core/schema/federation.d.mts +0 -1
  37. package/dist/core/server/types.d.mts +0 -1
  38. package/dist/core/server/yoga.d.mts +0 -1
  39. package/dist/core/types/adapter.d.mts +0 -1
  40. package/dist/core/types/codegen.d.mts +0 -1
  41. package/dist/core/types/config.d.mts +0 -1
  42. package/dist/core/types/define.d.mts +0 -1
  43. package/dist/core/types/scanning.d.mts +0 -1
  44. package/dist/core/utils/logger.d.mts +0 -1
  45. package/dist/core/utils/runtime.d.mts +0 -1
  46. package/dist/core/watcher/index.d.mts +0 -1
  47. package/dist/define.d.mts +0 -1
  48. package/dist/nitro/adapter.d.mts +0 -1
  49. package/dist/nitro/codegen.d.mts +0 -1
  50. package/dist/nitro/config.d.mts +0 -1
  51. package/dist/nitro/index.d.mts +0 -1
  52. package/dist/nitro/paths.d.mts +0 -1
  53. package/dist/nitro/rollup.mjs +5 -5
  54. package/dist/nitro/routes/apollo-server-ws.d.mts +0 -1
  55. package/dist/nitro/routes/apollo-server.d.mts +2 -2
  56. package/dist/nitro/routes/debug.d.mts +2 -3
  57. package/dist/nitro/routes/graphql-yoga-ws.d.mts +2 -3
  58. package/dist/nitro/routes/graphql-yoga.d.mts +0 -1
  59. package/dist/nitro/routes/health.d.mts +2 -2
  60. package/dist/nitro/setup/extend-loader.d.mts +0 -1
  61. package/dist/nitro/setup/file-watcher.d.mts +0 -1
  62. package/dist/nitro/setup/logging.d.mts +0 -1
  63. package/dist/nitro/setup/rollup-integration.d.mts +0 -1
  64. package/dist/nitro/setup/routes.d.mts +4 -1
  65. package/dist/nitro/setup/routes.mjs +20 -9
  66. package/dist/nitro/setup/scanner.d.mts +0 -1
  67. package/dist/nitro/setup/ts-config.d.mts +0 -1
  68. package/dist/nitro/setup.d.mts +0 -1
  69. package/dist/nitro/types.d.mts +4 -9
  70. package/dist/nitro/virtual/generators.d.mts +0 -1
  71. package/dist/nuxt.mjs +10 -10
  72. package/native/index.js +52 -52
  73. package/package.json +53 -21
  74. package/dist/_virtual/rolldown_runtime.mjs +0 -7
  75. package/dist/node_modules/.pnpm/crossws@0.4.1_srvx@0.10.0/node_modules/crossws/dist/adapters/node.mjs +0 -123
  76. package/dist/node_modules/.pnpm/crossws@0.4.1_srvx@0.10.0/node_modules/crossws/dist/server/node.mjs +0 -29
  77. package/dist/node_modules/.pnpm/crossws@0.4.1_srvx@0.10.0/node_modules/crossws/dist/shared/crossws.B31KJMcF.mjs +0 -82
  78. package/dist/node_modules/.pnpm/crossws@0.4.1_srvx@0.10.0/node_modules/crossws/dist/shared/crossws.By9qWDAI.mjs +0 -10
  79. package/dist/node_modules/.pnpm/crossws@0.4.1_srvx@0.10.0/node_modules/crossws/dist/shared/crossws.CPlNx7g8.mjs +0 -84
  80. package/dist/node_modules/.pnpm/crossws@0.4.1_srvx@0.10.0/node_modules/crossws/dist/shared/crossws.CipVM6lf.mjs +0 -3551
  81. package/dist/node_modules/.pnpm/crossws@0.4.1_srvx@0.10.0/node_modules/crossws/dist/shared/crossws.WpyOHUXc.mjs +0 -232
@@ -2,7 +2,6 @@ import { FrameworkAdapter } from "../core/types/adapter.mjs";
2
2
  import { CLIContext } from "./index.mjs";
3
3
 
4
4
  //#region src/cli/adapter.d.ts
5
-
6
5
  /**
7
6
  * CLI Framework Adapter
8
7
  *
@@ -1,21 +1,20 @@
1
1
  import * as citty0 from "citty";
2
2
 
3
3
  //#region src/cli/commands/build.d.ts
4
-
5
4
  /**
6
5
  * CLI Build Command
7
6
  *
8
7
  * Builds GraphQL types and validates schemas for production.
9
8
  */
10
9
  declare const buildCommand: citty0.CommandDef<{
11
- cwd: {
12
- type: "string";
13
- description: string;
10
+ readonly cwd: {
11
+ readonly type: "string";
12
+ readonly description: "Working directory";
14
13
  };
15
- skipValidation: {
16
- type: "boolean";
17
- description: string;
18
- default: false;
14
+ readonly skipValidation: {
15
+ readonly type: "boolean";
16
+ readonly description: "Skip schema validation";
17
+ readonly default: false;
19
18
  };
20
19
  }>;
21
20
  //#endregion
@@ -1,7 +1,6 @@
1
1
  import * as citty0 from "citty";
2
2
 
3
3
  //#region src/cli/commands/dev.d.ts
4
-
5
4
  /**
6
5
  * Dev Command
7
6
  *
@@ -9,32 +8,32 @@ import * as citty0 from "citty";
9
8
  * Runtime-agnostic: works on Node.js, Bun, and Deno.
10
9
  */
11
10
  declare const devCommand: citty0.CommandDef<{
12
- cwd: {
13
- type: "string";
14
- description: string;
11
+ readonly cwd: {
12
+ readonly type: "string";
13
+ readonly description: "Working directory";
15
14
  };
16
- port: {
17
- type: "string";
18
- alias: string;
19
- default: string;
20
- description: string;
15
+ readonly port: {
16
+ readonly type: "string";
17
+ readonly alias: "p";
18
+ readonly default: "4000";
19
+ readonly description: "Server port";
21
20
  };
22
- host: {
23
- type: "string";
24
- alias: string;
25
- default: string;
26
- description: string;
21
+ readonly host: {
22
+ readonly type: "string";
23
+ readonly alias: "H";
24
+ readonly default: "localhost";
25
+ readonly description: "Server host";
27
26
  };
28
- open: {
29
- type: "boolean";
30
- alias: string;
31
- description: string;
27
+ readonly open: {
28
+ readonly type: "boolean";
29
+ readonly alias: "o";
30
+ readonly description: "Open browser";
32
31
  };
33
- watch: {
34
- type: "boolean";
35
- alias: string;
36
- default: true;
37
- description: string;
32
+ readonly watch: {
33
+ readonly type: "boolean";
34
+ readonly alias: "w";
35
+ readonly default: true;
36
+ readonly description: "Enable file watching for hot reload";
38
37
  };
39
38
  }>;
40
39
  //#endregion
@@ -1,7 +1,6 @@
1
1
  import { CLIContext } from "../index.mjs";
2
2
 
3
3
  //#region src/cli/commands/generate.d.ts
4
-
5
4
  /**
6
5
  * Generate all types (server + client + optional runtime)
7
6
  */
@@ -9,7 +9,7 @@ import { scanSchemasCore } from "../../core/scanning/schemas.mjs";
9
9
  import { buildGraphQLSchema } from "../../core/schema/builder.mjs";
10
10
  import { existsSync_, mkdirSync_, onSignal, readFileSync_, writeFileSync_ } from "../../core/utils/runtime.mjs";
11
11
  import consola from "consola";
12
- import { dirname, join, relative, resolve } from "pathe";
12
+ import { dirname, join, relative, resolve as resolve$1 } from "pathe";
13
13
 
14
14
  //#region src/cli/commands/generate.ts
15
15
  const logger = consola.withTag(LOG_TAG);
@@ -67,7 +67,7 @@ async function generateServer(ctx, options = {}) {
67
67
  writeFileSync_(schemaPath, result.schemaString);
68
68
  const typesConfig = ctx.config.types;
69
69
  let typesPath;
70
- if (typesConfig && typeof typesConfig === "object" && typeof typesConfig.server === "string") typesPath = resolve(ctx.config.rootDir, typesConfig.server);
70
+ if (typesConfig && typeof typesConfig === "object" && typeof typesConfig.server === "string") typesPath = resolve$1(ctx.config.rootDir, typesConfig.server);
71
71
  else typesPath = join(ctx.config.typesDir, "nitro-graphql-server.d.ts");
72
72
  mkdirSync_(dirname(typesPath));
73
73
  writeFileSync_(typesPath, result.types);
@@ -104,7 +104,7 @@ async function generateClient(ctx, options = {}) {
104
104
  }
105
105
  const typesConfig = ctx.config.types;
106
106
  let typesPath;
107
- if (typesConfig && typeof typesConfig === "object" && typeof typesConfig.client === "string") typesPath = resolve(ctx.config.rootDir, typesConfig.client);
107
+ if (typesConfig && typeof typesConfig === "object" && typeof typesConfig.client === "string") typesPath = resolve$1(ctx.config.rootDir, typesConfig.client);
108
108
  else typesPath = join(ctx.config.typesDir, "nitro-graphql-client.d.ts");
109
109
  mkdirSync_(dirname(typesPath));
110
110
  writeFileSync_(typesPath, result.types);
@@ -163,8 +163,8 @@ async function watchAndRegenerate(ctx, options = {}) {
163
163
  ],
164
164
  persistent: true
165
165
  });
166
- await new Promise((resolve$1) => {
167
- watcher.on("ready", resolve$1);
166
+ await new Promise((resolve) => {
167
+ watcher.on("ready", resolve);
168
168
  watcher.on("error", (error) => logger.error("Watcher error:", error));
169
169
  });
170
170
  const relPath = (p) => relative(ctx.config.rootDir, p) || ".";
@@ -1,7 +1,6 @@
1
1
  import { CLIContext } from "../index.mjs";
2
2
 
3
3
  //#region src/cli/commands/init.d.ts
4
-
5
4
  /**
6
5
  * Available templates from the examples directory
7
6
  */
@@ -1,7 +1,6 @@
1
1
  import { CLIContext } from "../index.mjs";
2
2
 
3
3
  //#region src/cli/commands/validate.d.ts
4
-
5
4
  /**
6
5
  * Validate GraphQL schemas
7
6
  */
@@ -1,7 +1,6 @@
1
1
  import { ArgsDef, CommandDef } from "citty";
2
2
 
3
3
  //#region src/cli/completions.d.ts
4
-
5
4
  declare function initCompletions<T extends ArgsDef = ArgsDef>(command: CommandDef<T>): Promise<void>;
6
5
  //#endregion
7
6
  export { initCompletions };
@@ -1,7 +1,6 @@
1
1
  import { NitroGraphQLOptions } from "../nitro/types.mjs";
2
2
 
3
3
  //#region src/cli/config.d.ts
4
-
5
4
  /**
6
5
  * CLI configuration options
7
6
  * Now unified with NitroGraphQLOptions - all options available in both CLI and module context
@@ -1,9 +1,7 @@
1
- #!/usr/bin/env node
2
1
  import { NitroGraphQLOptions } from "../nitro/types.mjs";
3
2
  import { CLIConfig, defineConfig } from "./config.mjs";
4
3
 
5
4
  //#region src/cli/index.d.ts
6
-
7
5
  /**
8
6
  * CLI context with resolved configuration
9
7
  * Uses NitroGraphQLOptions directly as CLI and module options are now unified
@@ -1,7 +1,6 @@
1
1
  import { CLIContext } from "../index.mjs";
2
2
 
3
3
  //#region src/cli/server/debug-handler.d.ts
4
-
5
4
  /**
6
5
  * Create a debug handler for the CLI dev server
7
6
  */
@@ -2,7 +2,6 @@ import { CLIContext } from "../index.mjs";
2
2
  import { serve } from "srvx";
3
3
 
4
4
  //#region src/cli/server/dev-server.d.ts
5
-
6
5
  interface DevServerOptions {
7
6
  /** Server port (default: 4000) */
8
7
  port?: number;
@@ -1,10 +1,10 @@
1
- import { plugin } from "../../node_modules/.pnpm/crossws@0.4.1_srvx@0.10.0/node_modules/crossws/dist/server/node.mjs";
2
1
  import { createDebugHandler } from "./debug-handler.mjs";
3
2
  import { createGraphQLHandler, getServerInstance, reloadGraphQLHandler } from "./graphql-handler.mjs";
4
3
  import { createHealthHandler } from "./health-handler.mjs";
5
4
  import { createSandboxHandler } from "./sandbox-handler.mjs";
6
5
  import { createWebSocketPlugin } from "./ws-handler.mjs";
7
6
  import consola from "consola";
7
+ import { plugin } from "crossws/server";
8
8
  import { serve } from "srvx";
9
9
 
10
10
  //#region src/cli/server/dev-server.ts
@@ -2,7 +2,6 @@ import { CLIContext } from "../index.mjs";
2
2
  import { CoreServerInstance } from "../../core/server/types.mjs";
3
3
 
4
4
  //#region src/cli/server/graphql-handler.d.ts
5
-
6
5
  /**
7
6
  * Create the GraphQL request handler
8
7
  *
@@ -2,7 +2,6 @@ import { CLIContext } from "../index.mjs";
2
2
  import { DirectiveWrapper, ResolverDefinition, SchemaDefinition } from "../../core/schema/builder.mjs";
3
3
 
4
4
  //#region src/cli/server/loader.d.ts
5
-
6
5
  /**
7
6
  * Clear extend cache (for hot reload)
8
7
  */
@@ -1,7 +1,6 @@
1
1
  import { CLIContext } from "../index.mjs";
2
2
 
3
3
  //#region src/cli/server/watcher.d.ts
4
-
5
4
  interface WatcherInstance {
6
5
  /** Close the watcher */
7
6
  close: () => Promise<void>;
@@ -2,7 +2,6 @@ import { GraphQLSchema } from "graphql";
2
2
  import { Hooks } from "crossws";
3
3
 
4
4
  //#region src/cli/server/ws-handler.d.ts
5
-
6
5
  /**
7
6
  * Create WebSocket hooks for GraphQL subscriptions
8
7
  *
@@ -5,7 +5,6 @@ import { Source } from "@graphql-tools/utils";
5
5
  import { GraphQLSchema } from "graphql";
6
6
 
7
7
  //#region src/core/codegen/client.d.ts
8
-
9
8
  /**
10
9
  * Default client codegen configuration
11
10
  */
@@ -124,10 +124,10 @@ async function generateClientTypesCore(input) {
124
124
  });
125
125
  return {
126
126
  types: output,
127
- sdk: (await Promise.all(sdkOutput.map(async (config$1) => {
127
+ sdk: (await Promise.all(sdkOutput.map(async (config) => {
128
128
  return {
129
- file: config$1.filename,
130
- content: await codegen(config$1)
129
+ file: config.filename,
130
+ content: await codegen(config)
131
131
  };
132
132
  })))[0]?.content || ""
133
133
  };
@@ -1,7 +1,6 @@
1
1
  import { Source } from "@graphql-tools/utils";
2
2
 
3
3
  //#region src/core/codegen/document-loader.d.ts
4
-
5
4
  /**
6
5
  * Load GraphQL documents from files
7
6
  */
@@ -2,7 +2,6 @@ import { Source } from "@graphql-tools/utils";
2
2
  import { GraphQLSchema } from "graphql";
3
3
 
4
4
  //#region src/core/codegen/plugin.d.ts
5
-
6
5
  /**
7
6
  * Plugin to add prepend comments to generated files
8
7
  * Used by both server and client codegen
@@ -2,7 +2,6 @@ import { ScannedResolver } from "../types/scanning.mjs";
2
2
  import "../types/index.mjs";
3
3
 
4
4
  //#region src/core/codegen/runtime.d.ts
5
-
6
5
  /**
7
6
  * Generate resolver module code
8
7
  * Outputs Nitro-compatible format with { resolver: ... } wrapper
@@ -3,7 +3,6 @@ import { GraphQLSchema } from "graphql";
3
3
  import { LoadSchemaOptions, UnnormalizedTypeDefPointer } from "@graphql-tools/load";
4
4
 
5
5
  //#region src/core/codegen/schema-loader.d.ts
6
-
7
6
  /**
8
7
  * Type definition pointer for GraphQL schemas
9
8
  */
@@ -2,7 +2,6 @@ import { ServerCodegenConfig, ServerCodegenInput, ServerCodegenResult } from "..
2
2
  import { GraphQLSchema } from "graphql";
3
3
 
4
4
  //#region src/core/codegen/server.d.ts
5
-
6
5
  /**
7
6
  * Default server codegen configuration
8
7
  */
@@ -2,7 +2,6 @@ import { CoreConfig, CoreContext, CoreGraphQLOptions, CoreLogger } from "./types
2
2
  import { ScanContext } from "./types/scanning.mjs";
3
3
 
4
4
  //#region src/core/config.d.ts
5
-
6
5
  /**
7
6
  * Options for creating a CoreConfig
8
7
  */
@@ -1,7 +1,6 @@
1
1
  import { ScannedResolver } from "../types/scanning.mjs";
2
2
 
3
3
  //#region src/core/extend/loader.d.ts
4
-
5
4
  /**
6
5
  * Local directory extend source configuration
7
6
  */
@@ -1,7 +1,6 @@
1
1
  import { ResolverImport, ScanContext, ScanResult, ScannedResolver } from "../types/scanning.mjs";
2
2
 
3
3
  //#region src/core/scanning/ast-scanner.d.ts
4
-
5
4
  /**
6
5
  * Configuration for AST-based scanning
7
6
  */
@@ -1,7 +1,6 @@
1
1
  import { ScanContext, ScannedFile } from "../types/scanning.mjs";
2
2
 
3
3
  //#region src/core/scanning/common.d.ts
4
-
5
4
  /**
6
5
  * Scan a directory for files matching a glob pattern
7
6
  */
@@ -1,7 +1,6 @@
1
1
  import { ResolverImport, ScanContext, ScanResult, ScannedResolver } from "../types/scanning.mjs";
2
2
 
3
3
  //#region src/core/scanning/directives.d.ts
4
-
5
4
  /**
6
5
  * Parse a defineDirective call and return the import info
7
6
  */
@@ -2,7 +2,6 @@ import { CoreExternalService } from "../types/config.mjs";
2
2
  import { ScanContext, ScanResult } from "../types/scanning.mjs";
3
3
 
4
4
  //#region src/core/scanning/documents.d.ts
5
-
6
5
  /**
7
6
  * Options for scanning documents
8
7
  */
@@ -17,7 +17,7 @@ async function scanDocumentsCore(ctx, options = {}) {
17
17
  return {
18
18
  items: allFiles.filter((f) => !f.path.startsWith("external/")).filter((f) => {
19
19
  const relativePath = f.path;
20
- for (const pattern of externalPatterns) if (pattern.replace(/* @__PURE__ */ new RegExp(`^${clientDirRelative.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}/`), "").split("/")[0] === relativePath.split("/")[0]) return false;
20
+ for (const pattern of externalPatterns) if (pattern.replace(new RegExp(`^${clientDirRelative.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}/`), "").split("/")[0] === relativePath.split("/")[0]) return false;
21
21
  return true;
22
22
  }).map((f) => f.fullPath),
23
23
  warnings,
@@ -1,7 +1,6 @@
1
1
  import { ResolverImport, ScanContext, ScanResult, ScannedResolver } from "../types/scanning.mjs";
2
2
 
3
3
  //#region src/core/scanning/resolvers.d.ts
4
-
5
4
  /**
6
5
  * Parse a define* function call and return the import info
7
6
  * Exported for use by manifest loader
@@ -1,7 +1,6 @@
1
1
  import { ScanContext, ScanResult } from "../types/scanning.mjs";
2
2
 
3
3
  //#region src/core/scanning/schemas.d.ts
4
-
5
4
  /**
6
5
  * Scan for GraphQL schema files (.graphql, .gql) in server directory
7
6
  */
@@ -2,7 +2,6 @@ import { DirectiveDefinition } from "../types/define.mjs";
2
2
  import { GraphQLSchema, parse, subscribe, validate } from "graphql";
3
3
 
4
4
  //#region src/core/schema/builder.d.ts
5
-
6
5
  /**
7
6
  * Schema definition from virtual module
8
7
  */
@@ -13,7 +13,7 @@ import { makeExecutableSchema } from "@graphql-tools/schema";
13
13
  async function createMergedSchema(options) {
14
14
  const { schemas, resolvers, directives, moduleConfig } = options;
15
15
  try {
16
- const typeDefs = mergeTypeDefs([schemas.map((schema$1) => schema$1.def).join("\n\n")], {
16
+ const typeDefs = mergeTypeDefs([schemas.map((schema) => schema.def).join("\n\n")], {
17
17
  throwOnConflict: true,
18
18
  commentDescriptions: true,
19
19
  sort: true
@@ -1,7 +1,6 @@
1
1
  import { DocumentNode, GraphQLSchema } from "graphql";
2
2
 
3
3
  //#region src/core/schema/federation.d.ts
4
-
5
4
  /**
6
5
  * Module type for buildSubgraphSchema
7
6
  */
@@ -2,7 +2,6 @@ import { DirectiveWrapper, ModuleConfig, ResolverDefinition, SchemaDefinition }
2
2
  import { GraphQLSchema } from "graphql";
3
3
 
4
4
  //#region src/core/server/types.d.ts
5
-
6
5
  /**
7
6
  * Security configuration for GraphQL server
8
7
  */
@@ -2,7 +2,6 @@ import { SchemaDefinition } from "../schema/builder.mjs";
2
2
  import { CoreServerInstance, CoreServerOptions } from "./types.mjs";
3
3
 
4
4
  //#region src/core/server/yoga.d.ts
5
-
6
5
  /**
7
6
  * Base schema definition for Yoga server
8
7
  * Uses shared BASE_SCHEMA string from builder
@@ -3,7 +3,6 @@ import { ScanContext, ScanResult, ScannedResolver } from "./scanning.mjs";
3
3
  import "./index.mjs";
4
4
 
5
5
  //#region src/core/types/adapter.d.ts
6
-
7
6
  /**
8
7
  * Framework adapter interface
9
8
  * Adapters convert framework-specific types to core types
@@ -2,7 +2,6 @@ import { Source } from "@graphql-tools/utils";
2
2
  import { GraphQLSchema } from "graphql";
3
3
 
4
4
  //#region src/core/types/codegen.d.ts
5
-
6
5
  /**
7
6
  * Scalar type mapping (can be string or input/output object)
8
7
  */
@@ -1,7 +1,6 @@
1
1
  import { GraphQLFramework } from "../constants.mjs";
2
2
 
3
3
  //#region src/core/types/config.d.ts
4
-
5
4
  /**
6
5
  * Core logger interface
7
6
  * Abstracts logging functionality for framework independence
@@ -1,7 +1,6 @@
1
1
  import { GraphQLSchema } from "graphql";
2
2
 
3
3
  //#region src/core/types/define.d.ts
4
-
5
4
  type Flatten<T> = T extends infer U ? { [K in keyof U]: U[K] } : never;
6
5
  type DirectiveLocationName = 'QUERY' | 'MUTATION' | 'SUBSCRIPTION' | 'FIELD' | 'FRAGMENT_DEFINITION' | 'FRAGMENT_SPREAD' | 'INLINE_FRAGMENT' | 'VARIABLE_DEFINITION' | 'SCHEMA' | 'SCALAR' | 'OBJECT' | 'FIELD_DEFINITION' | 'ARGUMENT_DEFINITION' | 'INTERFACE' | 'UNION' | 'ENUM' | 'ENUM_VALUE' | 'INPUT_OBJECT' | 'INPUT_FIELD_DEFINITION';
7
6
  type GraphQLScalarType = 'String' | 'Int' | 'Float' | 'Boolean' | 'ID' | 'JSON' | 'DateTime';
@@ -1,7 +1,6 @@
1
1
  import { CoreLogger } from "./config.mjs";
2
2
 
3
3
  //#region src/core/types/scanning.d.ts
4
-
5
4
  /**
6
5
  * Scan context for file scanning operations
7
6
  * Provides all necessary information for scanning without framework dependencies
@@ -1,7 +1,6 @@
1
1
  import { CoreLogger } from "../types/config.mjs";
2
2
 
3
3
  //#region src/core/utils/logger.d.ts
4
-
5
4
  /**
6
5
  * Create a logger instance with the nitro-graphql tag
7
6
  */
@@ -1,7 +1,6 @@
1
1
  import { basename, dirname, join, resolve } from "pathe";
2
2
 
3
3
  //#region src/core/utils/runtime.d.ts
4
-
5
4
  /**
6
5
  * Cross-runtime compatibility layer
7
6
  *
@@ -1,7 +1,6 @@
1
1
  import { FSWatcher } from "chokidar";
2
2
 
3
3
  //#region src/core/watcher/index.d.ts
4
-
5
4
  /**
6
5
  * Configuration for core watcher
7
6
  */
package/dist/define.d.mts CHANGED
@@ -3,7 +3,6 @@ import { PubSubEngine, TypedPubSub, createPubSub, mapAsyncIterator, withFilter }
3
3
  import { NPMConfig, Resolvers, ResolversTypes } from "#graphql/server";
4
4
 
5
5
  //#region src/define.d.ts
6
-
7
6
  /**
8
7
  * Define schema extensions programmatically for GraphQL types.
9
8
  *
@@ -5,7 +5,6 @@ import { FrameworkAdapter, ScanAdapter } from "../core/types/adapter.mjs";
5
5
  import { Nitro } from "nitro/types";
6
6
 
7
7
  //#region src/nitro/adapter.d.ts
8
-
9
8
  /**
10
9
  * Create a CoreLogger from Nitro's logger
11
10
  */
@@ -1,7 +1,6 @@
1
1
  import { Nitro } from "nitro/types";
2
2
 
3
3
  //#region src/nitro/codegen.d.ts
4
-
5
4
  /**
6
5
  * Generate server-side resolver types
7
6
  */
@@ -1,7 +1,6 @@
1
1
  import { NitroGraphQLOptions } from "./types.mjs";
2
2
 
3
3
  //#region src/nitro/config.d.ts
4
-
5
4
  /**
6
5
  * Default type generation configuration
7
6
  */
@@ -6,7 +6,6 @@ import { NitroModule } from "nitro/types";
6
6
  import { Plugin } from "vite";
7
7
 
8
8
  //#region src/nitro/index.d.ts
9
-
10
9
  /**
11
10
  * Vite plugin to load GraphQL files as strings AND auto-register Nitro module
12
11
  * This prevents Vite from trying to parse .graphql/.gql files as JavaScript
@@ -2,7 +2,6 @@ import { FileGenerationConfig, SdkConfig, TypesConfig } from "./types.mjs";
2
2
  import { Nitro } from "nitro/types";
3
3
 
4
4
  //#region src/nitro/paths.d.ts
5
-
6
5
  /**
7
6
  * Placeholder values for path resolution
8
7
  */
@@ -6,11 +6,11 @@ import { parse } from "graphql";
6
6
  //#region src/nitro/rollup.ts
7
7
  async function rollupConfig(nitro) {
8
8
  registerAllVirtualModules(nitro);
9
- nitro.hooks.hook("rollup:before", (_, rollupConfig$1) => {
10
- rollupConfig$1.plugins = rollupConfig$1.plugins || [];
9
+ nitro.hooks.hook("rollup:before", (_, rollupConfig) => {
10
+ rollupConfig.plugins = rollupConfig.plugins || [];
11
11
  const { include = /\.(?:graphql|gql)$/i, exclude, validate = false } = nitro.options.graphql?.loader || {};
12
- if (Array.isArray(rollupConfig$1.plugins)) {
13
- rollupConfig$1.plugins.push({
12
+ if (Array.isArray(rollupConfig.plugins)) {
13
+ rollupConfig.plugins.push({
14
14
  name: "nitro-graphql",
15
15
  resolveId: {
16
16
  order: "pre",
@@ -35,7 +35,7 @@ async function rollupConfig(nitro) {
35
35
  }
36
36
  }
37
37
  });
38
- if (nitro.options.dev) rollupConfig$1.plugins.push({
38
+ if (nitro.options.dev) rollupConfig.plugins.push({
39
39
  name: "nitro-graphql-watcher",
40
40
  buildStart: {
41
41
  order: "pre",
@@ -1,7 +1,6 @@
1
1
  import * as nitro_h31 from "nitro/h3";
2
2
 
3
3
  //#region src/nitro/routes/apollo-server-ws.d.ts
4
-
5
4
  /**
6
5
  * Apollo Server WebSocket handler for subscriptions
7
6
  * Uses graphql-ws library with crossws adapter for proper protocol handling
@@ -1,6 +1,6 @@
1
- import * as nitro_h39 from "nitro/h3";
1
+ import * as nitro_h33 from "nitro/h3";
2
2
 
3
3
  //#region src/nitro/routes/apollo-server.d.ts
4
- declare const _default: nitro_h39.EventHandlerWithFetch<nitro_h39.EventHandlerRequest, Promise<any>>;
4
+ declare const _default: nitro_h33.EventHandlerWithFetch<nitro_h33.EventHandlerRequest, Promise<any>>;
5
5
  //#endregion
6
6
  export { _default as default };