@pluv/platform-pluv 0.37.5 → 0.37.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 +6 -6
- package/CHANGELOG.md +18 -0
- package/dist/index.js +12 -1
- package/dist/index.mjs +2 -1
- package/package.json +8 -7
- package/src/PluvPlatform.ts +2 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/platform-pluv@0.37.
|
|
2
|
+
> @pluv/platform-pluv@0.37.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
|
-
[32mCJS[39m [1mdist/index.js [22m[
|
|
12
|
-
[32mCJS[39m ⚡️ Build success in
|
|
13
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m9.
|
|
14
|
-
[32mESM[39m ⚡️ Build success in
|
|
11
|
+
[32mCJS[39m [1mdist/index.js [22m[32m11.40 KB[39m
|
|
12
|
+
[32mCJS[39m ⚡️ Build success in 124ms
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m9.86 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 132ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 6308ms
|
|
17
17
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m3.56 KB[39m
|
|
18
18
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m3.56 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @pluv/platform-pluv
|
|
2
2
|
|
|
3
|
+
## 0.37.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c874f25: Fixed webhook signature verification.
|
|
8
|
+
- @pluv/crdt@0.37.7
|
|
9
|
+
- @pluv/io@0.37.7
|
|
10
|
+
- @pluv/types@0.37.7
|
|
11
|
+
|
|
12
|
+
## 0.37.6
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [3a874f1]
|
|
17
|
+
- @pluv/io@0.37.6
|
|
18
|
+
- @pluv/crdt@0.37.6
|
|
19
|
+
- @pluv/types@0.37.6
|
|
20
|
+
|
|
3
21
|
## 0.37.5
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
6
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
9
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
10
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -29,6 +31,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
29
31
|
}
|
|
30
32
|
return to;
|
|
31
33
|
};
|
|
34
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
35
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
36
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
37
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
38
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
39
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
40
|
+
mod
|
|
41
|
+
));
|
|
32
42
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
33
43
|
var __async = (__this, __arguments, generator) => {
|
|
34
44
|
return new Promise((resolve, reject) => {
|
|
@@ -61,6 +71,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
61
71
|
|
|
62
72
|
// src/PluvPlatform.ts
|
|
63
73
|
var import_io = require("@pluv/io");
|
|
74
|
+
var import_fast_json_stable_stringify = __toESM(require("fast-json-stable-stringify"));
|
|
64
75
|
var import_hono = require("hono");
|
|
65
76
|
|
|
66
77
|
// src/constants.ts
|
|
@@ -208,7 +219,7 @@ var PluvPlatform = class extends import_io.AbstractPlatform {
|
|
|
208
219
|
if (!this._webhookSecret || !signature) return c.json({ error: "Unauthorized" }, 401);
|
|
209
220
|
const payload = yield c.req.json();
|
|
210
221
|
const verified = yield verifyWebhook({
|
|
211
|
-
payload,
|
|
222
|
+
payload: (0, import_fast_json_stable_stringify.default)(payload),
|
|
212
223
|
signature,
|
|
213
224
|
secret: this._webhookSecret
|
|
214
225
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -43,6 +43,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
43
43
|
|
|
44
44
|
// src/PluvPlatform.ts
|
|
45
45
|
import { AbstractPlatform } from "@pluv/io";
|
|
46
|
+
import stringify from "fast-json-stable-stringify";
|
|
46
47
|
import { Hono } from "hono";
|
|
47
48
|
|
|
48
49
|
// src/constants.ts
|
|
@@ -190,7 +191,7 @@ var PluvPlatform = class extends AbstractPlatform {
|
|
|
190
191
|
if (!this._webhookSecret || !signature) return c.json({ error: "Unauthorized" }, 401);
|
|
191
192
|
const payload = yield c.req.json();
|
|
192
193
|
const verified = yield verifyWebhook({
|
|
193
|
-
payload,
|
|
194
|
+
payload: stringify(payload),
|
|
194
195
|
signature,
|
|
195
196
|
secret: this._webhookSecret
|
|
196
197
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluv/platform-pluv",
|
|
3
|
-
"version": "0.37.
|
|
3
|
+
"version": "0.37.7",
|
|
4
4
|
"description": "@pluv/io adapter for pluv.io",
|
|
5
5
|
"author": "leedavidcs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,19 +17,20 @@
|
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@types/node": "^22.13.
|
|
20
|
+
"@types/node": "^22.13.10",
|
|
21
|
+
"fast-json-stable-stringify": "^2.1.0",
|
|
21
22
|
"hono": "^4.7.4",
|
|
22
23
|
"zod": "^3.24.2",
|
|
23
|
-
"@pluv/
|
|
24
|
-
"@pluv/types": "^0.37.
|
|
25
|
-
"@pluv/
|
|
24
|
+
"@pluv/crdt": "^0.37.7",
|
|
25
|
+
"@pluv/types": "^0.37.7",
|
|
26
|
+
"@pluv/io": "^0.37.7"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
29
|
"eslint": "^8.57.1",
|
|
29
30
|
"tsup": "^8.4.0",
|
|
30
31
|
"typescript": "^5.8.2",
|
|
31
|
-
"@pluv/tsconfig": "^0.37.
|
|
32
|
-
"eslint-config-pluv": "^0.37.
|
|
32
|
+
"@pluv/tsconfig": "^0.37.7",
|
|
33
|
+
"eslint-config-pluv": "^0.37.7"
|
|
33
34
|
},
|
|
34
35
|
"scripts": {
|
|
35
36
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|
package/src/PluvPlatform.ts
CHANGED
|
@@ -7,6 +7,7 @@ import type {
|
|
|
7
7
|
WebSocketSerializedState,
|
|
8
8
|
} from "@pluv/io";
|
|
9
9
|
import { AbstractPlatform } from "@pluv/io";
|
|
10
|
+
import stringify from "fast-json-stable-stringify";
|
|
10
11
|
import { Hono } from "hono";
|
|
11
12
|
import { SIGNATURE_HEADER } from "./constants";
|
|
12
13
|
import { ZodEvent } from "./schemas";
|
|
@@ -189,7 +190,7 @@ export class PluvPlatform extends AbstractPlatform<
|
|
|
189
190
|
const payload = await c.req.json();
|
|
190
191
|
|
|
191
192
|
const verified = await verifyWebhook({
|
|
192
|
-
payload,
|
|
193
|
+
payload: stringify(payload),
|
|
193
194
|
signature,
|
|
194
195
|
secret: this._webhookSecret,
|
|
195
196
|
});
|