@staff0rd/assist 0.1059.2 → 0.1060.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/built-version +1 -1
- package/dist/commands/sessions/web/bundle.js +407 -407
- package/dist/index.js +24 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.
|
|
9
|
+
version: "0.1060.0",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -4155,7 +4155,12 @@ function applyCwdFromReq(req) {
|
|
|
4155
4155
|
async function getDocsRefresh(req, res) {
|
|
4156
4156
|
applyCwdFromReq(req);
|
|
4157
4157
|
const { orm } = await getReady();
|
|
4158
|
-
|
|
4158
|
+
const state = await loadDocsRefreshState(orm, getOrigin());
|
|
4159
|
+
const view = {
|
|
4160
|
+
...state,
|
|
4161
|
+
enabled: docsRefreshAfter() !== void 0
|
|
4162
|
+
};
|
|
4163
|
+
respondJson(res, 200, view);
|
|
4159
4164
|
}
|
|
4160
4165
|
|
|
4161
4166
|
// src/commands/backlog/requestDocsRefresh.ts
|
|
@@ -4174,6 +4179,12 @@ async function requestDocsRefresh(orm, origin) {
|
|
|
4174
4179
|
// src/commands/backlog/web/postDocsRefresh.ts
|
|
4175
4180
|
async function postDocsRefresh(req, res) {
|
|
4176
4181
|
applyCwdFromReq(req);
|
|
4182
|
+
if (docsRefreshAfter() === void 0) {
|
|
4183
|
+
respondJson(res, 409, {
|
|
4184
|
+
error: "Refresh docs is off for this repo; run `assist config set docs.refreshAfter <n>` to turn it on"
|
|
4185
|
+
});
|
|
4186
|
+
return;
|
|
4187
|
+
}
|
|
4177
4188
|
const { orm } = await getReady();
|
|
4178
4189
|
respondJson(res, 200, await requestDocsRefresh(orm, getOrigin()));
|
|
4179
4190
|
}
|
|
@@ -6291,7 +6302,7 @@ var backlogConfigHelp = [
|
|
|
6291
6302
|
{
|
|
6292
6303
|
key: "docs.refreshAfter",
|
|
6293
6304
|
setter: "assist config set docs.refreshAfter 5",
|
|
6294
|
-
note: "queue a 'Refresh docs' item once this many done stories are unswept (unset: off)"
|
|
6305
|
+
note: "queue a 'Refresh docs' item once this many done stories are unswept (unset: Refresh docs is off \u2014 no button, no refresh-docs, no docs locking)"
|
|
6295
6306
|
}
|
|
6296
6307
|
];
|
|
6297
6308
|
|
|
@@ -20797,6 +20808,15 @@ function registerRefineCommand(cmd) {
|
|
|
20797
20808
|
// src/commands/backlog/refreshDocs.ts
|
|
20798
20809
|
import chalk88 from "chalk";
|
|
20799
20810
|
async function refreshDocs() {
|
|
20811
|
+
if (docsRefreshAfter() === void 0) {
|
|
20812
|
+
console.error(
|
|
20813
|
+
chalk88.red(
|
|
20814
|
+
"Refresh docs is off for this repo; run `assist config set docs.refreshAfter <n>` to turn it on"
|
|
20815
|
+
)
|
|
20816
|
+
);
|
|
20817
|
+
process.exitCode = 1;
|
|
20818
|
+
return;
|
|
20819
|
+
}
|
|
20800
20820
|
const { orm } = await getReady();
|
|
20801
20821
|
const result = await requestDocsRefresh(orm, getOrigin());
|
|
20802
20822
|
if (result.outcome === "created")
|
|
@@ -20815,7 +20835,7 @@ async function refreshDocs() {
|
|
|
20815
20835
|
// src/commands/backlog/registerRefreshDocsCommand.ts
|
|
20816
20836
|
function registerRefreshDocsCommand(cmd) {
|
|
20817
20837
|
cmd.command("refresh-docs").description(
|
|
20818
|
-
"Create a Refresh docs item now for every done story not yet swept,
|
|
20838
|
+
"Create a Refresh docs item now for every done story not yet swept, without waiting for docs.refreshAfter (refused when docs.refreshAfter is unset: Refresh docs is off)"
|
|
20819
20839
|
).action(refreshDocs);
|
|
20820
20840
|
}
|
|
20821
20841
|
|