fullstacked 0.12.0-1204 → 0.12.0-1207
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.
|
@@ -15,6 +15,7 @@ import { Button } from "@fullstacked/ui";
|
|
|
15
15
|
import { serializeArgs } from "./serialization";
|
|
16
16
|
import { buildSASS } from "../esbuild/sass";
|
|
17
17
|
import fs from "../fs";
|
|
18
|
+
import packages from "../packages";
|
|
18
19
|
|
|
19
20
|
export type Bridge = (
|
|
20
21
|
payload: Uint8Array,
|
|
@@ -61,11 +62,12 @@ bridge(new Uint8Array([0]));
|
|
|
61
62
|
|
|
62
63
|
let lastUpdateCheck = 0;
|
|
63
64
|
const updateCheckDelay = 1000 * 10; // 10sec;
|
|
65
|
+
let updating = false;
|
|
64
66
|
async function checkForUpdates() {
|
|
65
67
|
window.requestAnimationFrame(checkForUpdates);
|
|
66
68
|
|
|
67
69
|
const now = Date.now();
|
|
68
|
-
if (now - lastUpdateCheck < updateCheckDelay) {
|
|
70
|
+
if (now - lastUpdateCheck < updateCheckDelay || updating) {
|
|
69
71
|
return;
|
|
70
72
|
}
|
|
71
73
|
|
|
@@ -89,18 +91,25 @@ async function checkForUpdates() {
|
|
|
89
91
|
button: preventReloadButton
|
|
90
92
|
});
|
|
91
93
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
updating = true;
|
|
95
|
+
update().then(() => {
|
|
96
|
+
updating = false;
|
|
97
|
+
snackbar.dismiss();
|
|
98
|
+
|
|
99
|
+
if (preventReload) return;
|
|
100
|
+
window.location.reload();
|
|
98
101
|
});
|
|
99
102
|
}
|
|
100
103
|
if (await git.hasGit()) {
|
|
101
104
|
checkForUpdates();
|
|
102
105
|
}
|
|
103
106
|
|
|
107
|
+
async function update() {
|
|
108
|
+
await packages.installQuick();
|
|
109
|
+
await buildSASS(fs);
|
|
110
|
+
return esbuild.build();
|
|
111
|
+
}
|
|
112
|
+
|
|
104
113
|
// 40
|
|
105
114
|
function setTitle(title: string) {
|
|
106
115
|
const payload = new Uint8Array([40, ...serializeArgs([title])]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fullstacked",
|
|
3
|
-
"version": "0.12.0-
|
|
3
|
+
"version": "0.12.0-1207",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "node build.js",
|
|
6
6
|
"start": "npm run build && node index.js --lib ../../core/bin --root ~/FullStacked --config ~/.config/fullstacked --editor ../../out/editor",
|