@authme/core 2.8.44 → 2.8.46
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.js +59 -64
- package/index.esm.js +56 -61
- package/package.json +2 -2
- package/index.esm.d.ts +0 -1
- /package/{index.cjs.d.ts → index.d.ts} +0 -0
package/index.cjs.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
var util = require('@authme/util');
|
|
4
4
|
require('core-js/modules/es.array.iterator.js');
|
|
5
5
|
require('core-js/modules/es.array.push.js');
|
|
6
|
+
require('core-js/modules/es.iterator.constructor.js');
|
|
7
|
+
require('core-js/modules/es.iterator.every.js');
|
|
6
8
|
require('core-js/modules/es.object.assign.js');
|
|
7
9
|
require('core-js/modules/es.promise.js');
|
|
8
10
|
require('core-js/modules/es.regexp.to-string.js');
|
|
9
|
-
require('core-js/modules/esnext.iterator.constructor.js');
|
|
10
|
-
require('core-js/modules/esnext.iterator.every.js');
|
|
11
11
|
require('core-js/modules/web.dom-collections.iterator.js');
|
|
12
12
|
require('core-js/modules/web.url.js');
|
|
13
13
|
require('core-js/modules/web.url.to-json.js');
|
|
@@ -15,14 +15,14 @@ require('core-js/modules/web.url-search-params.js');
|
|
|
15
15
|
require('core-js/modules/web.url-search-params.delete.js');
|
|
16
16
|
require('core-js/modules/web.url-search-params.has.js');
|
|
17
17
|
require('core-js/modules/web.url-search-params.size.js');
|
|
18
|
+
require('core-js/modules/es.iterator.for-each.js');
|
|
18
19
|
require('core-js/modules/es.regexp.constructor.js');
|
|
19
20
|
require('core-js/modules/es.regexp.dot-all.js');
|
|
20
21
|
require('core-js/modules/es.regexp.exec.js');
|
|
21
22
|
require('core-js/modules/es.string.replace.js');
|
|
22
|
-
require('core-js/modules/
|
|
23
|
+
require('core-js/modules/es.iterator.filter.js');
|
|
24
|
+
require('core-js/modules/es.iterator.map.js');
|
|
23
25
|
require('core-js/modules/es.json.stringify.js');
|
|
24
|
-
require('core-js/modules/esnext.iterator.filter.js');
|
|
25
|
-
require('core-js/modules/esnext.iterator.map.js');
|
|
26
26
|
require('core-js/modules/es.symbol.description.js');
|
|
27
27
|
require('core-js/modules/es.error.cause.js');
|
|
28
28
|
require('core-js/modules/es.string.ends-with.js');
|
|
@@ -32,7 +32,7 @@ function core() {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
var name = "authme/sdk";
|
|
35
|
-
var version$1 = "2.8.
|
|
35
|
+
var version$1 = "2.8.46";
|
|
36
36
|
var packageInfo = {
|
|
37
37
|
name: name,
|
|
38
38
|
version: version$1};
|
|
@@ -1769,68 +1769,63 @@ class EventListenerService {
|
|
|
1769
1769
|
}
|
|
1770
1770
|
}
|
|
1771
1771
|
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
var getRandomValues;
|
|
1776
|
-
var rnds8 = new Uint8Array(16);
|
|
1777
|
-
function rng() {
|
|
1778
|
-
// lazy load so that environments that need to polyfill have a chance to do so
|
|
1779
|
-
if (!getRandomValues) {
|
|
1780
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
|
|
1781
|
-
// find the complete implementation of crypto (msCrypto) on IE11.
|
|
1782
|
-
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
|
|
1783
|
-
|
|
1784
|
-
if (!getRandomValues) {
|
|
1785
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
1786
|
-
}
|
|
1787
|
-
}
|
|
1788
|
-
|
|
1789
|
-
return getRandomValues(rnds8);
|
|
1772
|
+
const byteToHex = [];
|
|
1773
|
+
for (let i = 0; i < 256; ++i) {
|
|
1774
|
+
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
1790
1775
|
}
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1776
|
+
function unsafeStringify(arr, offset = 0) {
|
|
1777
|
+
return (byteToHex[arr[offset + 0]] +
|
|
1778
|
+
byteToHex[arr[offset + 1]] +
|
|
1779
|
+
byteToHex[arr[offset + 2]] +
|
|
1780
|
+
byteToHex[arr[offset + 3]] +
|
|
1781
|
+
'-' +
|
|
1782
|
+
byteToHex[arr[offset + 4]] +
|
|
1783
|
+
byteToHex[arr[offset + 5]] +
|
|
1784
|
+
'-' +
|
|
1785
|
+
byteToHex[arr[offset + 6]] +
|
|
1786
|
+
byteToHex[arr[offset + 7]] +
|
|
1787
|
+
'-' +
|
|
1788
|
+
byteToHex[arr[offset + 8]] +
|
|
1789
|
+
byteToHex[arr[offset + 9]] +
|
|
1790
|
+
'-' +
|
|
1791
|
+
byteToHex[arr[offset + 10]] +
|
|
1792
|
+
byteToHex[arr[offset + 11]] +
|
|
1793
|
+
byteToHex[arr[offset + 12]] +
|
|
1794
|
+
byteToHex[arr[offset + 13]] +
|
|
1795
|
+
byteToHex[arr[offset + 14]] +
|
|
1796
|
+
byteToHex[arr[offset + 15]]).toLowerCase();
|
|
1796
1797
|
}
|
|
1797
1798
|
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1799
|
+
let getRandomValues;
|
|
1800
|
+
const rnds8 = new Uint8Array(16);
|
|
1801
|
+
function rng() {
|
|
1802
|
+
if (!getRandomValues) {
|
|
1803
|
+
if (typeof crypto === 'undefined' || !crypto.getRandomValues) {
|
|
1804
|
+
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
1805
|
+
}
|
|
1806
|
+
getRandomValues = crypto.getRandomValues.bind(crypto);
|
|
1807
|
+
}
|
|
1808
|
+
return getRandomValues(rnds8);
|
|
1807
1809
|
}
|
|
1808
1810
|
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
|
1812
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
1813
|
-
var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
|
|
1814
|
-
// of the following:
|
|
1815
|
-
// - One or more input array values don't map to a hex octet (leading to
|
|
1816
|
-
// "undefined" in the uuid)
|
|
1817
|
-
// - Invalid input values for the RFC `version` or `variant` fields
|
|
1818
|
-
|
|
1819
|
-
if (!validate(uuid)) {
|
|
1820
|
-
throw TypeError('Stringified UUID is invalid');
|
|
1821
|
-
}
|
|
1811
|
+
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
1812
|
+
var native = { randomUUID };
|
|
1822
1813
|
|
|
1823
|
-
|
|
1814
|
+
function _v4(options, buf, offset) {
|
|
1815
|
+
options = options || {};
|
|
1816
|
+
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
1817
|
+
if (rnds.length < 16) {
|
|
1818
|
+
throw new Error('Random bytes length must be >= 16');
|
|
1819
|
+
}
|
|
1820
|
+
rnds[6] = (rnds[6] & 0x0f) | 0x40;
|
|
1821
|
+
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
|
1822
|
+
return unsafeStringify(rnds);
|
|
1824
1823
|
}
|
|
1825
|
-
|
|
1826
1824
|
function v4(options, buf, offset) {
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
1832
|
-
|
|
1833
|
-
return stringify(rnds);
|
|
1825
|
+
if (native.randomUUID && true && !options) {
|
|
1826
|
+
return native.randomUUID();
|
|
1827
|
+
}
|
|
1828
|
+
return _v4(options);
|
|
1834
1829
|
}
|
|
1835
1830
|
|
|
1836
1831
|
exports.Feature = void 0;
|
|
@@ -2069,12 +2064,12 @@ function getCustomerState() {
|
|
|
2069
2064
|
}
|
|
2070
2065
|
|
|
2071
2066
|
Object.defineProperty(exports, "AuthmeError", {
|
|
2072
|
-
|
|
2073
|
-
|
|
2067
|
+
enumerable: true,
|
|
2068
|
+
get: function () { return util.AuthmeError; }
|
|
2074
2069
|
});
|
|
2075
2070
|
Object.defineProperty(exports, "ErrorCode", {
|
|
2076
|
-
|
|
2077
|
-
|
|
2071
|
+
enumerable: true,
|
|
2072
|
+
get: function () { return util.ErrorCode; }
|
|
2078
2073
|
});
|
|
2079
2074
|
exports.EventListenerService = EventListenerService;
|
|
2080
2075
|
exports.TrackingEvent = TrackingEvent;
|
package/index.esm.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RUN_FUNCTION_NAME, AuthmeError, ErrorCode, Storage, STORAGE_KEY, useState, getDeviceInfo, getSystemInfo, decodeToken, verificationErrorMessages } from '@authme/util';
|
|
2
2
|
export { AuthmeError, ErrorCode } from '@authme/util';
|
|
3
3
|
import 'core-js/modules/es.array.iterator.js';
|
|
4
4
|
import 'core-js/modules/es.array.push.js';
|
|
5
|
+
import 'core-js/modules/es.iterator.constructor.js';
|
|
6
|
+
import 'core-js/modules/es.iterator.every.js';
|
|
5
7
|
import 'core-js/modules/es.object.assign.js';
|
|
6
8
|
import 'core-js/modules/es.promise.js';
|
|
7
9
|
import 'core-js/modules/es.regexp.to-string.js';
|
|
8
|
-
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
9
|
-
import 'core-js/modules/esnext.iterator.every.js';
|
|
10
10
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
11
11
|
import 'core-js/modules/web.url.js';
|
|
12
12
|
import 'core-js/modules/web.url.to-json.js';
|
|
@@ -14,14 +14,14 @@ import 'core-js/modules/web.url-search-params.js';
|
|
|
14
14
|
import 'core-js/modules/web.url-search-params.delete.js';
|
|
15
15
|
import 'core-js/modules/web.url-search-params.has.js';
|
|
16
16
|
import 'core-js/modules/web.url-search-params.size.js';
|
|
17
|
+
import 'core-js/modules/es.iterator.for-each.js';
|
|
17
18
|
import 'core-js/modules/es.regexp.constructor.js';
|
|
18
19
|
import 'core-js/modules/es.regexp.dot-all.js';
|
|
19
20
|
import 'core-js/modules/es.regexp.exec.js';
|
|
20
21
|
import 'core-js/modules/es.string.replace.js';
|
|
21
|
-
import 'core-js/modules/
|
|
22
|
+
import 'core-js/modules/es.iterator.filter.js';
|
|
23
|
+
import 'core-js/modules/es.iterator.map.js';
|
|
22
24
|
import 'core-js/modules/es.json.stringify.js';
|
|
23
|
-
import 'core-js/modules/esnext.iterator.filter.js';
|
|
24
|
-
import 'core-js/modules/esnext.iterator.map.js';
|
|
25
25
|
import 'core-js/modules/es.symbol.description.js';
|
|
26
26
|
import 'core-js/modules/es.error.cause.js';
|
|
27
27
|
import 'core-js/modules/es.string.ends-with.js';
|
|
@@ -31,7 +31,7 @@ function core() {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
var name = "authme/sdk";
|
|
34
|
-
var version$1 = "2.8.
|
|
34
|
+
var version$1 = "2.8.46";
|
|
35
35
|
var packageInfo = {
|
|
36
36
|
name: name,
|
|
37
37
|
version: version$1};
|
|
@@ -1768,68 +1768,63 @@ class EventListenerService {
|
|
|
1768
1768
|
}
|
|
1769
1769
|
}
|
|
1770
1770
|
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
var getRandomValues;
|
|
1775
|
-
var rnds8 = new Uint8Array(16);
|
|
1776
|
-
function rng() {
|
|
1777
|
-
// lazy load so that environments that need to polyfill have a chance to do so
|
|
1778
|
-
if (!getRandomValues) {
|
|
1779
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
|
|
1780
|
-
// find the complete implementation of crypto (msCrypto) on IE11.
|
|
1781
|
-
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
|
|
1782
|
-
|
|
1783
|
-
if (!getRandomValues) {
|
|
1784
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
1785
|
-
}
|
|
1786
|
-
}
|
|
1787
|
-
|
|
1788
|
-
return getRandomValues(rnds8);
|
|
1771
|
+
const byteToHex = [];
|
|
1772
|
+
for (let i = 0; i < 256; ++i) {
|
|
1773
|
+
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
1789
1774
|
}
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1775
|
+
function unsafeStringify(arr, offset = 0) {
|
|
1776
|
+
return (byteToHex[arr[offset + 0]] +
|
|
1777
|
+
byteToHex[arr[offset + 1]] +
|
|
1778
|
+
byteToHex[arr[offset + 2]] +
|
|
1779
|
+
byteToHex[arr[offset + 3]] +
|
|
1780
|
+
'-' +
|
|
1781
|
+
byteToHex[arr[offset + 4]] +
|
|
1782
|
+
byteToHex[arr[offset + 5]] +
|
|
1783
|
+
'-' +
|
|
1784
|
+
byteToHex[arr[offset + 6]] +
|
|
1785
|
+
byteToHex[arr[offset + 7]] +
|
|
1786
|
+
'-' +
|
|
1787
|
+
byteToHex[arr[offset + 8]] +
|
|
1788
|
+
byteToHex[arr[offset + 9]] +
|
|
1789
|
+
'-' +
|
|
1790
|
+
byteToHex[arr[offset + 10]] +
|
|
1791
|
+
byteToHex[arr[offset + 11]] +
|
|
1792
|
+
byteToHex[arr[offset + 12]] +
|
|
1793
|
+
byteToHex[arr[offset + 13]] +
|
|
1794
|
+
byteToHex[arr[offset + 14]] +
|
|
1795
|
+
byteToHex[arr[offset + 15]]).toLowerCase();
|
|
1795
1796
|
}
|
|
1796
1797
|
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1798
|
+
let getRandomValues;
|
|
1799
|
+
const rnds8 = new Uint8Array(16);
|
|
1800
|
+
function rng() {
|
|
1801
|
+
if (!getRandomValues) {
|
|
1802
|
+
if (typeof crypto === 'undefined' || !crypto.getRandomValues) {
|
|
1803
|
+
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
1804
|
+
}
|
|
1805
|
+
getRandomValues = crypto.getRandomValues.bind(crypto);
|
|
1806
|
+
}
|
|
1807
|
+
return getRandomValues(rnds8);
|
|
1806
1808
|
}
|
|
1807
1809
|
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
|
1811
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
1812
|
-
var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
|
|
1813
|
-
// of the following:
|
|
1814
|
-
// - One or more input array values don't map to a hex octet (leading to
|
|
1815
|
-
// "undefined" in the uuid)
|
|
1816
|
-
// - Invalid input values for the RFC `version` or `variant` fields
|
|
1817
|
-
|
|
1818
|
-
if (!validate(uuid)) {
|
|
1819
|
-
throw TypeError('Stringified UUID is invalid');
|
|
1820
|
-
}
|
|
1810
|
+
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
1811
|
+
var native = { randomUUID };
|
|
1821
1812
|
|
|
1822
|
-
|
|
1813
|
+
function _v4(options, buf, offset) {
|
|
1814
|
+
options = options || {};
|
|
1815
|
+
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
1816
|
+
if (rnds.length < 16) {
|
|
1817
|
+
throw new Error('Random bytes length must be >= 16');
|
|
1818
|
+
}
|
|
1819
|
+
rnds[6] = (rnds[6] & 0x0f) | 0x40;
|
|
1820
|
+
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
|
1821
|
+
return unsafeStringify(rnds);
|
|
1823
1822
|
}
|
|
1824
|
-
|
|
1825
1823
|
function v4(options, buf, offset) {
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
1831
|
-
|
|
1832
|
-
return stringify(rnds);
|
|
1824
|
+
if (native.randomUUID && true && !options) {
|
|
1825
|
+
return native.randomUUID();
|
|
1826
|
+
}
|
|
1827
|
+
return _v4(options);
|
|
1833
1828
|
}
|
|
1834
1829
|
|
|
1835
1830
|
var Feature;
|
package/package.json
CHANGED
package/index.esm.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./src/index";
|
|
File without changes
|