@analyticscli/sdk 0.1.0-preview.6 → 0.1.0-preview.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/dist/browser.cjs +22 -1
- package/dist/browser.js +1 -1
- package/dist/{chunk-RGEYDN6A.js → chunk-O4FIH647.js} +22 -1
- package/dist/index.cjs +22 -1
- package/dist/index.js +1 -1
- package/dist/react-native.cjs +22 -1
- package/dist/react-native.js +1 -1
- package/package.json +1 -1
package/dist/browser.cjs
CHANGED
|
@@ -237,7 +237,28 @@ var randomId = () => {
|
|
|
237
237
|
if (globalThis.crypto?.randomUUID) {
|
|
238
238
|
return globalThis.crypto.randomUUID();
|
|
239
239
|
}
|
|
240
|
-
|
|
240
|
+
const bytes = new Uint8Array(16);
|
|
241
|
+
if (globalThis.crypto?.getRandomValues) {
|
|
242
|
+
globalThis.crypto.getRandomValues(bytes);
|
|
243
|
+
} else {
|
|
244
|
+
for (let index = 0; index < bytes.length; index += 1) {
|
|
245
|
+
bytes[index] = Math.floor(Math.random() * 256);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
const byte6 = bytes[6] ?? 0;
|
|
249
|
+
const byte8 = bytes[8] ?? 0;
|
|
250
|
+
bytes[6] = byte6 & 15 | 64;
|
|
251
|
+
bytes[8] = byte8 & 63 | 128;
|
|
252
|
+
let output = "";
|
|
253
|
+
for (let index = 0; index < bytes.length; index += 1) {
|
|
254
|
+
const byte = bytes[index] ?? 0;
|
|
255
|
+
const hex = byte.toString(16).padStart(2, "0");
|
|
256
|
+
output += hex;
|
|
257
|
+
if (index === 3 || index === 5 || index === 7 || index === 9) {
|
|
258
|
+
output += "-";
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return output;
|
|
241
262
|
};
|
|
242
263
|
var readStorageSync = (storage, key) => {
|
|
243
264
|
if (!storage) {
|
package/dist/browser.js
CHANGED
|
@@ -196,7 +196,28 @@ var randomId = () => {
|
|
|
196
196
|
if (globalThis.crypto?.randomUUID) {
|
|
197
197
|
return globalThis.crypto.randomUUID();
|
|
198
198
|
}
|
|
199
|
-
|
|
199
|
+
const bytes = new Uint8Array(16);
|
|
200
|
+
if (globalThis.crypto?.getRandomValues) {
|
|
201
|
+
globalThis.crypto.getRandomValues(bytes);
|
|
202
|
+
} else {
|
|
203
|
+
for (let index = 0; index < bytes.length; index += 1) {
|
|
204
|
+
bytes[index] = Math.floor(Math.random() * 256);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
const byte6 = bytes[6] ?? 0;
|
|
208
|
+
const byte8 = bytes[8] ?? 0;
|
|
209
|
+
bytes[6] = byte6 & 15 | 64;
|
|
210
|
+
bytes[8] = byte8 & 63 | 128;
|
|
211
|
+
let output = "";
|
|
212
|
+
for (let index = 0; index < bytes.length; index += 1) {
|
|
213
|
+
const byte = bytes[index] ?? 0;
|
|
214
|
+
const hex = byte.toString(16).padStart(2, "0");
|
|
215
|
+
output += hex;
|
|
216
|
+
if (index === 3 || index === 5 || index === 7 || index === 9) {
|
|
217
|
+
output += "-";
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return output;
|
|
200
221
|
};
|
|
201
222
|
var readStorageSync = (storage, key) => {
|
|
202
223
|
if (!storage) {
|
package/dist/index.cjs
CHANGED
|
@@ -237,7 +237,28 @@ var randomId = () => {
|
|
|
237
237
|
if (globalThis.crypto?.randomUUID) {
|
|
238
238
|
return globalThis.crypto.randomUUID();
|
|
239
239
|
}
|
|
240
|
-
|
|
240
|
+
const bytes = new Uint8Array(16);
|
|
241
|
+
if (globalThis.crypto?.getRandomValues) {
|
|
242
|
+
globalThis.crypto.getRandomValues(bytes);
|
|
243
|
+
} else {
|
|
244
|
+
for (let index = 0; index < bytes.length; index += 1) {
|
|
245
|
+
bytes[index] = Math.floor(Math.random() * 256);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
const byte6 = bytes[6] ?? 0;
|
|
249
|
+
const byte8 = bytes[8] ?? 0;
|
|
250
|
+
bytes[6] = byte6 & 15 | 64;
|
|
251
|
+
bytes[8] = byte8 & 63 | 128;
|
|
252
|
+
let output = "";
|
|
253
|
+
for (let index = 0; index < bytes.length; index += 1) {
|
|
254
|
+
const byte = bytes[index] ?? 0;
|
|
255
|
+
const hex = byte.toString(16).padStart(2, "0");
|
|
256
|
+
output += hex;
|
|
257
|
+
if (index === 3 || index === 5 || index === 7 || index === 9) {
|
|
258
|
+
output += "-";
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return output;
|
|
241
262
|
};
|
|
242
263
|
var readStorageSync = (storage, key) => {
|
|
243
264
|
if (!storage) {
|
package/dist/index.js
CHANGED
package/dist/react-native.cjs
CHANGED
|
@@ -237,7 +237,28 @@ var randomId = () => {
|
|
|
237
237
|
if (globalThis.crypto?.randomUUID) {
|
|
238
238
|
return globalThis.crypto.randomUUID();
|
|
239
239
|
}
|
|
240
|
-
|
|
240
|
+
const bytes = new Uint8Array(16);
|
|
241
|
+
if (globalThis.crypto?.getRandomValues) {
|
|
242
|
+
globalThis.crypto.getRandomValues(bytes);
|
|
243
|
+
} else {
|
|
244
|
+
for (let index = 0; index < bytes.length; index += 1) {
|
|
245
|
+
bytes[index] = Math.floor(Math.random() * 256);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
const byte6 = bytes[6] ?? 0;
|
|
249
|
+
const byte8 = bytes[8] ?? 0;
|
|
250
|
+
bytes[6] = byte6 & 15 | 64;
|
|
251
|
+
bytes[8] = byte8 & 63 | 128;
|
|
252
|
+
let output = "";
|
|
253
|
+
for (let index = 0; index < bytes.length; index += 1) {
|
|
254
|
+
const byte = bytes[index] ?? 0;
|
|
255
|
+
const hex = byte.toString(16).padStart(2, "0");
|
|
256
|
+
output += hex;
|
|
257
|
+
if (index === 3 || index === 5 || index === 7 || index === 9) {
|
|
258
|
+
output += "-";
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return output;
|
|
241
262
|
};
|
|
242
263
|
var readStorageSync = (storage, key) => {
|
|
243
264
|
if (!storage) {
|
package/dist/react-native.js
CHANGED
package/package.json
CHANGED