nuxt-graphql-middleware 5.0.0-alpha.9 → 5.0.0

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 (51) hide show
  1. package/README.md +101 -19
  2. package/dist/client/200.html +8 -8
  3. package/dist/client/404.html +8 -8
  4. package/dist/client/_nuxt/{CPyoLiCY.js → BM34SYth.js} +1 -1
  5. package/dist/client/_nuxt/CROlboVl.js +1 -0
  6. package/dist/client/_nuxt/D5hBL5aZ.js +25 -0
  7. package/dist/client/_nuxt/{BLvMh1Ga.js → FTbv7CO6.js} +1 -1
  8. package/dist/client/_nuxt/builds/latest.json +1 -1
  9. package/dist/client/_nuxt/builds/meta/83f9fcd5-bd28-4608-b499-05e08fe0f7d0.json +1 -0
  10. package/dist/client/_nuxt/error-404.ehK72JOs.css +1 -0
  11. package/dist/client/_nuxt/error-500._g0akJim.css +1 -0
  12. package/dist/client/_nuxt/{C9pb_2rp.js → lIgCBhS_.js} +2 -2
  13. package/dist/client/index.html +8 -8
  14. package/dist/client-options.d.mts +6 -0
  15. package/dist/client-options.mjs +5 -0
  16. package/dist/module.d.mts +63 -181
  17. package/dist/module.json +3 -3
  18. package/dist/module.mjs +338 -90
  19. package/dist/runtime/components/CodeFrame.vue +19 -28
  20. package/dist/runtime/components/CodeFrame.vue.d.ts +7 -0
  21. package/dist/runtime/components/DevModeOverlay.vue +25 -33
  22. package/dist/runtime/components/DevModeOverlay.vue.d.ts +3 -0
  23. package/dist/runtime/components/ErrorExtensions.vue +9 -11
  24. package/dist/runtime/components/ErrorExtensions.vue.d.ts +5 -0
  25. package/dist/runtime/components/ErrorGroup.vue +28 -39
  26. package/dist/runtime/components/ErrorGroup.vue.d.ts +9 -0
  27. package/dist/runtime/server/api/mutation.js +2 -1
  28. package/dist/runtime/server/api/query.js +2 -1
  29. package/dist/runtime/server/utils/doGraphqlRequest.js +5 -4
  30. package/dist/runtime/types.d.ts +2 -2
  31. package/dist/server-options.d.mts +8 -0
  32. package/dist/server-options.mjs +5 -0
  33. package/dist/shared/nuxt-graphql-middleware.cXfDI4U3.d.mts +517 -0
  34. package/dist/types.d.mts +1 -7
  35. package/dist/utils.d.mts +15 -0
  36. package/dist/utils.mjs +18 -0
  37. package/package.json +34 -30
  38. package/dist/client/_nuxt/CBwfSTyQ.js +0 -1
  39. package/dist/client/_nuxt/VpkRx2_e.js +0 -25
  40. package/dist/client/_nuxt/builds/meta/826a43da-d42c-4fbf-8dfd-2572141eaf8f.json +0 -1
  41. package/dist/client/_nuxt/error-404.BJkSn6RI.css +0 -1
  42. package/dist/client/_nuxt/error-500.TOCKLquH.css +0 -1
  43. package/dist/module.cjs +0 -5
  44. package/dist/module.d.ts +0 -210
  45. package/dist/runtime/clientOptions/index.d.ts +0 -2
  46. package/dist/runtime/clientOptions/index.js +0 -3
  47. package/dist/runtime/serverOptions/defineGraphqlServerOptions.d.ts +0 -4
  48. package/dist/runtime/serverOptions/defineGraphqlServerOptions.js +0 -3
  49. package/dist/runtime/serverOptions/index.d.ts +0 -2
  50. package/dist/runtime/serverOptions/index.js +0 -2
  51. package/dist/types.d.ts +0 -7
