@contello/client 3.4.0 → 3.5.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/dist/cli.js +2 -3
- package/dist/client-AMuKG0mv.d.cts +279 -0
- package/dist/client-AMuKG0mv.d.cts.map +1 -0
- package/dist/client-BxOONMjD.d.ts +279 -0
- package/dist/client-BxOONMjD.d.ts.map +1 -0
- package/dist/{generate-CwfbsOys.js → generate-IysMI3VF.js} +14 -27
- package/dist/{generate-CwfbsOys.js.map → generate-IysMI3VF.js.map} +1 -1
- package/dist/index.cjs +262 -98
- package/dist/index.d.cts +2 -295
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +2 -295
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +240 -98
- package/dist/index.js.map +1 -1
- package/dist/testing.cjs +127 -0
- package/dist/testing.d.cts +69 -0
- package/dist/testing.d.cts.map +1 -0
- package/dist/testing.d.ts +69 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +127 -0
- package/dist/testing.js.map +1 -0
- package/package.json +13 -5
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { r as ContelloClient } from "./client-BxOONMjD.js";
|
|
2
|
+
import { MaybePromise } from "@entwico/dash";
|
|
3
|
+
export type FakeCall = {
|
|
4
|
+
kind: 'subscribe' | 'execute';
|
|
5
|
+
query: string;
|
|
6
|
+
variables: Record<string, unknown> | undefined;
|
|
7
|
+
};
|
|
8
|
+
export type FakeContelloHandlers = {
|
|
9
|
+
/**
|
|
10
|
+
* What a subscription answers with. A plain value is its one message, after which it completes;
|
|
11
|
+
* an `AsyncIterable` is passed on message by message, for a subscription that stays open. A
|
|
12
|
+
* thrown error or a rejection fails the subscription.
|
|
13
|
+
*/
|
|
14
|
+
subscribe?: ((query: string, variables: Record<string, unknown> | undefined) => MaybePromise<unknown>) | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* What `execute` answers with. Without it `execute` answers with the first message of
|
|
17
|
+
* `subscribe`, which is what the real client does.
|
|
18
|
+
*/
|
|
19
|
+
execute?: ((query: string, variables: Record<string, unknown> | undefined) => MaybePromise<unknown>) | undefined;
|
|
20
|
+
};
|
|
21
|
+
export type FakeContelloClient = {
|
|
22
|
+
/**
|
|
23
|
+
* Stands in for a `ContelloClient`: `subscribe`, `execute`, `init`, `destroy` and `ping` work,
|
|
24
|
+
* nothing else is there.
|
|
25
|
+
*/
|
|
26
|
+
client: ContelloClient<any>;
|
|
27
|
+
/** Every subscription that was iterated and every `execute`, in order. */
|
|
28
|
+
calls: FakeCall[];
|
|
29
|
+
/** The subscriptions that are open right now: iterated, and neither finished nor closed. */
|
|
30
|
+
open(): number;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* A `ContelloClient` without a server, for tests of code that reads through one: the handlers
|
|
34
|
+
* answer what Contello would, and the calls are recorded.
|
|
35
|
+
*
|
|
36
|
+
* ```ts
|
|
37
|
+
* const { client, calls } = createFakeContelloClient({
|
|
38
|
+
* subscribe: (_query, variables) => ({ source: articles.filter((article) => wanted(article, variables)) }),
|
|
39
|
+
* });
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function createFakeContelloClient(handlers?: FakeContelloHandlers | undefined): FakeContelloClient;
|
|
43
|
+
export type FakeSource<T extends {
|
|
44
|
+
id: string;
|
|
45
|
+
}> = {
|
|
46
|
+
/** The entities Contello holds; a test changes them to change what the next fetch answers. */
|
|
47
|
+
entities: Map<string, T>;
|
|
48
|
+
/** The `ids` of every fetch, `undefined` for a fetch of all. */
|
|
49
|
+
fetched: (string[] | undefined)[];
|
|
50
|
+
/** The `subscribe` handler of `createFakeContelloClient`. */
|
|
51
|
+
subscribe: (query: string, variables: Record<string, unknown> | undefined) => {
|
|
52
|
+
source: T[];
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* The entities of one model as a source subscription serves them: all of them, or the ones the
|
|
57
|
+
* `ids` variable asks for, in one `{ source }` message.
|
|
58
|
+
*
|
|
59
|
+
* ```ts
|
|
60
|
+
* const articles = createFakeSource([{ id: 'a', title: 'first' }]);
|
|
61
|
+
* const { client } = createFakeContelloClient({ subscribe: articles.subscribe });
|
|
62
|
+
*
|
|
63
|
+
* articles.entities.set('a', { id: 'a', title: 'changed' });
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
export declare function createFakeSource<T extends {
|
|
67
|
+
id: string;
|
|
68
|
+
}>(initial?: readonly T[] | undefined): FakeSource<T>;
|
|
69
|
+
//# sourceMappingURL=testing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.d.ts","names":[],"sources":["../src/testing.ts"],"mappings":";;YAIY;EACV;EACA;EACA,WAAW;;YAGD;;;;;;EAMV,cAAc,eAAe,WAAW,wCAAwC;;;;;EAKhF,YAAY,eAAe,WAAW,wCAAwC;;YAGpE;;;;;EAKV,QAAQ;;EAER,OAAO;;EAEP;;;;;;;;;;;;wBAiBc,yBAAyB,WAAW,mCAAmC;YAkH3E,WAAW;EAAY;;;EAEjC,UAAU,YAAY;;EAEtB;;EAEA,YAAY,eAAe,WAAW;IAA0C,QAAQ;;;;;;;;;;;;;;wBAc1E,iBAAiB;EAAY;GAAc,mBAAmB,kBAAkB,WAAW"}
|
package/dist/testing.js
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
// src/testing.ts
|
|
2
|
+
function isAsyncIterable(value) {
|
|
3
|
+
return typeof value?.[Symbol.asyncIterator] === "function";
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* A `ContelloClient` without a server, for tests of code that reads through one: the handlers
|
|
7
|
+
* answer what Contello would, and the calls are recorded.
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* const { client, calls } = createFakeContelloClient({
|
|
11
|
+
* subscribe: (_query, variables) => ({ source: articles.filter((article) => wanted(article, variables)) }),
|
|
12
|
+
* });
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
function createFakeContelloClient(handlers) {
|
|
16
|
+
const calls = [];
|
|
17
|
+
let open = 0;
|
|
18
|
+
function subscribe(query, variables) {
|
|
19
|
+
return { [Symbol.asyncIterator]() {
|
|
20
|
+
const doneResult = {
|
|
21
|
+
value: void 0,
|
|
22
|
+
done: true
|
|
23
|
+
};
|
|
24
|
+
let messages;
|
|
25
|
+
let answered = false;
|
|
26
|
+
let closed = false;
|
|
27
|
+
calls.push({
|
|
28
|
+
kind: "subscribe",
|
|
29
|
+
query,
|
|
30
|
+
variables
|
|
31
|
+
});
|
|
32
|
+
open++;
|
|
33
|
+
const close = () => {
|
|
34
|
+
if (closed) return;
|
|
35
|
+
closed = true;
|
|
36
|
+
open--;
|
|
37
|
+
};
|
|
38
|
+
const nextMessage = async () => {
|
|
39
|
+
if (messages) return await messages.next();
|
|
40
|
+
if (answered) return doneResult;
|
|
41
|
+
const answer = await handlers?.subscribe?.(query, variables);
|
|
42
|
+
answered = true;
|
|
43
|
+
if (!isAsyncIterable(answer)) return {
|
|
44
|
+
value: answer,
|
|
45
|
+
done: false
|
|
46
|
+
};
|
|
47
|
+
messages = answer[Symbol.asyncIterator]();
|
|
48
|
+
return await messages.next();
|
|
49
|
+
};
|
|
50
|
+
return {
|
|
51
|
+
async next() {
|
|
52
|
+
if (closed) return doneResult;
|
|
53
|
+
try {
|
|
54
|
+
const result = await nextMessage();
|
|
55
|
+
if (result.done === true) close();
|
|
56
|
+
return closed ? doneResult : result;
|
|
57
|
+
} catch (error) {
|
|
58
|
+
close();
|
|
59
|
+
throw error;
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
async return() {
|
|
63
|
+
close();
|
|
64
|
+
await messages?.return?.();
|
|
65
|
+
return doneResult;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
} };
|
|
69
|
+
}
|
|
70
|
+
async function execute(query, variables) {
|
|
71
|
+
if (handlers?.execute) {
|
|
72
|
+
calls.push({
|
|
73
|
+
kind: "execute",
|
|
74
|
+
query,
|
|
75
|
+
variables
|
|
76
|
+
});
|
|
77
|
+
return await handlers.execute(query, variables);
|
|
78
|
+
}
|
|
79
|
+
const iterator = subscribe(query, variables)[Symbol.asyncIterator]();
|
|
80
|
+
calls.at(-1).kind = "execute";
|
|
81
|
+
try {
|
|
82
|
+
const result = await iterator.next();
|
|
83
|
+
if (result.done === true) throw new Error("the fake contello client has no answer for this execute");
|
|
84
|
+
return result.value;
|
|
85
|
+
} finally {
|
|
86
|
+
await iterator.return?.();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
client: {
|
|
91
|
+
subscribe,
|
|
92
|
+
execute,
|
|
93
|
+
init: () => Promise.resolve(),
|
|
94
|
+
destroy: () => Promise.resolve(),
|
|
95
|
+
ping: () => Promise.resolve()
|
|
96
|
+
},
|
|
97
|
+
calls,
|
|
98
|
+
open: () => open
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The entities of one model as a source subscription serves them: all of them, or the ones the
|
|
103
|
+
* `ids` variable asks for, in one `{ source }` message.
|
|
104
|
+
*
|
|
105
|
+
* ```ts
|
|
106
|
+
* const articles = createFakeSource([{ id: 'a', title: 'first' }]);
|
|
107
|
+
* const { client } = createFakeContelloClient({ subscribe: articles.subscribe });
|
|
108
|
+
*
|
|
109
|
+
* articles.entities.set('a', { id: 'a', title: 'changed' });
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
function createFakeSource(initial) {
|
|
113
|
+
const entities = new Map((initial ?? []).map((entity) => [entity.id, entity]));
|
|
114
|
+
const fetched = [];
|
|
115
|
+
return {
|
|
116
|
+
entities,
|
|
117
|
+
fetched,
|
|
118
|
+
subscribe(_query, variables) {
|
|
119
|
+
const ids = variables?.["ids"];
|
|
120
|
+
fetched.push(ids);
|
|
121
|
+
return { source: ids ? ids.flatMap((id) => entities.get(id) ?? []) : entities.values().toArray() };
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
export { createFakeContelloClient, createFakeSource };
|
|
126
|
+
|
|
127
|
+
//# sourceMappingURL=testing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.js","names":[],"sources":["../src/testing.ts"],"sourcesContent":["import type { MaybePromise } from '@entwico/dash';\n\nimport type { ContelloClient } from './client';\n\nexport type FakeCall = {\n kind: 'subscribe' | 'execute';\n query: string;\n variables: Record<string, unknown> | undefined;\n};\n\nexport type FakeContelloHandlers = {\n /**\n * What a subscription answers with. A plain value is its one message, after which it completes;\n * an `AsyncIterable` is passed on message by message, for a subscription that stays open. A\n * thrown error or a rejection fails the subscription.\n */\n subscribe?: ((query: string, variables: Record<string, unknown> | undefined) => MaybePromise<unknown>) | undefined;\n /**\n * What `execute` answers with. Without it `execute` answers with the first message of\n * `subscribe`, which is what the real client does.\n */\n execute?: ((query: string, variables: Record<string, unknown> | undefined) => MaybePromise<unknown>) | undefined;\n};\n\nexport type FakeContelloClient = {\n /**\n * Stands in for a `ContelloClient`: `subscribe`, `execute`, `init`, `destroy` and `ping` work,\n * nothing else is there.\n */\n client: ContelloClient<any>;\n /** Every subscription that was iterated and every `execute`, in order. */\n calls: FakeCall[];\n /** The subscriptions that are open right now: iterated, and neither finished nor closed. */\n open(): number;\n};\n\nfunction isAsyncIterable(value: unknown): value is AsyncIterable<unknown> {\n return typeof (value as AsyncIterable<unknown> | undefined)?.[Symbol.asyncIterator] === 'function';\n}\n\n/**\n * A `ContelloClient` without a server, for tests of code that reads through one: the handlers\n * answer what Contello would, and the calls are recorded.\n *\n * ```ts\n * const { client, calls } = createFakeContelloClient({\n * subscribe: (_query, variables) => ({ source: articles.filter((article) => wanted(article, variables)) }),\n * });\n * ```\n */\nexport function createFakeContelloClient(handlers?: FakeContelloHandlers | undefined): FakeContelloClient {\n const calls: FakeCall[] = [];\n let open = 0;\n\n function subscribe<TData>(query: string, variables?: Record<string, unknown> | undefined): AsyncIterable<TData> {\n return {\n // like the real client, every iteration is a subscription of its own\n [Symbol.asyncIterator](): AsyncIterator<TData> {\n const doneResult: IteratorResult<TData> = { value: undefined, done: true };\n let messages: AsyncIterator<unknown> | undefined;\n let answered = false;\n let closed = false;\n\n calls.push({ kind: 'subscribe', query, variables });\n open++;\n\n const close = () => {\n if (closed) {\n return;\n }\n\n closed = true;\n open--;\n };\n\n const nextMessage = async (): Promise<IteratorResult<TData>> => {\n if (messages) {\n return (await messages.next()) as IteratorResult<TData>;\n }\n\n if (answered) {\n return doneResult;\n }\n\n const answer = await handlers?.subscribe?.(query, variables);\n\n answered = true;\n\n if (!isAsyncIterable(answer)) {\n return { value: answer as TData, done: false };\n }\n\n messages = answer[Symbol.asyncIterator]();\n\n return (await messages.next()) as IteratorResult<TData>;\n };\n\n return {\n async next(): Promise<IteratorResult<TData>> {\n if (closed) {\n return doneResult;\n }\n\n try {\n const result = await nextMessage();\n\n if (result.done === true) {\n close();\n }\n\n return closed ? doneResult : result;\n } catch (error) {\n close();\n\n throw error;\n }\n },\n async return(): Promise<IteratorResult<TData>> {\n close();\n await messages?.return?.();\n\n return doneResult;\n },\n };\n },\n };\n }\n\n async function execute<TData>(query: string, variables?: Record<string, unknown> | undefined): Promise<TData> {\n if (handlers?.execute) {\n calls.push({ kind: 'execute', query, variables });\n\n return (await handlers.execute(query, variables)) as TData;\n }\n\n const iterator = subscribe<TData>(query, variables)[Symbol.asyncIterator]();\n\n // the subscription it runs on is recorded as what the caller asked for\n calls.at(-1)!.kind = 'execute';\n\n try {\n const result = await iterator.next();\n\n if (result.done === true) {\n throw new Error('the fake contello client has no answer for this execute');\n }\n\n return result.value;\n } finally {\n await iterator.return?.();\n }\n }\n\n const client = {\n subscribe,\n execute,\n init: () => Promise.resolve(),\n destroy: () => Promise.resolve(),\n ping: () => Promise.resolve(),\n } as unknown as ContelloClient<any>;\n\n return { client, calls, open: () => open };\n}\n\nexport type FakeSource<T extends { id: string }> = {\n /** The entities Contello holds; a test changes them to change what the next fetch answers. */\n entities: Map<string, T>;\n /** The `ids` of every fetch, `undefined` for a fetch of all. */\n fetched: (string[] | undefined)[];\n /** The `subscribe` handler of `createFakeContelloClient`. */\n subscribe: (query: string, variables: Record<string, unknown> | undefined) => { source: T[] };\n};\n\n/**\n * The entities of one model as a source subscription serves them: all of them, or the ones the\n * `ids` variable asks for, in one `{ source }` message.\n *\n * ```ts\n * const articles = createFakeSource([{ id: 'a', title: 'first' }]);\n * const { client } = createFakeContelloClient({ subscribe: articles.subscribe });\n *\n * articles.entities.set('a', { id: 'a', title: 'changed' });\n * ```\n */\nexport function createFakeSource<T extends { id: string }>(initial?: readonly T[] | undefined): FakeSource<T> {\n const entities = new Map((initial ?? []).map((entity) => [entity.id, entity]));\n const fetched: (string[] | undefined)[] = [];\n\n return {\n entities,\n fetched,\n subscribe(_query, variables) {\n const ids = variables?.['ids'] as string[] | undefined;\n\n fetched.push(ids);\n\n return { source: ids ? ids.flatMap((id) => entities.get(id) ?? []) : entities.values().toArray() };\n },\n };\n}\n"],"mappings":";AAoCA,SAAS,gBAAgB,OAAiD;CACxE,OAAO,OAAQ,QAA+C,OAAO,mBAAmB;AAC1F;;;;;;;;;;;AAYA,SAAgB,yBAAyB,UAAiE;CACxG,MAAM,QAAoB,CAAC;CAC3B,IAAI,OAAO;CAEX,SAAS,UAAiB,OAAe,WAAuE;EAC9G,OAAO,EAEL,CAAC,OAAO,iBAAuC;GAC7C,MAAM,aAAoC;IAAE,OAAO,KAAA;IAAW,MAAM;GAAK;GACzE,IAAI;GACJ,IAAI,WAAW;GACf,IAAI,SAAS;GAEb,MAAM,KAAK;IAAE,MAAM;IAAa;IAAO;GAAU,CAAC;GAClD;GAEA,MAAM,cAAc;IAClB,IAAI,QACF;IAGF,SAAS;IACT;GACF;GAEA,MAAM,cAAc,YAA4C;IAC9D,IAAI,UACF,OAAQ,MAAM,SAAS,KAAK;IAG9B,IAAI,UACF,OAAO;IAGT,MAAM,SAAS,MAAM,UAAU,YAAY,OAAO,SAAS;IAE3D,WAAW;IAEX,IAAI,CAAC,gBAAgB,MAAM,GACzB,OAAO;KAAE,OAAO;KAAiB,MAAM;IAAM;IAG/C,WAAW,OAAO,OAAO,cAAc,CAAC;IAExC,OAAQ,MAAM,SAAS,KAAK;GAC9B;GAEA,OAAO;IACL,MAAM,OAAuC;KAC3C,IAAI,QACF,OAAO;KAGT,IAAI;MACF,MAAM,SAAS,MAAM,YAAY;MAEjC,IAAI,OAAO,SAAS,MAClB,MAAM;MAGR,OAAO,SAAS,aAAa;KAC/B,SAAS,OAAO;MACd,MAAM;MAEN,MAAM;KACR;IACF;IACA,MAAM,SAAyC;KAC7C,MAAM;KACN,MAAM,UAAU,SAAS;KAEzB,OAAO;IACT;GACF;EACF,EACF;CACF;CAEA,eAAe,QAAe,OAAe,WAAiE;EAC5G,IAAI,UAAU,SAAS;GACrB,MAAM,KAAK;IAAE,MAAM;IAAW;IAAO;GAAU,CAAC;GAEhD,OAAQ,MAAM,SAAS,QAAQ,OAAO,SAAS;EACjD;EAEA,MAAM,WAAW,UAAiB,OAAO,SAAS,CAAC,CAAC,OAAO,cAAc,CAAC;EAG1E,MAAM,GAAG,EAAE,CAAC,CAAE,OAAO;EAErB,IAAI;GACF,MAAM,SAAS,MAAM,SAAS,KAAK;GAEnC,IAAI,OAAO,SAAS,MAClB,MAAM,IAAI,MAAM,yDAAyD;GAG3E,OAAO,OAAO;EAChB,UAAU;GACR,MAAM,SAAS,SAAS;EAC1B;CACF;CAUA,OAAO;EAAE,QAAA;GAPP;GACA;GACA,YAAY,QAAQ,QAAQ;GAC5B,eAAe,QAAQ,QAAQ;GAC/B,YAAY,QAAQ,QAAQ;EAGhB;EAAG;EAAO,YAAY;CAAK;AAC3C;;;;;;;;;;;;AAsBA,SAAgB,iBAA2C,SAAmD;CAC5G,MAAM,WAAW,IAAI,KAAK,WAAW,CAAC,EAAA,CAAG,KAAK,WAAW,CAAC,OAAO,IAAI,MAAM,CAAC,CAAC;CAC7E,MAAM,UAAoC,CAAC;CAE3C,OAAO;EACL;EACA;EACA,UAAU,QAAQ,WAAW;GAC3B,MAAM,MAAM,YAAY;GAExB,QAAQ,KAAK,GAAG;GAEhB,OAAO,EAAE,QAAQ,MAAM,IAAI,SAAS,OAAO,SAAS,IAAI,EAAE,KAAK,CAAC,CAAC,IAAI,SAAS,OAAO,CAAC,CAAC,QAAQ,EAAE;EACnG;CACF;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contello/client",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "GraphQL client for Contello CMS with WebSocket transport, connection pooling, and built-in codegen",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,11 +11,12 @@
|
|
|
11
11
|
"directory": "packages/client"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@contello/opentelemetry": "^2.1.
|
|
15
|
-
"@entwico/dash": "^1.
|
|
14
|
+
"@contello/opentelemetry": "^2.1.3",
|
|
15
|
+
"@entwico/dash": "^1.4.0",
|
|
16
16
|
"graphql": "^17.0.2",
|
|
17
|
-
"graphql-ws": "^6.
|
|
18
|
-
"undici": "^8.
|
|
17
|
+
"graphql-ws": "^6.4.1",
|
|
18
|
+
"undici": "^8.12.3",
|
|
19
|
+
"ws": "^8.22.1"
|
|
19
20
|
},
|
|
20
21
|
"bin": {
|
|
21
22
|
"contello-client": "./dist/cli.js"
|
|
@@ -31,12 +32,19 @@
|
|
|
31
32
|
".": {
|
|
32
33
|
"import": "./dist/index.js",
|
|
33
34
|
"require": "./dist/index.cjs"
|
|
35
|
+
},
|
|
36
|
+
"./testing": {
|
|
37
|
+
"import": "./dist/testing.js",
|
|
38
|
+
"require": "./dist/testing.cjs"
|
|
34
39
|
}
|
|
35
40
|
},
|
|
36
41
|
"publishConfig": {
|
|
37
42
|
"access": "public",
|
|
38
43
|
"registry": "https://registry.npmjs.org"
|
|
39
44
|
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@types/ws": "^8.18.2"
|
|
47
|
+
},
|
|
40
48
|
"scripts": {
|
|
41
49
|
"build": "tsdown",
|
|
42
50
|
"lint": "eslint . --cache",
|