@ztimson/momentum 0.28.1 → 0.28.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/api.d.ts +5 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/index.cjs +52 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +52 -1
- package/dist/momentum.d.ts +2 -0
- package/dist/momentum.d.ts.map +1 -1
- package/dist/settings.d.ts +1 -1
- package/dist/settings.d.ts.map +1 -1
- package/dist/ui.d.ts +7 -0
- package/dist/ui.d.ts.map +1 -0
- package/package.json +2 -2
package/dist/api.d.ts
CHANGED
|
@@ -17,6 +17,11 @@ export declare class Api extends Http {
|
|
|
17
17
|
off: <K extends string | symbol = string>(event: K, listener: ApiEvents[K]) => void;
|
|
18
18
|
on: <K extends string | symbol = string>(event: K, listener: ApiEvents[K]) => () => void;
|
|
19
19
|
once: <K extends string | symbol = string>(event: K, listener?: ApiEvents[K] | undefined) => Promise<any>;
|
|
20
|
+
healthcheck(): PromiseProgress<{
|
|
21
|
+
database: boolean;
|
|
22
|
+
server: boolean;
|
|
23
|
+
version: string;
|
|
24
|
+
}>;
|
|
20
25
|
request<T>(options: HttpRequestOptions): PromiseProgress<T>;
|
|
21
26
|
}
|
|
22
27
|
//# sourceMappingURL=api.d.ts.map
|
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,EAEN,IAAI,EAAE,YAAY,EAClB,kBAAkB,EAClB,eAAe,EAEf,KAAK,WAAW,EAChB,MAAM,gBAAgB,CAAC;AAExB,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG;IACrC,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,kBAAkB,KAAK,GAAG,CAAC;IACrE,QA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AK,GAAG,CAAC;IAChE,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,GAAG,CAAA;CACpC,CAAA;AAED,qBAAa,GAAI,SAAQ,IAAI;aAYA,GAAG,EAAE,MAAM;aAAoC,IAAI,EAAE,YAAY;IAX7F,OAAO,CAAC,OAAO,CAAiC;IAEhD,OAAO,CAAC,MAAM,CAAuB;IACrC,IAAI,KAAK,IAAI,MAAM,GAAG,IAAI,CAAwB;IAClD,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAK7B;gBAE2B,GAAG,GAAE,MAAwB,EAAkB,IAAI,GAAE,YAAiB;IAKlG,IAAI,mFAAwC;IAC5C,GAAG,iFAAuC;IAC1C,EAAE,uFAAsC;IACxC,IAAI,sGAAwC;IAE5C,WAAW;kBACqB,OAAO;gBAAU,OAAO;iBAAW,MAAM;;IAGzE,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,kBAAkB,GAAG,eAAe,CAAC,CAAC,CAAC;CAa3D"}
|
package/dist/index.cjs
CHANGED
|
@@ -357,6 +357,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
357
357
|
this.headers["Authorization"] = token ? `Bearer ${token}` : void 0;
|
|
358
358
|
this.emit("TOKEN", token);
|
|
359
359
|
}
|
|
360
|
+
healthcheck() {
|
|
361
|
+
return this.request({ url: "/api/healthcheck" });
|
|
362
|
+
}
|
|
360
363
|
request(options) {
|
|
361
364
|
const req = super.request(options).then((resp) => {
|
|
362
365
|
this.emit("RESPONSE", resp, options);
|
|
@@ -1625,6 +1628,51 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1625
1628
|
});
|
|
1626
1629
|
}
|
|
1627
1630
|
}
|
|
1631
|
+
class UI {
|
|
1632
|
+
constructor(settings) {
|
|
1633
|
+
this.settings = settings;
|
|
1634
|
+
}
|
|
1635
|
+
async inject(reload = false) {
|
|
1636
|
+
if (!Object.keys(this.settings.cache).length || reload) await this.settings.list();
|
|
1637
|
+
window.document.body.classList.add(this.settings.cache.theme.darkMode ? "theme-dark" : "theme-light");
|
|
1638
|
+
window.document.body.classList.remove(this.settings.cache.theme.darkMode ? "theme-light" : "theme-dark");
|
|
1639
|
+
if (this.settings.cache.title)
|
|
1640
|
+
window.document.querySelectorAll(".momentum-title").forEach((el) => el.innerText = this.settings.cache.title);
|
|
1641
|
+
if (this.settings.cache.description)
|
|
1642
|
+
window.document.querySelectorAll(".momentum-description").forEach((el) => el.innerText = this.settings.cache.description);
|
|
1643
|
+
if (this.settings.cache.version)
|
|
1644
|
+
window.document.querySelectorAll(".momentum-version").forEach((el) => el.innerText = this.settings.cache.version);
|
|
1645
|
+
if (this.settings.cache.logo) {
|
|
1646
|
+
window.document.querySelectorAll(".momentum-logo").forEach((el) => {
|
|
1647
|
+
el.src = this.settings.cache.logo;
|
|
1648
|
+
el.href = this.settings.cache.logo;
|
|
1649
|
+
});
|
|
1650
|
+
}
|
|
1651
|
+
if (this.settings.cache.theme) {
|
|
1652
|
+
let style = window.document.querySelector("#momentum-theme");
|
|
1653
|
+
if (!style) {
|
|
1654
|
+
style = window.document.createElement("style");
|
|
1655
|
+
style.id = "momentum-theme";
|
|
1656
|
+
window.document.head.append(style);
|
|
1657
|
+
}
|
|
1658
|
+
style.innerHTML = `
|
|
1659
|
+
:root {
|
|
1660
|
+
--theme-bg-primary: ${this.settings.cache.theme.background};
|
|
1661
|
+
--theme-bg-secondary: ${this.settings.cache.theme.darkMode ? "#2e2e2e" : "#ffffff"};
|
|
1662
|
+
--theme-primary: ${this.settings.cache.theme.primary};
|
|
1663
|
+
--theme-secondary: ${this.settings.cache.theme.secondary};
|
|
1664
|
+
--theme-text: ${this.settings.cache.theme.darkMode ? "#ffffff" : "#000000"};
|
|
1665
|
+
--theme-muted: ${this.settings.cache.theme.darkMode ? "#cccccc" : "#6c757d"};
|
|
1666
|
+
}`;
|
|
1667
|
+
}
|
|
1668
|
+
if (this.settings.cache.pwa) {
|
|
1669
|
+
const link = window.document.createElement("link");
|
|
1670
|
+
link.setAttribute("rel", "manifest");
|
|
1671
|
+
link.setAttribute("href", this.settings.api.url + "/manifest.json");
|
|
1672
|
+
window.document.head.append(link);
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1628
1676
|
class Users extends P {
|
|
1629
1677
|
constructor(api) {
|
|
1630
1678
|
super();
|
|
@@ -1785,6 +1833,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1785
1833
|
__publicField(this, "socket");
|
|
1786
1834
|
__publicField(this, "static");
|
|
1787
1835
|
__publicField(this, "storage");
|
|
1836
|
+
__publicField(this, "ui");
|
|
1788
1837
|
__publicField(this, "users");
|
|
1789
1838
|
this.api = new Api(url, opts == null ? void 0 : opts.api);
|
|
1790
1839
|
this.actions = new Actions(this.api);
|
|
@@ -1799,10 +1848,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1799
1848
|
if (opts == null ? void 0 : opts.stripeSecret) this.payments = new Payments(this.api, opts.stripeSecret);
|
|
1800
1849
|
this.pdf = new Pdf(this.api);
|
|
1801
1850
|
this.settings = new Settings(this.api);
|
|
1851
|
+
if (opts == null ? void 0 : opts.socket) this.socket = new Socket(this.api);
|
|
1802
1852
|
this.static = new Static(this.api);
|
|
1803
1853
|
this.storage = new Storage(this.api);
|
|
1854
|
+
this.ui = new UI(this.settings);
|
|
1804
1855
|
this.users = new Users(this.api);
|
|
1805
|
-
if (opts == null ? void 0 : opts.socket) this.socket = new Socket(this.api);
|
|
1806
1856
|
this.api.on("*", (event, ...args) => this.emit(`API::${event}`, ...args));
|
|
1807
1857
|
this.actions.on("*", (event, ...args) => this.emit(`ACTIONS::${event}`, ...args));
|
|
1808
1858
|
this.auth.on("*", (event, ...args) => this.emit(`AUTH::${event}`, ...args));
|
|
@@ -1845,6 +1895,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1845
1895
|
exports2.Static = Static;
|
|
1846
1896
|
exports2.Storage = Storage;
|
|
1847
1897
|
exports2.Totp = Totp;
|
|
1898
|
+
exports2.UI = UI;
|
|
1848
1899
|
exports2.Users = Users;
|
|
1849
1900
|
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|
|
1850
1901
|
});
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC"}
|
package/dist/index.mjs
CHANGED
|
@@ -353,6 +353,9 @@ class Api extends M {
|
|
|
353
353
|
this.headers["Authorization"] = token ? `Bearer ${token}` : void 0;
|
|
354
354
|
this.emit("TOKEN", token);
|
|
355
355
|
}
|
|
356
|
+
healthcheck() {
|
|
357
|
+
return this.request({ url: "/api/healthcheck" });
|
|
358
|
+
}
|
|
356
359
|
request(options) {
|
|
357
360
|
const req = super.request(options).then((resp) => {
|
|
358
361
|
this.emit("RESPONSE", resp, options);
|
|
@@ -1621,6 +1624,51 @@ class Storage extends P {
|
|
|
1621
1624
|
});
|
|
1622
1625
|
}
|
|
1623
1626
|
}
|
|
1627
|
+
class UI {
|
|
1628
|
+
constructor(settings) {
|
|
1629
|
+
this.settings = settings;
|
|
1630
|
+
}
|
|
1631
|
+
async inject(reload = false) {
|
|
1632
|
+
if (!Object.keys(this.settings.cache).length || reload) await this.settings.list();
|
|
1633
|
+
window.document.body.classList.add(this.settings.cache.theme.darkMode ? "theme-dark" : "theme-light");
|
|
1634
|
+
window.document.body.classList.remove(this.settings.cache.theme.darkMode ? "theme-light" : "theme-dark");
|
|
1635
|
+
if (this.settings.cache.title)
|
|
1636
|
+
window.document.querySelectorAll(".momentum-title").forEach((el) => el.innerText = this.settings.cache.title);
|
|
1637
|
+
if (this.settings.cache.description)
|
|
1638
|
+
window.document.querySelectorAll(".momentum-description").forEach((el) => el.innerText = this.settings.cache.description);
|
|
1639
|
+
if (this.settings.cache.version)
|
|
1640
|
+
window.document.querySelectorAll(".momentum-version").forEach((el) => el.innerText = this.settings.cache.version);
|
|
1641
|
+
if (this.settings.cache.logo) {
|
|
1642
|
+
window.document.querySelectorAll(".momentum-logo").forEach((el) => {
|
|
1643
|
+
el.src = this.settings.cache.logo;
|
|
1644
|
+
el.href = this.settings.cache.logo;
|
|
1645
|
+
});
|
|
1646
|
+
}
|
|
1647
|
+
if (this.settings.cache.theme) {
|
|
1648
|
+
let style = window.document.querySelector("#momentum-theme");
|
|
1649
|
+
if (!style) {
|
|
1650
|
+
style = window.document.createElement("style");
|
|
1651
|
+
style.id = "momentum-theme";
|
|
1652
|
+
window.document.head.append(style);
|
|
1653
|
+
}
|
|
1654
|
+
style.innerHTML = `
|
|
1655
|
+
:root {
|
|
1656
|
+
--theme-bg-primary: ${this.settings.cache.theme.background};
|
|
1657
|
+
--theme-bg-secondary: ${this.settings.cache.theme.darkMode ? "#2e2e2e" : "#ffffff"};
|
|
1658
|
+
--theme-primary: ${this.settings.cache.theme.primary};
|
|
1659
|
+
--theme-secondary: ${this.settings.cache.theme.secondary};
|
|
1660
|
+
--theme-text: ${this.settings.cache.theme.darkMode ? "#ffffff" : "#000000"};
|
|
1661
|
+
--theme-muted: ${this.settings.cache.theme.darkMode ? "#cccccc" : "#6c757d"};
|
|
1662
|
+
}`;
|
|
1663
|
+
}
|
|
1664
|
+
if (this.settings.cache.pwa) {
|
|
1665
|
+
const link = window.document.createElement("link");
|
|
1666
|
+
link.setAttribute("rel", "manifest");
|
|
1667
|
+
link.setAttribute("href", this.settings.api.url + "/manifest.json");
|
|
1668
|
+
window.document.head.append(link);
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1624
1672
|
class Users extends P {
|
|
1625
1673
|
constructor(api) {
|
|
1626
1674
|
super();
|
|
@@ -1781,6 +1829,7 @@ class Momentum extends P {
|
|
|
1781
1829
|
__publicField(this, "socket");
|
|
1782
1830
|
__publicField(this, "static");
|
|
1783
1831
|
__publicField(this, "storage");
|
|
1832
|
+
__publicField(this, "ui");
|
|
1784
1833
|
__publicField(this, "users");
|
|
1785
1834
|
this.api = new Api(url, opts == null ? void 0 : opts.api);
|
|
1786
1835
|
this.actions = new Actions(this.api);
|
|
@@ -1795,10 +1844,11 @@ class Momentum extends P {
|
|
|
1795
1844
|
if (opts == null ? void 0 : opts.stripeSecret) this.payments = new Payments(this.api, opts.stripeSecret);
|
|
1796
1845
|
this.pdf = new Pdf(this.api);
|
|
1797
1846
|
this.settings = new Settings(this.api);
|
|
1847
|
+
if (opts == null ? void 0 : opts.socket) this.socket = new Socket(this.api);
|
|
1798
1848
|
this.static = new Static(this.api);
|
|
1799
1849
|
this.storage = new Storage(this.api);
|
|
1850
|
+
this.ui = new UI(this.settings);
|
|
1800
1851
|
this.users = new Users(this.api);
|
|
1801
|
-
if (opts == null ? void 0 : opts.socket) this.socket = new Socket(this.api);
|
|
1802
1852
|
this.api.on("*", (event, ...args) => this.emit(`API::${event}`, ...args));
|
|
1803
1853
|
this.actions.on("*", (event, ...args) => this.emit(`ACTIONS::${event}`, ...args));
|
|
1804
1854
|
this.auth.on("*", (event, ...args) => this.emit(`AUTH::${event}`, ...args));
|
|
@@ -1842,5 +1892,6 @@ export {
|
|
|
1842
1892
|
Static,
|
|
1843
1893
|
Storage,
|
|
1844
1894
|
Totp,
|
|
1895
|
+
UI,
|
|
1845
1896
|
Users
|
|
1846
1897
|
};
|
package/dist/momentum.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { Payments } from './payments';
|
|
|
10
10
|
import { Pdf, PdfEvents } from './pdf';
|
|
11
11
|
import { Socket } from './sockets';
|
|
12
12
|
import { Storage, StorageEvents } from './storage';
|
|
13
|
+
import { UI } from './ui';
|
|
13
14
|
import { Users } from './users';
|
|
14
15
|
import { Settings, SettingEvents } from './settings';
|
|
15
16
|
import { Static, StaticEvents } from './static';
|
|
@@ -34,6 +35,7 @@ export declare class Momentum extends TypedEmitter<MomentumEvents> {
|
|
|
34
35
|
socket?: Socket;
|
|
35
36
|
static: Static;
|
|
36
37
|
storage: Storage;
|
|
38
|
+
ui: UI;
|
|
37
39
|
users: Users;
|
|
38
40
|
constructor(url?: string, opts?: MomentumOptions);
|
|
39
41
|
}
|
package/dist/momentum.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"momentum.d.ts","sourceRoot":"","sources":["../src/momentum.ts"],"names":[],"mappings":"AAAA,OAAO,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,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,eAAe;CA2ChD"}
|
package/dist/settings.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export type SettingEvents = TypedEvents & {
|
|
|
23
23
|
UPDATE: (variable: Setting<any>) => any;
|
|
24
24
|
};
|
|
25
25
|
export declare class Settings extends TypedEmitter<SettingEvents> {
|
|
26
|
-
|
|
26
|
+
readonly api: Api;
|
|
27
27
|
$cache: BehaviorSubject<{
|
|
28
28
|
[key: string]: any;
|
|
29
29
|
}>;
|
package/dist/settings.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,YAAY,EAAE,KAAK,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAC,eAAe,EAAC,MAAM,MAAM,CAAC;AAErC,wBAAwB;AACxB,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI;IACxB,kBAAkB;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oBAAoB;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,qBAAqB;IACrB,KAAK,EAAE,CAAC,CAAC;IACT,qCAAqC;IACrC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG;IACzC,IAAI,EAAE,CAAC,SAAS,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,KAAK,GAAG,CAAC;IAC/C,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,GAAG,CAAC;IAC7B,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,KAAK,GAAG,CAAC;IAC7C,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C,IAAI,KAAK,CAAC,GAAG;;KAAA,EAA4B;gBAE7B,GAAG,EAAE,GAAG,GAAG,MAAM;IAK7B,IAAI,CAAC,QAAQ,UAAQ,GAAG,OAAO,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,CAAC;IAQrD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOlC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,UAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IAS7D,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;CAOrD"}
|
package/dist/ui.d.ts
ADDED
package/dist/ui.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEpC,qBAAa,EAAE;IAEF,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,QAAQ;IAEzC,MAAM,CAAC,MAAM,UAAQ;CAkD3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ztimson/momentum",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.2",
|
|
4
4
|
"description": "Client library for momentum",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Momentum"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"scripts": {
|
|
23
23
|
"prebuild": "node -e \"const fs=require('fs');fs.cpSync('../README.md','./README.md')\"",
|
|
24
24
|
"build": "tsc && vite build",
|
|
25
|
-
"postbuild": "node -e \"const fs=require('fs');fs.cpSync('dist/index.mjs','../server/public/momentum.mjs')\"",
|
|
25
|
+
"postbuild": "node -e \"const fs=require('fs');fs.cpSync('dist/index.mjs','../server/public/momentum.mjs');fs.cpSync('dist/index.cjs','../server/public/momentum.js')\"",
|
|
26
26
|
"watch": "vite build --watch"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|