@staff0rd/assist 0.32.2 → 0.32.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/dist/index.js +12 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2628,7 +2628,7 @@ async function runVerifyQuietly() {
|
|
|
2628
2628
|
const results = await Promise.all(
|
|
2629
2629
|
verifyScripts.map(
|
|
2630
2630
|
(script) => new Promise(
|
|
2631
|
-
(
|
|
2631
|
+
(resolve2) => {
|
|
2632
2632
|
const child = spawn2("npm", ["run", script], {
|
|
2633
2633
|
stdio: "pipe",
|
|
2634
2634
|
shell: true,
|
|
@@ -2642,7 +2642,7 @@ async function runVerifyQuietly() {
|
|
|
2642
2642
|
output += data.toString();
|
|
2643
2643
|
});
|
|
2644
2644
|
child.on("close", (code) => {
|
|
2645
|
-
|
|
2645
|
+
resolve2({ script, code: code ?? 1, output });
|
|
2646
2646
|
});
|
|
2647
2647
|
}
|
|
2648
2648
|
)
|
|
@@ -2856,9 +2856,9 @@ function createReadlineInterface() {
|
|
|
2856
2856
|
});
|
|
2857
2857
|
}
|
|
2858
2858
|
function askQuestion(rl, question) {
|
|
2859
|
-
return new Promise((
|
|
2859
|
+
return new Promise((resolve2) => {
|
|
2860
2860
|
rl.question(question, (answer) => {
|
|
2861
|
-
|
|
2861
|
+
resolve2(answer.trim());
|
|
2862
2862
|
});
|
|
2863
2863
|
});
|
|
2864
2864
|
}
|
|
@@ -3140,9 +3140,9 @@ function createReadlineInterface2() {
|
|
|
3140
3140
|
});
|
|
3141
3141
|
}
|
|
3142
3142
|
function askQuestion2(rl, question) {
|
|
3143
|
-
return new Promise((
|
|
3143
|
+
return new Promise((resolve2) => {
|
|
3144
3144
|
rl.question(question, (answer) => {
|
|
3145
|
-
|
|
3145
|
+
resolve2(answer.trim());
|
|
3146
3146
|
});
|
|
3147
3147
|
});
|
|
3148
3148
|
}
|
|
@@ -3287,7 +3287,7 @@ import {
|
|
|
3287
3287
|
renameSync as renameSync2,
|
|
3288
3288
|
rmSync
|
|
3289
3289
|
} from "fs";
|
|
3290
|
-
import { basename as basename5, dirname as dirname12, join as join16, relative as relative2 } from "path";
|
|
3290
|
+
import { basename as basename5, dirname as dirname12, join as join16, relative as relative2, resolve } from "path";
|
|
3291
3291
|
import chalk35 from "chalk";
|
|
3292
3292
|
var STAGING_DIR = join16(process.cwd(), ".assist", "transcript");
|
|
3293
3293
|
var FULL_TRANSCRIPT_REGEX = /^\[Full Transcript\]\(([^)]+)\)/;
|
|
@@ -3312,7 +3312,7 @@ function processStagedFile() {
|
|
|
3312
3312
|
);
|
|
3313
3313
|
process.exit(1);
|
|
3314
3314
|
}
|
|
3315
|
-
const transcriptPath = match[1];
|
|
3315
|
+
const transcriptPath = resolve(process.cwd(), match[1]);
|
|
3316
3316
|
const contentAfterLink = content.slice(firstLine.length).trim();
|
|
3317
3317
|
if (!contentAfterLink) {
|
|
3318
3318
|
console.error(
|
|
@@ -3382,6 +3382,7 @@ function summarise() {
|
|
|
3382
3382
|
const next2 = missing[0];
|
|
3383
3383
|
const outputFilename = `${getTranscriptBaseName(next2.filename)}.md`;
|
|
3384
3384
|
const outputPath = join16(STAGING_DIR, outputFilename);
|
|
3385
|
+
const relativeTranscriptPath = relative2(process.cwd(), next2.absolutePath);
|
|
3385
3386
|
console.log(`Missing summaries: ${missing.length}
|
|
3386
3387
|
`);
|
|
3387
3388
|
console.log("Read and summarise this transcript:");
|
|
@@ -3391,7 +3392,7 @@ function summarise() {
|
|
|
3391
3392
|
console.log(` ${outputPath}
|
|
3392
3393
|
`);
|
|
3393
3394
|
console.log("The summary must start with:");
|
|
3394
|
-
console.log(` [Full Transcript](${
|
|
3395
|
+
console.log(` [Full Transcript](${relativeTranscriptPath})`);
|
|
3395
3396
|
}
|
|
3396
3397
|
|
|
3397
3398
|
// src/commands/verify/hardcodedColors.ts
|
|
@@ -3470,7 +3471,7 @@ async function run2(options = {}) {
|
|
|
3470
3471
|
}));
|
|
3471
3472
|
const results = await Promise.all(
|
|
3472
3473
|
verifyScripts.map(
|
|
3473
|
-
(script, index) => new Promise((
|
|
3474
|
+
(script, index) => new Promise((resolve2) => {
|
|
3474
3475
|
const child = spawn4("npm", ["run", script], {
|
|
3475
3476
|
stdio: "inherit",
|
|
3476
3477
|
shell: true,
|
|
@@ -3483,7 +3484,7 @@ async function run2(options = {}) {
|
|
|
3483
3484
|
taskStatuses[index].code = exitCode;
|
|
3484
3485
|
printTaskStatuses(taskStatuses);
|
|
3485
3486
|
}
|
|
3486
|
-
|
|
3487
|
+
resolve2({ script, code: exitCode });
|
|
3487
3488
|
});
|
|
3488
3489
|
})
|
|
3489
3490
|
)
|