@overlayed/app 0.2.1 → 0.2.2
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/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -344,14 +344,12 @@ class it extends C {
|
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
|
-
const be = k(it)
|
|
348
|
-
|
|
349
|
-
};
|
|
350
|
-
function at() {
|
|
347
|
+
const be = k(it);
|
|
348
|
+
function ot() {
|
|
351
349
|
return p.normalize(F);
|
|
352
350
|
}
|
|
353
|
-
var I = "object", Ee = "function", we = "prototype", q = "text", re = "json", le = "abort", J = "paramsSerializer", ue = "addEventListener", O = "status", v = "headers", W = Object, _ = void 0, N = null, Q = W[we], j = W.keys, M = Array.isArray, he = "method", _e = "HEAD", Y = "GET", ke = "OPTIONS",
|
|
354
|
-
function
|
|
351
|
+
var I = "object", Ee = "function", we = "prototype", q = "text", re = "json", le = "abort", J = "paramsSerializer", ue = "addEventListener", O = "status", v = "headers", W = Object, _ = void 0, N = null, Q = W[we], j = W.keys, M = Array.isArray, he = "method", _e = "HEAD", Y = "GET", ke = "OPTIONS", at = "POST", ct = "PUT", lt = "PATCH", ut = "DELETE";
|
|
352
|
+
function ht(r, t) {
|
|
355
353
|
let e = new AbortController();
|
|
356
354
|
function n(a) {
|
|
357
355
|
e.abort(a), i();
|
|
@@ -421,25 +419,25 @@ function Z(r) {
|
|
|
421
419
|
e === _ ? delete r[t] : Z(e);
|
|
422
420
|
}), r);
|
|
423
421
|
}
|
|
424
|
-
function
|
|
422
|
+
function dt(r) {
|
|
425
423
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(r);
|
|
426
424
|
}
|
|
427
|
-
function
|
|
425
|
+
function gt(r, t) {
|
|
428
426
|
return r ? t ? (r.endsWith("/") ? r : r + "/") + (t[0] === "/" ? t.slice(1) : t) : r : t || "";
|
|
429
427
|
}
|
|
430
|
-
var
|
|
428
|
+
var ft = "XiorError", pt = "XiorTimeoutError", Pe = class extends Error {
|
|
431
429
|
constructor(r, t, e) {
|
|
432
|
-
super(r), this.name =
|
|
430
|
+
super(r), this.name = ft, this.request = t, this.config = t, this.response = e;
|
|
433
431
|
}
|
|
434
|
-
},
|
|
432
|
+
}, yt = class extends Pe {
|
|
435
433
|
constructor(t, e, n) {
|
|
436
|
-
super(t, e, n), this.name =
|
|
434
|
+
super(t, e, n), this.name = pt;
|
|
437
435
|
}
|
|
438
|
-
},
|
|
436
|
+
}, mt = Object.defineProperty, vt = Object.defineProperties, bt = Object.getOwnPropertyDescriptors, U = Object.getOwnPropertySymbols, Ie = Object.prototype.hasOwnProperty, Ce = Object.prototype.propertyIsEnumerable, fe = (r, t, e) => t in r ? mt(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, A = (r, t) => {
|
|
439
437
|
for (var e in t || (t = {})) Ie.call(t, e) && fe(r, e, t[e]);
|
|
440
438
|
if (U) for (var e of U(t)) Ce.call(t, e) && fe(r, e, t[e]);
|
|
441
439
|
return r;
|
|
442
|
-
}, $ = (r, t) =>
|
|
440
|
+
}, $ = (r, t) => vt(r, bt(t)), Et = (r, t) => {
|
|
443
441
|
var e = {};
|
|
444
442
|
for (var n in r) Ie.call(r, n) && t.indexOf(n) < 0 && (e[n] = r[n]);
|
|
445
443
|
if (r != null && U) for (var n of U(r)) t.indexOf(n) < 0 && Ce.call(r, n) && (e[n] = r[n]);
|
|
@@ -459,21 +457,21 @@ var pt = "XiorError", yt = "XiorTimeoutError", Pe = class extends Error {
|
|
|
459
457
|
}
|
|
460
458
|
}, a = (c) => c.done ? n(c.value) : Promise.resolve(c.value).then(i, o);
|
|
461
459
|
a((e = e.apply(r, t)).next());
|
|
462
|
-
}), ie = "application/", Se = `${ie}x-www-form-urlencoded`, Re = RegExp,
|
|
463
|
-
function
|
|
460
|
+
}), ie = "application/", Se = `${ie}x-www-form-urlencoded`, Re = RegExp, wt = new Re(`^${Se}`, "i"), _t = `${ie}${re}`, kt = new Re(`^${ie}.*${re}.*`, "i");
|
|
461
|
+
function Pt(r = Y) {
|
|
464
462
|
return [_e, Y, ke].includes(r);
|
|
465
463
|
}
|
|
466
|
-
var
|
|
467
|
-
function
|
|
464
|
+
var It = typeof URLSearchParams != `${_}`;
|
|
465
|
+
function Ct(r) {
|
|
468
466
|
return T(this, null, function* () {
|
|
469
|
-
let t = r[J] || se, e = r.encodeURI !== !1, n = r[he] && r[he].toUpperCase(), s = r.url, i = s, o =
|
|
467
|
+
let t = r[J] || se, e = r.encodeURI !== !1, n = r[he] && r[he].toUpperCase(), s = r.url, i = s, o = It && r.data instanceof URLSearchParams, a = o ? W.fromEntries(r.data.entries()) : r.data, c = a, d = r != null && r[v] ? A({}, r[v]) : {}, h = r.params, g = Pt(n);
|
|
470
468
|
if (a && typeof a.append !== Ee) {
|
|
471
469
|
let u = "", y = "content-type";
|
|
472
470
|
if (r != null && r[v]) {
|
|
473
471
|
let f = j(r[v]).find((E) => E.toLowerCase() === y);
|
|
474
472
|
f && (y = f, u = r[v][f]);
|
|
475
473
|
}
|
|
476
|
-
(!u || o) && (u = g || o ? Se :
|
|
474
|
+
(!u || o) && (u = g || o ? Se : _t, d[y] = u), typeof a === I && (g && h && (h = ne(a, h)), kt.test(u) ? c = JSON.stringify(Z(a)) : !g && wt.test(u) && (c = t(a)));
|
|
477
475
|
}
|
|
478
476
|
if (h && j(h).length > 0) {
|
|
479
477
|
let u = t(h, e);
|
|
@@ -482,8 +480,8 @@ function St(r) {
|
|
|
482
480
|
return $(A({}, r), { _data: c, _url: s, data: a, url: i, method: n, [v]: d, isGet: g });
|
|
483
481
|
});
|
|
484
482
|
}
|
|
485
|
-
var
|
|
486
|
-
function
|
|
483
|
+
var St = typeof AbortController != `${_}`;
|
|
484
|
+
function Rt(r, t) {
|
|
487
485
|
return T(this, null, function* () {
|
|
488
486
|
let e;
|
|
489
487
|
if (!t || !r.ok || [q, re].includes(t)) {
|
|
@@ -498,7 +496,7 @@ function Mt(r, t) {
|
|
|
498
496
|
return e;
|
|
499
497
|
});
|
|
500
498
|
}
|
|
501
|
-
var
|
|
499
|
+
var Mt = (r) => new P(r), P = class {
|
|
502
500
|
constructor(t) {
|
|
503
501
|
this.REQI = [], this.RESI = [], this.P = [], this.config = t, this.defaults = { params: {}, [v]: {} };
|
|
504
502
|
}
|
|
@@ -541,21 +539,21 @@ var At = (r) => new P(r), P = class {
|
|
|
541
539
|
}
|
|
542
540
|
_(t) {
|
|
543
541
|
return T(this, null, function* () {
|
|
544
|
-
let e = yield
|
|
542
|
+
let e = yield Ct(t), { url: n, method: s, headers: i, timeout: o, signal: a, data: c, _data: d, _url: h, isGet: g, fetch: u } = e, y = Et(e, ["url", "method", "headers", "timeout", "signal", "data", "_data", "_url", "isGet", "fetch"]);
|
|
545
543
|
t._url = h;
|
|
546
544
|
let f, E = [], x = _;
|
|
547
|
-
if (o &&
|
|
545
|
+
if (o && St) {
|
|
548
546
|
let m = new AbortController();
|
|
549
547
|
x = setTimeout(() => {
|
|
550
|
-
m.abort(new
|
|
548
|
+
m.abort(new yt(`timeout of ${o}ms exceeded`, t));
|
|
551
549
|
}, o), E.push(m.signal);
|
|
552
550
|
}
|
|
553
|
-
a && E.push(a), f = E[0], E.length > 1 && (f =
|
|
551
|
+
a && E.push(a), f = E[0], E.length > 1 && (f = ht(E, () => {
|
|
554
552
|
clearTimeout(x);
|
|
555
553
|
}));
|
|
556
554
|
let K = h || n, ae = "baseURL";
|
|
557
|
-
return t[ae] && !
|
|
558
|
-
let { responseType: Te } = t, ce = { data: yield
|
|
555
|
+
return t[ae] && !dt(K) && (K = gt(t[ae], K)), (u || fetch)(K, $(A({ body: g ? _ : d }, y), { signal: f, method: s, headers: i })).then((m) => T(this, null, function* () {
|
|
556
|
+
let { responseType: Te } = t, ce = { data: yield Rt(m, Te), response: m, config: t, request: t, [O]: m[O], statusText: m.statusText, [v]: m[v] };
|
|
559
557
|
if (!m.ok) {
|
|
560
558
|
let De = new Pe(m[O] ? `Request failed with status code ${m[O]}` : "Network error", t, ce);
|
|
561
559
|
return Promise.reject(De);
|
|
@@ -580,64 +578,67 @@ var At = (r) => new P(r), P = class {
|
|
|
580
578
|
return this.cG(_e)(t, e);
|
|
581
579
|
}
|
|
582
580
|
post(t, e, n) {
|
|
583
|
-
return this.cP(
|
|
581
|
+
return this.cP(at)(t, e, n);
|
|
584
582
|
}
|
|
585
583
|
put(t, e, n) {
|
|
586
|
-
return this.cP(
|
|
584
|
+
return this.cP(ct)(t, e, n);
|
|
587
585
|
}
|
|
588
586
|
patch(t, e, n) {
|
|
589
|
-
return this.cP(
|
|
587
|
+
return this.cP(lt)(t, e, n);
|
|
590
588
|
}
|
|
591
589
|
delete(t, e) {
|
|
592
|
-
return this.cG(
|
|
590
|
+
return this.cG(ut)(t, e);
|
|
593
591
|
}
|
|
594
592
|
options(t, e) {
|
|
595
593
|
return this.cG(ke)(t, e);
|
|
596
594
|
}
|
|
597
595
|
};
|
|
598
|
-
P.create =
|
|
599
|
-
var
|
|
596
|
+
P.create = Mt, P.VERSION = "0.7.7";
|
|
597
|
+
var At = Object.assign(P.create(), { create: P.create, VERSION: P.VERSION }), Me = At;
|
|
600
598
|
const Ae = Me.create({
|
|
601
|
-
baseURL: "https://updater.
|
|
599
|
+
baseURL: "https://updater.stats.cc",
|
|
602
600
|
headers: {
|
|
603
601
|
Accept: "application/json",
|
|
604
602
|
"Accept-Encoding": "gzip, deflate, br"
|
|
605
603
|
}
|
|
606
604
|
}), oe = Me.create({
|
|
607
|
-
baseURL: "https://api.
|
|
605
|
+
baseURL: "https://api.stats.cc",
|
|
608
606
|
headers: {
|
|
609
607
|
Accept: "application/json",
|
|
610
608
|
"Accept-Encoding": "gzip, deflate, br"
|
|
611
609
|
}
|
|
612
610
|
});
|
|
613
|
-
function
|
|
611
|
+
function Tt(r, t) {
|
|
614
612
|
return Ae.get(`/v1/native/${r}/version.txt`, {
|
|
615
613
|
params: { channel: t },
|
|
616
614
|
responseType: "text"
|
|
617
615
|
});
|
|
618
616
|
}
|
|
619
|
-
function
|
|
617
|
+
function Dt(r, t) {
|
|
620
618
|
return Ae.get(`/v1/native/${r}/files`, {
|
|
621
619
|
params: { channel: t },
|
|
622
620
|
responseType: "arraybuffer"
|
|
623
621
|
});
|
|
624
622
|
}
|
|
625
|
-
function
|
|
623
|
+
function Ft() {
|
|
626
624
|
return oe.get("/v1/raven/config");
|
|
627
625
|
}
|
|
628
|
-
function
|
|
626
|
+
function xt(r, t) {
|
|
629
627
|
return oe.get(`/v1/raven/games/${r}/builds/${t}/check`);
|
|
630
628
|
}
|
|
631
|
-
function
|
|
629
|
+
function Kt(r, t) {
|
|
632
630
|
const e = new FormData();
|
|
633
631
|
return e.append("file", t), oe.post(`/v1/raven/games/${r}/builds/upload`, e, {});
|
|
634
632
|
}
|
|
635
|
-
function
|
|
633
|
+
function Lt(r) {
|
|
636
634
|
return r instanceof Error && (r.name === "XiorError" || r.name === "XiorTimeoutError");
|
|
637
635
|
}
|
|
638
|
-
function
|
|
636
|
+
function Ot(r) {
|
|
639
637
|
return !!(r && "kind" in r.data && "message" in r.data);
|
|
640
638
|
}
|
|
639
|
+
const $t = {
|
|
640
|
+
buildChannel: "alpha"
|
|
641
|
+
};
|
|
641
642
|
class Ht extends C {
|
|
642
643
|
constructor() {
|
|
643
644
|
super("NativeDllManager");
|
|
@@ -668,18 +669,18 @@ class Ht extends C {
|
|
|
668
669
|
return p.join(this.getTargetPath(e), n);
|
|
669
670
|
}
|
|
670
671
|
async checkForUpdates(e) {
|
|
671
|
-
const n =
|
|
672
|
+
const n = $t.buildChannel;
|
|
672
673
|
this.logger.log("Checking for updates");
|
|
673
674
|
for (const s of e)
|
|
674
675
|
try {
|
|
675
|
-
const { data: i } = await
|
|
676
|
+
const { data: i } = await Tt(s, n), o = await this.getCurrentVersion(s);
|
|
676
677
|
this.logger.log(`${s} > Update Check. current: ${o}, latest: ${i}`), i !== o ? (this.logger.log(`${s} > Update found: ${o} -> ${i}`), await this.downloadAndExtractDll(s, i, n), this.logger.log(`${s} > Downloaded and extracted`), await this.cleanupOldVersions(s, i), this.logger.log(`${s} > Cleaning up versions older than ${i}`), this.emit("dllUpdated", { identifier: s, version: i })) : this.logger.log(`${s} Up to date`);
|
|
677
678
|
} catch (i) {
|
|
678
679
|
this.logger.captureSentryException(`${s} > Error checking/updating`, i);
|
|
679
680
|
}
|
|
680
681
|
}
|
|
681
682
|
async downloadAndExtractDll(e, n, s) {
|
|
682
|
-
const { data: i } = await
|
|
683
|
+
const { data: i } = await Dt(e, s), o = this.getTargetPath(e), a = this.getTargetVersionPath(e, n);
|
|
683
684
|
await b.mkdir(a, { recursive: !0 });
|
|
684
685
|
const c = new me();
|
|
685
686
|
await c.loadAsync(i);
|
|
@@ -731,7 +732,7 @@ class Nt extends C {
|
|
|
731
732
|
}
|
|
732
733
|
async fetchRavenConfig() {
|
|
733
734
|
try {
|
|
734
|
-
const e = await
|
|
735
|
+
const e = await Ft();
|
|
735
736
|
this._ravenConfig = e.data, this.resetState();
|
|
736
737
|
const n = /* @__PURE__ */ new Set();
|
|
737
738
|
for (const s of this._ravenConfig.games) {
|
|
@@ -835,7 +836,7 @@ const ee = k(Vt);
|
|
|
835
836
|
class zt extends C {
|
|
836
837
|
constructor() {
|
|
837
838
|
super("GameLaunchManager");
|
|
838
|
-
l(this, "RENDER_INTERFACE_PATH", "
|
|
839
|
+
l(this, "RENDER_INTERFACE_PATH", "node_modules/@overlayed/app/dist/render-interface/build/overlayed_render_hook_x64.dll");
|
|
839
840
|
l(this, "boundOnProcessCreate", this.onProcessCreate.bind(this));
|
|
840
841
|
l(this, "boundOnProcessDestroy", this.onProcessDestroy.bind(this));
|
|
841
842
|
}
|
|
@@ -896,7 +897,7 @@ class zt extends C {
|
|
|
896
897
|
await Promise.allSettled(i), this.emit("gameLaunch", { ravenGame: n, process: e });
|
|
897
898
|
}
|
|
898
899
|
copyDll(e) {
|
|
899
|
-
this.logger.log(
|
|
900
|
+
this.logger.log(ot());
|
|
900
901
|
const n = e.split("/");
|
|
901
902
|
if (n.length < 2)
|
|
902
903
|
return this.logger.sentryError("Path is invalid", { dllPath: e }), !1;
|
|
@@ -962,7 +963,7 @@ class Wt extends st {
|
|
|
962
963
|
this.logger.log("Process Path", s.path), this.logger.log("Process Name", s.name), this.logger.log("Build Hash", o);
|
|
963
964
|
let a = !1;
|
|
964
965
|
try {
|
|
965
|
-
a = (await
|
|
966
|
+
a = (await xt(n.identifier, o)).data.upload;
|
|
966
967
|
} catch (h) {
|
|
967
968
|
this.logger.captureSentryException("Error checking game build hash", h);
|
|
968
969
|
return;
|
|
@@ -975,9 +976,9 @@ class Wt extends st {
|
|
|
975
976
|
c.file(s.name, i);
|
|
976
977
|
const d = await c.generateAsync({ type: "blob" });
|
|
977
978
|
try {
|
|
978
|
-
this.logger.log("Uploading build (size: ", d.size, " bytes)"), await
|
|
979
|
+
this.logger.log("Uploading build (size: ", d.size, " bytes)"), await Kt(n.identifier, d), this.logger.log("Build uploaded successfully");
|
|
979
980
|
} catch (h) {
|
|
980
|
-
|
|
981
|
+
Lt(h) ? Ot(h.response) ? this.logger.captureSentryException("Error uploading build hash, api error", h) : this.logger.captureSentryException("Error uploading build hash, request error", h) : this.logger.captureSentryException("Error uploading build hash, unknown error", h);
|
|
981
982
|
}
|
|
982
983
|
}
|
|
983
984
|
}
|
|
@@ -1379,10 +1380,6 @@ function tr(r) {
|
|
|
1379
1380
|
};
|
|
1380
1381
|
return t;
|
|
1381
1382
|
}
|
|
1382
|
-
function yr() {
|
|
1383
|
-
return "test";
|
|
1384
|
-
}
|
|
1385
1383
|
export {
|
|
1386
|
-
pr as overlayed
|
|
1387
|
-
yr as test
|
|
1384
|
+
pr as overlayed
|
|
1388
1385
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
|
|
3
3
|
const require = createRequire(import.meta.url);
|
|
4
|
-
export
|
|
4
|
+
export const { RenderInterface, renderHookPath } = require("./build/overlayed_render_interface_x64.node");
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@overlayed/app",
|
|
3
3
|
"author": "overlayed.gg",
|
|
4
4
|
"homepage": "https://overlayed.gg",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.2",
|
|
6
6
|
"description": "Overlayed app",
|
|
7
7
|
"license": "BSD-3-Clause",
|
|
8
8
|
"repository": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"vite-plugin-static-copy": "^2.3.1",
|
|
46
46
|
"vitest": "^3.0.9",
|
|
47
47
|
"@overlayed-gg/native-interface": "0.1.3",
|
|
48
|
-
"@overlayed-gg/render-interface": "0.1.
|
|
48
|
+
"@overlayed-gg/render-interface": "0.1.4",
|
|
49
49
|
"@overlayed/api": "0.0.1",
|
|
50
50
|
"@overlayed/cortex-client": "0.0.1",
|
|
51
51
|
"@overlayed/events": "0.0.1",
|