@auxilium/datalynk-client 1.6.0 โ 1.6.1
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/api.d.ts +2 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/auth.d.ts +2 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/index.cjs +113 -17
- package/dist/index.mjs +113 -17
- package/dist/offline-auth.d.ts +5 -0
- package/dist/offline-auth.d.ts.map +1 -0
- package/dist/service.worker.mjs +113 -14
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -57,6 +57,8 @@ export type ApiOptions = {
|
|
|
57
57
|
watchTokenExpiry?: boolean;
|
|
58
58
|
/** Service worker URL */
|
|
59
59
|
serviceWorker?: string;
|
|
60
|
+
/** Extra app files to save before they are opened offline. */
|
|
61
|
+
offlineAssets?: string[];
|
|
60
62
|
/** Disable sockets with false or override socket URL */
|
|
61
63
|
socket?: false | string;
|
|
62
64
|
/** Socket authentication mode. Existing clients use token authentication unless ticket mode is explicitly enabled. */
|
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,QAAQ,EAAQ,MAAM,SAAS,CAAC;AACnF,OAAO,EAAC,eAAe,EAAuB,MAAM,MAAM,CAAC;AAC3D,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,QAAQ,EAAQ,MAAM,SAAS,CAAC;AACnF,OAAO,EAAC,eAAe,EAAuB,MAAM,MAAM,CAAC;AAC3D,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,KAAK,E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AAG,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE;QAAC,OAAO,EAAE,IAAI,CAAA;KAAC,GAAG,iBAAiB,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAWjG;;;;;;;;;;;OAWG;IACI,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,CAAC;IACpE,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE;QAAC,OAAO,EAAE,IAAI,CAAA;KAAC,GAAG,iBAAiB,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAuDnG;;;;;;;;;;;;OAYG;IACI,KAAK,CAAC,CAAC,SAAS,IAAI,GAAG,GAAG,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC;CAIjE"}
|
package/dist/auth.d.ts
CHANGED
|
@@ -64,6 +64,8 @@ export type User = {
|
|
|
64
64
|
export declare class Auth {
|
|
65
65
|
private readonly api;
|
|
66
66
|
private onlinePrompt?;
|
|
67
|
+
private offlineUnlocked;
|
|
68
|
+
private wasOffline;
|
|
67
69
|
/** Current user as an observable */
|
|
68
70
|
user$: BehaviorSubject<User | null | undefined>;
|
|
69
71
|
/** Current user */
|
package/dist/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,eAAe,EAAS,MAAM,MAAM,CAAC;AAE7C,OAAO,EAAC,WAAW,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,O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AAC;IAOrC;;;;;;;;OAQG;IACG,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAClE,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,MAAM,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;KACtB,GAAG,OAAO,CAAC,IAAI,CAAC;IAoCjB;;;;OAIG;IACH,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAS3B;;;;;;OAMG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,WAAW;IAIrE;;;;OAIG;IACH,MAAM,CAAC,MAAM,UAAO;gBAGe,MAAM;aAAO,MAAM;;IAOtD;;;;;;;OAOG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM;IAavD;;;;;;OAMG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,KAAK,GAAG,OAAO;CAI3D"}
|
package/dist/index.cjs
CHANGED
|
@@ -1536,13 +1536,81 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1536
1536
|
`;
|
|
1537
1537
|
});
|
|
1538
1538
|
let LoginPrompt = _LoginPrompt;
|
|
1539
|
+
const KEY = "datalynk-offline-login";
|
|
1540
|
+
const ITERATIONS = 31e4;
|
|
1541
|
+
async function hash(password, salt) {
|
|
1542
|
+
const key = await crypto.subtle.importKey("raw", new TextEncoder().encode(password), "PBKDF2", false, ["deriveBits"]);
|
|
1543
|
+
return Array.from(new Uint8Array(await crypto.subtle.deriveBits(
|
|
1544
|
+
{ name: "PBKDF2", salt: new Uint8Array(salt), iterations: ITERATIONS, hash: "SHA-256" },
|
|
1545
|
+
key,
|
|
1546
|
+
256
|
|
1547
|
+
)));
|
|
1548
|
+
}
|
|
1549
|
+
async function rememberOfflineLogin(realm, login, uid, password) {
|
|
1550
|
+
const salt = crypto.getRandomValues(new Uint8Array(16));
|
|
1551
|
+
const record = { realm, login: login.trim().toLowerCase(), uid, salt: Array.from(salt), hash: await hash(password, salt) };
|
|
1552
|
+
localStorage.setItem(KEY, JSON.stringify(record));
|
|
1553
|
+
}
|
|
1554
|
+
async function verifyOfflineLogin(realm, login, uid, password) {
|
|
1555
|
+
const saved = localStorage.getItem(KEY);
|
|
1556
|
+
if (!saved) return false;
|
|
1557
|
+
let record;
|
|
1558
|
+
try {
|
|
1559
|
+
record = JSON.parse(saved);
|
|
1560
|
+
} catch {
|
|
1561
|
+
return false;
|
|
1562
|
+
}
|
|
1563
|
+
if (record.realm !== realm || record.login !== login.trim().toLowerCase() || record.uid !== uid || !Array.isArray(record.salt) || !Array.isArray(record.hash)) return false;
|
|
1564
|
+
const candidate = await hash(password, new Uint8Array(record.salt));
|
|
1565
|
+
if (candidate.length !== record.hash.length) return false;
|
|
1566
|
+
let difference = 0;
|
|
1567
|
+
for (let i = 0; i < candidate.length; i++) difference |= candidate[i] ^ record.hash[i];
|
|
1568
|
+
return difference === 0;
|
|
1569
|
+
}
|
|
1570
|
+
function hasOfflineLogin(realm, uid) {
|
|
1571
|
+
try {
|
|
1572
|
+
const record = JSON.parse(localStorage.getItem(KEY) || "null");
|
|
1573
|
+
return (record == null ? void 0 : record.realm) === realm && (record == null ? void 0 : record.uid) === uid;
|
|
1574
|
+
} catch {
|
|
1575
|
+
return false;
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1578
|
+
function forgetOfflineLogin() {
|
|
1579
|
+
localStorage.removeItem(KEY);
|
|
1580
|
+
}
|
|
1539
1581
|
class Auth {
|
|
1540
1582
|
constructor(api) {
|
|
1541
1583
|
__publicField(this, "onlinePrompt");
|
|
1584
|
+
__publicField(this, "offlineUnlocked", false);
|
|
1585
|
+
__publicField(this, "wasOffline", false);
|
|
1542
1586
|
/** Current user as an observable */
|
|
1543
1587
|
__publicField(this, "user$", new BehaviorSubject(void 0));
|
|
1544
1588
|
var _a;
|
|
1545
1589
|
this.api = api;
|
|
1590
|
+
this.api.status$.subscribe(async (status) => {
|
|
1591
|
+
if (status === "offline" || status === "unavailable") this.wasOffline = true;
|
|
1592
|
+
if (status !== "online" || !this.wasOffline) return;
|
|
1593
|
+
this.wasOffline = false;
|
|
1594
|
+
const wasUnlocked = this.offlineUnlocked;
|
|
1595
|
+
const previousUser = this.user;
|
|
1596
|
+
this.offlineUnlocked = false;
|
|
1597
|
+
this.user = void 0;
|
|
1598
|
+
try {
|
|
1599
|
+
const user = await this.current();
|
|
1600
|
+
const identity2 = this.api.jwtPayload;
|
|
1601
|
+
if (!user || user.guest || !identity2 || !hasOfflineLogin(identity2.realm, identity2.uid))
|
|
1602
|
+
forgetOfflineLogin();
|
|
1603
|
+
this.user = user;
|
|
1604
|
+
} catch (error) {
|
|
1605
|
+
if (this.api.status === "unauthorized") forgetOfflineLogin();
|
|
1606
|
+
else {
|
|
1607
|
+
this.wasOffline = true;
|
|
1608
|
+
this.offlineUnlocked = wasUnlocked;
|
|
1609
|
+
this.user = previousUser;
|
|
1610
|
+
}
|
|
1611
|
+
console.error("Unable to recheck the Datalynk user", error);
|
|
1612
|
+
}
|
|
1613
|
+
});
|
|
1546
1614
|
this.api.token$.subscribe(async (token) => {
|
|
1547
1615
|
if (token === void 0) return;
|
|
1548
1616
|
try {
|
|
@@ -1554,8 +1622,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1554
1622
|
});
|
|
1555
1623
|
if ((_a = this.api.options.offline) == null ? void 0 : _a.length)
|
|
1556
1624
|
this.user$.pipe(filter((u) => u !== void 0)).subscribe((u) => {
|
|
1557
|
-
if (u == null)
|
|
1558
|
-
|
|
1625
|
+
if (u == null) {
|
|
1626
|
+
if (this.api.online) localStorage.removeItem("datalynk-user");
|
|
1627
|
+
} else localStorage.setItem("datalynk-user", JSON.stringify(u));
|
|
1559
1628
|
});
|
|
1560
1629
|
}
|
|
1561
1630
|
/** Current user */
|
|
@@ -1579,8 +1648,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1579
1648
|
var _a;
|
|
1580
1649
|
if (!token) return null;
|
|
1581
1650
|
else if (token == ((_a = this.user) == null ? void 0 : _a.token)) return this.user;
|
|
1582
|
-
else if (!this.api.online && typeof localStorage != "undefined" && localStorage.getItem("datalynk-user"))
|
|
1651
|
+
else if (!this.api.online && this.offlineUnlocked && typeof localStorage != "undefined" && localStorage.getItem("datalynk-user"))
|
|
1583
1652
|
return JSON.parse(localStorage.getItem("datalynk-user"));
|
|
1653
|
+
else if (!this.api.online) return null;
|
|
1584
1654
|
return this.api.request([{ "$/auth/current": {} }, { "$/env/me": {} }], { token }).then((resp) => resp[0] || resp[1] ? { ...resp[0], ...resp[1] } : null);
|
|
1585
1655
|
}
|
|
1586
1656
|
/**
|
|
@@ -1592,7 +1662,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1592
1662
|
* @return {Promise<void>} Login complete
|
|
1593
1663
|
*/
|
|
1594
1664
|
async handleLogin(spoke, options) {
|
|
1595
|
-
var _a, _b, _c;
|
|
1665
|
+
var _a, _b, _c, _d;
|
|
1596
1666
|
if (this.onlinePrompt) window.removeEventListener("online", this.onlinePrompt);
|
|
1597
1667
|
if ((_a = this.api.options.offline) == null ? void 0 : _a.length) window.removeEventListener("online", this.onlinePrompt = () => this.handleLogin(spoke, options));
|
|
1598
1668
|
const urlParams = new URLSearchParams(location.search);
|
|
@@ -1601,10 +1671,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1601
1671
|
this.api.token = urlToken;
|
|
1602
1672
|
urlParams.delete("datalynkToken");
|
|
1603
1673
|
location.href = location.pathname + (urlParams.toString() ? "?" + urlParams.toString() : "") + location.hash;
|
|
1604
|
-
} else if (
|
|
1674
|
+
} else if (!this.api.online && ((_b = this.api.options.offline) == null ? void 0 : _b.length) && !this.offlineUnlocked) {
|
|
1675
|
+
await this.loginPrompt(spoke, options).done;
|
|
1676
|
+
return;
|
|
1677
|
+
} else if (this.api.reauthenticationPending && !this.api.online && ((_c = this.api.jwtPayload) == null ? void 0 : _c.realm) == spoke) {
|
|
1605
1678
|
return;
|
|
1606
1679
|
} else if (this.api.token && !this.api.expired) {
|
|
1607
|
-
if (((
|
|
1680
|
+
if (((_d = this.api.jwtPayload) == null ? void 0 : _d.realm) != spoke) {
|
|
1608
1681
|
this.api.token = null;
|
|
1609
1682
|
location.reload();
|
|
1610
1683
|
}
|
|
@@ -1664,10 +1737,23 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1664
1737
|
* @param {twoFactor?: string, expire?: string} opts 2FA code & expire date (YYYY-MM-DD)
|
|
1665
1738
|
* @returns {Promise<User>} User account
|
|
1666
1739
|
*/
|
|
1667
|
-
login(spoke, login, password, opts) {
|
|
1740
|
+
async login(spoke, login, password, opts) {
|
|
1741
|
+
var _a, _b, _c;
|
|
1742
|
+
if (((_a = this.api.options.offline) == null ? void 0 : _a.length) && (!this.api.online || typeof navigator !== "undefined" && !navigator.onLine)) {
|
|
1743
|
+
const identity2 = this.api.jwtPayload;
|
|
1744
|
+
const saved = localStorage.getItem("datalynk-user");
|
|
1745
|
+
if (!identity2 || identity2.realm !== spoke || !saved || !await verifyOfflineLogin(spoke, login, identity2.uid, password.trim()))
|
|
1746
|
+
throw new Error("Offline login is not available for this account on this device.");
|
|
1747
|
+
const user = JSON.parse(saved);
|
|
1748
|
+
if (![user.login, user.email].some((value) => (value == null ? void 0 : value.toLowerCase()) === login.trim().toLowerCase()))
|
|
1749
|
+
throw new Error("Offline login is not available for this account on this device.");
|
|
1750
|
+
this.offlineUnlocked = true;
|
|
1751
|
+
this.user = user;
|
|
1752
|
+
return user;
|
|
1753
|
+
}
|
|
1668
1754
|
const date = /* @__PURE__ */ new Date();
|
|
1669
1755
|
date.setFullYear(date.getFullYear() + 1);
|
|
1670
|
-
|
|
1756
|
+
const resp = await fetch(`${this.api.url}login`, {
|
|
1671
1757
|
method: "POST",
|
|
1672
1758
|
headers: { "Content-Type": "application/json" },
|
|
1673
1759
|
body: JSON.stringify(clean({
|
|
@@ -1678,12 +1764,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1678
1764
|
expireAt: (opts == null ? void 0 : opts.expire) == null ? `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, "0")}-${date.getDate().toString().padStart(2, "0")}` : opts == null ? void 0 : opts.expire,
|
|
1679
1765
|
dateFormat: "ISO8601"
|
|
1680
1766
|
}))
|
|
1681
|
-
}).then(async (resp) => {
|
|
1682
|
-
const data = await resp.json().catch(() => ({}));
|
|
1683
|
-
if (!resp.ok || data["error"]) throw Object.assign(errorFromCode(resp.status, data.error) || {}, data);
|
|
1684
|
-
this.api.token = data["token"];
|
|
1685
|
-
return data;
|
|
1686
1767
|
});
|
|
1768
|
+
const data = await resp.json().catch(() => ({}));
|
|
1769
|
+
if (!resp.ok || data["error"]) throw Object.assign(errorFromCode(resp.status, data.error) || {}, data);
|
|
1770
|
+
this.api.token = data["token"];
|
|
1771
|
+
if (((_b = this.api.options.offline) == null ? void 0 : _b.length) && this.api.options.saveSession && ((_c = this.api.jwtPayload) == null ? void 0 : _c.uid) != null)
|
|
1772
|
+
await rememberOfflineLogin(spoke, login, this.api.jwtPayload.uid, password.trim());
|
|
1773
|
+
return data;
|
|
1687
1774
|
}
|
|
1688
1775
|
/**
|
|
1689
1776
|
* Login as guest user
|
|
@@ -1715,6 +1802,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1715
1802
|
*/
|
|
1716
1803
|
logout(reload = true) {
|
|
1717
1804
|
localStorage.removeItem("datalynk-user");
|
|
1805
|
+
forgetOfflineLogin();
|
|
1718
1806
|
return this.api.request({ "$/auth/logout": {} }).then((resp) => {
|
|
1719
1807
|
if (reload) location.reload();
|
|
1720
1808
|
this.api.token = null;
|
|
@@ -3322,7 +3410,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3322
3410
|
} });
|
|
3323
3411
|
}
|
|
3324
3412
|
}
|
|
3325
|
-
const version = "1.6.
|
|
3413
|
+
const version = "1.6.1";
|
|
3326
3414
|
class WebRtc {
|
|
3327
3415
|
constructor(api) {
|
|
3328
3416
|
__publicField(this, "ice");
|
|
@@ -4008,12 +4096,19 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4008
4096
|
if (this.options.serviceWorker && typeof navigator["serviceWorker"] != "undefined") {
|
|
4009
4097
|
(async () => {
|
|
4010
4098
|
const init = () => {
|
|
4011
|
-
var _a2;
|
|
4099
|
+
var _a2, _b2;
|
|
4012
4100
|
(_a2 = navigator.serviceWorker.controller) == null ? void 0 : _a2.postMessage({ options: { ...this.options, url: this.url } });
|
|
4013
4101
|
this.token$.subscribe((token) => {
|
|
4014
4102
|
var _a3;
|
|
4015
4103
|
return (_a3 = navigator.serviceWorker.controller) == null ? void 0 : _a3.postMessage({ token });
|
|
4016
4104
|
});
|
|
4105
|
+
const assets = [
|
|
4106
|
+
location.pathname,
|
|
4107
|
+
...Array.from(document.querySelectorAll('script[src], link[rel="stylesheet"][href], link[rel="icon"][href], img[src]')).map((element) => element.getAttribute("src") || element.getAttribute("href") || ""),
|
|
4108
|
+
...performance.getEntriesByType("resource").filter((entry) => ["script", "link", "css", "img", "font"].includes(entry.initiatorType)).map((entry) => entry.name),
|
|
4109
|
+
...this.options.offlineAssets || []
|
|
4110
|
+
].filter(Boolean).map((value) => new URL(value, location.href).href);
|
|
4111
|
+
(_b2 = navigator.serviceWorker.controller) == null ? void 0 : _b2.postMessage({ offlineAssets: assets });
|
|
4017
4112
|
};
|
|
4018
4113
|
await navigator.serviceWorker.getRegistration(this.options.serviceWorker).then((reg) => reg ?? navigator.serviceWorker.register(this.options.serviceWorker, { scope: "/", type: "module" }));
|
|
4019
4114
|
navigator.serviceWorker.ready.then(() => {
|
|
@@ -4548,6 +4643,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4548
4643
|
async finishUnauthorizedLogout(preservePending = false) {
|
|
4549
4644
|
var _a;
|
|
4550
4645
|
if (this.options.manageSession === false) return;
|
|
4646
|
+
forgetOfflineLogin();
|
|
4551
4647
|
if (typeof localStorage != "undefined") {
|
|
4552
4648
|
localStorage.removeItem(this.localStorageKey);
|
|
4553
4649
|
localStorage.removeItem("datalynk-user");
|
|
@@ -4563,13 +4659,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4563
4659
|
await this.clearOfflineSessionCache(preservePending);
|
|
4564
4660
|
if (typeof caches != "undefined") {
|
|
4565
4661
|
try {
|
|
4566
|
-
await
|
|
4662
|
+
await caches.delete("api-settings");
|
|
4567
4663
|
} catch (error) {
|
|
4568
4664
|
console.error("Unable to clear Datalynk service worker cache", error);
|
|
4569
4665
|
}
|
|
4570
4666
|
}
|
|
4571
4667
|
if (typeof navigator != "undefined" && ((_a = navigator.serviceWorker) == null ? void 0 : _a.controller)) {
|
|
4572
|
-
navigator.serviceWorker.controller.postMessage({ token: null
|
|
4668
|
+
navigator.serviceWorker.controller.postMessage({ token: null });
|
|
4573
4669
|
}
|
|
4574
4670
|
if (typeof location != "undefined" && typeof location.reload == "function")
|
|
4575
4671
|
location.reload();
|
package/dist/index.mjs
CHANGED
|
@@ -1532,13 +1532,81 @@ __publicField(_LoginPrompt, "template", (options) => {
|
|
|
1532
1532
|
`;
|
|
1533
1533
|
});
|
|
1534
1534
|
let LoginPrompt = _LoginPrompt;
|
|
1535
|
+
const KEY = "datalynk-offline-login";
|
|
1536
|
+
const ITERATIONS = 31e4;
|
|
1537
|
+
async function hash(password, salt) {
|
|
1538
|
+
const key = await crypto.subtle.importKey("raw", new TextEncoder().encode(password), "PBKDF2", false, ["deriveBits"]);
|
|
1539
|
+
return Array.from(new Uint8Array(await crypto.subtle.deriveBits(
|
|
1540
|
+
{ name: "PBKDF2", salt: new Uint8Array(salt), iterations: ITERATIONS, hash: "SHA-256" },
|
|
1541
|
+
key,
|
|
1542
|
+
256
|
|
1543
|
+
)));
|
|
1544
|
+
}
|
|
1545
|
+
async function rememberOfflineLogin(realm, login, uid, password) {
|
|
1546
|
+
const salt = crypto.getRandomValues(new Uint8Array(16));
|
|
1547
|
+
const record = { realm, login: login.trim().toLowerCase(), uid, salt: Array.from(salt), hash: await hash(password, salt) };
|
|
1548
|
+
localStorage.setItem(KEY, JSON.stringify(record));
|
|
1549
|
+
}
|
|
1550
|
+
async function verifyOfflineLogin(realm, login, uid, password) {
|
|
1551
|
+
const saved = localStorage.getItem(KEY);
|
|
1552
|
+
if (!saved) return false;
|
|
1553
|
+
let record;
|
|
1554
|
+
try {
|
|
1555
|
+
record = JSON.parse(saved);
|
|
1556
|
+
} catch {
|
|
1557
|
+
return false;
|
|
1558
|
+
}
|
|
1559
|
+
if (record.realm !== realm || record.login !== login.trim().toLowerCase() || record.uid !== uid || !Array.isArray(record.salt) || !Array.isArray(record.hash)) return false;
|
|
1560
|
+
const candidate = await hash(password, new Uint8Array(record.salt));
|
|
1561
|
+
if (candidate.length !== record.hash.length) return false;
|
|
1562
|
+
let difference = 0;
|
|
1563
|
+
for (let i = 0; i < candidate.length; i++) difference |= candidate[i] ^ record.hash[i];
|
|
1564
|
+
return difference === 0;
|
|
1565
|
+
}
|
|
1566
|
+
function hasOfflineLogin(realm, uid) {
|
|
1567
|
+
try {
|
|
1568
|
+
const record = JSON.parse(localStorage.getItem(KEY) || "null");
|
|
1569
|
+
return (record == null ? void 0 : record.realm) === realm && (record == null ? void 0 : record.uid) === uid;
|
|
1570
|
+
} catch {
|
|
1571
|
+
return false;
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
function forgetOfflineLogin() {
|
|
1575
|
+
localStorage.removeItem(KEY);
|
|
1576
|
+
}
|
|
1535
1577
|
class Auth {
|
|
1536
1578
|
constructor(api) {
|
|
1537
1579
|
__publicField(this, "onlinePrompt");
|
|
1580
|
+
__publicField(this, "offlineUnlocked", false);
|
|
1581
|
+
__publicField(this, "wasOffline", false);
|
|
1538
1582
|
/** Current user as an observable */
|
|
1539
1583
|
__publicField(this, "user$", new BehaviorSubject(void 0));
|
|
1540
1584
|
var _a;
|
|
1541
1585
|
this.api = api;
|
|
1586
|
+
this.api.status$.subscribe(async (status) => {
|
|
1587
|
+
if (status === "offline" || status === "unavailable") this.wasOffline = true;
|
|
1588
|
+
if (status !== "online" || !this.wasOffline) return;
|
|
1589
|
+
this.wasOffline = false;
|
|
1590
|
+
const wasUnlocked = this.offlineUnlocked;
|
|
1591
|
+
const previousUser = this.user;
|
|
1592
|
+
this.offlineUnlocked = false;
|
|
1593
|
+
this.user = void 0;
|
|
1594
|
+
try {
|
|
1595
|
+
const user = await this.current();
|
|
1596
|
+
const identity2 = this.api.jwtPayload;
|
|
1597
|
+
if (!user || user.guest || !identity2 || !hasOfflineLogin(identity2.realm, identity2.uid))
|
|
1598
|
+
forgetOfflineLogin();
|
|
1599
|
+
this.user = user;
|
|
1600
|
+
} catch (error) {
|
|
1601
|
+
if (this.api.status === "unauthorized") forgetOfflineLogin();
|
|
1602
|
+
else {
|
|
1603
|
+
this.wasOffline = true;
|
|
1604
|
+
this.offlineUnlocked = wasUnlocked;
|
|
1605
|
+
this.user = previousUser;
|
|
1606
|
+
}
|
|
1607
|
+
console.error("Unable to recheck the Datalynk user", error);
|
|
1608
|
+
}
|
|
1609
|
+
});
|
|
1542
1610
|
this.api.token$.subscribe(async (token) => {
|
|
1543
1611
|
if (token === void 0) return;
|
|
1544
1612
|
try {
|
|
@@ -1550,8 +1618,9 @@ class Auth {
|
|
|
1550
1618
|
});
|
|
1551
1619
|
if ((_a = this.api.options.offline) == null ? void 0 : _a.length)
|
|
1552
1620
|
this.user$.pipe(filter((u) => u !== void 0)).subscribe((u) => {
|
|
1553
|
-
if (u == null)
|
|
1554
|
-
|
|
1621
|
+
if (u == null) {
|
|
1622
|
+
if (this.api.online) localStorage.removeItem("datalynk-user");
|
|
1623
|
+
} else localStorage.setItem("datalynk-user", JSON.stringify(u));
|
|
1555
1624
|
});
|
|
1556
1625
|
}
|
|
1557
1626
|
/** Current user */
|
|
@@ -1575,8 +1644,9 @@ class Auth {
|
|
|
1575
1644
|
var _a;
|
|
1576
1645
|
if (!token) return null;
|
|
1577
1646
|
else if (token == ((_a = this.user) == null ? void 0 : _a.token)) return this.user;
|
|
1578
|
-
else if (!this.api.online && typeof localStorage != "undefined" && localStorage.getItem("datalynk-user"))
|
|
1647
|
+
else if (!this.api.online && this.offlineUnlocked && typeof localStorage != "undefined" && localStorage.getItem("datalynk-user"))
|
|
1579
1648
|
return JSON.parse(localStorage.getItem("datalynk-user"));
|
|
1649
|
+
else if (!this.api.online) return null;
|
|
1580
1650
|
return this.api.request([{ "$/auth/current": {} }, { "$/env/me": {} }], { token }).then((resp) => resp[0] || resp[1] ? { ...resp[0], ...resp[1] } : null);
|
|
1581
1651
|
}
|
|
1582
1652
|
/**
|
|
@@ -1588,7 +1658,7 @@ class Auth {
|
|
|
1588
1658
|
* @return {Promise<void>} Login complete
|
|
1589
1659
|
*/
|
|
1590
1660
|
async handleLogin(spoke, options) {
|
|
1591
|
-
var _a, _b, _c;
|
|
1661
|
+
var _a, _b, _c, _d;
|
|
1592
1662
|
if (this.onlinePrompt) window.removeEventListener("online", this.onlinePrompt);
|
|
1593
1663
|
if ((_a = this.api.options.offline) == null ? void 0 : _a.length) window.removeEventListener("online", this.onlinePrompt = () => this.handleLogin(spoke, options));
|
|
1594
1664
|
const urlParams = new URLSearchParams(location.search);
|
|
@@ -1597,10 +1667,13 @@ class Auth {
|
|
|
1597
1667
|
this.api.token = urlToken;
|
|
1598
1668
|
urlParams.delete("datalynkToken");
|
|
1599
1669
|
location.href = location.pathname + (urlParams.toString() ? "?" + urlParams.toString() : "") + location.hash;
|
|
1600
|
-
} else if (
|
|
1670
|
+
} else if (!this.api.online && ((_b = this.api.options.offline) == null ? void 0 : _b.length) && !this.offlineUnlocked) {
|
|
1671
|
+
await this.loginPrompt(spoke, options).done;
|
|
1672
|
+
return;
|
|
1673
|
+
} else if (this.api.reauthenticationPending && !this.api.online && ((_c = this.api.jwtPayload) == null ? void 0 : _c.realm) == spoke) {
|
|
1601
1674
|
return;
|
|
1602
1675
|
} else if (this.api.token && !this.api.expired) {
|
|
1603
|
-
if (((
|
|
1676
|
+
if (((_d = this.api.jwtPayload) == null ? void 0 : _d.realm) != spoke) {
|
|
1604
1677
|
this.api.token = null;
|
|
1605
1678
|
location.reload();
|
|
1606
1679
|
}
|
|
@@ -1660,10 +1733,23 @@ class Auth {
|
|
|
1660
1733
|
* @param {twoFactor?: string, expire?: string} opts 2FA code & expire date (YYYY-MM-DD)
|
|
1661
1734
|
* @returns {Promise<User>} User account
|
|
1662
1735
|
*/
|
|
1663
|
-
login(spoke, login, password, opts) {
|
|
1736
|
+
async login(spoke, login, password, opts) {
|
|
1737
|
+
var _a, _b, _c;
|
|
1738
|
+
if (((_a = this.api.options.offline) == null ? void 0 : _a.length) && (!this.api.online || typeof navigator !== "undefined" && !navigator.onLine)) {
|
|
1739
|
+
const identity2 = this.api.jwtPayload;
|
|
1740
|
+
const saved = localStorage.getItem("datalynk-user");
|
|
1741
|
+
if (!identity2 || identity2.realm !== spoke || !saved || !await verifyOfflineLogin(spoke, login, identity2.uid, password.trim()))
|
|
1742
|
+
throw new Error("Offline login is not available for this account on this device.");
|
|
1743
|
+
const user = JSON.parse(saved);
|
|
1744
|
+
if (![user.login, user.email].some((value) => (value == null ? void 0 : value.toLowerCase()) === login.trim().toLowerCase()))
|
|
1745
|
+
throw new Error("Offline login is not available for this account on this device.");
|
|
1746
|
+
this.offlineUnlocked = true;
|
|
1747
|
+
this.user = user;
|
|
1748
|
+
return user;
|
|
1749
|
+
}
|
|
1664
1750
|
const date = /* @__PURE__ */ new Date();
|
|
1665
1751
|
date.setFullYear(date.getFullYear() + 1);
|
|
1666
|
-
|
|
1752
|
+
const resp = await fetch(`${this.api.url}login`, {
|
|
1667
1753
|
method: "POST",
|
|
1668
1754
|
headers: { "Content-Type": "application/json" },
|
|
1669
1755
|
body: JSON.stringify(clean({
|
|
@@ -1674,12 +1760,13 @@ class Auth {
|
|
|
1674
1760
|
expireAt: (opts == null ? void 0 : opts.expire) == null ? `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, "0")}-${date.getDate().toString().padStart(2, "0")}` : opts == null ? void 0 : opts.expire,
|
|
1675
1761
|
dateFormat: "ISO8601"
|
|
1676
1762
|
}))
|
|
1677
|
-
}).then(async (resp) => {
|
|
1678
|
-
const data = await resp.json().catch(() => ({}));
|
|
1679
|
-
if (!resp.ok || data["error"]) throw Object.assign(errorFromCode(resp.status, data.error) || {}, data);
|
|
1680
|
-
this.api.token = data["token"];
|
|
1681
|
-
return data;
|
|
1682
1763
|
});
|
|
1764
|
+
const data = await resp.json().catch(() => ({}));
|
|
1765
|
+
if (!resp.ok || data["error"]) throw Object.assign(errorFromCode(resp.status, data.error) || {}, data);
|
|
1766
|
+
this.api.token = data["token"];
|
|
1767
|
+
if (((_b = this.api.options.offline) == null ? void 0 : _b.length) && this.api.options.saveSession && ((_c = this.api.jwtPayload) == null ? void 0 : _c.uid) != null)
|
|
1768
|
+
await rememberOfflineLogin(spoke, login, this.api.jwtPayload.uid, password.trim());
|
|
1769
|
+
return data;
|
|
1683
1770
|
}
|
|
1684
1771
|
/**
|
|
1685
1772
|
* Login as guest user
|
|
@@ -1711,6 +1798,7 @@ class Auth {
|
|
|
1711
1798
|
*/
|
|
1712
1799
|
logout(reload = true) {
|
|
1713
1800
|
localStorage.removeItem("datalynk-user");
|
|
1801
|
+
forgetOfflineLogin();
|
|
1714
1802
|
return this.api.request({ "$/auth/logout": {} }).then((resp) => {
|
|
1715
1803
|
if (reload) location.reload();
|
|
1716
1804
|
this.api.token = null;
|
|
@@ -3318,7 +3406,7 @@ class Superuser {
|
|
|
3318
3406
|
} });
|
|
3319
3407
|
}
|
|
3320
3408
|
}
|
|
3321
|
-
const version = "1.6.
|
|
3409
|
+
const version = "1.6.1";
|
|
3322
3410
|
class WebRtc {
|
|
3323
3411
|
constructor(api) {
|
|
3324
3412
|
__publicField(this, "ice");
|
|
@@ -4004,12 +4092,19 @@ const _Api = class _Api {
|
|
|
4004
4092
|
if (this.options.serviceWorker && typeof navigator["serviceWorker"] != "undefined") {
|
|
4005
4093
|
(async () => {
|
|
4006
4094
|
const init = () => {
|
|
4007
|
-
var _a2;
|
|
4095
|
+
var _a2, _b2;
|
|
4008
4096
|
(_a2 = navigator.serviceWorker.controller) == null ? void 0 : _a2.postMessage({ options: { ...this.options, url: this.url } });
|
|
4009
4097
|
this.token$.subscribe((token) => {
|
|
4010
4098
|
var _a3;
|
|
4011
4099
|
return (_a3 = navigator.serviceWorker.controller) == null ? void 0 : _a3.postMessage({ token });
|
|
4012
4100
|
});
|
|
4101
|
+
const assets = [
|
|
4102
|
+
location.pathname,
|
|
4103
|
+
...Array.from(document.querySelectorAll('script[src], link[rel="stylesheet"][href], link[rel="icon"][href], img[src]')).map((element) => element.getAttribute("src") || element.getAttribute("href") || ""),
|
|
4104
|
+
...performance.getEntriesByType("resource").filter((entry) => ["script", "link", "css", "img", "font"].includes(entry.initiatorType)).map((entry) => entry.name),
|
|
4105
|
+
...this.options.offlineAssets || []
|
|
4106
|
+
].filter(Boolean).map((value) => new URL(value, location.href).href);
|
|
4107
|
+
(_b2 = navigator.serviceWorker.controller) == null ? void 0 : _b2.postMessage({ offlineAssets: assets });
|
|
4013
4108
|
};
|
|
4014
4109
|
await navigator.serviceWorker.getRegistration(this.options.serviceWorker).then((reg) => reg ?? navigator.serviceWorker.register(this.options.serviceWorker, { scope: "/", type: "module" }));
|
|
4015
4110
|
navigator.serviceWorker.ready.then(() => {
|
|
@@ -4544,6 +4639,7 @@ const _Api = class _Api {
|
|
|
4544
4639
|
async finishUnauthorizedLogout(preservePending = false) {
|
|
4545
4640
|
var _a;
|
|
4546
4641
|
if (this.options.manageSession === false) return;
|
|
4642
|
+
forgetOfflineLogin();
|
|
4547
4643
|
if (typeof localStorage != "undefined") {
|
|
4548
4644
|
localStorage.removeItem(this.localStorageKey);
|
|
4549
4645
|
localStorage.removeItem("datalynk-user");
|
|
@@ -4559,13 +4655,13 @@ const _Api = class _Api {
|
|
|
4559
4655
|
await this.clearOfflineSessionCache(preservePending);
|
|
4560
4656
|
if (typeof caches != "undefined") {
|
|
4561
4657
|
try {
|
|
4562
|
-
await
|
|
4658
|
+
await caches.delete("api-settings");
|
|
4563
4659
|
} catch (error) {
|
|
4564
4660
|
console.error("Unable to clear Datalynk service worker cache", error);
|
|
4565
4661
|
}
|
|
4566
4662
|
}
|
|
4567
4663
|
if (typeof navigator != "undefined" && ((_a = navigator.serviceWorker) == null ? void 0 : _a.controller)) {
|
|
4568
|
-
navigator.serviceWorker.controller.postMessage({ token: null
|
|
4664
|
+
navigator.serviceWorker.controller.postMessage({ token: null });
|
|
4569
4665
|
}
|
|
4570
4666
|
if (typeof location != "undefined" && typeof location.reload == "function")
|
|
4571
4667
|
location.reload();
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function rememberOfflineLogin(realm: string, login: string, uid: number, password: string): Promise<void>;
|
|
2
|
+
export declare function verifyOfflineLogin(realm: string, login: string, uid: number, password: string): Promise<boolean>;
|
|
3
|
+
export declare function hasOfflineLogin(realm: string, uid: number): boolean;
|
|
4
|
+
export declare function forgetOfflineLogin(): void;
|
|
5
|
+
//# sourceMappingURL=offline-auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"offline-auth.d.ts","sourceRoot":"","sources":["../src/offline-auth.ts"],"names":[],"mappings":"AAYA,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIrH;AAED,wBAAsB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAYtH;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAKnE;AAED,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC"}
|
package/dist/service.worker.mjs
CHANGED
|
@@ -2,8 +2,80 @@ import {Api} from 'https://datalynk-client.primary.auxilium.world/dist/index.mjs
|
|
|
2
2
|
|
|
3
3
|
let api = null;
|
|
4
4
|
const CACHE_NAME = 'datalynk';
|
|
5
|
+
const STATE_CACHE = 'datalynk-app-state';
|
|
5
6
|
let ONLINE = true;
|
|
6
7
|
const netChan = 'BroadcastChannel' in self ? new BroadcastChannel('sw-net') : null;
|
|
8
|
+
let updateQueue = Promise.resolve();
|
|
9
|
+
|
|
10
|
+
function safeAsset(url) {
|
|
11
|
+
return ['http:', 'https:'].includes(url.protocol)
|
|
12
|
+
&& !/\/(api|login|logout|settings)(\/|$)/i.test(url.pathname)
|
|
13
|
+
&& ![...url.searchParams.keys()].some(key => /token|auth|secret|key|session|password/i.test(key));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async function activeCacheName() {
|
|
17
|
+
const state = await caches.open(STATE_CACHE);
|
|
18
|
+
const response = await state.match(self.location.origin + '/datalynk-app-active');
|
|
19
|
+
return response ? response.text() : CACHE_NAME;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async function activeCache() {
|
|
23
|
+
return caches.open(await activeCacheName());
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function updateAppAssets(values) {
|
|
27
|
+
updateQueue = updateQueue.catch(() => {}).then(async () => {
|
|
28
|
+
const urls = [...new Set(values.map(value => {
|
|
29
|
+
try {
|
|
30
|
+
const url = new URL(value, self.location.origin);
|
|
31
|
+
url.hash = '';
|
|
32
|
+
return safeAsset(url) && (url.origin === self.location.origin
|
|
33
|
+
|| !/\.(?:png|jpe?g|gif|webp|svg)(?:$|\?)/i.test(url.href)) ? url.href : null;
|
|
34
|
+
} catch { return null; }
|
|
35
|
+
}).filter(Boolean))];
|
|
36
|
+
if(!urls.length) return;
|
|
37
|
+
const previousName = await activeCacheName();
|
|
38
|
+
const nextName = 'datalynk-app-' + Date.now() + '-' + Math.random().toString(36).slice(2);
|
|
39
|
+
const previous = await caches.open(previousName);
|
|
40
|
+
const next = await caches.open(nextName);
|
|
41
|
+
try {
|
|
42
|
+
for(const request of await previous.keys()) {
|
|
43
|
+
if(new URL(request.url).pathname === new URL(urls[0]).pathname
|
|
44
|
+
&& new URL(request.url).origin === new URL(urls[0]).origin) continue;
|
|
45
|
+
const saved = await previous.match(request);
|
|
46
|
+
if(saved && safeAsset(new URL(request.url))) await next.put(request, saved);
|
|
47
|
+
}
|
|
48
|
+
for(const url of urls) {
|
|
49
|
+
const response = await fetch(url, {mode: new URL(url).origin === self.location.origin ? 'same-origin' : 'no-cors'});
|
|
50
|
+
if((!response.ok && response.type !== 'opaque') || response.headers.has('set-cookie')
|
|
51
|
+
|| /private|no-store/i.test(response.headers.get('cache-control') || '')
|
|
52
|
+
|| (/\.json$/i.test(new URL(url).pathname) && !/\bpublic\b/i.test(response.headers.get('cache-control') || ''))
|
|
53
|
+
|| (/\.(?:m?js|css)(?:$|\?)/i.test(url) && /text\/html/i.test(response.headers.get('content-type') || '')))
|
|
54
|
+
throw new Error('Offline app update incomplete: ' + url);
|
|
55
|
+
if(response.type === 'opaque' && await previous.match(url)) continue;
|
|
56
|
+
await next.put(url, response);
|
|
57
|
+
}
|
|
58
|
+
for(const request of await previous.keys()) {
|
|
59
|
+
if(new URL(request.url).pathname === new URL(urls[0]).pathname
|
|
60
|
+
&& new URL(request.url).origin === new URL(urls[0]).origin) continue;
|
|
61
|
+
if(await next.match(request)) continue;
|
|
62
|
+
const saved = await previous.match(request);
|
|
63
|
+
if(saved && safeAsset(new URL(request.url))) await next.put(request, saved);
|
|
64
|
+
}
|
|
65
|
+
const state = await caches.open(STATE_CACHE);
|
|
66
|
+
await state.put(self.location.origin + '/datalynk-app-active', new Response(nextName));
|
|
67
|
+
} catch(error) {
|
|
68
|
+
await caches.delete(nextName);
|
|
69
|
+
console.warn(error);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if(previousName !== nextName) {
|
|
73
|
+
try { await caches.delete(previousName); }
|
|
74
|
+
catch(error) { console.warn('Unable to remove previous app cache', error); }
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
return updateQueue;
|
|
78
|
+
}
|
|
7
79
|
|
|
8
80
|
function broadcastStatus(online) {
|
|
9
81
|
if(ONLINE === online) return;
|
|
@@ -40,7 +112,17 @@ self.addEventListener('activate', (event) => {
|
|
|
40
112
|
event.waitUntil((async () => {
|
|
41
113
|
await self.clients.claim();
|
|
42
114
|
|
|
115
|
+
const appCache = await activeCache();
|
|
116
|
+
for(const request of await appCache.keys())
|
|
117
|
+
if(!safeAsset(new URL(request.url))
|
|
118
|
+
|| (/\.json$/i.test(new URL(request.url).pathname)
|
|
119
|
+
&& !/\bpublic\b/i.test((await appCache.match(request))?.headers.get('cache-control') || '')))
|
|
120
|
+
await appCache.delete(request);
|
|
121
|
+
|
|
43
122
|
const keys = await caches.keys();
|
|
123
|
+
const activeName = await activeCacheName();
|
|
124
|
+
await Promise.all(keys.filter(k => k.startsWith('datalynk-app-')
|
|
125
|
+
&& k !== STATE_CACHE && k !== activeName).map(k => caches.delete(k)));
|
|
44
126
|
await Promise.all(
|
|
45
127
|
keys.filter((k) => k.startsWith('app-cache-') && k !== CACHE_NAME)
|
|
46
128
|
.map((k) => caches.delete(k))
|
|
@@ -76,32 +158,45 @@ self.addEventListener('fetch', (event) => {
|
|
|
76
158
|
}
|
|
77
159
|
|
|
78
160
|
event.respondWith((async () => {
|
|
79
|
-
const cache = await
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
161
|
+
const cache = await activeCache();
|
|
162
|
+
const url = new URL(request.url);
|
|
163
|
+
const appFile = request.mode === 'navigate' || ['script', 'style', 'image', 'font', 'worker'].includes(request.destination);
|
|
164
|
+
const staticJson = url.origin === self.location.origin && /\.json$/i.test(url.pathname) && !request.destination;
|
|
165
|
+
const cacheable = (appFile || staticJson) && safeAsset(url) && !request.headers.has('authorization')
|
|
166
|
+
&& !request.headers.has('range') && (url.origin === self.location.origin || request.destination !== 'image');
|
|
85
167
|
try {
|
|
86
168
|
const networkResponse = await fetch(request);
|
|
87
169
|
broadcastStatus(true);
|
|
88
|
-
if(networkResponse.status === 404)
|
|
89
|
-
await
|
|
90
|
-
return
|
|
170
|
+
if((networkResponse.status === 404 || networkResponse.status >= 500) && cacheable) {
|
|
171
|
+
const cached = await (await activeCache()).match(request, {ignoreSearch: request.mode === 'navigate'});
|
|
172
|
+
if(cached) { broadcastStatus(false); return cached; }
|
|
91
173
|
}
|
|
92
174
|
const isCacheable = networkResponse.ok || networkResponse.type === 'opaque';
|
|
93
|
-
|
|
175
|
+
const saved = cacheable && await cache.match(request, {ignoreSearch: request.mode === 'navigate'});
|
|
176
|
+
if(isCacheable && cacheable && (networkResponse.ok || !saved)
|
|
177
|
+
&& (!staticJson || /\bpublic\b/i.test(networkResponse.headers.get('cache-control') || ''))
|
|
178
|
+
&& !networkResponse.headers.has('set-cookie')
|
|
179
|
+
&& !/private|no-store/i.test(networkResponse.headers.get('cache-control') || '')
|
|
180
|
+
&& !(/\.(?:m?js|css)(?:$|\?)/i.test(url.href) && /text\/html/i.test(networkResponse.headers.get('content-type') || ''))) {
|
|
94
181
|
const isOpaqueNav = networkResponse.type === 'opaque' && request.mode === 'navigate';
|
|
95
182
|
if (!isOpaqueNav) {
|
|
96
|
-
event.waitUntil(
|
|
183
|
+
event.waitUntil((async () => {
|
|
184
|
+
const current = await activeCache();
|
|
185
|
+
const key = request.mode === 'navigate' ? url.origin + url.pathname : request;
|
|
186
|
+
await current.put(key, networkResponse.clone());
|
|
187
|
+
if(request.mode === 'navigate')
|
|
188
|
+
for(const old of await current.keys())
|
|
189
|
+
if(old.url !== key && new URL(old.url).origin === url.origin && new URL(old.url).pathname === url.pathname)
|
|
190
|
+
await current.delete(old);
|
|
191
|
+
})());
|
|
97
192
|
}
|
|
98
193
|
}
|
|
99
194
|
return networkResponse;
|
|
100
195
|
} catch {
|
|
101
196
|
broadcastStatus(false);
|
|
102
|
-
const cached = await
|
|
197
|
+
const cached = cacheable && await (await activeCache()).match(request, {ignoreSearch: request.mode === 'navigate'});
|
|
103
198
|
if(cached) return cached;
|
|
104
|
-
if(request.mode === 'navigate') {
|
|
199
|
+
if(cacheable && request.mode === 'navigate') {
|
|
105
200
|
const fallback = (await cache.match('/')) || (await cache.match('/index.html'));
|
|
106
201
|
if(fallback) return fallback;
|
|
107
202
|
}
|
|
@@ -116,6 +211,9 @@ self.addEventListener('fetch', (event) => {
|
|
|
116
211
|
});
|
|
117
212
|
|
|
118
213
|
self.addEventListener('message', async (event) => {
|
|
214
|
+
if(Array.isArray(event.data?.offlineAssets)) {
|
|
215
|
+
event.waitUntil(updateAppAssets(event.data.offlineAssets));
|
|
216
|
+
}
|
|
119
217
|
if(event.data?.options) { // ๐ง Update settings
|
|
120
218
|
api = new Api(event.data.options.url, { ...event.data.options, serviceWorker: false, replayOfflineQueue: false });
|
|
121
219
|
await setSettings(event.data.options);
|
|
@@ -128,6 +226,7 @@ self.addEventListener('message', async (event) => {
|
|
|
128
226
|
await setSettings({token});
|
|
129
227
|
}
|
|
130
228
|
if(event.data?.clearCache) { // ๐งน Clear cache
|
|
131
|
-
await caches.delete(
|
|
229
|
+
await caches.delete(await activeCacheName());
|
|
230
|
+
await caches.delete(STATE_CACHE);
|
|
132
231
|
}
|
|
133
232
|
});
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@auxilium/datalynk-client",
|
|
3
3
|
"description": "Datalynk client library",
|
|
4
4
|
"repository": "https://gitlab.auxiliumgroup.com/auxilium/datalynk/datalynk-client",
|
|
5
|
-
"version": "1.6.
|
|
5
|
+
"version": "1.6.1",
|
|
6
6
|
"author": "Auxilium Group <devops@auxiliumgroup.com>",
|
|
7
7
|
"private": false,
|
|
8
8
|
"main": "./dist/index.cjs",
|