graphile-realtime-test 1.10.7 → 1.10.8
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/context.d.ts +3 -3
- package/context.js +3 -3
- package/esm/context.js +3 -3
- package/esm/get-connections.js +4 -4
- package/esm/index.js +4 -4
- package/esm/ws-server.js +1 -1
- package/get-connections.d.ts +3 -3
- package/get-connections.js +4 -4
- package/index.d.ts +8 -8
- package/index.js +11 -11
- package/package.json +5 -5
- package/subscribe.d.ts +1 -1
- package/ws-server.d.ts +1 -1
package/context.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { GraphQLSchema, ExecutionResult } from 'graphql';
|
|
2
1
|
import type { GraphileConfig } from 'graphile-config';
|
|
3
|
-
import type {
|
|
2
|
+
import type { GetConnectionsInput } from 'graphile-test';
|
|
3
|
+
import type { ExecutionResult, GraphQLSchema } from 'graphql';
|
|
4
4
|
import type { GetConnectionOpts } from 'pgsql-test';
|
|
5
5
|
import type { SeedAdapter } from 'pgsql-test/seed/types';
|
|
6
|
-
import type {
|
|
6
|
+
import type { PgTestClient } from 'pgsql-test/test-client';
|
|
7
7
|
/**
|
|
8
8
|
* Input for creating a realtime test context.
|
|
9
9
|
*/
|
package/context.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createRealtimeTestContext = createRealtimeTestContext;
|
|
4
|
-
const pgsql_test_1 = require("pgsql-test");
|
|
5
4
|
const graphile_build_1 = require("graphile-build");
|
|
6
5
|
const graphile_build_2 = require("graphile-build");
|
|
7
6
|
const graphile_build_pg_1 = require("graphile-build-pg");
|
|
8
|
-
const pg_1 = require("postgraphile/adaptors/pg");
|
|
9
7
|
const graphile_realtime_subscriptions_1 = require("graphile-realtime-subscriptions");
|
|
10
|
-
const
|
|
8
|
+
const pgsql_test_1 = require("pgsql-test");
|
|
9
|
+
const pg_1 = require("postgraphile/adaptors/pg");
|
|
11
10
|
const notify_js_1 = require("./notify.js");
|
|
12
11
|
const smart_tags_js_1 = require("./smart-tags.js");
|
|
12
|
+
const subscribe_js_1 = require("./subscribe.js");
|
|
13
13
|
/**
|
|
14
14
|
* Minimal preset matching graphile-test's MinimalPreset.
|
|
15
15
|
*/
|
package/esm/context.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { getConnections as getPgConnections } from 'pgsql-test';
|
|
2
1
|
import { makeSchema } from 'graphile-build';
|
|
3
2
|
import { defaultPreset as graphileBuildDefaultPreset } from 'graphile-build';
|
|
4
3
|
import { defaultPreset as graphileBuildPgDefaultPreset } from 'graphile-build-pg';
|
|
5
|
-
import { makePgService } from 'postgraphile/adaptors/pg';
|
|
6
4
|
import { createRealtimeSubscriptionsPlugin } from 'graphile-realtime-subscriptions';
|
|
7
|
-
import {
|
|
5
|
+
import { getConnections as getPgConnections } from 'pgsql-test';
|
|
6
|
+
import { makePgService } from 'postgraphile/adaptors/pg';
|
|
8
7
|
import { notify, notifyChange, notifyInvalidate } from './notify.js';
|
|
9
8
|
import { makeRealtimeSmartTagsPlugin } from './smart-tags.js';
|
|
9
|
+
import { subscribe as subscribeHelper } from './subscribe.js';
|
|
10
10
|
/**
|
|
11
11
|
* Minimal preset matching graphile-test's MinimalPreset.
|
|
12
12
|
*/
|
package/esm/get-connections.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { getConnections as getPgConnections } from 'pgsql-test';
|
|
2
1
|
import { makeSchema } from 'graphile-build';
|
|
3
2
|
import { defaultPreset as graphileBuildDefaultPreset } from 'graphile-build';
|
|
4
3
|
import { defaultPreset as graphileBuildPgDefaultPreset } from 'graphile-build-pg';
|
|
5
|
-
import { makePgService } from 'postgraphile/adaptors/pg';
|
|
6
4
|
import { createRealtimeSubscriptionsPlugin } from 'graphile-realtime-subscriptions';
|
|
5
|
+
import { getConnections as getPgConnections } from 'pgsql-test';
|
|
6
|
+
import { makePgService } from 'postgraphile/adaptors/pg';
|
|
7
|
+
import { notify, notifyChange, notifyInvalidate } from './notify.js';
|
|
7
8
|
import { makeRealtimeSmartTagsPlugin } from './smart-tags.js';
|
|
9
|
+
import { collectWsEvents, delay, nextEvent } from './ws-helpers.js';
|
|
8
10
|
import { createWsTestServer } from './ws-server.js';
|
|
9
|
-
import { nextEvent, collectWsEvents, delay } from './ws-helpers.js';
|
|
10
|
-
import { notify, notifyChange, notifyInvalidate } from './notify.js';
|
|
11
11
|
// --- Types ---
|
|
12
12
|
const MinimalPreset = {
|
|
13
13
|
extends: [graphileBuildDefaultPreset, graphileBuildPgDefaultPreset],
|
package/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { createRealtimeTestContext } from './context.js';
|
|
2
|
+
export { getConnections } from './get-connections.js';
|
|
3
|
+
export { buildInvalidatePayload, buildPayload, notify, notifyChange, notifyInvalidate, } from './notify.js';
|
|
2
4
|
export { makeRealtimeSmartTagsPlugin } from './smart-tags.js';
|
|
3
|
-
export { subscribe, waitForEvent,
|
|
4
|
-
export {
|
|
5
|
-
export { nextEvent, collectWsEvents, delay } from './ws-helpers.js';
|
|
5
|
+
export { collectEvents, subscribe, waitForEvent, } from './subscribe.js';
|
|
6
|
+
export { collectWsEvents, delay, nextEvent } from './ws-helpers.js';
|
|
6
7
|
export { createWsTestServer } from './ws-server.js';
|
|
7
|
-
export { getConnections } from './get-connections.js';
|
package/esm/ws-server.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createServer } from 'node:http';
|
|
|
2
2
|
import { subscribe as grafastSubscribe } from 'grafast';
|
|
3
3
|
import { createClient } from 'graphql-ws';
|
|
4
4
|
import { useServer } from 'graphql-ws/use/ws';
|
|
5
|
-
import {
|
|
5
|
+
import { WebSocket, WebSocketServer } from 'ws';
|
|
6
6
|
export async function createWsTestServer(input) {
|
|
7
7
|
const { schema, resolvedPreset, pgSubscriber, pgSubscriberKey = 'pgSubscriber', buildPgSettings, } = input;
|
|
8
8
|
const httpServer = createServer();
|
package/get-connections.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { GraphQLSchema } from 'graphql';
|
|
2
1
|
import type { GraphileConfig } from 'graphile-config';
|
|
2
|
+
import type { GraphQLSchema } from 'graphql';
|
|
3
|
+
import type { Client as GqlWsClient } from 'graphql-ws';
|
|
4
|
+
import type { Pool } from 'pg';
|
|
3
5
|
import type { GetConnectionOpts } from 'pgsql-test';
|
|
4
6
|
import type { SeedAdapter } from 'pgsql-test/seed/types';
|
|
5
7
|
import type { PgTestClient } from 'pgsql-test/test-client';
|
|
6
|
-
import type { Pool } from 'pg';
|
|
7
|
-
import type { Client as GqlWsClient } from 'graphql-ws';
|
|
8
8
|
import { makePgService } from 'postgraphile/adaptors/pg';
|
|
9
9
|
export interface GetConnectionsInput extends GetConnectionOpts {
|
|
10
10
|
schemas: string[];
|
package/get-connections.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getConnections = getConnections;
|
|
4
|
-
const pgsql_test_1 = require("pgsql-test");
|
|
5
4
|
const graphile_build_1 = require("graphile-build");
|
|
6
5
|
const graphile_build_2 = require("graphile-build");
|
|
7
6
|
const graphile_build_pg_1 = require("graphile-build-pg");
|
|
8
|
-
const pg_1 = require("postgraphile/adaptors/pg");
|
|
9
7
|
const graphile_realtime_subscriptions_1 = require("graphile-realtime-subscriptions");
|
|
8
|
+
const pgsql_test_1 = require("pgsql-test");
|
|
9
|
+
const pg_1 = require("postgraphile/adaptors/pg");
|
|
10
|
+
const notify_js_1 = require("./notify.js");
|
|
10
11
|
const smart_tags_js_1 = require("./smart-tags.js");
|
|
11
|
-
const ws_server_js_1 = require("./ws-server.js");
|
|
12
12
|
const ws_helpers_js_1 = require("./ws-helpers.js");
|
|
13
|
-
const
|
|
13
|
+
const ws_server_js_1 = require("./ws-server.js");
|
|
14
14
|
// --- Types ---
|
|
15
15
|
const MinimalPreset = {
|
|
16
16
|
extends: [graphile_build_2.defaultPreset, graphile_build_pg_1.defaultPreset],
|
package/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { createRealtimeTestContext } from './context.js';
|
|
2
1
|
export type { RealtimeTestContext, RealtimeTestInput } from './context.js';
|
|
2
|
+
export { createRealtimeTestContext } from './context.js';
|
|
3
|
+
export type { GetConnectionsInput, GetConnectionsResult, WsHandle, } from './get-connections.js';
|
|
4
|
+
export { getConnections } from './get-connections.js';
|
|
5
|
+
export { buildInvalidatePayload, buildPayload, notify, notifyChange, notifyInvalidate, } from './notify.js';
|
|
3
6
|
export { makeRealtimeSmartTagsPlugin } from './smart-tags.js';
|
|
4
|
-
export {
|
|
5
|
-
export
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
7
|
+
export type { SubscribeOptions, SubscriptionEvent } from './subscribe.js';
|
|
8
|
+
export { collectEvents, subscribe, waitForEvent, } from './subscribe.js';
|
|
9
|
+
export { collectWsEvents, delay, nextEvent } from './ws-helpers.js';
|
|
10
|
+
export type { WsTestServer, WsTestServerInput } from './ws-server.js';
|
|
8
11
|
export { createWsTestServer } from './ws-server.js';
|
|
9
|
-
export type { WsTestServerInput, WsTestServer } from './ws-server.js';
|
|
10
|
-
export { getConnections } from './get-connections.js';
|
|
11
|
-
export type { GetConnectionsInput, GetConnectionsResult, WsHandle, } from './get-connections.js';
|
package/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.createWsTestServer = exports.nextEvent = exports.delay = exports.collectWsEvents = exports.waitForEvent = exports.subscribe = exports.collectEvents = exports.makeRealtimeSmartTagsPlugin = exports.notifyInvalidate = exports.notifyChange = exports.notify = exports.buildPayload = exports.buildInvalidatePayload = exports.getConnections = exports.createRealtimeTestContext = void 0;
|
|
4
4
|
var context_js_1 = require("./context.js");
|
|
5
5
|
Object.defineProperty(exports, "createRealtimeTestContext", { enumerable: true, get: function () { return context_js_1.createRealtimeTestContext; } });
|
|
6
|
+
var get_connections_js_1 = require("./get-connections.js");
|
|
7
|
+
Object.defineProperty(exports, "getConnections", { enumerable: true, get: function () { return get_connections_js_1.getConnections; } });
|
|
8
|
+
var notify_js_1 = require("./notify.js");
|
|
9
|
+
Object.defineProperty(exports, "buildInvalidatePayload", { enumerable: true, get: function () { return notify_js_1.buildInvalidatePayload; } });
|
|
10
|
+
Object.defineProperty(exports, "buildPayload", { enumerable: true, get: function () { return notify_js_1.buildPayload; } });
|
|
11
|
+
Object.defineProperty(exports, "notify", { enumerable: true, get: function () { return notify_js_1.notify; } });
|
|
12
|
+
Object.defineProperty(exports, "notifyChange", { enumerable: true, get: function () { return notify_js_1.notifyChange; } });
|
|
13
|
+
Object.defineProperty(exports, "notifyInvalidate", { enumerable: true, get: function () { return notify_js_1.notifyInvalidate; } });
|
|
6
14
|
var smart_tags_js_1 = require("./smart-tags.js");
|
|
7
15
|
Object.defineProperty(exports, "makeRealtimeSmartTagsPlugin", { enumerable: true, get: function () { return smart_tags_js_1.makeRealtimeSmartTagsPlugin; } });
|
|
8
16
|
var subscribe_js_1 = require("./subscribe.js");
|
|
17
|
+
Object.defineProperty(exports, "collectEvents", { enumerable: true, get: function () { return subscribe_js_1.collectEvents; } });
|
|
9
18
|
Object.defineProperty(exports, "subscribe", { enumerable: true, get: function () { return subscribe_js_1.subscribe; } });
|
|
10
19
|
Object.defineProperty(exports, "waitForEvent", { enumerable: true, get: function () { return subscribe_js_1.waitForEvent; } });
|
|
11
|
-
Object.defineProperty(exports, "collectEvents", { enumerable: true, get: function () { return subscribe_js_1.collectEvents; } });
|
|
12
|
-
var notify_js_1 = require("./notify.js");
|
|
13
|
-
Object.defineProperty(exports, "notify", { enumerable: true, get: function () { return notify_js_1.notify; } });
|
|
14
|
-
Object.defineProperty(exports, "notifyChange", { enumerable: true, get: function () { return notify_js_1.notifyChange; } });
|
|
15
|
-
Object.defineProperty(exports, "notifyInvalidate", { enumerable: true, get: function () { return notify_js_1.notifyInvalidate; } });
|
|
16
|
-
Object.defineProperty(exports, "buildPayload", { enumerable: true, get: function () { return notify_js_1.buildPayload; } });
|
|
17
|
-
Object.defineProperty(exports, "buildInvalidatePayload", { enumerable: true, get: function () { return notify_js_1.buildInvalidatePayload; } });
|
|
18
20
|
var ws_helpers_js_1 = require("./ws-helpers.js");
|
|
19
|
-
Object.defineProperty(exports, "nextEvent", { enumerable: true, get: function () { return ws_helpers_js_1.nextEvent; } });
|
|
20
21
|
Object.defineProperty(exports, "collectWsEvents", { enumerable: true, get: function () { return ws_helpers_js_1.collectWsEvents; } });
|
|
21
22
|
Object.defineProperty(exports, "delay", { enumerable: true, get: function () { return ws_helpers_js_1.delay; } });
|
|
23
|
+
Object.defineProperty(exports, "nextEvent", { enumerable: true, get: function () { return ws_helpers_js_1.nextEvent; } });
|
|
22
24
|
var ws_server_js_1 = require("./ws-server.js");
|
|
23
25
|
Object.defineProperty(exports, "createWsTestServer", { enumerable: true, get: function () { return ws_server_js_1.createWsTestServer; } });
|
|
24
|
-
var get_connections_js_1 = require("./get-connections.js");
|
|
25
|
-
Object.defineProperty(exports, "getConnections", { enumerable: true, get: function () { return get_connections_js_1.getConnections; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphile-realtime-test",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.8",
|
|
4
4
|
"description": "Subscription testing utilities for graphile-realtime-subscriptions — smart tag injection, grafast.subscribe() helpers, and pg_notify simulation",
|
|
5
5
|
"author": "Constructive <developers@constructive.io>",
|
|
6
6
|
"homepage": "https://github.com/constructive-io/constructive",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"url": "https://github.com/constructive-io/constructive/issues"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"graphile-realtime-subscriptions": "^1.9.
|
|
43
|
-
"graphile-test": "^5.10.
|
|
42
|
+
"graphile-realtime-subscriptions": "^1.9.3",
|
|
43
|
+
"graphile-test": "^5.10.8"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"grafast": "1.0.2",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"express": "^5.2.1",
|
|
61
61
|
"grafserv": "1.0.0",
|
|
62
62
|
"makage": "^0.3.0",
|
|
63
|
-
"pgsql-test": "^5.9.
|
|
63
|
+
"pgsql-test": "^5.9.8",
|
|
64
64
|
"postgraphile": "5.0.3"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "c20b6be96b39bf71c0e2df0f4b51e05deacd006b"
|
|
67
67
|
}
|
package/subscribe.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { GraphQLSchema, DocumentNode, ExecutionResult } from 'graphql';
|
|
2
1
|
import type { GraphileConfig } from 'graphile-config';
|
|
2
|
+
import type { DocumentNode, ExecutionResult, GraphQLSchema } from 'graphql';
|
|
3
3
|
/**
|
|
4
4
|
* A single event yielded by a subscription iterator.
|
|
5
5
|
*/
|
package/ws-server.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Server as HttpServer } from 'node:http';
|
|
2
|
-
import type { GraphQLSchema } from 'graphql';
|
|
3
2
|
import type { GraphileConfig } from 'graphile-config';
|
|
3
|
+
import type { GraphQLSchema } from 'graphql';
|
|
4
4
|
import { type Client as GqlWsClient } from 'graphql-ws';
|
|
5
5
|
import { WebSocketServer } from 'ws';
|
|
6
6
|
export interface WsTestServerInput {
|