next-issue 8.2.4 → 8.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/README.md +4 -0
- package/dist/cli.mjs +11 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -647,6 +647,10 @@ there already; `--force` replaces it. The file holds no
|
|
|
647
647
|
`setupCommand`, because the harness deduces one from the lock file of the
|
|
648
648
|
project.
|
|
649
649
|
|
|
650
|
+
`start` and `serve` also add the two lines to `info/exclude` and remove them
|
|
651
|
+
from `.gitignore`, so a repository needs no `init` to run. They do not write
|
|
652
|
+
the config file.
|
|
653
|
+
|
|
650
654
|
With no file, every field keeps its default. A field that is not in the file
|
|
651
655
|
keeps its default. A file that cannot be read, a file that is not valid
|
|
652
656
|
JSON, a field with a value of the wrong type and a field name that the harness
|
package/dist/cli.mjs
CHANGED
|
@@ -35,15 +35,16 @@ async function main() {
|
|
|
35
35
|
return init(root, args.force);
|
|
36
36
|
}
|
|
37
37
|
await rejectOldConfig(root);
|
|
38
|
-
if (args.command === 'serve') {
|
|
39
|
-
return serve(root);
|
|
40
|
-
}
|
|
41
38
|
if (args.command === 'stop') {
|
|
42
39
|
return stop(root);
|
|
43
40
|
}
|
|
44
41
|
if (args.command === 'logs') {
|
|
45
42
|
return logs(root, args.json);
|
|
46
43
|
}
|
|
44
|
+
await excludeStateDirectories(root, process.stderr);
|
|
45
|
+
if (args.command === 'serve') {
|
|
46
|
+
return serve(root);
|
|
47
|
+
}
|
|
47
48
|
return run(root, args);
|
|
48
49
|
}
|
|
49
50
|
function run(root, args) {
|
|
@@ -74,7 +75,6 @@ async function logs(root, json) {
|
|
|
74
75
|
return followLog(root, file, { json, tail }, (text) => write(process.stdout, text));
|
|
75
76
|
}
|
|
76
77
|
async function init(root, force) {
|
|
77
|
-
const exclude = await excludeFile(root);
|
|
78
78
|
const moved = await moveOldConfig(root, force);
|
|
79
79
|
if (moved === undefined) {
|
|
80
80
|
await write(process.stdout, `wrote ${await writeDefaultConfig(root, force)}\n`);
|
|
@@ -82,16 +82,20 @@ async function init(root, force) {
|
|
|
82
82
|
else {
|
|
83
83
|
await write(process.stdout, `moved ${OLD_CONFIG_FILE} to ${moved}\n`);
|
|
84
84
|
}
|
|
85
|
+
await excludeStateDirectories(root, process.stdout);
|
|
86
|
+
return 0;
|
|
87
|
+
}
|
|
88
|
+
async function excludeStateDirectories(root, stream) {
|
|
89
|
+
const exclude = await excludeFile(root);
|
|
85
90
|
const entries = [STATE_DIR, WORKTREE_DIR].map((directory) => `${directory}/`);
|
|
86
91
|
for (const entry of entries) {
|
|
87
92
|
if (await ensureExcluded(exclude, entry)) {
|
|
88
|
-
await write(
|
|
93
|
+
await write(stream, `added ${entry} to ${exclude}\n`);
|
|
89
94
|
}
|
|
90
95
|
}
|
|
91
96
|
for (const entry of await removeIgnored(root, entries)) {
|
|
92
|
-
await write(
|
|
97
|
+
await write(stream, `removed ${entry} from .gitignore\n`);
|
|
93
98
|
}
|
|
94
|
-
return 0;
|
|
95
99
|
}
|
|
96
100
|
main().then((code) => process.exit(code), async (error) => {
|
|
97
101
|
await write(process.stderr, `next-issue failed: ${message(error)}\n`);
|