@as-integrations/h3 1.2.0 → 2.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.
package/README.md CHANGED
@@ -90,10 +90,8 @@ Then you can add a WebSocket handler to your `h3` app using the `defineGraphqlWe
90
90
  ```js
91
91
  import { createApp } from 'h3'
92
92
  import { ApolloServer } from '@apollo/server'
93
- import {
94
- startServerAndCreateH3Handler,
95
- defineGraphqlWebSocketHandler,
96
- } from '@as-integrations/h3'
93
+ import { startServerAndCreateH3Handler } from '@as-integrations/h3'
94
+ import { defineGraphqlWebSocketHandler } from '@as-integrations/h3/websocket'
97
95
  import { makeExecutableSchema } from '@graphql-tools/schema'
98
96
 
99
97
  // Define your schema and resolvers
package/dist/index.cjs CHANGED
@@ -1,7 +1,71 @@
1
- module.exports = require("/home/runner/work/apollo-server-integration-h3/apollo-server-integration-h3/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/lib/index.js")(null, {
2
- "esmResolve": true,
3
- "interopDefault": true,
4
- "alias": {
5
- "@as-integrations/h3": "/home/runner/work/apollo-server-integration-h3/apollo-server-integration-h3"
1
+ 'use strict';
2
+
3
+ const server = require('@apollo/server');
4
+ const h3 = require('h3');
5
+
6
+ function startServerAndCreateH3Handler(server, options) {
7
+ server.startInBackgroundHandlingStartupErrorsByLoggingAndFailingAllRequests();
8
+ const defaultContext = () => Promise.resolve({});
9
+ const contextFunction = options?.context ?? defaultContext;
10
+ return h3.eventHandler({
11
+ async handler(event) {
12
+ if (h3.isMethod(event, "OPTIONS")) {
13
+ return null;
14
+ }
15
+ try {
16
+ const graphqlRequest = await toGraphqlRequest(event);
17
+ const { body, headers, status } = await server.executeHTTPGraphQLRequest({
18
+ httpGraphQLRequest: graphqlRequest,
19
+ context: () => contextFunction({ event })
20
+ });
21
+ if (body.kind === "chunked") {
22
+ throw new Error("Incremental delivery not implemented");
23
+ }
24
+ h3.setHeaders(event, Object.fromEntries(headers));
25
+ event.res.statusCode = status || 200;
26
+ return body.string;
27
+ } catch (error) {
28
+ if (error instanceof SyntaxError) {
29
+ event.res.statusCode = 400;
30
+ return error.message;
31
+ } else {
32
+ throw error;
33
+ }
34
+ }
35
+ },
36
+ websocket: options?.websocket
37
+ });
38
+ }
39
+ async function toGraphqlRequest(event) {
40
+ return {
41
+ method: event.req.method || "POST",
42
+ headers: normalizeHeaders(h3.getHeaders(event)),
43
+ search: normalizeQueryString(event.req.url),
44
+ body: await normalizeBody(event)
45
+ };
46
+ }
47
+ function normalizeHeaders(headers) {
48
+ const headerMap = new server.HeaderMap();
49
+ for (const [key, value] of Object.entries(headers)) {
50
+ if (Array.isArray(value)) {
51
+ headerMap.set(key, value.join(","));
52
+ } else if (value) {
53
+ headerMap.set(key, value);
54
+ }
6
55
  }
7
- })("/home/runner/work/apollo-server-integration-h3/apollo-server-integration-h3/src/index.ts")
56
+ return headerMap;
57
+ }
58
+ function normalizeQueryString(url) {
59
+ if (!url) {
60
+ return "";
61
+ }
62
+ return url.split("?")[1] || "";
63
+ }
64
+ async function normalizeBody(event) {
65
+ const PayloadMethods = ["PATCH", "POST", "PUT", "DELETE"];
66
+ if (h3.isMethod(event, PayloadMethods)) {
67
+ return await h3.readBody(event);
68
+ }
69
+ }
70
+
71
+ exports.startServerAndCreateH3Handler = startServerAndCreateH3Handler;
@@ -0,0 +1,16 @@
1
+ import { BaseContext, ContextFunction, ApolloServer } from '@apollo/server';
2
+ import { Hooks } from 'crossws';
3
+ import { H3Event, EventHandler } from 'h3';
4
+ import { WithRequired } from '@apollo/utils.withrequired';
5
+
6
+ interface H3ContextFunctionArgument {
7
+ event: H3Event;
8
+ }
9
+ interface H3HandlerOptions<TContext extends BaseContext> {
10
+ context?: ContextFunction<[H3ContextFunctionArgument], TContext>;
11
+ websocket?: Partial<Hooks>;
12
+ }
13
+ declare function startServerAndCreateH3Handler(server: ApolloServer<BaseContext>, options?: H3HandlerOptions<BaseContext>): EventHandler;
14
+ declare function startServerAndCreateH3Handler<TContext extends BaseContext>(server: ApolloServer<TContext>, options: WithRequired<H3HandlerOptions<TContext>, 'context'>): EventHandler;
15
+
16
+ export { type H3ContextFunctionArgument, type H3HandlerOptions, startServerAndCreateH3Handler };
@@ -0,0 +1,16 @@
1
+ import { BaseContext, ContextFunction, ApolloServer } from '@apollo/server';
2
+ import { Hooks } from 'crossws';
3
+ import { H3Event, EventHandler } from 'h3';
4
+ import { WithRequired } from '@apollo/utils.withrequired';
5
+
6
+ interface H3ContextFunctionArgument {
7
+ event: H3Event;
8
+ }
9
+ interface H3HandlerOptions<TContext extends BaseContext> {
10
+ context?: ContextFunction<[H3ContextFunctionArgument], TContext>;
11
+ websocket?: Partial<Hooks>;
12
+ }
13
+ declare function startServerAndCreateH3Handler(server: ApolloServer<BaseContext>, options?: H3HandlerOptions<BaseContext>): EventHandler;
14
+ declare function startServerAndCreateH3Handler<TContext extends BaseContext>(server: ApolloServer<TContext>, options: WithRequired<H3HandlerOptions<TContext>, 'context'>): EventHandler;
15
+
16
+ export { type H3ContextFunctionArgument, type H3HandlerOptions, startServerAndCreateH3Handler };
package/dist/index.d.ts CHANGED
@@ -1 +1,16 @@
1
- export * from "/home/runner/work/apollo-server-integration-h3/apollo-server-integration-h3/src/index";
1
+ import { BaseContext, ContextFunction, ApolloServer } from '@apollo/server';
2
+ import { Hooks } from 'crossws';
3
+ import { H3Event, EventHandler } from 'h3';
4
+ import { WithRequired } from '@apollo/utils.withrequired';
5
+
6
+ interface H3ContextFunctionArgument {
7
+ event: H3Event;
8
+ }
9
+ interface H3HandlerOptions<TContext extends BaseContext> {
10
+ context?: ContextFunction<[H3ContextFunctionArgument], TContext>;
11
+ websocket?: Partial<Hooks>;
12
+ }
13
+ declare function startServerAndCreateH3Handler(server: ApolloServer<BaseContext>, options?: H3HandlerOptions<BaseContext>): EventHandler;
14
+ declare function startServerAndCreateH3Handler<TContext extends BaseContext>(server: ApolloServer<TContext>, options: WithRequired<H3HandlerOptions<TContext>, 'context'>): EventHandler;
15
+
16
+ export { type H3ContextFunctionArgument, type H3HandlerOptions, startServerAndCreateH3Handler };
package/dist/index.mjs CHANGED
@@ -1,14 +1,69 @@
1
- import jiti from "file:///home/runner/work/apollo-server-integration-h3/apollo-server-integration-h3/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/lib/index.js";
1
+ import { HeaderMap } from '@apollo/server';
2
+ import { eventHandler, isMethod, setHeaders, getHeaders, readBody } from 'h3';
2
3
 
3
- /** @type {import("/home/runner/work/apollo-server-integration-h3/apollo-server-integration-h3/src/index")} */
4
- const _module = jiti(null, {
5
- "esmResolve": true,
6
- "interopDefault": true,
7
- "alias": {
8
- "@as-integrations/h3": "/home/runner/work/apollo-server-integration-h3/apollo-server-integration-h3"
4
+ function startServerAndCreateH3Handler(server, options) {
5
+ server.startInBackgroundHandlingStartupErrorsByLoggingAndFailingAllRequests();
6
+ const defaultContext = () => Promise.resolve({});
7
+ const contextFunction = options?.context ?? defaultContext;
8
+ return eventHandler({
9
+ async handler(event) {
10
+ if (isMethod(event, "OPTIONS")) {
11
+ return null;
12
+ }
13
+ try {
14
+ const graphqlRequest = await toGraphqlRequest(event);
15
+ const { body, headers, status } = await server.executeHTTPGraphQLRequest({
16
+ httpGraphQLRequest: graphqlRequest,
17
+ context: () => contextFunction({ event })
18
+ });
19
+ if (body.kind === "chunked") {
20
+ throw new Error("Incremental delivery not implemented");
21
+ }
22
+ setHeaders(event, Object.fromEntries(headers));
23
+ event.res.statusCode = status || 200;
24
+ return body.string;
25
+ } catch (error) {
26
+ if (error instanceof SyntaxError) {
27
+ event.res.statusCode = 400;
28
+ return error.message;
29
+ } else {
30
+ throw error;
31
+ }
32
+ }
33
+ },
34
+ websocket: options?.websocket
35
+ });
36
+ }
37
+ async function toGraphqlRequest(event) {
38
+ return {
39
+ method: event.req.method || "POST",
40
+ headers: normalizeHeaders(getHeaders(event)),
41
+ search: normalizeQueryString(event.req.url),
42
+ body: await normalizeBody(event)
43
+ };
44
+ }
45
+ function normalizeHeaders(headers) {
46
+ const headerMap = new HeaderMap();
47
+ for (const [key, value] of Object.entries(headers)) {
48
+ if (Array.isArray(value)) {
49
+ headerMap.set(key, value.join(","));
50
+ } else if (value) {
51
+ headerMap.set(key, value);
52
+ }
9
53
  }
10
- })("/home/runner/work/apollo-server-integration-h3/apollo-server-integration-h3/src/index.ts");
54
+ return headerMap;
55
+ }
56
+ function normalizeQueryString(url) {
57
+ if (!url) {
58
+ return "";
59
+ }
60
+ return url.split("?")[1] || "";
61
+ }
62
+ async function normalizeBody(event) {
63
+ const PayloadMethods = ["PATCH", "POST", "PUT", "DELETE"];
64
+ if (isMethod(event, PayloadMethods)) {
65
+ return await readBody(event);
66
+ }
67
+ }
11
68
 
12
- export const startServerAndCreateH3Handler = _module.startServerAndCreateH3Handler;
13
- export const defineGraphqlWebSocket = _module.defineGraphqlWebSocket;
14
- export const defineGraphqlWebSocketHandler = _module.defineGraphqlWebSocketHandler;
69
+ export { startServerAndCreateH3Handler };
@@ -0,0 +1,62 @@
1
+ 'use strict';
2
+
3
+ const graphqlWs = require('graphql-ws');
4
+ const h3 = require('h3');
5
+
6
+ function defineGraphqlWebSocket(options) {
7
+ const server = graphqlWs.makeServer(options);
8
+ const peers = /* @__PURE__ */ new WeakMap();
9
+ return h3.defineWebSocket({
10
+ open(peer) {
11
+ const client = {
12
+ handleMessage: () => {
13
+ throw new Error("Message received before handler was registered");
14
+ },
15
+ closed: () => {
16
+ throw new Error("Closed before handler was registered");
17
+ }
18
+ };
19
+ client.closed = server.opened(
20
+ {
21
+ protocol: peer.request.headers?.get("Sec-WebSocket-Protocol") ?? "",
22
+ send: (message) => {
23
+ if (peers.has(peer)) {
24
+ peer.send(message);
25
+ }
26
+ },
27
+ close: (code, reason) => {
28
+ if (peers.has(peer)) {
29
+ peer.close(code, reason);
30
+ }
31
+ },
32
+ onMessage: (cb) => client.handleMessage = cb
33
+ },
34
+ { peer }
35
+ );
36
+ peers.set(peer, client);
37
+ },
38
+ message(peer, message) {
39
+ const client = peers.get(peer);
40
+ if (!client) throw new Error("Message received for a missing client");
41
+ return client.handleMessage(message.text());
42
+ },
43
+ close(peer, details) {
44
+ const client = peers.get(peer);
45
+ if (!client) throw new Error("Closing a missing client");
46
+ const upgradeProtocol = peer.request.headers?.get(
47
+ "Sec-WebSocket-Protocol"
48
+ );
49
+ if (details.code === graphqlWs.CloseCode.SubprotocolNotAcceptable && upgradeProtocol === graphqlWs.DEPRECATED_GRAPHQL_WS_PROTOCOL)
50
+ console.warn(
51
+ `Client provided the unsupported and deprecated subprotocol "${upgradeProtocol}" used by subscriptions-transport-ws.Please see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws.`
52
+ );
53
+ return client.closed(details.code, details.reason);
54
+ }
55
+ });
56
+ }
57
+ async function defineGraphqlWebSocketHandler(options) {
58
+ return h3.defineWebSocketHandler(defineGraphqlWebSocket(options));
59
+ }
60
+
61
+ exports.defineGraphqlWebSocket = defineGraphqlWebSocket;
62
+ exports.defineGraphqlWebSocketHandler = defineGraphqlWebSocketHandler;
@@ -0,0 +1,30 @@
1
+ import { ConnectionInitMessage, ServerOptions } from 'graphql-ws';
2
+ import { EventHandler, EventHandlerRequest } from 'h3';
3
+ import { Peer, Hooks } from 'crossws';
4
+
5
+ /**
6
+ * The extra that will be put in the `Context`.
7
+ *
8
+ * @category Server/h3
9
+ */
10
+ interface Extra {
11
+ /**
12
+ * The underlying WebSocket peer.
13
+ */
14
+ readonly peer: Peer;
15
+ }
16
+ /**
17
+ * Create the WebSocket hooks to be used with [h3](https://h3.unjs.io/).
18
+ *
19
+ * Use this over {@link defineGraphqlWebSocketHandler} if you need more control over the WebSocket server or
20
+ * if you want to add custom hooks (e.g. for authentication or logging).
21
+ */
22
+ declare function defineGraphqlWebSocket<P extends ConnectionInitMessage['payload'] = ConnectionInitMessage['payload'], E extends Record<PropertyKey, unknown> = Record<PropertyKey, never>>(options: ServerOptions<P, Extra & Partial<E>>): Partial<Hooks>;
23
+ /**
24
+ * Create a event handler to be used with [h3](https://h3.unjs.io/).
25
+ *
26
+ * @category Server/h3
27
+ */
28
+ declare function defineGraphqlWebSocketHandler<P extends ConnectionInitMessage['payload'] = ConnectionInitMessage['payload'], E extends Record<PropertyKey, unknown> = Record<PropertyKey, never>>(options: ServerOptions<P, Extra & Partial<E>>): Promise<EventHandler<EventHandlerRequest, never>>;
29
+
30
+ export { type Extra, defineGraphqlWebSocket, defineGraphqlWebSocketHandler };
@@ -0,0 +1,30 @@
1
+ import { ConnectionInitMessage, ServerOptions } from 'graphql-ws';
2
+ import { EventHandler, EventHandlerRequest } from 'h3';
3
+ import { Peer, Hooks } from 'crossws';
4
+
5
+ /**
6
+ * The extra that will be put in the `Context`.
7
+ *
8
+ * @category Server/h3
9
+ */
10
+ interface Extra {
11
+ /**
12
+ * The underlying WebSocket peer.
13
+ */
14
+ readonly peer: Peer;
15
+ }
16
+ /**
17
+ * Create the WebSocket hooks to be used with [h3](https://h3.unjs.io/).
18
+ *
19
+ * Use this over {@link defineGraphqlWebSocketHandler} if you need more control over the WebSocket server or
20
+ * if you want to add custom hooks (e.g. for authentication or logging).
21
+ */
22
+ declare function defineGraphqlWebSocket<P extends ConnectionInitMessage['payload'] = ConnectionInitMessage['payload'], E extends Record<PropertyKey, unknown> = Record<PropertyKey, never>>(options: ServerOptions<P, Extra & Partial<E>>): Partial<Hooks>;
23
+ /**
24
+ * Create a event handler to be used with [h3](https://h3.unjs.io/).
25
+ *
26
+ * @category Server/h3
27
+ */
28
+ declare function defineGraphqlWebSocketHandler<P extends ConnectionInitMessage['payload'] = ConnectionInitMessage['payload'], E extends Record<PropertyKey, unknown> = Record<PropertyKey, never>>(options: ServerOptions<P, Extra & Partial<E>>): Promise<EventHandler<EventHandlerRequest, never>>;
29
+
30
+ export { type Extra, defineGraphqlWebSocket, defineGraphqlWebSocketHandler };
@@ -0,0 +1,30 @@
1
+ import { ConnectionInitMessage, ServerOptions } from 'graphql-ws';
2
+ import { EventHandler, EventHandlerRequest } from 'h3';
3
+ import { Peer, Hooks } from 'crossws';
4
+
5
+ /**
6
+ * The extra that will be put in the `Context`.
7
+ *
8
+ * @category Server/h3
9
+ */
10
+ interface Extra {
11
+ /**
12
+ * The underlying WebSocket peer.
13
+ */
14
+ readonly peer: Peer;
15
+ }
16
+ /**
17
+ * Create the WebSocket hooks to be used with [h3](https://h3.unjs.io/).
18
+ *
19
+ * Use this over {@link defineGraphqlWebSocketHandler} if you need more control over the WebSocket server or
20
+ * if you want to add custom hooks (e.g. for authentication or logging).
21
+ */
22
+ declare function defineGraphqlWebSocket<P extends ConnectionInitMessage['payload'] = ConnectionInitMessage['payload'], E extends Record<PropertyKey, unknown> = Record<PropertyKey, never>>(options: ServerOptions<P, Extra & Partial<E>>): Partial<Hooks>;
23
+ /**
24
+ * Create a event handler to be used with [h3](https://h3.unjs.io/).
25
+ *
26
+ * @category Server/h3
27
+ */
28
+ declare function defineGraphqlWebSocketHandler<P extends ConnectionInitMessage['payload'] = ConnectionInitMessage['payload'], E extends Record<PropertyKey, unknown> = Record<PropertyKey, never>>(options: ServerOptions<P, Extra & Partial<E>>): Promise<EventHandler<EventHandlerRequest, never>>;
29
+
30
+ export { type Extra, defineGraphqlWebSocket, defineGraphqlWebSocketHandler };
@@ -0,0 +1,59 @@
1
+ import { makeServer, CloseCode, DEPRECATED_GRAPHQL_WS_PROTOCOL } from 'graphql-ws';
2
+ import { defineWebSocket, defineWebSocketHandler } from 'h3';
3
+
4
+ function defineGraphqlWebSocket(options) {
5
+ const server = makeServer(options);
6
+ const peers = /* @__PURE__ */ new WeakMap();
7
+ return defineWebSocket({
8
+ open(peer) {
9
+ const client = {
10
+ handleMessage: () => {
11
+ throw new Error("Message received before handler was registered");
12
+ },
13
+ closed: () => {
14
+ throw new Error("Closed before handler was registered");
15
+ }
16
+ };
17
+ client.closed = server.opened(
18
+ {
19
+ protocol: peer.request.headers?.get("Sec-WebSocket-Protocol") ?? "",
20
+ send: (message) => {
21
+ if (peers.has(peer)) {
22
+ peer.send(message);
23
+ }
24
+ },
25
+ close: (code, reason) => {
26
+ if (peers.has(peer)) {
27
+ peer.close(code, reason);
28
+ }
29
+ },
30
+ onMessage: (cb) => client.handleMessage = cb
31
+ },
32
+ { peer }
33
+ );
34
+ peers.set(peer, client);
35
+ },
36
+ message(peer, message) {
37
+ const client = peers.get(peer);
38
+ if (!client) throw new Error("Message received for a missing client");
39
+ return client.handleMessage(message.text());
40
+ },
41
+ close(peer, details) {
42
+ const client = peers.get(peer);
43
+ if (!client) throw new Error("Closing a missing client");
44
+ const upgradeProtocol = peer.request.headers?.get(
45
+ "Sec-WebSocket-Protocol"
46
+ );
47
+ if (details.code === CloseCode.SubprotocolNotAcceptable && upgradeProtocol === DEPRECATED_GRAPHQL_WS_PROTOCOL)
48
+ console.warn(
49
+ `Client provided the unsupported and deprecated subprotocol "${upgradeProtocol}" used by subscriptions-transport-ws.Please see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws.`
50
+ );
51
+ return client.closed(details.code, details.reason);
52
+ }
53
+ });
54
+ }
55
+ async function defineGraphqlWebSocketHandler(options) {
56
+ return defineWebSocketHandler(defineGraphqlWebSocket(options));
57
+ }
58
+
59
+ export { defineGraphqlWebSocket, defineGraphqlWebSocketHandler };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@as-integrations/h3",
3
- "version": "1.2.0",
3
+ "version": "2.0.0",
4
4
  "description": "An Apollo Server integration for use with h3 or Nuxt",
5
5
  "repository": "github:apollo-server-integrations/apollo-server-integration-h3",
6
6
  "license": "MIT",
@@ -11,6 +11,11 @@
11
11
  "types": "./dist/index.d.ts",
12
12
  "import": "./dist/index.mjs",
13
13
  "require": "./dist/index.cjs"
14
+ },
15
+ "./websocket": {
16
+ "types": "./dist/websocket.d.ts",
17
+ "import": "./dist/websocket.mjs",
18
+ "require": "./dist/websocket.cjs"
14
19
  }
15
20
  },