@@ -0,0 +1,517 @@
1
+ import { GraphQLSchema, GraphQLNamedType } from 'graphql';
2
+ import { Nuxt, ResolvedNuxtTemplate, WatchEvent } from 'nuxt/schema';
3
+ import { Resolver } from '@nuxt/kit';
4
+ import { RouterMethod } from 'h3';
5
+ import { Types } from '@graphql-codegen/plugin-helpers';
6
+ import { SchemaASTConfig } from '@graphql-codegen/schema-ast';
7
+ import { GeneratorOptions, GeneratorOutput } from 'graphql-typescript-deluxe';
8
+
9
+ type RpcItem = {
10
+ id: string;
11
+ timestamp?: number;
12
+ source: string;
13
+ name: string;
14
+ identifier: 'fragment' | 'query' | 'mutation';
15
+ filePath: string;
16
+ };
17
+
18
+ interface ModuleOptions {
19
+ /**
20
+ * File glob patterns for the auto import feature.
21
+ *
22
+ * If left empty, no documents are auto imported.
23
+ *
24
+ * @default
25
+ * ```json
26
+ * ["**\/.{gql,graphql}", "!node_modules"]
27
+ * ```
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * // Load .graphql files from pages folder and from a node_modules dependency.
32
+ * const autoImportPatterns = [
33
+ * './pages/**\/*.graphql',
34
+ * 'node_modules/my_library/dist/**\/*.graphql'
35
+ * ]
36
+ * ```
37
+ */
38
+ autoImportPatterns?: string[];
39
+ /**
40
+ * The path where your graphql.config.ts is, relative to the location of nuxt.config.ts.
41
+ *
42
+ * Used to generate the correct paths in the graphql.config.ts file generated by the module.
43
+ *
44
+ * @default "./graphql.config.ts"
45
+ */
46
+ graphqlConfigFilePath?: string;
47
+ /**
48
+ * Additional raw documents to include.
49
+ *
50
+ * Useful if for example you need to generate queries during build time.
51
+ *
52
+ * @default []
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * const documents = [`
57
+ * query myQuery {
58
+ * articles {
59
+ * title
60
+ * id
61
+ * }
62
+ * }`,
63
+ * ...getGeneratedDocuments()
64
+ * ]
65
+ * ```
66
+ */
67
+ documents?: string[];
68
+ /**
69
+ * Wether the useGraphqlQuery, useGraphqlMutation and useGraphqlState
70
+ * composables should be included.
71
+ *
72
+ * @default ```ts
73
+ * true
74
+ * ```
75
+ */
76
+ includeComposables?: boolean;
77
+ /**
78
+ * Enable support for uploading files via GraphQL.
79
+ *
80
+ * When enabled, an additional `useGraphqlUploadMutation` composable is
81
+ * included, in addition to a new server endpoint that handles multi part
82
+ * file uploads for GraphQL mutations.
83
+ */
84
+ enableFileUploads?: boolean;
85
+ /**
86
+ * Enable detailled debugging messages.
87
+ *
88
+ * @default false
89
+ */
90
+ debug?: boolean;
91
+ /**
92
+ * Displays GraphQL response errors in an overlay in dev mode.
93
+ */
94
+ errorOverlay?: boolean;
95
+ /**
96
+ * The URL of the GraphQL server.
97
+ *
98
+ * For the runtime execution you can provide a method that determines the endpoint
99
+ * during runtime. See the server/graphqlMiddleware.serverOptions.ts documentation
100
+ * for more information.
101
+ */
102
+ graphqlEndpoint: string;
103
+ /**
104
+ * Download the GraphQL schema and store it on disk.
105
+ *
106
+ * Usually you'll want to only enable this during dev mode.
107
+ *
108
+ * @default true
109
+ */
110
+ downloadSchema?: boolean;
111
+ /**
112
+ * Path to the GraphQL schema file.
113
+ *
114
+ * If `downloadSchema` is `true`, the downloaded schema is written to this specified path.
115
+ * If `downloadSchema` is `false`, this file must be present in order to generate types.
116
+ *
117
+ * @default './schema.graphql'
118
+ */
119
+ schemaPath?: string;
120
+ /**
121
+ * The prefix for the server route.
122
+ *
123
+ * @default ```ts
124
+ * "/api/graphql_middleware"
125
+ * ```
126
+ */
127
+ serverApiPrefix?: string;
128
+ /**
129
+ * Logs only errors.
130
+ *
131
+ * When enabled only errors are logged to the console when generating the GraphQL operations.
132
+ * If false, all operations are logged, including valid ones.
133
+ */
134
+ logOnlyErrors?: boolean;
135
+ /**
136
+ * Options for graphql-typescript-deluxe code generator.
137
+ *
138
+ * @see [GeneratorOptions](https://github.com/dulnan/graphql-typescript-deluxe/blob/main/src/types/options.ts#L193)
139
+ */
140
+ codegenConfig?: GeneratorOptions;
141
+ /**
142
+ * Configuration for graphql-codegen when downloading the schema.
143
+ */
144
+ codegenSchemaConfig?: {
145
+ /**
146
+ * Configure how the schema.graphql file should be generated.
147
+ *
148
+ * @see [SchemaASTConfig](https://github.com/dotansimha/graphql-code-generator/blob/master/packages/plugins/other/schema-ast/src/index.ts#L23)
149
+ */
150
+ schemaAstConfig?: SchemaASTConfig;
151
+ /**
152
+ * Configure how the schema-ast introspection request should be made.
153
+ *
154
+ * Usually this is where you can provide a custom authentication header:
155
+ *
156
+ * ```typescript
157
+ * const codegenSchemaConfig = {
158
+ * urlSchemaOptions: {
159
+ * headers: {
160
+ * authentication: 'foobar',
161
+ * }
162
+ * }
163
+ * }
164
+ * ```
165
+ *
166
+ * @see [Types.UrlSchemaOptions](https://github.com/dotansimha/graphql-code-generator/blob/master/packages/utils/plugins-helpers/src/types.ts#L82)
167
+ */
168
+ urlSchemaOptions?: Types.UrlSchemaOptions;
169
+ };
170
+ /**
171
+ * Enable Nuxt DevTools integration.
172
+ */
173
+ devtools?: boolean;
174
+ /**
175
+ * Client caching configuration.
176
+ */
177
+ clientCache?: {
178
+ enabled?: boolean;
179
+ maxSize?: number;
180
+ };
181
+ }
182
+
183
+ declare const defaultOptions: ModuleOptions;
184
+
185
+ declare class ConsolePrompt {
186
+ private abortController;
187
+ confirm(message: string): Promise<'yes' | 'no' | 'cancel'>;
188
+ abort(): void;
189
+ }
190
+
191
+ type TemplateOptions = {
192
+ path: string;
193
+ virtual?: boolean;
194
+ isFullPath?: boolean;
195
+ };
196
+ type GeneratorTemplateCallback = (output: GeneratorOutput, helper: ModuleHelper, collector: Collector) => string;
197
+ type StaticTemplateCallback = (helper: ModuleHelper) => string;
198
+ type GeneratorTemplate = {
199
+ type: 'generator';
200
+ options: TemplateOptions;
201
+ build: GeneratorTemplateCallback | null;
202
+ buildTypes: GeneratorTemplateCallback | null;
203
+ virtual?: boolean;
204
+ };
205
+ type StaticTemplate = {
206
+ type: 'static';
207
+ options: TemplateOptions;
208
+ build: StaticTemplateCallback | null;
209
+ buildTypes: StaticTemplateCallback | null;
210
+ virtual?: boolean;
211
+ };
212
+
213
+ type WithRequired<T, K extends keyof T> = T & {
214
+ [P in K]-?: T[P];
215
+ };
216
+ type RequiredModuleOptions = WithRequired<ModuleOptions, keyof typeof defaultOptions>;
217
+ type ModuleHelperResolvers = {
218
+ /**
219
+ * Resolver for paths relative to the module root.
220
+ */
221
+ module: Resolver;
222
+ /**
223
+ * Resolve relative to the app's server directory.
224
+ */
225
+ server: Resolver;
226
+ /**
227
+ * Resolve relative to the Nuxt src folder.
228
+ */
229
+ src: Resolver;
230
+ /**
231
+ * Resolve relative to the Nuxt app directory.
232
+ */
233
+ app: Resolver;
234
+ /**
235
+ * Resolve relative to the Nuxt root.
236
+ *
237
+ * Should be where nuxt.config.ts is located.
238
+ */
239
+ root: Resolver;
240
+ };
241
+ type ModuleHelperPaths = {
242
+ runtimeTypes: string;
243
+ root: string;
244
+ nuxtConfig: string;
245
+ serverDir: string;
246
+ schema: string;
247
+ serverOptions: string | null;
248
+ clientOptions: string | null;
249
+ moduleBuildDir: string;
250
+ moduleTypesDir: string;
251
+ };
252
+ declare class ModuleHelper {
253
+ readonly nuxt: Nuxt;
254
+ readonly resolvers: ModuleHelperResolvers;
255
+ readonly paths: ModuleHelperPaths;
256
+ readonly isDev: boolean;
257
+ readonly options: RequiredModuleOptions;
258
+ readonly prompt: ConsolePrompt;
259
+ private nitroExternals;
260
+ private tsPaths;
261
+ constructor(nuxt: Nuxt, moduleUrl: string, options: ModuleOptions);
262
+ /**
263
+ * Find the path to the graphqlMiddleware.serverOptions.ts file.
264
+ */
265
+ private findServerOptions;
266
+ private findClientOptions;
267
+ /**
268
+ * Transform the path relative to the module's build directory.
269
+ *
270
+ * @param path - The absolute path.
271
+ *
272
+ * @returns The path relative to the module's build directory.
273
+ */
274
+ toModuleBuildRelative(path: string): string;
275
+ /**
276
+ * Transform the path relative to the Nuxt build directory.
277
+ *
278
+ * @param path - The absolute path.
279
+ *
280
+ * @returns The path relative to the module's build directory.
281
+ */
282
+ toBuildRelative(path: string): string;
283
+ /**
284
+ * Get all file paths that match the import patterns.
285
+ */
286
+ getImportPatternFiles(): Promise<string[]>;
287
+ matchesImportPattern(filePath: string): boolean;
288
+ addAlias(name: string, path: string): void;
289
+ inlineNitroExternals(arg: ResolvedNuxtTemplate | string): void;
290
+ transpile(path: string): void;
291
+ applyBuildConfig(): void;
292
+ processTemplate(path: string, content: string): string;
293
+ addTemplate(template: StaticTemplate): void;
294
+ addPlugin(name: string): void;
295
+ addServerHandler(name: string, path: string, method: RouterMethod): void;
296
+ addComposable(name: string): void;
297
+ addServerUtil(name: string): void;
298
+ }
299
+
300
+ type CollectorWatchEventResult = {
301
+ hasChanged: boolean;
302
+ affectedOperations: string[];
303
+ error?: {
304
+ message: string;
305
+ };
306
+ };
307
+ declare class Collector {
308
+ private schema;
309
+ private helper;
310
+ /**
311
+ * All collected files.
312
+ */
313
+ private files;
314
+ /**
315
+ * All documents provided by hooks.
316
+ */
317
+ private hookDocuments;
318
+ /**
319
+ * All file paths provided by hooks.
320
+ */
321
+ private hookFiles;
322
+ /**
323
+ * The code generator.
324
+ */
325
+ private generator;
326
+ /**
327
+ * A map of operation name and timestamp when the operation was last validated.
328
+ */
329
+ private operationTimestamps;
330
+ /**
331
+ * The generated operations and fragments.
332
+ */
333
+ readonly rpcItems: Map<string, RpcItem>;
334
+ /**
335
+ * The registered templates.
336
+ */
337
+ private templates;
338
+ /**
339
+ * The generated template contents.
340
+ */
341
+ private templateResult;
342
+ private isInitialised;
343
+ constructor(schema: GraphQLSchema, helper: ModuleHelper);
344
+ reset(): Promise<void>;
345
+ updateSchema(schema: GraphQLSchema): Promise<void>;
346
+ private filePathToBuildRelative;
347
+ private filePathToSourceRelative;
348
+ private operationToLogEntry;
349
+ private getTemplate;
350
+ /**
351
+ * Executes code gen and performs validation for operations.
352
+ */
353
+ private buildState;
354
+ private buildErrorMessage;
355
+ private logError;
356
+ /**
357
+ * Initialise the collector.
358
+ *
359
+ * In dev mode, the method will call itself recursively until all documents
360
+ * are valid.
361
+ *
362
+ * If not in dev mode the method will throw an error when documents are not
363
+ * valid.
364
+ */
365
+ init(): Promise<void>;
366
+ addHookDocument(identifier: string, source: string): void;
367
+ addOrUpdateHookDocument(identifier: string, source: string): Promise<void>;
368
+ addHookFile(filePath: string): void;
369
+ /**
370
+ * Initialise the collector.
371
+ */
372
+ private initDocuments;
373
+ /**
374
+ * Add a file.
375
+ */
376
+ private addFile;
377
+ private matchesPatternOrExists;
378
+ private handleAdd;
379
+ private handleChange;
380
+ private handleUnlink;
381
+ private handleUnlinkDir;
382
+ /**
383
+ * Handle the watcher event for the given file path.
384
+ */
385
+ handleWatchEvent(event: WatchEvent, filePath: string): Promise<CollectorWatchEventResult>;
386
+ /**
387
+ * Adds a virtual template (not written to disk) for both Nuxt and Nitro.
388
+ *
389
+ * For some reason a template written to disk works for both Nuxt and Nitro,
390
+ * but a virtual template requires adding two templates.
391
+ */
392
+ private addVirtualTemplate;
393
+ /**
394
+ * Adds a template that dependes on Collector state.
395
+ */
396
+ addTemplate(template: GeneratorTemplate): void;
397
+ /**
398
+ * Get the hook documents.
399
+ */
400
+ getHookDocuments(): {
401
+ identifier: string;
402
+ source: string;
403
+ }[];
404
+ /**
405
+ * Get the hook documents.
406
+ */
407
+ getHookFiles(): string[];
408
+ }
409
+
410
+ /**
411
+ * Handles downloading, loading and saving the GraphQL schema.
412
+ */
413
+ declare class SchemaProvider {
414
+ private helper;
415
+ /**
416
+ * The raw schema content.
417
+ */
418
+ private schemaContent;
419
+ /**
420
+ * The parsed schema object.
421
+ */
422
+ private schema;
423
+ constructor(helper: ModuleHelper);
424
+ init(): Promise<void>;
425
+ private loadFromDiskFallback;
426
+ /**
427
+ * Loads the schema from disk.
428
+ *
429
+ * @returns The schema contents from disk.
430
+ */
431
+ private loadSchemaFromDisk;
432
+ /**
433
+ * Downloads the schema and saves it to disk.
434
+ *
435
+ * @returns The schema contents.
436
+ */
437
+ private downloadSchema;
438
+ /**
439
+ * Determine if the schema exists on disk.
440
+ *
441
+ * @returns True if the schema file exists on disk.
442
+ */
443
+ hasSchemaOnDisk(): Promise<boolean>;
444
+ /**
445
+ * Load the schema either from disk or by downloading it.
446
+ *
447
+ * @param forceDownload - Forces downloading the schema.
448
+ */
449
+ loadSchema(opts?: {
450
+ forceDownload?: boolean;
451
+ forceDisk?: boolean;
452
+ }): Promise<void>;
453
+ /**
454
+ * Get the schema.
455
+ *
456
+ * @returns The parsed GraphQL schema object.
457
+ */
458
+ getSchema(): GraphQLSchema;
459
+ }
460
+
461
+ /**
462
+ * The public module context class.
463
+ */
464
+ declare class ModuleContext {
465
+ private schemaProvider;
466
+ private collector;
467
+ constructor(schemaProvider: SchemaProvider, collector: Collector);
468
+ /**
469
+ * Return the GraphQL schema.
470
+ *
471
+ * Note that the schema may be updated during development, so it can become
472
+ * stale. Prefer using methods like `schemaHasType()` to query the schema.
473
+ *
474
+ * @returns The GraphQL schema.
475
+ */
476
+ getSchema(): GraphQLSchema;
477
+ /**
478
+ * Check if the given GraphQL type (interface, concrete type, enum, input type)
479
+ * exists in the schema.
480
+ *
481
+ * @param name - The name of the type.
482
+ *
483
+ * @returns True if the type exists in the schema.
484
+ */
485
+ schemaHasType(name: string): boolean;
486
+ /**
487
+ * Get a type from the schema.
488
+ *
489
+ * @param name - The name of the type.
490
+ *
491
+ * @returns The type.
492
+ */
493
+ schemaGetType(name: string): GraphQLNamedType | undefined;
494
+ /**
495
+ * Add an additional static document.
496
+ *
497
+ * @param identifier - The unique identifier for your document.
498
+ * @param source - The document source.
499
+ */
500
+ addDocument(identifier: string, source: string): ModuleContext;
501
+ /**
502
+ * Add or update an additional static document.
503
+ *
504
+ * @param identifier - The unique identifier for your document.
505
+ * @param source - The document source.
506
+ */
507
+ addOrUpdateDocument(identifier: string, source: string): Promise<ModuleContext>;
508
+ /**
509
+ * Add an additional GraphQL file to import.
510
+ *
511
+ * @param filePath - The absolute path to the file.
512
+ */
513
+ addImportFile(filePath: string): ModuleContext;
514
+ }
515
+
516
+ export { ModuleContext as M };
517
+ export type { ModuleOptions as a };
package/dist/types.d.mts CHANGED
@@ -1,7 +1 @@
1
- import type { NuxtModule } from '@nuxt/schema'
2
-
3
- import type { default as Module } from './module.js'
4
-
5
- export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
-
7
- export { type GraphqlMiddlewareServerOptions } from './module.js'
1
+ export { type ModuleOptions, default } from './module.mjs'
@@ -0,0 +1,15 @@
1
+ import { M as ModuleContext } from './shared/nuxt-graphql-middleware.cXfDI4U3.mjs';
2
+ import 'graphql';
3
+ import 'nuxt/schema';
4
+ import '@nuxt/kit';
5
+ import 'h3';
6
+ import '@graphql-codegen/plugin-helpers';
7
+ import '@graphql-codegen/schema-ast';
8
+ import 'graphql-typescript-deluxe';
9
+
10
+ declare function useGraphqlModuleContext(): ModuleContext;
11
+ declare function useGraphqlModuleContext(options: {
12
+ nullOnMissing: true;
13
+ }): ModuleContext | null;
14
+
15
+ export { ModuleContext, useGraphqlModuleContext };
package/dist/utils.mjs ADDED
@@ -0,0 +1,18 @@
1
+ import { useNuxt } from '@nuxt/kit';
2
+
3
+ const CONTEXT_KEY = "_nuxt_graphql_middleware";
4
+ function useGraphqlModuleContext(options) {
5
+ const nuxt = useNuxt();
6
+ const context = nuxt[CONTEXT_KEY];
7
+ if (!context) {
8
+ if (options?.nullOnMissing) {
9
+ return null;
10
+ }
11
+ throw new Error(
12
+ "nuxt-graphql-middleware context is not available. Make sure you call this method only after nuxt-graphql-middleware has been setup. If you call this in a module, make sure your module is declared after nuxt-graphql-middleware in your `modules` Nuxt config."
13
+ );
14
+ }
15
+ return context;
16
+ }
17
+
18
+ export { useGraphqlModuleContext };
package/package.json CHANGED
@@ -1,39 +1,42 @@
1
1
  {
2
2
  "name": "nuxt-graphql-middleware",
3
- "version": "5.0.0-alpha.9",
3
+ "version": "5.0.0",
4
4
  "description": "Module to perform GraphQL requests as a server middleware.",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/dulnan/nuxt-graphql-middleware.git"
8
8
  },
