@pluv/platform-cloudflare 2.2.1 → 2.2.3
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 +5 -5
- package/CHANGELOG.md +609 -593
- package/dist/index.mjs +6 -6
- package/package.json +9 -9
package/dist/index.mjs
CHANGED
|
@@ -103,7 +103,7 @@ var createPluvHandler = (config) => {
|
|
|
103
103
|
}
|
|
104
104
|
return namespace;
|
|
105
105
|
};
|
|
106
|
-
const authHandler = (request, env) => __async(
|
|
106
|
+
const authHandler = (request, env) => __async(null, null, function* () {
|
|
107
107
|
if (!authorize) return null;
|
|
108
108
|
const { pathname, searchParams } = new URL(request.url);
|
|
109
109
|
const matcher = match(`${endpoint}/authorize`);
|
|
@@ -142,7 +142,7 @@ var createPluvHandler = (config) => {
|
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
|
-
const roomHandler = (request, env) => __async(
|
|
145
|
+
const roomHandler = (request, env) => __async(null, null, function* () {
|
|
146
146
|
const { pathname } = new URL(request.url);
|
|
147
147
|
const matcher = match(`${endpoint}/room/:roomId`);
|
|
148
148
|
const matched = matcher(pathname);
|
|
@@ -159,15 +159,15 @@ var createPluvHandler = (config) => {
|
|
|
159
159
|
const room = namespace.get(durableObjectId);
|
|
160
160
|
return room.fetch(request);
|
|
161
161
|
});
|
|
162
|
-
const handlerFetch = (request, env) => __async(
|
|
163
|
-
return [authHandler, roomHandler].reduce((promise, current) => __async(
|
|
164
|
-
return yield promise.then((value) => __async(
|
|
162
|
+
const handlerFetch = (request, env) => __async(null, null, function* () {
|
|
163
|
+
return [authHandler, roomHandler].reduce((promise, current) => __async(null, null, function* () {
|
|
164
|
+
return yield promise.then((value) => __async(null, null, function* () {
|
|
165
165
|
return value != null ? value : yield current(request, env);
|
|
166
166
|
}));
|
|
167
167
|
}), Promise.resolve(null));
|
|
168
168
|
});
|
|
169
169
|
const handler = {
|
|
170
|
-
fetch: (request, env) => __async(
|
|
170
|
+
fetch: (request, env) => __async(null, null, function* () {
|
|
171
171
|
var _a, _b;
|
|
172
172
|
const response = (_a = yield handlerFetch(request, env)) != null ? _a : new Response("Not Found", {
|
|
173
173
|
headers: { "Content-Type": "text/plain" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluv/platform-cloudflare",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"description": "@pluv/io adapter for cloudflare workers",
|
|
5
5
|
"author": "leedavidcs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"path-to-regexp": "^8.2.0",
|
|
20
|
-
"@pluv/
|
|
21
|
-
"@pluv/persistence-cloudflare-transactional-storage": "^2.2.
|
|
22
|
-
"@pluv/
|
|
20
|
+
"@pluv/types": "^2.2.3",
|
|
21
|
+
"@pluv/persistence-cloudflare-transactional-storage": "^2.2.3",
|
|
22
|
+
"@pluv/io": "^2.2.3"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@cloudflare/workers-types": "^4.
|
|
26
|
-
"eslint": "^9.
|
|
27
|
-
"tsup": "^8.
|
|
25
|
+
"@cloudflare/workers-types": "^4.20250521.0",
|
|
26
|
+
"eslint": "^9.27.0",
|
|
27
|
+
"tsup": "^8.5.0",
|
|
28
28
|
"typescript": "^5.8.3",
|
|
29
|
-
"@pluv/tsconfig": "^2.2.
|
|
30
|
-
"eslint-config-pluv": "^2.2.
|
|
29
|
+
"@pluv/tsconfig": "^2.2.3",
|
|
30
|
+
"eslint-config-pluv": "^2.2.3"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "tsup src/index.ts",
|