@pluv/client 3.2.1 → 3.2.2
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +9 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +5 -5
- package/src/infer.ts +4 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/client@3.2.
|
|
2
|
+
> @pluv/client@3.2.2 build /home/runner/work/pluv/pluv/packages/client
|
|
3
3
|
> tsup src/index.ts --format esm,cjs --dts
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
[34mCLI[39m Target: es6
|
|
9
9
|
[34mESM[39m Build start
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
11
|
+
[32mCJS[39m [1mdist/index.js [22m[32m65.76 KB[39m
|
|
12
|
+
[32mCJS[39m ⚡️ Build success in 119ms
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m64.03 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 132ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m19.
|
|
18
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m19.
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 4648ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m19.23 KB[39m
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m19.23 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @pluv/client
|
|
2
2
|
|
|
3
|
+
## 3.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8665dbe: Updated types of `createClient` so that the types inferred from `createClient` are flattened and no-longer depend on `@pluv/server`.
|
|
8
|
+
- Updated dependencies [8665dbe]
|
|
9
|
+
- @pluv/types@3.2.2
|
|
10
|
+
- @pluv/crdt@3.2.2
|
|
11
|
+
|
|
3
12
|
## 3.2.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AbstractCrdtDocFactory, InferDocLike, NoopCrdtDocFactory, InferStorage, InferDoc, InferCrdtJson } from '@pluv/crdt';
|
|
2
2
|
export { CrdtType, InferCrdtJson } from '@pluv/crdt';
|
|
3
|
-
import { IOLike, JsonObject, EventRecord, CrdtDocLike, UserInfo, MaybePromise, Id, ProcedureLike, InputZodLike, IORouterLike, InferIOAuthorizeUser,
|
|
3
|
+
import { IOLike, InferIOAuthorize, InferIOCrdt, InferIOEvents, JsonObject, EventRecord, CrdtDocLike, UserInfo, MaybePromise, Id, ProcedureLike, InputZodLike, IORouterLike, InferIOAuthorizeUser, BaseUser, RoomLike, InferIOOutput, InferIOInput, RoomEventListenerMap, BroadcastProxy, WebSocketConnection, SubscribeProxy, UpdateMyPresenceAction, InferIOCrdtKind, MergeEvents } from '@pluv/types';
|
|
4
4
|
export { BaseUser, ConnectionState, EventMessage, EventNotifierSubscriptionCallback, EventRecord, IOEventMessage, MergeEvents, RoomLike, UserInfo, WebSocketConnection, WebSocketState } from '@pluv/types';
|
|
5
5
|
|
|
6
6
|
declare abstract class AbstractStorageStore {
|
|
@@ -19,7 +19,7 @@ declare const identity: <T extends unknown>(x: T) => T;
|
|
|
19
19
|
type InferCallback<TIO extends IOLike<any, any, any>> = (i: typeof identity) => {
|
|
20
20
|
io: (io: TIO) => TIO;
|
|
21
21
|
};
|
|
22
|
-
declare const infer: <TIO extends IOLike<any, any, any>>(callback: InferCallback<TIO>) => InferCallback<TIO
|
|
22
|
+
declare const infer: <TIO extends IOLike<any, any, any>>(callback: InferCallback<TIO>) => InferCallback<IOLike<InferIOAuthorize<TIO>, InferIOCrdt<TIO>, InferIOEvents<TIO>>>;
|
|
23
23
|
|
|
24
24
|
type EventResolver<TIO extends IOLike, TInput extends JsonObject, TOutput extends EventRecord<string, any>, TPresence extends Record<string, any>, TDocLike extends CrdtDocLike<any, any>> = (data: TInput, context: EventResolverContext<TIO, TPresence, TDocLike>) => MaybePromise<TOutput | void>;
|
|
25
25
|
interface EventResolverContext<TIO extends IOLike, TPresence extends Record<string, any>, TDocLike extends CrdtDocLike<any, any>> {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AbstractCrdtDocFactory, InferDocLike, NoopCrdtDocFactory, InferStorage, InferDoc, InferCrdtJson } from '@pluv/crdt';
|
|
2
2
|
export { CrdtType, InferCrdtJson } from '@pluv/crdt';
|
|
3
|
-
import { IOLike, JsonObject, EventRecord, CrdtDocLike, UserInfo, MaybePromise, Id, ProcedureLike, InputZodLike, IORouterLike, InferIOAuthorizeUser,
|
|
3
|
+
import { IOLike, InferIOAuthorize, InferIOCrdt, InferIOEvents, JsonObject, EventRecord, CrdtDocLike, UserInfo, MaybePromise, Id, ProcedureLike, InputZodLike, IORouterLike, InferIOAuthorizeUser, BaseUser, RoomLike, InferIOOutput, InferIOInput, RoomEventListenerMap, BroadcastProxy, WebSocketConnection, SubscribeProxy, UpdateMyPresenceAction, InferIOCrdtKind, MergeEvents } from '@pluv/types';
|
|
4
4
|
export { BaseUser, ConnectionState, EventMessage, EventNotifierSubscriptionCallback, EventRecord, IOEventMessage, MergeEvents, RoomLike, UserInfo, WebSocketConnection, WebSocketState } from '@pluv/types';
|
|
5
5
|
|
|
6
6
|
declare abstract class AbstractStorageStore {
|
|
@@ -19,7 +19,7 @@ declare const identity: <T extends unknown>(x: T) => T;
|
|
|
19
19
|
type InferCallback<TIO extends IOLike<any, any, any>> = (i: typeof identity) => {
|
|
20
20
|
io: (io: TIO) => TIO;
|
|
21
21
|
};
|
|
22
|
-
declare const infer: <TIO extends IOLike<any, any, any>>(callback: InferCallback<TIO>) => InferCallback<TIO
|
|
22
|
+
declare const infer: <TIO extends IOLike<any, any, any>>(callback: InferCallback<TIO>) => InferCallback<IOLike<InferIOAuthorize<TIO>, InferIOCrdt<TIO>, InferIOEvents<TIO>>>;
|
|
23
23
|
|
|
24
24
|
type EventResolver<TIO extends IOLike, TInput extends JsonObject, TOutput extends EventRecord<string, any>, TPresence extends Record<string, any>, TDocLike extends CrdtDocLike<any, any>> = (data: TInput, context: EventResolverContext<TIO, TPresence, TDocLike>) => MaybePromise<TOutput | void>;
|
|
25
25
|
interface EventResolverContext<TIO extends IOLike, TPresence extends Record<string, any>, TDocLike extends CrdtDocLike<any, any>> {
|
package/dist/index.js
CHANGED
|
@@ -1671,7 +1671,9 @@ var createClient = (options) => {
|
|
|
1671
1671
|
};
|
|
1672
1672
|
|
|
1673
1673
|
// src/infer.ts
|
|
1674
|
-
var infer = (callback) =>
|
|
1674
|
+
var infer = (callback) => {
|
|
1675
|
+
return callback;
|
|
1676
|
+
};
|
|
1675
1677
|
|
|
1676
1678
|
// src/MockedRoom.ts
|
|
1677
1679
|
var import_types2 = require("@pluv/types");
|
package/dist/index.mjs
CHANGED
|
@@ -1643,7 +1643,9 @@ var createClient = (options) => {
|
|
|
1643
1643
|
};
|
|
1644
1644
|
|
|
1645
1645
|
// src/infer.ts
|
|
1646
|
-
var infer = (callback) =>
|
|
1646
|
+
var infer = (callback) => {
|
|
1647
|
+
return callback;
|
|
1648
|
+
};
|
|
1647
1649
|
|
|
1648
1650
|
// src/MockedRoom.ts
|
|
1649
1651
|
import { ConnectionState as ConnectionState2, StorageState as StorageState2 } from "@pluv/types";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluv/client",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"description": "@pluv/io frontend client",
|
|
5
5
|
"author": {
|
|
6
6
|
"email": "david@pluv.io",
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"wonka": "^6.3.5",
|
|
25
|
-
"@pluv/crdt": "^3.2.
|
|
26
|
-
"@pluv/types": "^3.2.
|
|
25
|
+
"@pluv/crdt": "^3.2.2",
|
|
26
|
+
"@pluv/types": "^3.2.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"eslint": "^9.31.0",
|
|
30
30
|
"tsup": "^8.5.0",
|
|
31
31
|
"typescript": "^5.8.3",
|
|
32
|
-
"@pluv/tsconfig": "^3.2.
|
|
33
|
-
"eslint-config-pluv": "^3.2.
|
|
32
|
+
"@pluv/tsconfig": "^3.2.2",
|
|
33
|
+
"eslint-config-pluv": "^3.2.2"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|
package/src/infer.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IOLike } from "@pluv/types";
|
|
1
|
+
import type { InferIOAuthorize, InferIOCrdt, InferIOEvents, IOLike } from "@pluv/types";
|
|
2
2
|
import type { identity } from "./utils";
|
|
3
3
|
|
|
4
4
|
export type InferCallback<TIO extends IOLike<any, any, any>> = (i: typeof identity) => {
|
|
@@ -7,4 +7,6 @@ export type InferCallback<TIO extends IOLike<any, any, any>> = (i: typeof identi
|
|
|
7
7
|
|
|
8
8
|
export const infer = <TIO extends IOLike<any, any, any>>(
|
|
9
9
|
callback: InferCallback<TIO>,
|
|
10
|
-
): InferCallback<TIO
|
|
10
|
+
): InferCallback<IOLike<InferIOAuthorize<TIO>, InferIOCrdt<TIO>, InferIOEvents<TIO>>> => {
|
|
11
|
+
return callback as any;
|
|
12
|
+
};
|