@webpieces/pr-gate 0.4.833 → 0.4.835
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/package.json +3 -3
- package/src/scripts/commands/write-review-command.d.ts +2 -1
- package/src/scripts/commands/write-review-command.js +2 -5
- package/src/scripts/commands/write-review-command.js.map +1 -1
- package/src/scripts/commands/write-review-fixes-command.d.ts +2 -1
- package/src/scripts/commands/write-review-fixes-command.js +2 -5
- package/src/scripts/commands/write-review-fixes-command.js.map +1 -1
- package/src/scripts/git-finishUpsertPr.js +7 -10
- package/src/scripts/git-finishUpsertPr.js.map +1 -1
- package/src/scripts/pr-gate-cli-app.d.ts +38 -0
- package/src/scripts/pr-gate-cli-app.js +255 -0
- package/src/scripts/pr-gate-cli-app.js.map +1 -0
- package/src/scripts/pr-gate-cli-invocation.d.ts +27 -0
- package/src/scripts/pr-gate-cli-invocation.js +71 -0
- package/src/scripts/pr-gate-cli-invocation.js.map +1 -0
- package/src/scripts/wp-await-checks.js +7 -21
- package/src/scripts/wp-await-checks.js.map +1 -1
- package/src/scripts/wp-await-reviews.js +7 -18
- package/src/scripts/wp-await-reviews.js.map +1 -1
- package/src/scripts/wp-build.js +7 -31
- package/src/scripts/wp-build.js.map +1 -1
- package/src/scripts/wp-check-pr.js +7 -10
- package/src/scripts/wp-check-pr.js.map +1 -1
- package/src/scripts/wp-cleanup.js +7 -18
- package/src/scripts/wp-cleanup.js.map +1 -1
- package/src/scripts/wp-finish-push-dev.js +7 -14
- package/src/scripts/wp-finish-push-dev.js.map +1 -1
- package/src/scripts/wp-finish-update.js +7 -10
- package/src/scripts/wp-finish-update.js.map +1 -1
- package/src/scripts/wp-human-post-pr.js +7 -9
- package/src/scripts/wp-human-post-pr.js.map +1 -1
- package/src/scripts/wp-land-pr.js +7 -21
- package/src/scripts/wp-land-pr.js.map +1 -1
- package/src/scripts/wp-push-dev.js +7 -38
- package/src/scripts/wp-push-dev.js.map +1 -1
- package/src/scripts/wp-review-upsert-pr.js +7 -10
- package/src/scripts/wp-review-upsert-pr.js.map +1 -1
- package/src/scripts/wp-start-update.js +7 -10
- package/src/scripts/wp-start-update.js.map +1 -1
- package/src/scripts/wp-start-upsert-pr.js +7 -10
- package/src/scripts/wp-start-upsert-pr.js.map +1 -1
- package/src/scripts/wp-sync-main.js +7 -10
- package/src/scripts/wp-sync-main.js.map +1 -1
- package/src/scripts/wp-upsert-hotfix-pr.js +7 -11
- package/src/scripts/wp-upsert-hotfix-pr.js.map +1 -1
- package/src/scripts/wp-write-review-fixes.js +7 -10
- package/src/scripts/wp-write-review-fixes.js.map +1 -1
- package/src/scripts/wp-write-review.js +7 -26
- package/src/scripts/wp-write-review.js.map +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** Bottom process boundary for stdin. Feature tests replace this value, never the CLI application. */
|
|
2
|
+
export declare abstract class PrGateCliStdin {
|
|
3
|
+
abstract read(): string;
|
|
4
|
+
}
|
|
5
|
+
/** Bottom process boundary for one output stream. */
|
|
6
|
+
export declare abstract class PrGateCliOutput {
|
|
7
|
+
abstract write(bytes: string): void;
|
|
8
|
+
}
|
|
9
|
+
/** Bottom process boundary for terminal exit semantics. */
|
|
10
|
+
export declare abstract class PrGateCliExit {
|
|
11
|
+
abstract exit(code: number): void;
|
|
12
|
+
}
|
|
13
|
+
/** Everything one published bin hands to the application. */
|
|
14
|
+
export declare class PrGateCliInvocation {
|
|
15
|
+
readonly binName: string;
|
|
16
|
+
readonly argv: string[];
|
|
17
|
+
readonly cwd: string;
|
|
18
|
+
readonly stdin: PrGateCliStdin;
|
|
19
|
+
readonly stdout: PrGateCliOutput;
|
|
20
|
+
readonly stderr: PrGateCliOutput;
|
|
21
|
+
readonly processExit: PrGateCliExit;
|
|
22
|
+
constructor(binName: string, argv: string[], cwd: string, stdin: PrGateCliStdin, stdout: PrGateCliOutput, stderr: PrGateCliOutput, processExit: PrGateCliExit);
|
|
23
|
+
}
|
|
24
|
+
/** Creates the real-process invocation while leaving feature tests free to supply explicit ports. */
|
|
25
|
+
export declare class PrGateCliInvocationFactory {
|
|
26
|
+
fromProcess(binName: string): PrGateCliInvocation;
|
|
27
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PrGateCliInvocationFactory = exports.PrGateCliInvocation = exports.PrGateCliExit = exports.PrGateCliOutput = exports.PrGateCliStdin = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs = tslib_1.__importStar(require("fs"));
|
|
6
|
+
const inversify_1 = require("inversify");
|
|
7
|
+
/** Bottom process boundary for stdin. Feature tests replace this value, never the CLI application. */
|
|
8
|
+
class PrGateCliStdin {
|
|
9
|
+
}
|
|
10
|
+
exports.PrGateCliStdin = PrGateCliStdin;
|
|
11
|
+
/** Bottom process boundary for one output stream. */
|
|
12
|
+
class PrGateCliOutput {
|
|
13
|
+
}
|
|
14
|
+
exports.PrGateCliOutput = PrGateCliOutput;
|
|
15
|
+
/** Bottom process boundary for terminal exit semantics. */
|
|
16
|
+
class PrGateCliExit {
|
|
17
|
+
}
|
|
18
|
+
exports.PrGateCliExit = PrGateCliExit;
|
|
19
|
+
class ProcessStdin extends PrGateCliStdin {
|
|
20
|
+
read() {
|
|
21
|
+
return fs.readFileSync(0, 'utf8');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
class ProcessStdout extends PrGateCliOutput {
|
|
25
|
+
write(bytes) {
|
|
26
|
+
process.stdout.write(bytes);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
class ProcessStderr extends PrGateCliOutput {
|
|
30
|
+
write(bytes) {
|
|
31
|
+
process.stderr.write(bytes);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
class ProcessExit extends PrGateCliExit {
|
|
35
|
+
exit(code) {
|
|
36
|
+
// webpieces-disable no-process-exit-outside-main -- this is the injected terminal boundary shared by every PR-gate bin.
|
|
37
|
+
process.exit(code);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/** Everything one published bin hands to the application. */
|
|
41
|
+
class PrGateCliInvocation {
|
|
42
|
+
binName;
|
|
43
|
+
argv;
|
|
44
|
+
cwd;
|
|
45
|
+
stdin;
|
|
46
|
+
stdout;
|
|
47
|
+
stderr;
|
|
48
|
+
processExit;
|
|
49
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
50
|
+
constructor(binName, argv, cwd, stdin, stdout, stderr, processExit) {
|
|
51
|
+
this.binName = binName;
|
|
52
|
+
this.argv = argv;
|
|
53
|
+
this.cwd = cwd;
|
|
54
|
+
this.stdin = stdin;
|
|
55
|
+
this.stdout = stdout;
|
|
56
|
+
this.stderr = stderr;
|
|
57
|
+
this.processExit = processExit;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.PrGateCliInvocation = PrGateCliInvocation;
|
|
61
|
+
/** Creates the real-process invocation while leaving feature tests free to supply explicit ports. */
|
|
62
|
+
let PrGateCliInvocationFactory = class PrGateCliInvocationFactory {
|
|
63
|
+
fromProcess(binName) {
|
|
64
|
+
return new PrGateCliInvocation(binName, process.argv.slice(2), process.cwd(), new ProcessStdin(), new ProcessStdout(), new ProcessStderr(), new ProcessExit());
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
exports.PrGateCliInvocationFactory = PrGateCliInvocationFactory;
|
|
68
|
+
exports.PrGateCliInvocationFactory = PrGateCliInvocationFactory = tslib_1.__decorate([
|
|
69
|
+
(0, inversify_1.injectable)(inversify_1.bindingScopeValues.Singleton)
|
|
70
|
+
], PrGateCliInvocationFactory);
|
|
71
|
+
//# sourceMappingURL=pr-gate-cli-invocation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pr-gate-cli-invocation.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/pr-gate-cli-invocation.ts"],"names":[],"mappings":";;;;AAAA,+CAAyB;AAEzB,yCAA2D;AAE3D,sGAAsG;AACtG,MAAsB,cAAc;CAEnC;AAFD,wCAEC;AAED,qDAAqD;AACrD,MAAsB,eAAe;CAEpC;AAFD,0CAEC;AAED,2DAA2D;AAC3D,MAAsB,aAAa;CAElC;AAFD,sCAEC;AAED,MAAM,YAAa,SAAQ,cAAc;IAC5B,IAAI;QACT,OAAO,EAAE,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IACtC,CAAC;CACJ;AAED,MAAM,aAAc,SAAQ,eAAe;IAC9B,KAAK,CAAC,KAAa;QACxB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;CACJ;AAED,MAAM,aAAc,SAAQ,eAAe;IAC9B,KAAK,CAAC,KAAa;QACxB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;CACJ;AAED,MAAM,WAAY,SAAQ,aAAa;IAC1B,IAAI,CAAC,IAAY;QACtB,wHAAwH;QACxH,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;CACJ;AAED,6DAA6D;AAC7D,MAAa,mBAAmB;IACnB,OAAO,CAAS;IAChB,IAAI,CAAW;IACf,GAAG,CAAS;IACZ,KAAK,CAAiB;IACtB,MAAM,CAAkB;IACxB,MAAM,CAAkB;IACxB,WAAW,CAAgB;IAEpC,yDAAyD;IACzD,YACI,OAAe,EACf,IAAc,EACd,GAAW,EACX,KAAqB,EACrB,MAAuB,EACvB,MAAuB,EACvB,WAA0B;QAE1B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACnC,CAAC;CACJ;AA3BD,kDA2BC;AAED,qGAAqG;AAE9F,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IACnC,WAAW,CAAC,OAAe;QACvB,OAAO,IAAI,mBAAmB,CAC1B,OAAO,EACP,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EACrB,OAAO,CAAC,GAAG,EAAE,EACb,IAAI,YAAY,EAAE,EAClB,IAAI,aAAa,EAAE,EACnB,IAAI,aAAa,EAAE,EACnB,IAAI,WAAW,EAAE,CACpB,CAAC;IACN,CAAC;CACJ,CAAA;AAZY,gEAA0B;qCAA1B,0BAA0B;IADtC,IAAA,sBAAU,EAAC,8BAAkB,CAAC,SAAS,CAAC;GAC5B,0BAA0B,CAYtC","sourcesContent":["import * as fs from 'fs';\n\nimport { bindingScopeValues, injectable } from 'inversify';\n\n/** Bottom process boundary for stdin. Feature tests replace this value, never the CLI application. */\nexport abstract class PrGateCliStdin {\n abstract read(): string;\n}\n\n/** Bottom process boundary for one output stream. */\nexport abstract class PrGateCliOutput {\n abstract write(bytes: string): void;\n}\n\n/** Bottom process boundary for terminal exit semantics. */\nexport abstract class PrGateCliExit {\n abstract exit(code: number): void;\n}\n\nclass ProcessStdin extends PrGateCliStdin {\n override read(): string {\n return fs.readFileSync(0, 'utf8');\n }\n}\n\nclass ProcessStdout extends PrGateCliOutput {\n override write(bytes: string): void {\n process.stdout.write(bytes);\n }\n}\n\nclass ProcessStderr extends PrGateCliOutput {\n override write(bytes: string): void {\n process.stderr.write(bytes);\n }\n}\n\nclass ProcessExit extends PrGateCliExit {\n override exit(code: number): void {\n // webpieces-disable no-process-exit-outside-main -- this is the injected terminal boundary shared by every PR-gate bin.\n process.exit(code);\n }\n}\n\n/** Everything one published bin hands to the application. */\nexport class PrGateCliInvocation {\n readonly binName: string;\n readonly argv: string[];\n readonly cwd: string;\n readonly stdin: PrGateCliStdin;\n readonly stdout: PrGateCliOutput;\n readonly stderr: PrGateCliOutput;\n readonly processExit: PrGateCliExit;\n\n // eslint-disable-next-line @typescript-eslint/max-params\n constructor(\n binName: string,\n argv: string[],\n cwd: string,\n stdin: PrGateCliStdin,\n stdout: PrGateCliOutput,\n stderr: PrGateCliOutput,\n processExit: PrGateCliExit,\n ) {\n this.binName = binName;\n this.argv = argv;\n this.cwd = cwd;\n this.stdin = stdin;\n this.stdout = stdout;\n this.stderr = stderr;\n this.processExit = processExit;\n }\n}\n\n/** Creates the real-process invocation while leaving feature tests free to supply explicit ports. */\n@injectable(bindingScopeValues.Singleton)\nexport class PrGateCliInvocationFactory {\n fromProcess(binName: string): PrGateCliInvocation {\n return new PrGateCliInvocation(\n binName,\n process.argv.slice(2),\n process.cwd(),\n new ProcessStdin(),\n new ProcessStdout(),\n new ProcessStderr(),\n new ProcessExit(),\n );\n }\n}\n"]}
|
|
@@ -2,26 +2,12 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
require("reflect-metadata");
|
|
5
|
-
const inversify_1 = require("inversify");
|
|
6
5
|
const rules_config_1 = require("@webpieces/rules-config");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// worktree. The loop is in here.
|
|
15
|
-
//
|
|
16
|
-
// This bin is OFFERED, never instructed: `wp-finish-upsert-pr` still says "Nothing else is owed by the
|
|
17
|
-
// tooling — a person merges it. You can stop here." Landing is the developer's call, and several of this
|
|
18
|
-
// repo's workflows deliberately stop at a green PR.
|
|
19
|
-
(0, rules_config_1.runMain)(async () => {
|
|
20
|
-
const container = new inversify_1.Container({ autobind: true });
|
|
21
|
-
const args = container.get(rules_config_1.CliArgs).parse(new rules_config_1.CliUsage('wp-await-checks', 'Block until the checks on one PR stop running, then print where they landed.', [
|
|
22
|
-
new rules_config_1.CliFlag(PR, 'REQUIRED. The PR number to wait on, e.g. --pr 874. `gh pr view --json number`\n'
|
|
23
|
-
+ ' prints it for the current branch.', true),
|
|
24
|
-
]));
|
|
25
|
-
await container.get(pr_gate_app_1.PrGateApp).awaitChecks(new await_checks_command_1.AwaitChecksArgs().parse(args.value(PR)));
|
|
26
|
-
});
|
|
6
|
+
const inversify_1 = require("inversify");
|
|
7
|
+
const pr_gate_cli_app_1 = require("./pr-gate-cli-app");
|
|
8
|
+
const pr_gate_cli_invocation_1 = require("./pr-gate-cli-invocation");
|
|
9
|
+
const container = new inversify_1.Container({ autobind: true });
|
|
10
|
+
(0, rules_config_1.runMain)(() => container
|
|
11
|
+
.get(pr_gate_cli_app_1.PrGateCliApp)
|
|
12
|
+
.run(container.get(pr_gate_cli_invocation_1.PrGateCliInvocationFactory).fromProcess('wp-await-checks')));
|
|
27
13
|
//# sourceMappingURL=wp-await-checks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wp-await-checks.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-await-checks.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,yCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"wp-await-checks.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-await-checks.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,0DAAkD;AAClD,yCAAsC;AACtC,uDAAiD;AACjD,qEAAsE;AAEtE,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AACpD,IAAA,sBAAO,EACH,GAAkB,EAAE,CAChB,SAAS;KACJ,GAAG,CAAC,8BAAY,CAAC;KACjB,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mDAA0B,CAAC,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,CACzF,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { runMain } from '@webpieces/rules-config';\nimport { Container } from 'inversify';\nimport { PrGateCliApp } from './pr-gate-cli-app';\nimport { PrGateCliInvocationFactory } from './pr-gate-cli-invocation';\n\nconst container = new Container({ autobind: true });\nrunMain(\n (): Promise<void> =>\n container\n .get(PrGateCliApp)\n .run(container.get(PrGateCliInvocationFactory).fromProcess('wp-await-checks')),\n);\n"]}
|
|
@@ -2,23 +2,12 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
require("reflect-metadata");
|
|
5
|
-
const inversify_1 = require("inversify");
|
|
6
5
|
const rules_config_1 = require("@webpieces/rules-config");
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// statically prove stays inside the worktree, which is why a hand-rolled `until [ … ]; do sleep 20; done`
|
|
15
|
-
// is denied (178 of 553 measured subagent Monitor calls hit exactly that). `pnpm wp-await-reviews` is
|
|
16
|
-
// verifiable by inspection and passes. All the looping lives inside this process.
|
|
17
|
-
(0, rules_config_1.runMain)(async () => {
|
|
18
|
-
const container = new inversify_1.Container({ autobind: true });
|
|
19
|
-
// Reject `--help`/bogus flags BEFORE the wait starts — a mistyped flag must never be silently
|
|
20
|
-
// dropped and then leave the caller blocked for nine minutes on a wait it did not ask for.
|
|
21
|
-
container.get(rules_config_1.CliArgs).assertNoArgs(new rules_config_1.CliUsage('wp-await-reviews', 'Block until every reviewer verdict this branch owes has landed, then print each verdict.'));
|
|
22
|
-
await container.get(pr_gate_app_1.PrGateApp).awaitReviews();
|
|
23
|
-
});
|
|
6
|
+
const inversify_1 = require("inversify");
|
|
7
|
+
const pr_gate_cli_app_1 = require("./pr-gate-cli-app");
|
|
8
|
+
const pr_gate_cli_invocation_1 = require("./pr-gate-cli-invocation");
|
|
9
|
+
const container = new inversify_1.Container({ autobind: true });
|
|
10
|
+
(0, rules_config_1.runMain)(() => container
|
|
11
|
+
.get(pr_gate_cli_app_1.PrGateCliApp)
|
|
12
|
+
.run(container.get(pr_gate_cli_invocation_1.PrGateCliInvocationFactory).fromProcess('wp-await-reviews')));
|
|
24
13
|
//# sourceMappingURL=wp-await-reviews.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wp-await-reviews.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-await-reviews.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,yCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"wp-await-reviews.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-await-reviews.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,0DAAkD;AAClD,yCAAsC;AACtC,uDAAiD;AACjD,qEAAsE;AAEtE,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AACpD,IAAA,sBAAO,EACH,GAAkB,EAAE,CAChB,SAAS;KACJ,GAAG,CAAC,8BAAY,CAAC;KACjB,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mDAA0B,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAC1F,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { runMain } from '@webpieces/rules-config';\nimport { Container } from 'inversify';\nimport { PrGateCliApp } from './pr-gate-cli-app';\nimport { PrGateCliInvocationFactory } from './pr-gate-cli-invocation';\n\nconst container = new Container({ autobind: true });\nrunMain(\n (): Promise<void> =>\n container\n .get(PrGateCliApp)\n .run(container.get(PrGateCliInvocationFactory).fromProcess('wp-await-reviews')),\n);\n"]}
|
package/src/scripts/wp-build.js
CHANGED
|
@@ -2,36 +2,12 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
require("reflect-metadata");
|
|
5
|
-
const inversify_1 = require("inversify");
|
|
6
5
|
const rules_config_1 = require("@webpieces/rules-config");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// ─── THE INVARIANT, AND WHAT `--force` IS AND IS NOT ──────────────────────────────────────────────────
|
|
15
|
-
// `wp-build` runs `buildCommand` VERBATIM: no legs, no knobs. That is the promise, and it is why a green
|
|
16
|
-
// result here is evidence about the PR gate — the two must be the SAME command. This bin used to state
|
|
17
|
-
// that as "takes NO arguments", which conflated the promise with its enforcement: the thing that must
|
|
18
|
-
// never exist is a flag that changes WHAT IS RUN, not a flag as such.
|
|
19
|
-
//
|
|
20
|
-
// `--force` changes nothing about the command. It skips ONE precondition — the machine-wide concurrency
|
|
21
|
-
// refusal that reads `~/.webpieces/builds.log` — and then runs byte-for-byte the same build. The gate
|
|
22
|
-
// stages have no equivalent and never refuse, so there is nothing here for the two to differ about.
|
|
23
|
-
//
|
|
24
|
-
// Narrower loops still have their own commands (`nx run <project>:ci`, `vitest run <path>`) and do not
|
|
25
|
-
// go through this bin.
|
|
26
|
-
(0, rules_config_1.runMain)(async () => {
|
|
27
|
-
const container = new inversify_1.Container({ autobind: true });
|
|
28
|
-
// Reject `--help`/bogus flags BEFORE anything runs — a mistyped `--forc` must never be silently
|
|
29
|
-
// dropped and then turn a deliberate override back into a refusal.
|
|
30
|
-
const args = container.get(rules_config_1.CliArgs).parse(new rules_config_1.CliUsage('wp-build', 'Run this repo`s configured build (commands.pr-gate.buildCommand) — the same command the PR gate runs.', [
|
|
31
|
-
new rules_config_1.CliFlag(FORCE, 'Build even though this machine is already at its concurrent-build limit. Skips\n'
|
|
32
|
-
+ ' that ONE check and nothing else — the command run is identical. Reach for\n'
|
|
33
|
-
+ ' the gate (`pnpm wp-review-upsert-pr`) first; it runs the same build.'),
|
|
34
|
-
]));
|
|
35
|
-
await container.get(pr_gate_app_1.PrGateApp).build(new build_command_1.BuildOptions(args.has(FORCE)));
|
|
36
|
-
});
|
|
6
|
+
const inversify_1 = require("inversify");
|
|
7
|
+
const pr_gate_cli_app_1 = require("./pr-gate-cli-app");
|
|
8
|
+
const pr_gate_cli_invocation_1 = require("./pr-gate-cli-invocation");
|
|
9
|
+
const container = new inversify_1.Container({ autobind: true });
|
|
10
|
+
(0, rules_config_1.runMain)(() => container
|
|
11
|
+
.get(pr_gate_cli_app_1.PrGateCliApp)
|
|
12
|
+
.run(container.get(pr_gate_cli_invocation_1.PrGateCliInvocationFactory).fromProcess('wp-build')));
|
|
37
13
|
//# sourceMappingURL=wp-build.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wp-build.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-build.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,yCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"wp-build.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-build.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,0DAAkD;AAClD,yCAAsC;AACtC,uDAAiD;AACjD,qEAAsE;AAEtE,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AACpD,IAAA,sBAAO,EACH,GAAkB,EAAE,CAChB,SAAS;KACJ,GAAG,CAAC,8BAAY,CAAC;KACjB,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mDAA0B,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAClF,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { runMain } from '@webpieces/rules-config';\nimport { Container } from 'inversify';\nimport { PrGateCliApp } from './pr-gate-cli-app';\nimport { PrGateCliInvocationFactory } from './pr-gate-cli-invocation';\n\nconst container = new Container({ autobind: true });\nrunMain(\n (): Promise<void> =>\n container\n .get(PrGateCliApp)\n .run(container.get(PrGateCliInvocationFactory).fromProcess('wp-build')),\n);\n"]}
|
|
@@ -2,15 +2,12 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
require("reflect-metadata");
|
|
5
|
-
const inversify_1 = require("inversify");
|
|
6
5
|
const rules_config_1 = require("@webpieces/rules-config");
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
container.get(
|
|
14
|
-
await container.get(pr_gate_app_1.PrGateApp).checkPr();
|
|
15
|
-
});
|
|
6
|
+
const inversify_1 = require("inversify");
|
|
7
|
+
const pr_gate_cli_app_1 = require("./pr-gate-cli-app");
|
|
8
|
+
const pr_gate_cli_invocation_1 = require("./pr-gate-cli-invocation");
|
|
9
|
+
const container = new inversify_1.Container({ autobind: true });
|
|
10
|
+
(0, rules_config_1.runMain)(() => container
|
|
11
|
+
.get(pr_gate_cli_app_1.PrGateCliApp)
|
|
12
|
+
.run(container.get(pr_gate_cli_invocation_1.PrGateCliInvocationFactory).fromProcess('wp-check-pr')));
|
|
16
13
|
//# sourceMappingURL=wp-check-pr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wp-check-pr.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-check-pr.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,yCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"wp-check-pr.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-check-pr.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,0DAAkD;AAClD,yCAAsC;AACtC,uDAAiD;AACjD,qEAAsE;AAEtE,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AACpD,IAAA,sBAAO,EACH,GAAkB,EAAE,CAChB,SAAS;KACJ,GAAG,CAAC,8BAAY,CAAC;KACjB,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mDAA0B,CAAC,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CACrF,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { runMain } from '@webpieces/rules-config';\nimport { Container } from 'inversify';\nimport { PrGateCliApp } from './pr-gate-cli-app';\nimport { PrGateCliInvocationFactory } from './pr-gate-cli-invocation';\n\nconst container = new Container({ autobind: true });\nrunMain(\n (): Promise<void> =>\n container\n .get(PrGateCliApp)\n .run(container.get(PrGateCliInvocationFactory).fromProcess('wp-check-pr')),\n);\n"]}
|
|
@@ -2,23 +2,12 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
require("reflect-metadata");
|
|
5
|
-
const inversify_1 = require("inversify");
|
|
6
5
|
const rules_config_1 = require("@webpieces/rules-config");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// KNOWS say so, and an explicit flag always beats the sniff. See CleanupCommand for the numbering
|
|
15
|
-
// contract the `--delete-*` flags carry.
|
|
16
|
-
(0, rules_config_1.runMain)(async () => {
|
|
17
|
-
// autobind self-binds every @injectable(Singleton) tooling class (replaces the buildProviderModule registry scan)
|
|
18
|
-
const container = new inversify_1.Container({ autobind: true });
|
|
19
|
-
// Reject bogus flags BEFORE the app touches git — a mistyped `--delete-branchs` must never be
|
|
20
|
-
// silently dropped and then run a cleanup that deletes something else instead.
|
|
21
|
-
const args = container.get(rules_config_1.CliArgs).parse(container.get(cleanup_options_1.CleanupUsage).declare());
|
|
22
|
-
await container.get(pr_gate_app_1.PrGateApp).cleanup(new cleanup_options_1.CleanupOptions(new cleanup_options_1.DeleteSelection(cleanup_options_1.FLAG_DELETE_BRANCHES, args.has(cleanup_options_1.FLAG_DELETE_BRANCHES), args.value(cleanup_options_1.FLAG_DELETE_BRANCHES)), new cleanup_options_1.DeleteSelection(cleanup_options_1.FLAG_DELETE_WORKTREES, args.has(cleanup_options_1.FLAG_DELETE_WORKTREES), args.value(cleanup_options_1.FLAG_DELETE_WORKTREES)), args.has(cleanup_options_1.FLAG_REPORT), args.has(cleanup_options_1.FLAG_INTERACTIVE), args.has(cleanup_options_1.FLAG_IGNORE_STALE_LOCKS)));
|
|
23
|
-
});
|
|
6
|
+
const inversify_1 = require("inversify");
|
|
7
|
+
const pr_gate_cli_app_1 = require("./pr-gate-cli-app");
|
|
8
|
+
const pr_gate_cli_invocation_1 = require("./pr-gate-cli-invocation");
|
|
9
|
+
const container = new inversify_1.Container({ autobind: true });
|
|
10
|
+
(0, rules_config_1.runMain)(() => container
|
|
11
|
+
.get(pr_gate_cli_app_1.PrGateCliApp)
|
|
12
|
+
.run(container.get(pr_gate_cli_invocation_1.PrGateCliInvocationFactory).fromProcess('wp-cleanup')));
|
|
24
13
|
//# sourceMappingURL=wp-cleanup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wp-cleanup.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-cleanup.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,yCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"wp-cleanup.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-cleanup.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,0DAAkD;AAClD,yCAAsC;AACtC,uDAAiD;AACjD,qEAAsE;AAEtE,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AACpD,IAAA,sBAAO,EACH,GAAkB,EAAE,CAChB,SAAS;KACJ,GAAG,CAAC,8BAAY,CAAC;KACjB,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mDAA0B,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CACpF,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { runMain } from '@webpieces/rules-config';\nimport { Container } from 'inversify';\nimport { PrGateCliApp } from './pr-gate-cli-app';\nimport { PrGateCliInvocationFactory } from './pr-gate-cli-invocation';\n\nconst container = new Container({ autobind: true });\nrunMain(\n (): Promise<void> =>\n container\n .get(PrGateCliApp)\n .run(container.get(PrGateCliInvocationFactory).fromProcess('wp-cleanup')),\n);\n"]}
|
|
@@ -2,19 +2,12 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
require("reflect-metadata");
|
|
5
|
-
const inversify_1 = require("inversify");
|
|
6
5
|
const rules_config_1 = require("@webpieces/rules-config");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
(0, rules_config_1.runMain)(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// Reject `--help`/bogus flags BEFORE the app touches git — a mistyped `--abrt` that was silently
|
|
15
|
-
// ignored would COMMIT and PUBLISH the composition the caller was trying to throw away.
|
|
16
|
-
const args = container.get(rules_config_1.CliArgs).parse(new rules_config_1.CliUsage('wp-finish-push-dev', 'Commit a resolved dev composition and publish the copy. Only needed when `pnpm wp-push-dev --resolve` stopped on a conflict.', [new rules_config_1.CliFlag(ABORT, 'Throw the whole resolve away: undo the halted merge, go back to your feature\n'
|
|
17
|
-
+ ' branch, and delete the throwaway branch and state file. Nothing is published.')]));
|
|
18
|
-
await container.get(pr_gate_app_1.PrGateApp).finishPushDev(new finish_push_dev_command_1.FinishPushDevOptions(args.has(ABORT)));
|
|
19
|
-
});
|
|
6
|
+
const inversify_1 = require("inversify");
|
|
7
|
+
const pr_gate_cli_app_1 = require("./pr-gate-cli-app");
|
|
8
|
+
const pr_gate_cli_invocation_1 = require("./pr-gate-cli-invocation");
|
|
9
|
+
const container = new inversify_1.Container({ autobind: true });
|
|
10
|
+
(0, rules_config_1.runMain)(() => container
|
|
11
|
+
.get(pr_gate_cli_app_1.PrGateCliApp)
|
|
12
|
+
.run(container.get(pr_gate_cli_invocation_1.PrGateCliInvocationFactory).fromProcess('wp-finish-push-dev')));
|
|
20
13
|
//# sourceMappingURL=wp-finish-push-dev.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wp-finish-push-dev.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-finish-push-dev.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,yCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"wp-finish-push-dev.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-finish-push-dev.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,0DAAkD;AAClD,yCAAsC;AACtC,uDAAiD;AACjD,qEAAsE;AAEtE,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AACpD,IAAA,sBAAO,EACH,GAAkB,EAAE,CAChB,SAAS;KACJ,GAAG,CAAC,8BAAY,CAAC;KACjB,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mDAA0B,CAAC,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC,CAC5F,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { runMain } from '@webpieces/rules-config';\nimport { Container } from 'inversify';\nimport { PrGateCliApp } from './pr-gate-cli-app';\nimport { PrGateCliInvocationFactory } from './pr-gate-cli-invocation';\n\nconst container = new Container({ autobind: true });\nrunMain(\n (): Promise<void> =>\n container\n .get(PrGateCliApp)\n .run(container.get(PrGateCliInvocationFactory).fromProcess('wp-finish-push-dev')),\n);\n"]}
|
|
@@ -2,15 +2,12 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
require("reflect-metadata");
|
|
5
|
-
const inversify_1 = require("inversify");
|
|
6
5
|
const rules_config_1 = require("@webpieces/rules-config");
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
container.get(
|
|
14
|
-
await container.get(pr_gate_app_1.PrGateApp).finishUpdate();
|
|
15
|
-
});
|
|
6
|
+
const inversify_1 = require("inversify");
|
|
7
|
+
const pr_gate_cli_app_1 = require("./pr-gate-cli-app");
|
|
8
|
+
const pr_gate_cli_invocation_1 = require("./pr-gate-cli-invocation");
|
|
9
|
+
const container = new inversify_1.Container({ autobind: true });
|
|
10
|
+
(0, rules_config_1.runMain)(() => container
|
|
11
|
+
.get(pr_gate_cli_app_1.PrGateCliApp)
|
|
12
|
+
.run(container.get(pr_gate_cli_invocation_1.PrGateCliInvocationFactory).fromProcess('wp-finish-update')));
|
|
16
13
|
//# sourceMappingURL=wp-finish-update.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wp-finish-update.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-finish-update.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,yCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"wp-finish-update.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-finish-update.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,0DAAkD;AAClD,yCAAsC;AACtC,uDAAiD;AACjD,qEAAsE;AAEtE,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AACpD,IAAA,sBAAO,EACH,GAAkB,EAAE,CAChB,SAAS;KACJ,GAAG,CAAC,8BAAY,CAAC;KACjB,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mDAA0B,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAC1F,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { runMain } from '@webpieces/rules-config';\nimport { Container } from 'inversify';\nimport { PrGateCliApp } from './pr-gate-cli-app';\nimport { PrGateCliInvocationFactory } from './pr-gate-cli-invocation';\n\nconst container = new Container({ autobind: true });\nrunMain(\n (): Promise<void> =>\n container\n .get(PrGateCliApp)\n .run(container.get(PrGateCliInvocationFactory).fromProcess('wp-finish-update')),\n);\n"]}
|
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
require("reflect-metadata");
|
|
5
|
-
const inversify_1 = require("inversify");
|
|
6
5
|
const rules_config_1 = require("@webpieces/rules-config");
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
});
|
|
6
|
+
const inversify_1 = require("inversify");
|
|
7
|
+
const pr_gate_cli_app_1 = require("./pr-gate-cli-app");
|
|
8
|
+
const pr_gate_cli_invocation_1 = require("./pr-gate-cli-invocation");
|
|
9
|
+
const container = new inversify_1.Container({ autobind: true });
|
|
10
|
+
(0, rules_config_1.runMain)(() => container
|
|
11
|
+
.get(pr_gate_cli_app_1.PrGateCliApp)
|
|
12
|
+
.run(container.get(pr_gate_cli_invocation_1.PrGateCliInvocationFactory).fromProcess('wp-human-post-pr')));
|
|
15
13
|
//# sourceMappingURL=wp-human-post-pr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wp-human-post-pr.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-human-post-pr.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,yCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"wp-human-post-pr.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-human-post-pr.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,0DAAkD;AAClD,yCAAsC;AACtC,uDAAiD;AACjD,qEAAsE;AAEtE,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AACpD,IAAA,sBAAO,EACH,GAAkB,EAAE,CAChB,SAAS;KACJ,GAAG,CAAC,8BAAY,CAAC;KACjB,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mDAA0B,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAC1F,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { runMain } from '@webpieces/rules-config';\nimport { Container } from 'inversify';\nimport { PrGateCliApp } from './pr-gate-cli-app';\nimport { PrGateCliInvocationFactory } from './pr-gate-cli-invocation';\n\nconst container = new Container({ autobind: true });\nrunMain(\n (): Promise<void> =>\n container\n .get(PrGateCliApp)\n .run(container.get(PrGateCliInvocationFactory).fromProcess('wp-human-post-pr')),\n);\n"]}
|
|
@@ -2,26 +2,12 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
require("reflect-metadata");
|
|
5
|
-
const inversify_1 = require("inversify");
|
|
6
5
|
const rules_config_1 = require("@webpieces/rules-config");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
(0, rules_config_1.runMain)(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// Reject `--help`/bogus flags BEFORE the app touches git. A mistyped flag must still refuse rather
|
|
15
|
-
// than be ignored on a command that writes main's history.
|
|
16
|
-
//
|
|
17
|
-
// `--pr <n>` is the ONE flag, and it does not choose anything about the COMMIT: the body is still the
|
|
18
|
-
// PR's own description read back from GitHub (`--fallback-title-only` was deleted with the
|
|
19
|
-
// machine-global receipt store that made it necessary — see decisions/0005). It chooses WHICH PR,
|
|
20
|
-
// which is a question the zero-arg form can only answer for whoever is standing on the branch. Most
|
|
21
|
-
// of the time the agent that built the branch lands it; many times it does not — CI was still running
|
|
22
|
-
// when it finished, it errored, or a coordinator picks the work up an hour later — and by then that
|
|
23
|
-
// agent is gone. This is how the coordinator finishes the job, bookkeeping included.
|
|
24
|
-
const args = container.get(rules_config_1.CliArgs).parse(new rules_config_1.CliUsage('wp-land-pr', "Squash-merge a PR into main with its description as the commit body.", [new rules_config_1.CliFlag(PR_FLAG, "The PR number to land. Omit for the PR of the branch you are standing on.", true)]));
|
|
25
|
-
await container.get(pr_gate_app_1.PrGateApp).landPr(new land_pr_command_1.LandPrRequest(args.has(PR_FLAG), args.value(PR_FLAG)));
|
|
26
|
-
});
|
|
6
|
+
const inversify_1 = require("inversify");
|
|
7
|
+
const pr_gate_cli_app_1 = require("./pr-gate-cli-app");
|
|
8
|
+
const pr_gate_cli_invocation_1 = require("./pr-gate-cli-invocation");
|
|
9
|
+
const container = new inversify_1.Container({ autobind: true });
|
|
10
|
+
(0, rules_config_1.runMain)(() => container
|
|
11
|
+
.get(pr_gate_cli_app_1.PrGateCliApp)
|
|
12
|
+
.run(container.get(pr_gate_cli_invocation_1.PrGateCliInvocationFactory).fromProcess('wp-land-pr')));
|
|
27
13
|
//# sourceMappingURL=wp-land-pr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wp-land-pr.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-land-pr.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,yCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"wp-land-pr.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-land-pr.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,0DAAkD;AAClD,yCAAsC;AACtC,uDAAiD;AACjD,qEAAsE;AAEtE,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AACpD,IAAA,sBAAO,EACH,GAAkB,EAAE,CAChB,SAAS;KACJ,GAAG,CAAC,8BAAY,CAAC;KACjB,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mDAA0B,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CACpF,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { runMain } from '@webpieces/rules-config';\nimport { Container } from 'inversify';\nimport { PrGateCliApp } from './pr-gate-cli-app';\nimport { PrGateCliInvocationFactory } from './pr-gate-cli-invocation';\n\nconst container = new Container({ autobind: true });\nrunMain(\n (): Promise<void> =>\n container\n .get(PrGateCliApp)\n .run(container.get(PrGateCliInvocationFactory).fromProcess('wp-land-pr')),\n);\n"]}
|
|
@@ -2,43 +2,12 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
require("reflect-metadata");
|
|
5
|
-
const inversify_1 = require("inversify");
|
|
6
5
|
const rules_config_1 = require("@webpieces/rules-config");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// Composition root: build the container and resolve the app so inversify constructs the whole DAG.
|
|
15
|
-
(0, rules_config_1.runMain)(async () => {
|
|
16
|
-
// autobind self-binds every @injectable(Singleton) tooling class (replaces the buildProviderModule registry scan)
|
|
17
|
-
const container = new inversify_1.Container({ autobind: true });
|
|
18
|
-
// Reject `--help`/bogus flags BEFORE the app touches git — an ignored flag must never start the flow.
|
|
19
|
-
// A mistyped `--forc` that was silently dropped would turn "discard the published resolution" into a
|
|
20
|
-
// refusal, or worse, the reverse.
|
|
21
|
-
const args = container.get(rules_config_1.CliArgs).parse(new rules_config_1.CliUsage('wp-push-dev', 'Publish a DISPOSABLE copy of this branch for the shared dev environment. No PR, no build, and the feature branch is never moved.', [
|
|
22
|
-
new rules_config_1.CliFlag(LIST, 'List the dev copies currently published on origin, then stop.'),
|
|
23
|
-
new rules_config_1.CliFlag(REMOVE, 'Delete this branch\'s dev copy — the rollback. It drops out of the shared dev\n'
|
|
24
|
-
+ ' branch on the next composition run.'),
|
|
25
|
-
new rules_config_1.CliFlag(RESOLVE, 'Compose the OTHER published copies onto yours, so the shared environment can\n'
|
|
26
|
-
+ ' build them together. With a branch name, merge only that one (the CI\n'
|
|
27
|
-
+ ' conflict message names it); bare, merge every other copy in the order\n'
|
|
28
|
-
+ ' CI composes them. Conflicts stop for you to resolve; finish with\n'
|
|
29
|
-
+ ' `pnpm wp-finish-push-dev`.', true),
|
|
30
|
-
new rules_config_1.CliFlag(REBASE_RESOLUTION, 'The copy already holds a conflict resolution and your branch has moved on:\n'
|
|
31
|
-
+ ' REPLAY that resolution on top of your new commits instead of losing it.'),
|
|
32
|
-
new rules_config_1.CliFlag(FORCE, 'DISCARD a conflict resolution published on the copy and overwrite it with your\n'
|
|
33
|
-
+ ' branch as-is. Somebody has to re-resolve the composition afterwards.'),
|
|
34
|
-
]));
|
|
35
|
-
const opts = new push_dev_command_1.PushDevOptions();
|
|
36
|
-
opts.list = args.has(LIST);
|
|
37
|
-
opts.remove = args.has(REMOVE);
|
|
38
|
-
opts.force = args.has(FORCE);
|
|
39
|
-
opts.rebaseResolution = args.has(REBASE_RESOLUTION);
|
|
40
|
-
opts.resolve = args.has(RESOLVE);
|
|
41
|
-
opts.resolveTarget = args.value(RESOLVE);
|
|
42
|
-
await container.get(pr_gate_app_1.PrGateApp).pushDev(opts);
|
|
43
|
-
});
|
|
6
|
+
const inversify_1 = require("inversify");
|
|
7
|
+
const pr_gate_cli_app_1 = require("./pr-gate-cli-app");
|
|
8
|
+
const pr_gate_cli_invocation_1 = require("./pr-gate-cli-invocation");
|
|
9
|
+
const container = new inversify_1.Container({ autobind: true });
|
|
10
|
+
(0, rules_config_1.runMain)(() => container
|
|
11
|
+
.get(pr_gate_cli_app_1.PrGateCliApp)
|
|
12
|
+
.run(container.get(pr_gate_cli_invocation_1.PrGateCliInvocationFactory).fromProcess('wp-push-dev')));
|
|
44
13
|
//# sourceMappingURL=wp-push-dev.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wp-push-dev.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-push-dev.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,yCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"wp-push-dev.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-push-dev.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,0DAAkD;AAClD,yCAAsC;AACtC,uDAAiD;AACjD,qEAAsE;AAEtE,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AACpD,IAAA,sBAAO,EACH,GAAkB,EAAE,CAChB,SAAS;KACJ,GAAG,CAAC,8BAAY,CAAC;KACjB,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,mDAA0B,CAAC,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CACrF,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { runMain } from '@webpieces/rules-config';\nimport { Container } from 'inversify';\nimport { PrGateCliApp } from './pr-gate-cli-app';\nimport { PrGateCliInvocationFactory } from './pr-gate-cli-invocation';\n\nconst container = new Container({ autobind: true });\nrunMain(\n (): Promise<void> =>\n container\n .get(PrGateCliApp)\n .run(container.get(PrGateCliInvocationFactory).fromProcess('wp-push-dev')),\n);\n"]}
|