bdy 1.25.38-dev-pr → 1.25.39-dev
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/distTs/package.json +1 -2
- package/distTs/src/api/client.js +17 -191
- package/distTs/src/cliError.js +0 -5
- package/distTs/src/cliIndex.js +0 -3
- package/distTs/src/command/artifact/version/create.js +28 -1
- package/distTs/src/command/artifact/version/get.js +1 -0
- package/distTs/src/command/artifact/version/list.js +2 -1
- package/distTs/src/command/login.js +1 -1
- package/distTs/src/input.js +15 -0
- package/distTs/src/output/pipeline.js +56 -54
- package/distTs/src/output.js +22 -72
- package/distTs/src/texts.js +37 -472
- package/distTs/src/tunnel/output/interactive/tunnel.js +10 -14
- package/distTs/src/tunnel/output/noninteractive/tunnel.js +1 -3
- package/distTs/src/utils.js +12 -133
- package/package.json +1 -2
- package/distTs/src/autocomplete.js +0 -90
- package/distTs/src/command/artifact/downloadDir.js +0 -110
- package/distTs/src/command/autocomplete/install.js +0 -16
- package/distTs/src/command/autocomplete/uninstall.js +0 -16
- package/distTs/src/command/autocomplete.js +0 -14
- package/distTs/src/command/environment/resolve.js +0 -39
- package/distTs/src/command/package/create.js +0 -64
- package/distTs/src/command/package/delete.js +0 -38
- package/distTs/src/command/package/docker/login.js +0 -26
- package/distTs/src/command/package/docker.js +0 -11
- package/distTs/src/command/package/download.js +0 -138
- package/distTs/src/command/package/get.js +0 -36
- package/distTs/src/command/package/list.js +0 -31
- package/distTs/src/command/package/publish.js +0 -241
- package/distTs/src/command/package/version/delete.js +0 -39
- package/distTs/src/command/package/version/get.js +0 -45
- package/distTs/src/command/package/version/list.js +0 -47
- package/distTs/src/command/package/version.js +0 -16
- package/distTs/src/command/package.js +0 -26
- package/distTs/src/command/pipeline/run/apply.js +0 -62
- package/distTs/src/command/pr/comment/add.js +0 -66
- package/distTs/src/command/pr/comment/list.js +0 -169
- package/distTs/src/command/pr/comment/status.js +0 -48
- package/distTs/src/command/pr/comment.js +0 -19
- package/distTs/src/command/pr/create.js +0 -43
- package/distTs/src/command/pr/diff.js +0 -227
- package/distTs/src/command/pr/file/list.js +0 -124
- package/distTs/src/command/pr/file/mark.js +0 -45
- package/distTs/src/command/pr/file.js +0 -16
- package/distTs/src/command/pr/get.js +0 -29
- package/distTs/src/command/pr/list.js +0 -79
- package/distTs/src/command/pr/merge.js +0 -66
- package/distTs/src/command/pr/review/request.js +0 -29
- package/distTs/src/command/pr/review/start.js +0 -29
- package/distTs/src/command/pr/review/verdict.js +0 -81
- package/distTs/src/command/pr/review.js +0 -18
- package/distTs/src/command/pr/shared.js +0 -595
- package/distTs/src/command/pr/state.js +0 -38
- package/distTs/src/command/pr/summary.js +0 -316
- package/distTs/src/command/pr/update.js +0 -54
- package/distTs/src/command/pr/updateBranch.js +0 -22
- package/distTs/src/command/pr/versions.js +0 -42
- package/distTs/src/command/pr.js +0 -39
- package/distTs/src/command/scrape/validation.js +0 -154
- package/distTs/src/command/scrape.js +0 -144
- package/distTs/src/command/suiteLink.js +0 -14
- package/distTs/src/command/tests/visual/result/download.js +0 -31
- package/distTs/src/command/tests/visual/result/get.js +0 -68
- package/distTs/src/command/tests/visual/result/list.js +0 -49
- package/distTs/src/command/tests/visual/result.js +0 -23
- package/distTs/src/command/tests/visual/session/get.js +0 -70
- package/distTs/src/command/tests/visual/session/list.js +0 -69
- package/distTs/src/command/tests/visual/session/open.js +0 -22
- package/distTs/src/command/tests/visual/session/reviewUrl.js +0 -37
- package/distTs/src/command/tests/visual/session/update.js +0 -26
- package/distTs/src/command/tests/visual/shared/context.js +0 -144
- package/distTs/src/command/tests/visual/shared/diffRegions.js +0 -172
- package/distTs/src/command/tests/visual/shared/format.js +0 -21
- package/distTs/src/command/tests/visual/shared/lookup.js +0 -107
- package/distTs/src/command/tests/visual/shared/options.js +0 -90
- package/distTs/src/command/tests/visual/shared/review.js +0 -146
- package/distTs/src/command/tests/visual/shared/reviewUrl.js +0 -62
- package/distTs/src/command/tests/visual/shared/session.js +0 -217
- package/distTs/src/command/tests/visual/snapshot/get.js +0 -46
- package/distTs/src/command/tests/visual/snapshot/list.js +0 -68
- package/distTs/src/command/tests/visual/snapshot/open.js +0 -26
- package/distTs/src/command/tests/visual/snapshot/reviewUrl.js +0 -48
- package/distTs/src/command/tests/visual/snapshot.js +0 -28
- package/distTs/src/command/tests/visual/suite/create.js +0 -38
- package/distTs/src/command/tests/visual/suite/delete.js +0 -29
- package/distTs/src/command/tests/visual/suite/get.js +0 -43
- package/distTs/src/command/tests/visual/suite/list.js +0 -35
- package/distTs/src/command/tests/visual/suite/open.js +0 -20
- package/distTs/src/command/tests/visual/suite/update.js +0 -47
- package/distTs/src/command/tests/visual/suite.js +0 -30
- package/distTs/src/command/ut/upload.js +0 -86
- package/distTs/src/command/ut.js +0 -12
- package/distTs/src/command/vt/close.js +0 -27
- package/distTs/src/command/vt/compare/validation.js +0 -46
- package/distTs/src/command/vt/compare.js +0 -100
- package/distTs/src/command/vt/exec.js +0 -82
- package/distTs/src/command/vt/installBrowser.js +0 -20
- package/distTs/src/command/vt/shared/validation.js +0 -145
- package/distTs/src/command/vt/storybook.js +0 -138
- package/distTs/src/command/vt.js +0 -20
- package/distTs/src/command/yaml/agents.js +0 -88
- package/distTs/src/command/yaml/init.js +0 -110
- package/distTs/src/main.js +0 -190
- package/distTs/src/types/options.js +0 -2
- package/distTs/src/types/scrape.js +0 -2
- package/distTs/src/types/visualTests.js +0 -2
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.commandPrReviewRequestChanges = exports.commandPrReviewApprove = void 0;
|
|
7
|
-
const utils_1 = require("../../../utils");
|
|
8
|
-
const texts_1 = require("../../../texts");
|
|
9
|
-
const output_1 = __importDefault(require("../../../output"));
|
|
10
|
-
const cliError_1 = __importDefault(require("../../../cliError"));
|
|
11
|
-
const shared_1 = require("../shared");
|
|
12
|
-
/**
|
|
13
|
-
* The reasons of a refused approval, in a form an agent can act on: the
|
|
14
|
-
* threads not CLOSED, the unviewed MUST_REVIEW files (as the batches holding
|
|
15
|
-
* them when the list is split) and a pending triage.
|
|
16
|
-
*/
|
|
17
|
-
const blockedError = async (scope, number, version, err) => {
|
|
18
|
-
const body = err.body || {};
|
|
19
|
-
const lines = [`${texts_1.ERR_PR_APPROVAL_BLOCKED}: ${err.message}`];
|
|
20
|
-
const threads = body.open_threads || [];
|
|
21
|
-
const threadsCount = body.open_threads_count ?? threads.length;
|
|
22
|
-
if (threadsCount > 0) {
|
|
23
|
-
lines.push(`${(0, texts_1.TXT_PR_APPROVAL_OPEN_THREADS)(threadsCount)}${threads.length ? ` (${threads.join(', ')})` : ''}`);
|
|
24
|
-
lines.push(` ${scope.cmd(`comment ls ${number} --threads${version ? ` --rev v${version}` : ''}`)}`);
|
|
25
|
-
}
|
|
26
|
-
const notViewed = body.must_review_not_viewed || [];
|
|
27
|
-
const notViewedCount = body.must_review_not_viewed_count ?? notViewed.length;
|
|
28
|
-
if (notViewedCount > 0) {
|
|
29
|
-
lines.push((0, texts_1.TXT_PR_APPROVAL_NOT_VIEWED)(notViewedCount));
|
|
30
|
-
const mustReview = await (0, shared_1.fetchMustReview)(scope, number, version).catch(() => null);
|
|
31
|
-
const shown = mustReview?.version ?? version;
|
|
32
|
-
const batches = (0, shared_1.buildBatches)(mustReview?.files || []);
|
|
33
|
-
const missing = new Set((mustReview?.files || []).filter((f) => !f.viewed).map((f) => f.file_name));
|
|
34
|
-
const open = batches.filter((b) => b.files.some((f) => missing.has(f.file_name)));
|
|
35
|
-
if (open.length > 0) {
|
|
36
|
-
lines.push(texts_1.TXT_PR_APPROVAL_BATCHES);
|
|
37
|
-
open.forEach((b) => lines.push(` ${(0, texts_1.TXT_PR_BATCH_LINE)(b.batch, b.files.length, b.tokens, scope.cmd(`file ls ${number} --batch ${b.batch}${shown ? ` --rev v${shown}` : ''}`))}`));
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
const paths = missing.size > 0 ? [...missing] : notViewed;
|
|
41
|
-
paths.forEach((path) => lines.push(` ${path}`));
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
if (body.triage_pending)
|
|
45
|
-
lines.push(texts_1.TXT_PR_APPROVAL_TRIAGE_PENDING);
|
|
46
|
-
return new cliError_1.default('usage_error', lines.join('\n'), texts_1.TXT_PR_APPROVAL_FORCE_HINT);
|
|
47
|
-
};
|
|
48
|
-
const verdictCommand = (name, description, examples, verdict) => {
|
|
49
|
-
const command = (0, utils_1.newCommand)(name, description, {
|
|
50
|
-
requiredScopes: [utils_1.REST_API_SCOPE.REPOSITORY_WRITE],
|
|
51
|
-
examples,
|
|
52
|
-
});
|
|
53
|
-
(0, shared_1.addPrOptions)(command, true);
|
|
54
|
-
if (verdict === utils_1.PR_VERDICT.APPROVED)
|
|
55
|
-
command.option('--force', texts_1.OPTION_PR_APPROVE_FORCE);
|
|
56
|
-
command.argument('[N]', texts_1.OPTION_PR_NUMBER);
|
|
57
|
-
command.action(async (n, options) => {
|
|
58
|
-
const version = (0, shared_1.parseRev)(options.rev);
|
|
59
|
-
const scope = (0, shared_1.prScope)(options);
|
|
60
|
-
const number = await (0, shared_1.resolveNumber)(scope, n);
|
|
61
|
-
let review;
|
|
62
|
-
try {
|
|
63
|
-
review = await scope.client.submitPullRequestVerdict(scope.workspace, scope.project, number, { verdict, version, force: options.force ? true : undefined });
|
|
64
|
-
}
|
|
65
|
-
catch (err) {
|
|
66
|
-
if ((0, shared_1.isVersionConflict)(err)) {
|
|
67
|
-
throw new cliError_1.default('usage_error', (0, texts_1.TXT_PR_VERSION_CONFLICT)(scope.cmd, number, (0, shared_1.conflictVersion)(err)));
|
|
68
|
-
}
|
|
69
|
-
if (err instanceof cliError_1.default && err.status === 400 && err.body && (err.body.open_threads_count !== undefined ||
|
|
70
|
-
err.body.must_review_not_viewed_count !== undefined ||
|
|
71
|
-
err.body.triage_pending !== undefined)) {
|
|
72
|
-
throw await blockedError(scope, number, version, err);
|
|
73
|
-
}
|
|
74
|
-
throw err;
|
|
75
|
-
}
|
|
76
|
-
output_1.default.exitResult(options.format === 'json', review, (0, texts_1.TXT_PR_REVIEW_VERDICT)(review?.verdict ?? verdict, review?.version ?? version));
|
|
77
|
-
});
|
|
78
|
-
return command;
|
|
79
|
-
};
|
|
80
|
-
exports.commandPrReviewApprove = verdictCommand('approve', texts_1.DESC_COMMAND_PR_REVIEW_APPROVE, texts_1.EXAMPLE_PR_REVIEW_APPROVE, utils_1.PR_VERDICT.APPROVED);
|
|
81
|
-
exports.commandPrReviewRequestChanges = verdictCommand('request-changes', texts_1.DESC_COMMAND_PR_REVIEW_REQUEST_CHANGES, texts_1.EXAMPLE_PR_REVIEW_REQUEST_CHANGES, utils_1.PR_VERDICT.CHANGE_REQUESTED);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const utils_1 = require("../../utils");
|
|
7
|
-
const texts_1 = require("../../texts");
|
|
8
|
-
const start_1 = __importDefault(require("./review/start"));
|
|
9
|
-
const verdict_1 = require("./review/verdict");
|
|
10
|
-
const request_1 = __importDefault(require("./review/request"));
|
|
11
|
-
const commandPrReview = (0, utils_1.newCommand)('review', texts_1.DESC_COMMAND_PR_REVIEW, {
|
|
12
|
-
examples: texts_1.EXAMPLE_PR_REVIEW,
|
|
13
|
-
});
|
|
14
|
-
commandPrReview.addCommand(start_1.default);
|
|
15
|
-
commandPrReview.addCommand(verdict_1.commandPrReviewApprove);
|
|
16
|
-
commandPrReview.addCommand(verdict_1.commandPrReviewRequestChanges);
|
|
17
|
-
commandPrReview.addCommand(request_1.default);
|
|
18
|
-
exports.default = commandPrReview;
|