@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
@@ -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 pr_gate_app_1 = require("./pr-gate-app");
8
- const push_dev_command_1 = require("./commands/push-dev-command");
9
- const REMOVE = '--remove';
10
- const LIST = '--list';
11
- const FORCE = '--force';
12
- const REBASE_RESOLUTION = '--rebase-resolution';
13
- const RESOLVE = '--resolve';
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,0DAA8E;AAC9E,+CAA0C;AAC1C,kEAA6D;AAE7D,MAAM,MAAM,GAAG,UAAU,CAAC;AAC1B,MAAM,IAAI,GAAG,QAAQ,CAAC;AACtB,MAAM,KAAK,GAAG,SAAS,CAAC;AACxB,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;AAChD,MAAM,OAAO,GAAG,WAAW,CAAC;AAE5B,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,qGAAqG;IACrG,kCAAkC;IAClC,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,sBAAO,CAAC,CAAC,KAAK,CAAC,IAAI,uBAAQ,CAClD,aAAa,EACb,kIAAkI,EAClI;QACI,IAAI,sBAAO,CAAC,IAAI,EAAE,+DAA+D,CAAC;QAClF,IAAI,sBAAO,CAAC,MAAM,EACd,iFAAiF;cAC/E,6DAA6D,CAAC;QACpE,IAAI,sBAAO,CAAC,OAAO,EACf,gFAAgF;cAC9E,gGAAgG;cAChG,iGAAiG;cACjG,4FAA4F;cAC5F,oDAAoD,EAAE,IAAI,CAAC;QACjE,IAAI,sBAAO,CAAC,iBAAiB,EACzB,8EAA8E;cAC5E,iGAAiG,CAAC;QACxG,IAAI,sBAAO,CAAC,KAAK,EACb,kFAAkF;cAChF,8FAA8F,CAAC;KACxG,CACJ,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,IAAI,iCAAc,EAAE,CAAC;IAClC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC3B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC/B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC7B,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACpD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACjC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACzC,MAAM,SAAS,CAAC,GAAG,CAAC,uBAAS,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACjD,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 { PushDevOptions } from './commands/push-dev-command';\n\nconst REMOVE = '--remove';\nconst LIST = '--list';\nconst FORCE = '--force';\nconst REBASE_RESOLUTION = '--rebase-resolution';\nconst RESOLVE = '--resolve';\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 // A mistyped `--forc` that was silently dropped would turn \"discard the published resolution\" into a\n // refusal, or worse, the reverse.\n const args = container.get(CliArgs).parse(new CliUsage(\n 'wp-push-dev',\n 'Publish a DISPOSABLE copy of this branch for the shared dev environment. No PR, no build, and the feature branch is never moved.',\n [\n new CliFlag(LIST, 'List the dev copies currently published on origin, then stop.'),\n new CliFlag(REMOVE,\n 'Delete this branch\\'s dev copy — the rollback. It drops out of the shared dev\\n'\n + ' branch on the next composition run.'),\n new CliFlag(RESOLVE,\n 'Compose the OTHER published copies onto yours, so the shared environment can\\n'\n + ' build them together. With a branch name, merge only that one (the CI\\n'\n + ' conflict message names it); bare, merge every other copy in the order\\n'\n + ' CI composes them. Conflicts stop for you to resolve; finish with\\n'\n + ' `pnpm wp-finish-push-dev`.', true),\n new CliFlag(REBASE_RESOLUTION,\n 'The copy already holds a conflict resolution and your branch has moved on:\\n'\n + ' REPLAY that resolution on top of your new commits instead of losing it.'),\n new CliFlag(FORCE,\n 'DISCARD a conflict resolution published on the copy and overwrite it with your\\n'\n + ' branch as-is. Somebody has to re-resolve the composition afterwards.'),\n ],\n ));\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 container.get(PrGateApp).pushDev(opts);\n});\n"]}
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"]}
@@ -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-review-upsert-pr', 'Validate the 3-point merge, build it, extract this branch\'s diff, and brief the reviewer subagents.'));
14
- await container.get(pr_gate_app_1.PrGateApp).reviewUpsertPr();
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-review-upsert-pr')));
16
13
  //# sourceMappingURL=wp-review-upsert-pr.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wp-review-upsert-pr.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-review-upsert-pr.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,CAC5C,qBAAqB,EACrB,sGAAsG,CACzG,CAAC,CAAC;IACH,MAAM,SAAS,CAAC,GAAG,CAAC,uBAAS,CAAC,CAAC,cAAc,EAAE,CAAC;AACpD,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(\n 'wp-review-upsert-pr',\n 'Validate the 3-point merge, build it, extract this branch\\'s diff, and brief the reviewer subagents.',\n ));\n await container.get(PrGateApp).reviewUpsertPr();\n});\n"]}
