reslop 0.2.1 → 0.2.3
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 +14 -1
- package/README.md +11 -1
- package/lib/ansi.js +120 -4
- package/lib/cli.js +3 -0
- package/lib/deps.js +43 -3
- package/lib/git-branches.js +47 -15
- package/lib/keys.js +10 -4
- package/lib/npm-commands.js +513 -0
- package/lib/render/branches.js +21 -28
- package/lib/render/chrome.js +137 -122
- package/lib/render/commits.js +604 -54
- package/lib/render/frame.js +38 -4
- package/lib/render/npm.js +228 -0
- package/lib/render/primitives.js +7 -36
- package/lib/report-model.js +127 -0
- package/lib/report-parse.js +94 -0
- package/lib/report-render.js +87 -0
- package/lib/report-run.js +164 -0
- package/lib/report-test.js +506 -0
- package/lib/report-tools.js +311 -0
- package/lib/session/actions.js +51 -2
- package/lib/session/commit.js +94 -19
- package/lib/session/compose.js +48 -5
- package/lib/session/dispatch.js +30 -2
- package/lib/session/files-pane.js +20 -4
- package/lib/session/lifecycle.js +4 -1
- package/lib/session/navigation.js +1 -0
- package/lib/session/npm.js +335 -0
- package/lib/session/pointer.js +8 -0
- package/lib/session/view.js +14 -3
- package/lib/session.js +10 -2
- package/package.json +6 -6
package/lib/session.js
CHANGED
|
@@ -23,6 +23,7 @@ const { createOpsRunner } = require('./session/ops.js');
|
|
|
23
23
|
const { createChangeActions } = require('./session/change-actions.js');
|
|
24
24
|
const { createCommitController } = require('./session/commit.js');
|
|
25
25
|
const { createBranchController } = require('./session/branches.js');
|
|
26
|
+
const { createNpmController } = require('./session/npm.js');
|
|
26
27
|
const accessors = require('./session/accessors.js');
|
|
27
28
|
const { bindAccessors, bindGetters, bindAlias } = accessors;
|
|
28
29
|
const { createView } = require('./session/view.js');
|
|
@@ -32,7 +33,7 @@ const { createPointer } = require('./session/pointer.js');
|
|
|
32
33
|
const { createDispatcher, createInput } = require('./session/dispatch.js');
|
|
33
34
|
|
|
34
35
|
const CURSOR_BLINK_MS = 500;
|
|
35
|
-
const PROGRESS_MS =
|
|
36
|
+
const PROGRESS_MS = 160;
|
|
36
37
|
|
|
37
38
|
const NAV_FIELDS = [
|
|
38
39
|
'pane',
|
|
@@ -40,6 +41,7 @@ const NAV_FIELDS = [
|
|
|
40
41
|
'fileCursor',
|
|
41
42
|
'branchCursor',
|
|
42
43
|
'commitCursor',
|
|
44
|
+
'npmCursor',
|
|
43
45
|
'scroll',
|
|
44
46
|
'listScroll',
|
|
45
47
|
'reviewPath',
|
|
@@ -127,6 +129,7 @@ const assignControllers = (session) => {
|
|
|
127
129
|
session.changeActions = createChangeActions(session);
|
|
128
130
|
session.commits = createCommitController(session);
|
|
129
131
|
session.gitBranches = createBranchController(session);
|
|
132
|
+
session.npm = createNpmController(session);
|
|
130
133
|
};
|
|
131
134
|
|
|
132
135
|
const bindSessionAccessors = (session) => {
|
|
@@ -185,6 +188,7 @@ const bindViewer = (session) => {
|
|
|
185
188
|
review: session.review,
|
|
186
189
|
gitBranches: session.gitBranches,
|
|
187
190
|
commits: session.commits,
|
|
191
|
+
npm: session.npm,
|
|
188
192
|
updater: session.updater,
|
|
189
193
|
ui: session,
|
|
190
194
|
});
|
|
@@ -242,6 +246,7 @@ class Session {
|
|
|
242
246
|
if (this.ops) this.ops.reset();
|
|
243
247
|
if (this.gitBranches) this.gitBranches.reset();
|
|
244
248
|
if (this.commits) this.commits.reset();
|
|
249
|
+
if (this.npm) this.npm.reset();
|
|
245
250
|
this.top = this.cwd;
|
|
246
251
|
this.branch = '';
|
|
247
252
|
this.status = '';
|
|
@@ -312,10 +317,12 @@ class Session {
|
|
|
312
317
|
if (
|
|
313
318
|
this.pane === 'files' ||
|
|
314
319
|
this.pane === 'branches' ||
|
|
315
|
-
this.pane === 'commits'
|
|
320
|
+
this.pane === 'commits' ||
|
|
321
|
+
this.pane === 'npm'
|
|
316
322
|
) {
|
|
317
323
|
this.nav.listScroll = frame.listScroll;
|
|
318
324
|
}
|
|
325
|
+
if (this.nav.todoOpen) this.nav.scroll = frame.scroll;
|
|
319
326
|
const composing = this.mode === 'compose';
|
|
320
327
|
const cursor = composing && this.blinkOn ? frame.cursor : null;
|
|
321
328
|
this.term.paint(frame, size, cursor);
|
|
@@ -402,6 +409,7 @@ class Session {
|
|
|
402
409
|
if (!result) return;
|
|
403
410
|
if (result.kind === 'commit') this.commits.finishGitCommit();
|
|
404
411
|
if (result.kind === 'branch') this.gitBranches.finishCreateBranch();
|
|
412
|
+
if (result.kind === 'npm') this.npm.finishEdit();
|
|
405
413
|
}
|
|
406
414
|
|
|
407
415
|
selectTemplate(index) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reslop",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Interactive code review and repair planning for AI-assisted changes",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"code-review",
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
"CHANGELOG.md"
|
|
47
47
|
],
|
|
48
48
|
"engines": {
|
|
49
|
-
"node": ">=18"
|
|
49
|
+
"node": ">=18.15.0"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
|
+
"test": "reslop t -- npm run -s lint && reslop t -- node --test",
|
|
53
|
+
"lint": "reslop t -- eslint . && reslop t -- prettier -c \"**/*.js\" \"**/*.json\" \"**/*.md\"",
|
|
54
|
+
"fix": "reslop t -- eslint . --fix && reslop t -- prettier --write \"**/*.js\" \"**/*.json\" \"**/*.md\"",
|
|
52
55
|
"enable": "node scripts/enable.js",
|
|
53
|
-
"disable": "node scripts/disable.js"
|
|
54
|
-
"lint": "eslint . && prettier -c \"**/*.js\" \"**/*.json\" \"**/*.md\"",
|
|
55
|
-
"fix": "eslint . --fix && prettier --write \"**/*.js\" \"**/*.json\" \"**/*.md\"",
|
|
56
|
-
"test": "npm run -s lint && node --test"
|
|
56
|
+
"disable": "node scripts/disable.js"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"eslint": "^9.39.4",
|