@pluv/platform-pluv 2.2.3 → 2.2.5
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 +17 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -2
- package/dist/index.mjs +5 -2
- package/package.json +6 -6
- package/src/PluvPlatform.ts +6 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/platform-pluv@2.2.
|
|
2
|
+
> @pluv/platform-pluv@2.2.5 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
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
11
|
+
[32mCJS[39m [1mdist/index.js [22m[32m14.74 KB[39m
|
|
12
|
+
[32mCJS[39m ⚡️ Build success in 83ms
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m12.90 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 84ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m3.
|
|
18
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m3.
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 6655ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m3.75 KB[39m
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m3.75 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @pluv/platform-pluv
|
|
2
2
|
|
|
3
|
+
## 2.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @pluv/crdt@2.2.5
|
|
8
|
+
- @pluv/io@2.2.5
|
|
9
|
+
- @pluv/types@2.2.5
|
|
10
|
+
|
|
11
|
+
## 2.2.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 113ec6c: Updated internal logging.
|
|
16
|
+
- @pluv/crdt@2.2.4
|
|
17
|
+
- @pluv/io@2.2.4
|
|
18
|
+
- @pluv/types@2.2.4
|
|
19
|
+
|
|
3
20
|
## 2.2.3
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -219,6 +219,7 @@ var PluvPlatform = class extends import_io.AbstractPlatform {
|
|
|
219
219
|
constructor(params) {
|
|
220
220
|
var _a, _b;
|
|
221
221
|
super();
|
|
222
|
+
this.id = Math.random().toString();
|
|
222
223
|
this._config = {
|
|
223
224
|
authorize: {
|
|
224
225
|
secret: false
|
|
@@ -237,7 +238,7 @@ var PluvPlatform = class extends import_io.AbstractPlatform {
|
|
|
237
238
|
};
|
|
238
239
|
this._name = "platformPluv";
|
|
239
240
|
this._createToken = (params) => __async(this, null, function* () {
|
|
240
|
-
var _a;
|
|
241
|
+
var _a, _b;
|
|
241
242
|
const parsed = params.authorize.user.parse(params.user);
|
|
242
243
|
const [endpoints, publicKey, secretKey] = yield Promise.all([
|
|
243
244
|
typeof this._endpoints === "object" ? this._endpoints : this._endpoints(),
|
|
@@ -259,10 +260,12 @@ var PluvPlatform = class extends import_io.AbstractPlatform {
|
|
|
259
260
|
this._logDebug(error);
|
|
260
261
|
return null;
|
|
261
262
|
});
|
|
263
|
+
this._logDebug({ response: { status: (_b = res == null ? void 0 : res.status) != null ? _b : null } });
|
|
262
264
|
if (!res || !res.ok || res.status !== 200) {
|
|
263
265
|
throw new Error("Authorization failed");
|
|
264
266
|
}
|
|
265
267
|
const token = yield res.text().catch(() => null);
|
|
268
|
+
this._logDebug({ token });
|
|
266
269
|
if (typeof token !== "string") throw new Error("Authorization failed");
|
|
267
270
|
return token;
|
|
268
271
|
});
|
|
@@ -409,7 +412,7 @@ var PluvPlatform = class extends import_io.AbstractPlatform {
|
|
|
409
412
|
}
|
|
410
413
|
_logDebug(...args) {
|
|
411
414
|
if (!this._debug) return;
|
|
412
|
-
console.log(...args);
|
|
415
|
+
console.log("[PLATFORM PLUV]", ...args);
|
|
413
416
|
}
|
|
414
417
|
};
|
|
415
418
|
|
package/dist/index.mjs
CHANGED
|
@@ -189,6 +189,7 @@ var PluvPlatform = class extends AbstractPlatform {
|
|
|
189
189
|
constructor(params) {
|
|
190
190
|
var _a, _b;
|
|
191
191
|
super();
|
|
192
|
+
this.id = Math.random().toString();
|
|
192
193
|
this._config = {
|
|
193
194
|
authorize: {
|
|
194
195
|
secret: false
|
|
@@ -207,7 +208,7 @@ var PluvPlatform = class extends AbstractPlatform {
|
|
|
207
208
|
};
|
|
208
209
|
this._name = "platformPluv";
|
|
209
210
|
this._createToken = (params) => __async(this, null, function* () {
|
|
210
|
-
var _a;
|
|
211
|
+
var _a, _b;
|
|
211
212
|
const parsed = params.authorize.user.parse(params.user);
|
|
212
213
|
const [endpoints, publicKey, secretKey] = yield Promise.all([
|
|
213
214
|
typeof this._endpoints === "object" ? this._endpoints : this._endpoints(),
|
|
@@ -229,10 +230,12 @@ var PluvPlatform = class extends AbstractPlatform {
|
|
|
229
230
|
this._logDebug(error);
|
|
230
231
|
return null;
|
|
231
232
|
});
|
|
233
|
+
this._logDebug({ response: { status: (_b = res == null ? void 0 : res.status) != null ? _b : null } });
|
|
232
234
|
if (!res || !res.ok || res.status !== 200) {
|
|
233
235
|
throw new Error("Authorization failed");
|
|
234
236
|
}
|
|
235
237
|
const token = yield res.text().catch(() => null);
|
|
238
|
+
this._logDebug({ token });
|
|
236
239
|
if (typeof token !== "string") throw new Error("Authorization failed");
|
|
237
240
|
return token;
|
|
238
241
|
});
|
|
@@ -379,7 +382,7 @@ var PluvPlatform = class extends AbstractPlatform {
|
|
|
379
382
|
}
|
|
380
383
|
_logDebug(...args) {
|
|
381
384
|
if (!this._debug) return;
|
|
382
|
-
console.log(...args);
|
|
385
|
+
console.log("[PLATFORM PLUV]", ...args);
|
|
383
386
|
}
|
|
384
387
|
};
|
|
385
388
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluv/platform-pluv",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.5",
|
|
4
4
|
"description": "@pluv/io adapter for pluv.io",
|
|
5
5
|
"author": "leedavidcs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
"fast-json-stable-stringify": "^2.1.0",
|
|
22
22
|
"hono": "^4.7.10",
|
|
23
23
|
"zod": "^3.25.17",
|
|
24
|
-
"@pluv/crdt": "^2.2.
|
|
25
|
-
"@pluv/io": "^2.2.
|
|
26
|
-
"@pluv/types": "^2.2.
|
|
24
|
+
"@pluv/crdt": "^2.2.5",
|
|
25
|
+
"@pluv/io": "^2.2.5",
|
|
26
|
+
"@pluv/types": "^2.2.5"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"eslint": "^9.27.0",
|
|
30
30
|
"tsup": "^8.5.0",
|
|
31
31
|
"typescript": "^5.8.3",
|
|
32
|
-
"@pluv/tsconfig": "^2.2.
|
|
33
|
-
"eslint-config-pluv": "^2.2.
|
|
32
|
+
"@pluv/tsconfig": "^2.2.5",
|
|
33
|
+
"eslint-config-pluv": "^2.2.5"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|
package/src/PluvPlatform.ts
CHANGED
|
@@ -63,6 +63,7 @@ export class PluvPlatform<
|
|
|
63
63
|
router: false;
|
|
64
64
|
}
|
|
65
65
|
> {
|
|
66
|
+
public readonly id = Math.random().toString();
|
|
66
67
|
public readonly _config = {
|
|
67
68
|
authorize: {
|
|
68
69
|
secret: false as const,
|
|
@@ -119,12 +120,16 @@ export class PluvPlatform<
|
|
|
119
120
|
return null;
|
|
120
121
|
});
|
|
121
122
|
|
|
123
|
+
this._logDebug({ response: { status: res?.status ?? null } });
|
|
124
|
+
|
|
122
125
|
if (!res || !res.ok || res.status !== 200) {
|
|
123
126
|
throw new Error("Authorization failed");
|
|
124
127
|
}
|
|
125
128
|
|
|
126
129
|
const token = await res.text().catch(() => null);
|
|
127
130
|
|
|
131
|
+
this._logDebug({ token });
|
|
132
|
+
|
|
128
133
|
if (typeof token !== "string") throw new Error("Authorization failed");
|
|
129
134
|
|
|
130
135
|
return token;
|
|
@@ -309,6 +314,6 @@ export class PluvPlatform<
|
|
|
309
314
|
private _logDebug(...args: any[]): void {
|
|
310
315
|
if (!this._debug) return;
|
|
311
316
|
|
|
312
|
-
console.log(...args);
|
|
317
|
+
console.log("[PLATFORM PLUV]", ...args);
|
|
313
318
|
}
|
|
314
319
|
}
|