nuxt-graphql-middleware 5.0.0-alpha.16 → 5.0.0-alpha.18
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/dist/client/200.html +6 -6
- package/dist/client/404.html +6 -6
- package/dist/client/_nuxt/{B2Rg1ezw.js → BM34SYth.js} +1 -1
- package/dist/client/_nuxt/{AZpplOcD.js → CROlboVl.js} +1 -1
- package/dist/client/_nuxt/{M311G39J.js → D5hBL5aZ.js} +3 -3
- package/dist/client/_nuxt/{u9er1db2.js → FTbv7CO6.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/f9591c09-e7d8-4bd8-85b5-0987cee82c28.json +1 -0
- package/dist/client/_nuxt/{Bt6N0bOg.js → lIgCBhS_.js} +2 -2
- package/dist/client/index.html +6 -6
- package/dist/client-options.d.mts +6 -0
- package/dist/client-options.mjs +5 -0
- package/dist/module.d.mts +9 -506
- package/dist/module.json +3 -3
- package/dist/module.mjs +25 -38
- package/dist/runtime/components/CodeFrame.vue +19 -28
- package/dist/runtime/components/CodeFrame.vue.d.ts +7 -0
- package/dist/runtime/components/DevModeOverlay.vue +25 -33
- package/dist/runtime/components/DevModeOverlay.vue.d.ts +3 -0
- package/dist/runtime/components/ErrorExtensions.vue +9 -11
- package/dist/runtime/components/ErrorExtensions.vue.d.ts +5 -0
- package/dist/runtime/components/ErrorGroup.vue +27 -38
- package/dist/runtime/components/ErrorGroup.vue.d.ts +9 -0
- package/dist/server-options.d.mts +8 -0
- package/dist/server-options.mjs +5 -0
- package/dist/{module.d.ts → shared/nuxt-graphql-middleware.DLNGE1zJ.d.mts} +15 -88
- package/dist/types.d.mts +1 -7
- package/dist/utils.d.mts +15 -0
- package/dist/utils.mjs +18 -0
- package/package.json +25 -23
- package/dist/client/_nuxt/builds/meta/e1a39e19-d46f-47f9-88fd-317d5fa8bf87.json +0 -1
- package/dist/module.cjs +0 -5
- package/dist/runtime/clientOptions/index.d.ts +0 -2
- package/dist/runtime/clientOptions/index.js +0 -3
- package/dist/runtime/serverOptions/defineGraphqlServerOptions.d.ts +0 -4
- package/dist/runtime/serverOptions/defineGraphqlServerOptions.js +0 -3
- package/dist/runtime/serverOptions/index.d.ts +0 -2
- package/dist/runtime/serverOptions/index.js +0 -2
- package/dist/types.d.ts +0 -7
|
@@ -23,39 +23,30 @@
|
|
|
23
23
|
</div>
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
|
-
<script setup
|
|
27
|
-
import { computed } from
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const before = 20
|
|
36
|
-
const after = 20
|
|
37
|
-
|
|
26
|
+
<script setup>
|
|
27
|
+
import { computed } from "#imports";
|
|
28
|
+
const props = defineProps({
|
|
29
|
+
source: { type: String, required: true },
|
|
30
|
+
line: { type: Number, required: true },
|
|
31
|
+
column: { type: Number, required: true }
|
|
32
|
+
});
|
|
33
|
+
const before = 20;
|
|
34
|
+
const after = 20;
|
|
38
35
|
const lines = computed(() => {
|
|
39
|
-
const fullLines = props.source.split(
|
|
40
|
-
const indexStart = Math.max(props.line - before - 1, 0)
|
|
41
|
-
const indexEnd = Math.min(props.line + after, fullLines.length)
|
|
42
|
-
|
|
43
|
-
// Take only the lines we care about
|
|
44
|
-
const sliced = fullLines.slice(indexStart, indexEnd)
|
|
45
|
-
|
|
46
|
-
// Remove trailing empty lines
|
|
36
|
+
const fullLines = props.source.split("\n");
|
|
37
|
+
const indexStart = Math.max(props.line - before - 1, 0);
|
|
38
|
+
const indexEnd = Math.min(props.line + after, fullLines.length);
|
|
39
|
+
const sliced = fullLines.slice(indexStart, indexEnd);
|
|
47
40
|
while (sliced.length && !sliced[sliced.length - 1]?.trim()) {
|
|
48
|
-
sliced.pop()
|
|
41
|
+
sliced.pop();
|
|
49
42
|
}
|
|
50
|
-
|
|
51
|
-
// Map to your final structure
|
|
52
43
|
return sliced.map((code, i) => {
|
|
53
|
-
const lineNumber = indexStart + i + 1
|
|
44
|
+
const lineNumber = indexStart + i + 1;
|
|
54
45
|
return {
|
|
55
46
|
lineNumber,
|
|
56
47
|
code,
|
|
57
|
-
isHighlighted: lineNumber === props.line
|
|
58
|
-
}
|
|
59
|
-
})
|
|
60
|
-
})
|
|
48
|
+
isHighlighted: lineNumber === props.line
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
});
|
|
61
52
|
</script>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
source: string;
|
|
3
|
+
line: number;
|
|
4
|
+
column: number;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -21,40 +21,32 @@
|
|
|
21
21
|
</div>
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
|
-
<script setup
|
|
25
|
-
import
|
|
26
|
-
import { useState, computed } from
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
() => [],
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
const groups = computed<OperationResponseError[]>(() => {
|
|
24
|
+
<script setup>
|
|
25
|
+
import "./../css/output.css";
|
|
26
|
+
import { useState, computed } from "#imports";
|
|
27
|
+
import ErrorGroup from "./ErrorGroup.vue";
|
|
28
|
+
const errors = useState(
|
|
29
|
+
"nuxt-graphql-middleware-errors",
|
|
30
|
+
() => []
|
|
31
|
+
);
|
|
32
|
+
const groups = computed(() => {
|
|
37
33
|
return [
|
|
38
|
-
...errors.value
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
]
|
|
54
|
-
})
|
|
55
|
-
|
|
56
|
-
/** Clear the error state => close/hide the overlay */
|
|
34
|
+
...errors.value.reduce((acc, v) => {
|
|
35
|
+
const key = `${v.operation}_${v.operationName}`;
|
|
36
|
+
if (!acc.has(key)) {
|
|
37
|
+
acc.set(key, {
|
|
38
|
+
operation: v.operation,
|
|
39
|
+
operationName: v.operationName,
|
|
40
|
+
errors: [],
|
|
41
|
+
stack: v.stack
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
acc.get(key).errors.push(...v.errors);
|
|
45
|
+
return acc;
|
|
46
|
+
}, /* @__PURE__ */ new Map()).values()
|
|
47
|
+
];
|
|
48
|
+
});
|
|
57
49
|
function clearErrors() {
|
|
58
|
-
errors.value = []
|
|
50
|
+
errors.value = [];
|
|
59
51
|
}
|
|
60
52
|
</script>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import './../css/output.css.js';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
3
|
+
export default _default;
|
|
@@ -5,19 +5,17 @@
|
|
|
5
5
|
</tr>
|
|
6
6
|
</template>
|
|
7
7
|
|
|
8
|
-
<script setup
|
|
9
|
-
import { computed } from
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}>()
|
|
14
|
-
|
|
8
|
+
<script setup>
|
|
9
|
+
import { computed } from "#imports";
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
extensions: { type: Object, required: false }
|
|
12
|
+
});
|
|
15
13
|
const mapped = computed(() => {
|
|
16
14
|
if (!props.extensions) {
|
|
17
|
-
return []
|
|
15
|
+
return [];
|
|
18
16
|
}
|
|
19
17
|
return Object.entries(props.extensions).map(([key, value]) => {
|
|
20
|
-
return { key, value }
|
|
21
|
-
})
|
|
22
|
-
})
|
|
18
|
+
return { key, value };
|
|
19
|
+
});
|
|
20
|
+
});
|
|
23
21
|
</script>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
extensions?: Record<string, unknown>;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
export default _default;
|
|
@@ -46,44 +46,33 @@
|
|
|
46
46
|
</table>
|
|
47
47
|
</template>
|
|
48
48
|
|
|
49
|
-
<script
|
|
50
|
-
import
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
errors: GraphqlResponseError[]
|
|
63
|
-
stack?: string
|
|
64
|
-
}>()
|
|
65
|
-
|
|
66
|
-
const key = computed(() => props.operation + '_' + props.operationName)
|
|
67
|
-
|
|
49
|
+
<script setup>
|
|
50
|
+
import { documents } from "#nuxt-graphql-middleware/documents";
|
|
51
|
+
import { operationSources } from "#nuxt-graphql-middleware/sources";
|
|
52
|
+
import { computed } from "#imports";
|
|
53
|
+
import CodeFrame from "./CodeFrame.vue";
|
|
54
|
+
import ErrorExtensions from "./ErrorExtensions.vue";
|
|
55
|
+
const props = defineProps({
|
|
56
|
+
operation: { type: String, required: true },
|
|
57
|
+
operationName: { type: String, required: true },
|
|
58
|
+
errors: { type: Array, required: true },
|
|
59
|
+
stack: { type: String, required: false }
|
|
60
|
+
});
|
|
61
|
+
const key = computed(() => props.operation + "_" + props.operationName);
|
|
68
62
|
const filePath = computed(() => {
|
|
69
|
-
return operationSources[key.value]
|
|
70
|
-
})
|
|
71
|
-
|
|
63
|
+
return operationSources[key.value];
|
|
64
|
+
});
|
|
72
65
|
const source = computed(
|
|
73
|
-
() =>
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}, new Map())
|
|
86
|
-
.values()
|
|
87
|
-
.toArray()
|
|
88
|
-
})
|
|
66
|
+
() => documents[props.operation]?.[props.operationName]
|
|
67
|
+
);
|
|
68
|
+
const uniqueErrors = computed(() => {
|
|
69
|
+
return props.errors.reduce((acc, v) => {
|
|
70
|
+
const key2 = v.message;
|
|
71
|
+
if (!acc.has(key2)) {
|
|
72
|
+
acc.set(key2, { ...v, key: key2, count: 0 });
|
|
73
|
+
}
|
|
74
|
+
acc.get(key2).count++;
|
|
75
|
+
return acc;
|
|
76
|
+
}, /* @__PURE__ */ new Map()).values().toArray();
|
|
77
|
+
});
|
|
89
78
|
</script>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { GraphqlResponseError } from '../types.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
operation: string;
|
|
4
|
+
operationName: string;
|
|
5
|
+
errors: GraphqlResponseError[];
|
|
6
|
+
stack?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GraphqlClientContext } from '#nuxt-graphql-middleware/client-options';
|
|
2
|
+
import { GraphqlMiddlewareResponseUnion } from '#nuxt-graphql-middleware/response';
|
|
3
|
+
import { GraphqlMiddlewareServerOptions } from '../dist/runtime/types.js';
|
|
4
|
+
export { GraphqlMiddlewareServerOptions } from '../dist/runtime/types.js';
|
|
5
|
+
|
|
6
|
+
declare function defineGraphqlServerOptions<T extends object = object>(options: GraphqlMiddlewareServerOptions<T, GraphqlMiddlewareResponseUnion, GraphqlClientContext>): GraphqlMiddlewareServerOptions<T, GraphqlMiddlewareResponseUnion, GraphqlClientContext>;
|
|
7
|
+
|
|
8
|
+
export { defineGraphqlServerOptions };
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
-
import { Types } from '@graphql-codegen/plugin-helpers';
|
|
3
|
-
import { SchemaASTConfig } from '@graphql-codegen/schema-ast';
|
|
4
|
-
import { GeneratorOptions, GeneratorOutput } from 'graphql-typescript-deluxe';
|
|
5
1
|
import { GraphQLSchema, GraphQLNamedType } from 'graphql';
|
|
6
|
-
import { Nuxt, ResolvedNuxtTemplate, WatchEvent
|
|
2
|
+
import { Nuxt, ResolvedNuxtTemplate, WatchEvent } from 'nuxt/schema';
|
|
7
3
|
import { Resolver } from '@nuxt/kit';
|
|
8
4
|
import { RouterMethod } from 'h3';
|
|
9
|
-
import {
|
|
10
|
-
|
|
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
|
+
};
|
|
11
17
|
|
|
12
18
|
interface ModuleOptions {
|
|
13
19
|
/**
|
|
@@ -180,15 +186,6 @@ interface ModuleOptions {
|
|
|
180
186
|
};
|
|
181
187
|
}
|
|
182
188
|
|
|
183
|
-
type RpcItem = {
|
|
184
|
-
id: string;
|
|
185
|
-
timestamp?: number;
|
|
186
|
-
source: string;
|
|
187
|
-
name: string;
|
|
188
|
-
identifier: 'fragment' | 'query' | 'mutation';
|
|
189
|
-
filePath: string;
|
|
190
|
-
};
|
|
191
|
-
|
|
192
189
|
declare const defaultOptions: ModuleOptions;
|
|
193
190
|
|
|
194
191
|
declare class ConsolePrompt {
|
|
@@ -501,75 +498,5 @@ declare class ModuleContext {
|
|
|
501
498
|
addImportFile(filePath: string): ModuleContext;
|
|
502
499
|
}
|
|
503
500
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
nullOnMissing: true;
|
|
507
|
-
}): ModuleContext | null;
|
|
508
|
-
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
509
|
-
|
|
510
|
-
declare module '#app' {
|
|
511
|
-
interface RuntimeNuxtHooks {
|
|
512
|
-
/**
|
|
513
|
-
* Emitted when any GraphQL response contains errors.
|
|
514
|
-
*/
|
|
515
|
-
'nuxt-graphql-middleware:errors': (errors: OperationResponseError) => HookResult;
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
declare module 'vite/types/customEvent.d.ts' {
|
|
519
|
-
interface CustomEventMap {
|
|
520
|
-
/**
|
|
521
|
-
* Emitted when GraphQL operations have been updated.
|
|
522
|
-
*/
|
|
523
|
-
'nuxt-graphql-middleware:reload': {
|
|
524
|
-
operations: string[];
|
|
525
|
-
};
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
declare module '@nuxt/schema' {
|
|
529
|
-
interface AppConfig {
|
|
530
|
-
graphqlMiddleware: {
|
|
531
|
-
/**
|
|
532
|
-
* Whether the client cache is enabled.
|
|
533
|
-
*/
|
|
534
|
-
clientCacheEnabled: boolean;
|
|
535
|
-
/**
|
|
536
|
-
* The max number of items in the cache.
|
|
537
|
-
*/
|
|
538
|
-
clientCacheMaxSize: number;
|
|
539
|
-
};
|
|
540
|
-
}
|
|
541
|
-
interface Nuxt {
|
|
542
|
-
/**
|
|
543
|
-
* The nuxt-graphql-middleware module context.
|
|
544
|
-
*/
|
|
545
|
-
_nuxt_graphql_middleware?: ModuleContext;
|
|
546
|
-
}
|
|
547
|
-
interface NuxtHooks {
|
|
548
|
-
/**
|
|
549
|
-
* Called once right before the documents are initialised.
|
|
550
|
-
*
|
|
551
|
-
* Use this hook to add any additional documents based on for example the parsed schema.
|
|
552
|
-
*
|
|
553
|
-
* @example
|
|
554
|
-
*
|
|
555
|
-
* ```typescript`
|
|
556
|
-
* export default defineNuxtConfig({
|
|
557
|
-
* hooks: {
|
|
558
|
-
* 'nuxt-graphql-middleware:init': (ctx) => {
|
|
559
|
-
* if (ctx.schemaHasType('Comment')) {
|
|
560
|
-
* ctx.addDocument(
|
|
561
|
-
* 'queryFromHook',
|
|
562
|
-
* `query loadComments { author subject date body }`
|
|
563
|
-
* )
|
|
564
|
-
* }
|
|
565
|
-
* },
|
|
566
|
-
* },
|
|
567
|
-
* })
|
|
568
|
-
* ```
|
|
569
|
-
*/
|
|
570
|
-
'nuxt-graphql-middleware:init': (ctx: ModuleContext) => void | Promise<void>;
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
export { _default as default, useGraphqlModuleContext };
|
|
575
|
-
export type { ModuleOptions };
|
|
501
|
+
export { ModuleContext as M };
|
|
502
|
+
export type { ModuleOptions as a };
|
package/dist/types.d.mts
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
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'
|
package/dist/utils.d.mts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { M as ModuleContext } from './shared/nuxt-graphql-middleware.DLNGE1zJ.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.
|
|
3
|
+
"version": "5.0.0-alpha.18",
|
|
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
|
-
"
|
|
14
|
-
|
|
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/
|
|
27
|
-
|
|
28
|
-
|
|
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",
|
|
@@ -79,7 +82,7 @@
|
|
|
79
82
|
"@nuxt/devtools-ui-kit": "^2.3.1",
|
|
80
83
|
"@nuxt/eslint": "^1.2.0",
|
|
81
84
|
"@nuxt/kit": "^3.16.2",
|
|
82
|
-
"@nuxt/module-builder": "^0.
|
|
85
|
+
"@nuxt/module-builder": "^1.0.1",
|
|
83
86
|
"@nuxt/schema": "^3.16.2",
|
|
84
87
|
"@types/micromatch": "^4.0.9",
|
|
85
88
|
"cypress": "^13.12.0",
|
|
@@ -102,7 +105,6 @@
|
|
|
102
105
|
"typedoc-vitepress-theme": "^1.1.2",
|
|
103
106
|
"vitepress": "^1.6.3",
|
|
104
107
|
"vitepress-plugin-mermaid": "^2.0.17",
|
|
105
|
-
"vitest": "^1.6.0"
|
|
106
|
-
"vue-tsc": "^2.2.8"
|
|
108
|
+
"vitest": "^1.6.0"
|
|
107
109
|
}
|
|
108
110
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"e1a39e19-d46f-47f9-88fd-317d5fa8bf87","timestamp":1744204371551,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
package/dist/module.cjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { GraphqlClientContext } from '#nuxt-graphql-middleware/client-options';
|
|
2
|
-
import type { GraphqlMiddlewareResponseUnion } from '#nuxt-graphql-middleware/response';
|
|
3
|
-
import type { GraphqlMiddlewareServerOptions } from './../types.js';
|
|
4
|
-
export declare function defineGraphqlServerOptions<T extends object>(options: GraphqlMiddlewareServerOptions<T, GraphqlMiddlewareResponseUnion, GraphqlClientContext>): GraphqlMiddlewareServerOptions<T, GraphqlMiddlewareResponseUnion, GraphqlClientContext>;
|
package/dist/types.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { NuxtModule } from '@nuxt/schema'
|
|
2
|
-
|
|
3
|
-
import type { default as Module } from './module'
|
|
4
|
-
|
|
5
|
-
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
6
|
-
|
|
7
|
-
export { type GraphqlMiddlewareServerOptions } from './module'
|