@solidrt/cli 0.0.35 → 0.0.37
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/package.json +7 -7
- package/scaffold/AGENTS.md +9 -6
- package/scaffold/package.json +4 -4
- package/scaffold/templates/gallery/index.tsx +9 -9
- package/src/args.ts +18 -8
- package/src/pack-folder.ts +2 -0
- package/src/project.ts +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solidrt/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.37",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Antoine van Wel",
|
|
6
6
|
"type": "module",
|
|
@@ -28,17 +28,17 @@
|
|
|
28
28
|
"zod": "^4.4.3"
|
|
29
29
|
},
|
|
30
30
|
"optionalDependencies": {
|
|
31
|
-
"@solidrt/darwin-arm64": "0.0.
|
|
32
|
-
"@solidrt/linux-arm64-gnu": "0.0.
|
|
33
|
-
"@solidrt/linux-x64-gnu": "0.0.
|
|
34
|
-
"@solidrt/win32-x64-msvc": "0.0.
|
|
31
|
+
"@solidrt/darwin-arm64": "0.0.37",
|
|
32
|
+
"@solidrt/linux-arm64-gnu": "0.0.37",
|
|
33
|
+
"@solidrt/linux-x64-gnu": "0.0.37",
|
|
34
|
+
"@solidrt/win32-x64-msvc": "0.0.37"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@solidrt/core": "0.0.
|
|
37
|
+
"@solidrt/core": "0.0.37",
|
|
38
38
|
"typescript": "^7"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@solidrt/flux-types": "0.0.
|
|
41
|
+
"@solidrt/flux-types": "0.0.37",
|
|
42
42
|
"@types/bun": "latest"
|
|
43
43
|
}
|
|
44
44
|
}
|
package/scaffold/AGENTS.md
CHANGED
|
@@ -300,12 +300,15 @@ The tools need a running app: if list_clients is empty, ask the user to start
|
|
|
300
300
|
Math.min(dt, cap) lets it through, and one bad frame can corrupt anything
|
|
301
301
|
integrated from dt (positions fly off, accumulators go so negative they
|
|
302
302
|
never recover). Math.max(0, Math.min(dt, cap)) costs nothing.
|
|
303
|
-
-
|
|
304
|
-
frame
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
303
|
+
- A registered onFrame is a standing request, not demand-gated: it re-requests
|
|
304
|
+
the next frame every time it runs, so the runtime keeps calling it - and
|
|
305
|
+
presents - every frame at the refresh rate until you deregister it (fps stays
|
|
306
|
+
at the refresh rate on an idle screen; that is the 60fps burn called out in
|
|
307
|
+
the performance notes above). The upside is that a self-running loop - a game
|
|
308
|
+
clock, a shader driver, a stepped VM doing silent CPU work with no console
|
|
309
|
+
output - keeps advancing on its own: it does NOT stall when the body changes
|
|
310
|
+
nothing and needs no startup "prime" write. Deregister onFrame (return its
|
|
311
|
+
cleanup, or let onCleanup fire) whenever there is nothing left to advance.
|
|
309
312
|
- Layout is incremental: a change re-solves only the dirty path, and clean
|
|
310
313
|
subtrees answer from a per-node cache, so long lists no longer cap layout
|
|
311
314
|
(a thousand-node tree relays out in well under a millisecond). If layoutMs
|
package/scaffold/package.json
CHANGED
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
"android": "srt client --android"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@solidrt/core": "0.0.
|
|
13
|
-
"@solidrt/components": "0.0.
|
|
12
|
+
"@solidrt/core": "0.0.37",
|
|
13
|
+
"@solidrt/components": "0.0.37"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@solidrt/cli": "0.0.
|
|
17
|
-
"@solidrt/flux-types": "0.0.
|
|
16
|
+
"@solidrt/cli": "0.0.37",
|
|
17
|
+
"@solidrt/flux-types": "0.0.37",
|
|
18
18
|
"typescript": "^7"
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -325,15 +325,6 @@ function App() {
|
|
|
325
325
|
</View>
|
|
326
326
|
</Card>
|
|
327
327
|
|
|
328
|
-
<Card title="Text input" layout={{ width: 360 }}>
|
|
329
|
-
<TextInput
|
|
330
|
-
value={name()}
|
|
331
|
-
onInput={setName}
|
|
332
|
-
placeholder="Your name"
|
|
333
|
-
layout={{ width: 320 }}
|
|
334
|
-
/>
|
|
335
|
-
</Card>
|
|
336
|
-
|
|
337
328
|
<Card title="Switch and checkbox" layout={{ width: 360 }}>
|
|
338
329
|
<Row label="Notifications">
|
|
339
330
|
<Switch value={notify()} onChange={setNotify} />
|
|
@@ -459,6 +450,15 @@ function App() {
|
|
|
459
450
|
</View>
|
|
460
451
|
</Card>
|
|
461
452
|
|
|
453
|
+
<Card title="Text input" layout={{ width: 360 }}>
|
|
454
|
+
<TextInput
|
|
455
|
+
value={name()}
|
|
456
|
+
onInput={setName}
|
|
457
|
+
placeholder="Your name"
|
|
458
|
+
layout={{ width: 320 }}
|
|
459
|
+
/>
|
|
460
|
+
</Card>
|
|
461
|
+
|
|
462
462
|
<Card title="QR code" layout={{ width: 360 }}>
|
|
463
463
|
<Text muted>Encodes your name, or a link if the field is empty.</Text>
|
|
464
464
|
<View layout={{ alignItems: "center" }}>
|
package/src/args.ts
CHANGED
|
@@ -28,13 +28,23 @@ export let { values, positionals } = parseArgs({
|
|
|
28
28
|
allowPositionals: true,
|
|
29
29
|
})
|
|
30
30
|
|
|
31
|
-
// Storage flags for a locally spawned client
|
|
32
|
-
//
|
|
33
|
-
//
|
|
34
|
-
//
|
|
31
|
+
// Storage flags for a locally spawned client, forwarded only when given: with
|
|
32
|
+
// no --data-root the client resolves its platform pref path (see
|
|
33
|
+
// lattice/src/storage.rs); --client <N> selects the client<N>/ tree under
|
|
34
|
+
// either root. An explicit root is passed absolute because the client chdirs
|
|
35
|
+
// into its app sandbox at startup.
|
|
35
36
|
export function clientStorageArgs(): string[] {
|
|
36
|
-
let args
|
|
37
|
-
|
|
37
|
+
let args: string[] = []
|
|
38
|
+
let root = values["data-root"]
|
|
39
|
+
if (root) args.push("--data-root", resolve(root))
|
|
40
|
+
let client = values.client
|
|
41
|
+
if (client !== undefined) {
|
|
42
|
+
if (!/^\d+$/.test(client)) {
|
|
43
|
+
console.error(`Invalid --client value "${client}": expected a non-negative integer`)
|
|
44
|
+
process.exit(1)
|
|
45
|
+
}
|
|
46
|
+
args.push("--client", client)
|
|
47
|
+
}
|
|
38
48
|
return args
|
|
39
49
|
}
|
|
40
50
|
|
|
@@ -112,8 +122,8 @@ run/server options:
|
|
|
112
122
|
run/client options:
|
|
113
123
|
--size <WxH> Window size (default: 1280x720)
|
|
114
124
|
--stats Show the debug stats overlay (FPS, memory, frame timings)
|
|
115
|
-
--data-root <dir> Client data root (default:
|
|
116
|
-
--client <
|
|
125
|
+
--data-root <dir> Client data root (default: the platform pref path)
|
|
126
|
+
--client <N> Client number: its own data tree under the data root (default: 0)
|
|
117
127
|
|
|
118
128
|
client options:
|
|
119
129
|
--server <host[:port]> Connect to a dev server at this address (default port: 34884)
|
package/src/pack-folder.ts
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
loadAppIdentity,
|
|
7
7
|
projectDirFor,
|
|
8
8
|
RUNTIME_VERSION,
|
|
9
|
+
SOLIDRT_VERSION,
|
|
9
10
|
type ManifestFont,
|
|
10
11
|
} from "./project"
|
|
11
12
|
import { resolvePackFonts } from "./fonts"
|
|
@@ -70,6 +71,7 @@ export function buildPackFolder(entry: string, bytecode: Buffer): PackFolder {
|
|
|
70
71
|
org: identity.org,
|
|
71
72
|
displayName: identity.displayName,
|
|
72
73
|
runtimeVersion: RUNTIME_VERSION,
|
|
74
|
+
solidrtVersion: SOLIDRT_VERSION,
|
|
73
75
|
bundle: { path: "bundle.bin", sha256: hashHex(bytecode), size: bytecode.length },
|
|
74
76
|
...(assets.length ? { assets } : {}),
|
|
75
77
|
...(fonts.length ? { fonts } : {}),
|
package/src/project.ts
CHANGED
|
@@ -61,6 +61,13 @@ function checkField(value: string, what: string) {
|
|
|
61
61
|
// derivation question is settled (see plan).
|
|
62
62
|
export const RUNTIME_VERSION = 1
|
|
63
63
|
|
|
64
|
+
// The manifest's solidrtVersion: provenance, not a compat gate like
|
|
65
|
+
// runtimeVersion - the CLI release that built the version. Published CLIs
|
|
66
|
+
// carry the real version in their package.json; the in-repo 0.0.0
|
|
67
|
+
// placeholder stamps "unknown".
|
|
68
|
+
let pkgVersion = JSON.parse(readFileSync(join(import.meta.dir, "..", "package.json"), "utf8")).version
|
|
69
|
+
export const SOLIDRT_VERSION: string = pkgVersion === "0.0.0" ? "unknown" : pkgVersion
|
|
70
|
+
|
|
64
71
|
export function buildManifest(code: string, entry: string): string {
|
|
65
72
|
let identity = loadAppIdentity(entry)
|
|
66
73
|
let sha256 = new Bun.CryptoHasher("sha256").update(code).digest("hex")
|
|
@@ -68,6 +75,7 @@ export function buildManifest(code: string, entry: string): string {
|
|
|
68
75
|
return JSON.stringify({
|
|
69
76
|
appId: identity.appId,
|
|
70
77
|
runtimeVersion: RUNTIME_VERSION,
|
|
78
|
+
solidrtVersion: SOLIDRT_VERSION,
|
|
71
79
|
bundle: { path: "bundle.js", sha256, size: Buffer.byteLength(code, "utf8") },
|
|
72
80
|
...(assets.length ? { assets } : {}),
|
|
73
81
|
...(fonts.length ? { fonts } : {}),
|