@nsshunt/stsrunnerframework 1.0.32 → 1.0.34
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.
|
@@ -1898,11 +1898,15 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
1898
1898
|
const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
1899
1899
|
const native = { randomUUID };
|
|
1900
1900
|
function v4(options, buf, offset) {
|
|
1901
|
+
var _a;
|
|
1901
1902
|
if (native.randomUUID && !buf && !options) {
|
|
1902
1903
|
return native.randomUUID();
|
|
1903
1904
|
}
|
|
1904
1905
|
options = options || {};
|
|
1905
|
-
const rnds = options.random
|
|
1906
|
+
const rnds = options.random ?? ((_a = options.rng) == null ? void 0 : _a.call(options)) ?? rng();
|
|
1907
|
+
if (rnds.length < 16) {
|
|
1908
|
+
throw new Error("Random bytes length must be >= 16");
|
|
1909
|
+
}
|
|
1906
1910
|
rnds[6] = rnds[6] & 15 | 64;
|
|
1907
1911
|
rnds[8] = rnds[8] & 63 | 128;
|
|
1908
1912
|
return unsafeStringify(rnds);
|