@webpieces/pr-gate 0.4.834 → 0.4.836

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.
Files changed (52) hide show
  1. package/package.json +3 -3
  2. package/src/dashboard/author-identity.d.ts +1 -1
  3. package/src/dashboard/author-identity.js +4 -4
  4. package/src/dashboard/author-identity.js.map +1 -1
  5. package/src/scripts/commands/write-review-command.d.ts +2 -1
  6. package/src/scripts/commands/write-review-command.js +2 -5
  7. package/src/scripts/commands/write-review-command.js.map +1 -1
  8. package/src/scripts/commands/write-review-fixes-command.d.ts +2 -1
  9. package/src/scripts/commands/write-review-fixes-command.js +2 -5
  10. package/src/scripts/commands/write-review-fixes-command.js.map +1 -1
  11. package/src/scripts/git-finishUpsertPr.js +7 -10
  12. package/src/scripts/git-finishUpsertPr.js.map +1 -1
  13. package/src/scripts/pr-gate-cli-app.d.ts +38 -0
  14. package/src/scripts/pr-gate-cli-app.js +255 -0
  15. package/src/scripts/pr-gate-cli-app.js.map +1 -0
  16. package/src/scripts/pr-gate-cli-invocation.d.ts +27 -0
  17. package/src/scripts/pr-gate-cli-invocation.js +71 -0
  18. package/src/scripts/pr-gate-cli-invocation.js.map +1 -0
  19. package/src/scripts/wp-await-checks.js +7 -21
  20. package/src/scripts/wp-await-checks.js.map +1 -1
  21. package/src/scripts/wp-await-reviews.js +7 -18
  22. package/src/scripts/wp-await-reviews.js.map +1 -1
  23. package/src/scripts/wp-build.js +7 -31
  24. package/src/scripts/wp-build.js.map +1 -1
  25. package/src/scripts/wp-check-pr.js +7 -10
  26. package/src/scripts/wp-check-pr.js.map +1 -1
  27. package/src/scripts/wp-cleanup.js +7 -18
  28. package/src/scripts/wp-cleanup.js.map +1 -1
  29. package/src/scripts/wp-finish-push-dev.js +7 -14
  30. package/src/scripts/wp-finish-push-dev.js.map +1 -1
  31. package/src/scripts/wp-finish-update.js +7 -10
  32. package/src/scripts/wp-finish-update.js.map +1 -1
  33. package/src/scripts/wp-human-post-pr.js +7 -9
  34. package/src/scripts/wp-human-post-pr.js.map +1 -1
  35. package/src/scripts/wp-land-pr.js +7 -21
  36. package/src/scripts/wp-land-pr.js.map +1 -1
  37. package/src/scripts/wp-push-dev.js +7 -38
  38. package/src/scripts/wp-push-dev.js.map +1 -1
  39. package/src/scripts/wp-review-upsert-pr.js +7 -10
  40. package/src/scripts/wp-review-upsert-pr.js.map +1 -1
  41. package/src/scripts/wp-start-update.js +7 -10
  42. package/src/scripts/wp-start-update.js.map +1 -1
  43. package/src/scripts/wp-start-upsert-pr.js +7 -10
  44. package/src/scripts/wp-start-upsert-pr.js.map +1 -1
  45. package/src/scripts/wp-sync-main.js +7 -10
  46. package/src/scripts/wp-sync-main.js.map +1 -1
  47. package/src/scripts/wp-upsert-hotfix-pr.js +7 -11
  48. package/src/scripts/wp-upsert-hotfix-pr.js.map +1 -1
  49. package/src/scripts/wp-write-review-fixes.js +7 -10
  50. package/src/scripts/wp-write-review-fixes.js.map +1 -1
  51. package/src/scripts/wp-write-review.js +7 -26
  52. package/src/scripts/wp-write-review.js.map +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pr-gate-cli-app.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/pr-gate-cli-app.ts"],"names":[],"mappings":";;;;AAAA,mDAA6B;AAE7B,0DASiC;AACjC,yCAA2D;AAE3D,0EAAkE;AAClE,4DAAwD;AACxD,gEASoC;AACpC,gFAA0E;AAC1E,gEAA2D;AAC3D,kEAA6D;AAC7D,0EAIyC;AACzC,sFAG+C;AAC/C,+CAA0C;AAG1C,MAAM,KAAK,GAAG,SAAS,CAAC;AACxB,MAAM,KAAK,GAAG,SAAS,CAAC;AACxB,MAAM,SAAS,GAAG,aAAa,CAAC;AAChC,MAAM,IAAI,GAAG,QAAQ,CAAC;AACtB,MAAM,KAAK,GAAG,SAAS,CAAC;AACxB,MAAM,IAAI,GAAG,QAAQ,CAAC;AACtB,MAAM,EAAE,GAAG,MA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n CliArgSet,\n CliExitError,\n CliFlag,\n CliUsage,\n RuleFailError,\n renderRuleFailForHuman,\n toError,\n} from '@webpieces/rules-config';\nimport { bindingScopeValues, injectable } from 'inversify';\n\nimport { AwaitChecksArgs } from './commands/await-checks-command';\nimport { BuildOptions } from './commands/build-command';\nimport {\n CleanupOptions,\n CleanupUsage,\n DeleteSelection,\n FLAG_DELETE_BRANCHES,\n FLAG_DELETE_WORKTREES,\n FLAG_IGNORE_STALE_LOCKS,\n FLAG_INTERACTIVE,\n FLAG_REPORT,\n} from './commands/cleanup-options';\nimport { FinishPushDevOptions } from './commands/finish-push-dev-command';\nimport { LandPrRequest } from './commands/land-pr-command';\nimport { PushDevOptions } from './commands/push-dev-command';\nimport {\n ReviewBudgetCheckOptions,\n WriteReviewInput,\n WriteReviewOptions,\n} from './commands/write-review-command';\nimport {\n WriteReviewFixesInput,\n WriteReviewFixesOptions,\n} from './commands/write-review-fixes-command';\nimport { PrGateApp } from './pr-gate-app';\nimport { PrGateCliInvocation } from './pr-gate-cli-invocation';\n\nconst ABORT = '--abort';\nconst CHECK = '--check';\nconst CHECKLIST = '--checklist';\nconst FILE = '--file';\nconst FORCE = '--force';\nconst LIST = '--list';\nconst PR = '--pr';\nconst REBASE_RESOLUTION = '--rebase-resolution';\nconst REMOVE = '--remove';\nconst RESOLVE = '--resolve';\n\n/** Stable application boundary for every published `wp-*` command. */\n@injectable(bindingScopeValues.Singleton)\nexport class PrGateCliApp {\n constructor(\n private readonly app: PrGateApp,\n private readonly cleanupUsage: CleanupUsage,\n private readonly writeReviewInput: WriteReviewInput,\n private readonly writeReviewFixesInput: WriteReviewFixesInput,\n ) {}\n\n async run(invocation: PrGateCliInvocation): Promise<void> {\n // eslint-disable-next-line @webpieces/no-unmanaged-exceptions\n try {\n await this.dispatch(path.basename(invocation.binName), invocation);\n } catch (err: unknown) {\n const error = toError(err);\n if (err instanceof CliExitError) {\n if (err.message !== '') {\n (err.exitCode === 0 ? invocation.stdout : invocation.stderr).write(\n err.message + '\\n',\n );\n }\n invocation.processExit.exit(err.exitCode);\n return;\n }\n const message =\n err instanceof RuleFailError ? renderRuleFailForHuman(err) : error.message;\n invocation.stderr.write(message + '\\n');\n invocation.processExit.exit(1);\n }\n }\n\n private async dispatch(binName: string, invocation: PrGateCliInvocation): Promise<void> {\n if (await this.dispatchUpdateCommand(binName, invocation)) return;\n if (await this.dispatchPrCommand(binName, invocation)) return;\n if (await this.dispatchRepoCommand(binName, invocation)) return;\n if (await this.dispatchReviewCommand(binName, invocation)) return;\n throw new CliExitError(2, `Unknown PR-gate command: ${binName}`);\n }\n\n private async dispatchUpdateCommand(\n binName: string,\n invocation: PrGateCliInvocation,\n ): Promise<boolean> {\n if (binName === 'wp-finish-upsert-pr') {\n await this.noArgs(\n invocation,\n this.finishUpsertUsage(),\n (): Promise<void> => this.app.finishUpsertPr(),\n );\n return true;\n }\n if (binName === 'wp-start-upsert-pr') {\n await this.noArgs(\n invocation,\n this.startUpsertUsage(),\n (): Promise<void> => this.app.startUpsertPr(),\n );\n return true;\n }\n if (binName === 'wp-start-update') {\n await this.noArgs(\n invocation,\n this.startUpdateUsage(),\n (): Promise<void> => this.app.startUpdate(),\n );\n return true;\n }\n if (binName === 'wp-finish-update') {\n await this.noArgs(\n invocation,\n this.finishUpdateUsage(),\n (): Promise<void> => this.app.finishUpdate(),\n );\n return true;\n }\n if (binName === 'wp-sync-main') {\n await this.noArgs(\n invocation,\n this.syncMainUsage(),\n (): Promise<void> => this.app.syncMain(),\n );\n return true;\n }\n return false;\n }\n\n private async dispatchPrCommand(\n binName: string,\n invocation: PrGateCliInvocation,\n ): Promise<boolean> {\n if (binName === 'wp-human-post-pr') {\n await this.noArgs(\n invocation,\n this.humanPostUsage(),\n (): Promise<void> => this.app.humanPostPr(),\n );\n return true;\n }\n if (binName === 'wp-upsert-hotfix-pr') {\n await this.noArgs(\n invocation,\n this.hotfixUsage(),\n (): Promise<void> => this.app.upsertHotfixPr(),\n );\n return true;\n }\n if (binName === 'wp-check-pr') {\n await this.noArgs(\n invocation,\n this.checkPrUsage(),\n (): Promise<void> => this.app.checkPr(),\n );\n return true;\n }\n if (binName === 'wp-review-upsert-pr') {\n await this.noArgs(\n invocation,\n this.reviewUpsertUsage(),\n (): Promise<void> => this.app.reviewUpsertPr(),\n );\n return true;\n }\n if (binName === 'wp-await-reviews') {\n await this.noArgs(\n invocation,\n this.awaitReviewsUsage(),\n (): Promise<void> => this.app.awaitReviews(),\n );\n return true;\n }\n return false;\n }\n\n private async dispatchRepoCommand(\n binName: string,\n invocation: PrGateCliInvocation,\n ): Promise<boolean> {\n if (binName === 'wp-build') {\n const args = this.parse(invocation, this.buildUsage());\n await this.app.build(new BuildOptions(args.has(FORCE)));\n return true;\n }\n if (binName === 'wp-cleanup') {\n const args = this.parse(invocation, this.cleanupUsage.declare());\n await this.app.cleanup(\n new CleanupOptions(\n new DeleteSelection(\n FLAG_DELETE_BRANCHES,\n args.has(FLAG_DELETE_BRANCHES),\n args.value(FLAG_DELETE_BRANCHES),\n ),\n new DeleteSelection(\n FLAG_DELETE_WORKTREES,\n args.has(FLAG_DELETE_WORKTREES),\n args.value(FLAG_DELETE_WORKTREES),\n ),\n args.has(FLAG_REPORT),\n args.has(FLAG_INTERACTIVE),\n args.has(FLAG_IGNORE_STALE_LOCKS),\n ),\n );\n return true;\n }\n if (binName === 'wp-land-pr') {\n const args = this.parse(invocation, this.landUsage());\n await this.app.landPr(new LandPrRequest(args.has(PR), args.value(PR)));\n return true;\n }\n if (binName === 'wp-push-dev') {\n const args = this.parse(invocation, this.pushDevUsage());\n const opts = new PushDevOptions();\n opts.list = args.has(LIST);\n opts.remove = args.has(REMOVE);\n opts.force = args.has(FORCE);\n opts.rebaseResolution = args.has(REBASE_RESOLUTION);\n opts.resolve = args.has(RESOLVE);\n opts.resolveTarget = args.value(RESOLVE);\n await this.app.pushDev(opts);\n return true;\n }\n if (binName === 'wp-finish-push-dev') {\n const args = this.parse(invocation, this.finishPushDevUsage());\n await this.app.finishPushDev(new FinishPushDevOptions(args.has(ABORT)));\n return true;\n }\n if (binName === 'wp-await-checks') {\n const args = this.parse(invocation, this.awaitChecksUsage());\n await this.app.awaitChecks(new AwaitChecksArgs().parse(args.value(PR)));\n return true;\n }\n return false;\n }\n\n private async dispatchReviewCommand(\n binName: string,\n invocation: PrGateCliInvocation,\n ): Promise<boolean> {\n if (binName === 'wp-write-review') {\n const args = this.parse(invocation, this.writeReviewUsage());\n if (args.has(CHECK)) {\n await this.app.checkReviewBudget(\n new ReviewBudgetCheckOptions(args.value(CHECKLIST), invocation.cwd),\n );\n return true;\n }\n const json = this.writeReviewInput.read(args.value(FILE), invocation.stdin);\n await this.app.writeReview(\n new WriteReviewOptions(args.value(CHECKLIST), json, invocation.cwd),\n );\n return true;\n }\n if (binName === 'wp-write-review-fixes') {\n const args = this.parse(invocation, this.writeReviewFixesUsage());\n const json = this.writeReviewFixesInput.read(args.value(FILE), invocation.stdin);\n await this.app.writeReviewFixes(new WriteReviewFixesOptions(json, invocation.cwd));\n return true;\n }\n return false;\n }\n\n private parse(invocation: PrGateCliInvocation, usage: CliUsage): CliArgSet {\n return new CliArgs().parseArgs(invocation.argv, usage);\n }\n\n private async noArgs(\n invocation: PrGateCliInvocation,\n usage: CliUsage,\n action: () => Promise<void>,\n ): Promise<void> {\n this.parse(invocation, usage);\n await action();\n }\n\n private buildUsage(): CliUsage {\n return new CliUsage(\n 'wp-build',\n 'Run this repo`s configured build (commands.pr-gate.buildCommand) — the same command the PR gate runs.',\n [\n new CliFlag(\n FORCE,\n 'Build even though this machine is already at its concurrent-build limit.',\n ),\n ],\n );\n }\n\n private finishUpsertUsage(): CliUsage {\n return new CliUsage(\n 'wp-finish-upsert-pr',\n 'Finalize the merge, run the authoritative build gate, render the dashboard, and create/update the PR.',\n );\n }\n private humanPostUsage(): CliUsage {\n return new CliUsage(\n 'wp-human-post-pr',\n 'Interactively attest that a human is posting the current clean, current-main feature branch.',\n );\n }\n private hotfixUsage(): CliUsage {\n return new CliUsage(\n 'wp-upsert-hotfix-pr',\n 'Publish the current /hotfix/ branch through the hotfix gate.',\n );\n }\n private startUpsertUsage(): CliUsage {\n return new CliUsage(\n 'wp-start-upsert-pr',\n 'Update from main and hand off the PR review stage.',\n );\n }\n private startUpdateUsage(): CliUsage {\n return new CliUsage(\n 'wp-start-update',\n '3-point squash-update this feature branch from main (no PR).',\n );\n }\n private finishUpdateUsage(): CliUsage {\n return new CliUsage(\n 'wp-finish-update',\n 'Validate + finalize a resolved 3-point merge (no PR).',\n );\n }\n private syncMainUsage(): CliUsage {\n return new CliUsage(\n 'wp-sync-main',\n 'Go to main, fast-forward it, reap dead worktrees and branches, and sweep orphan directories.',\n );\n }\n private checkPrUsage(): CliUsage {\n return new CliUsage(\n 'wp-check-pr',\n 'CI check: verify this PR was created through the webpieces gated flow (valid gate token).',\n );\n }\n private reviewUpsertUsage(): CliUsage {\n return new CliUsage(\n 'wp-review-upsert-pr',\n 'Validate the merge, build, extract the diff, and brief required reviewers.',\n );\n }\n private awaitReviewsUsage(): CliUsage {\n return new CliUsage('wp-await-reviews', 'Block until every reviewer verdict has landed.');\n }\n\n private landUsage(): CliUsage {\n return new CliUsage(\n 'wp-land-pr',\n 'Squash-merge a PR into main with its description as the commit body.',\n [new CliFlag(PR, 'The PR number to land.', true)],\n );\n }\n\n private pushDevUsage(): CliUsage {\n return new CliUsage(\n 'wp-push-dev',\n 'Publish a disposable copy of this branch for shared dev.',\n [\n new CliFlag(LIST, 'List published dev copies.'),\n new CliFlag(REMOVE, \"Delete this branch's dev copy.\"),\n new CliFlag(\n RESOLVE,\n 'Compose other published copies, optionally one named branch.',\n true,\n ),\n new CliFlag(REBASE_RESOLUTION, 'Replay an existing resolution onto new commits.'),\n new CliFlag(FORCE, 'Discard the published resolution and overwrite it.'),\n ],\n );\n }\n\n private finishPushDevUsage(): CliUsage {\n return new CliUsage(\n 'wp-finish-push-dev',\n 'Commit a resolved dev composition and publish it.',\n [new CliFlag(ABORT, 'Throw the resolve away without publishing.')],\n );\n }\n\n private awaitChecksUsage(): CliUsage {\n return new CliUsage('wp-await-checks', 'Block until checks on one PR stop running.', [\n new CliFlag(PR, 'REQUIRED. The PR number to wait on.', true),\n ]);\n }\n\n private writeReviewUsage(): CliUsage {\n return new CliUsage('wp-write-review', 'Submit one reviewer verdict for one checklist.', [\n new CliFlag(CHECKLIST, 'REQUIRED. The checklist id.', true),\n new CliFlag(FILE, 'The verdict JSON file. Omit to read stdin.', true),\n new CliFlag(CHECK, 'Only check whether this checklist may still be reviewed.'),\n ]);\n }\n\n private writeReviewFixesUsage(): CliUsage {\n return new CliUsage(\n 'wp-write-review-fixes',\n 'Record the coordinator response to red findings.',\n [new CliFlag(FILE, 'JSON file. Omit to read stdin.', true)],\n );\n }\n}\n"]}
@@ -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 pr_gate_app_1 = require("./pr-gate-app");
8
- const await_checks_command_1 = require("./commands/await-checks-command");
9
- const PR = '--pr';
10
- // Composition root for `wp-await-checks`: BLOCK until GitHub's checks for one PR stop being in flight.
11
- //
12
- // Like `wp-await-reviews`, what the AGENT TYPES stays plain — one command, one value-carrying flag, no
13
- // loop and no pipe — because the harness refuses any command it cannot statically prove stays inside the
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,0DAA8E;AAC9E,+CAA0C;AAC1C,0EAAkE;AAElE,MAAM,EAAE,GAAG,MAAM,CAAC;AAElB,uGAAuG;AACvG,EAAE;AACF,uGAAuG;AACvG,yGAAyG;AACzG,iCAAiC;AACjC,EAAE;AACF,uGAAuG;AACvG,yGAAyG;AACzG,oDAAoD;AACpD,IAAA,sBAAO,EAAC,KAAK,IAAmB,EAAE;IAC9B,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,sBAAO,CAAC,CAAC,KAAK,CAAC,IAAI,uBAAQ,CAAC,iBAAiB,EACpE,8EAA8E,EAC9E;QACI,IAAI,sBAAO,CAAC,EAAE,EACV,iFAAiF;cAC/E,mDAAmD,EAAE,IAAI,CAAC;KACnE,CAAC,CAAC,CAAC;IACR,MAAM,SAAS,CAAC,GAAG,CAAC,uBAAS,CAAC,CAAC,WAAW,CAAC,IAAI,sCAAe,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC5F,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { Container } from 'inversify';\nimport { runMain, CliArgs, CliFlag, CliUsage } from '@webpieces/rules-config';\nimport { PrGateApp } from './pr-gate-app';\nimport { AwaitChecksArgs } from './commands/await-checks-command';\n\nconst PR = '--pr';\n\n// Composition root for `wp-await-checks`: BLOCK until GitHub's checks for one PR stop being in flight.\n//\n// Like `wp-await-reviews`, what the AGENT TYPES stays plain — one command, one value-carrying flag, no\n// loop and no pipe — because the harness refuses any command it cannot statically prove stays inside the\n// worktree. The loop is in here.\n//\n// This bin is OFFERED, never instructed: `wp-finish-upsert-pr` still says \"Nothing else is owed by the\n// tooling — a person merges it. You can stop here.\" Landing is the developer's call, and several of this\n// repo's workflows deliberately stop at a green PR.\nrunMain(async (): Promise<void> => {\n const container = new Container({ autobind: true });\n const args = container.get(CliArgs).parse(new CliUsage('wp-await-checks',\n 'Block until the checks on one PR stop running, then print where they landed.',\n [\n new CliFlag(PR,\n 'REQUIRED. The PR number to wait on, e.g. --pr 874. `gh pr view --json number`\\n'\n + ' prints it for the current branch.', true),\n ]));\n await container.get(PrGateApp).awaitChecks(new AwaitChecksArgs().parse(args.value(PR)));\n});\n"]}
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 pr_gate_app_1 = require("./pr-gate-app");
8
- // Composition root for `wp-await-reviews`: BLOCK until every reviewer this branch owes has written its
9
- // verdict, print what each one said, and return.
10
- //
11
- // ─── IT TAKES NO ARGUMENTS, AND THAT IS A CONSTRAINT AND NOT A SIMPLIFICATION ────────────────────────
12
- // The whole point of this bin is that the command an AGENT TYPES is PLAIN — no loop, no redirect, no
13
- // pipe, no command substitution. A worktree-isolated subagent's harness refuses any command it cannot
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,0DAAqE;AACrE,+CAA0C;AAE1C,uGAAuG;AACvG,iDAAiD;AACjD,EAAE;AACF,wGAAwG;AACxG,qGAAqG;AACrG,sGAAsG;AACtG,0GAA0G;AAC1G,sGAAsG;AACtG,kFAAkF;AAClF,IAAA,sBAAO,EAAC,KAAK,IAAmB,EAAE;IAC9B,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,8FAA8F;IAC9F,2FAA2F;IAC3F,SAAS,CAAC,GAAG,CAAC,sBAAO,CAAC,CAAC,YAAY,CAAC,IAAI,uBAAQ,CAAC,kBAAkB,EAC/D,0FAA0F,CAAC,CAAC,CAAC;IACjG,MAAM,SAAS,CAAC,GAAG,CAAC,uBAAS,CAAC,CAAC,YAAY,EAAE,CAAC;AAClD,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { Container } from 'inversify';\nimport { runMain, CliArgs, CliUsage } from '@webpieces/rules-config';\nimport { PrGateApp } from './pr-gate-app';\n\n// Composition root for `wp-await-reviews`: BLOCK until every reviewer this branch owes has written its\n// verdict, print what each one said, and return.\n//\n// ─── IT TAKES NO ARGUMENTS, AND THAT IS A CONSTRAINT AND NOT A SIMPLIFICATION ────────────────────────\n// The whole point of this bin is that the command an AGENT TYPES is PLAIN — no loop, no redirect, no\n// pipe, no command substitution. A worktree-isolated subagent's harness refuses any command it cannot\n// statically prove stays inside the worktree, which is why a hand-rolled `until [ … ]; do sleep 20; done`\n// is denied (178 of 553 measured subagent Monitor calls hit exactly that). `pnpm wp-await-reviews` is\n// verifiable by inspection and passes. All the looping lives inside this process.\nrunMain(async (): Promise<void> => {\n const container = new Container({ autobind: true });\n // Reject `--help`/bogus flags BEFORE the wait starts — a mistyped flag must never be silently\n // dropped and then leave the caller blocked for nine minutes on a wait it did not ask for.\n container.get(CliArgs).assertNoArgs(new CliUsage('wp-await-reviews',\n 'Block until every reviewer verdict this branch owes has landed, then print each verdict.'));\n await container.get(PrGateApp).awaitReviews();\n});\n"]}
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"]}
@@ -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 pr_gate_app_1 = require("./pr-gate-app");
8
- const build_command_1 = require("./commands/build-command");
9
- const FORCE = '--force';
10
- // Composition root for `wp-build`: run this repo's ONE configured build command
11
- // (`commands.pr-gate.buildCommand`) and nothing else. See BuildCommand for why it composes no other
12
- // leg — a verify chain assembled per repo is what drifted into building the world three times over.
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,0DAA8E;AAC9E,+CAA0C;AAC1C,4DAAwD;AAExD,MAAM,KAAK,GAAG,SAAS,CAAC;AAExB,gFAAgF;AAChF,oGAAoG;AACpG,oGAAoG;AACpG,EAAE;AACF,yGAAyG;AACzG,yGAAyG;AACzG,uGAAuG;AACvG,sGAAsG;AACtG,sEAAsE;AACtE,EAAE;AACF,wGAAwG;AACxG,sGAAsG;AACtG,oGAAoG;AACpG,EAAE;AACF,uGAAuG;AACvG,uBAAuB;AACvB,IAAA,sBAAO,EAAC,KAAK,IAAmB,EAAE;IAC9B,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,gGAAgG;IAChG,mEAAmE;IACnE,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,sBAAO,CAAC,CAAC,KAAK,CAAC,IAAI,uBAAQ,CAAC,UAAU,EAC7D,uGAAuG,EACvG;QACI,IAAI,sBAAO,CAAC,KAAK,EACb,kFAAkF;cAChF,6FAA6F;cAC7F,sFAAsF,CAAC;KAChG,CAAC,CAAC,CAAC;IACR,MAAM,SAAS,CAAC,GAAG,CAAC,uBAAS,CAAC,CAAC,KAAK,CAAC,IAAI,4BAAY,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC5E,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { Container } from 'inversify';\nimport { runMain, CliArgs, CliFlag, CliUsage } from '@webpieces/rules-config';\nimport { PrGateApp } from './pr-gate-app';\nimport { BuildOptions } from './commands/build-command';\n\nconst FORCE = '--force';\n\n// Composition root for `wp-build`: run this repo's ONE configured build command\n// (`commands.pr-gate.buildCommand`) and nothing else. See BuildCommand for why it composes no other\n// leg — a verify chain assembled per repo is what drifted into building the world three times over.\n//\n// ─── THE INVARIANT, AND WHAT `--force` IS AND IS NOT ──────────────────────────────────────────────────\n// `wp-build` runs `buildCommand` VERBATIM: no legs, no knobs. That is the promise, and it is why a green\n// result here is evidence about the PR gate — the two must be the SAME command. This bin used to state\n// that as \"takes NO arguments\", which conflated the promise with its enforcement: the thing that must\n// never exist is a flag that changes WHAT IS RUN, not a flag as such.\n//\n// `--force` changes nothing about the command. It skips ONE precondition — the machine-wide concurrency\n// refusal that reads `~/.webpieces/builds.log` — and then runs byte-for-byte the same build. The gate\n// stages have no equivalent and never refuse, so there is nothing here for the two to differ about.\n//\n// Narrower loops still have their own commands (`nx run <project>:ci`, `vitest run <path>`) and do not\n// go through this bin.\nrunMain(async (): Promise<void> => {\n const container = new Container({ autobind: true });\n // Reject `--help`/bogus flags BEFORE anything runs — a mistyped `--forc` must never be silently\n // dropped and then turn a deliberate override back into a refusal.\n const args = container.get(CliArgs).parse(new CliUsage('wp-build',\n 'Run this repo`s configured build (commands.pr-gate.buildCommand) — the same command the PR gate runs.',\n [\n new CliFlag(FORCE,\n 'Build even though this machine is already at its concurrent-build limit. Skips\\n'\n + ' that ONE check and nothing else — the command run is identical. Reach for\\n'\n + ' the gate (`pnpm wp-review-upsert-pr`) first; it runs the same build.'),\n ]));\n await container.get(PrGateApp).build(new BuildOptions(args.has(FORCE)));\n});\n"]}
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 pr_gate_app_1 = require("./pr-gate-app");
8
- // Composition root for the SERVER-SIDE gate check. Read-only: verifies the PR body carries a valid HMAC
9
- // gate token for its head sha. Intended as a required CI status check (see the scaffolded workflow).
10
- (0, rules_config_1.runMain)(async () => {
11
- // autobind self-binds every @injectable(Singleton) tooling class (replaces the buildProviderModule registry scan)
12
- const container = new inversify_1.Container({ autobind: true });
13
- container.get(rules_config_1.CliArgs).assertNoArgs(new rules_config_1.CliUsage('wp-check-pr', 'CI check: verify this PR was created through the webpieces gated flow (valid gate token).'));
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,0DAAqE;AACrE,+CAA0C;AAE1C,wGAAwG;AACxG,qGAAqG;AACrG,IAAA,sBAAO,EAAC,KAAK,IAAmB,EAAE;IAC9B,kHAAkH;IAClH,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,SAAS,CAAC,GAAG,CAAC,sBAAO,CAAC,CAAC,YAAY,CAAC,IAAI,uBAAQ,CAAC,aAAa,EAAE,2FAA2F,CAAC,CAAC,CAAC;IAC9J,MAAM,SAAS,CAAC,GAAG,CAAC,uBAAS,CAAC,CAAC,OAAO,EAAE,CAAC;AAC7C,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { Container } from 'inversify';\nimport { runMain, CliArgs, CliUsage } from '@webpieces/rules-config';\nimport { PrGateApp } from './pr-gate-app';\n\n// Composition root for the SERVER-SIDE gate check. Read-only: verifies the PR body carries a valid HMAC\n// gate token for its head sha. Intended as a required CI status check (see the scaffolded workflow).\nrunMain(async (): Promise<void> => {\n // autobind self-binds every @injectable(Singleton) tooling class (replaces the buildProviderModule registry scan)\n const container = new Container({ autobind: true });\n container.get(CliArgs).assertNoArgs(new CliUsage('wp-check-pr', 'CI check: verify this PR was created through the webpieces gated flow (valid gate token).'));\n await container.get(PrGateApp).checkPr();\n});\n"]}
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 pr_gate_app_1 = require("./pr-gate-app");
8
- const cleanup_options_1 = require("./commands/cleanup-options");
9
- // Composition root: build the container and resolve the app so inversify constructs the whole DAG.
10
- //
11
- // WHY THIS BIN TAKES FLAGS AT ALL: the thing that used to decide whether wp-cleanup deletes anything
12
- // was `process.stdin.isTTY`, which is a guess about who is standing there rather than a fact — a human
13
- // piping to `tee` has no tty, an agent on a pty has one. The flags in CleanupUsage let the caller who
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,0DAA2D;AAC3D,+CAA0C;AAC1C,gEASoC;AAEpC,mGAAmG;AACnG,EAAE;AACF,qGAAqG;AACrG,uGAAuG;AACvG,sGAAsG;AACtG,kGAAkG;AAClG,yCAAyC;AACzC,IAAA,sBAAO,EAAC,KAAK,IAAmB,EAAE;IAC9B,kHAAkH;IAClH,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,8FAA8F;IAC9F,+EAA+E;IAC/E,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,sBAAO,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,8BAAY,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IACjF,MAAM,SAAS,CAAC,GAAG,CAAC,uBAAS,CAAC,CAAC,OAAO,CAAC,IAAI,gCAAc,CACrD,IAAI,iCAAe,CAAC,sCAAoB,EAAE,IAAI,CAAC,GAAG,CAAC,sCAAoB,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,sCAAoB,CAAC,CAAC,EAC3G,IAAI,iCAAe,CAAC,uCAAqB,EAAE,IAAI,CAAC,GAAG,CAAC,uCAAqB,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,uCAAqB,CAAC,CAAC,EAC9G,IAAI,CAAC,GAAG,CAAC,6BAAW,CAAC,EACrB,IAAI,CAAC,GAAG,CAAC,kCAAgB,CAAC,EAC1B,IAAI,CAAC,GAAG,CAAC,yCAAuB,CAAC,CAAC,CAAC,CAAC;AAC5C,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { Container } from 'inversify';\nimport { runMain, CliArgs } from '@webpieces/rules-config';\nimport { PrGateApp } from './pr-gate-app';\nimport {\n CleanupOptions,\n CleanupUsage,\n DeleteSelection,\n FLAG_DELETE_BRANCHES,\n FLAG_DELETE_WORKTREES,\n FLAG_IGNORE_STALE_LOCKS,\n FLAG_INTERACTIVE,\n FLAG_REPORT,\n} from './commands/cleanup-options';\n\n// Composition root: build the container and resolve the app so inversify constructs the whole DAG.\n//\n// WHY THIS BIN TAKES FLAGS AT ALL: the thing that used to decide whether wp-cleanup deletes anything\n// was `process.stdin.isTTY`, which is a guess about who is standing there rather than a fact — a human\n// piping to `tee` has no tty, an agent on a pty has one. The flags in CleanupUsage let the caller who\n// KNOWS say so, and an explicit flag always beats the sniff. See CleanupCommand for the numbering\n// contract the `--delete-*` flags carry.\nrunMain(async (): Promise<void> => {\n // autobind self-binds every @injectable(Singleton) tooling class (replaces the buildProviderModule registry scan)\n const container = new Container({ autobind: true });\n // Reject bogus flags BEFORE the app touches git — a mistyped `--delete-branchs` must never be\n // silently dropped and then run a cleanup that deletes something else instead.\n const args = container.get(CliArgs).parse(container.get(CleanupUsage).declare());\n await container.get(PrGateApp).cleanup(new CleanupOptions(\n new DeleteSelection(FLAG_DELETE_BRANCHES, args.has(FLAG_DELETE_BRANCHES), args.value(FLAG_DELETE_BRANCHES)),\n new DeleteSelection(FLAG_DELETE_WORKTREES, args.has(FLAG_DELETE_WORKTREES), args.value(FLAG_DELETE_WORKTREES)),\n args.has(FLAG_REPORT),\n args.has(FLAG_INTERACTIVE),\n args.has(FLAG_IGNORE_STALE_LOCKS)));\n});\n"]}
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 pr_gate_app_1 = require("./pr-gate-app");
8
- const finish_push_dev_command_1 = require("./commands/finish-push-dev-command");
9
- const ABORT = '--abort';
10
- // Composition root: build the container and resolve the app so inversify constructs the whole DAG.
11
- (0, rules_config_1.runMain)(async () => {
12
- // autobind self-binds every @injectable(Singleton) tooling class (replaces the buildProviderModule registry scan)
13
- const container = new inversify_1.Container({ autobind: true });
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,0DAA8E;AAC9E,+CAA0C;AAC1C,gFAA0E;AAE1E,MAAM,KAAK,GAAG,SAAS,CAAC;AAExB,mGAAmG;AACnG,IAAA,sBAAO,EAAC,KAAK,IAAmB,EAAE;IAC9B,kHAAkH;IAClH,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,iGAAiG;IACjG,wFAAwF;IACxF,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,sBAAO,CAAC,CAAC,KAAK,CAAC,IAAI,uBAAQ,CAClD,oBAAoB,EACpB,8HAA8H,EAC9H,CAAC,IAAI,sBAAO,CAAC,KAAK,EACd,gFAAgF;cAC9E,2FAA2F,CAAC,CAAC,CACtG,CAAC,CAAC;IACH,MAAM,SAAS,CAAC,GAAG,CAAC,uBAAS,CAAC,CAAC,aAAa,CAAC,IAAI,8CAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC5F,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { Container } from 'inversify';\nimport { runMain, CliArgs, CliFlag, CliUsage } from '@webpieces/rules-config';\nimport { PrGateApp } from './pr-gate-app';\nimport { FinishPushDevOptions } from './commands/finish-push-dev-command';\n\nconst ABORT = '--abort';\n\n// Composition root: build the container and resolve the app so inversify constructs the whole DAG.\nrunMain(async (): Promise<void> => {\n // autobind self-binds every @injectable(Singleton) tooling class (replaces the buildProviderModule registry scan)\n const container = new Container({ autobind: true });\n // Reject `--help`/bogus flags BEFORE the app touches git — a mistyped `--abrt` that was silently\n // ignored would COMMIT and PUBLISH the composition the caller was trying to throw away.\n const args = container.get(CliArgs).parse(new CliUsage(\n 'wp-finish-push-dev',\n 'Commit a resolved dev composition and publish the copy. Only needed when `pnpm wp-push-dev --resolve` stopped on a conflict.',\n [new CliFlag(ABORT,\n 'Throw the whole resolve away: undo the halted merge, go back to your feature\\n'\n + ' branch, and delete the throwaway branch and state file. Nothing is published.')],\n ));\n await container.get(PrGateApp).finishPushDev(new FinishPushDevOptions(args.has(ABORT)));\n});\n"]}
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 pr_gate_app_1 = require("./pr-gate-app");
8
- // Composition root: build the container and resolve the app so inversify constructs the whole DAG.
9
- (0, rules_config_1.runMain)(async () => {
10
- // autobind self-binds every @injectable(Singleton) tooling class (replaces the buildProviderModule registry scan)
11
- const container = new inversify_1.Container({ autobind: true });
12
- // Reject `--help`/bogus flags BEFORE the app touches git — an ignored flag must never start the flow.
13
- container.get(rules_config_1.CliArgs).assertNoArgs(new rules_config_1.CliUsage('wp-finish-update', 'Validate + finalize a resolved 3-point merge (no PR).'));
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,0DAAqE;AACrE,+CAA0C;AAE1C,mGAAmG;AACnG,IAAA,sBAAO,EAAC,KAAK,IAAmB,EAAE;IAC9B,kHAAkH;IAClH,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,sGAAsG;IACtG,SAAS,CAAC,GAAG,CAAC,sBAAO,CAAC,CAAC,YAAY,CAAC,IAAI,uBAAQ,CAAC,kBAAkB,EAAE,uDAAuD,CAAC,CAAC,CAAC;IAC/H,MAAM,SAAS,CAAC,GAAG,CAAC,uBAAS,CAAC,CAAC,YAAY,EAAE,CAAC;AAClD,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { Container } from 'inversify';\nimport { runMain, CliArgs, CliUsage } from '@webpieces/rules-config';\nimport { PrGateApp } from './pr-gate-app';\n\n// Composition root: build the container and resolve the app so inversify constructs the whole DAG.\nrunMain(async (): Promise<void> => {\n // autobind self-binds every @injectable(Singleton) tooling class (replaces the buildProviderModule registry scan)\n const container = new Container({ autobind: true });\n // Reject `--help`/bogus flags BEFORE the app touches git — an ignored flag must never start the flow.\n container.get(CliArgs).assertNoArgs(new CliUsage('wp-finish-update', 'Validate + finalize a resolved 3-point merge (no PR).'));\n await container.get(PrGateApp).finishUpdate();\n});\n"]}
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 pr_gate_app_1 = require("./pr-gate-app");
8
- (0, rules_config_1.runMain)(async () => {
9
- const container = new inversify_1.Container({ autobind: true });
10
- container
11
- .get(rules_config_1.CliArgs)
12
- .assertNoArgs(new rules_config_1.CliUsage('wp-human-post-pr', 'Interactively attest that a human is posting the current clean, current-main feature branch.'));
13
- await container.get(pr_gate_app_1.PrGateApp).humanPostPr();
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,0DAAqE;AACrE,+CAA0C;AAE1C,IAAA,sBAAO,EAAC,KAAK,IAAmB,EAAE;IAC9B,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,SAAS;SACJ,GAAG,CAAC,sBAAO,CAAC;SACZ,YAAY,CACT,IAAI,uBAAQ,CACR,kBAAkB,EAClB,8FAA8F,CACjG,CACJ,CAAC;IACN,MAAM,SAAS,CAAC,GAAG,CAAC,uBAAS,CAAC,CAAC,WAAW,EAAE,CAAC;AACjD,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { Container } from 'inversify';\nimport { CliArgs, CliUsage, runMain } from '@webpieces/rules-config';\nimport { PrGateApp } from './pr-gate-app';\n\nrunMain(async (): Promise<void> => {\n const container = new Container({ autobind: true });\n container\n .get(CliArgs)\n .assertNoArgs(\n new CliUsage(\n 'wp-human-post-pr',\n 'Interactively attest that a human is posting the current clean, current-main feature branch.',\n ),\n );\n await container.get(PrGateApp).humanPostPr();\n});\n"]}
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 land_pr_command_1 = require("./commands/land-pr-command");
8
- const pr_gate_app_1 = require("./pr-gate-app");
9
- const PR_FLAG = '--pr';
10
- // Composition root: build the container and resolve the app so inversify constructs the whole DAG.
11
- (0, rules_config_1.runMain)(async () => {
12
- // autobind self-binds every @injectable(Singleton) tooling class (replaces the buildProviderModule registry scan)
13
- const container = new inversify_1.Container({ autobind: true });
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,0DAA8E;AAC9E,gEAA2D;AAC3D,+CAA0C;AAE1C,MAAM,OAAO,GAAG,MAAM,CAAC;AAEvB,mGAAmG;AACnG,IAAA,sBAAO,EAAC,KAAK,IAAmB,EAAE;IAC9B,kHAAkH;IAClH,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,mGAAmG;IACnG,2DAA2D;IAC3D,EAAE;IACF,sGAAsG;IACtG,2FAA2F;IAC3F,kGAAkG;IAClG,oGAAoG;IACpG,sGAAsG;IACtG,oGAAoG;IACpG,qFAAqF;IACrF,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,sBAAO,CAAC,CAAC,KAAK,CAAC,IAAI,uBAAQ,CAClD,YAAY,EACZ,sEAAsE,EACtE,CAAC,IAAI,sBAAO,CAAC,OAAO,EAAE,2EAA2E,EAAE,IAAI,CAAC,CAAC,CAC5G,CAAC,CAAC;IACH,MAAM,SAAS,CAAC,GAAG,CAAC,uBAAS,CAAC,CAAC,MAAM,CAAC,IAAI,+BAAa,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACrG,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { Container } from 'inversify';\nimport { runMain, CliArgs, CliFlag, CliUsage } from '@webpieces/rules-config';\nimport { LandPrRequest } from './commands/land-pr-command';\nimport { PrGateApp } from './pr-gate-app';\n\nconst PR_FLAG = '--pr';\n\n// Composition root: build the container and resolve the app so inversify constructs the whole DAG.\nrunMain(async (): Promise<void> => {\n // autobind self-binds every @injectable(Singleton) tooling class (replaces the buildProviderModule registry scan)\n const container = new Container({ autobind: true });\n // Reject `--help`/bogus flags BEFORE the app touches git. A mistyped flag must still refuse rather\n // than be ignored on a command that writes main's history.\n //\n // `--pr <n>` is the ONE flag, and it does not choose anything about the COMMIT: the body is still the\n // PR's own description read back from GitHub (`--fallback-title-only` was deleted with the\n // machine-global receipt store that made it necessary — see decisions/0005). It chooses WHICH PR,\n // which is a question the zero-arg form can only answer for whoever is standing on the branch. Most\n // of the time the agent that built the branch lands it; many times it does not — CI was still running\n // when it finished, it errored, or a coordinator picks the work up an hour later — and by then that\n // agent is gone. This is how the coordinator finishes the job, bookkeeping included.\n const args = container.get(CliArgs).parse(new CliUsage(\n 'wp-land-pr',\n \"Squash-merge a PR into main with its description as the commit body.\",\n [new CliFlag(PR_FLAG, \"The PR number to land. Omit for the PR of the branch you are standing on.\", true)],\n ));\n await container.get(PrGateApp).landPr(new LandPrRequest(args.has(PR_FLAG), args.value(PR_FLAG)));\n});\n"]}
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"]}