@baeta/subscriptions-pubsub 2.0.0-next.0 → 2.0.0-next.10
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/CHANGELOG.md +69 -0
- package/README.md +43 -18
- package/dist/index.d.ts +70 -0
- package/dist/index.js +64 -0
- package/dist/index.js.map +1 -1
- package/package.json +18 -21
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# @baeta/subscriptions-pubsub
|
|
2
|
+
|
|
3
|
+
## 2.0.0-next.10
|
|
4
|
+
|
|
5
|
+
## 2.0.0-next.9
|
|
6
|
+
|
|
7
|
+
## 2.0.0-next.8
|
|
8
|
+
|
|
9
|
+
## 2.0.0-next.7
|
|
10
|
+
|
|
11
|
+
## 2.0.0-next.6
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Fix export for subscriptions-pubsub
|
|
16
|
+
|
|
17
|
+
## 2.0.0-next.2
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Fix broken types
|
|
22
|
+
|
|
23
|
+
## 2.0.0-next.1
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Fix release version
|
|
28
|
+
|
|
29
|
+
## 2.0.0-next.0
|
|
30
|
+
|
|
31
|
+
### Major Changes
|
|
32
|
+
|
|
33
|
+
- [#214](https://github.com/andreisergiu98/baeta/pull/214) [`31d1a50`](https://github.com/andreisergiu98/baeta/commit/31d1a509f96535b43ae85d19c770eb1a5f09dc94) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Baeta v2 – major refactor
|
|
34
|
+
- **Side-effect-free type generation & resolver definitions.**
|
|
35
|
+
The types generator and resolver definitions were reworked to be side-effect free, improving type safety.
|
|
36
|
+
- **Stricter type safety.**
|
|
37
|
+
You must now **explicitly define resolvers for every field** during development—breakages that used to surface at runtime are now caught at compile time.
|
|
38
|
+
- **Removed `@baeta/compiler`.**
|
|
39
|
+
Since modern runtimes can execute TypeScript natively, the separate compiler package is no longer needed. Use your runtime’s native TS support or your existing build setup.
|
|
40
|
+
- **Subscriptions update.**
|
|
41
|
+
`@baeta/subscriptions-pubsub` now targets **`graphql-subscriptions` v3**.
|
|
42
|
+
|
|
43
|
+
## 1.0.9
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- [`583014f`](https://github.com/andreisergiu98/baeta/commit/583014f0bac810b25d9a8226bda2df4c9039f5e3) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Update dependencies
|
|
48
|
+
|
|
49
|
+
## 1.0.8
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- [#189](https://github.com/andreisergiu98/baeta/pull/189) [`d500378`](https://github.com/andreisergiu98/baeta/commit/d500378198e0a9c48298c4242913bca8ad348228) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - add jsdocs
|
|
54
|
+
|
|
55
|
+
- [#165](https://github.com/andreisergiu98/baeta/pull/165) [`1334c2a`](https://github.com/andreisergiu98/baeta/commit/1334c2a866676c88f0f3d380b22133d81c4e98bc) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - mark as stable
|
|
56
|
+
|
|
57
|
+
## 0.0.2
|
|
58
|
+
|
|
59
|
+
### Patch Changes
|
|
60
|
+
|
|
61
|
+
- [`b59db50`](https://github.com/andreisergiu98/baeta/commit/b59db501a83275ab2d964933080e688a3a5d8820) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - add readme
|
|
62
|
+
|
|
63
|
+
## 0.0.1
|
|
64
|
+
|
|
65
|
+
### Patch Changes
|
|
66
|
+
|
|
67
|
+
- [#180](https://github.com/andreisergiu98/baeta/pull/180) [`483c709`](https://github.com/andreisergiu98/baeta/commit/483c70932f815fd114732c00b74f9488d7924c72) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Raise minimum required NodeJS version to 22.12.0. Drop CommonJS builds in favor of the require_esm feature from NodeJS 22.12.0 onwards.
|
|
68
|
+
|
|
69
|
+
- [`de6e89c`](https://github.com/andreisergiu98/baeta/commit/de6e89c1b592e280967c73a4137d24ee56ef1857) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - raise es target to 2024
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<div align="center">
|
|
6
6
|
<h1>Baeta</h1>
|
|
7
7
|
<a href="https://www.npmjs.com/package/@baeta/cli"><img src="https://img.shields.io/npm/v/@baeta/cli.svg?style=flat" /></a>
|
|
8
|
-
<a href="https://github.com/andreisergiu98/baeta/actions/workflows/
|
|
8
|
+
<a href="https://github.com/andreisergiu98/baeta/actions/workflows/checks.yml"><img src="https://img.shields.io/github/actions/workflow/status/andreisergiu98/baeta/checks.yml" /></a>
|
|
9
9
|
<a href="https://github.com/andreisergiu98/baeta/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" /></a>
|
|
10
10
|
<a href="https://github.com/andreisergiu98/baeta/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" /></a>
|
|
11
11
|
<br />
|
|
@@ -77,43 +77,68 @@ type Query {
|
|
|
77
77
|
#### 2. Implement your resolvers
|
|
78
78
|
|
|
79
79
|
```typescript
|
|
80
|
-
import {
|
|
80
|
+
import { UserModule } from "./typedef.ts";
|
|
81
81
|
|
|
82
|
-
const { Query } =
|
|
82
|
+
const { Query } = UserModule;
|
|
83
83
|
|
|
84
|
-
Query.user(({ args }) => {
|
|
84
|
+
const userQuery = Query.user.resolve(({ args }) => {
|
|
85
85
|
return dataSource.user.find(args.where);
|
|
86
86
|
});
|
|
87
87
|
|
|
88
|
-
Query.users(() => {
|
|
88
|
+
const usersQuery = Query.users.resolve(() => {
|
|
89
89
|
return dataSource.user.findMany();
|
|
90
90
|
});
|
|
91
|
+
|
|
92
|
+
Query.$fields({
|
|
93
|
+
user: userQuery,
|
|
94
|
+
users: usersQuery,
|
|
95
|
+
});
|
|
91
96
|
```
|
|
92
97
|
|
|
93
98
|
#### 3. Add authorization
|
|
94
99
|
|
|
95
100
|
```typescript
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
Query
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
import { UserModule } from "./typedef.ts";
|
|
102
|
+
|
|
103
|
+
const { Query } = UserModule;
|
|
104
|
+
|
|
105
|
+
const userQuery = Query.user
|
|
106
|
+
.$auth({
|
|
107
|
+
$or: {
|
|
108
|
+
isPublic: true,
|
|
109
|
+
isLoggedIn: true,
|
|
110
|
+
},
|
|
111
|
+
})
|
|
112
|
+
.resolve(async ({ args }) => {
|
|
113
|
+
// ...
|
|
114
|
+
});
|
|
104
115
|
```
|
|
105
116
|
|
|
106
117
|
#### 4. Add caching
|
|
107
118
|
|
|
108
119
|
```typescript
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
const { User, Query } = getUserModule();
|
|
120
|
+
const { Query, Mutation, User } = UserModule;
|
|
112
121
|
|
|
113
122
|
export const userCache = User.$createCache();
|
|
114
123
|
|
|
115
|
-
Query.user
|
|
116
|
-
|
|
124
|
+
const userQuery = Query.user
|
|
125
|
+
.$auth({
|
|
126
|
+
// ...
|
|
127
|
+
})
|
|
128
|
+
.$useCache(userCache)
|
|
129
|
+
.resolve(async ({ args }) => {
|
|
130
|
+
// ...
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
const updateUserMutation = Mutation.updateUser
|
|
134
|
+
.$use(async (next) => {
|
|
135
|
+
const user = await next();
|
|
136
|
+
await userCache.save(user);
|
|
137
|
+
return user;
|
|
138
|
+
})
|
|
139
|
+
.resolve(async ({ args }) => {
|
|
140
|
+
// ...
|
|
141
|
+
});
|
|
117
142
|
```
|
|
118
143
|
|
|
119
144
|
## Compatibility
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
//#region lib/pubsub-engine.d.ts
|
|
2
|
+
/** biome-ignore-all lint/suspicious/noExplicitAny: allow any args*/
|
|
3
|
+
interface PubSubEngine {
|
|
4
|
+
publish: (triggerName: string, payload: any, ...rest: any[]) => Promise<void>;
|
|
5
|
+
subscribe: (triggerName: string, onMessage: (message: any) => Promise<void> | void, ...rest: any[]) => Promise<number>;
|
|
6
|
+
unsubscribe: (subId: number, ...rest: any[]) => void;
|
|
7
|
+
asyncIterableIterator: <T>(triggers: string | readonly string[], ...rest: any[]) => AsyncIterableIterator<T>;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region lib/typed-pubsub.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* Configuration options for TypedPubSub
|
|
13
|
+
*/
|
|
14
|
+
interface TypedPubSubOptions {
|
|
15
|
+
/** Optional prefix for channel names */
|
|
16
|
+
prefix?: string;
|
|
17
|
+
}
|
|
18
|
+
type PubSubMap = Record<string, any>;
|
|
19
|
+
type OnMessage<Payload> = (message: Payload) => Promise<void> | void;
|
|
20
|
+
type RestPayloadFnArgs<Fn> = Fn extends ((triggerName: string, payload: any, ...rest: infer Rest) => any) ? Rest : never;
|
|
21
|
+
type RestSubscribeFnArgs<Fn> = Fn extends ((triggerName: string, onMessage: OnMessage<any>, ...rest: infer Rest) => any) ? Rest : never;
|
|
22
|
+
type RestUnsubscribeFnArgs<Fn> = Fn extends ((subId: number, ...rest: infer Rest) => any) ? Rest : never;
|
|
23
|
+
type RestAsyncIterableIteratorFnArgs<Fn> = Fn extends ((triggers: string | readonly string[], ...rest: infer Rest) => any) ? Rest : never;
|
|
24
|
+
/**
|
|
25
|
+
* Creates a type-safe wrapper around a PubSub implementation.
|
|
26
|
+
*
|
|
27
|
+
* This utility ensures that your subscription channels and their payloads
|
|
28
|
+
* are properly typed, helping catch potential errors at compile time.
|
|
29
|
+
*
|
|
30
|
+
* @param pubsub - The PubSub engine instance (e.g., PubSub, RedisPubSub)
|
|
31
|
+
* @param options - Configuration options
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* // Define your event map
|
|
36
|
+
* type PubSubMap = {
|
|
37
|
+
* "user-updated": User;
|
|
38
|
+
* [c: `user-updated-${string}`]: User;
|
|
39
|
+
* };
|
|
40
|
+
*
|
|
41
|
+
* // Create typed PubSub instance
|
|
42
|
+
* const pubsub = new TypedPubSub<PubSub, PubSubMap>(new PubSub());
|
|
43
|
+
*
|
|
44
|
+
* // Usage with Redis
|
|
45
|
+
* const pubsub = new TypedPubSub<RedisPubSub, PubSubMap>(
|
|
46
|
+
* new RedisPubSub({
|
|
47
|
+
* publisher: new Redis(options),
|
|
48
|
+
* subscriber: new Redis(options),
|
|
49
|
+
* }),
|
|
50
|
+
* {
|
|
51
|
+
* prefix: "feature-1:",
|
|
52
|
+
* }
|
|
53
|
+
* );
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
declare class TypedPubSub<Engine extends PubSubEngine, Map extends PubSubMap> {
|
|
57
|
+
protected channelPrefix: string;
|
|
58
|
+
protected pubsub: Engine;
|
|
59
|
+
protected options?: TypedPubSubOptions;
|
|
60
|
+
constructor(pubsub: Engine, options?: TypedPubSubOptions);
|
|
61
|
+
publish: <C extends keyof Map>(channel: C, message: Map[C], ...rest: RestPayloadFnArgs<Engine["publish"]>) => Promise<void>;
|
|
62
|
+
subscribe: <C extends keyof Map>(channel: C, onMessage: OnMessage<Map[C]>, ...rest: RestSubscribeFnArgs<Engine["subscribe"]>) => Promise<number>;
|
|
63
|
+
unsubscribe: (subId: number, ...rest: RestUnsubscribeFnArgs<Engine["unsubscribe"]>) => void;
|
|
64
|
+
asyncIterableIterator: <C extends keyof Map>(triggers: C | C[], ...rest: RestAsyncIterableIteratorFnArgs<Engine["asyncIterableIterator"]>) => AsyncIterableIterator<Map[C]>;
|
|
65
|
+
protected mapChannel: <C extends keyof Map>(channel: C) => string;
|
|
66
|
+
protected mapTriggers: <C extends keyof Map>(triggers: C | C[]) => string | string[];
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
export { TypedPubSub, type TypedPubSubOptions };
|
|
70
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1 +1,65 @@
|
|
|
1
|
+
//#region lib/typed-pubsub.ts
|
|
2
|
+
/**
|
|
3
|
+
* Creates a type-safe wrapper around a PubSub implementation.
|
|
4
|
+
*
|
|
5
|
+
* This utility ensures that your subscription channels and their payloads
|
|
6
|
+
* are properly typed, helping catch potential errors at compile time.
|
|
7
|
+
*
|
|
8
|
+
* @param pubsub - The PubSub engine instance (e.g., PubSub, RedisPubSub)
|
|
9
|
+
* @param options - Configuration options
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* // Define your event map
|
|
14
|
+
* type PubSubMap = {
|
|
15
|
+
* "user-updated": User;
|
|
16
|
+
* [c: `user-updated-${string}`]: User;
|
|
17
|
+
* };
|
|
18
|
+
*
|
|
19
|
+
* // Create typed PubSub instance
|
|
20
|
+
* const pubsub = new TypedPubSub<PubSub, PubSubMap>(new PubSub());
|
|
21
|
+
*
|
|
22
|
+
* // Usage with Redis
|
|
23
|
+
* const pubsub = new TypedPubSub<RedisPubSub, PubSubMap>(
|
|
24
|
+
* new RedisPubSub({
|
|
25
|
+
* publisher: new Redis(options),
|
|
26
|
+
* subscriber: new Redis(options),
|
|
27
|
+
* }),
|
|
28
|
+
* {
|
|
29
|
+
* prefix: "feature-1:",
|
|
30
|
+
* }
|
|
31
|
+
* );
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
var TypedPubSub = class {
|
|
35
|
+
channelPrefix;
|
|
36
|
+
pubsub;
|
|
37
|
+
options;
|
|
38
|
+
constructor(pubsub, options) {
|
|
39
|
+
this.channelPrefix = options?.prefix ?? "";
|
|
40
|
+
this.pubsub = pubsub;
|
|
41
|
+
this.options = options;
|
|
42
|
+
}
|
|
43
|
+
publish = (channel, message, ...rest) => {
|
|
44
|
+
return this.pubsub.publish(this.mapChannel(channel), message, ...rest);
|
|
45
|
+
};
|
|
46
|
+
subscribe = (channel, onMessage, ...rest) => {
|
|
47
|
+
return this.pubsub.subscribe(this.mapChannel(channel), onMessage, ...rest);
|
|
48
|
+
};
|
|
49
|
+
unsubscribe = (subId, ...rest) => {
|
|
50
|
+
return this.pubsub.unsubscribe(subId, ...rest);
|
|
51
|
+
};
|
|
52
|
+
asyncIterableIterator = (triggers, ...rest) => {
|
|
53
|
+
return this.pubsub.asyncIterableIterator(this.mapTriggers(triggers), ...rest);
|
|
54
|
+
};
|
|
55
|
+
mapChannel = (channel) => {
|
|
56
|
+
return `${this.channelPrefix}${channel.toString()}`;
|
|
57
|
+
};
|
|
58
|
+
mapTriggers = (triggers) => {
|
|
59
|
+
return Array.isArray(triggers) ? triggers.map(this.mapChannel) : this.mapChannel(triggers);
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
//#endregion
|
|
64
|
+
export { TypedPubSub };
|
|
1
65
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../lib/typed-pubsub.ts"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noExplicitAny: allow any args */\n\nimport type { PubSubEngine } from './pubsub-engine.ts';\n\n/**\n * Configuration options for TypedPubSub\n */\nexport interface TypedPubSubOptions {\n\t/** Optional prefix for channel names */\n\tprefix?: string;\n}\n\ntype PubSubMap = Record<string, any>;\ntype OnMessage<Payload> = (message: Payload) => Promise<void> | void;\n\ntype RestPayloadFnArgs<Fn> = Fn extends (\n\ttriggerName: string,\n\tpayload: any,\n\t...rest: infer Rest\n) => any\n\t? Rest\n\t: never;\n\ntype RestSubscribeFnArgs<Fn> = Fn extends (\n\ttriggerName: string,\n\tonMessage: OnMessage<any>,\n\t...rest: infer Rest\n) => any\n\t? Rest\n\t: never;\n\ntype RestUnsubscribeFnArgs<Fn> = Fn extends (subId: number, ...rest: infer Rest) => any\n\t? Rest\n\t: never;\n\ntype RestAsyncIterableIteratorFnArgs<Fn> = Fn extends (\n\ttriggers: string | readonly string[],\n\t...rest: infer Rest\n) => any\n\t? Rest\n\t: never;\n\n/**\n * Creates a type-safe wrapper around a PubSub implementation.\n *\n * This utility ensures that your subscription channels and their payloads\n * are properly typed, helping catch potential errors at compile time.\n *\n * @param pubsub - The PubSub engine instance (e.g., PubSub, RedisPubSub)\n * @param options - Configuration options\n *\n * @example\n * ```typescript\n * // Define your event map\n * type PubSubMap = {\n * \"user-updated\": User;\n * [c: `user-updated-${string}`]: User;\n * };\n *\n * // Create typed PubSub instance\n * const pubsub = new TypedPubSub<PubSub, PubSubMap>(new PubSub());\n *\n * // Usage with Redis\n * const pubsub = new TypedPubSub<RedisPubSub, PubSubMap>(\n * new RedisPubSub({\n * publisher: new Redis(options),\n * subscriber: new Redis(options),\n * }),\n * {\n * prefix: \"feature-1:\",\n * }\n * );\n * ```\n */\nexport class TypedPubSub<Engine extends PubSubEngine, Map extends PubSubMap> {\n\tprotected channelPrefix: string;\n\tprotected pubsub: Engine;\n\tprotected options?: TypedPubSubOptions;\n\n\tconstructor(pubsub: Engine, options?: TypedPubSubOptions) {\n\t\tthis.channelPrefix = options?.prefix ?? '';\n\t\tthis.pubsub = pubsub;\n\t\tthis.options = options;\n\t}\n\n\tpublish = <C extends keyof Map>(\n\t\tchannel: C,\n\t\tmessage: Map[C],\n\t\t...rest: RestPayloadFnArgs<Engine['publish']>\n\t) => {\n\t\treturn this.pubsub.publish(this.mapChannel(channel), message, ...rest);\n\t};\n\n\tsubscribe = <C extends keyof Map>(\n\t\tchannel: C,\n\t\tonMessage: OnMessage<Map[C]>,\n\t\t...rest: RestSubscribeFnArgs<Engine['subscribe']>\n\t) => {\n\t\treturn this.pubsub.subscribe(this.mapChannel(channel), onMessage, ...rest);\n\t};\n\n\tunsubscribe = (subId: number, ...rest: RestUnsubscribeFnArgs<Engine['unsubscribe']>) => {\n\t\treturn this.pubsub.unsubscribe(subId, ...rest);\n\t};\n\n\tasyncIterableIterator = <C extends keyof Map>(\n\t\ttriggers: C | C[],\n\t\t...rest: RestAsyncIterableIteratorFnArgs<Engine['asyncIterableIterator']>\n\t) => {\n\t\treturn this.pubsub.asyncIterableIterator<Map[C]>(this.mapTriggers(triggers), ...rest);\n\t};\n\n\tprotected mapChannel = <C extends keyof Map>(channel: C): string => {\n\t\treturn `${this.channelPrefix}${channel.toString()}`;\n\t};\n\n\tprotected mapTriggers = <C extends keyof Map>(triggers: C | C[]): string | string[] => {\n\t\treturn Array.isArray(triggers) ? triggers.map(this.mapChannel) : this.mapChannel(triggers);\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0EA,IAAa,cAAb,MAA6E;CAC5E,AAAU;CACV,AAAU;CACV,AAAU;CAEV,YAAY,QAAgB,SAA8B;AACzD,OAAK,gBAAgB,SAAS,UAAU;AACxC,OAAK,SAAS;AACd,OAAK,UAAU;;CAGhB,WACC,SACA,SACA,GAAG,SACC;AACJ,SAAO,KAAK,OAAO,QAAQ,KAAK,WAAW,QAAQ,EAAE,SAAS,GAAG,KAAK;;CAGvE,aACC,SACA,WACA,GAAG,SACC;AACJ,SAAO,KAAK,OAAO,UAAU,KAAK,WAAW,QAAQ,EAAE,WAAW,GAAG,KAAK;;CAG3E,eAAe,OAAe,GAAG,SAAuD;AACvF,SAAO,KAAK,OAAO,YAAY,OAAO,GAAG,KAAK;;CAG/C,yBACC,UACA,GAAG,SACC;AACJ,SAAO,KAAK,OAAO,sBAA8B,KAAK,YAAY,SAAS,EAAE,GAAG,KAAK;;CAGtF,AAAU,cAAmC,YAAuB;AACnE,SAAO,GAAG,KAAK,gBAAgB,QAAQ,UAAU;;CAGlD,AAAU,eAAoC,aAAyC;AACtF,SAAO,MAAM,QAAQ,SAAS,GAAG,SAAS,IAAI,KAAK,WAAW,GAAG,KAAK,WAAW,SAAS"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baeta/subscriptions-pubsub",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.10",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"baeta",
|
|
6
6
|
"graphql",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"type": "module",
|
|
28
28
|
"exports": {
|
|
29
29
|
".": {
|
|
30
|
-
"types": "./index.ts",
|
|
31
|
-
"default": "./index.
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"default": "./dist/index.js"
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"types": "dist/index.d.ts",
|
|
@@ -37,17 +37,23 @@
|
|
|
37
37
|
"package.json"
|
|
38
38
|
],
|
|
39
39
|
"scripts": {
|
|
40
|
-
"build": "
|
|
41
|
-
"prepack": "
|
|
42
|
-
"postpack": "
|
|
43
|
-
"test": "
|
|
40
|
+
"build": "builder build",
|
|
41
|
+
"prepack": "builder prepare",
|
|
42
|
+
"postpack": "builder prepare --clean",
|
|
43
|
+
"test": "builder test",
|
|
44
|
+
"test:circular": "builder test-circular",
|
|
44
45
|
"types": "tsc --noEmit"
|
|
45
46
|
},
|
|
47
|
+
"ava": {
|
|
48
|
+
"extensions": {
|
|
49
|
+
"ts": "module"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
46
52
|
"devDependencies": {
|
|
47
|
-
"@baeta/builder": "
|
|
48
|
-
"@baeta/testing": "
|
|
49
|
-
"@baeta/tsconfig": "
|
|
50
|
-
"graphql": "^16.
|
|
53
|
+
"@baeta/builder": "^0.0.0",
|
|
54
|
+
"@baeta/testing": "^0.0.0",
|
|
55
|
+
"@baeta/tsconfig": "^0.0.0",
|
|
56
|
+
"graphql": "^16.12.0",
|
|
51
57
|
"graphql-subscriptions": "^3.0.0",
|
|
52
58
|
"typescript": "^5.9.3"
|
|
53
59
|
},
|
|
@@ -63,15 +69,6 @@
|
|
|
63
69
|
}
|
|
64
70
|
}
|
|
65
71
|
},
|
|
66
|
-
"ava": {
|
|
67
|
-
"extensions": {
|
|
68
|
-
"ts": "module"
|
|
69
|
-
},
|
|
70
|
-
"nodeArguments": [
|
|
71
|
-
"--no-warnings",
|
|
72
|
-
"--experimental-transform-types"
|
|
73
|
-
]
|
|
74
|
-
},
|
|
75
72
|
"typedocOptions": {
|
|
76
73
|
"entryPoints": [
|
|
77
74
|
"./index.ts"
|
|
@@ -89,4 +86,4 @@
|
|
|
89
86
|
"alphabetical-ignoring-documents"
|
|
90
87
|
]
|
|
91
88
|
}
|
|
92
|
-
}
|
|
89
|
+
}
|