@wenathlan/argan 2.0.163 → 2.0.165
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/cli.ts +50 -5
- package/docs/distributionlanes.md +19 -0
- package/package.json +16 -9
package/cli.ts
CHANGED
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
* @module argan/cli
|
|
9
9
|
* @family wave/clibin
|
|
10
10
|
* @law same design as web / desktop, difference only responsiveness / DPI
|
|
11
|
-
* @
|
|
11
|
+
* @dpi native detection, never XDPI — the 1x / 1.5x / 2x / 3x scale ladder
|
|
12
|
+
* folds the chrome to the terminal cell grid (windows terminal, conpty
|
|
13
|
+
* and every linux pty), the <APP>_DPI environment override wins first.
|
|
14
|
+
* @seat 2026 · rung 2.0.163 · hierarchical JSDoc, tokens/flags, no hardcoded
|
|
12
15
|
* data — the version is read from package.json at runtime and the engine
|
|
13
16
|
* one-liner is quoted from the app docs.
|
|
14
17
|
* @runtime node strips the types; the shebang hands the file to the runtime
|
|
@@ -43,16 +46,56 @@ const APP = "argan" as const;
|
|
|
43
46
|
const ENGINE =
|
|
44
47
|
"the network, DNS and edge engine of the devthink family — authoritative zones, record snapshots, dnssec validation math, a 231-protocol gateway mesh and a 3217-row media type catalog (docs/engine.md)" as const;
|
|
45
48
|
|
|
46
|
-
/** the titlebar bar: the app name on the left rail, the window controls on the right — the windows 11 chrome inside the terminal. */
|
|
49
|
+
/** the titlebar bar: the app name on the left rail, the window controls on the right — the windows 11 chrome inside the terminal, the rail folded through the dpi frame. */
|
|
47
50
|
function titlebar(): string {
|
|
48
|
-
return `${ACCENT}┌ ${APP} ─ cli${RESET} ${INK}${BAR.repeat(
|
|
51
|
+
return `${ACCENT}┌ ${APP} ─ cli${RESET} ${INK}${BAR.repeat(FRAME.rail)} ─ ❐ ✕${RESET}`;
|
|
49
52
|
}
|
|
50
53
|
|
|
51
|
-
/** the top rule: the 28px divider of the web surface folded to one terminal line. */
|
|
54
|
+
/** the top rule: the 28px divider of the web surface folded to one terminal line, scaled by the dpi seat. */
|
|
52
55
|
function toprule(): string {
|
|
53
|
-
|
|
56
|
+
const rail = Math.max(3, Math.round(3 * FRAME.scale));
|
|
57
|
+
return `${FOCUS}${BAR.repeat(rail)} ${APP} ${BAR.repeat(rail)}${RESET}`;
|
|
54
58
|
}
|
|
55
59
|
|
|
60
|
+
/* ════════════════════════════════════════════════════════════════════ */
|
|
61
|
+
/* Section 1b: the dpi conversion — native detection, the 1x / 1.5x / 2x / 3x scale ladder and the terminal clamp (the pr13 law: DPI never XDPI — the same design as the web / desktop surface, only the responsiveness folds to the cell grid of the terminal, inside windows terminal and every linux pty). */
|
|
62
|
+
/* ════════════════════════════════════════════════════════════════════ */
|
|
63
|
+
|
|
64
|
+
/** the scale ladder the native detection resolves (the automatic scaling law). */
|
|
65
|
+
const SCALESTEPS = [1, 1.5, 2, 3] as const;
|
|
66
|
+
|
|
67
|
+
/** the dpi frame the chrome renders inside: the resolved scale seat, the terminal columns and the rail length the titlebar draws. */
|
|
68
|
+
interface dpiframe {
|
|
69
|
+
/** the scale seat of the ladder (1, 1.5, 2 or 3). */
|
|
70
|
+
scale: number;
|
|
71
|
+
/** the columns the terminal answers (windows terminal, conpty, xterm, tmux — every pty reports them). */
|
|
72
|
+
columns: number;
|
|
73
|
+
/** the titlebar rail length in cells (the pixel rail folded to the grid and clamped so the line never wraps). */
|
|
74
|
+
rail: number;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** resolves the dpi frame natively, zero dependencies: the columns come from stdout (every windows and linux terminal answers them), the scale seat from the column ladder — the explicit <APP>_DPI environment override wins first (the native scaling knob) — and the rail clamps inside the frame so the chrome never wraps a narrow console. */
|
|
78
|
+
function detectdpiframe(): dpiframe {
|
|
79
|
+
const columns = Number.isFinite(stdout.columns) && Number(stdout.columns) > 0 ? Number(stdout.columns) : 80;
|
|
80
|
+
const override = Number(process.env[`${APP.toUpperCase()}_DPI`] ?? "");
|
|
81
|
+
const scale =
|
|
82
|
+
Number.isFinite(override) && override > 0 && SCALESTEPS.includes(override as (typeof SCALESTEPS)[number])
|
|
83
|
+
? override
|
|
84
|
+
: columns >= 200
|
|
85
|
+
? 3
|
|
86
|
+
: columns >= 160
|
|
87
|
+
? 2
|
|
88
|
+
: columns >= 120
|
|
89
|
+
? 1.5
|
|
90
|
+
: 1;
|
|
91
|
+
/* the rail folds the 24-cell rail of the 1x seat through the scale seat and clamps inside the frame with room for the name, the controls and the reset runs (the escapes are zero-width). */
|
|
92
|
+
const rail = Math.max(4, Math.min(Math.round(24 * scale), columns - APP.length - 16));
|
|
93
|
+
return { scale, columns, rail };
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** the dpi frame the console booted with (resolved once, before any chrome prints — a piped stdin answers the deterministic 80-column seat). */
|
|
97
|
+
const FRAME = detectdpiframe();
|
|
98
|
+
|
|
56
99
|
/* ════════════════════════════════════════════════════════════════════ */
|
|
57
100
|
/* Section 2: the runtime reads — no hardcoded data; the version comes from package.json at runtime. */
|
|
58
101
|
/* ════════════════════════════════════════════════════════════════════ */
|
|
@@ -77,6 +120,7 @@ function help(): string[] {
|
|
|
77
120
|
`${INK}commands${RESET}`,
|
|
78
121
|
` help ${INK}this list${RESET}`,
|
|
79
122
|
` version ${INK}the package version, read from package.json at runtime${RESET}`,
|
|
123
|
+
` dpi ${INK}the resolved dpi seat of this terminal (scale, columns, rail)${RESET}`,
|
|
80
124
|
` engine ${INK}the engine ownership one-liner of the app${RESET}`,
|
|
81
125
|
` exit ${INK}close the console${RESET}`,
|
|
82
126
|
];
|
|
@@ -101,6 +145,7 @@ export async function main(): Promise<void> {
|
|
|
101
145
|
if (command === "exit") rl.close();
|
|
102
146
|
else if (command === "help") for (const row of help()) console.log(row);
|
|
103
147
|
else if (command === "version") console.log(`${ACCENT}${APP}${RESET} ${version}`);
|
|
148
|
+
else if (command === "dpi") console.log(`${ACCENT}${APP}${RESET} ${INK}dpi seat ${FRAME.scale}x on ${FRAME.columns} columns — rail ${FRAME.rail} cells, ladder 1x / 1.5x / 2x / 3x${RESET}`);
|
|
104
149
|
else if (command === "engine") console.log(`${INK}${ENGINE}${RESET}`);
|
|
105
150
|
else if (command.length > 0) console.log(`${HOVER}✕${RESET} ${INK}unknown command: ${command} — type help${RESET}`);
|
|
106
151
|
if (command === "exit") break;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Distribution lanes
|
|
2
|
+
|
|
3
|
+
The eleven distribution lanes of the PR14 law and the honest status each lane answers for argan at the 2.0.163 family rung. A lane never ships metadata its real surface cannot back: a lane without a real carrier stays a documented stub until the surface lands, and no version ever bumps to fake a lane.
|
|
4
|
+
|
|
5
|
+
| Lane | Carrier | Status | Note |
|
|
6
|
+
| --- | --- | --- | --- |
|
|
7
|
+
| npmjs | package.json — @wenathlan/argan | live | the family-npmjs lane publishes the envelope every release rung |
|
|
8
|
+
| GitHub Packages npm | package.json — @wenathlan/argan | live | the family-githubnpm lane publishes the same envelope idempotently |
|
|
9
|
+
| Maven | pom.xml — io.github.wenathlan:argan | live | the family-maven lane deploys the jar |
|
|
10
|
+
| NuGet | argan.csproj | live | the family-nuget lane packs the envelope |
|
|
11
|
+
| Gradle | build.gradle.kts — com.wenathlan:argan | live | the family-gradle lane publishes the module |
|
|
12
|
+
| Ruby Gems | argan.gemspec | live | the family-rubygems lane pushes the gem |
|
|
13
|
+
| Docker Container | Dockerfile | live | the family-ghcr lane pushes ghcr.io/wenathlan/argan and the family-container lane attaches the release archive |
|
|
14
|
+
| Go Get | go.mod | stub | no Go source surface ships yet — the lane lands when a real Go adapter exists, never as an empty module |
|
|
15
|
+
| Cargo Crates | Cargo.toml | stub | no Rust source surface ships yet — the lane lands with a real crate, never as an empty manifest |
|
|
16
|
+
| PyPi | pyproject.toml | stub | no Python package surface ships yet — the lane lands with a real wheel, never as an empty project table |
|
|
17
|
+
| Homebrew | Formula | stub | no tap repository ships yet — the formula lands pointing at the real release binaries with real checksums, never at a placeholder |
|
|
18
|
+
|
|
19
|
+
The engines block of package.json keeps Go, Rust and Python as declared toolchain floors — a catalog row is not a distribution lane. The dual npm law answers through the npmjs and GitHub Packages rows; the release binaries (the desktop bundles, the mobile artifacts, the container archive) ride the family-desktop, family-mobile and family-container lanes every release rung.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wenathlan/argan",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.165",
|
|
4
4
|
"description": "argan is the DNS and gateway library of the wenathlan family: zones, records, dnssec and handshake — the system network library whose site shares the unified database. The envelope distributes the documentation set, the zero-build site and the tests directory as one package.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"argan",
|
|
@@ -36,9 +36,11 @@
|
|
|
36
36
|
"README.md",
|
|
37
37
|
"docs",
|
|
38
38
|
"tests",
|
|
39
|
+
"cli.ts",
|
|
39
40
|
"mimetypes.ts"
|
|
40
41
|
],
|
|
41
42
|
"engines": {
|
|
43
|
+
"babel": "^7.28.0",
|
|
42
44
|
"bare": "^1.18.0",
|
|
43
45
|
"bun": "^1.4.4",
|
|
44
46
|
"cargo": ">=1.85.0",
|
|
@@ -61,6 +63,7 @@
|
|
|
61
63
|
"typescript": "^5.8.0",
|
|
62
64
|
"v": "^0.5.2",
|
|
63
65
|
"vscode": "^1.118.0",
|
|
66
|
+
"yaml": "^2.9.1",
|
|
64
67
|
"yarn": "^4.17.1"
|
|
65
68
|
},
|
|
66
69
|
"peerDependencies": {
|
|
@@ -87,12 +90,12 @@
|
|
|
87
90
|
"@libsql/client": "^0.18.0",
|
|
88
91
|
"@prisma/adapter-libsql": "^7.10.1",
|
|
89
92
|
"@prisma/client": "^7.10.1",
|
|
93
|
+
"@wenathlan/argan": "~2.0.155",
|
|
90
94
|
"@wenathlan/cadria": "~2.0.155",
|
|
91
95
|
"@wenathlan/debonair": "~2.0.155",
|
|
92
96
|
"@wenathlan/devthink": "~2.0.154",
|
|
93
97
|
"@wenathlan/getry": "~2.0.155",
|
|
94
98
|
"@wenathlan/saddle": "~2.0.155",
|
|
95
|
-
"@wenathlan/argan": "~2.0.155",
|
|
96
99
|
"@wenathlan/vault": "~2.0.155",
|
|
97
100
|
"better-sqlite3": "^13.0.3",
|
|
98
101
|
"drizzle-orm": "^0.45.4",
|
|
@@ -205,22 +208,26 @@
|
|
|
205
208
|
"zod": "^4.6.7"
|
|
206
209
|
},
|
|
207
210
|
"overrides": {
|
|
208
|
-
"
|
|
211
|
+
"uuid": "^11.1.1",
|
|
209
212
|
"deepmerge-ts": "^8.0.0",
|
|
213
|
+
"esbuild": "^0.28.2",
|
|
214
|
+
"follow-redirects": "^1.16.2",
|
|
215
|
+
"minimatch": "^11.0.3",
|
|
216
|
+
"glob": "^14.0.3",
|
|
210
217
|
"mysql2": "^3.24.6",
|
|
211
|
-
"uuid": "^11.1.1",
|
|
212
218
|
"postcss-selector-parser": "^7.1.6",
|
|
213
219
|
"source-map-js": "1.2.2",
|
|
214
|
-
"katex": "^0.18.2",
|
|
215
220
|
"proxy-addr": "2.0.8",
|
|
216
221
|
"body-parser": "^2.4.0",
|
|
217
222
|
"fast-uri": "^3.1.9",
|
|
218
|
-
"follow-redirects": "^1.16.2",
|
|
219
|
-
"minimatch": "^11.0.3",
|
|
220
|
-
"glob": "^14.0.3",
|
|
221
223
|
"zod": "^4.6.7",
|
|
222
224
|
"undici": "^7.30.1",
|
|
223
|
-
"
|
|
225
|
+
"katex": "^0.18.2",
|
|
226
|
+
"shell-quote": "^1.11.0",
|
|
227
|
+
"xcode": {
|
|
228
|
+
"uuid": "11.1.1"
|
|
229
|
+
},
|
|
230
|
+
"@grpc/grpc-js": "1.14.5"
|
|
224
231
|
},
|
|
225
232
|
"publishConfig": {
|
|
226
233
|
"access": "public",
|