reslop 0.2.7 → 0.3.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/CHANGELOG.md +17 -1
- package/README.md +16 -14
- package/bin/reslop.js +8 -5
- package/lib/agents/agents.js +504 -0
- package/lib/agents/allow.js +71 -0
- package/lib/agents/allow.json +16 -0
- package/lib/agents/models.js +460 -0
- package/lib/api.js +15 -12
- package/lib/cli.js +43 -68
- package/lib/{files.js → common/files.js} +48 -55
- package/lib/{find.js → common/find.js} +1 -1
- package/lib/common/format.js +101 -0
- package/lib/{utilities.js → common/process.js} +7 -95
- package/lib/common/tasks.json +27 -0
- package/lib/common/utilities.js +112 -0
- package/lib/dashboard/git.js +9 -16
- package/lib/dashboard/model.js +90 -49
- package/lib/dashboard/npm.js +17 -13
- package/lib/dashboard/tree.js +27 -30
- package/lib/{session → dashboard}/watch.js +36 -31
- package/lib/{workspace.js → dashboard/workspace.js} +23 -38
- package/lib/{deps.js → deps/deps.js} +31 -45
- package/lib/{deps-diff.js → deps/diff.js} +35 -25
- package/lib/{manifest.js → deps/manifest.js} +47 -30
- package/lib/diff/align.js +1 -2
- package/lib/diff/diff.js +2 -2
- package/lib/diff/display.js +29 -5
- package/lib/diff/inline.js +10 -14
- package/lib/diff/items.js +6 -4
- package/lib/diff/patch.js +39 -3
- package/lib/diff/unit.js +45 -16
- package/lib/{git-branches.js → git/branches.js} +53 -48
- package/lib/{git-deps.js → git/deps.js} +123 -96
- package/lib/git/git.js +71 -0
- package/lib/git/worktree.js +475 -0
- package/lib/highlight/bash.js +1 -2
- package/lib/highlight/csv.js +1 -2
- package/lib/highlight/dot.js +1 -2
- package/lib/{highlight.js → highlight/highlight.js} +42 -11
- package/lib/highlight/html.js +20 -18
- package/lib/highlight/json.js +1 -2
- package/lib/highlight/log.js +1 -2
- package/lib/highlight/txt.js +1 -2
- package/lib/{session → input}/actions.js +111 -48
- package/lib/{editor.js → input/editor.js} +7 -8
- package/lib/{keys.js → input/keys.js} +15 -43
- package/lib/input/line-edit.js +77 -0
- package/lib/input/menu-pick.js +70 -0
- package/lib/render/agents.js +640 -0
- package/lib/render/branches.js +4 -5
- package/lib/render/commits.js +54 -64
- package/lib/render/{dash-activity.js → dashboard/activity.js} +25 -40
- package/lib/render/{dash-blocks.js → dashboard/blocks.js} +131 -137
- package/lib/render/{dashboard.js → dashboard/dashboard.js} +25 -22
- package/lib/render/diff.js +166 -45
- package/lib/render/field.js +131 -0
- package/lib/render/files.js +9 -14
- package/lib/render/footer.js +383 -0
- package/lib/render/frame.js +123 -25
- package/lib/render/header.js +176 -0
- package/lib/render/log.js +319 -0
- package/lib/render/menu.js +60 -0
- package/lib/render/notes.js +16 -11
- package/lib/render/npm.js +322 -196
- package/lib/render/packages.js +9 -13
- package/lib/render/primitives.js +101 -15
- package/lib/render/render.js +7 -11
- package/lib/render/repos.js +13 -25
- package/lib/render/status.js +370 -0
- package/lib/render/status.json +85 -0
- package/lib/render/{dash-table.js → table.js} +13 -60
- package/lib/render/tiles.js +109 -48
- package/lib/render/unit.js +32 -13
- package/lib/{report-model.js → report/model.js} +4 -6
- package/lib/{report-parse.js → report/parse.js} +9 -14
- package/lib/{report-render.js → report/render.js} +46 -14
- package/lib/{report-run.js → report/run.js} +42 -30
- package/lib/{report-test.js → report/test.js} +56 -55
- package/lib/{report-tools.js → report/tools.js} +24 -33
- package/lib/review/agent-instructions.md +9 -0
- package/lib/review/format.js +426 -0
- package/lib/{review-merge.js → review/merge.js} +9 -8
- package/lib/review/review.js +190 -0
- package/lib/review/store.js +281 -0
- package/lib/review/templates.js +83 -0
- package/lib/runs/commands.js +14 -0
- package/lib/runs/logs.js +299 -0
- package/lib/runs/output.js +174 -0
- package/lib/runs/process.js +113 -0
- package/lib/{runs.js → runs/runs.js} +84 -36
- package/lib/runs/scripts.js +150 -0
- package/lib/session/agents/agents.js +958 -0
- package/lib/session/agents/job.js +320 -0
- package/lib/session/agents/jobs.js +355 -0
- package/lib/session/agents/options.js +153 -0
- package/lib/session/agents/plans.js +83 -0
- package/lib/session/branches.js +33 -39
- package/lib/session/change-actions.js +34 -100
- package/lib/session/commit.js +91 -52
- package/lib/session/compose.js +181 -145
- package/lib/session/dashboard.js +23 -22
- package/lib/session/dispatch.js +85 -21
- package/lib/session/files-pane.js +47 -26
- package/lib/session/find.js +16 -29
- package/lib/session/import.js +82 -0
- package/lib/session/items.js +8 -17
- package/lib/session/lifecycle.js +75 -72
- package/lib/session/load.js +2 -4
- package/lib/session/navigation.js +6 -3
- package/lib/session/npm/history.js +249 -0
- package/lib/session/npm/npm.js +815 -0
- package/lib/session/{packages.js → npm/packages.js} +21 -14
- package/lib/session/ops.js +125 -34
- package/lib/session/pointer.js +202 -10
- package/lib/session/prefs.js +112 -0
- package/lib/session/reads.js +109 -0
- package/lib/session/review.js +28 -10
- package/lib/session/run-panel.js +40 -0
- package/lib/{session.js → session/session.js} +156 -63
- package/lib/session/tasks.js +320 -65
- package/lib/session/templates.js +1 -1
- package/lib/session/terminal.js +94 -12
- package/lib/session/unit.js +35 -30
- package/lib/session/update.js +194 -6
- package/lib/session/view.js +65 -65
- package/lib/session/workspace.js +39 -78
- package/lib/{capabilities.js → source/capabilities.js} +3 -12
- package/lib/{github.js → source/github.js} +102 -32
- package/lib/{gitlab.js → source/gitlab.js} +87 -10
- package/lib/{remote.js → source/remote.js} +144 -40
- package/lib/source/review-threads.graphql +20 -0
- package/lib/source/source.js +74 -0
- package/lib/term/ansi.js +396 -0
- package/lib/{clipboard.js → term/clipboard.js} +3 -6
- package/lib/{select.js → term/select.js} +2 -2
- package/lib/term/themes/dark.json +122 -0
- package/lib/term/themes/light.json +122 -0
- package/lib/term/wide.txt +21 -0
- package/lib/{wrap.js → term/wrap.js} +4 -4
- package/package.json +2 -2
- package/lib/ansi.js +0 -545
- package/lib/detect.js +0 -34
- package/lib/diff/edit.js +0 -33
- package/lib/git-worktree.js +0 -455
- package/lib/git.js +0 -79
- package/lib/npm-commands.js +0 -522
- package/lib/render/chrome.js +0 -806
- package/lib/render/present.js +0 -19
- package/lib/render/report.js +0 -43
- package/lib/render/search.js +0 -25
- package/lib/review.js +0 -745
- package/lib/session/accessors.js +0 -26
- package/lib/session/edit-click.js +0 -57
- package/lib/session/npm.js +0 -452
- package/lib/session/progress.js +0 -41
- package/lib/source.js +0 -36
- package/lib/update.js +0 -192
- /package/lib/{git-reword-todo.js → git/reword-todo.js} +0 -0
package/lib/render/present.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const ansi = require('../ansi.js');
|
|
4
|
-
const { ESC } = ansi;
|
|
5
|
-
|
|
6
|
-
const presentCursor = (cursor) => {
|
|
7
|
-
if (!cursor || cursor.x <= 0 || cursor.y <= 0) return `${ESC}[?25l`;
|
|
8
|
-
const pos = `${ESC}[${cursor.y};${cursor.x}H`;
|
|
9
|
-
return `${pos}${ESC}[1 q${ESC}[?12h${ESC}[?25h`;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const presentRows = (rows, options = {}) => {
|
|
13
|
-
let out = `${ESC}[?25l${ESC}[?2026h`;
|
|
14
|
-
if (options.clear === true) out += `${ESC}[H${ESC}[2J`;
|
|
15
|
-
for (let i = 0; i < rows.length; i++) out += `${ESC}[${i + 1};1H${rows[i]}`;
|
|
16
|
-
return `${out}${ESC}[?2026l${presentCursor(options.cursor)}`;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
module.exports = { presentCursor, presentRows };
|
package/lib/render/report.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const commands = require('../npm-commands.js');
|
|
4
|
-
const { formatTable } = commands;
|
|
5
|
-
const reportRender = require('../report-render.js');
|
|
6
|
-
const { summaryRows, problemRows, displayMessage, quoteLines } = reportRender;
|
|
7
|
-
|
|
8
|
-
const reportProblem = (item) => {
|
|
9
|
-
const title = item.name || item.message || item.code || 'problem';
|
|
10
|
-
const mark = item.severity === 'warning' ? '△' : '✖';
|
|
11
|
-
const count = item.count > 1 ? ` × ${item.count}` : '';
|
|
12
|
-
const lines = ['', `${mark} ${title.split('\n')[0]}${count}`, ''];
|
|
13
|
-
lines.push(...formatTable(problemRows(item)));
|
|
14
|
-
const message = displayMessage(item);
|
|
15
|
-
if (message) lines.push('', ...quoteLines(message));
|
|
16
|
-
if (item.trace) {
|
|
17
|
-
lines.push('', 'Stack');
|
|
18
|
-
for (const row of item.trace.split(/\r?\n/)) {
|
|
19
|
-
const frame = row.trim().replace(/^at\s+/, '');
|
|
20
|
-
if (frame) lines.push(` at ${frame}`);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
if (item.related.length) {
|
|
24
|
-
lines.push('', 'Related failures');
|
|
25
|
-
for (const row of item.related) lines.push(` ↳ ${row}`);
|
|
26
|
-
}
|
|
27
|
-
return lines;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const renderReport = (doc) => {
|
|
31
|
-
const lines = [];
|
|
32
|
-
for (const item of doc.reports) {
|
|
33
|
-
if (lines.length) lines.push('');
|
|
34
|
-
const mark = item.ok ? '✔' : '✖';
|
|
35
|
-
lines.push(`${mark} ${item.tool} · exit ${doc.exit}`, '');
|
|
36
|
-
lines.push(...formatTable(summaryRows(item.summary)));
|
|
37
|
-
for (const entry of item.problems) lines.push(...reportProblem(entry));
|
|
38
|
-
}
|
|
39
|
-
if (doc.stderr) lines.push('', 'Stderr', doc.stderr);
|
|
40
|
-
return `${lines.join('\n')}\n`;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
module.exports = { renderReport };
|
package/lib/render/search.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const ansi = require('../ansi.js');
|
|
4
|
-
const { THEME, paint } = ansi;
|
|
5
|
-
|
|
6
|
-
const paintPathText = (text, fg, bg, color, bold, spans) => {
|
|
7
|
-
if (!spans.length) return paint(text, fg, bg, color, bold);
|
|
8
|
-
let out = '';
|
|
9
|
-
let at = 0;
|
|
10
|
-
for (const span of spans) {
|
|
11
|
-
if (span.start > at) {
|
|
12
|
-
out += paint(text.slice(at, span.start), fg, bg, color, bold);
|
|
13
|
-
}
|
|
14
|
-
const on = span.on === true;
|
|
15
|
-
const markFg = on ? THEME.searchOnFg : THEME.searchFg;
|
|
16
|
-
const markBg = on ? THEME.searchOnBg : THEME.searchBg;
|
|
17
|
-
const slice = text.slice(span.start, span.end);
|
|
18
|
-
out += paint(slice, markFg, markBg, color, true);
|
|
19
|
-
at = span.end;
|
|
20
|
-
}
|
|
21
|
-
if (at < text.length) out += paint(text.slice(at), fg, bg, color, bold);
|
|
22
|
-
return out;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
module.exports = { paintPathText };
|