nitro-graphql 2.0.0-beta.72 → 2.0.0-beta.73
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/README.md +1 -1
- package/dist/cli/adapter.d.mts +0 -3
- package/dist/cli/adapter.mjs +6 -29
- package/dist/cli/commands/generate.mjs +2 -2
- package/dist/cli/config.d.mts +4 -5
- package/dist/cli/config.mjs +3 -1
- package/dist/cli/index.d.mts +3 -6
- package/dist/cli/index.mjs +1 -1
- package/dist/cli/server/graphql-handler.mjs +2 -1
- package/dist/cli/server/watcher.mjs +1 -1
- package/dist/core/codegen/client.d.mts +4 -27
- package/dist/core/codegen/client.mjs +26 -445
- package/dist/core/codegen/file-header.d.mts +7 -0
- package/dist/core/codegen/file-header.mjs +12 -0
- package/dist/core/codegen/index.d.mts +7 -5
- package/dist/core/codegen/index.mjs +7 -5
- package/dist/core/codegen/{runtime.d.mts → runtime-generator.d.mts} +1 -1
- package/dist/core/codegen/{runtime.mjs → runtime-generator.mjs} +1 -1
- package/dist/core/codegen/schema-loader.d.mts +2 -7
- package/dist/core/codegen/schema-loader.mjs +65 -70
- package/dist/core/codegen/server-type-helpers.d.mts +14 -0
- package/dist/core/codegen/server-type-helpers.mjs +76 -0
- package/dist/core/codegen/server.d.mts +1 -15
- package/dist/core/codegen/server.mjs +15 -105
- package/dist/core/codegen/subscription-extractor.d.mts +20 -0
- package/dist/core/codegen/subscription-extractor.mjs +30 -0
- package/dist/core/codegen/vue-subscription-builder.d.mts +10 -0
- package/dist/core/codegen/vue-subscription-builder.mjs +351 -0
- package/dist/core/constants.d.mts +5 -53
- package/dist/core/constants.mjs +13 -54
- package/dist/core/create-config.d.mts +31 -0
- package/dist/core/create-config.mjs +42 -0
- package/dist/core/debug/index.d.mts +2 -2
- package/dist/core/debug/index.mjs +2 -2
- package/dist/core/debug/template.d.mts +1 -5
- package/dist/core/debug/template.mjs +1 -1
- package/dist/core/extend/loader.d.mts +0 -1
- package/dist/core/extend/loader.mjs +59 -89
- package/dist/core/index.d.mts +22 -17
- package/dist/core/index.mjs +19 -15
- package/dist/core/manifest.mjs +3 -1
- package/dist/core/pubsub/index.d.mts +2 -109
- package/dist/core/pubsub/index.mjs +1 -145
- package/dist/core/pubsub/memory-pubsub.d.mts +109 -0
- package/dist/core/pubsub/memory-pubsub.mjs +146 -0
- package/dist/core/scanning/ast-scanner.mjs +4 -2
- package/dist/core/scanning/directives.mjs +2 -3
- package/dist/core/scanning/documents.d.mts +4 -3
- package/dist/core/scanning/documents.mjs +1 -1
- package/dist/core/scanning/{common.d.mts → file-scanner.d.mts} +1 -1
- package/dist/core/scanning/{common.mjs → file-scanner.mjs} +2 -10
- package/dist/core/scanning/index.d.mts +3 -3
- package/dist/core/scanning/index.mjs +3 -3
- package/dist/core/scanning/resolvers.mjs +8 -9
- package/dist/core/scanning/schemas.d.mts +1 -5
- package/dist/core/scanning/schemas.mjs +2 -24
- package/dist/core/schema/builder.d.mts +4 -2
- package/dist/core/schema/builder.mjs +4 -2
- package/dist/core/schema/index.d.mts +2 -2
- package/dist/core/schema/index.mjs +2 -2
- package/dist/core/server/apollo.d.mts +20 -0
- package/dist/core/server/apollo.mjs +54 -0
- package/dist/core/server/index.d.mts +4 -2
- package/dist/core/server/index.mjs +3 -2
- package/dist/core/server/types.d.mts +7 -14
- package/dist/core/server/types.mjs +15 -1
- package/dist/core/server/yoga.d.mts +1 -7
- package/dist/core/server/yoga.mjs +4 -13
- package/dist/core/types/adapter.d.mts +4 -39
- package/dist/core/types/codegen.d.mts +22 -45
- package/dist/core/types/config.d.mts +33 -121
- package/dist/core/types/define.d.mts +8 -5
- package/dist/core/types/index.d.mts +5 -4
- package/dist/core/types/scanning.d.mts +4 -1
- package/dist/core/types/standard-schema.d.mts +64 -0
- package/dist/core/utils/directive-parser.d.mts +8 -63
- package/dist/core/utils/directive-parser.mjs +114 -166
- package/dist/core/utils/file-io.d.mts +1 -5
- package/dist/core/utils/file-io.mjs +1 -11
- package/dist/core/utils/index.d.mts +5 -4
- package/dist/core/utils/index.mjs +6 -5
- package/dist/core/utils/logger.d.mts +1 -10
- package/dist/core/utils/logger.mjs +1 -19
- package/dist/core/utils/ofetch-templates.mjs +3 -4
- package/dist/core/utils/runtime.d.mts +1 -30
- package/dist/core/utils/runtime.mjs +2 -44
- package/dist/core/utils/string.d.mts +10 -0
- package/dist/core/utils/string.mjs +12 -0
- package/dist/core/watcher/create-watcher.d.mts +103 -0
- package/dist/core/watcher/create-watcher.mjs +143 -0
- package/dist/core/watcher/index.d.mts +2 -107
- package/dist/core/watcher/index.mjs +1 -139
- package/dist/define.d.mts +4 -2
- package/dist/define.mjs +7 -6
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +1 -1
- package/dist/nitro/adapter.d.mts +6 -10
- package/dist/nitro/adapter.mjs +12 -42
- package/dist/nitro/codegen/client-types.d.mts +12 -0
- package/dist/nitro/codegen/client-types.mjs +73 -0
- package/dist/nitro/codegen/external-types.d.mts +8 -0
- package/dist/nitro/codegen/external-types.mjs +47 -0
- package/dist/nitro/codegen/index.d.mts +4 -0
- package/dist/nitro/codegen/index.mjs +4 -0
- package/dist/nitro/codegen/server-types.d.mts +12 -0
- package/dist/nitro/codegen/server-types.mjs +81 -0
- package/dist/nitro/defaults.d.mts +28 -0
- package/dist/nitro/defaults.mjs +34 -0
- package/dist/nitro/index.d.mts +11 -3
- package/dist/nitro/index.mjs +1 -1
- package/dist/nitro/paths.d.mts +3 -2
- package/dist/nitro/paths.mjs +13 -9
- package/dist/nitro/rollup.mjs +4 -3
- package/dist/nitro/routes/_ws-handler.d.mts +6 -0
- package/dist/nitro/routes/_ws-handler.mjs +49 -0
- package/dist/nitro/routes/apollo-server-ws.d.mts +1 -1
- package/dist/nitro/routes/apollo-server-ws.mjs +9 -44
- package/dist/nitro/routes/apollo-server.d.mts +1 -1
- package/dist/nitro/routes/apollo-server.mjs +16 -55
- package/dist/nitro/routes/debug.d.mts +1 -1
- package/dist/nitro/routes/debug.mjs +1 -0
- package/dist/nitro/routes/graphql-yoga-ws.d.mts +1 -1
- package/dist/nitro/routes/graphql-yoga-ws.mjs +6 -44
- package/dist/nitro/routes/graphql-yoga.mjs +7 -5
- package/dist/nitro/routes/health.mjs +22 -24
- package/dist/nitro/setup/extend-loader.d.mts +6 -5
- package/dist/nitro/setup/extend-loader.mjs +30 -58
- package/dist/nitro/setup/file-watcher.mjs +6 -4
- package/dist/nitro/setup/logging.d.mts +1 -8
- package/dist/nitro/setup/logging.mjs +7 -22
- package/dist/nitro/setup/rollup-integration.mjs +32 -1
- package/dist/nitro/setup/scanner.d.mts +8 -43
- package/dist/nitro/setup/scanner.mjs +56 -58
- package/dist/nitro/setup/security.d.mts +10 -0
- package/dist/nitro/setup/security.mjs +17 -0
- package/dist/nitro/setup/type-generation.d.mts +13 -0
- package/dist/nitro/setup/type-generation.mjs +16 -0
- package/dist/nitro/setup.d.mts +4 -3
- package/dist/nitro/setup.mjs +87 -74
- package/dist/nitro/state.d.mts +32 -0
- package/dist/nitro/state.mjs +58 -0
- package/dist/nitro/types/augmentation.d.mts +59 -0
- package/dist/nitro/types/augmentation.mjs +1 -0
- package/dist/nitro/types/config.d.mts +327 -0
- package/dist/nitro/types/config.mjs +1 -0
- package/dist/nitro/types/define.d.mts +13 -0
- package/dist/nitro/types/define.mjs +1 -0
- package/dist/nitro/types/index.d.mts +10 -0
- package/dist/nitro/types/index.mjs +1 -0
- package/dist/nitro/virtual/debug-info.d.mts +9 -0
- package/dist/nitro/virtual/debug-info.mjs +35 -0
- package/dist/nitro/virtual/graphql-config.d.mts +9 -0
- package/dist/nitro/virtual/graphql-config.mjs +33 -0
- package/dist/nitro/virtual/index.d.mts +25 -0
- package/dist/nitro/virtual/index.mjs +45 -0
- package/dist/nitro/virtual/module-config.d.mts +9 -0
- package/dist/nitro/virtual/module-config.mjs +10 -0
- package/dist/nitro/virtual/pubsub.d.mts +9 -0
- package/dist/nitro/virtual/pubsub.mjs +17 -0
- package/dist/nitro/virtual/server-directives.d.mts +9 -0
- package/dist/nitro/virtual/server-directives.mjs +12 -0
- package/dist/nitro/virtual/server-resolvers.d.mts +9 -0
- package/dist/nitro/virtual/server-resolvers.mjs +17 -0
- package/dist/nitro/virtual/server-schemas.d.mts +9 -0
- package/dist/nitro/virtual/server-schemas.mjs +31 -0
- package/dist/nitro/virtual/stubs.d.mts +42 -10
- package/dist/nitro/virtual/stubs.mjs +0 -5
- package/dist/nitro/virtual/utils.d.mts +15 -0
- package/dist/nitro/virtual/utils.mjs +26 -0
- package/dist/nitro/virtual/validation-schemas.d.mts +9 -0
- package/dist/nitro/virtual/validation-schemas.mjs +33 -0
- package/native/index.js +52 -52
- package/package.json +15 -15
- package/dist/cli/commands/index.d.mts +0 -5
- package/dist/cli/commands/index.mjs +0 -5
- package/dist/core/codegen/plugin.d.mts +0 -19
- package/dist/core/codegen/plugin.mjs +0 -29
- package/dist/core/config.d.mts +0 -45
- package/dist/core/config.mjs +0 -76
- package/dist/nitro/codegen.d.mts +0 -18
- package/dist/nitro/codegen.mjs +0 -171
- package/dist/nitro/config.d.mts +0 -50
- package/dist/nitro/config.mjs +0 -55
- package/dist/nitro/types.d.mts +0 -549
- package/dist/nitro/virtual/generators.d.mts +0 -38
- package/dist/nitro/virtual/generators.mjs +0 -190
- /package/dist/{nitro/types.mjs → core/types/standard-schema.mjs} +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CoreServerOptions } from "./types.mjs";
|
|
2
|
+
import { ApolloServer, BaseContext } from "@apollo/server";
|
|
3
|
+
|
|
4
|
+
//#region src/core/server/apollo.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Error codes that represent user-facing errors and should not be masked
|
|
7
|
+
* in production. All other error codes are treated as internal and masked.
|
|
8
|
+
*/
|
|
9
|
+
declare const APOLLO_USER_FACING_ERROR_CODES: readonly ["BAD_USER_INPUT", "GRAPHQL_VALIDATION_FAILED", "UNAUTHENTICATED", "FORBIDDEN", "BAD_REQUEST"];
|
|
10
|
+
/**
|
|
11
|
+
* Create an Apollo Server instance
|
|
12
|
+
*
|
|
13
|
+
* Follows the same factory pattern as createYogaServer:
|
|
14
|
+
* - Takes CoreServerOptions
|
|
15
|
+
* - Applies security defaults
|
|
16
|
+
* - Merges user config via defu
|
|
17
|
+
*/
|
|
18
|
+
declare function createApolloServerInstance(options: CoreServerOptions): Promise<ApolloServer<BaseContext>>;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { APOLLO_USER_FACING_ERROR_CODES, createApolloServerInstance };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { createMergedSchema } from "../schema/builder.mjs";
|
|
2
|
+
import { resolveSecurityDefaults } from "./types.mjs";
|
|
3
|
+
import defu from "defu";
|
|
4
|
+
import { ApolloServer } from "@apollo/server";
|
|
5
|
+
import { ApolloServerPluginLandingPageDisabled } from "@apollo/server/plugin/disabled";
|
|
6
|
+
import { ApolloServerPluginLandingPageLocalDefault } from "@apollo/server/plugin/landingPage/default";
|
|
7
|
+
//#region src/core/server/apollo.ts
|
|
8
|
+
/**
|
|
9
|
+
* Error codes that represent user-facing errors and should not be masked
|
|
10
|
+
* in production. All other error codes are treated as internal and masked.
|
|
11
|
+
*/
|
|
12
|
+
const APOLLO_USER_FACING_ERROR_CODES = [
|
|
13
|
+
"BAD_USER_INPUT",
|
|
14
|
+
"GRAPHQL_VALIDATION_FAILED",
|
|
15
|
+
"UNAUTHENTICATED",
|
|
16
|
+
"FORBIDDEN",
|
|
17
|
+
"BAD_REQUEST"
|
|
18
|
+
];
|
|
19
|
+
/**
|
|
20
|
+
* Create an Apollo Server instance
|
|
21
|
+
*
|
|
22
|
+
* Follows the same factory pattern as createYogaServer:
|
|
23
|
+
* - Takes CoreServerOptions
|
|
24
|
+
* - Applies security defaults
|
|
25
|
+
* - Merges user config via defu
|
|
26
|
+
*/
|
|
27
|
+
async function createApolloServerInstance(options) {
|
|
28
|
+
const { schemas, resolvers, directives, moduleConfig, security, importedConfig } = options;
|
|
29
|
+
const schema = await createMergedSchema({
|
|
30
|
+
schemas,
|
|
31
|
+
resolvers,
|
|
32
|
+
directives: directives || [],
|
|
33
|
+
moduleConfig
|
|
34
|
+
});
|
|
35
|
+
const securityConfig = resolveSecurityDefaults(security);
|
|
36
|
+
const plugins = securityConfig.playground ? [ApolloServerPluginLandingPageLocalDefault({ embed: true })] : [ApolloServerPluginLandingPageDisabled()];
|
|
37
|
+
const server = new ApolloServer(defu({
|
|
38
|
+
schema,
|
|
39
|
+
introspection: securityConfig.introspection,
|
|
40
|
+
plugins,
|
|
41
|
+
formatError: securityConfig.maskErrors ? (formattedError) => {
|
|
42
|
+
const code = formattedError?.extensions?.code;
|
|
43
|
+
if (code && APOLLO_USER_FACING_ERROR_CODES.includes(code)) return formattedError;
|
|
44
|
+
return {
|
|
45
|
+
message: "Internal server error",
|
|
46
|
+
extensions: { code: "INTERNAL_SERVER_ERROR" }
|
|
47
|
+
};
|
|
48
|
+
} : void 0
|
|
49
|
+
}, importedConfig));
|
|
50
|
+
await server.start();
|
|
51
|
+
return server;
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { APOLLO_USER_FACING_ERROR_CODES, createApolloServerInstance };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { CoreSecurityConfig } from "../types/config.mjs";
|
|
1
2
|
import { CoreServerInstance, CoreServerOptions, ServerFactory } from "./types.mjs";
|
|
3
|
+
import { APOLLO_USER_FACING_ERROR_CODES, createApolloServerInstance } from "./apollo.mjs";
|
|
2
4
|
import { APOLLO_SANDBOX_CDN, createSandboxResponse, fetchSandboxScript } from "./sandbox.mjs";
|
|
3
|
-
import {
|
|
4
|
-
export { APOLLO_SANDBOX_CDN, type CoreServerInstance, type CoreServerOptions, type ServerFactory,
|
|
5
|
+
import { apolloSandboxHtml, createYogaServer } from "./yoga.mjs";
|
|
6
|
+
export { APOLLO_SANDBOX_CDN, APOLLO_USER_FACING_ERROR_CODES, type CoreSecurityConfig, type CoreServerInstance, type CoreServerOptions, type ServerFactory, apolloSandboxHtml, createApolloServerInstance, createSandboxResponse, createYogaServer, fetchSandboxScript };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { APOLLO_USER_FACING_ERROR_CODES, createApolloServerInstance } from "./apollo.mjs";
|
|
1
2
|
import { APOLLO_SANDBOX_CDN, createSandboxResponse, fetchSandboxScript } from "./sandbox.mjs";
|
|
2
|
-
import {
|
|
3
|
-
export { APOLLO_SANDBOX_CDN,
|
|
3
|
+
import { apolloSandboxHtml, createYogaServer } from "./yoga.mjs";
|
|
4
|
+
export { APOLLO_SANDBOX_CDN, APOLLO_USER_FACING_ERROR_CODES, apolloSandboxHtml, createApolloServerInstance, createSandboxResponse, createYogaServer, fetchSandboxScript };
|
|
@@ -1,20 +1,8 @@
|
|
|
1
|
+
import { CoreSecurityConfig } from "../types/config.mjs";
|
|
1
2
|
import { DirectiveWrapper, ModuleConfig, ResolverDefinition, SchemaDefinition } from "../schema/builder.mjs";
|
|
2
3
|
import { GraphQLSchema } from "graphql";
|
|
3
4
|
|
|
4
5
|
//#region src/core/server/types.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Security configuration for GraphQL server
|
|
7
|
-
*/
|
|
8
|
-
interface CoreSecurityConfig {
|
|
9
|
-
/** Enable GraphQL introspection (default: true in dev, false in prod) */
|
|
10
|
-
introspection?: boolean;
|
|
11
|
-
/** Enable GraphQL playground/sandbox (default: true in dev, false in prod) */
|
|
12
|
-
playground?: boolean;
|
|
13
|
-
/** Mask error messages in responses (default: false in dev, true in prod) */
|
|
14
|
-
maskErrors?: boolean;
|
|
15
|
-
/** Disable field suggestions in error messages */
|
|
16
|
-
disableSuggestions?: boolean;
|
|
17
|
-
}
|
|
18
6
|
/**
|
|
19
7
|
* Options for creating a GraphQL server instance
|
|
20
8
|
*/
|
|
@@ -50,5 +38,10 @@ interface CoreServerInstance {
|
|
|
50
38
|
* Factory function type for creating GraphQL servers
|
|
51
39
|
*/
|
|
52
40
|
type ServerFactory = (options: CoreServerOptions) => Promise<CoreServerInstance>;
|
|
41
|
+
/**
|
|
42
|
+
* Resolve security config with safe defaults
|
|
43
|
+
* Used by both Yoga and Apollo server factories
|
|
44
|
+
*/
|
|
45
|
+
declare function resolveSecurityDefaults(security?: CoreSecurityConfig): Required<CoreSecurityConfig>;
|
|
53
46
|
//#endregion
|
|
54
|
-
export {
|
|
47
|
+
export { CoreServerInstance, CoreServerOptions, ServerFactory, resolveSecurityDefaults };
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/core/server/types.ts
|
|
2
|
+
/**
|
|
3
|
+
* Resolve security config with safe defaults
|
|
4
|
+
* Used by both Yoga and Apollo server factories
|
|
5
|
+
*/
|
|
6
|
+
function resolveSecurityDefaults(security) {
|
|
7
|
+
return {
|
|
8
|
+
introspection: security?.introspection ?? true,
|
|
9
|
+
playground: security?.playground ?? true,
|
|
10
|
+
maskErrors: security?.maskErrors ?? false,
|
|
11
|
+
disableSuggestions: security?.disableSuggestions ?? false
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { resolveSecurityDefaults };
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import { SchemaDefinition } from "../schema/builder.mjs";
|
|
2
1
|
import { CoreServerInstance, CoreServerOptions } from "./types.mjs";
|
|
3
2
|
|
|
4
3
|
//#region src/core/server/yoga.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Base schema definition for Yoga server
|
|
7
|
-
* Uses shared BASE_SCHEMA string from builder
|
|
8
|
-
*/
|
|
9
|
-
declare const BASE_SCHEMA: SchemaDefinition;
|
|
10
4
|
/**
|
|
11
5
|
* Apollo Sandbox HTML template
|
|
12
6
|
* Shared between CLI and Nitro for consistent playground experience
|
|
@@ -39,4 +33,4 @@ declare const apolloSandboxHtml = "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n
|
|
|
39
33
|
*/
|
|
40
34
|
declare function createYogaServer(options: CoreServerOptions): Promise<CoreServerInstance>;
|
|
41
35
|
//#endregion
|
|
42
|
-
export {
|
|
36
|
+
export { apolloSandboxHtml, createYogaServer };
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createMergedSchema } from "../schema/builder.mjs";
|
|
2
|
+
import { resolveSecurityDefaults } from "./types.mjs";
|
|
2
3
|
import defu from "defu";
|
|
3
4
|
import { createYoga } from "graphql-yoga";
|
|
4
5
|
//#region src/core/server/yoga.ts
|
|
5
6
|
/**
|
|
6
|
-
* Base schema definition for Yoga server
|
|
7
|
-
* Uses shared BASE_SCHEMA string from builder
|
|
8
|
-
*/
|
|
9
|
-
const BASE_SCHEMA = { def: BASE_SCHEMA$1 };
|
|
10
|
-
/**
|
|
11
7
|
* Apollo Sandbox HTML template
|
|
12
8
|
* Shared between CLI and Nitro for consistent playground experience
|
|
13
9
|
*/
|
|
@@ -64,12 +60,7 @@ async function createYogaServer(options) {
|
|
|
64
60
|
directives: directives || [],
|
|
65
61
|
moduleConfig
|
|
66
62
|
});
|
|
67
|
-
const securityConfig = security
|
|
68
|
-
introspection: true,
|
|
69
|
-
playground: true,
|
|
70
|
-
maskErrors: false,
|
|
71
|
-
disableSuggestions: false
|
|
72
|
-
};
|
|
63
|
+
const securityConfig = resolveSecurityDefaults(security);
|
|
73
64
|
const yoga = createYoga(defu({
|
|
74
65
|
schema,
|
|
75
66
|
graphqlEndpoint: endpoint,
|
|
@@ -84,4 +75,4 @@ async function createYogaServer(options) {
|
|
|
84
75
|
};
|
|
85
76
|
}
|
|
86
77
|
//#endregion
|
|
87
|
-
export {
|
|
78
|
+
export { apolloSandboxHtml, createYogaServer };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { CoreConfig,
|
|
2
|
-
import { ScanContext
|
|
1
|
+
import { CoreConfig, CoreLogger } from "./config.mjs";
|
|
2
|
+
import { ScanContext } from "./scanning.mjs";
|
|
3
|
+
|
|
3
4
|
//#region src/core/types/adapter.d.ts
|
|
4
5
|
/**
|
|
5
6
|
* Framework adapter interface
|
|
@@ -10,46 +11,10 @@ interface FrameworkAdapter<TFramework = unknown> {
|
|
|
10
11
|
readonly name: string;
|
|
11
12
|
/** Create core config from framework instance */
|
|
12
13
|
createCoreConfig: (framework: TFramework) => CoreConfig;
|
|
13
|
-
/** Create core context from framework instance */
|
|
14
|
-
createCoreContext: (framework: TFramework) => CoreContext;
|
|
15
14
|
/** Create scan context from framework instance */
|
|
16
15
|
createScanContext: (framework: TFramework) => ScanContext;
|
|
17
16
|
/** Get framework logger adapted to CoreLogger interface */
|
|
18
17
|
getLogger: (framework: TFramework) => CoreLogger;
|
|
19
18
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Scan adapter interface
|
|
22
|
-
* Provides high-level scanning operations using the framework adapter
|
|
23
|
-
*/
|
|
24
|
-
interface ScanAdapter<TFramework = unknown> {
|
|
25
|
-
/** Scan for GraphQL schema files */
|
|
26
|
-
scanSchemas: (framework: TFramework) => Promise<ScanResult<string>>;
|
|
27
|
-
/** Scan for GraphQL files (schemas + operations) */
|
|
28
|
-
scanGraphql: (framework: TFramework) => Promise<ScanResult<string>>;
|
|
29
|
-
/** Scan for resolver files */
|
|
30
|
-
scanResolvers: (framework: TFramework) => Promise<ScanResult<ScannedResolver>>;
|
|
31
|
-
/** Scan for directive files */
|
|
32
|
-
scanDirectives: (framework: TFramework) => Promise<ScanResult<ScannedResolver>>;
|
|
33
|
-
/** Scan for client documents */
|
|
34
|
-
scanDocuments: (framework: TFramework) => Promise<ScanResult<string>>;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Codegen adapter interface
|
|
38
|
-
* Provides high-level codegen operations using the framework adapter
|
|
39
|
-
*/
|
|
40
|
-
interface CodegenAdapter<TFramework = unknown> {
|
|
41
|
-
/** Generate server types */
|
|
42
|
-
generateServerTypes: (framework: TFramework, options?: {
|
|
43
|
-
silent?: boolean;
|
|
44
|
-
}) => Promise<void>;
|
|
45
|
-
/** Generate client types */
|
|
46
|
-
generateClientTypes: (framework: TFramework, options?: {
|
|
47
|
-
silent?: boolean;
|
|
48
|
-
}) => Promise<void>;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Combined full adapter interface
|
|
52
|
-
*/
|
|
53
|
-
interface FullFrameworkAdapter<TFramework = unknown> extends FrameworkAdapter<TFramework>, ScanAdapter<TFramework>, CodegenAdapter<TFramework> {}
|
|
54
19
|
//#endregion
|
|
55
|
-
export {
|
|
20
|
+
export { FrameworkAdapter };
|
|
@@ -1,53 +1,37 @@
|
|
|
1
|
+
import { TypeScriptPluginConfig } from "@graphql-codegen/typescript";
|
|
2
|
+
import { plugin as plugin$1 } from "@graphql-codegen/typescript-generic-sdk";
|
|
3
|
+
import { TypeScriptDocumentsPluginConfig } from "@graphql-codegen/typescript-operations";
|
|
1
4
|
import { Source } from "@graphql-tools/utils";
|
|
2
5
|
import { GraphQLSchema } from "graphql";
|
|
6
|
+
import { TypeScriptResolversPluginConfig } from "@graphql-codegen/typescript-resolvers";
|
|
3
7
|
|
|
4
8
|
//#region src/core/types/codegen.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Scalar type mapping (can be string or input/output object)
|
|
7
|
-
*/
|
|
8
|
-
type ScalarType = string | {
|
|
9
|
-
input: string;
|
|
10
|
-
output: string;
|
|
11
|
-
};
|
|
12
9
|
/**
|
|
13
10
|
* Server codegen configuration
|
|
11
|
+
* Extends @graphql-codegen/typescript + @graphql-codegen/typescript-resolvers
|
|
14
12
|
*/
|
|
15
|
-
|
|
16
|
-
scalars?: Record<string, ScalarType>;
|
|
17
|
-
defaultScalarType?: string;
|
|
18
|
-
defaultMapper?: string;
|
|
19
|
-
contextType?: string;
|
|
20
|
-
maybeValue?: string;
|
|
21
|
-
inputMaybeValue?: string;
|
|
22
|
-
declarationKind?: string;
|
|
23
|
-
enumsAsTypes?: boolean;
|
|
24
|
-
federation?: boolean;
|
|
25
|
-
[key: string]: unknown;
|
|
26
|
-
}
|
|
13
|
+
type ServerCodegenConfig = TypeScriptPluginConfig & TypeScriptResolversPluginConfig;
|
|
27
14
|
/**
|
|
28
15
|
* Client codegen configuration
|
|
16
|
+
* Extends @graphql-codegen/typescript + @graphql-codegen/typescript-operations
|
|
29
17
|
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
maybeValue?: string;
|
|
36
|
-
inputMaybeValue?: string;
|
|
37
|
-
documentMode?: string;
|
|
38
|
-
pureMagicComment?: boolean;
|
|
39
|
-
dedupeOperationSuffix?: boolean;
|
|
40
|
-
rawRequest?: boolean;
|
|
41
|
-
scalars?: Record<string, ScalarType>;
|
|
18
|
+
type ClientCodegenConfig = TypeScriptPluginConfig & TypeScriptDocumentsPluginConfig & {
|
|
19
|
+
/**
|
|
20
|
+
* Generate TypedDocumentNode exports for urql/Apollo Client compatibility.
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
42
23
|
typedDocumentNode?: boolean;
|
|
43
|
-
|
|
44
|
-
}
|
|
24
|
+
};
|
|
45
25
|
/**
|
|
46
26
|
* SDK codegen configuration
|
|
27
|
+
* Derives from the generic-sdk plugin's config parameter type with string documentMode
|
|
47
28
|
*/
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
29
|
+
type DocumentModeConfig = Pick<Parameters<typeof plugin$1>[2], 'documentMode'>;
|
|
30
|
+
type DocumentModeEnum = NonNullable<DocumentModeConfig['documentMode']>;
|
|
31
|
+
type DocumentModeType = `${DocumentModeEnum}`;
|
|
32
|
+
type SdkCodegenConfig = Omit<Parameters<typeof plugin$1>[2], 'documentMode'> & {
|
|
33
|
+
documentMode?: DocumentModeType;
|
|
34
|
+
};
|
|
51
35
|
/**
|
|
52
36
|
* Input for server type generation
|
|
53
37
|
*/
|
|
@@ -114,7 +98,7 @@ interface ClientCodegenResult {
|
|
|
114
98
|
*/
|
|
115
99
|
interface ExternalServiceCodegenConfig {
|
|
116
100
|
name: string;
|
|
117
|
-
schema
|
|
101
|
+
schema?: string | string[];
|
|
118
102
|
endpoint: string;
|
|
119
103
|
headers?: Record<string, string> | (() => Record<string, string>);
|
|
120
104
|
documents?: string[];
|
|
@@ -125,12 +109,5 @@ interface ExternalServiceCodegenConfig {
|
|
|
125
109
|
clientSDK?: SdkCodegenConfig;
|
|
126
110
|
};
|
|
127
111
|
}
|
|
128
|
-
/**
|
|
129
|
-
* Schema loading options
|
|
130
|
-
*/
|
|
131
|
-
interface SchemaLoadOptions {
|
|
132
|
-
headers?: Record<string, string>;
|
|
133
|
-
loaders?: unknown[];
|
|
134
|
-
}
|
|
135
112
|
//#endregion
|
|
136
|
-
export { ClientCodegenConfig, ClientCodegenInput, ClientCodegenResult, ExternalServiceCodegenConfig,
|
|
113
|
+
export { ClientCodegenConfig, ClientCodegenInput, ClientCodegenResult, ExternalServiceCodegenConfig, SdkCodegenConfig, ServerCodegenConfig, ServerCodegenInput, ServerCodegenResult };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GraphQLFramework } from "../constants.mjs";
|
|
2
|
+
import { ClientCodegenConfig, ExternalServiceCodegenConfig, SdkCodegenConfig, ServerCodegenConfig } from "./codegen.mjs";
|
|
2
3
|
|
|
3
4
|
//#region src/core/types/config.d.ts
|
|
4
5
|
/**
|
|
@@ -12,19 +13,9 @@ interface CoreLogger {
|
|
|
12
13
|
success: (message: string, ...args: unknown[]) => void;
|
|
13
14
|
debug: (message: string, ...args: unknown[]) => void;
|
|
14
15
|
}
|
|
15
|
-
/**
|
|
16
|
-
* GraphQL codegen configuration
|
|
17
|
-
*/
|
|
18
|
-
interface CoreCodegenConfig {
|
|
19
|
-
/** Server-side codegen options */
|
|
20
|
-
server?: Record<string, unknown>;
|
|
21
|
-
/** Client-side codegen options */
|
|
22
|
-
client?: Record<string, unknown>;
|
|
23
|
-
/** Client SDK codegen options */
|
|
24
|
-
clientSDK?: Record<string, unknown>;
|
|
25
|
-
}
|
|
26
16
|
/**
|
|
27
17
|
* Security configuration options
|
|
18
|
+
* Single source of truth — re-exported as `SecurityConfig` in Nitro types
|
|
28
19
|
*/
|
|
29
20
|
interface CoreSecurityConfig {
|
|
30
21
|
/** Enable/disable GraphQL introspection */
|
|
@@ -37,28 +28,8 @@ interface CoreSecurityConfig {
|
|
|
37
28
|
disableSuggestions?: boolean;
|
|
38
29
|
}
|
|
39
30
|
/**
|
|
40
|
-
*
|
|
41
|
-
|
|
42
|
-
interface CoreExternalService {
|
|
43
|
-
/** Unique service name */
|
|
44
|
-
name: string;
|
|
45
|
-
/** GraphQL schema URL or file path */
|
|
46
|
-
schema: string;
|
|
47
|
-
/** GraphQL endpoint URL */
|
|
48
|
-
endpoint: string;
|
|
49
|
-
/** Headers for schema introspection */
|
|
50
|
-
headers?: Record<string, string> | (() => Record<string, string>);
|
|
51
|
-
/** Document patterns for this service */
|
|
52
|
-
documents?: string[];
|
|
53
|
-
/** Service-specific path overrides */
|
|
54
|
-
paths?: {
|
|
55
|
-
sdk?: string;
|
|
56
|
-
types?: string;
|
|
57
|
-
ofetch?: string;
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Apollo Federation configuration
|
|
31
|
+
* Federation configuration
|
|
32
|
+
* Base type — Nitro's FederationConfig extends this
|
|
62
33
|
*/
|
|
63
34
|
interface CoreFederationConfig {
|
|
64
35
|
/** Enable federation support */
|
|
@@ -67,80 +38,33 @@ interface CoreFederationConfig {
|
|
|
67
38
|
serviceName?: string;
|
|
68
39
|
}
|
|
69
40
|
/**
|
|
70
|
-
*
|
|
41
|
+
* Codegen configuration
|
|
42
|
+
* Uses the authoritative types from codegen.ts
|
|
71
43
|
*/
|
|
72
|
-
interface
|
|
73
|
-
/** Server
|
|
74
|
-
|
|
75
|
-
/** Client
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Type generation configuration
|
|
82
|
-
*/
|
|
83
|
-
interface CoreTypesConfig {
|
|
84
|
-
/** Master switch for type generation */
|
|
85
|
-
enabled?: boolean;
|
|
86
|
-
/** Server types output path */
|
|
87
|
-
server?: boolean | string;
|
|
88
|
-
/** Client types output path */
|
|
89
|
-
client?: boolean | string;
|
|
90
|
-
/** External service types output path */
|
|
91
|
-
external?: boolean | string;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* SDK generation configuration
|
|
95
|
-
*/
|
|
96
|
-
interface CoreSdkConfig {
|
|
97
|
-
/** Master switch for SDK generation */
|
|
98
|
-
enabled?: boolean;
|
|
99
|
-
/** Main SDK output path */
|
|
100
|
-
main?: boolean | string;
|
|
101
|
-
/** External service SDK output path */
|
|
102
|
-
external?: boolean | string;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Client utilities configuration
|
|
106
|
-
*/
|
|
107
|
-
interface CoreClientUtilsConfig {
|
|
108
|
-
/** Master switch for client utilities */
|
|
109
|
-
enabled?: boolean;
|
|
110
|
-
/** Index file output path */
|
|
111
|
-
index?: boolean | string;
|
|
112
|
-
/** Ofetch client output path */
|
|
113
|
-
ofetch?: boolean | string;
|
|
44
|
+
interface CoreCodegenConfig {
|
|
45
|
+
/** Server-side codegen options */
|
|
46
|
+
server?: ServerCodegenConfig;
|
|
47
|
+
/** Client-side codegen options */
|
|
48
|
+
client?: ClientCodegenConfig;
|
|
49
|
+
/** Client SDK codegen options */
|
|
50
|
+
clientSDK?: SdkCodegenConfig;
|
|
114
51
|
}
|
|
115
52
|
/**
|
|
116
|
-
*
|
|
117
|
-
*
|
|
53
|
+
* External service with path overrides
|
|
54
|
+
* Extends the codegen base type with UI-facing path config
|
|
118
55
|
*/
|
|
119
|
-
interface
|
|
120
|
-
/**
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
/** Security configuration */
|
|
127
|
-
security?: CoreSecurityConfig;
|
|
128
|
-
/** External GraphQL services */
|
|
129
|
-
externalServices?: CoreExternalService[];
|
|
130
|
-
/** Apollo Federation configuration */
|
|
131
|
-
federation?: CoreFederationConfig;
|
|
132
|
-
/** Path configuration */
|
|
133
|
-
paths?: CorePathsConfig;
|
|
134
|
-
/** Type generation configuration */
|
|
135
|
-
types?: false | CoreTypesConfig;
|
|
136
|
-
/** SDK generation configuration */
|
|
137
|
-
sdk?: false | CoreSdkConfig;
|
|
138
|
-
/** Client utilities configuration */
|
|
139
|
-
clientUtils?: false | CoreClientUtilsConfig;
|
|
56
|
+
interface CoreExternalService extends ExternalServiceCodegenConfig {
|
|
57
|
+
/** Service-specific path overrides */
|
|
58
|
+
paths?: {
|
|
59
|
+
sdk?: string | boolean;
|
|
60
|
+
types?: string | boolean;
|
|
61
|
+
ofetch?: string | boolean;
|
|
62
|
+
};
|
|
140
63
|
}
|
|
141
64
|
/**
|
|
142
65
|
* Core configuration
|
|
143
|
-
*
|
|
66
|
+
* The resolved, fully-populated config used by core functions.
|
|
67
|
+
* Created by adapters from framework-specific types.
|
|
144
68
|
*/
|
|
145
69
|
interface CoreConfig {
|
|
146
70
|
/** Root directory of the project */
|
|
@@ -159,30 +83,18 @@ interface CoreConfig {
|
|
|
159
83
|
isNuxt: boolean;
|
|
160
84
|
/** Whether running in development mode */
|
|
161
85
|
isDev: boolean;
|
|
162
|
-
/** GraphQL options */
|
|
163
|
-
graphqlOptions: CoreGraphQLOptions;
|
|
164
86
|
/** Logger instance */
|
|
165
87
|
logger: CoreLogger;
|
|
166
88
|
/** Patterns to ignore during scanning */
|
|
167
89
|
ignorePatterns: string[];
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
*/
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
|
|
176
|
-
/** GraphQL build directory */
|
|
177
|
-
graphqlBuildDir: string;
|
|
178
|
-
/** Watch directories for file watching */
|
|
179
|
-
watchDirs: string[];
|
|
180
|
-
/** Relative directory paths */
|
|
181
|
-
dir: {
|
|
182
|
-
build: string;
|
|
183
|
-
client: string;
|
|
184
|
-
server: string;
|
|
185
|
-
};
|
|
90
|
+
/** Security configuration */
|
|
91
|
+
security?: CoreSecurityConfig;
|
|
92
|
+
/** Federation configuration */
|
|
93
|
+
federation?: CoreFederationConfig;
|
|
94
|
+
/** Codegen configuration */
|
|
95
|
+
codegen?: CoreCodegenConfig;
|
|
96
|
+
/** External services */
|
|
97
|
+
externalServices?: CoreExternalService[];
|
|
186
98
|
}
|
|
187
99
|
//#endregion
|
|
188
|
-
export {
|
|
100
|
+
export { CoreCodegenConfig, CoreConfig, CoreExternalService, CoreFederationConfig, CoreLogger, CoreSecurityConfig };
|
|
@@ -5,19 +5,22 @@ type Flatten<T> = T extends infer U ? { [K in keyof U]: U[K] } : never;
|
|
|
5
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';
|
|
6
6
|
type GraphQLScalarType = 'String' | 'Int' | 'Float' | 'Boolean' | 'ID' | 'JSON' | 'DateTime';
|
|
7
7
|
type GraphQLBaseType = GraphQLScalarType | (string & {});
|
|
8
|
-
type
|
|
8
|
+
type GraphQLModifier = '' | '!' | '[]' | '[!]' | '[!]!';
|
|
9
|
+
type GraphQLArgumentType = `${GraphQLScalarType}${GraphQLModifier}` | `${GraphQLBaseType}${GraphQLModifier}` | (string & {});
|
|
10
|
+
/** Allowed default values for directive arguments */
|
|
11
|
+
type DirectiveDefaultValue = string | number | boolean | null;
|
|
9
12
|
interface DirectiveArgument<T extends GraphQLArgumentType = GraphQLArgumentType> {
|
|
10
13
|
/**
|
|
11
14
|
* GraphQL type for the argument
|
|
12
15
|
* @example 'String', 'Int!', '[String!]!', 'DateTime', 'JSON'
|
|
13
16
|
*/
|
|
14
17
|
type: T;
|
|
15
|
-
defaultValue?:
|
|
18
|
+
defaultValue?: DirectiveDefaultValue;
|
|
16
19
|
description?: string;
|
|
17
20
|
}
|
|
18
21
|
interface DirectiveArg {
|
|
19
22
|
type: GraphQLArgumentType;
|
|
20
|
-
defaultValue?:
|
|
23
|
+
defaultValue?: DirectiveDefaultValue;
|
|
21
24
|
description?: string;
|
|
22
25
|
}
|
|
23
26
|
interface DirectiveDefinition {
|
|
@@ -33,7 +36,7 @@ interface DefineDirectiveConfig {
|
|
|
33
36
|
locations: ReadonlyArray<DirectiveLocationName>;
|
|
34
37
|
args?: Record<string, {
|
|
35
38
|
type: GraphQLArgumentType;
|
|
36
|
-
defaultValue?:
|
|
39
|
+
defaultValue?: DirectiveDefaultValue;
|
|
37
40
|
description?: string;
|
|
38
41
|
}>;
|
|
39
42
|
description?: string;
|
|
@@ -41,4 +44,4 @@ interface DefineDirectiveConfig {
|
|
|
41
44
|
transformer?: (schema: GraphQLSchema) => GraphQLSchema;
|
|
42
45
|
}
|
|
43
46
|
//#endregion
|
|
44
|
-
export { DefineDirectiveConfig, DirectiveArgument, DirectiveDefinition, Flatten, GraphQLArgumentType, GraphQLBaseType, GraphQLScalarType };
|
|
47
|
+
export { DefineDirectiveConfig, DirectiveArg, DirectiveArgument, DirectiveDefinition, DirectiveLocationName, Flatten, GraphQLArgumentType, GraphQLBaseType, GraphQLScalarType };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ClientCodegenConfig, ClientCodegenInput, ClientCodegenResult, ExternalServiceCodegenConfig,
|
|
2
|
-
import {
|
|
3
|
-
import { DefineDirectiveConfig, DirectiveArgument, DirectiveDefinition, Flatten, GraphQLArgumentType, GraphQLBaseType, GraphQLScalarType } from "./define.mjs";
|
|
1
|
+
import { ClientCodegenConfig, ClientCodegenInput, ClientCodegenResult, ExternalServiceCodegenConfig, SdkCodegenConfig, ServerCodegenConfig, ServerCodegenInput, ServerCodegenResult } from "./codegen.mjs";
|
|
2
|
+
import { CoreCodegenConfig, CoreConfig, CoreExternalService, CoreFederationConfig, CoreLogger, CoreSecurityConfig } from "./config.mjs";
|
|
4
3
|
import { ResolverImport, ScanContext, ScanResult, ScannedFile, ScannedResolver } from "./scanning.mjs";
|
|
5
|
-
|
|
4
|
+
import { DefineDirectiveConfig, DirectiveArg, DirectiveArgument, DirectiveDefinition, DirectiveLocationName, Flatten, GraphQLArgumentType, GraphQLBaseType, GraphQLScalarType } from "./define.mjs";
|
|
5
|
+
import { StandardSchemaV1 } from "./standard-schema.mjs";
|
|
6
|
+
export { ClientCodegenConfig, ClientCodegenInput, ClientCodegenResult, CoreCodegenConfig, CoreConfig, CoreExternalService, CoreFederationConfig, CoreLogger, CoreSecurityConfig, DefineDirectiveConfig, DirectiveArg, DirectiveArgument, DirectiveDefinition, DirectiveLocationName, ExternalServiceCodegenConfig, Flatten, GraphQLArgumentType, GraphQLBaseType, GraphQLScalarType, ResolverImport, ScanContext, ScanResult, ScannedFile, ScannedResolver, SdkCodegenConfig, ServerCodegenConfig, ServerCodegenInput, ServerCodegenResult, StandardSchemaV1 };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CoreLogger } from "./config.mjs";
|
|
2
|
+
import * as knitwork from "knitwork";
|
|
2
3
|
|
|
3
4
|
//#region src/core/types/scanning.d.ts
|
|
4
5
|
/**
|
|
@@ -49,7 +50,7 @@ interface ResolverImport {
|
|
|
49
50
|
/** Resolver type (query, mutation, resolver, type, subscription, directive) */
|
|
50
51
|
type: 'query' | 'mutation' | 'resolver' | 'type' | 'subscription' | 'directive';
|
|
51
52
|
/** Aliased import name */
|
|
52
|
-
as
|
|
53
|
+
as?: string;
|
|
53
54
|
}
|
|
54
55
|
/**
|
|
55
56
|
* Scanned resolver information
|
|
@@ -59,6 +60,8 @@ interface ScannedResolver {
|
|
|
59
60
|
specifier: string;
|
|
60
61
|
/** Exports from this file */
|
|
61
62
|
imports: ResolverImport[];
|
|
63
|
+
/** ESM code generation options (used by knitwork's genImport) */
|
|
64
|
+
options?: knitwork.ESMCodeGenOptions;
|
|
62
65
|
}
|
|
63
66
|
//#endregion
|
|
64
67
|
export { ResolverImport, ScanContext, ScanResult, ScannedFile, ScannedResolver };
|