@imagile-dev/toil-ui 0.1.0-beta.1 → 0.1.0-beta.2
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/dist/app/assets/{Graph-BG4Q-CNd.js → Graph-CS6dQALI.js} +1 -1
- package/dist/app/assets/{PowershellMan-24GyLAoI.js → PowershellMan-rG0kojOi.js} +1 -1
- package/dist/app/assets/{index-BZCjoilm.js → index-B1I248Ba.js} +28 -28
- package/dist/app/index.html +1 -1
- package/dist/server/toil-ui.js +52 -35
- package/package.json +2 -2
package/dist/app/index.html
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<link rel="icon" type="image/svg+xml" href="./assets/favicon-pNvr4nr7.svg" />
|
|
8
8
|
<meta name="description" content="Toil UI, running on this machine: work across Jira, Azure DevOps and GitHub, read through toil." />
|
|
9
9
|
<title>Toil UI</title>
|
|
10
|
-
<script type="module" crossorigin src="./assets/index-
|
|
10
|
+
<script type="module" crossorigin src="./assets/index-B1I248Ba.js"></script>
|
|
11
11
|
<link rel="stylesheet" crossorigin href="./assets/index-DNYTmC1J.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
package/dist/server/toil-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// toil-ui-build {"version":"0.1.0-beta.
|
|
2
|
+
// toil-ui-build {"version":"0.1.0-beta.2","commit":"2397d06a20dd35eec6d4e2a8f4686e5747ff79f7"}
|
|
3
3
|
import { contractVersion, execute, mapOwi, registry, version } from "@imagile-dev/toil/api";
|
|
4
4
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
5
5
|
import { chmodSync, closeSync, cpSync, existsSync, linkSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -477,6 +477,7 @@ var fileOf = (name) => `${USER_DIR}/${name}.json`;
|
|
|
477
477
|
/** Each area's context inputs, as `dossiers show` resolves them: the ones the registry declares, nothing else. */
|
|
478
478
|
var CONTEXT = {
|
|
479
479
|
jira: ["project"],
|
|
480
|
+
"jira-cloud": ["project"],
|
|
480
481
|
bitbucket: ["project", "repo"],
|
|
481
482
|
"bitbucket-cloud": ["workspace", "repo"],
|
|
482
483
|
jenkins: ["instance"],
|
|
@@ -4818,6 +4819,8 @@ var CALL_OPTIONS = {
|
|
|
4818
4819
|
var JQL = (project) => `project = ${project} ORDER BY Rank ASC`;
|
|
4819
4820
|
/** The areas that read Azure DevOps work items: Server and Services. */
|
|
4820
4821
|
var ADO_AREAS = ["ado", "ado-cloud"];
|
|
4822
|
+
/** The areas that read Jira work items: Data Center and Cloud, which send the same issue shapes under the same command names. */
|
|
4823
|
+
var JIRA_AREAS = ["jira", "jira-cloud"];
|
|
4821
4824
|
var WIQL = "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @project ORDER BY [System.Id]";
|
|
4822
4825
|
var isRec$1 = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
4823
4826
|
var recs$1 = (v) => Array.isArray(v) ? v.filter(isRec$1) : [];
|
|
@@ -4979,25 +4982,26 @@ async function loadDossier(execute, name, options = {}) {
|
|
|
4979
4982
|
const base = { dossier: name };
|
|
4980
4983
|
const work = {
|
|
4981
4984
|
jira: [],
|
|
4985
|
+
"jira-cloud": [],
|
|
4982
4986
|
ado: [],
|
|
4983
4987
|
"ado-cloud": [],
|
|
4984
4988
|
github: []
|
|
4985
4989
|
};
|
|
4986
4990
|
const tasks = [];
|
|
4987
|
-
|
|
4988
|
-
const search = await run("work",
|
|
4991
|
+
for (const jira of JIRA_AREAS.filter((a) => areas[a]?.inputs.project)) tasks.push((async () => {
|
|
4992
|
+
const search = await run("work", `${jira} issue search`, {
|
|
4989
4993
|
...base,
|
|
4990
|
-
jql: JQL(areas
|
|
4994
|
+
jql: JQL(areas[jira].inputs.project)
|
|
4991
4995
|
});
|
|
4992
4996
|
if (!search) return;
|
|
4993
|
-
work
|
|
4997
|
+
work[jira].push(search);
|
|
4994
4998
|
const keys = recs$1(search.data.issues).map((i) => String(i.key));
|
|
4995
4999
|
for (const key of keys) {
|
|
4996
|
-
const history = await run("work",
|
|
5000
|
+
const history = await run("work", `${jira} issue history`, {
|
|
4997
5001
|
...base,
|
|
4998
5002
|
key
|
|
4999
5003
|
});
|
|
5000
|
-
if (history) work
|
|
5004
|
+
if (history) work[jira].push({
|
|
5001
5005
|
key,
|
|
5002
5006
|
history
|
|
5003
5007
|
});
|
|
@@ -11401,26 +11405,12 @@ function fixtureFeedbackEnvelope(fields, send) {
|
|
|
11401
11405
|
}
|
|
11402
11406
|
}
|
|
11403
11407
|
//#endregion
|
|
11404
|
-
//#region server/
|
|
11408
|
+
//#region server/reads.ts
|
|
11405
11409
|
/**
|
|
11406
|
-
* The
|
|
11407
|
-
*
|
|
11408
|
-
*
|
|
11409
|
-
*
|
|
11410
|
-
*
|
|
11411
|
-
* - `sqliteStore`: the SQLite cache (#250), answering the views' calls from
|
|
11412
|
-
* what a sync stored (server/sync.ts). `toil-ui` picks it.
|
|
11413
|
-
* - `toilStore`: toil itself, in-process through `@imagile-dev/toil/api`, with
|
|
11414
|
-
* the user's own connections and dossiers, every call live. Every call is
|
|
11415
|
-
* `caller: 'toil-ui'` in the audit log.
|
|
11416
|
-
* - `fixtureStore`: the preview's fixture `execute()` and its sample data, for
|
|
11417
|
-
* `toil-ui --sample`, the site preview and the tests.
|
|
11418
|
-
*
|
|
11419
|
-
* The server, not the Store, decides what a call may do: a read
|
|
11420
|
-
* from `READ_COMMANDS` always goes `readOnly`, a config change only for a
|
|
11421
|
-
* command in the server's config allowlist (#253), and anything else is
|
|
11422
|
-
* refused before a Store sees it. Two locks on one door, and both keys stay
|
|
11423
|
-
* with the tenant.
|
|
11410
|
+
* The commands the views read: data only, kept apart from the Store that runs
|
|
11411
|
+
* them (ui/server/store.ts holds the read-only lock) so that adding a read is a
|
|
11412
|
+
* change to a list and nothing else. Triage may edit this file
|
|
11413
|
+
* (scripts/triage/changes.mjs); it may not edit the Store.
|
|
11424
11414
|
*/
|
|
11425
11415
|
/**
|
|
11426
11416
|
* The readiness gate's live reads (#307): an item's workflow, read on a
|
|
@@ -11443,6 +11433,8 @@ var READ_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
11443
11433
|
"dossiers show",
|
|
11444
11434
|
"jira issue search",
|
|
11445
11435
|
"jira issue history",
|
|
11436
|
+
"jira-cloud issue search",
|
|
11437
|
+
"jira-cloud issue history",
|
|
11446
11438
|
"ado work-item iterations",
|
|
11447
11439
|
"ado work-item search",
|
|
11448
11440
|
"ado work-item get-many",
|
|
@@ -11471,6 +11463,28 @@ var READ_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
11471
11463
|
"openshift deployment list",
|
|
11472
11464
|
...WORKFLOW_READS
|
|
11473
11465
|
]);
|
|
11466
|
+
//#endregion
|
|
11467
|
+
//#region server/store.ts
|
|
11468
|
+
/**
|
|
11469
|
+
* The Store: where the server gets what a view shows (#206, Hosting-ready by
|
|
11470
|
+
* design). The SPA reads through one seam, toil's own `execute()` signature
|
|
11471
|
+
* (src/toil.ts), so a Store answers toil calls. Three ship beside each other
|
|
11472
|
+
* and one is chosen at startup:
|
|
11473
|
+
*
|
|
11474
|
+
* - `sqliteStore`: the SQLite cache (#250), answering the views' calls from
|
|
11475
|
+
* what a sync stored (server/sync.ts). `toil-ui` picks it.
|
|
11476
|
+
* - `toilStore`: toil itself, in-process through `@imagile-dev/toil/api`, with
|
|
11477
|
+
* the user's own connections and dossiers, every call live. Every call is
|
|
11478
|
+
* `caller: 'toil-ui'` in the audit log.
|
|
11479
|
+
* - `fixtureStore`: the preview's fixture `execute()` and its sample data, for
|
|
11480
|
+
* `toil-ui --sample`, the site preview and the tests.
|
|
11481
|
+
*
|
|
11482
|
+
* The server, not the Store, decides what a call may do: a read
|
|
11483
|
+
* from `READ_COMMANDS` always goes `readOnly`, a config change only for a
|
|
11484
|
+
* command in the server's config allowlist (#253), and anything else is
|
|
11485
|
+
* refused before a Store sees it. Two locks on one door, and both keys stay
|
|
11486
|
+
* with the tenant.
|
|
11487
|
+
*/
|
|
11474
11488
|
/** Every Toil UI call names itself, so the audit log says which lines were the UI's. */
|
|
11475
11489
|
var CALLER = "toil-ui";
|
|
11476
11490
|
/**
|
|
@@ -12006,6 +12020,9 @@ var LIVE_COMMANDS = [
|
|
|
12006
12020
|
"jira issue search",
|
|
12007
12021
|
"jira issue get",
|
|
12008
12022
|
"jira issue history",
|
|
12023
|
+
"jira-cloud issue search",
|
|
12024
|
+
"jira-cloud issue get",
|
|
12025
|
+
"jira-cloud issue history",
|
|
12009
12026
|
"ado work-item search",
|
|
12010
12027
|
"ado work-item get",
|
|
12011
12028
|
"ado work-item get-many",
|
|
@@ -13646,8 +13663,8 @@ function packageUrl(specifier, from) {
|
|
|
13646
13663
|
}
|
|
13647
13664
|
//#endregion
|
|
13648
13665
|
//#region server/agents/env.ts
|
|
13649
|
-
/**
|
|
13650
|
-
var BASE = /^(PATH|PATHEXT|HOME|USERPROFILE|HOMEDRIVE|HOMEPATH|APPDATA|LOCALAPPDATA|TMP|TEMP|TMPDIR|SYSTEMROOT|WINDIR|COMSPEC|LANG|LC_[A-Z_]+|TZ|XDG_CONFIG_HOME|XDG_DATA_HOME|XDG_STATE_HOME|XDG_CACHE_HOME)$/i;
|
|
13666
|
+
/** OS identity includes USER: Claude needs it to find its macOS sign-in (#489). */
|
|
13667
|
+
var BASE = /^(PATH|PATHEXT|HOME|USER|USERPROFILE|HOMEDRIVE|HOMEPATH|APPDATA|LOCALAPPDATA|TMP|TEMP|TMPDIR|SYSTEMROOT|WINDIR|COMSPEC|LANG|LC_[A-Z_]+|TZ|XDG_CONFIG_HOME|XDG_DATA_HOME|XDG_STATE_HOME|XDG_CACHE_HOME)$/i;
|
|
13651
13668
|
/** The proxy and the certificate authorities the machine names (principle 9). */
|
|
13652
13669
|
var NETWORK = /^(HTTPS_PROXY|HTTP_PROXY|ALL_PROXY|NO_PROXY|NODE_EXTRA_CA_CERTS|SSL_CERT_FILE|SSL_CERT_DIR)$/i;
|
|
13653
13670
|
/**
|
|
@@ -21548,7 +21565,7 @@ async function main() {
|
|
|
21548
21565
|
return 0;
|
|
21549
21566
|
}
|
|
21550
21567
|
if (parsed.version) {
|
|
21551
|
-
process.stdout.write(`0.1.0-beta.
|
|
21568
|
+
process.stdout.write(`0.1.0-beta.2 (toil ${version})\n`);
|
|
21552
21569
|
return 0;
|
|
21553
21570
|
}
|
|
21554
21571
|
const { settings } = parsed;
|
|
@@ -21607,8 +21624,8 @@ async function main() {
|
|
|
21607
21624
|
commit: typeof toilCommit === "string" ? toilCommit : null
|
|
21608
21625
|
},
|
|
21609
21626
|
toilUi: {
|
|
21610
|
-
version: "0.1.0-beta.
|
|
21611
|
-
commit: "
|
|
21627
|
+
version: "0.1.0-beta.2",
|
|
21628
|
+
commit: "2397d06a20dd35eec6d4e2a8f4686e5747ff79f7"
|
|
21612
21629
|
}
|
|
21613
21630
|
},
|
|
21614
21631
|
toilBundle: toilBundle(),
|
|
@@ -21643,7 +21660,7 @@ async function main() {
|
|
|
21643
21660
|
};
|
|
21644
21661
|
const host = cache ? new AgentHost({
|
|
21645
21662
|
dataDir: settings.dataDir,
|
|
21646
|
-
version: "0.1.0-beta.
|
|
21663
|
+
version: "0.1.0-beta.2",
|
|
21647
21664
|
data: (dossier) => {
|
|
21648
21665
|
const data = cacheData(cache, dossier);
|
|
21649
21666
|
return data && worklog ? {
|
|
@@ -21678,7 +21695,7 @@ async function main() {
|
|
|
21678
21695
|
execute,
|
|
21679
21696
|
mapIds,
|
|
21680
21697
|
data,
|
|
21681
|
-
version: "0.1.0-beta.
|
|
21698
|
+
version: "0.1.0-beta.2",
|
|
21682
21699
|
toilVersion: version,
|
|
21683
21700
|
...fingerprints ? { fingerprints } : {}
|
|
21684
21701
|
}),
|
|
@@ -21754,7 +21771,7 @@ async function main() {
|
|
|
21754
21771
|
assignments,
|
|
21755
21772
|
...fingerprints ? { serverStatus: () => fingerprints.server() } : {},
|
|
21756
21773
|
appDir: fileURLToPath(new URL("../app/", import.meta.url)),
|
|
21757
|
-
version: "0.1.0-beta.
|
|
21774
|
+
version: "0.1.0-beta.2",
|
|
21758
21775
|
toil,
|
|
21759
21776
|
config: settings.sample ? {
|
|
21760
21777
|
areas: FIXTURE_AREAS,
|
|
@@ -21775,7 +21792,7 @@ async function main() {
|
|
|
21775
21792
|
return 1;
|
|
21776
21793
|
}
|
|
21777
21794
|
process.stdout.write([
|
|
21778
|
-
`Toil UI 0.1.0-beta.
|
|
21795
|
+
`Toil UI 0.1.0-beta.2 (beta, local only), on toil ${version}`,
|
|
21779
21796
|
settings.sample ? "Serving sample data and the scripted agent; nothing connects to a tracker." : "Syncing through toil, read-only, with your own connections and dossiers. Only its Settings pages, and a dossier's name and description edited in place, change anything: toil's own connections and dossiers, when you ask. The worklog keeps its pages and your notes in its data folder, and writes anywhere else only when you export one. Feedback goes to Imagile only when you send it.",
|
|
21780
21797
|
...cache ? [`The cache is ${cache.paths.db}, kept ${settings.retentionDays} days after each sync; toil-ui wipe deletes it.`] : [],
|
|
21781
21798
|
"",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imagile-dev/toil-ui",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.2",
|
|
4
4
|
"description": "Toil UI: a local web app to see and reason about work across Jira, Azure DevOps and GitHub, on toil. Beta, local only.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Imagile",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"screens:sheet": "node scripts/screens-sheet.mjs"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@imagile-dev/toil": "0.1.0-beta.
|
|
46
|
+
"@imagile-dev/toil": "0.1.0-beta.2"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@anthropic-ai/claude-agent-sdk": ">=0.3.289",
|