driggsby 0.7.3 → 0.7.4
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.
|
@@ -7,6 +7,10 @@ import { defaultCredentialEnvironment, } from "../credentials/store.js";
|
|
|
7
7
|
import { quotedForTerminal, wrapProse } from "../terminal-text.js";
|
|
8
8
|
import { deployFailure, MAX_SERVER_TEXT_CHARS, requireDeploySession, } from "./api-session.js";
|
|
9
9
|
const DEPLOY_RETRY_COMMAND = "npx driggsby@latest deploy";
|
|
10
|
+
// Driggsby's Dashboards page runs every dashboard live in its tile, phones
|
|
11
|
+
// included, so a heavy page opens slowly there: past this, the deploy says
|
|
12
|
+
// so. A source map never loads with the page, so it doesn't count.
|
|
13
|
+
const PAGE_WEIGHT_BUDGET_BYTES = 1_000_000;
|
|
10
14
|
function defaultDeployIo() {
|
|
11
15
|
return {
|
|
12
16
|
out: (text) => {
|
|
@@ -61,6 +65,10 @@ export async function runDeploy(options, environment = defaultCredentialEnvironm
|
|
|
61
65
|
if (collected.skippedSymlinks.length > 0) {
|
|
62
66
|
io.out(`\n${symlinkNote(collected.skippedSymlinks)}\n`);
|
|
63
67
|
}
|
|
68
|
+
const weight = pageWeight(collected.files);
|
|
69
|
+
if (weight > PAGE_WEIGHT_BUDGET_BYTES) {
|
|
70
|
+
io.out(`\n${weightNote(weight)}\n`);
|
|
71
|
+
}
|
|
64
72
|
if (createdApp !== null) {
|
|
65
73
|
io.out(`\n${wrapProse(`This deploy created your app. Its address is assigned by Driggsby — the name you picked plus a unique ending — and it's saved in driggsby.json, so every later deploy targets it. If this project lives in git, commit the updated driggsby.json: it's the only record of your app's address, and a fresh checkout without it would create a second app.`)}\n`);
|
|
66
74
|
}
|
|
@@ -113,6 +121,18 @@ function symlinkNote(skipped) {
|
|
|
113
121
|
const more = skipped.length > 3 ? ` and ${skipped.length - 3} more` : "";
|
|
114
122
|
return wrapProse(`Note: symlinks don't deploy — skipped ${shown}${more}.`);
|
|
115
123
|
}
|
|
124
|
+
function pageWeight(files) {
|
|
125
|
+
return files
|
|
126
|
+
.filter((file) => !file.path.toLowerCase().endsWith(".map"))
|
|
127
|
+
.reduce((total, file) => total + file.byteSize, 0);
|
|
128
|
+
}
|
|
129
|
+
function weightNote(bytes) {
|
|
130
|
+
// formatBytes rounds to a tenth, so a weight just past the budget reads
|
|
131
|
+
// as the budget itself; it says so rather than "1 MB ... past 1 MB".
|
|
132
|
+
const budget = formatBytes(PAGE_WEIGHT_BUDGET_BYTES);
|
|
133
|
+
const size = formatBytes(bytes) === budget ? `just over ${budget}` : formatBytes(bytes);
|
|
134
|
+
return wrapProse(`Note: this app is ${size}. Driggsby's Dashboards page runs each dashboard live in its tile, phones included, and past ${budget} it opens there slowly. Keep what the page loads under ${budget}.`);
|
|
135
|
+
}
|
|
116
136
|
function nextSection(outcome) {
|
|
117
137
|
if (!outcome.live) {
|
|
118
138
|
return ("Next:\n" +
|
|
@@ -42,11 +42,11 @@ export const STYLES_CSS = `/* Driggsby's console palette, so this page reads as
|
|
|
42
42
|
stand in if the font is slow or fails to load, or lacks a character),
|
|
43
43
|
and name no other font anywhere else. A <canvas> or a chart library's
|
|
44
44
|
font setting can't read var(): name "Inter" there, followed only by
|
|
45
|
-
sans-serif, and draw a canvas after document.fonts.ready.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
the
|
|
49
|
-
|
|
45
|
+
sans-serif, and draw a canvas after document.fonts.ready. A face the
|
|
46
|
+
page doesn't bring with it falls back to whatever the viewer's device
|
|
47
|
+
has, and looks different on every phone and computer. Text waits for
|
|
48
|
+
the font (font-display: block, preloaded) rather than flash another
|
|
49
|
+
face first. */
|
|
50
50
|
@font-face {
|
|
51
51
|
font-family: "Inter";
|
|
52
52
|
src: url("/-/inter.woff2") format("woff2");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "driggsby",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "Set up and build on Driggsby, the MCP server for personal finance.",
|
|
5
5
|
"license": "Apache-2.0 AND OFL-1.1",
|
|
6
6
|
"repository": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"node": ">=18"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@driggsby/deploy": "0.7.
|
|
34
|
-
"@driggsby/sdk": "0.7.
|
|
33
|
+
"@driggsby/deploy": "0.7.4",
|
|
34
|
+
"@driggsby/sdk": "0.7.4"
|
|
35
35
|
}
|
|
36
36
|
}
|