@rcpooley/concord 0.6.2 → 0.7.0
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/README.md +2 -2
- package/dist/cli/main.js +0 -0
- package/dist/daemon.js +0 -0
- package/dist/modules/docker/sweeper.d.ts +16 -13
- package/dist/modules/docker/sweeper.d.ts.map +1 -1
- package/dist/modules/docker/sweeper.js +5 -4
- package/dist/modules/docker/sweeper.js.map +1 -1
- package/dist/schema.d.ts +3 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +18 -7
- package/dist/schema.js.map +1 -1
- package/package.json +1 -1
- package/dist/ui.d.ts +0 -62
- package/dist/ui.d.ts.map +0 -1
- package/dist/ui.js +0 -288
- package/dist/ui.js.map +0 -1
package/README.md
CHANGED
|
@@ -392,8 +392,8 @@ makes up a missed one.
|
|
|
392
392
|
**`cloudflare`** — a declared zone is shared. Every record the module writes
|
|
393
393
|
carries a comment marked `concord:<id>`, and only marked records are ever
|
|
394
394
|
edited or deleted; anything else in the zone is reported once per run and left
|
|
395
|
-
alone. It is the
|
|
396
|
-
|
|
395
|
+
alone. It is the sweepers' rule (`X-Concord=1` on units, the `dev.concord.app`
|
|
396
|
+
label on containers): the module can only ever remove what it created.
|
|
397
397
|
|
|
398
398
|
That is what lets a human co-own a zone — add a record in the dashboard and
|
|
399
399
|
Concord will not touch it. The cost is that Concord will not adopt one either:
|
package/dist/cli/main.js
CHANGED
|
File without changes
|
package/dist/daemon.js
CHANGED
|
File without changes
|
|
@@ -2,21 +2,24 @@ import { Module } from '../../module.js';
|
|
|
2
2
|
import type { DockerOp } from './index.js';
|
|
3
3
|
import type { HostConfig } from '../../schema.js';
|
|
4
4
|
/**
|
|
5
|
-
* End-of-run host-truth enforcement for containers
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* End-of-run host-truth enforcement for the containers Concord created: a
|
|
6
|
+
* container carrying Concord's project label (`dev.concord.app`) that no docker
|
|
7
|
+
* module on the host declares any more is removed within a cycle. That is how
|
|
8
|
+
* deleting an app file, or moving it to another host, takes its container
|
|
9
|
+
* down. What it will NEVER remove: volumes. Containers are reproducible; the
|
|
10
|
+
* data under them is not.
|
|
8
11
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* By default (`containerSweep: 'labelled'`, since 0.7.0) this is the systemd
|
|
13
|
+
* sweeper's rule: Concord removes only what it created. A container with no
|
|
14
|
+
* Concord label (a hand-run `docker run`, or another deployer such as
|
|
15
|
+
* Bellwether sharing the host under its own `dev.bellwether.*` labels) is not
|
|
16
|
+
* Concord's to judge, and is left alone. Every container Concord starts gets
|
|
17
|
+
* the label, because the docker module's rendered compose project always
|
|
18
|
+
* writes it (render.ts), so nothing Concord made escapes the sweep.
|
|
15
19
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* label. Concord still cleans up its own orphans there.
|
|
20
|
+
* A host may opt back into the old rule, `containerSweep: 'all'`: ANY live
|
|
21
|
+
* container no module declares is removed, labelled or not, for a host where
|
|
22
|
+
* nothing but Concord may run a container. It was the default until 0.7.0.
|
|
20
23
|
*
|
|
21
24
|
* Never declared in config. The loader synthesizes one per registry host and
|
|
22
25
|
* appends it after every declared module, so removals run last: a moved app
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sweeper.d.ts","sourceRoot":"","sources":["../../../src/modules/docker/sweeper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAGxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD
|
|
1
|
+
{"version":3,"file":"sweeper.d.ts","sourceRoot":"","sources":["../../../src/modules/docker/sweeper.ts"],"names":[],"mappings":"AACA,O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-12,7 +12,7 @@ const sq = (s) => `'${s.replace(/'/g, `'\\''`)}'`;
|
|
|
12
12
|
* name is treated as no project at all: the container is still removed, just
|
|
13
13
|
* directly rather than via compose (and never through a path built from it).
|
|
14
14
|
*/
|
|
15
|
-
export function parseUnowned(stdout, keep, mode = '
|
|
15
|
+
export function parseUnowned(stdout, keep, mode = 'labelled') {
|
|
16
16
|
const strays = [];
|
|
17
17
|
for (const line of stdout.split('\n')) {
|
|
18
18
|
if (!line.trim())
|
|
@@ -20,8 +20,9 @@ export function parseUnowned(stdout, keep, mode = 'all') {
|
|
|
20
20
|
const [name, label, image, status] = line.split('\t');
|
|
21
21
|
if (!name)
|
|
22
22
|
continue;
|
|
23
|
-
// `labelled
|
|
24
|
-
//
|
|
23
|
+
// `labelled` (the default): a container with no Concord label is not
|
|
24
|
+
// Concord's to judge — someone else started it. Keyed on the RAW label,
|
|
25
|
+
// so a forged-but-present value is still swept.
|
|
25
26
|
if (mode === 'labelled' && !label)
|
|
26
27
|
continue;
|
|
27
28
|
const project = label && /^[a-z0-9][a-z0-9-]*$/.test(label) ? label : null;
|
|
@@ -35,7 +36,7 @@ export class DockerSweeper extends Module {
|
|
|
35
36
|
keep;
|
|
36
37
|
mode;
|
|
37
38
|
kind = 'docker';
|
|
38
|
-
constructor(host, keep, mode = '
|
|
39
|
+
constructor(host, keep, mode = 'labelled') {
|
|
39
40
|
super('sweep', host);
|
|
40
41
|
this.keep = keep;
|
|
41
42
|
this.mode = mode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sweeper.js","sourceRoot":"","sources":["../../../src/modules/docker/sweeper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+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AAC,CAAC,WAAW,CAAC,CAAC,OAAO,4CAA4C,CAAC,CAAC,CAAC,mBAAmB,CAAC;YACtG,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE,CAAC,CAAC,OAAO;SACnB,CAAC,CAAC,CAAA;IACL,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,GAAe;QACzB,KAAK,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC;YACrB,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;gBACf,qEAAqE;gBACrE,sEAAsE;gBACtE,uEAAuE;gBACvE,4CAA4C;gBAC5C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAA;gBAC/D,oEAAoE;gBACpE,oEAAoE;gBACpE,4DAA4D;gBAC5D,uDAAuD;gBACvD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;YACrE,CAAC;YACD,wEAAwE;YACxE,4DAA4D;YAC5D,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,mBAAmB,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;YAC7F,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC,OAAO,EAAE,CAAC,CAAA;QACvC,CAAC;IACH,CAAC;CACF"}
|
package/dist/schema.d.ts
CHANGED
|
@@ -67,6 +67,9 @@ export type HostRegistry = z.input<typeof HostRegistrySchema>;
|
|
|
67
67
|
* appears. What did NOT change: the docker sweeper still removes ANY
|
|
68
68
|
* undeclared container, labelled or not — unlike the
|
|
69
69
|
* systemd sweeper, which only ever removes what carries Concord's tag.
|
|
70
|
+
* (Since 0.7.0 the default host `containerSweep` is `labelled`, so by
|
|
71
|
+
* default the docker sweeper follows systemd's rule too. Not a shape
|
|
72
|
+
* change, so no bump: `all` is still accepted, as an opt-in.)
|
|
70
73
|
* 7: systemd units became HOST-TRUTH, the way containers did in 6 — but as a
|
|
71
74
|
* property of the module KIND, not of the config. Every rendered unit
|
|
72
75
|
* carries `X-Concord=1`; the loader synthesizes one sweeper per host that
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;kBAyCZ,CAAA;AAEX,wEAAwE;AACxE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;mBAc3B,CAAA;AAEJ,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,UAAU,CAAC,CAAA;AACpD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAU7D;;;;;;;;;;GAUG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,eAAO,MAAM,cAAc,IAAI,CAAA;AAE/B;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AE,GAC7B,CAAC,CAAA;AAEL,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,YAAY,GAAG,YAAY,IAAI;IAClE,aAAa,EAAE,OAAO,cAAc,CAAA;IACpC,KAAK,EAAE,EAAE,CAAA;IACT,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;IACzC,OAAO,EAAE,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC,EAAE,CAAA;CAClE,CAAA"}
|
package/dist/schema.js
CHANGED
|
@@ -35,14 +35,22 @@ export const HostSchema = z
|
|
|
35
35
|
*/
|
|
36
36
|
skipIfUnreachable: z.boolean().default(false),
|
|
37
37
|
/**
|
|
38
|
-
* What this host's docker sweep may remove. `
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* something else started
|
|
42
|
-
*
|
|
43
|
-
*
|
|
38
|
+
* What this host's docker sweep may remove. `labelled` (the default)
|
|
39
|
+
* removes only containers carrying Concord's project label
|
|
40
|
+
* (`dev.concord.app`) that no module declares: Concord cleans up after
|
|
41
|
+
* itself, and containers something else started (a hand-run `docker run`,
|
|
42
|
+
* another deployer sharing the host) are left alone. `all` removes ANY
|
|
43
|
+
* container no module declares, labelled or not, for a host where nothing
|
|
44
|
+
* but Concord may run a container. Opt-in only: it would remove every
|
|
45
|
+
* container another deployer runs there. A property of the MACHINE, like
|
|
46
|
+
* the flag above.
|
|
47
|
+
*
|
|
48
|
+
* The default was `all` until 0.7.0. Flipping it removed nothing: every
|
|
49
|
+
* container Concord starts goes through the docker module's rendered
|
|
50
|
+
* compose project, which always carries the label, so `labelled` only
|
|
51
|
+
* ever spares containers Concord did not create.
|
|
44
52
|
*/
|
|
45
|
-
containerSweep: z.enum(['all', 'labelled']).default('
|
|
53
|
+
containerSweep: z.enum(['all', 'labelled']).default('labelled'),
|
|
46
54
|
})
|
|
47
55
|
.strict();
|
|
48
56
|
/** Hosts by name. Module `host` fields are typed against these keys. */
|
|
@@ -91,6 +99,9 @@ import { CloudflareConfigSchema } from './modules/cloudflare/schema.js';
|
|
|
91
99
|
* appears. What did NOT change: the docker sweeper still removes ANY
|
|
92
100
|
* undeclared container, labelled or not — unlike the
|
|
93
101
|
* systemd sweeper, which only ever removes what carries Concord's tag.
|
|
102
|
+
* (Since 0.7.0 the default host `containerSweep` is `labelled`, so by
|
|
103
|
+
* default the docker sweeper follows systemd's rule too. Not a shape
|
|
104
|
+
* change, so no bump: `all` is still accepted, as an opt-in.)
|
|
94
105
|
* 7: systemd units became HOST-TRUTH, the way containers did in 6 — but as a
|
|
95
106
|
* property of the module KIND, not of the config. Every rendered unit
|
|
96
107
|
* carries `X-Concord=1`; the loader synthesizes one sweeper per host that
|
package/dist/schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC;KACxB,MAAM,CAAC;IACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;IACvD,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IAClD,qFAAqF;IACrF,GAAG,EAAE,YAAY,CAAC,QAAQ,EAAE;IAC5B;;;;;;OAMG;I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,gBAAgB;IAChB,mBAAmB;IACnB,kBAAkB;IAClB,kBAAkB;IAClB,oBAAoB;CACrB,CAAC,CAAA;AAgBF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC5B,MAAM,CAAC;IACN,GAAG,EAAE,CAAC;SACH,MAAM,CAAC;QACN;;;;;;;;;;;;;WAaG;QACH,KAAK,EAAE,YAAY,CAAC,QAAQ,EAAE;KAC/B,CAAC;SACD,MAAM,EAAE;SACR,QAAQ,EAAE;CACd,CAAC;KACD,MAAM,EAAE,CAAA;AAIX,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC;KACjC,MAAM,CAAC;IACN,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;IACxC;;;;OAIG;IACH,KAAK,EAAE,kBAAkB;IACzB,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE;IACnC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC;CACrC,CAAC;KACD,MAAM,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rcpooley/concord",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Declarative config reconciler: edit a typed config repo, push it, and your hosts converge. Also exports the schema library config repos import.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/rcpooley/concord#readme",
|
package/dist/ui.d.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { type IncomingMessage, type Server, type ServerResponse } from 'node:http';
|
|
2
|
-
import { type PlanService } from './plans.js';
|
|
3
|
-
/**
|
|
4
|
-
* The daemon's own UI and API: recent reconciles, plans on request.
|
|
5
|
-
*
|
|
6
|
-
* It listens on a unix socket SEPARATE from the webhook's. Expose it only on a
|
|
7
|
-
* private network (a VPN, a LAN, an ssh tunnel), never publicly. The two
|
|
8
|
-
* sockets are the whole security model: the public listener stays an HMAC
|
|
9
|
-
* check and a poke, and nothing here is reachable from the internet even if a
|
|
10
|
-
* route is misconfigured to point at the wrong one — the wrong one does not
|
|
11
|
-
* serve these paths.
|
|
12
|
-
*
|
|
13
|
-
* There is no auth beyond that private network, deliberately: nothing here
|
|
14
|
-
* changes production. The only write is "plan this branch", which reads.
|
|
15
|
-
*
|
|
16
|
-
* Like the webhook, this is never load-bearing: a dead listener means no UI,
|
|
17
|
-
* never a missed reconcile.
|
|
18
|
-
*/
|
|
19
|
-
/** One real reconcile, as the daemon recorded it. */
|
|
20
|
-
export interface RunRecord {
|
|
21
|
-
id: string;
|
|
22
|
-
/** What asked for it: `interval`, `startup`, `webhook`, `SIGHUP`. */
|
|
23
|
-
trigger: string;
|
|
24
|
-
status: 'running' | 'converged' | 'changed' | 'aborted' | 'error';
|
|
25
|
-
startedAt: string;
|
|
26
|
-
finishedAt?: string;
|
|
27
|
-
/** Config commit that was reconciled. */
|
|
28
|
-
sha?: string;
|
|
29
|
-
totalOps?: number;
|
|
30
|
-
/** The closing line — "converged", "3 change(s) …", "ABORTED at …". */
|
|
31
|
-
summary?: string;
|
|
32
|
-
log: string[];
|
|
33
|
-
}
|
|
34
|
-
export type RunSummary = Omit<RunRecord, 'log'>;
|
|
35
|
-
export interface DaemonStatus {
|
|
36
|
-
startedAt: string;
|
|
37
|
-
intervalSeconds: number;
|
|
38
|
-
/** `sha` for a git checkout, `version` for an npm install. */
|
|
39
|
-
reconciler: {
|
|
40
|
-
sha?: string;
|
|
41
|
-
version?: string;
|
|
42
|
-
behind?: string;
|
|
43
|
-
};
|
|
44
|
-
reconciling: boolean;
|
|
45
|
-
/** When the next interval run is due, if the daemon is sleeping. */
|
|
46
|
-
nextRunAt?: string;
|
|
47
|
-
configRepo?: string;
|
|
48
|
-
}
|
|
49
|
-
export interface UiOptions {
|
|
50
|
-
socketPath: string;
|
|
51
|
-
status: () => DaemonStatus;
|
|
52
|
-
runs: {
|
|
53
|
-
list: (limit: number) => RunSummary[];
|
|
54
|
-
get: (id: string) => RunRecord | undefined;
|
|
55
|
-
};
|
|
56
|
-
plans: PlanService;
|
|
57
|
-
log: (scope: string, message: string) => void;
|
|
58
|
-
}
|
|
59
|
-
export declare function startUi(opts: UiOptions): Server;
|
|
60
|
-
export declare function handle(opts: UiOptions, req: IncomingMessage, res: ServerResponse): Promise<void>;
|
|
61
|
-
export declare function esc(s: unknown): string;
|
|
62
|
-
//# sourceMappingURL=ui.d.ts.map
|
package/dist/ui.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgB,KAAK,eAAe,EAAE,KAAK,MAAM,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAA;AAEhG,OAAO,EAA+C,KAAK,WAAW,EAAoB,MAAM,YAAY,CAAA;AAE5G;;;;;;;;;;;;;;;GAeG;AAEH,qDAAqD;AACrD,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,qEAAqE;IACrE,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAA;IACjE,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,yCAAyC;IACzC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,EAAE,CAAA;CACd;AAED,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;AAE/C,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,MAAM,CAAA;IACvB,8DAA8D;IAC9D,UAAU,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/D,WAAW,EAAE,OAAO,CAAA;IACpB,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,YAAY,CAAA;IAC1B,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,UAAU,EAAE,CAAA;QACrC,GAAG,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,SAAS,GAAG,SAAS,CAAA;KAC3C,CAAA;IACD,KAAK,EAAE,WAAW,CAAA;IAClB,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9C;AAMD,wBAAgB,OAAO,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CA4B/C;AAID,wBAAsB,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAqEtG;AA2ED,wBAAgB,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAKtC"}
|
package/dist/ui.js
DELETED
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
import { chmodSync, existsSync, unlinkSync } from 'node:fs';
|
|
2
|
-
import { hostname } from 'node:os';
|
|
3
|
-
import { createServer } from 'node:http';
|
|
4
|
-
import { isRecordId } from './records.js';
|
|
5
|
-
import { PlanError } from './plans.js';
|
|
6
|
-
const MAX_BODY = 16 * 1024;
|
|
7
|
-
/** Longest a `?wait=` may hold a request open, in seconds. */
|
|
8
|
-
const MAX_WAIT_S = 600;
|
|
9
|
-
export function startUi(opts) {
|
|
10
|
-
const { socketPath, log } = opts;
|
|
11
|
-
if (existsSync(socketPath)) {
|
|
12
|
-
try {
|
|
13
|
-
unlinkSync(socketPath);
|
|
14
|
-
}
|
|
15
|
-
catch {
|
|
16
|
-
/* listen() will say why */
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
const server = createServer((req, res) => {
|
|
20
|
-
handle(opts, req, res).catch((err) => {
|
|
21
|
-
log('ui', `error on ${req.method} ${req.url}: ${err instanceof Error ? err.message : String(err)}`);
|
|
22
|
-
if (!res.headersSent)
|
|
23
|
-
sendJson(res, 500, { error: 'internal error' });
|
|
24
|
-
else
|
|
25
|
-
res.end();
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
server.listen(socketPath, () => {
|
|
29
|
-
// A reverse proxy's workers (often in a container) run as their own uid.
|
|
30
|
-
// The socket is only reachable from this host and whatever mounts it; who
|
|
31
|
-
// can reach the proxy route is the real gate.
|
|
32
|
-
chmodSync(socketPath, 0o666);
|
|
33
|
-
log('ui', `listening on ${socketPath}`);
|
|
34
|
-
});
|
|
35
|
-
server.on('error', (err) => log('ui', `listener error: ${err.message}`));
|
|
36
|
-
return server;
|
|
37
|
-
}
|
|
38
|
-
// ----------------------------------------------------------------- routes ---
|
|
39
|
-
export async function handle(opts, req, res) {
|
|
40
|
-
const url = new URL(req.url ?? '/', 'http://concord.local');
|
|
41
|
-
const path = url.pathname.replace(/\/+$/, '') || '/';
|
|
42
|
-
const method = req.method ?? 'GET';
|
|
43
|
-
const parts = path.split('/').filter(Boolean);
|
|
44
|
-
if (method === 'GET' && path === '/healthz')
|
|
45
|
-
return sendText(res, 200, 'ok');
|
|
46
|
-
// --------------------------------------------------------------- API ---
|
|
47
|
-
if (parts[0] === 'api') {
|
|
48
|
-
if (method === 'GET' && path === '/api/status')
|
|
49
|
-
return sendJson(res, 200, opts.status());
|
|
50
|
-
if (method === 'GET' && path === '/api/runs') {
|
|
51
|
-
return sendJson(res, 200, { runs: opts.runs.list(limitParam(url)) });
|
|
52
|
-
}
|
|
53
|
-
if (method === 'GET' && parts[1] === 'runs' && parts.length === 3) {
|
|
54
|
-
const run = isRecordId(parts[2]) ? opts.runs.get(parts[2]) : undefined;
|
|
55
|
-
return run ? sendJson(res, 200, run) : sendJson(res, 404, { error: 'no such run' });
|
|
56
|
-
}
|
|
57
|
-
if (method === 'GET' && path === '/api/plans') {
|
|
58
|
-
return sendJson(res, 200, { plans: opts.plans.list(limitParam(url)) });
|
|
59
|
-
}
|
|
60
|
-
if (method === 'POST' && path === '/api/plans') {
|
|
61
|
-
const body = await readJson(req);
|
|
62
|
-
if (body === undefined)
|
|
63
|
-
return sendJson(res, 400, { error: 'body must be JSON: {"branch": "…", "sha"?: "…"}' });
|
|
64
|
-
try {
|
|
65
|
-
const plan = opts.plans.request(body.branch, body.sha);
|
|
66
|
-
const waitS = waitParam(url);
|
|
67
|
-
const done = waitS > 0 ? await opts.plans.wait(plan.id, waitS * 1000) : plan;
|
|
68
|
-
return sendJson(res, 202, withLinks(done ?? plan));
|
|
69
|
-
}
|
|
70
|
-
catch (err) {
|
|
71
|
-
if (err instanceof PlanError)
|
|
72
|
-
return sendJson(res, err.status, { error: err.message });
|
|
73
|
-
throw err;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
if (method === 'GET' && parts[1] === 'plans' && parts.length === 3) {
|
|
77
|
-
const id = parts[2];
|
|
78
|
-
if (!isRecordId(id))
|
|
79
|
-
return sendJson(res, 404, { error: 'no such plan' });
|
|
80
|
-
const plan = await opts.plans.wait(id, waitParam(url) * 1000);
|
|
81
|
-
return plan ? sendJson(res, 200, withLinks(plan)) : sendJson(res, 404, { error: 'no such plan' });
|
|
82
|
-
}
|
|
83
|
-
return sendJson(res, 404, { error: 'not found' });
|
|
84
|
-
}
|
|
85
|
-
// ---------------------------------------------------------------- HTML ---
|
|
86
|
-
if (method === 'GET' && path === '/')
|
|
87
|
-
return sendHtml(res, 200, pageHome(opts));
|
|
88
|
-
if (method === 'POST' && path === '/plans') {
|
|
89
|
-
const form = await readForm(req);
|
|
90
|
-
try {
|
|
91
|
-
const plan = opts.plans.request(form.get('branch')?.trim(), form.get('sha')?.trim() || undefined);
|
|
92
|
-
res.writeHead(303, { location: `/plans/${plan.id}` });
|
|
93
|
-
return void res.end();
|
|
94
|
-
}
|
|
95
|
-
catch (err) {
|
|
96
|
-
if (err instanceof PlanError)
|
|
97
|
-
return sendHtml(res, err.status, pageError(err.message));
|
|
98
|
-
throw err;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
if (method === 'GET' && parts[0] === 'plans' && parts.length === 2) {
|
|
102
|
-
const plan = isRecordId(parts[1]) ? opts.plans.get(parts[1]) : undefined;
|
|
103
|
-
return plan ? sendHtml(res, 200, pagePlan(plan)) : sendHtml(res, 404, pageError('No such plan.'));
|
|
104
|
-
}
|
|
105
|
-
if (method === 'GET' && parts[0] === 'runs' && parts.length === 2) {
|
|
106
|
-
const run = isRecordId(parts[1]) ? opts.runs.get(parts[1]) : undefined;
|
|
107
|
-
return run ? sendHtml(res, 200, pageRun(run)) : sendHtml(res, 404, pageError('No such run.'));
|
|
108
|
-
}
|
|
109
|
-
return sendHtml(res, 404, pageError('Not found.'));
|
|
110
|
-
}
|
|
111
|
-
function withLinks(plan) {
|
|
112
|
-
return { ...plan, url: `/plans/${plan.id}` };
|
|
113
|
-
}
|
|
114
|
-
function limitParam(url) {
|
|
115
|
-
const n = Number(url.searchParams.get('limit') ?? 20);
|
|
116
|
-
return Number.isInteger(n) && n > 0 ? Math.min(n, 100) : 20;
|
|
117
|
-
}
|
|
118
|
-
function waitParam(url) {
|
|
119
|
-
const n = Number(url.searchParams.get('wait') ?? 0);
|
|
120
|
-
return Number.isFinite(n) && n > 0 ? Math.min(n, MAX_WAIT_S) : 0;
|
|
121
|
-
}
|
|
122
|
-
// --------------------------------------------------------------- plumbing ---
|
|
123
|
-
function readBody(req) {
|
|
124
|
-
return new Promise((resolve) => {
|
|
125
|
-
const chunks = [];
|
|
126
|
-
let size = 0;
|
|
127
|
-
req.on('data', (c) => {
|
|
128
|
-
size += c.length;
|
|
129
|
-
if (size > MAX_BODY) {
|
|
130
|
-
resolve(undefined);
|
|
131
|
-
req.destroy();
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
chunks.push(c);
|
|
135
|
-
});
|
|
136
|
-
req.on('end', () => resolve(Buffer.concat(chunks).toString('utf8')));
|
|
137
|
-
req.on('error', () => resolve(undefined));
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
async function readJson(req) {
|
|
141
|
-
const body = await readBody(req);
|
|
142
|
-
if (body === undefined)
|
|
143
|
-
return undefined;
|
|
144
|
-
try {
|
|
145
|
-
const parsed = JSON.parse(body);
|
|
146
|
-
return parsed && typeof parsed === 'object' && !Array.isArray(parsed)
|
|
147
|
-
? parsed
|
|
148
|
-
: undefined;
|
|
149
|
-
}
|
|
150
|
-
catch {
|
|
151
|
-
return undefined;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
async function readForm(req) {
|
|
155
|
-
return new URLSearchParams((await readBody(req)) ?? '');
|
|
156
|
-
}
|
|
157
|
-
function sendJson(res, code, body) {
|
|
158
|
-
res.writeHead(code, { 'content-type': 'application/json; charset=utf-8', 'cache-control': 'no-store' });
|
|
159
|
-
res.end(JSON.stringify(body, null, 2) + '\n');
|
|
160
|
-
}
|
|
161
|
-
function sendText(res, code, body) {
|
|
162
|
-
res.writeHead(code, { 'content-type': 'text/plain; charset=utf-8' });
|
|
163
|
-
res.end(body + '\n');
|
|
164
|
-
}
|
|
165
|
-
function sendHtml(res, code, body) {
|
|
166
|
-
res.writeHead(code, {
|
|
167
|
-
'content-type': 'text/html; charset=utf-8',
|
|
168
|
-
'cache-control': 'no-store',
|
|
169
|
-
// Nothing on these pages is meant to run script, load from elsewhere, or be framed.
|
|
170
|
-
'content-security-policy': "default-src 'none'; style-src 'unsafe-inline'; form-action 'self'; frame-ancestors 'none'",
|
|
171
|
-
});
|
|
172
|
-
res.end(body);
|
|
173
|
-
}
|
|
174
|
-
// ------------------------------------------------------------------ pages ---
|
|
175
|
-
export function esc(s) {
|
|
176
|
-
return String(s ?? '').replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[c]);
|
|
177
|
-
}
|
|
178
|
-
const CSS = `
|
|
179
|
-
:root { color-scheme: light dark; --muted: #888; --ok: #2e9e5b; --warn: #c98a00; --bad: #d0453a; --run: #3a7bd5; }
|
|
180
|
-
body { font: 14px/1.45 system-ui, sans-serif; max-width: 1100px; margin: 24px auto; padding: 0 16px; }
|
|
181
|
-
h1 { font-size: 20px; margin: 0 0 4px } h2 { font-size: 16px; margin: 28px 0 8px }
|
|
182
|
-
a { color: inherit } .muted { color: var(--muted) } code, pre { font: 12px/1.4 ui-monospace, monospace }
|
|
183
|
-
table { border-collapse: collapse; width: 100% } td, th { text-align: left; padding: 4px 10px 4px 0; vertical-align: top; border-bottom: 1px solid #8883 }
|
|
184
|
-
pre { background: #8881; padding: 10px; overflow-x: auto; white-space: pre-wrap; word-break: break-all }
|
|
185
|
-
.pill { display: inline-block; padding: 0 8px; border-radius: 9px; font-size: 12px; color: #fff }
|
|
186
|
-
.s-converged, .s-planned { background: var(--ok) } .s-changed { background: var(--run) }
|
|
187
|
-
.s-running, .s-queued { background: var(--run) } .s-aborted, .s-error, .s-failed { background: var(--bad) }
|
|
188
|
-
.s-refused { background: var(--warn) }
|
|
189
|
-
.box { border: 1px solid #8884; border-radius: 6px; padding: 10px 14px; margin: 10px 0 }
|
|
190
|
-
.err { border-color: var(--bad) } .warn { border-color: var(--warn) }
|
|
191
|
-
form input[type=text] { font: inherit; padding: 4px 6px; width: 320px } form button { font: inherit; padding: 4px 12px }
|
|
192
|
-
ul.ops { margin: 4px 0; padding-left: 18px } .k-delete { color: var(--bad) } .k-create { color: var(--ok) }
|
|
193
|
-
`;
|
|
194
|
-
function layout(title, body, refresh = false) {
|
|
195
|
-
return `<!doctype html><html><head><meta charset="utf-8"><title>${esc(title)} · concord</title>
|
|
196
|
-
${refresh ? '<meta http-equiv="refresh" content="3">' : ''}
|
|
197
|
-
<meta name="viewport" content="width=device-width, initial-scale=1"><style>${CSS}</style></head>
|
|
198
|
-
<body><p class="muted"><a href="/">concord</a> · ${esc(hostname())}</p>${body}</body></html>`;
|
|
199
|
-
}
|
|
200
|
-
const pill = (status) => `<span class="pill s-${esc(status)}">${esc(status)}</span>`;
|
|
201
|
-
const time = (iso) => (iso ? `<span title="${esc(iso)}">${esc(iso.replace('T', ' ').slice(0, 19))}Z</span>` : '');
|
|
202
|
-
const short = (sha) => (sha ? `<code>${esc(sha.slice(0, 10))}</code>` : '');
|
|
203
|
-
function duration(from, to) {
|
|
204
|
-
if (!from || !to)
|
|
205
|
-
return '';
|
|
206
|
-
const s = Math.round((Date.parse(to) - Date.parse(from)) / 1000);
|
|
207
|
-
return s >= 60 ? `${Math.floor(s / 60)}m${s % 60}s` : `${s}s`;
|
|
208
|
-
}
|
|
209
|
-
function pageHome(opts) {
|
|
210
|
-
const st = opts.status();
|
|
211
|
-
const runs = opts.runs.list(20);
|
|
212
|
-
const plans = opts.plans.list(20);
|
|
213
|
-
const busy = st.reconciling || plans.some((p) => p.status === 'queued' || p.status === 'running');
|
|
214
|
-
const statusBox = `<div class="box${st.reconciler.behind ? ' warn' : ''}">
|
|
215
|
-
<b>${st.reconciling ? 'Reconciling now' : 'Idle'}</b>${st.nextRunAt && !st.reconciling ? ` <span class="muted">· next interval run ${time(st.nextRunAt)}</span>` : ''}<br>
|
|
216
|
-
<span class="muted">reconciler</span> ${st.reconciler.version ? `<code>${esc(st.reconciler.version)}</code>` : short(st.reconciler.sha)}${st.reconciler.behind ? ` <b>⚠ ${esc(st.reconciler.behind)}</b> — update the reconciler on this host` : ''}
|
|
217
|
-
· <span class="muted">every</span> ${esc(st.intervalSeconds)}s · <span class="muted">up since</span> ${time(st.startedAt)}</div>`;
|
|
218
|
-
const planForm = `<form method="post" action="/plans" class="box">
|
|
219
|
-
<b>Plan a branch</b> of the config repo against the live fleet (read-only).<br>
|
|
220
|
-
<input type="text" name="branch" placeholder="my-change" required pattern="[A-Za-z0-9._/-]+">
|
|
221
|
-
<input type="text" name="sha" placeholder="expected sha (optional)" style="width:200px">
|
|
222
|
-
<button>Plan</button>
|
|
223
|
-
<div class="muted">The branch must contain the current main — a branch behind main is refused.</div></form>`;
|
|
224
|
-
return layout('concord', `<h1>Concord</h1>${statusBox}
|
|
225
|
-
<h2>Plans</h2>${planForm}${plansTable(plans)}
|
|
226
|
-
<h2>Reconciles</h2>${runsTable(runs)}`, busy);
|
|
227
|
-
}
|
|
228
|
-
function plansTable(plans) {
|
|
229
|
-
if (!plans.length)
|
|
230
|
-
return '<p class="muted">No plans yet.</p>';
|
|
231
|
-
return `<table><tr><th>requested</th><th>branch</th><th>commit</th><th>status</th><th>changes</th><th></th></tr>${plans
|
|
232
|
-
.map((p) => `<tr><td>${time(p.requestedAt)}</td><td><code>${esc(p.branch)}</code></td><td>${short(p.sha)}</td>
|
|
233
|
-
<td>${pill(p.status)}</td><td>${p.totalOps ?? ''}</td>
|
|
234
|
-
<td><a href="/plans/${esc(p.id)}">view</a>${p.error ? ` <span class="muted">${esc(truncate(p.error, 90))}</span>` : ''}</td></tr>`)
|
|
235
|
-
.join('')}</table>`;
|
|
236
|
-
}
|
|
237
|
-
function runsTable(runs) {
|
|
238
|
-
if (!runs.length)
|
|
239
|
-
return '<p class="muted">No reconciles recorded since this version was deployed.</p>';
|
|
240
|
-
return `<table><tr><th>started</th><th>trigger</th><th>config</th><th>status</th><th>took</th><th>summary</th></tr>${runs
|
|
241
|
-
.map((r) => `<tr><td><a href="/runs/${esc(r.id)}">${time(r.startedAt)}</a></td><td>${esc(r.trigger)}</td>
|
|
242
|
-
<td>${short(r.sha)}</td><td>${pill(r.status)}</td><td>${duration(r.startedAt, r.finishedAt)}</td>
|
|
243
|
-
<td class="muted">${esc(truncate(r.summary ?? '', 110))}</td></tr>`)
|
|
244
|
-
.join('')}</table>`;
|
|
245
|
-
}
|
|
246
|
-
function pagePlan(p) {
|
|
247
|
-
const live = p.status === 'queued' || p.status === 'running';
|
|
248
|
-
const r = p.result;
|
|
249
|
-
const changed = r?.modules.filter((m) => m.ops.length || m.error) ?? [];
|
|
250
|
-
const head = `<h1>Plan of <code>${esc(p.branch)}</code> ${pill(p.status)}</h1>
|
|
251
|
-
<p class="muted">${esc(p.id)} · requested ${time(p.requestedAt)}${p.finishedAt ? ` · took ${duration(p.startedAt, p.finishedAt)}` : ''}
|
|
252
|
-
${p.sha ? ` · commit ${short(p.sha)}` : ''}${p.mainSha ? ` · main ${short(p.mainSha)}` : ''}</p>
|
|
253
|
-
${p.error ? `<div class="box ${p.status === 'refused' ? 'warn' : 'err'}">${esc(p.error)}</div>` : ''}
|
|
254
|
-
${p.overlappedRun ? '<div class="box warn">A real reconcile ran during this plan, so some state it read may have been mid-change. Plan again if anything looks odd.</div>' : ''}`;
|
|
255
|
-
const ahead = p.ahead?.length
|
|
256
|
-
? `<h2>On the branch, not on main (${p.ahead.length})</h2><ul>${p.ahead
|
|
257
|
-
.map((c) => `<li>${short(c.sha)} ${esc(c.subject)}</li>`)
|
|
258
|
-
.join('')}</ul>`
|
|
259
|
-
: p.ahead
|
|
260
|
-
? '<h2>On the branch, not on main</h2><p class="muted">Nothing — this is main.</p>'
|
|
261
|
-
: '';
|
|
262
|
-
const changes = r
|
|
263
|
-
? `<h2>${r.totalOps} change(s)${r.failed ? ' before the plan aborted' : ''}</h2>
|
|
264
|
-
${changed.length ? changed.map(moduleBlock).join('') : '<p>Nothing would change.</p>'}
|
|
265
|
-
${r.unreachable.length ? `<div class="box warn">Not checked (host unreachable): ${esc(r.unreachable.join(', '))}</div>` : ''}
|
|
266
|
-
${r.skipped.length ? `<div class="box err">Not evaluated (after the abort): ${esc(r.skipped.join(', '))}</div>` : ''}
|
|
267
|
-
${r.warnings.map((w) => `<div class="box warn">${esc(w.scope)}: ${esc(w.message)}</div>`).join('')}`
|
|
268
|
-
: '';
|
|
269
|
-
return layout(`plan ${p.branch}`, `${head}${changes}${ahead}<h2>Log</h2><pre>${esc(p.log.join('\n'))}</pre>`, live);
|
|
270
|
-
}
|
|
271
|
-
function moduleBlock(m) {
|
|
272
|
-
return `<div class="box${m.error ? ' err' : ''}"><b><code>${esc(m.scope)}</code></b>${m.error ? `<br>ERROR: ${esc(m.error)}` : ''}<ul class="ops">${m.ops
|
|
273
|
-
.map((o) => `<li><span class="k-${esc(o.kind)}">[${esc(o.kind)}]</span> ${esc(o.summary)}</li>`)
|
|
274
|
-
.join('')}</ul></div>`;
|
|
275
|
-
}
|
|
276
|
-
function pageRun(r) {
|
|
277
|
-
return layout(`run ${r.id}`, `<h1>Reconcile ${pill(r.status)}</h1>
|
|
278
|
-
<p class="muted">${esc(r.id)} · ${esc(r.trigger)} · started ${time(r.startedAt)}${r.finishedAt ? ` · took ${duration(r.startedAt, r.finishedAt)}` : ''}${r.sha ? ` · config ${short(r.sha)}` : ''}</p>
|
|
279
|
-
${r.summary ? `<div class="box${r.status === 'aborted' || r.status === 'error' ? ' err' : ''}">${esc(r.summary)}</div>` : ''}
|
|
280
|
-
<h2>Log</h2><pre>${esc(r.log.join('\n'))}</pre>`, r.status === 'running');
|
|
281
|
-
}
|
|
282
|
-
function pageError(message) {
|
|
283
|
-
return layout('error', `<div class="box err">${esc(message)}</div><p><a href="/">back</a></p>`);
|
|
284
|
-
}
|
|
285
|
-
function truncate(s, n) {
|
|
286
|
-
return s.length > n ? `${s.slice(0, n - 1)}…` : s;
|
|
287
|
-
}
|
|
288
|
-
//# sourceMappingURL=ui.js.map
|
package/dist/ui.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAC3D,OAAO,EAAE,QAAQ,E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