@openfin/cloud-interop-core-api 13.2.1 → 14.0.0-beta.2
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/index.cjs +4 -2
- package/index.mjs +4 -2
- package/package.json +5 -8
package/index.cjs
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var buffer = require('buffer');
|
|
4
|
+
require('fs');
|
|
5
|
+
require('path');
|
|
4
6
|
var mqtt = require('mqtt');
|
|
5
7
|
|
|
6
|
-
var
|
|
8
|
+
var u=n=>{let e=n.replaceAll("-","+").replaceAll("_","/");return e.padEnd(e.length+(4-e.length%4)%4,"=")};
|
|
7
9
|
|
|
8
10
|
class CloudInteropAPIError extends Error {
|
|
9
11
|
code;
|
|
@@ -686,7 +688,7 @@ class CloudInteropAPI {
|
|
|
686
688
|
}
|
|
687
689
|
const payload = parts[1];
|
|
688
690
|
// Decode base64url encoded payload
|
|
689
|
-
const decodedBytes = buffer.Buffer.from(
|
|
691
|
+
const decodedBytes = buffer.Buffer.from(u(payload), 'base64');
|
|
690
692
|
const payloadJson = decodedBytes.toString('utf8');
|
|
691
693
|
// Parse JSON to get the exp claim
|
|
692
694
|
const claims = JSON.parse(payloadJson);
|
package/index.mjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Buffer } from 'buffer';
|
|
2
|
+
import 'fs';
|
|
3
|
+
import 'path';
|
|
2
4
|
import mqtt from 'mqtt';
|
|
3
5
|
|
|
4
|
-
var
|
|
6
|
+
var u=n=>{let e=n.replaceAll("-","+").replaceAll("_","/");return e.padEnd(e.length+(4-e.length%4)%4,"=")};
|
|
5
7
|
|
|
6
8
|
class CloudInteropAPIError extends Error {
|
|
7
9
|
code;
|
|
@@ -684,7 +686,7 @@ class CloudInteropAPI {
|
|
|
684
686
|
}
|
|
685
687
|
const payload = parts[1];
|
|
686
688
|
// Decode base64url encoded payload
|
|
687
|
-
const decodedBytes = Buffer.from(
|
|
689
|
+
const decodedBytes = Buffer.from(u(payload), 'base64');
|
|
688
690
|
const payloadJson = decodedBytes.toString('utf8');
|
|
689
691
|
// Parse JSON to get the exp claim
|
|
690
692
|
const claims = JSON.parse(payloadJson);
|
package/package.json
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfin/cloud-interop-core-api",
|
|
3
|
-
"version": "
|
|
4
|
-
"type": "module",
|
|
3
|
+
"version": "14.0.0-beta.2",
|
|
5
4
|
"description": "",
|
|
5
|
+
"type": "module",
|
|
6
6
|
"main": "./index.cjs",
|
|
7
7
|
"browser": "./index.mjs",
|
|
8
8
|
"types": "./bundle.d.ts",
|
|
9
|
-
"author": "",
|
|
9
|
+
"author": "support@here.io",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"mqtt": "^5.
|
|
13
|
-
"zod": "
|
|
14
|
-
},
|
|
15
|
-
"optionalDependencies": {
|
|
16
|
-
"@rollup/rollup-linux-x64-gnu": "*"
|
|
12
|
+
"mqtt": "^5.15.1",
|
|
13
|
+
"zod": "catalog:"
|
|
17
14
|
}
|
|
18
15
|
}
|