1
+ {"version":3,"file":"wp-review-upsert-pr.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-review-upsert-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,qBAAqB,CAAC,CAAC,CAC7F,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-review-upsert-pr')),\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-start-update', '3-point squash-update this feature branch from main (no PR).'));
14
- await container.get(pr_gate_app_1.PrGateApp).startUpdate();
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-start-update')));
16
13
  //# sourceMappingURL=wp-start-update.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wp-start-update.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-start-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,iBAAiB,EAAE,8DAA8D,CAAC,CAAC,CAAC;IACrI,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 { 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-start-update', '3-point squash-update this feature branch from main (no PR).'));\n await container.get(PrGateApp).startUpdate();\n});\n"]}
1
+ {"version":3,"file":"wp-start-update.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-start-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,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-start-update')),\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-start-upsert-pr', 'Update from main, push, run the build gate, then hand off summary.json.'));
14
- await container.get(pr_gate_app_1.PrGateApp).startUpsertPr();
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-start-upsert-pr')));
16
13
  //# sourceMappingURL=wp-start-upsert-pr.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wp-start-upsert-pr.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-start-upsert-pr.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,oBAAoB,EAAE,yEAAyE,CAAC,CAAC,CAAC;IACnJ,MAAM,SAAS,CAAC,GAAG,CAAC,uBAAS,CAAC,CAAC,aAAa,EAAE,CAAC;AACnD,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-start-upsert-pr', 'Update from main, push, run the build gate, then hand off summary.json.'));\n await container.get(PrGateApp).startUpsertPr();\n});\n"]}
1
+ {"version":3,"file":"wp-start-upsert-pr.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-start-upsert-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,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-start-upsert-pr')),\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-sync-main', 'Go to main, fast-forward it, reap dead worktrees and branches, and sweep orphan directories.'));
14
- await container.get(pr_gate_app_1.PrGateApp).syncMain();
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-sync-main')));
16
13
  //# sourceMappingURL=wp-sync-main.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wp-sync-main.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-sync-main.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,CAC5C,cAAc,EACd,8FAA8F,CAAC,CAAC,CAAC;IACrG,MAAM,SAAS,CAAC,GAAG,CAAC,uBAAS,CAAC,CAAC,QAAQ,EAAE,CAAC;AAC9C,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(\n 'wp-sync-main',\n 'Go to main, fast-forward it, reap dead worktrees and branches, and sweep orphan directories.'));\n await container.get(PrGateApp).syncMain();\n});\n"]}
1
+ {"version":3,"file":"wp-sync-main.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-sync-main.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,cAAc,CAAC,CAAC,CACtF,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-sync-main')),\n);\n"]}
@@ -2,16 +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-upsert-hotfix-pr` (issue #1057): publish a /hotfix/ branch in one command.
9
- (0, rules_config_1.runMain)(async () => {
10
- const container = new inversify_1.Container({ autobind: true });
11
- container
12
- .get(rules_config_1.CliArgs)
13
- .assertNoArgs(new rules_config_1.CliUsage('wp-upsert-hotfix-pr', 'Publish the current /hotfix/ branch: hotfix-ci gate (build + test), no merge from main, one\n' +
14
- 'fast-forward push, then create or update the audit-bannered PR to main. Never auto-merges.'));
15
- await container.get(pr_gate_app_1.PrGateApp).upsertHotfixPr();
16
- });
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-upsert-hotfix-pr')));
17
13
  //# sourceMappingURL=wp-upsert-hotfix-pr.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wp-upsert-hotfix-pr.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-upsert-hotfix-pr.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,yCAAsC;AACtC,0DAAqE;AACrE,+CAA0C;AAE1C,sGAAsG;AACtG,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,qBAAqB,EACrB,+FAA+F;QAC3F,4FAA4F,CACnG,CACJ,CAAC;IACN,MAAM,SAAS,CAAC,GAAG,CAAC,uBAAS,CAAC,CAAC,cAAc,EAAE,CAAC;AACpD,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\n// Composition root for `wp-upsert-hotfix-pr` (issue #1057): publish a /hotfix/ branch in one command.\nrunMain(async (): Promise<void> => {\n const container = new Container({ autobind: true });\n container\n .get(CliArgs)\n .assertNoArgs(\n new CliUsage(\n 'wp-upsert-hotfix-pr',\n 'Publish the current /hotfix/ branch: hotfix-ci gate (build + test), no merge from main, one\\n' +\n 'fast-forward push, then create or update the audit-bannered PR to main. Never auto-merges.',\n ),\n );\n await container.get(PrGateApp).upsertHotfixPr();\n});\n"]}
1
+ {"version":3,"file":"wp-upsert-hotfix-pr.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-upsert-hotfix-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,qBAAqB,CAAC,CAAC,CAC7F,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-upsert-hotfix-pr')),\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
- const write_review_fixes_command_1 = require("./commands/write-review-fixes-command");
9
- const FILE = '--file';
10
- (0, rules_config_1.runMain)(async () => {
11
- const container = new inversify_1.Container({ autobind: true });
12
- const args = container.get(rules_config_1.CliArgs).parse(new rules_config_1.CliUsage('wp-write-review-fixes', 'Record the coordinating agent response to every red finding in the completed reviewer round.', [new rules_config_1.CliFlag(FILE, 'JSON file. Omit to pass JSON on stdin.', true)]));
13
- const json = container.get(write_review_fixes_command_1.WriteReviewFixesInput).read(args.value(FILE));
14
- await container.get(pr_gate_app_1.PrGateApp).writeReviewFixes(new write_review_fixes_command_1.WriteReviewFixesOptions(json, process.cwd()));
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-write-review-fixes')));
16
13
  //# sourceMappingURL=wp-write-review-fixes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wp-write-review-fixes.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-write-review-fixes.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,yCAAsC;AACtC,0DAA8E;AAC9E,+CAA0C;AAC1C,sFAAuG;AAEvG,MAAM,IAAI,GAAG,QAAQ,CAAC;AAEtB,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,CAClD,uBAAuB,EACvB,8FAA8F,EAC9F,CAAC,IAAI,sBAAO,CAAC,IAAI,EAAE,wCAAwC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1E,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,kDAAqB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IACzE,MAAM,SAAS,CAAC,GAAG,CAAC,uBAAS,CAAC,CAAC,gBAAgB,CAAC,IAAI,oDAAuB,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AACtG,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport 'reflect-metadata';\nimport { Container } from 'inversify';\nimport { CliArgs, CliFlag, CliUsage, runMain } from '@webpieces/rules-config';\nimport { PrGateApp } from './pr-gate-app';\nimport { WriteReviewFixesInput, WriteReviewFixesOptions } from './commands/write-review-fixes-command';\n\nconst FILE = '--file';\n\nrunMain(async (): Promise<void> => {\n const container = new Container({ autobind: true });\n const args = container.get(CliArgs).parse(new CliUsage(\n 'wp-write-review-fixes',\n 'Record the coordinating agent response to every red finding in the completed reviewer round.',\n [new CliFlag(FILE, 'JSON file. Omit to pass JSON on stdin.', true)]));\n const json = container.get(WriteReviewFixesInput).read(args.value(FILE));\n await container.get(PrGateApp).writeReviewFixes(new WriteReviewFixesOptions(json, process.cwd()));\n});\n"]}
1
+ {"version":3,"file":"wp-write-review-fixes.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-write-review-fixes.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,uBAAuB,CAAC,CAAC,CAC/F,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-write-review-fixes')),\n);\n"]}
@@ -2,31 +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 write_review_command_1 = require("./commands/write-review-command");
9
- const CHECKLIST = '--checklist';
10
- const FILE = '--file';
11
- const CHECK = '--check';
12
- // Composition root for `wp-write-review`: the ONE way a reviewer subagent submits a checklist verdict
13
- // (issue #863). The command an agent types stays PLAIN — `pnpm wp-write-review --checklist <id>` with the
14
- // JSON on stdin — because the PreToolUse hook reads that literal command to stamp WHO is running it, and a
15
- // worktree-isolated subagent's harness only runs commands it can see stay inside the worktree.
16
- (0, rules_config_1.runMain)(async () => {
17
- const container = new inversify_1.Container({ autobind: true });
18
- const args = container.get(rules_config_1.CliArgs).parse(new rules_config_1.CliUsage('wp-write-review', 'Submit ONE reviewer verdict for ONE checklist. Reviewer subagents only — the coordinating agent is refused.', [
19
- new rules_config_1.CliFlag(CHECKLIST, 'REQUIRED. The checklist id your instructions file names, e.g. --checklist security.', true),
20
- new rules_config_1.CliFlag(FILE, 'The verdict JSON file. Omit it to pass the JSON on stdin:\n'
21
- + " pnpm wp-write-review --checklist <id> <<'EOF' … EOF", true),
22
- new rules_config_1.CliFlag(CHECK, 'Submit nothing: only say whether this checklist may still be reviewed on this branch. A reviewer\n'
23
- + ' runs it FIRST; it refuses once the checklist was reviewed maxReviewerRounds times.'),
24
- ]));
25
- if (args.has(CHECK)) {
26
- await container.get(pr_gate_app_1.PrGateApp).checkReviewBudget(new write_review_command_1.ReviewBudgetCheckOptions(args.value(CHECKLIST), process.cwd()));
27
- return;
28
- }
29
- const json = container.get(write_review_command_1.WriteReviewInput).read(args.value(FILE));
30
- await container.get(pr_gate_app_1.PrGateApp).writeReview(new write_review_command_1.WriteReviewOptions(args.value(CHECKLIST), json, process.cwd()));
31
- });
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-write-review')));
32
13
  //# sourceMappingURL=wp-write-review.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wp-write-review.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-write-review.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,yCAAsC;AACtC,0DAA8E;AAC9E,+CAA0C;AAC1C,0EAAiH;AAEjH,MAAM,SAAS,GAAG,aAAa,CAAC;AAChC,MAAM,IAAI,GAAG,QAAQ,CAAC;AACtB,MAAM,KAAK,GAAG,SAAS,CAAC;AAExB,sGAAsG;AACtG,0GAA0G;AAC1G,2GAA2G;AAC3G,+FAA+F;AAC/F,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,CAClD,iBAAiB,EACjB,6GAA6G,EAC7G;QACI,IAAI,sBAAO,CAAC,SAAS,EAAE,qFAAqF,EAAE,IAAI,CAAC;QACnH,IAAI,sBAAO,CAAC,IAAI,EACZ,6DAA6D;cAC3D,qEAAqE,EAAE,IAAI,CAAC;QAClF,IAAI,sBAAO,CAAC,KAAK,EACb,oGAAoG;cAClG,oGAAoG,CAAC;KAC9G,CAAC,CAAC,CAAC;IACR,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QAClB,MAAM,SAAS,CAAC,GAAG,CAAC,uBAAS,CAAC,CAAC,iBAAiB,CAAC,IAAI,+CAAwB,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACrH,OAAO;IACX,CAAC;IACD,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,uCAAgB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IACpE,MAAM,SAAS,CAAC,GAAG,CAAC,uBAAS,CAAC,CAAC,WAAW,CAAC,IAAI,yCAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AACnH,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 { ReviewBudgetCheckOptions, WriteReviewInput, WriteReviewOptions } from './commands/write-review-command';\n\nconst CHECKLIST = '--checklist';\nconst FILE = '--file';\nconst CHECK = '--check';\n\n// Composition root for `wp-write-review`: the ONE way a reviewer subagent submits a checklist verdict\n// (issue #863). The command an agent types stays PLAIN — `pnpm wp-write-review --checklist <id>` with the\n// JSON on stdin — because the PreToolUse hook reads that literal command to stamp WHO is running it, and a\n// worktree-isolated subagent's harness only runs commands it can see stay inside the worktree.\nrunMain(async (): Promise<void> => {\n const container = new Container({ autobind: true });\n const args = container.get(CliArgs).parse(new CliUsage(\n 'wp-write-review',\n 'Submit ONE reviewer verdict for ONE checklist. Reviewer subagents only — the coordinating agent is refused.',\n [\n new CliFlag(CHECKLIST, 'REQUIRED. The checklist id your instructions file names, e.g. --checklist security.', true),\n new CliFlag(FILE,\n 'The verdict JSON file. Omit it to pass the JSON on stdin:\\n'\n + \" pnpm wp-write-review --checklist <id> <<'EOF' … EOF\", true),\n new CliFlag(CHECK,\n 'Submit nothing: only say whether this checklist may still be reviewed on this branch. A reviewer\\n'\n + ' runs it FIRST; it refuses once the checklist was reviewed maxReviewerRounds times.'),\n ]));\n if (args.has(CHECK)) {\n await container.get(PrGateApp).checkReviewBudget(new ReviewBudgetCheckOptions(args.value(CHECKLIST), process.cwd()));\n return;\n }\n const json = container.get(WriteReviewInput).read(args.value(FILE));\n await container.get(PrGateApp).writeReview(new WriteReviewOptions(args.value(CHECKLIST), json, process.cwd()));\n});\n"]}
1
+ {"version":3,"file":"wp-write-review.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-write-review.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-write-review')),\n);\n"]}