@pluv/io 0.35.3 → 0.35.4
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 +9 -9
- package/CHANGELOG.md +8 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -3
- package/dist/index.mjs +5 -3
- package/package.json +5 -5
- package/src/AbstractPlatform.ts +1 -1
- package/src/PluvServer.ts +5 -3
- package/src/version.generated.ts +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/io@0.35.
|
|
2
|
+
> @pluv/io@0.35.4 build /home/runner/work/pluv/pluv/packages/io
|
|
3
3
|
> pnpm run version && tsup src/index.ts --format esm,cjs --dts
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @pluv/io@0.35.
|
|
6
|
+
> @pluv/io@0.35.4 version /home/runner/work/pluv/pluv/packages/io
|
|
7
7
|
> genversion ./src/version.generated.ts --esm
|
|
8
8
|
|
|
9
9
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
[34mCLI[39m Target: es6
|
|
13
13
|
[34mESM[39m Build start
|
|
14
14
|
[34mCJS[39m Build start
|
|
15
|
-
[32mCJS[39m [1mdist/index.js [22m[32m45.
|
|
16
|
-
[32mCJS[39m ⚡️ Build success in
|
|
17
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m43.
|
|
18
|
-
[32mESM[39m ⚡️ Build success in
|
|
15
|
+
[32mCJS[39m [1mdist/index.js [22m[32m45.75 KB[39m
|
|
16
|
+
[32mCJS[39m ⚡️ Build success in 186ms
|
|
17
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m43.58 KB[39m
|
|
18
|
+
[32mESM[39m ⚡️ Build success in 186ms
|
|
19
19
|
[34mDTS[39m Build start
|
|
20
|
-
[32mDTS[39m ⚡️ Build success in
|
|
21
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m29.
|
|
22
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m29.
|
|
20
|
+
[32mDTS[39m ⚡️ Build success in 2432ms
|
|
21
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m29.65 KB[39m
|
|
22
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m29.65 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JsonObject, MaybePromise, IOAuthorize, IOEventMessage, EventRecord,
|
|
1
|
+
import { JsonObject, MaybePromise, IOAuthorize, IOEventMessage, EventRecord, ProcedureLike, InputZodLike, IORouterLike, InferIOAuthorizeUser, BaseUser, UndefinedProps, Id, InferEventMessage, InferEventsOutput, Maybe, IOLike, InferIOOutput, InferIOInput, InferIOAuthorize } from '@pluv/types';
|
|
2
2
|
export { BaseUser, EventMessage, EventRecord, IOEventMessage } from '@pluv/types';
|
|
3
3
|
import { AbstractCrdtDocFactory, AbstractCrdtDoc } from '@pluv/crdt';
|
|
4
4
|
|
|
@@ -281,7 +281,7 @@ declare abstract class AbstractPlatform<TWebSocket extends AbstractWebSocket = A
|
|
|
281
281
|
persistence: AbstractPersistence;
|
|
282
282
|
pubSub: AbstractPubSub;
|
|
283
283
|
readonly _createToken?: (params: JWTEncodeParams<any, any>) => Promise<string>;
|
|
284
|
-
_fetch?: (
|
|
284
|
+
_fetch?: (...args: any[]) => Promise<any>;
|
|
285
285
|
abstract readonly _config: TConfig;
|
|
286
286
|
abstract readonly _name: string;
|
|
287
287
|
constructor(config?: AbstractPlatformConfig<TRoomContext>);
|
|
@@ -415,7 +415,7 @@ declare class PluvServer<TPlatform extends AbstractPlatform<any> = AbstractPlatf
|
|
|
415
415
|
private readonly _getInitialStorage;
|
|
416
416
|
private readonly _platform;
|
|
417
417
|
private readonly _router;
|
|
418
|
-
get fetch():
|
|
418
|
+
get fetch(): NonNullable<typeof this$1._platform._fetch>;
|
|
419
419
|
/**
|
|
420
420
|
* @ignore
|
|
421
421
|
* @readonly
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JsonObject, MaybePromise, IOAuthorize, IOEventMessage, EventRecord,
|
|
1
|
+
import { JsonObject, MaybePromise, IOAuthorize, IOEventMessage, EventRecord, ProcedureLike, InputZodLike, IORouterLike, InferIOAuthorizeUser, BaseUser, UndefinedProps, Id, InferEventMessage, InferEventsOutput, Maybe, IOLike, InferIOOutput, InferIOInput, InferIOAuthorize } from '@pluv/types';
|
|
2
2
|
export { BaseUser, EventMessage, EventRecord, IOEventMessage } from '@pluv/types';
|
|
3
3
|
import { AbstractCrdtDocFactory, AbstractCrdtDoc } from '@pluv/crdt';
|
|
4
4
|
|
|
@@ -281,7 +281,7 @@ declare abstract class AbstractPlatform<TWebSocket extends AbstractWebSocket = A
|
|
|
281
281
|
persistence: AbstractPersistence;
|
|
282
282
|
pubSub: AbstractPubSub;
|
|
283
283
|
readonly _createToken?: (params: JWTEncodeParams<any, any>) => Promise<string>;
|
|
284
|
-
_fetch?: (
|
|
284
|
+
_fetch?: (...args: any[]) => Promise<any>;
|
|
285
285
|
abstract readonly _config: TConfig;
|
|
286
286
|
abstract readonly _name: string;
|
|
287
287
|
constructor(config?: AbstractPlatformConfig<TRoomContext>);
|
|
@@ -415,7 +415,7 @@ declare class PluvServer<TPlatform extends AbstractPlatform<any> = AbstractPlatf
|
|
|
415
415
|
private readonly _getInitialStorage;
|
|
416
416
|
private readonly _platform;
|
|
417
417
|
private readonly _router;
|
|
418
|
-
get fetch():
|
|
418
|
+
get fetch(): NonNullable<typeof this$1._platform._fetch>;
|
|
419
419
|
/**
|
|
420
420
|
* @ignore
|
|
421
421
|
* @readonly
|
package/dist/index.js
CHANGED
|
@@ -998,7 +998,7 @@ var IORoom = class {
|
|
|
998
998
|
};
|
|
999
999
|
|
|
1000
1000
|
// src/version.generated.ts
|
|
1001
|
-
var version = "0.35.
|
|
1001
|
+
var version = "0.35.4";
|
|
1002
1002
|
|
|
1003
1003
|
// src/PluvServer.ts
|
|
1004
1004
|
var PluvServer = class {
|
|
@@ -1123,8 +1123,10 @@ var PluvServer = class {
|
|
|
1123
1123
|
};
|
|
1124
1124
|
}
|
|
1125
1125
|
get fetch() {
|
|
1126
|
-
|
|
1127
|
-
|
|
1126
|
+
return (...args) => {
|
|
1127
|
+
if (!this._platform._fetch) throw new Error(`\`${this._platform._name}\` does not support \`fetch\``);
|
|
1128
|
+
return this._platform._fetch(...args);
|
|
1129
|
+
};
|
|
1128
1130
|
}
|
|
1129
1131
|
/**
|
|
1130
1132
|
* @ignore
|
package/dist/index.mjs
CHANGED
|
@@ -956,7 +956,7 @@ var IORoom = class {
|
|
|
956
956
|
};
|
|
957
957
|
|
|
958
958
|
// src/version.generated.ts
|
|
959
|
-
var version = "0.35.
|
|
959
|
+
var version = "0.35.4";
|
|
960
960
|
|
|
961
961
|
// src/PluvServer.ts
|
|
962
962
|
var PluvServer = class {
|
|
@@ -1081,8 +1081,10 @@ var PluvServer = class {
|
|
|
1081
1081
|
};
|
|
1082
1082
|
}
|
|
1083
1083
|
get fetch() {
|
|
1084
|
-
|
|
1085
|
-
|
|
1084
|
+
return (...args) => {
|
|
1085
|
+
if (!this._platform._fetch) throw new Error(`\`${this._platform._name}\` does not support \`fetch\``);
|
|
1086
|
+
return this._platform._fetch(...args);
|
|
1087
|
+
};
|
|
1086
1088
|
}
|
|
1087
1089
|
/**
|
|
1088
1090
|
* @ignore
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluv/io",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.4",
|
|
4
4
|
"description": "@pluv/io server-side websocket manager",
|
|
5
5
|
"author": "leedavidcs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
"jose": "^5.9.6",
|
|
22
22
|
"kleur": "^4.1.5",
|
|
23
23
|
"wonka": "^6.3.4",
|
|
24
|
-
"@pluv/crdt": "^0.35.
|
|
25
|
-
"@pluv/types": "^0.35.
|
|
24
|
+
"@pluv/crdt": "^0.35.4",
|
|
25
|
+
"@pluv/types": "^0.35.4"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"eslint": "^8.57.1",
|
|
29
29
|
"genversion": "^3.2.0",
|
|
30
30
|
"tsup": "^8.3.6",
|
|
31
31
|
"typescript": "^5.7.3",
|
|
32
|
-
"@pluv/tsconfig": "^0.35.
|
|
33
|
-
"eslint-config-pluv": "^0.35.
|
|
32
|
+
"@pluv/tsconfig": "^0.35.4",
|
|
33
|
+
"eslint-config-pluv": "^0.35.4"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "pnpm run version && tsup src/index.ts --format esm,cjs --dts",
|
package/src/AbstractPlatform.ts
CHANGED
|
@@ -43,7 +43,7 @@ export abstract class AbstractPlatform<
|
|
|
43
43
|
public pubSub: AbstractPubSub;
|
|
44
44
|
|
|
45
45
|
public readonly _createToken?: (params: JWTEncodeParams<any, any>) => Promise<string>;
|
|
46
|
-
public _fetch?: (
|
|
46
|
+
public _fetch?: (...args: any[]) => Promise<any>;
|
|
47
47
|
public abstract readonly _config: TConfig;
|
|
48
48
|
public abstract readonly _name: string;
|
|
49
49
|
|
package/src/PluvServer.ts
CHANGED
|
@@ -199,10 +199,12 @@ export class PluvServer<
|
|
|
199
199
|
private readonly _platform: TPlatform;
|
|
200
200
|
private readonly _router: PluvRouter<TPlatform, TAuthorize, TContext, TEvents>;
|
|
201
201
|
|
|
202
|
-
public get fetch() {
|
|
203
|
-
|
|
202
|
+
public get fetch(): NonNullable<typeof this._platform._fetch> {
|
|
203
|
+
return ((...args: any[]): Promise<any> => {
|
|
204
|
+
if (!this._platform._fetch) throw new Error(`\`${this._platform._name}\` does not support \`fetch\``);
|
|
204
205
|
|
|
205
|
-
|
|
206
|
+
return this._platform._fetch(...args);
|
|
207
|
+
}) as NonNullable<typeof this._platform._fetch>;
|
|
206
208
|
}
|
|
207
209
|
|
|
208
210
|
/**
|
package/src/version.generated.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '0.35.
|
|
2
|
+
export const version = '0.35.4'
|