nitro-graphql 2.0.0-beta.7 → 2.0.0-beta.72

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 (242) hide show
  1. package/README.md +31 -1196
  2. package/dist/cli/adapter.d.mts +13 -0
  3. package/dist/cli/adapter.mjs +67 -0
  4. package/dist/cli/commands/build.d.mts +21 -0
  5. package/dist/cli/commands/build.mjs +50 -0
  6. package/dist/cli/commands/dev.d.mts +40 -0
  7. package/dist/cli/commands/dev.mjs +74 -0
  8. package/dist/cli/commands/generate.d.mts +25 -0
  9. package/dist/cli/commands/generate.mjs +198 -0
  10. package/dist/cli/commands/index.d.mts +5 -0
  11. package/dist/cli/commands/index.mjs +5 -0
  12. package/dist/cli/commands/init.d.mts +45 -0
  13. package/dist/cli/commands/init.mjs +195 -0
  14. package/dist/cli/commands/validate.d.mts +9 -0
  15. package/dist/cli/commands/validate.mjs +65 -0
  16. package/dist/cli/completions.d.mts +6 -0
  17. package/dist/cli/completions.mjs +32 -0
  18. package/dist/cli/config.d.mts +18 -0
  19. package/dist/cli/config.mjs +19 -0
  20. package/dist/cli/index.d.mts +26 -0
  21. package/dist/cli/index.mjs +315 -0
  22. package/dist/cli/server/debug-handler.d.mts +9 -0
  23. package/dist/cli/server/debug-handler.mjs +68 -0
  24. package/dist/cli/server/dev-server.d.mts +29 -0
  25. package/dist/cli/server/dev-server.mjs +62 -0
  26. package/dist/cli/server/graphql-handler.d.mts +21 -0
  27. package/dist/cli/server/graphql-handler.mjs +43 -0
  28. package/dist/cli/server/health-handler.d.mts +12 -0
  29. package/dist/cli/server/health-handler.mjs +29 -0
  30. package/dist/cli/server/loader.d.mts +33 -0
  31. package/dist/cli/server/loader.mjs +144 -0
  32. package/dist/cli/server/sandbox-handler.d.mts +12 -0
  33. package/dist/cli/server/sandbox-handler.mjs +17 -0
  34. package/dist/cli/server/watcher.d.mts +20 -0
  35. package/dist/cli/server/watcher.mjs +64 -0
  36. package/dist/cli/server/ws-handler.d.mts +28 -0
  37. package/dist/cli/server/ws-handler.mjs +48 -0
  38. package/dist/config.d.mts +2 -0
  39. package/dist/config.mjs +2 -0
  40. package/dist/core/codegen/client.d.mts +42 -0
  41. package/dist/core/codegen/client.mjs +551 -0
  42. package/dist/core/codegen/document-loader.d.mts +9 -0
  43. package/dist/core/codegen/document-loader.mjs +16 -0
  44. package/dist/core/codegen/index.d.mts +8 -0
  45. package/dist/core/codegen/index.mjs +8 -0
  46. package/dist/core/codegen/plugin.d.mts +19 -0
  47. package/dist/core/codegen/plugin.mjs +29 -0
  48. package/dist/core/codegen/runtime.d.mts +17 -0
  49. package/dist/core/codegen/runtime.mjs +61 -0
  50. package/dist/core/codegen/schema-loader.d.mts +27 -0
  51. package/dist/core/codegen/schema-loader.mjs +126 -0
  52. package/dist/core/codegen/server.d.mts +27 -0
  53. package/dist/core/codegen/server.mjs +142 -0
  54. package/dist/core/codegen/validation.d.mts +17 -0
  55. package/dist/core/codegen/validation.mjs +33 -0
  56. package/dist/core/config.d.mts +45 -0
  57. package/dist/core/config.mjs +76 -0
  58. package/dist/core/constants.d.mts +188 -0
  59. package/dist/core/constants.mjs +208 -0
  60. package/dist/core/debug/index.d.mts +2 -0
  61. package/dist/core/debug/index.mjs +2 -0
  62. package/dist/core/debug/template.d.mts +52 -0
  63. package/dist/core/debug/template.mjs +384 -0
  64. package/dist/core/extend/index.d.mts +2 -0
  65. package/dist/core/extend/index.mjs +2 -0
  66. package/dist/core/extend/loader.d.mts +40 -0
  67. package/dist/core/extend/loader.mjs +196 -0
  68. package/dist/core/index.d.mts +33 -0
  69. package/dist/core/index.mjs +28 -0
  70. package/dist/core/manifest.d.mts +56 -0
  71. package/dist/core/manifest.mjs +100 -0
  72. package/dist/core/pubsub/index.d.mts +109 -0
  73. package/dist/core/pubsub/index.mjs +146 -0
  74. package/dist/core/scanning/ast-scanner.d.mts +27 -0
  75. package/dist/core/scanning/ast-scanner.mjs +114 -0
  76. package/dist/core/scanning/common.d.mts +25 -0
  77. package/dist/core/scanning/common.mjs +57 -0
  78. package/dist/core/scanning/directives.d.mts +13 -0
  79. package/dist/core/scanning/directives.mjs +28 -0
  80. package/dist/core/scanning/documents.d.mts +20 -0
  81. package/dist/core/scanning/documents.mjs +36 -0
  82. package/dist/core/scanning/index.d.mts +7 -0
  83. package/dist/core/scanning/index.mjs +7 -0
  84. package/dist/core/scanning/resolvers.d.mts +14 -0
  85. package/dist/core/scanning/resolvers.mjs +58 -0
  86. package/dist/core/scanning/schemas.d.mts +13 -0
  87. package/dist/core/scanning/schemas.mjs +50 -0
  88. package/dist/core/schema/builder.d.mts +59 -0
  89. package/dist/core/schema/builder.mjs +76 -0
  90. package/dist/core/schema/federation.d.mts +33 -0
  91. package/dist/core/schema/federation.mjs +38 -0
  92. package/dist/core/schema/index.d.mts +3 -0
  93. package/dist/core/schema/index.mjs +3 -0
  94. package/dist/core/server/index.d.mts +4 -0
  95. package/dist/core/server/index.mjs +3 -0
  96. package/dist/core/server/sandbox.d.mts +18 -0
  97. package/dist/core/server/sandbox.mjs +38 -0
  98. package/dist/core/server/types.d.mts +54 -0
  99. package/dist/core/server/types.mjs +1 -0
  100. package/dist/core/server/yoga.d.mts +42 -0
  101. package/dist/core/server/yoga.mjs +87 -0
  102. package/dist/core/types/adapter.d.mts +55 -0
  103. package/dist/core/types/adapter.mjs +1 -0
  104. package/dist/core/types/codegen.d.mts +136 -0
  105. package/dist/core/types/codegen.mjs +1 -0
  106. package/dist/core/types/config.d.mts +188 -0
  107. package/dist/core/types/config.mjs +1 -0
  108. package/dist/{utils/define.d.ts → core/types/define.d.mts} +2 -30
  109. package/dist/core/types/define.mjs +1 -0
  110. package/dist/core/types/index.d.mts +5 -0
  111. package/dist/core/types/index.mjs +1 -0
  112. package/dist/core/types/scanning.d.mts +64 -0
  113. package/dist/core/types/scanning.mjs +1 -0
  114. package/dist/{utils/directive-parser.d.ts → core/utils/directive-parser.d.mts} +18 -4
  115. package/dist/{utils/directive-parser.js → core/utils/directive-parser.mjs} +29 -36
  116. package/dist/core/utils/errors.d.mts +77 -0
  117. package/dist/core/utils/errors.mjs +91 -0
  118. package/dist/core/utils/file-io.d.mts +24 -0
  119. package/dist/core/utils/file-io.mjs +45 -0
  120. package/dist/core/utils/imports.d.mts +15 -0
  121. package/dist/core/utils/imports.mjs +24 -0
  122. package/dist/core/utils/index.d.mts +7 -0
  123. package/dist/core/utils/index.mjs +7 -0
  124. package/dist/core/utils/logger.d.mts +18 -0
  125. package/dist/core/utils/logger.mjs +36 -0
  126. package/dist/core/utils/ofetch-templates.d.mts +30 -0
  127. package/dist/core/utils/ofetch-templates.mjs +134 -0
  128. package/dist/core/utils/runtime.d.mts +74 -0
  129. package/dist/core/utils/runtime.mjs +109 -0
  130. package/dist/core/utils/subscribe-templates.d.mts +8 -0
  131. package/dist/core/utils/subscribe-templates.mjs +58 -0
  132. package/dist/core/validation/external-services.d.mts +11 -0
  133. package/dist/core/validation/external-services.mjs +33 -0
  134. package/dist/core/validation/index.d.mts +2 -0
  135. package/dist/core/validation/index.mjs +2 -0
  136. package/dist/core/watcher/index.d.mts +107 -0
  137. package/dist/core/watcher/index.mjs +140 -0
  138. package/dist/define.d.mts +294 -0
  139. package/dist/define.mjs +323 -0
  140. package/dist/index.d.mts +6 -0
  141. package/dist/index.mjs +5 -0
  142. package/dist/nitro/adapter.d.mts +28 -0
  143. package/dist/nitro/adapter.mjs +90 -0
  144. package/dist/{utils/apollo.d.ts → nitro/apollo.d.mts} +3 -3
  145. package/dist/nitro/apollo.mjs +57 -0
  146. package/dist/nitro/codegen.d.mts +18 -0
  147. package/dist/nitro/codegen.mjs +171 -0
  148. package/dist/nitro/config.d.mts +50 -0
  149. package/dist/nitro/config.mjs +55 -0
  150. package/dist/nitro/index.d.mts +45 -0
  151. package/dist/nitro/index.mjs +63 -0
  152. package/dist/{utils/path-resolver.d.ts → nitro/paths.d.mts} +8 -25
  153. package/dist/nitro/paths.mjs +97 -0
  154. package/dist/nitro/rollup.d.mts +6 -0
  155. package/dist/nitro/rollup.mjs +52 -0
  156. package/dist/nitro/routes/apollo-sandbox-script.d.mts +6 -0
  157. package/dist/nitro/routes/apollo-sandbox-script.mjs +12 -0
  158. package/dist/nitro/routes/apollo-server-ws.d.mts +15 -0
  159. package/dist/nitro/routes/apollo-server-ws.mjs +50 -0
  160. package/dist/nitro/routes/apollo-server.d.mts +6 -0
  161. package/dist/nitro/routes/apollo-server.mjs +69 -0
  162. package/dist/{routes/debug.d.ts → nitro/routes/debug.d.mts} +12 -19
  163. package/dist/nitro/routes/debug.mjs +98 -0
  164. package/dist/nitro/routes/graphql-yoga-ws.d.mts +12 -0
  165. package/dist/nitro/routes/graphql-yoga-ws.mjs +50 -0
  166. package/dist/nitro/routes/graphql-yoga.d.mts +12 -0
  167. package/dist/nitro/routes/graphql-yoga.mjs +39 -0
  168. package/dist/nitro/routes/health.d.mts +10 -0
  169. package/dist/{routes/health.js → nitro/routes/health.mjs} +5 -6
  170. package/dist/nitro/setup/extend-loader.d.mts +16 -0
  171. package/dist/nitro/setup/extend-loader.mjs +80 -0
  172. package/dist/nitro/setup/file-watcher.d.mts +18 -0
  173. package/dist/nitro/setup/file-watcher.mjs +62 -0
  174. package/dist/nitro/setup/logging.d.mts +16 -0
  175. package/dist/nitro/setup/logging.mjs +64 -0
  176. package/dist/nitro/setup/rollup-integration.d.mts +24 -0
  177. package/dist/nitro/setup/rollup-integration.mjs +64 -0
  178. package/dist/nitro/setup/routes.d.mts +13 -0
  179. package/dist/nitro/setup/routes.mjs +69 -0
  180. package/dist/nitro/setup/scanner.d.mts +59 -0
  181. package/dist/nitro/setup/scanner.mjs +118 -0
  182. package/dist/nitro/setup/ts-config.d.mts +10 -0
  183. package/dist/nitro/setup/ts-config.mjs +67 -0
  184. package/dist/nitro/setup.d.mts +11 -0
  185. package/dist/nitro/setup.mjs +189 -0
  186. package/dist/nitro/types.d.mts +549 -0
  187. package/dist/nitro/types.mjs +1 -0
  188. package/dist/nitro/virtual/generators.d.mts +38 -0
  189. package/dist/nitro/virtual/generators.mjs +190 -0
  190. package/dist/nitro/virtual/stubs.d.mts +21 -0
  191. package/dist/nitro/virtual/stubs.mjs +31 -0
  192. package/dist/{ecosystem/nuxt.d.ts → nuxt.d.mts} +1 -1
  193. package/dist/nuxt.mjs +111 -0
  194. package/dist/{graphql/server.d.ts → stubs/index.d.mts} +5 -1
  195. package/dist/stubs/index.mjs +1 -0
  196. package/dist/subscribe/index.d.mts +78 -0
  197. package/dist/subscribe/index.mjs +205 -0
  198. package/native/index.d.ts +20 -0
  199. package/native/index.js +585 -0
  200. package/package.json +202 -112
  201. package/dist/ecosystem/nuxt.js +0 -67
  202. package/dist/graphql/index.d.ts +0 -5
  203. package/dist/graphql/index.js +0 -1
  204. package/dist/graphql/server.js +0 -1
  205. package/dist/index.d.ts +0 -8
  206. package/dist/index.js +0 -318
  207. package/dist/rollup.js +0 -277
  208. package/dist/routes/apollo-server.d.ts +0 -6
  209. package/dist/routes/apollo-server.js +0 -89
  210. package/dist/routes/debug.js +0 -449
  211. package/dist/routes/graphql-yoga.d.ts +0 -6
  212. package/dist/routes/graphql-yoga.js +0 -91
  213. package/dist/routes/health.d.ts +0 -10
  214. package/dist/types/index.d.ts +0 -246
  215. package/dist/types/standard-schema.d.ts +0 -59
  216. package/dist/utils/apollo.js +0 -61
  217. package/dist/utils/client-codegen.d.ts +0 -38
  218. package/dist/utils/client-codegen.js +0 -290
  219. package/dist/utils/define.js +0 -57
  220. package/dist/utils/file-generator.d.ts +0 -37
  221. package/dist/utils/file-generator.js +0 -72
  222. package/dist/utils/index.d.ts +0 -39
  223. package/dist/utils/index.js +0 -278
  224. package/dist/utils/path-resolver.js +0 -127
  225. package/dist/utils/server-codegen.d.ts +0 -7
  226. package/dist/utils/server-codegen.js +0 -136
  227. package/dist/utils/type-generation.d.ts +0 -7
  228. package/dist/utils/type-generation.js +0 -360
  229. package/dist/virtual/debug-info.d.ts +0 -9
  230. package/dist/virtual/debug-info.js +0 -26
  231. package/dist/virtual/graphql-config.d.ts +0 -9
  232. package/dist/virtual/graphql-config.js +0 -10
  233. package/dist/virtual/module-config.d.ts +0 -9
  234. package/dist/virtual/module-config.js +0 -10
  235. package/dist/virtual/server-directives.d.ts +0 -11
  236. package/dist/virtual/server-directives.js +0 -10
  237. package/dist/virtual/server-resolvers.d.ts +0 -11
  238. package/dist/virtual/server-resolvers.js +0 -10
  239. package/dist/virtual/server-schemas.d.ts +0 -11
  240. package/dist/virtual/server-schemas.js +0 -10
  241. package/dist/vite.d.ts +0 -25
  242. package/dist/vite.js +0 -40
