@pluv/platform-cloudflare 3.0.0 → 3.1.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/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +10 -0
- package/dist/index.d.mts +3 -2
- package/package.json +7 -6
- package/src/platformCloudflare.ts +8 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/platform-cloudflare@3.
|
|
2
|
+
> @pluv/platform-cloudflare@3.1.0 build /home/runner/work/pluv/pluv/packages/platform-cloudflare
|
|
3
3
|
> tsup src/index.ts
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
[34mCLI[39m Target: es6
|
|
10
10
|
[34mESM[39m Build start
|
|
11
11
|
[32mESM[39m [1mdist/index.mjs [22m[32m8.92 KB[39m
|
|
12
|
-
[32mESM[39m ⚡️ Build success in
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 27ms
|
|
13
13
|
[34mDTS[39m Build start
|
|
14
|
-
[32mDTS[39m ⚡️ Build success in
|
|
15
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m5.
|
|
14
|
+
[32mDTS[39m ⚡️ Build success in 1125ms
|
|
15
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m5.50 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @pluv/platform-cloudflare
|
|
2
2
|
|
|
3
|
+
## 3.1.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [a40f4dc]
|
|
8
|
+
- @pluv/io@3.1.0
|
|
9
|
+
- @pluv/persistence-cloudflare-transactional-storage@3.1.0
|
|
10
|
+
- @pluv/crdt@3.1.0
|
|
11
|
+
- @pluv/types@3.1.0
|
|
12
|
+
|
|
3
13
|
## 3.0.0
|
|
4
14
|
|
|
5
15
|
### Major Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AbstractWebSocket, WebSocketSession, WebSocketSerializedState, AbstractWebSocketConfig, AbstractEventMap, AbstractListener, AbstractPlatform, WebSocketRegistrationMode, AbstractPlatformConfig, ConvertWebSocketConfig, CreateIOParams, PluvIOAuthorize, InferInitContextType, PluvContext } from '@pluv/io';
|
|
2
2
|
import { IOAuthorize, JsonObject, InferIOAuthorizeUser, Json, BaseUser, Id } from '@pluv/types';
|
|
3
|
+
import { CrdtLibraryType, NoopCrdtDocFactory } from '@pluv/crdt';
|
|
3
4
|
|
|
4
5
|
type CloudflareWebSocketConfig = AbstractWebSocketConfig;
|
|
5
6
|
declare class CloudflareWebSocket<TAuthorize extends IOAuthorize<any, any> | null = null> extends AbstractWebSocket<WebSocket, TAuthorize> {
|
|
@@ -87,11 +88,11 @@ type InferCallback<TEnv extends Record<string, any> = {}, TMeta extends Record<s
|
|
|
87
88
|
};
|
|
88
89
|
declare const infer: <TEnv extends Record<string, any> = {}, TMeta extends Record<string, Json> = {}>(callback: InferCallback<TEnv, TMeta>) => InferCallback<TEnv, TMeta>;
|
|
89
90
|
|
|
90
|
-
type PlatformCloudflareCreateIOParams<TEnv extends Record<string, any> = {}, TMeta extends Record<string, Json> = {}, TContext extends Record<string, any> = {}, TUser extends BaseUser | null = null> = Id<CloudflarePlatformConfig<TEnv, TMeta> & Omit<CreateIOParams<CloudflarePlatform<IOAuthorize<TUser, TContext>, TEnv, TMeta>, TContext, TUser>, "authorize" | "context" | "platform"> & {
|
|
91
|
+
type PlatformCloudflareCreateIOParams<TEnv extends Record<string, any> = {}, TMeta extends Record<string, Json> = {}, TContext extends Record<string, any> = {}, TUser extends BaseUser | null = null, TCrdt extends CrdtLibraryType<any> = CrdtLibraryType<NoopCrdtDocFactory>> = Id<CloudflarePlatformConfig<TEnv, TMeta> & Omit<CreateIOParams<CloudflarePlatform<IOAuthorize<TUser, TContext>, TEnv, TMeta>, TContext, TUser, TCrdt>, "authorize" | "context" | "platform"> & {
|
|
91
92
|
authorize?: PluvIOAuthorize<CloudflarePlatform<IOAuthorize<TUser, TContext>, TEnv, TMeta>, TUser, InferInitContextType<CloudflarePlatform<IOAuthorize<TUser, TContext>, TEnv, TMeta>>>;
|
|
92
93
|
context?: PluvContext<CloudflarePlatform<IOAuthorize<TUser, any>, TEnv, TMeta>, TContext>;
|
|
93
94
|
types?: InferCallback<TEnv, TMeta>;
|
|
94
95
|
}>;
|
|
95
|
-
declare const platformCloudflare: <TEnv extends Record<string, any> = {}, TMeta extends Record<string, Json> = {}, TContext extends Record<string, any> = {}, TUser extends BaseUser | null = null>(config?: PlatformCloudflareCreateIOParams<TEnv, TMeta, TContext, TUser>) => CreateIOParams<CloudflarePlatform<IOAuthorize<TUser, TContext>, TEnv, TMeta>, TContext, TUser>;
|
|
96
|
+
declare const platformCloudflare: <TEnv extends Record<string, any> = {}, TMeta extends Record<string, Json> = {}, TContext extends Record<string, any> = {}, TUser extends BaseUser | null = null, TCrdt extends CrdtLibraryType<any> = CrdtLibraryType<NoopCrdtDocFactory>>(config?: PlatformCloudflareCreateIOParams<TEnv, TMeta, TContext, TUser, TCrdt>) => CreateIOParams<CloudflarePlatform<IOAuthorize<TUser, TContext>, TEnv, TMeta>, TContext, TUser, TCrdt>;
|
|
96
97
|
|
|
97
98
|
export { CloudflarePlatform, type CloudflarePlatformConfig, type InferCallback, type PlatformCloudflareCreateIOParams, infer, platformCloudflare };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluv/platform-cloudflare",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "@pluv/io adapter for cloudflare workers",
|
|
5
5
|
"author": "leedavidcs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,17 +17,18 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"path-to-regexp": "^8.2.0",
|
|
20
|
-
"@pluv/
|
|
21
|
-
"@pluv/
|
|
22
|
-
"@pluv/
|
|
20
|
+
"@pluv/crdt": "^3.1.0",
|
|
21
|
+
"@pluv/io": "^3.1.0",
|
|
22
|
+
"@pluv/persistence-cloudflare-transactional-storage": "^3.1.0",
|
|
23
|
+
"@pluv/types": "^3.1.0"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
26
|
"@cloudflare/workers-types": "^4.20250521.0",
|
|
26
27
|
"eslint": "^9.27.0",
|
|
27
28
|
"tsup": "^8.5.0",
|
|
28
29
|
"typescript": "^5.8.3",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
30
|
+
"@pluv/tsconfig": "^3.1.0",
|
|
31
|
+
"eslint-config-pluv": "^3.1.0"
|
|
31
32
|
},
|
|
32
33
|
"scripts": {
|
|
33
34
|
"build": "tsup src/index.ts",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CrdtLibraryType, NoopCrdtDocFactory } from "@pluv/crdt";
|
|
1
2
|
import type { CreateIOParams, InferInitContextType, PluvContext, PluvIOAuthorize } from "@pluv/io";
|
|
2
3
|
import type { BaseUser, Id, IOAuthorize, Json } from "@pluv/types";
|
|
3
4
|
import type { CloudflarePlatformConfig } from "./CloudflarePlatform";
|
|
@@ -9,13 +10,15 @@ export type PlatformCloudflareCreateIOParams<
|
|
|
9
10
|
TMeta extends Record<string, Json> = {},
|
|
10
11
|
TContext extends Record<string, any> = {},
|
|
11
12
|
TUser extends BaseUser | null = null,
|
|
13
|
+
TCrdt extends CrdtLibraryType<any> = CrdtLibraryType<NoopCrdtDocFactory>,
|
|
12
14
|
> = Id<
|
|
13
15
|
CloudflarePlatformConfig<TEnv, TMeta> &
|
|
14
16
|
Omit<
|
|
15
17
|
CreateIOParams<
|
|
16
18
|
CloudflarePlatform<IOAuthorize<TUser, TContext>, TEnv, TMeta>,
|
|
17
19
|
TContext,
|
|
18
|
-
TUser
|
|
20
|
+
TUser,
|
|
21
|
+
TCrdt
|
|
19
22
|
>,
|
|
20
23
|
"authorize" | "context" | "platform"
|
|
21
24
|
> & {
|
|
@@ -37,12 +40,14 @@ export const platformCloudflare = <
|
|
|
37
40
|
TMeta extends Record<string, Json> = {},
|
|
38
41
|
TContext extends Record<string, any> = {},
|
|
39
42
|
TUser extends BaseUser | null = null,
|
|
43
|
+
TCrdt extends CrdtLibraryType<any> = CrdtLibraryType<NoopCrdtDocFactory>,
|
|
40
44
|
>(
|
|
41
|
-
config: PlatformCloudflareCreateIOParams<TEnv, TMeta, TContext, TUser> = {},
|
|
45
|
+
config: PlatformCloudflareCreateIOParams<TEnv, TMeta, TContext, TUser, TCrdt> = {},
|
|
42
46
|
): CreateIOParams<
|
|
43
47
|
CloudflarePlatform<IOAuthorize<TUser, TContext>, TEnv, TMeta>,
|
|
44
48
|
TContext,
|
|
45
|
-
TUser
|
|
49
|
+
TUser,
|
|
50
|
+
TCrdt
|
|
46
51
|
> => {
|
|
47
52
|
const { authorize, context, crdt, debug, limits } = config;
|
|
48
53
|
|