@diffohq/diffo 0.14.2 → 0.15.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/dist/cli.mjs +50 -5
- package/dist/client/assets/{abnfDiagram-O67JEVCF-CMnC6TpZ.js → abnfDiagram-O67JEVCF-DTuIcRnI.js} +1 -1
- package/dist/client/assets/{arc-DZk3sJZl.js → arc-DDRFqotA.js} +1 -1
- package/dist/client/assets/architecture-7GRP2DOG-fgLoXisK.js +1 -0
- package/dist/client/assets/{architectureDiagram-NJMV4G6O-Dz9QZrKb.js → architectureDiagram-NJMV4G6O-Cm18T2lO.js} +1 -1
- package/dist/client/assets/{blockDiagram-BEXU5L5S-EcyDxzoo.js → blockDiagram-BEXU5L5S-D7TX1ex3.js} +1 -1
- package/dist/client/assets/{c4Diagram-YGBWAQC7-BKJoKbJ0.js → c4Diagram-YGBWAQC7-WU9XIH3K.js} +1 -1
- package/dist/client/assets/channel-C-BwnKOJ.js +1 -0
- package/dist/client/assets/{chunk-3FUC2YCW-CvCppQd9.js → chunk-3FUC2YCW-BLG7xLt6.js} +1 -1
- package/dist/client/assets/{chunk-5DYCD2WN-BgEct2K6.js → chunk-5DYCD2WN-DBZoBewf.js} +1 -1
- package/dist/client/assets/{chunk-742MDFTN-BqjxeZIP.js → chunk-742MDFTN-CHgG0KmN.js} +1 -1
- package/dist/client/assets/{chunk-7INBJB4K-tXIMGd-a.js → chunk-7INBJB4K-CTi3A7Wb.js} +1 -1
- package/dist/client/assets/{chunk-7M6MHVWA-Dvn3lbjR.js → chunk-7M6MHVWA-DmA_QxZA.js} +1 -1
- package/dist/client/assets/{chunk-7PRAP22T-Dhf_jRyf.js → chunk-7PRAP22T-huHpXmw3.js} +1 -1
- package/dist/client/assets/{chunk-GTNCS2PH-DrLr4ax6.js → chunk-GTNCS2PH-vCx7ar7r.js} +1 -1
- package/dist/client/assets/{chunk-GWA4HPMP-B19E2BR4.js → chunk-GWA4HPMP-CHwKEoZZ.js} +1 -1
- package/dist/client/assets/{chunk-MBY4JIJT-B39se3mh.js → chunk-MBY4JIJT-RnXnXe-z.js} +1 -1
- package/dist/client/assets/{chunk-NETBCI7D-DNqlAaqS.js → chunk-NETBCI7D-CSDd9o_Q.js} +1 -1
- package/dist/client/assets/{chunk-O7XYJQB3-DKVir5ql.js → chunk-O7XYJQB3-CEhzWv7d.js} +1 -1
- package/dist/client/assets/{chunk-UA2S7LBM-BJrTT987.js → chunk-UA2S7LBM-C7B09LWx.js} +1 -1
- package/dist/client/assets/{chunk-WEXAMYUT-CVJkRDlB.js → chunk-WEXAMYUT-3n4dn1BR.js} +1 -1
- package/dist/client/assets/{chunk-XXDRQBXY-BxCscPzy.js → chunk-XXDRQBXY-4FCi-T48.js} +1 -1
- package/dist/client/assets/{chunk-Z7XXMR3K-BN62CsO3.js → chunk-Z7XXMR3K-DKIhLDzz.js} +1 -1
- package/dist/client/assets/{chunk-ZIGJFQKS-D5CFKrxE.js → chunk-ZIGJFQKS-Co29XAiZ.js} +1 -1
- package/dist/client/assets/{classDiagram-v2-NBCMYWYE-BKkAeVYM.js → classDiagram-v2-NBCMYWYE-Cf-7xcq8.js} +1 -1
- package/dist/client/assets/{core-Q3dXPkAg.js → core-BOw1SZCI.js} +1 -1
- package/dist/client/assets/{cose-bilkent-JH36ORCC-YcS_RGCv.js → cose-bilkent-JH36ORCC-BHLAIITd.js} +1 -1
- package/dist/client/assets/{cynefin-OW5HDTMX-yrbryS5G.js → cynefin-OW5HDTMX-BhCsrk_o.js} +1 -1
- package/dist/client/assets/{cynefinDiagram-VND7K2PF-Hc8uQFhv.js → cynefinDiagram-VND7K2PF-BDA7M5Wl.js} +1 -1
- package/dist/client/assets/{dagre-6A5THRUB-KXPtswtI.js → dagre-6A5THRUB-C3HwSc-A.js} +1 -1
- package/dist/client/assets/{diagram-22UHCM2B-Y8pX48tu.js → diagram-22UHCM2B-OOAY005D.js} +1 -1
- package/dist/client/assets/{diagram-3UASUU5V-CVa1vLpR.js → diagram-3UASUU5V-D8gs9Wez.js} +1 -1
- package/dist/client/assets/{diagram-ATOU4E4O-CneE7Zes.js → diagram-ATOU4E4O-BUEcrLGw.js} +1 -1
- package/dist/client/assets/{diagram-CDSNMT55-oZKmQM2r.js → diagram-CDSNMT55-CrFP70a4.js} +1 -1
- package/dist/client/assets/{diagram-MLGK6HIB-DFI0Zy59.js → diagram-MLGK6HIB-xovbjRVR.js} +1 -1
- package/dist/client/assets/{diagram-MPIPVDR6-eArDdjHg.js → diagram-MPIPVDR6-BG_1fWmv.js} +1 -1
- package/dist/client/assets/{dist-Dpuu8gDL.js → dist-B_DAp0_g.js} +1 -1
- package/dist/client/assets/{dist-D0R2sCr-.js → dist-CywLYZgD.js} +1 -1
- package/dist/client/assets/{ebnfDiagram-ZINNZB2B-BGQz6GUg.js → ebnfDiagram-ZINNZB2B-CdYluvLS.js} +1 -1
- package/dist/client/assets/{elk-276RUBZZ-BIfKEkPZ.js → elk-276RUBZZ-CKVIYlEg.js} +1 -1
- package/dist/client/assets/{engine-oniguruma-CAQyYVrA.js → engine-oniguruma-DuP4VPQE.js} +1 -1
- package/dist/client/assets/{erDiagram-OPXOYQCR-DrJ1SBCa.js → erDiagram-OPXOYQCR-DEAtTayB.js} +1 -1
- package/dist/client/assets/eventmodeling-NTZA5JFV-BNmObmiU.js +1 -0
- package/dist/client/assets/flowDiagram-KWPJA3E3-BRd_3uWq.js +1 -0
- package/dist/client/assets/{ganttDiagram-FUAMR5RP-C7I_nqgh.js → ganttDiagram-FUAMR5RP-B4UhUPVD.js} +1 -1
- package/dist/client/assets/{gitGraph-4MIJSDKK-BJpLoDlb.js → gitGraph-4MIJSDKK-B03FOBVa.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-X574FWY7-DFhuC-Rb.js → gitGraphDiagram-X574FWY7-CybhLjCJ.js} +1 -1
- package/dist/client/assets/index-BegbfTbp.js +93 -0
- package/dist/client/assets/{info-A6RAGUB7-BLikVQLs.js → info-A6RAGUB7-DvT6IPzh.js} +1 -1
- package/dist/client/assets/{infoDiagram-VRGFBTTK-BuEHO71F.js → infoDiagram-VRGFBTTK-Buj66Qti.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-OU5B5YK6-DFMfeW2E.js → ishikawaDiagram-OU5B5YK6-DXACcJqu.js} +1 -1
- package/dist/client/assets/{journeyDiagram-ZHPQQLJL-CTB146da.js → journeyDiagram-ZHPQQLJL-C3oi2FTw.js} +1 -1
- package/dist/client/assets/{kanban-definition-PNTS6WVX-8r22deVT.js → kanban-definition-PNTS6WVX-CKSGqUhu.js} +1 -1
- package/dist/client/assets/{line-CSUq9tDd.js → line-B8ynvvTM.js} +1 -1
- package/dist/client/assets/{linear-T3cnNwPj.js → linear-rsuuxg2X.js} +1 -1
- package/dist/client/assets/{mermaid-parser.core-QCdEYrye.js → mermaid-parser.core-DeKeZJ3Y.js} +3 -3
- package/dist/client/assets/{mermaid.core-BRH8LAdQ.js → mermaid.core-70lbADcC.js} +4 -4
- package/dist/client/assets/{mindmap-definition-NLK3R4M7-F92n7hZW.js → mindmap-definition-NLK3R4M7-DDuY48Uq.js} +1 -1
- package/dist/client/assets/{packet-AYTQ26CC-20aELlan.js → packet-AYTQ26CC-B0oRPa-1.js} +1 -1
- package/dist/client/assets/{pegDiagram-GJSIUBJH-DeFQFgFM.js → pegDiagram-GJSIUBJH-Dy9hxlwP.js} +1 -1
- package/dist/client/assets/{pie-WAS4IAKB-ClBZY8bG.js → pie-WAS4IAKB-DugeSiGc.js} +1 -1
- package/dist/client/assets/{pieDiagram-5QR66LMP-CcDXekON.js → pieDiagram-5QR66LMP-DGj6Sei1.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-O4NWA36T-BhpHJFDT.js → quadrantDiagram-O4NWA36T-BqXtSB0g.js} +1 -1
- package/dist/client/assets/{radar-RG4KPBEZ-Dlr7Lw2F.js → radar-RG4KPBEZ-Bs0T3I3e.js} +1 -1
- package/dist/client/assets/{railroad-74A4TZTK-DBtgFHX3.js → railroad-74A4TZTK-DYJx-n-7.js} +1 -1
- package/dist/client/assets/railroad-abnf-HS5TGJTU-uR7W81iW.js +1 -0
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-BHGUfY0n.js +1 -0
- package/dist/client/assets/railroad-peg-WCYAUIDC-O7-GYORB.js +1 -0
- package/dist/client/assets/{railroadDiagram-XR7U4H2S-DyP83oqZ.js → railroadDiagram-XR7U4H2S-CXdiQULA.js} +1 -1
- package/dist/client/assets/{requirementDiagram-PLB6GJNP-6tSvb8E_.js → requirementDiagram-PLB6GJNP-Bm3SrRx3.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-IPEJSGJF-DB3N2C4T.js → sankeyDiagram-IPEJSGJF-CkNgX2Ez.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-PO4LG4MO-BdLgUl7V.js → sequenceDiagram-PO4LG4MO-B5YPWkjn.js} +1 -1
- package/dist/client/assets/{src-BvmeK_-w.js → src-Do7M-gKD.js} +1 -1
- package/dist/client/assets/{stateDiagram-v2-GCMORJYK-DgmIAAtq.js → stateDiagram-v2-GCMORJYK-DAsRcrO8.js} +1 -1
- package/dist/client/assets/{swimlanes-2SLR337P-CGuG0DXr.js → swimlanes-2SLR337P-B_Vo0T35.js} +1 -1
- package/dist/client/assets/swimlanesDiagram-TC7HE7FX-Beo3TPph.js +8 -0
- package/dist/client/assets/{timeline-definition-EJHVYXUP-BWw3aGPy.js → timeline-definition-EJHVYXUP-B9c9U9LA.js} +1 -1
- package/dist/client/assets/{treeView-Q6P3EWNA-l8VtpJxe.js → treeView-Q6P3EWNA-0HaTq9Pa.js} +1 -1
- package/dist/client/assets/{treemap-WGGIJYW6-Cp_qtDl8.js → treemap-WGGIJYW6-CteTfKpY.js} +1 -1
- package/dist/client/assets/{usecaseDiagram-POWQR4AR-BXq3uA_V.js → usecaseDiagram-POWQR4AR-BU8VBKEg.js} +1 -1
- package/dist/client/assets/{vennDiagram-UO4OBE2U-0J7vWDX-.js → vennDiagram-UO4OBE2U-DgDSjyxl.js} +1 -1
- package/dist/client/assets/{wardley-WFR3VGLG-z_aeXQvi.js → wardley-WFR3VGLG-DoBbSTxP.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-VNRHLVJA-DWf3HNTA.js → wardleyDiagram-VNRHLVJA-B4ZaLucs.js} +1 -1
- package/dist/client/assets/{xychartDiagram-PMCCYNJV-DWxpNFi9.js → xychartDiagram-PMCCYNJV-DjnxHhkd.js} +1 -1
- package/dist/client/index.html +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/skills/diffo/SKILL.md +3 -0
- package/dist/client/assets/architecture-7GRP2DOG-BFR0RRUB.js +0 -1
- package/dist/client/assets/channel-DqbS8I7B.js +0 -1
- package/dist/client/assets/eventmodeling-NTZA5JFV-DmPAZ63r.js +0 -1
- package/dist/client/assets/flowDiagram-KWPJA3E3-8YgnZgsF.js +0 -1
- package/dist/client/assets/index-C47xobM0.js +0 -93
- package/dist/client/assets/railroad-abnf-HS5TGJTU-DnCwaKGs.js +0 -1
- package/dist/client/assets/railroad-ebnf-LZEXJU2U-Bn85hVcR.js +0 -1
- package/dist/client/assets/railroad-peg-WCYAUIDC-CHNLHRua.js +0 -1
- package/dist/client/assets/swimlanesDiagram-TC7HE7FX-CQzlAvK7.js +0 -8
package/dist/cli.mjs
CHANGED
|
@@ -393,6 +393,24 @@ function nextStepFor(kind, actionable) {
|
|
|
393
393
|
function prOpenNote(worktree, pr) {
|
|
394
394
|
return `this is pull request #${pr.number} by @${pr.author.login} — not your code. It is checked out at \`${worktree}\`; run your investigation from there (tests, grep, the code itself) and leave it as you found it. The reviewer's public comments go to GitHub when they finish; you never post there. \`${CLI} help agent\` has the pull-request section.`;
|
|
395
395
|
}
|
|
396
|
+
/**
|
|
397
|
+
* Printed by `diffo <PR>` instead of opening when the pull request is the
|
|
398
|
+
* user's own and was not spelled `diffo pr <PR>`. The one name covers two
|
|
399
|
+
* reviews that teach the agent opposite things — a local branch review where
|
|
400
|
+
* the agent fixes the user's own work, or the GitHub pull request review where
|
|
401
|
+
* it drafts comments for an author — so the user decides, through the agent,
|
|
402
|
+
* before anything is checked out.
|
|
403
|
+
*/
|
|
404
|
+
function ownPrAsk(target, pr, checkout) {
|
|
405
|
+
const base = `\`${CLI} --base ${pr.base.ref}\``;
|
|
406
|
+
const where = !checkout.sameRepo ? `${base} from a checkout of \`${pr.owner}/${pr.repo}\` on \`${pr.head.ref}\` (this checkout is a different repo)` : checkout.branch === pr.head.ref ? `${base}, right here` : `\`git checkout ${pr.head.ref}\` then ${base} (this checkout is on ${checkout.branch || "no branch"})`;
|
|
407
|
+
return [
|
|
408
|
+
`pull request #${pr.number} "${pr.title}" is yours (@${pr.viewer.login}), so nothing was opened: a pull request of your own names two different reviews, and the user picks.`,
|
|
409
|
+
` - Branch review — local only, nothing touches GitHub: ${where}. The review is of the user's own work and the agent fixes what they flag.`,
|
|
410
|
+
` - PR review — the GitHub pull request: \`${CLI} pr ${target}\`. Checked out in a worktree of its own; the agent is a copilot that drafts review comments, and the user's review posts to GitHub when they submit.`,
|
|
411
|
+
"ask: the commands above are for you, not the user. Say nothing about the CLI, exit codes, or that nothing opened — the user only reviews code. Ask exactly this, and nothing more: \"This pull request is yours. Branch review (local, I fix what you flag) or PR review (the GitHub pull request, I draft comments)?\" Then run the matching command. Someone who wants to fix their own changes means the branch review. Never pick for them."
|
|
412
|
+
].join("\n");
|
|
413
|
+
}
|
|
396
414
|
const ACK_NEXT_STEP = {
|
|
397
415
|
reply: `When every thread is handled, run \`${CLI_COMMANDS.poll}\` again to keep listening (${POLL_STANCE}).`,
|
|
398
416
|
replyMore: "Interim reply posted — the reviewer still sees you working on this thread. Post the follow-up as a plain reply (no --more) BEFORE your next poll: re-polling closes the batch and counts the promise as never kept.",
|
|
@@ -406,6 +424,15 @@ const ACK_NEXT_STEP = {
|
|
|
406
424
|
};
|
|
407
425
|
/** The pull-request section of `diffo help agent`. */
|
|
408
426
|
const HELP_AGENT_PR = `Reviewing a pull request (\`diffo <PR URL | owner/repo#N | #N>\`):
|
|
427
|
+
- The user's own pull request is not opened: the CLI stops and prints two
|
|
428
|
+
commands — a branch review (\`diffo --base <base>\`: local, nothing touches
|
|
429
|
+
GitHub, you fix what they flag) or a PR review (\`diffo pr <PR>\`: the
|
|
430
|
+
GitHub pull request, you draft comments). The commands are for you, and so
|
|
431
|
+
is the stop: say nothing about the CLI or what did not open. Ask the user
|
|
432
|
+
exactly "This pull request is yours. Branch review (local, I fix what you
|
|
433
|
+
flag) or PR review (the GitHub pull request, I draft comments)?", then run
|
|
434
|
+
their choice. Never pick for them; fixing their own changes means the
|
|
435
|
+
branch review.
|
|
409
436
|
- You did not write this code. It is checked out in a Diffo worktree whose
|
|
410
437
|
path the open prints; work from there — run the tests, read the code — and
|
|
411
438
|
leave it as you found it (\`git checkout -- .\`). Never commit or push.
|
|
@@ -1350,7 +1377,8 @@ The target:
|
|
|
1350
1377
|
(the short forms resolve against this repo's origin)
|
|
1351
1378
|
|
|
1352
1379
|
For the reviewer:
|
|
1353
|
-
pr <target> Review a pull request (the same as \`diffo <target
|
|
1380
|
+
pr <target> Review a pull request (the same as \`diffo <target>\`,
|
|
1381
|
+
and the explicit answer for a pull request of your own;
|
|
1354
1382
|
help pr explains the flow)
|
|
1355
1383
|
status Show this repo's review server, if one is running
|
|
1356
1384
|
(--json for a machine-readable answer)
|
|
@@ -1538,6 +1566,11 @@ reviews and comments are imported as threads; the agent you invite is a
|
|
|
1538
1566
|
copilot for code it did not write. Your public comments post to GitHub as one
|
|
1539
1567
|
review when you finish; nothing leaves before that.
|
|
1540
1568
|
|
|
1569
|
+
A pull request of your own is two reviews in one name, so \`diffo <PR>\` stops
|
|
1570
|
+
and asks which: a branch review (\`diffo --base <base>\` on the branch — local,
|
|
1571
|
+
nothing touches GitHub, your agent fixes what you flag) or a PR review
|
|
1572
|
+
(\`diffo pr <PR>\` — the GitHub pull request, your comments post when you submit).
|
|
1573
|
+
|
|
1541
1574
|
Needs the GitHub CLI signed in: gh auth login --hostname <host>. Every GitHub
|
|
1542
1575
|
call goes through your own gh; diffo holds no token.
|
|
1543
1576
|
|
|
@@ -1843,6 +1876,7 @@ function looksLikePr(word) {
|
|
|
1843
1876
|
}
|
|
1844
1877
|
function parseCliArgs(argv) {
|
|
1845
1878
|
let target;
|
|
1879
|
+
let explicitPr = false;
|
|
1846
1880
|
let rest = argv;
|
|
1847
1881
|
if (argv[0] !== void 0 && !argv[0].startsWith("-")) {
|
|
1848
1882
|
if (argv[0] === "help") return parseHelp(argv.slice(1));
|
|
@@ -1855,6 +1889,7 @@ function parseCliArgs(argv) {
|
|
|
1855
1889
|
message: "pr needs a pull request: a URL, owner/repo#N, #N, or N"
|
|
1856
1890
|
};
|
|
1857
1891
|
target = argv[1];
|
|
1892
|
+
explicitPr = true;
|
|
1858
1893
|
rest = argv.slice(2);
|
|
1859
1894
|
} else if (VERBS.has(argv[0])) return parseVerb(argv[0], argv.slice(1));
|
|
1860
1895
|
else {
|
|
@@ -1939,7 +1974,8 @@ function parseCliArgs(argv) {
|
|
|
1939
1974
|
...target !== void 0 ? { target } : {},
|
|
1940
1975
|
port,
|
|
1941
1976
|
open: !values["no-open"],
|
|
1942
|
-
foreground: values.foreground === true
|
|
1977
|
+
foreground: values.foreground === true,
|
|
1978
|
+
explicitPr
|
|
1943
1979
|
};
|
|
1944
1980
|
}
|
|
1945
1981
|
/**
|
|
@@ -8138,7 +8174,7 @@ function serverSpawnArgs(entry, execArgv, port, base, target) {
|
|
|
8138
8174
|
const args = [
|
|
8139
8175
|
...execArgv,
|
|
8140
8176
|
entry,
|
|
8141
|
-
...target !== void 0 ? [target] : [],
|
|
8177
|
+
...target !== void 0 ? ["pr", target] : [],
|
|
8142
8178
|
"--no-open",
|
|
8143
8179
|
"--foreground"
|
|
8144
8180
|
];
|
|
@@ -9171,7 +9207,7 @@ function rebuildDevClient(foreground) {
|
|
|
9171
9207
|
* there as an ordinary branch review, and the forge rides along so the server
|
|
9172
9208
|
* can pull the conversation and post the reviewer's comments.
|
|
9173
9209
|
*/
|
|
9174
|
-
async function openPullRequest(ref, baseOverride) {
|
|
9210
|
+
async function openPullRequest(target, ref, baseOverride, explicitPr) {
|
|
9175
9211
|
const forge = new GhClient();
|
|
9176
9212
|
const auth = await forge.authStatus(ref.host);
|
|
9177
9213
|
if (!auth.ok) fail(auth.message);
|
|
@@ -9181,6 +9217,15 @@ async function openPullRequest(ref, baseOverride) {
|
|
|
9181
9217
|
} catch (err) {
|
|
9182
9218
|
fail(`could not read pull request #${ref.number} from ${ref.host}/${ref.owner}/${ref.repo}: ${err.message}`);
|
|
9183
9219
|
}
|
|
9220
|
+
if (pr.viewer.isAuthor && !explicitPr) {
|
|
9221
|
+
const origin = parseRemoteUrl(getRemoteUrl(repoPath) ?? "");
|
|
9222
|
+
const sameRepo = origin !== null && origin.host === ref.host && origin.owner.toLowerCase() === ref.owner.toLowerCase() && origin.repo.toLowerCase() === ref.repo.toLowerCase();
|
|
9223
|
+
console.log(ownPrAsk(target, pr, {
|
|
9224
|
+
branch: getBranchName(repoPath),
|
|
9225
|
+
sameRepo
|
|
9226
|
+
}));
|
|
9227
|
+
process.exit(0);
|
|
9228
|
+
}
|
|
9184
9229
|
if (pr.state !== "open") process.stderr.write(`diffo: pull request #${pr.number} is ${pr.state}, opening it read-mostly\n`);
|
|
9185
9230
|
const mainRepo = mainRepoOf(repoPath);
|
|
9186
9231
|
const db = new DiffoDb();
|
|
@@ -9212,7 +9257,7 @@ if (command.target !== void 0) {
|
|
|
9212
9257
|
const parsed = parseTarget(command.target, getRemoteUrl(repoPath));
|
|
9213
9258
|
if (!parsed.ok) fail(parsed.error);
|
|
9214
9259
|
if (parsed.target.kind === "pr") {
|
|
9215
|
-
prOpen = await openPullRequest(parsed.target.ref, command.spec.kind === "branch" ? command.spec.base.replace(/^origin\//, "") : void 0);
|
|
9260
|
+
prOpen = await openPullRequest(command.target, parsed.target.ref, command.spec.kind === "branch" ? command.spec.base.replace(/^origin\//, "") : void 0, command.explicitPr);
|
|
9216
9261
|
root = prOpen.prepared.path;
|
|
9217
9262
|
repoPath = resolve(root);
|
|
9218
9263
|
spec = {
|
package/dist/client/assets/{abnfDiagram-O67JEVCF-CMnC6TpZ.js → abnfDiagram-O67JEVCF-DTuIcRnI.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e,t}from"./mermaid-parser.core-
|
|
1
|
+
import{m as e,t}from"./mermaid-parser.core-DeKeZJ3Y.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-Do7M-gKD.js";import"./chunk-O7XYJQB3-CEhzWv7d.js";import{n as i,r as a,t as o}from"./chunk-GTNCS2PH-vCx7ar7r.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";import"./mermaid.core-70lbADcC.js";var c=e().RailroadAbnf.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=n(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=n(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=n(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=n(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:n(e=>{o.clear(),r.debug(`[ABNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[ABNF Parser] Parsed rules:`,i.rules.length),h(i),r.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./path-fybaL0A-.js";import{a as n,c as r,d as i,f as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,u as p}from"./dist-
|
|
1
|
+
import{n as e,t}from"./path-fybaL0A-.js";import{a as n,c as r,d as i,f as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,u as p}from"./dist-CywLYZgD.js";function m(e){return e.innerRadius}function h(e){return e.outerRadius}function g(e){return e.startAngle}function _(e){return e.endAngle}function v(e){return e&&e.padAngle}function y(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function b(e,t,n,r,i,a,o){var c=e-n,l=t-r,u=(o?a:-a)/d(c*c+l*l),f=u*l,p=-u*c,m=e+f,h=t+p,g=n+f,_=r+p,v=(m+g)/2,y=(h+_)/2,b=g-m,x=_-h,S=b*b+x*x,C=i-a,w=m*_-g*h,T=(x<0?-1:1)*d(s(0,C*C*S-w*w)),E=(w*x-b*T)/S,D=(-w*b-x*T)/S,O=(w*x+b*T)/S,k=(-w*b+x*T)/S,A=E-v,j=D-y,M=O-v,N=k-y;return A*A+j*j>M*M+N*N&&(E=O,D=k),{cx:E,cy:D,x01:-f,y01:-p,x11:E*(i/C-1),y11:D*(i/C-1)}}function x(){var s=m,x=h,S=e(0),C=null,w=g,T=_,E=v,D=null,O=t(k);function k(){var e,t,m=+s.apply(this,arguments),h=+x.apply(this,arguments),g=w.apply(this,arguments)-r,_=T.apply(this,arguments)-r,v=l(_-g),k=_>g;if(D||=e=O(),h<m&&(t=h,h=m,m=t),!(h>1e-12))D.moveTo(0,0);else if(v>c-1e-12)D.moveTo(h*u(g),h*a(g)),D.arc(0,0,h,g,_,!k),m>1e-12&&(D.moveTo(m*u(_),m*a(_)),D.arc(0,0,m,_,g,k));else{var A=g,j=_,M=g,N=_,P=v,F=v,I=E.apply(this,arguments)/2,L=I>1e-12&&(C?+C.apply(this,arguments):d(m*m+h*h)),R=p(l(h-m)/2,+S.apply(this,arguments)),z=R,B=R,V,H;if(L>1e-12){var U=o(L/m*a(I)),W=o(L/h*a(I));(P-=U*2)>1e-12?(U*=k?1:-1,M+=U,N-=U):(P=0,M=N=(g+_)/2),(F-=W*2)>1e-12?(W*=k?1:-1,A+=W,j-=W):(F=0,A=j=(g+_)/2)}var G=h*u(A),K=h*a(A),q=m*u(N),J=m*a(N);if(R>1e-12){var Y=h*u(j),X=h*a(j),Z=m*u(M),Q=m*a(M),$;if(v<i){if($=y(G,K,Z,Q,Y,X,q,J)){var ee=G-$[0],te=K-$[1],ne=Y-$[0],re=X-$[1],ie=1/a(f((ee*ne+te*re)/(d(ee*ee+te*te)*d(ne*ne+re*re)))/2),ae=d($[0]*$[0]+$[1]*$[1]);z=p(R,(m-ae)/(ie-1)),B=p(R,(h-ae)/(ie+1))}else z=B=0}}F>1e-12?B>1e-12?(V=b(Z,Q,G,K,h,B,k),H=b(Y,X,q,J,h,B,k),D.moveTo(V.cx+V.x01,V.cy+V.y01),B<R?D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,h,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),!k),D.arc(H.cx,H.cy,B,n(H.y11,H.x11),n(H.y01,H.x01),!k))):(D.moveTo(G,K),D.arc(0,0,h,A,j,!k)):D.moveTo(G,K),!(m>1e-12)||!(P>1e-12)?D.lineTo(q,J):z>1e-12?(V=b(q,J,Y,X,m,-z,k),H=b(G,K,Z,Q,m,-z,k),D.lineTo(V.cx+V.x01,V.cy+V.y01),z<R?D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,m,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),k),D.arc(H.cx,H.cy,z,n(H.y11,H.x11),n(H.y01,H.x01),!k))):D.arc(0,0,m,N,M,k)}if(D.closePath(),e)return D=null,e+``||null}return k.centroid=function(){var e=(+s.apply(this,arguments)+ +x.apply(this,arguments))/2,t=(+w.apply(this,arguments)+ +T.apply(this,arguments))/2-i/2;return[u(t)*e,a(t)*e]},k.innerRadius=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),k):s},k.outerRadius=function(t){return arguments.length?(x=typeof t==`function`?t:e(+t),k):x},k.cornerRadius=function(t){return arguments.length?(S=typeof t==`function`?t:e(+t),k):S},k.padRadius=function(t){return arguments.length?(C=t==null?null:typeof t==`function`?t:e(+t),k):C},k.startAngle=function(t){return arguments.length?(w=typeof t==`function`?t:e(+t),k):w},k.endAngle=function(t){return arguments.length?(T=typeof t==`function`?t:e(+t),k):T},k.padAngle=function(t){return arguments.length?(E=typeof t==`function`?t:e(+t),k):E},k.context=function(e){return arguments.length?(D=e??null,k):D},k}export{x as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-FOHPRMQF-DzxwRta7.js";import{M as e}from"./mermaid-parser.core-DeKeZJ3Y.js";export{e as createArchitectureServices};
|