@cloudbase/oauth 2.25.1 → 2.25.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.
|
@@ -2429,21 +2429,25 @@ if (!globalThis.IS_MP_BUILD) {
|
|
|
2429
2429
|
rng_pool = [];
|
|
2430
2430
|
rng_pptr = 0;
|
|
2431
2431
|
var t = void 0;
|
|
2432
|
-
if (window
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2432
|
+
if (typeof window !== 'undefined') {
|
|
2433
|
+
if (window?.crypto && window?.crypto.getRandomValues) {
|
|
2434
|
+
var z = new Uint32Array(256);
|
|
2435
|
+
window?.crypto.getRandomValues(z);
|
|
2436
|
+
for (t = 0; t < z.length; ++t) {
|
|
2437
|
+
rng_pool[rng_pptr++] = z[t] & 255;
|
|
2438
|
+
}
|
|
2437
2439
|
}
|
|
2438
2440
|
}
|
|
2439
2441
|
var onMouseMoveListener_1 = function (ev) {
|
|
2440
2442
|
this.count = this.count || 0;
|
|
2441
2443
|
if (this.count >= 256 || rng_pptr >= rng_psize) {
|
|
2442
|
-
if (window
|
|
2443
|
-
window?.removeEventListener
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
window?.detachEvent
|
|
2444
|
+
if (typeof window !== 'undefined') {
|
|
2445
|
+
if (window?.removeEventListener) {
|
|
2446
|
+
window?.removeEventListener('mousemove', onMouseMoveListener_1, false);
|
|
2447
|
+
}
|
|
2448
|
+
else if (window?.detachEvent) {
|
|
2449
|
+
window?.detachEvent('onmousemove', onMouseMoveListener_1);
|
|
2450
|
+
}
|
|
2447
2451
|
}
|
|
2448
2452
|
return;
|
|
2449
2453
|
}
|
|
@@ -2455,11 +2459,13 @@ if (!globalThis.IS_MP_BUILD) {
|
|
|
2455
2459
|
catch (e) {
|
|
2456
2460
|
}
|
|
2457
2461
|
};
|
|
2458
|
-
if (window
|
|
2459
|
-
window?.addEventListener
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
window?.attachEvent
|
|
2462
|
+
if (typeof window !== 'undefined') {
|
|
2463
|
+
if (window?.addEventListener) {
|
|
2464
|
+
window?.addEventListener('mousemove', onMouseMoveListener_1, false);
|
|
2465
|
+
}
|
|
2466
|
+
else if (window?.attachEvent) {
|
|
2467
|
+
window?.attachEvent('onmousemove', onMouseMoveListener_1);
|
|
2468
|
+
}
|
|
2463
2469
|
}
|
|
2464
2470
|
}
|
|
2465
2471
|
function rng_get_byte() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/oauth",
|
|
3
|
-
"version": "2.25.
|
|
3
|
+
"version": "2.25.3",
|
|
4
4
|
"description": "cloudbase javascript sdk auth componets",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -19,16 +19,19 @@
|
|
|
19
19
|
"precommit": "npm run lint"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@cloudbase/utilities": "2.25.
|
|
22
|
+
"@cloudbase/utilities": "2.25.3"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@babel/preset-env": "^7.25.3",
|
|
26
|
-
"@cloudbase/types": "2.25.
|
|
26
|
+
"@cloudbase/types": "2.25.3",
|
|
27
27
|
"@types/node": "^22.5.4",
|
|
28
28
|
"terser-webpack-plugin": "^3.0.2",
|
|
29
29
|
"ts-loader": "^9.5.1",
|
|
30
30
|
"webpack-bundle-analyzer": "^4.9.1"
|
|
31
31
|
},
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"@cloudbase/utilities": "2.25.0"
|
|
34
|
+
},
|
|
32
35
|
"license": "Apache-2.0",
|
|
33
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "2bf2f90d89b7e9b2a4bd232836f32b5f46868bb5"
|
|
34
37
|
}
|
|
@@ -2697,12 +2697,14 @@ and limitations under the License.
|
|
|
2697
2697
|
rng_pool = []
|
|
2698
2698
|
rng_pptr = 0
|
|
2699
2699
|
var t = void 0
|
|
2700
|
-
if (window
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2700
|
+
if (typeof window !== 'undefined') {
|
|
2701
|
+
if (window?.crypto && window?.crypto.getRandomValues) {
|
|
2702
|
+
// Extract entropy (2048 bits) from RNG if available
|
|
2703
|
+
var z = new Uint32Array(256)
|
|
2704
|
+
window?.crypto.getRandomValues(z)
|
|
2705
|
+
for (t = 0; t < z.length; ++t) {
|
|
2706
|
+
rng_pool[rng_pptr++] = z[t] & 255
|
|
2707
|
+
}
|
|
2706
2708
|
}
|
|
2707
2709
|
}
|
|
2708
2710
|
// Use mouse events for entropy, if we do not have enough entropy by the time
|
|
@@ -2710,10 +2712,12 @@ and limitations under the License.
|
|
|
2710
2712
|
var onMouseMoveListener_1 = function (ev) {
|
|
2711
2713
|
this.count = this.count || 0
|
|
2712
2714
|
if (this.count >= 256 || rng_pptr >= rng_psize) {
|
|
2713
|
-
if (window
|
|
2714
|
-
window?.removeEventListener
|
|
2715
|
-
|
|
2716
|
-
window?.detachEvent
|
|
2715
|
+
if (typeof window !== 'undefined') {
|
|
2716
|
+
if (window?.removeEventListener) {
|
|
2717
|
+
window?.removeEventListener('mousemove', onMouseMoveListener_1, false)
|
|
2718
|
+
} else if (window?.detachEvent) {
|
|
2719
|
+
window?.detachEvent('onmousemove', onMouseMoveListener_1)
|
|
2720
|
+
}
|
|
2717
2721
|
}
|
|
2718
2722
|
return
|
|
2719
2723
|
}
|
|
@@ -2725,10 +2729,12 @@ and limitations under the License.
|
|
|
2725
2729
|
// Sometimes Firefox will deny permission to access event properties for some reason. Ignore.
|
|
2726
2730
|
}
|
|
2727
2731
|
}
|
|
2728
|
-
if (window
|
|
2729
|
-
window?.addEventListener
|
|
2730
|
-
|
|
2731
|
-
window?.attachEvent
|
|
2732
|
+
if (typeof window !== 'undefined') {
|
|
2733
|
+
if (window?.addEventListener) {
|
|
2734
|
+
window?.addEventListener('mousemove', onMouseMoveListener_1, false)
|
|
2735
|
+
} else if (window?.attachEvent) {
|
|
2736
|
+
window?.attachEvent('onmousemove', onMouseMoveListener_1)
|
|
2737
|
+
}
|
|
2732
2738
|
}
|
|
2733
2739
|
}
|
|
2734
2740
|
function rng_get_byte() {
|