@@ -0,0 +1,80 @@
1
+ import { LOG_TAG } from "../../core/constants.mjs";
2
+ import { generateDirectiveSchemas } from "../../core/utils/directive-parser.mjs";
3
+ import { resolveExtendDirs as resolveExtendDirs$1, scanAllExtendSources } from "../../core/extend/loader.mjs";
4
+ import consola from "consola";
5
+ //#region src/nitro/setup/extend-loader.ts
6
+ const logger = consola.withTag(LOG_TAG);
7
+ /**
8
+ * Resolve extend directories for file watching
9
+ */
10
+ async function resolveExtendDirs(nitro) {
11
+ const extend = nitro.options.graphql?.extend;
12
+ return resolveExtendDirs$1(extend, nitro.options.rootDir);
13
+ }
14
+ /**
15
+ * Resolve extend configuration and add files to Nitro scan results
16
+ */
17
+ async function resolveExtendConfig(nitro, options = {}) {
18
+ const extend = nitro.options.graphql?.extend;
19
+ if (!extend || !Array.isArray(extend) || extend.length === 0) return;
20
+ const stats = applyExtendResult(nitro, await scanAllExtendSources(extend, nitro.options.rootDir));
21
+ if (stats.directives > 0) {
22
+ const directiveSchemas = await generateDirectiveSchemas(nitro.scanDirectives, nitro.graphql.buildDir);
23
+ nitro.graphql.directiveSchemas = directiveSchemas;
24
+ }
25
+ if (!options.silent && (stats.schemas > 0 || stats.resolvers > 0 || stats.directives > 0 || stats.documents > 0)) {
26
+ const parts = [];
27
+ if (stats.schemas > 0) parts.push(`${stats.schemas} schema(s)`);
28
+ if (stats.resolvers > 0) parts.push(`${stats.resolvers} resolver(s)`);
29
+ if (stats.directives > 0) parts.push(`${stats.directives} directive(s)`);
30
+ if (stats.documents > 0) parts.push(`${stats.documents} document(s)`);
31
+ if (stats.configs > 0) parts.push(`${stats.configs} config(s)`);
32
+ if (stats.programmaticSchemas > 0) parts.push(`${stats.programmaticSchemas} programmatic schema(s)`);
33
+ logger.info(`Extended with ${parts.join(", ")}`);
34
+ }
35
+ }
36
+ /**
37
+ * Apply extend scan result to Nitro state
38
+ */
39
+ function applyExtendResult(nitro, result) {
40
+ let schemasAdded = 0;
41
+ let resolversAdded = 0;
42
+ let directivesAdded = 0;
43
+ let documentsAdded = 0;
44
+ let configsAdded = 0;
45
+ let programmaticSchemasAdded = 0;
46
+ for (const schemaPath of result.schemas) if (!nitro.scanSchemas.includes(schemaPath)) {
47
+ nitro.scanSchemas.push(schemaPath);
48
+ schemasAdded++;
49
+ }
50
+ for (const resolver of result.resolvers) if (!nitro.scanResolvers.some((r) => r.specifier === resolver.specifier)) {
51
+ nitro.scanResolvers.push(resolver);
52
+ resolversAdded++;
53
+ }
54
+ for (const directive of result.directives) if (!nitro.scanDirectives.some((d) => d.specifier === directive.specifier)) {
55
+ nitro.scanDirectives.push(directive);
56
+ directivesAdded++;
57
+ }
58
+ for (const docPath of result.documents) if (!nitro.scanDocuments.includes(docPath)) {
59
+ nitro.scanDocuments.push(docPath);
60
+ documentsAdded++;
61
+ }
62
+ if (result.configPath && !nitro.graphql.extendConfigs.includes(result.configPath)) {
63
+ nitro.graphql.extendConfigs.push(result.configPath);
64
+ configsAdded++;
65
+ }
66
+ if (result.schemaPath && !nitro.graphql.extendSchemas.includes(result.schemaPath)) {
67
+ nitro.graphql.extendSchemas.push(result.schemaPath);
68
+ programmaticSchemasAdded++;
69
+ }
70
+ return {
71
+ schemas: schemasAdded,
72
+ resolvers: resolversAdded,
73
+ directives: directivesAdded,
74
+ documents: documentsAdded,
75
+ configs: configsAdded,
76
+ programmaticSchemas: programmaticSchemasAdded
77
+ };
78
+ }
79
+ //#endregion
80
+ export { resolveExtendConfig, resolveExtendDirs };
@@ -0,0 +1,18 @@
1
+ import { FSWatcher } from "chokidar";
2
+ import { Nitro } from "nitro/types";
3
+
4
+ //#region src/nitro/setup/file-watcher.d.ts
5
+ /**
6
+ * Setup file watcher for GraphQL files (schemas, resolvers, directives, documents)
7
+ * Watches for changes and triggers type regeneration and dev server reload
8
+ *
9
+ * Uses core watcher module with Nitro-specific callbacks.
10
+ */
11
+ declare function setupFileWatcher(nitro: Nitro, watchDirs: string[]): FSWatcher;
12
+ /**
13
+ * Determine which directories to watch based on framework and configuration
14
+ * Note: Layer directories are now handled via extendDirs (passed from extend-loader)
15
+ */
16
+ declare function getWatchDirectories(nitro: Nitro, extendDirs?: string[]): string[];
17
+ //#endregion
18
+ export { getWatchDirectories, setupFileWatcher };
@@ -0,0 +1,62 @@
1
+ import { LOG_TAG } from "../../core/constants.mjs";
2
+ import { generateClientTypes, generateServerTypes } from "../codegen.mjs";
3
+ import { createCoreWatcher } from "../../core/watcher/index.mjs";
4
+ import { performGraphQLScan, shouldScanLocalFiles } from "./scanner.mjs";
5
+ import consola from "consola";
6
+ import { join } from "pathe";
7
+ //#region src/nitro/setup/file-watcher.ts
8
+ const TRAILING_SLASH_RE = /\/$/;
9
+ const logger = consola.withTag(LOG_TAG);
10
+ /**
11
+ * Setup file watcher for GraphQL files (schemas, resolvers, directives, documents)
12
+ * Watches for changes and triggers type regeneration and dev server reload
13
+ *
14
+ * Uses core watcher module with Nitro-specific callbacks.
15
+ */
16
+ function setupFileWatcher(nitro, watchDirs) {
17
+ return createCoreWatcher({
18
+ watchDirs,
19
+ serverDir: nitro.graphql.serverDir,
20
+ debounceMs: 150
21
+ }, {
22
+ onServerChange: async () => {
23
+ await performGraphQLScan(nitro, {
24
+ silent: true,
25
+ isRescan: true
26
+ });
27
+ await generateServerTypes(nitro, { silent: true });
28
+ await generateClientTypes(nitro, { silent: true });
29
+ logger.success("Types regenerated");
30
+ await nitro.hooks.callHook("dev:reload");
31
+ },
32
+ onClientChange: async () => {
33
+ await generateClientTypes(nitro, { silent: true });
34
+ logger.success("Client types regenerated");
35
+ },
36
+ onError: (error) => {
37
+ logger.error("Watcher error:", error);
38
+ }
39
+ });
40
+ }
41
+ /**
42
+ * Determine which directories to watch based on framework and configuration
43
+ * Note: Layer directories are now handled via extendDirs (passed from extend-loader)
44
+ */
45
+ function getWatchDirectories(nitro, extendDirs = []) {
46
+ const watchDirs = [];
47
+ const scanLocal = shouldScanLocalFiles(nitro);
48
+ watchDirs.push(nitro.graphql.clientDir);
49
+ if (scanLocal) watchDirs.push(nitro.graphql.serverDir);
50
+ for (const dir of extendDirs) if (!watchDirs.includes(dir)) watchDirs.push(dir);
51
+ if (nitro.options.graphql?.externalServices?.length) {
52
+ for (const service of nitro.options.graphql.externalServices) if (service.documents?.length) for (const pattern of service.documents) {
53
+ if (!pattern) continue;
54
+ const baseDir = pattern.split("**")[0]?.replace(TRAILING_SLASH_RE, "") || ".";
55
+ const resolvedDir = join(nitro.options.rootDir, baseDir);
56
+ if (!watchDirs.includes(resolvedDir)) watchDirs.push(resolvedDir);
57
+ }
58
+ }
59
+ return watchDirs;
60
+ }
61
+ //#endregion
62
+ export { getWatchDirectories, setupFileWatcher };
@@ -0,0 +1,16 @@
1
+ import { SecurityConfig } from "../types.mjs";
2
+ import { Nitro } from "nitro/types";
3
+
4
+ //#region src/nitro/setup/logging.d.ts
5
+ /**
6
+ * Resolves security configuration with environment-aware defaults
7
+ * In production: introspection off, playground off, errors masked, suggestions disabled
8
+ * In development: introspection on, playground on, errors shown, suggestions enabled
9
+ */
10
+ declare function resolveSecurityConfig(config?: SecurityConfig): Required<SecurityConfig>;
11
+ /**
12
+ * Log startup information
13
+ */
14
+ declare function logStartupInfo(nitro: Nitro, serverEnabled: boolean): void;
15
+ //#endregion
16
+ export { logStartupInfo, resolveSecurityConfig };
@@ -0,0 +1,64 @@
1
+ import consola from "consola";
2
+ //#region src/nitro/setup/logging.ts
3
+ /**
4
+ * Resolves security configuration with environment-aware defaults
5
+ * In production: introspection off, playground off, errors masked, suggestions disabled
6
+ * In development: introspection on, playground on, errors shown, suggestions enabled
7
+ */
8
+ function resolveSecurityConfig(config) {
9
+ const isProd = process.env.NODE_ENV === "production";
10
+ return {
11
+ introspection: config?.introspection ?? !isProd,
12
+ playground: config?.playground ?? !isProd,
13
+ maskErrors: config?.maskErrors ?? isProd,
14
+ disableSuggestions: config?.disableSuggestions ?? isProd
15
+ };
16
+ }
17
+ /**
18
+ * Log startup information
19
+ */
20
+ function logStartupInfo(nitro, serverEnabled) {
21
+ const externalServicesCount = nitro.options.graphql?.externalServices?.length || 0;
22
+ const docs = nitro.scanDocuments || [];
23
+ const isProd = process.env.NODE_ENV === "production";
24
+ if (serverEnabled) {
25
+ const securityConfig = resolveSecurityConfig(nitro.options.graphql?.security);
26
+ const framework = nitro.options.graphql?.framework || "unknown";
27
+ const schemas = nitro.scanSchemas?.length || 0;
28
+ const resolvers = nitro.scanResolvers?.length || 0;
29
+ consola.box({
30
+ title: "Nitro GraphQL",
31
+ message: [
32
+ `Framework: ${framework}`,
33
+ `Environment: ${isProd ? "production" : "development"}`,
34
+ `Schemas: ${schemas}`,
35
+ `Resolvers: ${resolvers}`,
36
+ externalServicesCount > 0 ? `External Services: ${externalServicesCount}` : "",
37
+ docs.length > 0 ? `Documents: ${docs.length}` : "",
38
+ "",
39
+ "Security:",
40
+ `├─ Introspection: ${securityConfig.introspection ? "enabled" : "disabled"}`,
41
+ `├─ Playground: ${securityConfig.playground ? "enabled" : "disabled"}`,
42
+ `├─ Error Masking: ${securityConfig.maskErrors ? "enabled" : "disabled"}`,
43
+ `└─ Field Suggestions: ${securityConfig.disableSuggestions ? "disabled" : "enabled"}`
44
+ ].filter(Boolean).join("\n"),
45
+ style: {
46
+ borderColor: isProd ? "yellow" : "cyan",
47
+ borderStyle: "rounded"
48
+ }
49
+ });
50
+ } else consola.box({
51
+ title: "Nitro GraphQL (Client Only)",
52
+ message: [
53
+ "Server mode: disabled",
54
+ `External Services: ${externalServicesCount}`,
55
+ `Documents: ${docs.length}`
56
+ ].join("\n"),
57
+ style: {
58
+ borderColor: "blue",
59
+ borderStyle: "rounded"
60
+ }
61
+ });
62
+ }
63
+ //#endregion
64
+ export { logStartupInfo, resolveSecurityConfig };
@@ -0,0 +1,24 @@
1
+ import { Nitro } from "nitro/types";
2
+
3
+ //#region src/nitro/setup/rollup-integration.d.ts
4
+ /**
5
+ * Configure noExternals to ensure nitro-graphql route handlers are bundled
6
+ * This is critical for Nuxt integration where node_modules are externalized by default.
7
+ * Without this, the #nitro-graphql/* virtual imports in handlers would fail at runtime.
8
+ */
9
+ declare function setupNoExternals(nitro: Nitro): void;
10
+ /**
11
+ * Setup Rollup/Rolldown chunking configuration for GraphQL files
12
+ * Creates separate chunks for schemas and resolvers to optimize bundle size
13
+ *
14
+ * Note: For Rolldown, we only use manualChunks (not advancedChunks) to avoid
15
+ * interfering with Nitro's node_modules chunking which uses advancedChunks.
16
+ */
17
+ declare function setupRollupChunking(nitro: Nitro): void;
18
+ /**
19
+ * Configure external dependencies for Rollup
20
+ * Marks codegen and federation packages as external
21
+ */
22
+ declare function setupRollupExternals(nitro: Nitro): void;
23
+ //#endregion
24
+ export { setupNoExternals, setupRollupChunking, setupRollupExternals };
@@ -0,0 +1,64 @@
1
+ //#region src/nitro/setup/rollup-integration.ts
2
+ const NITRO_GRAPHQL_ROUTES_RE = /nitro-graphql[/\\]dist[/\\]nitro[/\\]routes/;
3
+ const NITRO_GRAPHQL_SCHEMA_RE = /nitro-graphql[/\\]dist[/\\]core[/\\]schema/;
4
+ /**
5
+ * Configure noExternals to ensure nitro-graphql route handlers are bundled
6
+ * This is critical for Nuxt integration where node_modules are externalized by default.
7
+ * Without this, the #nitro-graphql/* virtual imports in handlers would fail at runtime.
8
+ */
9
+ function setupNoExternals(nitro) {
10
+ const routePatterns = [NITRO_GRAPHQL_ROUTES_RE, NITRO_GRAPHQL_SCHEMA_RE];
11
+ if (nitro.options.noExternals === true) return;
12
+ if (!Array.isArray(nitro.options.noExternals)) nitro.options.noExternals = [];
13
+ nitro.options.noExternals.push(...routePatterns);
14
+ }
15
+ /**
16
+ * Setup Rollup/Rolldown chunking configuration for GraphQL files
17
+ * Creates separate chunks for schemas and resolvers to optimize bundle size
18
+ *
19
+ * Note: For Rolldown, we only use manualChunks (not advancedChunks) to avoid
20
+ * interfering with Nitro's node_modules chunking which uses advancedChunks.
21
+ */
22
+ function setupRollupChunking(nitro) {
23
+ nitro.hooks.hook("rollup:before", (_, rollupConfig) => {});
24
+ }
25
+ /**
26
+ * Configure external dependencies for Rollup
27
+ * Marks codegen and federation packages as external
28
+ */
29
+ function setupRollupExternals(nitro) {
30
+ nitro.hooks.hook("rollup:before", (_, rollupConfig) => {
31
+ rollupConfig.external = rollupConfig.external || [];
32
+ const allExternals = [...[
33
+ "oxc-parser",
34
+ "@oxc-parser",
35
+ "nitro-graphql/native",
36
+ "nitro-graphql-darwin-arm64",
37
+ "nitro-graphql-darwin-x64",
38
+ "nitro-graphql-darwin-universal",
39
+ "nitro-graphql-linux-x64-gnu",
40
+ "nitro-graphql-linux-x64-musl",
41
+ "nitro-graphql-linux-arm64-gnu",
42
+ "nitro-graphql-linux-arm64-musl",
43
+ "nitro-graphql-win32-x64-msvc",
44
+ "nitro-graphql-win32-x64-gnu",
45
+ "nitro-graphql-win32-arm64-msvc",
46
+ "nitro-graphql-win32-ia32-msvc"
47
+ ]];
48
+ if (!nitro.options.graphql?.federation?.enabled) allExternals.push(...[
49
+ "@apollo/subgraph",
50
+ "@apollo/federation-internals",
51
+ "@apollo/cache-control-types"
52
+ ]);
53
+ if (Array.isArray(rollupConfig.external)) rollupConfig.external.push(...allExternals);
54
+ else if (typeof rollupConfig.external === "function") {
55
+ const originalExternal = rollupConfig.external;
56
+ rollupConfig.external = (id, parent, isResolved) => {
57
+ if (allExternals.some((external) => id.includes(external))) return true;
58
+ return originalExternal(id, parent, isResolved);
59
+ };
60
+ }
61
+ });
62
+ }
63
+ //#endregion
64
+ export { setupNoExternals, setupRollupChunking, setupRollupExternals };
@@ -0,0 +1,13 @@
1
+ import { Nitro } from "nitro/types";
2
+
3
+ //#region src/nitro/setup/routes.d.ts
4
+ /**
5
+ * Register GraphQL route handlers
6
+ *
7
+ * Uses import.meta.resolve() to convert module specifiers to absolute paths.
8
+ * This ensures handlers are resolved correctly both in local development
9
+ * (monorepo symlink) and in CI/production (installed from npm).
10
+ */
11
+ declare function registerRouteHandlers(nitro: Nitro): void;
12
+ //#endregion
13
+ export { registerRouteHandlers };
@@ -0,0 +1,69 @@
1
+ import { ENDPOINT_DEBUG, GRAPHQL_HTTP_METHODS } from "../../core/constants.mjs";
2
+ import { fileURLToPath } from "node:url";
3
+ //#region src/nitro/setup/routes.ts
4
+ /**
5
+ * Resolve a module specifier to an absolute filesystem path.
6
+ * Uses import.meta.resolve() to handle both:
7
+ * - Local development (monorepo symlinks resolve to local source)
8
+ * - CI/Production (npm install resolves to node_modules)
9
+ */
10
+ function resolveHandler(specifier) {
11
+ return fileURLToPath(import.meta.resolve(specifier));
12
+ }
13
+ /**
14
+ * Register GraphQL route handlers
15
+ *
16
+ * Uses import.meta.resolve() to convert module specifiers to absolute paths.
17
+ * This ensures handlers are resolved correctly both in local development
18
+ * (monorepo symlink) and in CI/production (installed from npm).
19
+ */
20
+ function registerRouteHandlers(nitro) {
21
+ const framework = nitro.options.graphql?.framework;
22
+ const subscriptions = nitro.options.graphql?.subscriptions;
23
+ const endpoint = nitro.options.runtimeConfig.graphql?.endpoint?.graphql || "/api/graphql";
24
+ if (framework === "graphql-yoga") {
25
+ for (const method of GRAPHQL_HTTP_METHODS) nitro.options.handlers.push({
26
+ route: endpoint,
27
+ handler: resolveHandler("nitro-graphql/nitro/routes/graphql-yoga"),
28
+ method
29
+ });
30
+ nitro.options.handlers.push({
31
+ route: `${endpoint}/sandbox.js`,
32
+ handler: resolveHandler("nitro-graphql/nitro/routes/apollo-sandbox-script"),
33
+ method: "GET"
34
+ });
35
+ if (subscriptions?.enabled && subscriptions.websocket?.enabled !== false) {
36
+ const wsPath = subscriptions.websocket?.path || `${endpoint}/ws`;
37
+ nitro.options.handlers.push({
38
+ route: wsPath,
39
+ handler: resolveHandler("nitro-graphql/nitro/routes/graphql-yoga-ws")
40
+ });
41
+ }
42
+ }
43
+ if (framework === "apollo-server") {
44
+ for (const method of GRAPHQL_HTTP_METHODS) nitro.options.handlers.push({
45
+ route: endpoint,
46
+ handler: resolveHandler("nitro-graphql/nitro/routes/apollo-server"),
47
+ method
48
+ });
49
+ if (subscriptions?.enabled && subscriptions.websocket?.enabled !== false) {
50
+ const wsPath = subscriptions.websocket?.path || `${endpoint}/ws`;
51
+ nitro.options.handlers.push({
52
+ route: wsPath,
53
+ handler: resolveHandler("nitro-graphql/nitro/routes/apollo-server-ws")
54
+ });
55
+ }
56
+ }
57
+ nitro.options.handlers.push({
58
+ route: nitro.options.runtimeConfig.graphql?.endpoint?.healthCheck || "/api/graphql/health",
59
+ handler: resolveHandler("nitro-graphql/nitro/routes/health"),
60
+ method: "GET"
61
+ });
62
+ if (nitro.options.dev) nitro.options.handlers.push({
63
+ route: ENDPOINT_DEBUG,
64
+ handler: resolveHandler("nitro-graphql/nitro/routes/debug"),
65
+ method: "GET"
66
+ });
67
+ }
68
+ //#endregion
69
+ export { registerRouteHandlers };
@@ -0,0 +1,59 @@
1
+ import { ExtendSource } from "../types.mjs";
2
+ import { Nitro } from "nitro/types";
3
+
4
+ //#region src/nitro/setup/scanner.d.ts
5
+ interface ScanOptions {
6
+ /** Silent mode - suppress logging */
7
+ silent?: boolean;
8
+ /** Is this a rescan (dev mode hot reload) */
9
+ isRescan?: boolean;
10
+ }
11
+ interface ScanResult {
12
+ schemas: number;
13
+ resolvers: number;
14
+ directives: number;
15
+ documents: number;
16
+ }
17
+ /**
18
+ * Check if local file scanning should be performed
19
+ * Centralized helper to avoid scattered skipLocalScan checks
20
+ */
21
+ declare function shouldScanLocalFiles(nitro: Nitro): boolean;
22
+ /**
23
+ * Check if server-side GraphQL is enabled
24
+ */
25
+ declare function isServerEnabled(nitro: Nitro): boolean;
26
+ /**
27
+ * Get extend sources from config
28
+ */
29
+ declare function getExtendSources(nitro: Nitro): ExtendSource[] | undefined;
30
+ /**
31
+ * Scan local GraphQL files (schemas, resolvers, directives, documents)
32
+ * This is the low-level scan function - use performGraphQLScan for full workflow
33
+ */
34
+ declare function scanLocalFiles(nitro: Nitro): Promise<ScanResult>;
35
+ /**
36
+ * Scan only client documents (for external services or client-only mode)
37
+ */
38
+ declare function scanDocumentsOnly(nitro: Nitro): Promise<number>;
39
+ /**
40
+ * Initialize empty scan results (for skipLocalScan mode)
41
+ */
42
+ declare function initializeEmptyScanResults(nitro: Nitro): void;
43
+ /**
44
+ * Perform complete GraphQL scan workflow
45
+ * This is the main entry point for both initial setup and dev mode rescan
46
+ *
47
+ * Workflow:
48
+ * 1. Check skipLocalScan flag
49
+ * 2. Scan local files if enabled
50
+ * 3. Resolve extend config (append to results)
51
+ * 4. Log diagnostics if needed
52
+ */
53
+ declare function performGraphQLScan(nitro: Nitro, options?: ScanOptions): Promise<void>;
54
+ /**
55
+ * Log resolver diagnostics for development
56
+ */
57
+ declare function logResolverDiagnostics(nitro: Nitro): void;
58
+ //#endregion
59
+ export { ScanOptions, ScanResult, getExtendSources, initializeEmptyScanResults, isServerEnabled, logResolverDiagnostics, performGraphQLScan, scanDocumentsOnly, scanLocalFiles, shouldScanLocalFiles };
@@ -0,0 +1,118 @@
1
+ import { LOG_TAG } from "../../core/constants.mjs";
2
+ import { generateDirectiveSchemas } from "../../core/utils/directive-parser.mjs";
3
+ import { NitroAdapter } from "../adapter.mjs";
4
+ import { resolveExtendConfig } from "./extend-loader.mjs";
5
+ import consola from "consola";
6
+ //#region src/nitro/setup/scanner.ts
7
+ const logger = consola.withTag(LOG_TAG);
8
+ /**
9
+ * Check if local file scanning should be performed
10
+ * Centralized helper to avoid scattered skipLocalScan checks
11
+ */
12
+ function shouldScanLocalFiles(nitro) {
13
+ return nitro.options.graphql?.skipLocalScan !== true;
14
+ }
15
+ /**
16
+ * Check if server-side GraphQL is enabled
17
+ */
18
+ function isServerEnabled(nitro) {
19
+ return nitro.options.graphql?.server !== false;
20
+ }
21
+ /**
22
+ * Get extend sources from config
23
+ */
24
+ function getExtendSources(nitro) {
25
+ const extend = nitro.options.graphql?.extend;
26
+ return Array.isArray(extend) ? extend : void 0;
27
+ }
28
+ /**
29
+ * Scan local GraphQL files (schemas, resolvers, directives, documents)
30
+ * This is the low-level scan function - use performGraphQLScan for full workflow
31
+ */
32
+ async function scanLocalFiles(nitro) {
33
+ const directivesResult = await NitroAdapter.scanDirectives(nitro);
34
+ nitro.scanDirectives = directivesResult.items;
35
+ const directiveSchemas = await generateDirectiveSchemas(directivesResult.items, nitro.graphql.buildDir);
36
+ nitro.graphql.directiveSchemas = directiveSchemas;
37
+ const schemasResult = await NitroAdapter.scanSchemas(nitro);
38
+ nitro.scanSchemas = schemasResult.items;
39
+ const docsResult = await NitroAdapter.scanDocuments(nitro);
40
+ nitro.scanDocuments = docsResult.items;
41
+ const resolversResult = await NitroAdapter.scanResolvers(nitro);
42
+ nitro.scanResolvers = resolversResult.items;
43
+ return {
44
+ schemas: schemasResult.items.length,
45
+ resolvers: resolversResult.items.length,
46
+ directives: directivesResult.items.length,
47
+ documents: docsResult.items.length
48
+ };
49
+ }
50
+ /**
51
+ * Scan only client documents (for external services or client-only mode)
52
+ */
53
+ async function scanDocumentsOnly(nitro) {
54
+ const result = await NitroAdapter.scanDocuments(nitro);
55
+ nitro.scanDocuments = result.items;
56
+ return result.items.length;
57
+ }
58
+ /**
59
+ * Initialize empty scan results (for skipLocalScan mode)
60
+ */
61
+ function initializeEmptyScanResults(nitro) {
62
+ nitro.scanSchemas = [];
63
+ nitro.scanResolvers = [];
64
+ nitro.scanDirectives = [];
65
+ }
66
+ /**
67
+ * Perform complete GraphQL scan workflow
68
+ * This is the main entry point for both initial setup and dev mode rescan
69
+ *
70
+ * Workflow:
71
+ * 1. Check skipLocalScan flag
72
+ * 2. Scan local files if enabled
73
+ * 3. Resolve extend config (append to results)
74
+ * 4. Log diagnostics if needed
75
+ */
76
+ async function performGraphQLScan(nitro, options = {}) {
77
+ const { silent = false, isRescan = false } = options;
78
+ const serverEnabled = isServerEnabled(nitro);
79
+ const scanLocal = shouldScanLocalFiles(nitro);
80
+ const extendSources = getExtendSources(nitro);
81
+ if (isRescan && !scanLocal && extendSources?.length) return;
82
+ if (!scanLocal) {
83
+ if (!isRescan && !silent) if (extendSources?.length) logger.info(`Using ${extendSources.length} extend source(s), skipping local scanning`);
84
+ else logger.info("Skipping local scanning (skipLocalScan: true)");
85
+ initializeEmptyScanResults(nitro);
86
+ await scanDocumentsOnly(nitro);
87
+ } else if (serverEnabled) await scanLocalFiles(nitro);
88
+ else await scanDocumentsOnly(nitro);
89
+ await resolveExtendConfig(nitro, { silent: silent || isRescan });
90
+ }
91
+ /**
92
+ * Log resolver diagnostics for development
93
+ */
94
+ function logResolverDiagnostics(nitro) {
95
+ const resolvers = nitro.scanResolvers || [];
96
+ if (resolvers.length > 0) {
97
+ const totalExports = resolvers.reduce((sum, r) => sum + r.imports.length, 0);
98
+ const typeCount = {
99
+ query: 0,
100
+ mutation: 0,
101
+ resolver: 0,
102
+ type: 0,
103
+ subscription: 0,
104
+ directive: 0
105
+ };
106
+ for (const resolver of resolvers) for (const imp of resolver.imports) if (imp.type in typeCount) typeCount[imp.type]++;
107
+ const breakdown = [];
108
+ if (typeCount.query > 0) breakdown.push(`${typeCount.query} query`);
109
+ if (typeCount.mutation > 0) breakdown.push(`${typeCount.mutation} mutation`);
110
+ if (typeCount.resolver > 0) breakdown.push(`${typeCount.resolver} resolver`);
111
+ if (typeCount.type > 0) breakdown.push(`${typeCount.type} type`);
112
+ if (typeCount.subscription > 0) breakdown.push(`${typeCount.subscription} subscription`);
113
+ if (typeCount.directive > 0) breakdown.push(`${typeCount.directive} directive`);
114
+ if (breakdown.length > 0) logger.success(`${totalExports} resolver export(s): ${breakdown.join(", ")}`);
115
+ } else logger.warn("No resolvers found. Check /_nitro/graphql/debug for details.");
116
+ }
117
+ //#endregion
118
+ export { getExtendSources, initializeEmptyScanResults, isServerEnabled, logResolverDiagnostics, performGraphQLScan, scanDocumentsOnly, scanLocalFiles, shouldScanLocalFiles };
@@ -0,0 +1,10 @@
1
+ import { Nitro, NitroTypes } from "nitro/types";
2
+
3
+ //#region src/nitro/setup/ts-config.d.ts
4
+ /**
5
+ * Setup TypeScript path aliases for GraphQL types
6
+ * Called via nitro:config hook to extend tsconfig.json
7
+ */
8
+ declare function setupTypeScriptPaths(nitro: Nitro, types: NitroTypes): void;
9
+ //#endregion
10
+ export { setupTypeScriptPaths };
@@ -0,0 +1,67 @@
1
+ import { relativeWithDot } from "../../core/utils/imports.mjs";
2
+ import { getDefaultPaths, getTypesConfig, resolveFilePath } from "../paths.mjs";
3
+ import { dirname, join, resolve } from "pathe";
4
+ //#region src/nitro/setup/ts-config.ts
5
+ /**
6
+ * Setup TypeScript path aliases for GraphQL types
7
+ * Called via nitro:config hook to extend tsconfig.json
8
+ */
9
+ function setupTypeScriptPaths(nitro, types) {
10
+ const tsconfigDir = dirname(resolve(nitro.options.buildDir, nitro.options.typescript.tsconfigPath ?? "tsconfig.json"));
11
+ types.tsConfig ||= {};
12
+ types.tsConfig.compilerOptions ??= {};
13
+ types.tsConfig.compilerOptions.paths ??= {};
14
+ types.tsConfig.include = types.tsConfig.include || [];
15
+ const placeholders = getDefaultPaths(nitro);
16
+ const typesConfig = getTypesConfig(nitro);
17
+ setupServerTypesPath(nitro, types, tsconfigDir, placeholders, typesConfig);
18
+ setupClientTypesPath(nitro, types, tsconfigDir, placeholders, typesConfig);
19
+ setupSchemaPath(nitro, types, tsconfigDir);
20
+ setupExternalServicePaths(nitro, types, tsconfigDir, placeholders, typesConfig);
21
+ types.tsConfig.include.push(relativeWithDot(tsconfigDir, join(placeholders.typesDir, "graphql.d.ts")));
22
+ }
23
+ /**
24
+ * Setup #graphql/server path alias
25
+ */
26
+ function setupServerTypesPath(nitro, types, tsconfigDir, placeholders, typesConfig) {
27
+ const serverTypesPath = resolveFilePath(typesConfig.server, typesConfig.enabled, true, "{typesDir}/nitro-graphql-server.d.ts", placeholders);
28
+ if (serverTypesPath) {
29
+ types.tsConfig.compilerOptions.paths["#graphql/server"] = [relativeWithDot(tsconfigDir, serverTypesPath)];
30
+ types.tsConfig.include.push(relativeWithDot(tsconfigDir, serverTypesPath));
31
+ }
32
+ }
33
+ /**
34
+ * Setup #graphql/client path alias
35
+ */
36
+ function setupClientTypesPath(nitro, types, tsconfigDir, placeholders, typesConfig) {
37
+ const clientTypesPath = resolveFilePath(typesConfig.client, typesConfig.enabled, true, "{typesDir}/nitro-graphql-client.d.ts", placeholders);
38
+ if (clientTypesPath) {
39
+ types.tsConfig.compilerOptions.paths["#graphql/client"] = [relativeWithDot(tsconfigDir, clientTypesPath)];
40
+ types.tsConfig.include.push(relativeWithDot(tsconfigDir, clientTypesPath));
41
+ }
42
+ }
43
+ /**
44
+ * Setup #graphql/schema path alias
45
+ */
46
+ function setupSchemaPath(nitro, types, tsconfigDir) {
47
+ types.tsConfig.compilerOptions.paths["#graphql/schema"] = [relativeWithDot(tsconfigDir, join(nitro.graphql.serverDir, "schema.ts"))];
48
+ }
49
+ /**
50
+ * Setup #graphql/client/{serviceName} path aliases for external services
51
+ */
52
+ function setupExternalServicePaths(nitro, types, tsconfigDir, placeholders, typesConfig) {
53
+ if (!nitro.options.graphql?.externalServices?.length) return;
54
+ for (const service of nitro.options.graphql.externalServices) {
55
+ const servicePlaceholders = {
56
+ ...placeholders,
57
+ serviceName: service.name
58
+ };
59
+ const externalTypesPath = resolveFilePath(service.paths?.types ?? typesConfig.external, typesConfig.enabled, true, "{typesDir}/nitro-graphql-client-{serviceName}.d.ts", servicePlaceholders);
60
+ if (externalTypesPath) {
61
+ types.tsConfig.compilerOptions.paths[`#graphql/client/${service.name}`] = [relativeWithDot(tsconfigDir, externalTypesPath)];
62
+ types.tsConfig.include.push(relativeWithDot(tsconfigDir, externalTypesPath));
63
+ }
64
+ }
65
+ }
66
+ //#endregion
67
+ export { setupTypeScriptPaths };