16
21
  "main": "./dist/index.cjs",
@@ -23,44 +28,47 @@
23
28
  "@apollo/server": "^4.1.1",
24
29
  "h3": "^1.11.0",
25
30
  "graphql": "^16.0.0",
26
- "graphql-ws": "^5.0.0",
27
- "crossws": "^0.2.4"
31
+ "graphql-ws": "^5.0.0 || ^6.0.0",
32
+ "crossws": "^0.3.0"
28
33
  },
29
34
  "peerDependenciesMeta": {
30
35
  "graphql-ws": {
31
36
  "optional": true
32
37
  }
33
38
  },
39
+ "dependencies": {
40
+ "@apollo/utils.withrequired": "^3.0.0"
41
+ },
34
42
  "devDependencies": {
35
- "@apollo/server": "^4.10.4",
36
- "@apollo/server-integration-testsuite": "^4.10.4",
37
- "@apollo/utils.withrequired": "^3.0.0",
38
- "@graphql-tools/schema": "^10.0.3",
39
- "@jest/globals": "^29.7.0",
40
- "@typescript-eslint/parser": "^7.16.0",
41
- "crossws": "^0.2.4",
42
- "@vitest/coverage-v8": "^2.0.1",
43
- "eslint": "^9.6.0",
44
- "eslint-config-prettier": "^9.1.0",
45
- "eslint-config-unjs": "^0.3.2",
46
- "eslint-plugin-unused-imports": "^4.0.0",
47
- "graphql": "^16.9.0",
48
- "graphql-subscriptions": "^2.0.0",
49
- "graphql-ws": "^5.15.0",
50
- "h3": "^1.12.0",
51
- "jest": "^29.7.0",
52
- "listhen": "^1.7.2",
53
- "prettier": "^3.3.2",
54
- "standard-version": "^9.5.0",
55
- "ts-jest": "^29.2.0",
56
- "typescript": "^5.5.3",
57
- "unbuild": "^2.0.0",
58
- "vitest": "^2.0.1"
43
+ "@apollo/server": "4.11.3",
44
+ "@apollo/server-integration-testsuite": "4.11.3",
45
+ "@graphql-tools/schema": "10.0.21",
46
+ "@jest/globals": "29.7.0",
47
+ "@typescript-eslint/parser": "8.26.0",
48
+ "crossws": "0.3.4",
49
+ "@vitest/coverage-v8": "3.0.7",
50
+ "eslint": "9.21.0",
51
+ "eslint-config-prettier": "10.0.2",
52
+ "eslint-config-unjs": "0.4.2",
53
+ "eslint-plugin-unused-imports": "4.1.4",
54
+ "graphql": "16.10.0",
55
+ "graphql-subscriptions": "3.0.0",
56
+ "graphql-ws": "6.0.4",
57
+ "h3": "1.15.1",
58
+ "jest": "29.7.0",
59
+ "listhen": "1.9.0",
60
+ "prettier": "3.5.3",
61
+ "commit-and-tag-version": "12.5.0",
62
+ "ts-jest": "29.2.6",
63
+ "typescript": "5.8.2",
64
+ "unbuild": "3.5.0",
65
+ "vitest": "3.0.7"
59
66
  },
60
67
  "engines": {
61
- "node": "^16.10.0 || >=18.0.0"
68
+ "node": "23.9.0"
62
69
  },
63
70
  "scripts": {
71
+ "dev:prepare": "unbuild --stub",
64
72
  "build": "unbuild",
65
73
  "test": "vitest dev",
66
74
  "test:integration": "jest",