@pluv/platform-pluv 0.32.6 → 0.32.7
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 +149 -1
- package/dist/index.d.ts +149 -1
- package/dist/index.js +2 -0
- package/dist/index.mjs +1 -0
- package/package.json +6 -6
- package/src/index.ts +1 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/platform-pluv@0.32.
|
|
2
|
+
> @pluv/platform-pluv@0.32.7 build /home/runner/work/pluv/pluv/packages/platform-pluv
|
|
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
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m8.
|
|
12
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
-
[32mCJS[39m [1mdist/index.js [22m[32m9.
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
11
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m8.84 KB[39m
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 78ms
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m9.74 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 80ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[
|
|
18
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 6515ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m6.99 KB[39m
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m6.99 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AbstractPlatform, WebSocketRegistrationMode, AbstractWebSocket, ConvertWebSocketConfig, WebSocketSerializedState, AbstractPlatformConfig, JWTEncodeParams, GetInitialStorageFn, BaseUser as BaseUser$1 } from '@pluv/io';
|
|
2
2
|
import * as hono from 'hono';
|
|
3
3
|
import { BaseUser, InputZodLike, IOLike } from '@pluv/types';
|
|
4
|
+
import { z } from 'zod';
|
|
4
5
|
|
|
5
6
|
declare class PluvPlatform extends AbstractPlatform {
|
|
6
7
|
_registrationMode: WebSocketRegistrationMode;
|
|
@@ -96,4 +97,151 @@ declare class PluvIO<TUser extends BaseUser> implements IOLike<PluvAuthorize<TUs
|
|
|
96
97
|
|
|
97
98
|
declare const createIO: <TUser extends BaseUser$1>(config: PluvIOConfig<TUser>) => PluvIO<TUser>;
|
|
98
99
|
|
|
99
|
-
|
|
100
|
+
declare const ZodEvent: z.ZodDiscriminatedUnion<"event", [z.ZodObject<{
|
|
101
|
+
event: z.ZodLiteral<"initial-storage">;
|
|
102
|
+
data: z.ZodObject<{
|
|
103
|
+
room: z.ZodNullable<z.ZodString>;
|
|
104
|
+
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
room: string | null;
|
|
106
|
+
}, {
|
|
107
|
+
room: string | null;
|
|
108
|
+
}>;
|
|
109
|
+
}, "strip", z.ZodTypeAny, {
|
|
110
|
+
event: "initial-storage";
|
|
111
|
+
data: {
|
|
112
|
+
room: string | null;
|
|
113
|
+
};
|
|
114
|
+
}, {
|
|
115
|
+
event: "initial-storage";
|
|
116
|
+
data: {
|
|
117
|
+
room: string | null;
|
|
118
|
+
};
|
|
119
|
+
}>, z.ZodObject<{
|
|
120
|
+
event: z.ZodLiteral<"room-deleted">;
|
|
121
|
+
data: z.ZodObject<{
|
|
122
|
+
room: z.ZodString;
|
|
123
|
+
storage: z.ZodNullable<z.ZodString>;
|
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
|
125
|
+
room: string;
|
|
126
|
+
storage: string | null;
|
|
127
|
+
}, {
|
|
128
|
+
room: string;
|
|
129
|
+
storage: string | null;
|
|
130
|
+
}>;
|
|
131
|
+
}, "strip", z.ZodTypeAny, {
|
|
132
|
+
event: "room-deleted";
|
|
133
|
+
data: {
|
|
134
|
+
room: string;
|
|
135
|
+
storage: string | null;
|
|
136
|
+
};
|
|
137
|
+
}, {
|
|
138
|
+
event: "room-deleted";
|
|
139
|
+
data: {
|
|
140
|
+
room: string;
|
|
141
|
+
storage: string | null;
|
|
142
|
+
};
|
|
143
|
+
}>, z.ZodObject<{
|
|
144
|
+
event: z.ZodLiteral<"user-connected">;
|
|
145
|
+
data: z.ZodObject<{
|
|
146
|
+
room: z.ZodString;
|
|
147
|
+
storage: z.ZodNullable<z.ZodString>;
|
|
148
|
+
user: z.ZodObject<{
|
|
149
|
+
id: z.ZodString;
|
|
150
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
151
|
+
id: z.ZodString;
|
|
152
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
153
|
+
id: z.ZodString;
|
|
154
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
155
|
+
}, "strip", z.ZodTypeAny, {
|
|
156
|
+
room: string;
|
|
157
|
+
storage: string | null;
|
|
158
|
+
user: {
|
|
159
|
+
id: string;
|
|
160
|
+
} & {
|
|
161
|
+
[k: string]: unknown;
|
|
162
|
+
};
|
|
163
|
+
}, {
|
|
164
|
+
room: string;
|
|
165
|
+
storage: string | null;
|
|
166
|
+
user: {
|
|
167
|
+
id: string;
|
|
168
|
+
} & {
|
|
169
|
+
[k: string]: unknown;
|
|
170
|
+
};
|
|
171
|
+
}>;
|
|
172
|
+
}, "strip", z.ZodTypeAny, {
|
|
173
|
+
event: "user-connected";
|
|
174
|
+
data: {
|
|
175
|
+
room: string;
|
|
176
|
+
storage: string | null;
|
|
177
|
+
user: {
|
|
178
|
+
id: string;
|
|
179
|
+
} & {
|
|
180
|
+
[k: string]: unknown;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
}, {
|
|
184
|
+
event: "user-connected";
|
|
185
|
+
data: {
|
|
186
|
+
room: string;
|
|
187
|
+
storage: string | null;
|
|
188
|
+
user: {
|
|
189
|
+
id: string;
|
|
190
|
+
} & {
|
|
191
|
+
[k: string]: unknown;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
}>, z.ZodObject<{
|
|
195
|
+
event: z.ZodLiteral<"user-disconnected">;
|
|
196
|
+
data: z.ZodObject<{
|
|
197
|
+
room: z.ZodString;
|
|
198
|
+
storage: z.ZodNullable<z.ZodString>;
|
|
199
|
+
user: z.ZodObject<{
|
|
200
|
+
id: z.ZodString;
|
|
201
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
202
|
+
id: z.ZodString;
|
|
203
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
204
|
+
id: z.ZodString;
|
|
205
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
206
|
+
}, "strip", z.ZodTypeAny, {
|
|
207
|
+
room: string;
|
|
208
|
+
storage: string | null;
|
|
209
|
+
user: {
|
|
210
|
+
id: string;
|
|
211
|
+
} & {
|
|
212
|
+
[k: string]: unknown;
|
|
213
|
+
};
|
|
214
|
+
}, {
|
|
215
|
+
room: string;
|
|
216
|
+
storage: string | null;
|
|
217
|
+
user: {
|
|
218
|
+
id: string;
|
|
219
|
+
} & {
|
|
220
|
+
[k: string]: unknown;
|
|
221
|
+
};
|
|
222
|
+
}>;
|
|
223
|
+
}, "strip", z.ZodTypeAny, {
|
|
224
|
+
event: "user-disconnected";
|
|
225
|
+
data: {
|
|
226
|
+
room: string;
|
|
227
|
+
storage: string | null;
|
|
228
|
+
user: {
|
|
229
|
+
id: string;
|
|
230
|
+
} & {
|
|
231
|
+
[k: string]: unknown;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
}, {
|
|
235
|
+
event: "user-disconnected";
|
|
236
|
+
data: {
|
|
237
|
+
room: string;
|
|
238
|
+
storage: string | null;
|
|
239
|
+
user: {
|
|
240
|
+
id: string;
|
|
241
|
+
} & {
|
|
242
|
+
[k: string]: unknown;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
}>]>;
|
|
246
|
+
|
|
247
|
+
export { PluvIO, type PluvIOConfig, PluvPlatform, ZodEvent, createIO };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AbstractPlatform, WebSocketRegistrationMode, AbstractWebSocket, ConvertWebSocketConfig, WebSocketSerializedState, AbstractPlatformConfig, JWTEncodeParams, GetInitialStorageFn, BaseUser as BaseUser$1 } from '@pluv/io';
|
|
2
2
|
import * as hono from 'hono';
|
|
3
3
|
import { BaseUser, InputZodLike, IOLike } from '@pluv/types';
|
|
4
|
+
import { z } from 'zod';
|
|
4
5
|
|
|
5
6
|
declare class PluvPlatform extends AbstractPlatform {
|
|
6
7
|
_registrationMode: WebSocketRegistrationMode;
|
|
@@ -96,4 +97,151 @@ declare class PluvIO<TUser extends BaseUser> implements IOLike<PluvAuthorize<TUs
|
|
|
96
97
|
|
|
97
98
|
declare const createIO: <TUser extends BaseUser$1>(config: PluvIOConfig<TUser>) => PluvIO<TUser>;
|
|
98
99
|
|
|
99
|
-
|
|
100
|
+
declare const ZodEvent: z.ZodDiscriminatedUnion<"event", [z.ZodObject<{
|
|
101
|
+
event: z.ZodLiteral<"initial-storage">;
|
|
102
|
+
data: z.ZodObject<{
|
|
103
|
+
room: z.ZodNullable<z.ZodString>;
|
|
104
|
+
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
room: string | null;
|
|
106
|
+
}, {
|
|
107
|
+
room: string | null;
|
|
108
|
+
}>;
|
|
109
|
+
}, "strip", z.ZodTypeAny, {
|
|
110
|
+
event: "initial-storage";
|
|
111
|
+
data: {
|
|
112
|
+
room: string | null;
|
|
113
|
+
};
|
|
114
|
+
}, {
|
|
115
|
+
event: "initial-storage";
|
|
116
|
+
data: {
|
|
117
|
+
room: string | null;
|
|
118
|
+
};
|
|
119
|
+
}>, z.ZodObject<{
|
|
120
|
+
event: z.ZodLiteral<"room-deleted">;
|
|
121
|
+
data: z.ZodObject<{
|
|
122
|
+
room: z.ZodString;
|
|
123
|
+
storage: z.ZodNullable<z.ZodString>;
|
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
|
125
|
+
room: string;
|
|
126
|
+
storage: string | null;
|
|
127
|
+
}, {
|
|
128
|
+
room: string;
|
|
129
|
+
storage: string | null;
|
|
130
|
+
}>;
|
|
131
|
+
}, "strip", z.ZodTypeAny, {
|
|
132
|
+
event: "room-deleted";
|
|
133
|
+
data: {
|
|
134
|
+
room: string;
|
|
135
|
+
storage: string | null;
|
|
136
|
+
};
|
|
137
|
+
}, {
|
|
138
|
+
event: "room-deleted";
|
|
139
|
+
data: {
|
|
140
|
+
room: string;
|
|
141
|
+
storage: string | null;
|
|
142
|
+
};
|
|
143
|
+
}>, z.ZodObject<{
|
|
144
|
+
event: z.ZodLiteral<"user-connected">;
|
|
145
|
+
data: z.ZodObject<{
|
|
146
|
+
room: z.ZodString;
|
|
147
|
+
storage: z.ZodNullable<z.ZodString>;
|
|
148
|
+
user: z.ZodObject<{
|
|
149
|
+
id: z.ZodString;
|
|
150
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
151
|
+
id: z.ZodString;
|
|
152
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
153
|
+
id: z.ZodString;
|
|
154
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
155
|
+
}, "strip", z.ZodTypeAny, {
|
|
156
|
+
room: string;
|
|
157
|
+
storage: string | null;
|
|
158
|
+
user: {
|
|
159
|
+
id: string;
|
|
160
|
+
} & {
|
|
161
|
+
[k: string]: unknown;
|
|
162
|
+
};
|
|
163
|
+
}, {
|
|
164
|
+
room: string;
|
|
165
|
+
storage: string | null;
|
|
166
|
+
user: {
|
|
167
|
+
id: string;
|
|
168
|
+
} & {
|
|
169
|
+
[k: string]: unknown;
|
|
170
|
+
};
|
|
171
|
+
}>;
|
|
172
|
+
}, "strip", z.ZodTypeAny, {
|
|
173
|
+
event: "user-connected";
|
|
174
|
+
data: {
|
|
175
|
+
room: string;
|
|
176
|
+
storage: string | null;
|
|
177
|
+
user: {
|
|
178
|
+
id: string;
|
|
179
|
+
} & {
|
|
180
|
+
[k: string]: unknown;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
}, {
|
|
184
|
+
event: "user-connected";
|
|
185
|
+
data: {
|
|
186
|
+
room: string;
|
|
187
|
+
storage: string | null;
|
|
188
|
+
user: {
|
|
189
|
+
id: string;
|
|
190
|
+
} & {
|
|
191
|
+
[k: string]: unknown;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
}>, z.ZodObject<{
|
|
195
|
+
event: z.ZodLiteral<"user-disconnected">;
|
|
196
|
+
data: z.ZodObject<{
|
|
197
|
+
room: z.ZodString;
|
|
198
|
+
storage: z.ZodNullable<z.ZodString>;
|
|
199
|
+
user: z.ZodObject<{
|
|
200
|
+
id: z.ZodString;
|
|
201
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
202
|
+
id: z.ZodString;
|
|
203
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
204
|
+
id: z.ZodString;
|
|
205
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
206
|
+
}, "strip", z.ZodTypeAny, {
|
|
207
|
+
room: string;
|
|
208
|
+
storage: string | null;
|
|
209
|
+
user: {
|
|
210
|
+
id: string;
|
|
211
|
+
} & {
|
|
212
|
+
[k: string]: unknown;
|
|
213
|
+
};
|
|
214
|
+
}, {
|
|
215
|
+
room: string;
|
|
216
|
+
storage: string | null;
|
|
217
|
+
user: {
|
|
218
|
+
id: string;
|
|
219
|
+
} & {
|
|
220
|
+
[k: string]: unknown;
|
|
221
|
+
};
|
|
222
|
+
}>;
|
|
223
|
+
}, "strip", z.ZodTypeAny, {
|
|
224
|
+
event: "user-disconnected";
|
|
225
|
+
data: {
|
|
226
|
+
room: string;
|
|
227
|
+
storage: string | null;
|
|
228
|
+
user: {
|
|
229
|
+
id: string;
|
|
230
|
+
} & {
|
|
231
|
+
[k: string]: unknown;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
}, {
|
|
235
|
+
event: "user-disconnected";
|
|
236
|
+
data: {
|
|
237
|
+
room: string;
|
|
238
|
+
storage: string | null;
|
|
239
|
+
user: {
|
|
240
|
+
id: string;
|
|
241
|
+
} & {
|
|
242
|
+
[k: string]: unknown;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
}>]>;
|
|
246
|
+
|
|
247
|
+
export { PluvIO, type PluvIOConfig, PluvPlatform, ZodEvent, createIO };
|
package/dist/index.js
CHANGED
|
@@ -54,6 +54,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
54
54
|
// src/index.ts
|
|
55
55
|
var src_exports = {};
|
|
56
56
|
__export(src_exports, {
|
|
57
|
+
ZodEvent: () => ZodEvent,
|
|
57
58
|
createIO: () => createIO
|
|
58
59
|
});
|
|
59
60
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -289,5 +290,6 @@ var createIO = (config) => {
|
|
|
289
290
|
};
|
|
290
291
|
// Annotate the CommonJS export names for ESM import in node:
|
|
291
292
|
0 && (module.exports = {
|
|
293
|
+
ZodEvent,
|
|
292
294
|
createIO
|
|
293
295
|
});
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluv/platform-pluv",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.7",
|
|
4
4
|
"description": "@pluv/io adapter for pluv.io",
|
|
5
5
|
"author": "leedavidcs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
"@types/node": "^22.8.1",
|
|
21
21
|
"hono": "^4.6.7",
|
|
22
22
|
"zod": "^3.23.8",
|
|
23
|
-
"@pluv/crdt": "^0.32.
|
|
24
|
-
"@pluv/io": "^0.32.
|
|
25
|
-
"@pluv/types": "^0.32.
|
|
23
|
+
"@pluv/crdt": "^0.32.7",
|
|
24
|
+
"@pluv/io": "^0.32.7",
|
|
25
|
+
"@pluv/types": "^0.32.7"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"eslint": "^8.57.0",
|
|
29
29
|
"tsup": "^8.3.5",
|
|
30
30
|
"typescript": "^5.6.3",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
31
|
+
"eslint-config-pluv": "^0.32.7",
|
|
32
|
+
"@pluv/tsconfig": "^0.32.7"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|
package/src/index.ts
CHANGED