next-issue 16.9.0 → 16.9.1
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/skills.mjs +1 -1
- package/dist/cli/start.mjs +1 -1
- package/dist/shared/args.mjs +13 -13
- package/dist/shared/config.mjs +2 -2
- package/dist/worker/serve.mjs +1 -1
- package/package.json +1 -1
package/dist/cli/skills.mjs
CHANGED
|
@@ -31,7 +31,7 @@ export async function chooseScope(scope) {
|
|
|
31
31
|
return scope;
|
|
32
32
|
}
|
|
33
33
|
if (process.stdin.isTTY !== true) {
|
|
34
|
-
throw new Error('init needs
|
|
34
|
+
throw new Error('`init` needs `--scope user|project` when there is no terminal to ask where to install the skills');
|
|
35
35
|
}
|
|
36
36
|
return askScope(process.stdin, process.stdout);
|
|
37
37
|
}
|
package/dist/cli/start.mjs
CHANGED
|
@@ -9,7 +9,7 @@ const REFUSED_GOING = [
|
|
|
9
9
|
'the worker is restarting, try again soon',
|
|
10
10
|
];
|
|
11
11
|
const SILENT = 'the next-issue worker did not answer';
|
|
12
|
-
const STARTED = 'the run started in the worker; follow it with npx -y next-issue@latest logs and stop it with npx -y next-issue@latest stop
|
|
12
|
+
const STARTED = 'the run started in the worker; follow it with `npx -y next-issue@latest logs` and stop it with `npx -y next-issue@latest stop`\n';
|
|
13
13
|
export async function startInWorker(root, argv) {
|
|
14
14
|
const version = await packageVersion();
|
|
15
15
|
const given = givenStartFlags(argv);
|
package/dist/shared/args.mjs
CHANGED
|
@@ -31,31 +31,31 @@ export function parseArgs(argv) {
|
|
|
31
31
|
return args;
|
|
32
32
|
}
|
|
33
33
|
if (args.command === undefined && flag !== undefined) {
|
|
34
|
-
throw new Error('no command given: use npx -y next-issue@latest start to start a run, or see npx -y next-issue@latest --help');
|
|
34
|
+
throw new Error('no command given: use `npx -y next-issue@latest start` to start a run, or see `npx -y next-issue@latest --help`');
|
|
35
35
|
}
|
|
36
36
|
if (args.command !== undefined && args.command !== 'start' && runFlag !== undefined) {
|
|
37
|
-
throw new Error(
|
|
37
|
+
throw new Error(`\`${args.command}\` does not take \`${runFlag}\`: it belongs to \`start\``);
|
|
38
38
|
}
|
|
39
39
|
if (args.command !== undefined && args.command !== 'init' && args.scope !== undefined) {
|
|
40
|
-
throw new Error(
|
|
40
|
+
throw new Error(`\`${args.command}\` does not take \`--scope\`: it belongs to \`init\``);
|
|
41
41
|
}
|
|
42
42
|
if ((args.command === 'watch' || args.command === 'hunt') && args.on === undefined) {
|
|
43
|
-
throw new Error(
|
|
43
|
+
throw new Error(`\`${args.command}\` takes \`on\` or \`off\``);
|
|
44
44
|
}
|
|
45
45
|
if (args.command !== undefined && args.command !== 'init' && args.force) {
|
|
46
|
-
throw new Error(
|
|
46
|
+
throw new Error(`\`${args.command}\` does not take \`--force\`: it belongs to \`init\``);
|
|
47
47
|
}
|
|
48
48
|
return args;
|
|
49
49
|
}
|
|
50
50
|
function onOffValue(name, value) {
|
|
51
51
|
if (value !== 'on' && value !== 'off') {
|
|
52
|
-
throw new Error(
|
|
52
|
+
throw new Error(`\`${name}\` takes \`on\` or \`off\``);
|
|
53
53
|
}
|
|
54
54
|
return value === 'on';
|
|
55
55
|
}
|
|
56
56
|
function scopeValue(value) {
|
|
57
57
|
if (value !== 'user' && value !== 'project') {
|
|
58
|
-
throw new Error('
|
|
58
|
+
throw new Error('`--scope` takes `user` or `project`');
|
|
59
59
|
}
|
|
60
60
|
return value;
|
|
61
61
|
}
|
|
@@ -96,11 +96,11 @@ function readArgs(passed) {
|
|
|
96
96
|
given[RUN_FLAGS.get(arg)] = onOffValue(arg, argv[index]);
|
|
97
97
|
}
|
|
98
98
|
else {
|
|
99
|
-
throw new Error(`Unknown argument:
|
|
99
|
+
throw new Error(`Unknown argument: \`${arg}\``);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
if (given.hunt === true && given.watch === false) {
|
|
103
|
-
throw new Error('hunting needs watching:
|
|
103
|
+
throw new Error('hunting needs watching: `--hunt on` does not go with `--watch off`');
|
|
104
104
|
}
|
|
105
105
|
args.watch = given.watch ?? true;
|
|
106
106
|
args.hunt = given.hunt ?? false;
|
|
@@ -109,7 +109,7 @@ function readArgs(passed) {
|
|
|
109
109
|
function command(arg) {
|
|
110
110
|
const found = COMMANDS.find((name) => name === arg);
|
|
111
111
|
if (found === undefined) {
|
|
112
|
-
throw new Error(`Unknown command:
|
|
112
|
+
throw new Error(`Unknown command: \`${arg}\``);
|
|
113
113
|
}
|
|
114
114
|
return found;
|
|
115
115
|
}
|
|
@@ -117,14 +117,14 @@ const OUTPUT_ONLY = ['force', 'help'];
|
|
|
117
117
|
export function parseStartArgs(argv) {
|
|
118
118
|
const { args } = readArgs(argv);
|
|
119
119
|
if (args.command !== undefined) {
|
|
120
|
-
throw new Error(
|
|
120
|
+
throw new Error(`\`start\` does not take \`${args.command}\``);
|
|
121
121
|
}
|
|
122
122
|
if (args.scope !== undefined) {
|
|
123
|
-
throw new Error('start does not take
|
|
123
|
+
throw new Error('`start` does not take `--scope`');
|
|
124
124
|
}
|
|
125
125
|
const refused = OUTPUT_ONLY.find((name) => args[name]);
|
|
126
126
|
if (refused !== undefined) {
|
|
127
|
-
throw new Error(
|
|
127
|
+
throw new Error(`\`start\` does not take \`--${refused}\``);
|
|
128
128
|
}
|
|
129
129
|
return { ...args, command: 'start' };
|
|
130
130
|
}
|
package/dist/shared/config.mjs
CHANGED
|
@@ -83,7 +83,7 @@ function configFile(root) {
|
|
|
83
83
|
return join(root, CONFIG_FILE);
|
|
84
84
|
}
|
|
85
85
|
function existsAlready() {
|
|
86
|
-
return new Error(`${CONFIG_FILE} exists already. Use
|
|
86
|
+
return new Error(`${CONFIG_FILE} exists already. Use \`--force\` to replace it.`);
|
|
87
87
|
}
|
|
88
88
|
export async function writeDefaultConfig(root, force) {
|
|
89
89
|
const path = configFile(root);
|
|
@@ -114,7 +114,7 @@ export async function moveOldConfig(root, force) {
|
|
|
114
114
|
}
|
|
115
115
|
export async function rejectOldConfig(root) {
|
|
116
116
|
if ((await readTextIfPresent(join(root, OLD_CONFIG_FILE))) !== undefined) {
|
|
117
|
-
throw new Error(`${OLD_CONFIG_FILE} moved to ${CONFIG_FILE}. Run npx -y next-issue@latest init to move it.`);
|
|
117
|
+
throw new Error(`${OLD_CONFIG_FILE} moved to ${CONFIG_FILE}. Run \`npx -y next-issue@latest init\` to move it.`);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
export async function loadConfig(root, options = {}) {
|
package/dist/worker/serve.mjs
CHANGED
|
@@ -169,7 +169,7 @@ export async function startWorker(options) {
|
|
|
169
169
|
const stop = (socket, refuse, root, after, id) => {
|
|
170
170
|
const point = stopPoint(after);
|
|
171
171
|
if (point === undefined) {
|
|
172
|
-
refuse(
|
|
172
|
+
refuse(`\`stop\` does not take \`--after ${String(after)}\``);
|
|
173
173
|
return;
|
|
174
174
|
}
|
|
175
175
|
const run = runs.get(root);
|