9
- "license": "MIT",
10
9
  "type": "module",
11
10
  "exports": {
12
11
  ".": {
13
- "import": {
14
- "types": "./dist/types.d.ts",
15
- "default": "./dist/module.mjs"
16
- },
17
- "require": {
18
- "types": "./dist/types.d.ts",
19
- "default": "./dist/module.cjs"
20
- }
21
- },
22
- "./dist/runtime/serverOptions": {
23
- "import": "./dist/runtime/serverOptions/index.js",
24
- "types": "./dist/runtime/serverOptions/index.d.ts"
12
+ "types": "./dist/types.d.mts",
13
+ "import": "./dist/module.mjs"
25
14
  },
26
- "./dist/runtime/clientOptions": {
27
- "import": "./dist/runtime/clientOptions/index.js",
28
- "types": "./dist/runtime/clientOptions/index.d.ts"
15
+ "./utils": "./dist/utils.mjs",
16
+ "./client-options": "./dist/client-options.mjs",
17
+ "./server-options": "./dist/server-options.mjs"
18
+ },
19
+ "main": "./dist/module.mjs",
20
+ "typesVersions": {
21
+ "*": {
22
+ ".": [
23
+ "./dist/types.d.mts"
24
+ ],
25
+ "utils": [
26
+ "./dist/utils.d.mts"
27
+ ],
28
+ "client-options": [
29
+ "./dist/client-options.d.mts"
30
+ ],
31
+ "server-options": [
32
+ "./dist/server-options.d.mts"
33
+ ]
29
34
  }
30
35
  },
31
- "main": "./dist/module.cjs",
32
- "module": "./dist/module.mjs",
33
- "types": "./dist/types.d.ts",
34
36
  "files": [
35
37
  "dist"
36
38
  ],
39
+ "license": "MIT",
37
40
  "scripts": {
38
41
  "prepack": "npm run styles:build && nuxt-module-build build && npm run client:build",
39
42
  "dev": "nuxi dev playground --trace-warnings",
@@ -41,15 +44,16 @@
41
44
  "debug": "nuxi dev playground --inspect",
42
45
  "dev:build": "nuxi build playground",
43
46
  "dev:layers:build": "nuxi build playground-layers",
44
- "dev:prepare": "MODULE_BUILD=true nuxt-module-build build --stub && MODULE_BUILD=true nuxt-module-build prepare && nuxi prepare playground-layers && nuxi prepare playground",
47
+ "dev:prepare": "PLAYGROUND_MODULE_BUILD=true nuxt-module-build build --stub && PLAYGROUND_MODULE_BUILD=true nuxt-module-build prepare && nuxi prepare playground-layers && nuxi prepare playground",
45
48
  "dev:start": "node ./playground/.output/server/index.mjs",
46
49
  "client:build": "nuxi generate client",
47
50
  "client:dev": "nuxi dev client --port 3300",
48
- "typedoc": "typedoc --plugin typedoc-plugin-markdown --out foobar",
49
51
  "typecheck": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit && cd ../playground-layers && vue-tsc --noEmit",
50
52
  "docs:dev": "vitepress dev docs --port 5000",
51
53
  "docs:build": "vitepress build docs",
52
54
  "docs:serve": "vitepress serve docs --port 5000",
55
+ "typedoc": "./scripts/typedoc.sh",
56
+ "typedoc:generate": "typedoc --tsconfig tsconfig.typedoc.json",
53
57
  "cypress": "cypress run --e2e",
54
58
  "cypress:open": "cypress open --e2e",
55
59
  "lint": "eslint ./src",
@@ -69,7 +73,7 @@
69
73
  "@graphql-codegen/schema-ast": "^4.1.0",
70
74
  "@graphql-tools/utils": "^10.8.6",
71
75
  "@nuxt/devtools-kit": "^2.3.1",
72
- "graphql-typescript-deluxe": "^0.0.8",
76
+ "graphql-typescript-deluxe": "^0.0.13",
73
77
  "minisearch": "^7.1.2",
74
78
  "picocolors": "^1.1.1"
75
79
  },
@@ -78,16 +82,16 @@
78
82
  "@nuxt/devtools": "^2.3.1",
79
83
  "@nuxt/devtools-ui-kit": "^2.3.1",
80
84
  "@nuxt/eslint": "^1.2.0",
81
- "@nuxt/kit": "^3.16.1",
82
- "@nuxt/module-builder": "^0.8.4",
83
- "@nuxt/schema": "^3.16.1",
85
+ "@nuxt/kit": "^3.16.2",
86
+ "@nuxt/module-builder": "^1.0.1",
87
+ "@nuxt/schema": "^3.16.2",
84
88
  "@types/micromatch": "^4.0.9",
85
89
  "cypress": "^13.12.0",
86
90
  "eslint": "^9.23.0",
87
91
  "eslint-config-prettier": "^10.1.1",
88
92
  "eslint-plugin-prettier": "^5.2.3",
89
93
  "mermaid": "^11.5.0",
90
- "nuxt": "^3.16.1",
94
+ "nuxt": "^3.16.2",
91
95
  "postcss": "^8.5.3",
92
96
  "postcss-cli": "^11.0.1",
93
97
  "postcss-import": "^16.1.0",
@@ -98,10 +102,10 @@
98
102
  "tailwindcss": "^3.4.17",
99
103
  "tailwindcss-scoped-preflight": "^3.4.10",
100
104
  "typedoc": "^0.28.1",
101
- "typedoc-plugin-markdown": "^4.5.2",
105
+ "typedoc-plugin-markdown": "^4.6.1",
106
+ "typedoc-vitepress-theme": "^1.1.2",
102
107
  "vitepress": "^1.6.3",
103
108
  "vitepress-plugin-mermaid": "^2.0.17",
104
- "vitest": "^1.6.0",
105
- "vue-tsc": "^2.2.8"
109
+ "vitest": "^1.6.0"
106
110
  }
107
111
  }
@@ -1 +0,0 @@
1
- import{_ as s,t as a,v as i,x as e,y as o}from"./VpkRx2_e.js";import{u}from"./BLvMh1Ga.js";const l={class:"antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black"},c={class:"max-w-520px text-center"},d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const r=t;return u({title:`${r.statusCode} - ${r.statusMessage} | ${r.appName}`,script:[{children:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver((e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)})).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{children:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1{font-size:inherit;font-weight:inherit}h1,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(g,n)=>(i(),a("div",l,[n[0]||(n[0]=e("div",{class:"-bottom-1/2 fixed h-1/2 left-0 right-0 spotlight"},null,-1)),e("div",c,[e("h1",{class:"font-medium mb-8 sm:text-10xl text-8xl",textContent:o(t.statusCode)},null,8,d),e("p",{class:"font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl",textContent:o(t.description)},null,8,p)])]))}},b=s(f,[["__scopeId","data-v-9ae14d19"]]);export{b as default};