@webpieces/pr-gate 0.4.984 → 0.4.985
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -8
- package/src/scripts/commands/build-push-dev-command.d.ts +61 -0
- package/src/scripts/commands/build-push-dev-command.js +159 -0
- package/src/scripts/commands/build-push-dev-command.js.map +1 -0
- package/src/scripts/commands/finish-push-dev-command.d.ts +73 -17
- package/src/scripts/commands/finish-push-dev-command.js +187 -31
- package/src/scripts/commands/finish-push-dev-command.js.map +1 -1
- package/src/scripts/commands/start-push-dev-command.d.ts +43 -0
- package/src/scripts/commands/start-push-dev-command.js +111 -0
- package/src/scripts/commands/start-push-dev-command.js.map +1 -0
- package/src/scripts/pr-gate-app.d.ts +18 -18
- package/src/scripts/pr-gate-app.js +27 -26
- package/src/scripts/pr-gate-app.js.map +1 -1
- package/src/scripts/pr-gate-cli-app.d.ts +2 -2
- package/src/scripts/pr-gate-cli-app.js +20 -29
- package/src/scripts/pr-gate-cli-app.js.map +1 -1
- package/src/scripts/workflow/build-gate-log.js +2 -2
- package/src/scripts/workflow/build-gate-log.js.map +1 -1
- package/src/scripts/workflow/dev-build.js +2 -2
- package/src/scripts/workflow/dev-build.js.map +1 -1
- package/src/scripts/workflow/dev-copy-on-main.d.ts +1 -1
- package/src/scripts/workflow/dev-copy-on-main.js +1 -1
- package/src/scripts/workflow/dev-copy-on-main.js.map +1 -1
- package/src/scripts/workflow/dev-deploy-refs.d.ts +4 -17
- package/src/scripts/workflow/dev-deploy-refs.js +5 -21
- package/src/scripts/workflow/dev-deploy-refs.js.map +1 -1
- package/src/scripts/workflow/dev-resolve-runner.d.ts +43 -73
- package/src/scripts/workflow/dev-resolve-runner.js +117 -181
- package/src/scripts/workflow/dev-resolve-runner.js.map +1 -1
- package/src/scripts/workflow/main-freshness.d.ts +16 -0
- package/src/scripts/workflow/main-freshness.js +33 -0
- package/src/scripts/workflow/main-freshness.js.map +1 -0
- package/src/scripts/workflow/push-dev-state.d.ts +12 -35
- package/src/scripts/workflow/push-dev-state.js +31 -62
- package/src/scripts/workflow/push-dev-state.js.map +1 -1
- package/src/scripts/workflow/verified-dev-copy.d.ts +46 -0
- package/src/scripts/workflow/verified-dev-copy.js +89 -0
- package/src/scripts/workflow/verified-dev-copy.js.map +1 -0
- package/src/scripts/{wp-build-dev.js → wp-build-push-dev.js} +2 -2
- package/src/scripts/wp-build-push-dev.js.map +1 -0
- package/src/scripts/{wp-push-dev.js → wp-start-push-dev.js} +2 -2
- package/src/scripts/wp-start-push-dev.js.map +1 -0
- package/src/scripts/commands/build-dev-command.d.ts +0 -27
- package/src/scripts/commands/build-dev-command.js +0 -99
- package/src/scripts/commands/build-dev-command.js.map +0 -1
- package/src/scripts/commands/push-dev-command.d.ts +0 -140
- package/src/scripts/commands/push-dev-command.js +0 -356
- package/src/scripts/commands/push-dev-command.js.map +0 -1
- package/src/scripts/wp-build-dev.js.map +0 -1
- package/src/scripts/wp-push-dev.js.map +0 -1
- /package/src/scripts/{wp-build-dev.d.ts → wp-build-push-dev.d.ts} +0 -0
- /package/src/scripts/{wp-push-dev.d.ts → wp-start-push-dev.d.ts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"push-dev-command.js","sourceRoot":"","sources":["../../../../../../../packages/tooling/pr-gate/src/scripts/commands/push-dev-command.ts"],"names":[],"mappings":";;;;AAAA,0DAOiC;AACjC,yCAA2D;AAE3D,mDAA+C;AAC/C,iEAAqE;AACrE,+DAA6F;AAC7F,uEAAsF;AACtF,+EAAyE;AACzE,qDAAiD;AACjD,mEAAuF;AAEvF,MAAM,GAAG,GAAG,0DAA0D,CAAC;AAEvE;;;GAGG;AACH,MAAa,cAAc;IACvB,6CAA6C;IAC7C,MAAM,GAAG,KAAK,CAAC;IACf,sFAAsF;IACtF,IAAI,GAAG,KAAK,CAAC;IACb,qFAAqF;IACrF,KAAK,GAAG,KAAK,CAAC;IACd,uFAAuF;IACvF,gBA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,KAAK,0BAAW,wBAAwB;cACxC,2FAA2F;cAC3F,mEAAmE;cACnE,KAAK,0BAAW,YAAY;cAC5B,8FAA8F;cAC9F,+BAA+B,0BAAW,mBAAmB;cAC7D,+CAA+C,MAAM,yBAAyB,SAAS,IAAI,CAAC,CAAC;IACvG,CAAC;IAED,kGAAkG;IAClG,yEAAyE;IACjE,yBAAyB,CAAC,QAAgB;QAC9C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACxC,IAAI,KAAK,KAAK,IAAI;YAAE,OAAO;QAC3B,MAAM,IAAI,2BAAY,CAAC,CAAC,EACpB,IAAI,GAAG,GAAG,GAAG,iDAAiD,GAAG,GAAG,GAAG,IAAI;cACzE,qCAAqC,KAAK,CAAC,SAAS,+CAA+C;cACnG,KAAK,iCAAkB,kEAAkE;cACzF,KAAK,iCAAkB,gDAAgD,KAAK,CAAC,cAAc,MAAM,CAAC,CAAC;IAC7G,CAAC;CACJ,CAAA;AAlTY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,sBAAU,EAAC,8BAAkB,CAAC,SAAS,CAAC;6CAGA,6BAAc;QACrB,kBAAO;QACV,+BAAa;QACZ,kCAAiB;QAChB,qCAAgB;QACZ,4CAAmB;QACrB,oBAAQ;QACN,gCAAa;GATrC,cAAc,CAkT1B","sourcesContent":["import {\n CliExitError,\n DevDeployConfig,\n RepoRootFinder,\n WP_FINISH_PUSH_DEV,\n WP_PUSH_DEV,\n writeTemplate,\n} from '@webpieces/rules-config';\nimport { injectable, bindingScopeValues } from 'inversify';\n\nimport { GitExec } from '../workflow/git-exec';\nimport { DevCopy, DevDeployRefs } from '../workflow/dev-deploy-refs';\nimport { DevResolveMode, PushDevState, PushDevStateStore } from '../workflow/push-dev-state';\nimport { DevResolveRunner, RESOLUTION_SUBJECT } from '../workflow/dev-resolve-runner';\nimport { DevDeployWatchHints } from '../workflow/dev-deploy-watch-hints';\nimport { DevBuild } from '../workflow/dev-build';\nimport { DevCopyLanding, DevCopyOnMain, MergedPr } from '../workflow/dev-copy-on-main';\n\nconst SEP = '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\\n';\n\n/**\n * Which of `wp-push-dev`'s modes was asked for. Data-only (per CLAUDE.md) with plain assigned fields\n * rather than a seven-argument constructor — the bin sets what argv carried and nothing else.\n */\nexport class PushDevOptions {\n /** Delete the remote copy — the rollback. */\n remove = false;\n /** List the live copies and stop. The one mode that needs no branch preconditions. */\n list = false;\n /** Discard a conflict resolution already published on the copy, and overwrite it. */\n force = false;\n /** Replay that resolution on top of the new local commits instead of discarding it. */\n rebaseResolution = false;\n /** Compose the other copies onto this one so the shared environment can build them together. */\n resolve = false;\n /** With `--resolve`: merge ONLY this developer's branch. Empty ⇒ every other copy. */\n resolveTarget = '';\n}\n\n/**\n * `wp-push-dev` — publish a DISPOSABLE copy of this branch so a shared dev environment can build it,\n * without landing anything on `main` and without opening a PR.\n *\n * WHY THIS COMMAND HAS TO EXIST AT ALL: `pr-creation-or-push-guard` blocks every `git push`, no\n * exceptions, by design. Its own fix-hint offers \"ask a human to run the push\" for out-of-band cases —\n * which is the right answer for a genuine exception and the wrong one for a routine daily action. Without\n * a gated command there is simply no legal way for an AI to get a branch onto a dev server, so the\n * feature was undoable rather than merely awkward.\n *\n * WHY IT CHECKS AGAINST `dev` FIRST (#1397): 61 of 73 failed dev publishes on one consumer failed on a git\n * conflict, which the developer only learned about after the server-side composition failed. So a plain\n * publish now does locally what CI is about to do: merge `origin/<devBranch>` into a THROWAWAY branch,\n * resolve any conflict there (the same halt / `wp-finish-push-dev` state machine `--resolve` uses), and run\n * `commands.push-dev.buildCommand` on the merged tree. A build against `main` alone would prove the wrong\n * thing; a build of only what differs from `dev` proves the right one, quickly.\n *\n * WHAT IS PUBLISHED IS NEVER THAT MERGE: the copy is the feature head plus, when something conflicted, one\n * commit recording the resolved files (DevResolveRunner.recordResolution). A copy that contained `dev`\n * would carry every other copy's history, and a later `--remove` of one of them would leave it on dev\n * through this one.\n *\n * WHAT IT NEVER DOES: touch the feature branch. See DevDeployRefs for the invariant and why the copy\n * exists to hold conflict resolutions that must not reach the PR.\n */\n@injectable(bindingScopeValues.Singleton)\nexport class PushDevCommand {\n constructor(\n private readonly repoRootFinder: RepoRootFinder,\n private readonly gitExec: GitExec,\n private readonly refs: DevDeployRefs,\n private readonly store: PushDevStateStore,\n private readonly runner: DevResolveRunner,\n private readonly watchHints: DevDeployWatchHints,\n private readonly devBuild: DevBuild,\n private readonly copyOnMain: DevCopyOnMain,\n ) {}\n\n async run(opts: PushDevOptions): Promise<void> {\n const repoRoot = this.repoRootFinder.resolveRepoRoot(process.cwd());\n // Refresh the AI-facing workflow doc so it is present + current for any failure message to cite —\n // same reason every other wp-* command opens this way.\n writeTemplate(repoRoot, 'webpieces.git-workflow.md');\n const cfg = this.refs.config(repoRoot);\n\n // A resolve already in flight owns the checkout; starting a second one would strand the first.\n this.assertNoResolveInProgress(repoRoot);\n\n if (opts.list) {\n await this.list(repoRoot, cfg);\n return;\n }\n\n const branch = this.refs.currentBranch(repoRoot);\n this.refs.assertPushable(cfg, branch);\n const targetRef = cfg.copyRefFor(branch);\n\n if (opts.remove) {\n await this.remove(repoRoot, cfg, branch, targetRef);\n return;\n }\n // Every remaining mode commits or merges, so the tree must be the AI's committed work and nothing\n // else. The tooling never commits for you.\n await this.gitExec.assertCleanTree(repoRoot);\n\n if (opts.resolve) {\n await this.startResolve(repoRoot, cfg, branch, targetRef, opts.resolveTarget);\n return;\n }\n await this.publish(repoRoot, cfg, branch, targetRef, opts);\n }\n\n /** `--list`: exactly the live copies, straight from the remote — never a cached local view. */\n private async list(repoRoot: string, cfg: DevDeployConfig): Promise<void> {\n const copies = await this.refs.liveCopies(repoRoot, cfg);\n if (copies.length === 0) {\n process.stdout.write(\n `\\nNo dev copies published — nothing matches \\`${cfg.copyRefGlob()}\\` on origin.\\n`\n + `Publish this branch's with: ${WP_PUSH_DEV}\\n`);\n return;\n }\n let out = '\\n' + SEP + `📋 ${String(copies.length)} dev cop${copies.length === 1 ? 'y' : 'ies'} on origin\\n` + SEP + '\\n';\n for (const copy of copies) out += ` ${copy.sha.slice(0, 8)} ${copy.ref}\\n`;\n out += `\\nYour CI composes \\`${cfg.devBranch}\\` from origin/main plus every ref above, on every run.\\n`\n + `Remove yours with: ${WP_PUSH_DEV} --remove (deletes your copy, then pushes the content-free\\n`\n + `\\`${cfg.removeMarkerRefFor('<your-branch>')}\\` marker your dev workflow triggers on and deletes)\\n`;\n process.stdout.write(out);\n }\n\n /**\n * `--remove`: delete the remote copy, then push the `<removeNamespace>/<branch>` marker (#1395). This\n * IS the rollback — nothing else has to be undone.\n *\n * WHY A MARKER AS WELL AS THE DELETION: a deletion can only be heard by a workflow's `on: delete:`,\n * which GitHub cannot filter by branch, so every branch deletion in the repo started a dev-deploy run.\n * A PUSH to `<removeNamespace>/**` is filterable. The deletion stays, unchanged, so a consumer whose\n * workflow still listens on `delete:` keeps working through the rollout window; the marker is purely\n * additive at the transport level.\n *\n * ALREADY ON MAIN (#1401): before anything is deleted, the copy is compared with `origin/main`. When\n * every file it changes already has the copy's content on main, removing it takes nothing off dev —\n * main keeps the change there — and would only force a pointless full recompose, so it is REFUSED\n * ({@link refuseLanded}). When only some files are, the rest is still a real rollback: it warns, naming\n * the landed files, and removes.\n *\n * ORDER: `origin/main` and the copy are fetched BEFORE anything is deleted, so a network failure there\n * leaves the pool exactly as it was. The marker push is the last step, and the only one that can fail with the\n * copy already gone — that is the state {@link markerPushFailed} names.\n */\n private async remove(repoRoot: string, cfg: DevDeployConfig, branch: string, targetRef: string): Promise<void> {\n if (await this.refs.remoteSha(repoRoot, targetRef) === '') {\n process.stdout.write(\n `\\nNothing to remove — \\`${targetRef}\\` is not published.\\n`\n + `List what IS published with: ${WP_PUSH_DEV} --list\\n`);\n return;\n }\n const markerRef = cfg.removeMarkerRefFor(branch);\n const mainTip = await this.refs.freshMainTip(repoRoot);\n await this.refs.fetchCopies(repoRoot, [targetRef]);\n const landing = await this.copyOnMain.landing(repoRoot, targetRef);\n if (landing.fullyOnMain()) {\n this.refuseLanded(targetRef, await this.copyOnMain.mergedPr(repoRoot, branch));\n }\n if (landing.partlyOnMain()) process.stdout.write(this.partlyLandedWarning(targetRef, landing));\n await this.gitExec.runGitChecked(['-C', repoRoot, 'push', 'origin', '--delete', `refs/heads/${targetRef}`],\n `Failed to delete the dev copy ${targetRef}`);\n // --force: the marker carries no content, so whatever an earlier, never-deleted marker pointed at\n // is worthless — and refusing a non-fast-forward here would strand the rollback half-done.\n const pushed = await this.gitExec.tryGit(\n ['-C', repoRoot, 'push', '--force', 'origin', `${mainTip}:refs/heads/${markerRef}`], repoRoot);\n if (!pushed.ok) this.markerPushFailed(cfg, branch, targetRef, markerRef, pushed.stderr);\n process.stdout.write(\n '\\n' + SEP + `🗑️ Removed ${targetRef}\\n` + SEP + '\\n'\n + `Pushed the marker \\`${markerRef}\\` (at origin/main ${mainTip.slice(0, 8)}) — your dev workflow triggers\\n`\n + `on it, deletes it, and rebuilds \\`${cfg.devBranch}\\` without \\`${branch}\\`. Your branch and any PR on it\\n`\n + 'are untouched.\\n');\n }\n\n /**\n * `--remove` of a copy whose every change is already on `origin/main`. Nothing was deleted and no marker\n * was pushed. There is deliberately no override: a remove cannot take back what main already holds, so\n * refusing never blocks a real rollback — that is a revert PR.\n */\n private refuseLanded(targetRef: string, pr: MergedPr | null): never {\n const landedVia = pr === null ? '' : ` (PR #${pr.num} landed ${pr.mergedAt})`;\n throw new CliExitError(2,\n '\\n' + SEP + `⛔ \\`${targetRef}\\` is already on origin/main — nothing was removed\\n` + SEP + '\\n'\n + `\\`${targetRef}\\` is already on origin/main${landedVia}, so removing the copy\\n`\n + 'would not take anything off dev — main keeps it there. The nightly reset deletes the copy.\\n'\n + 'Nothing was removed, and no rebuild marker was pushed.\\n\\n'\n + 'If that code is what broke dev, it is on main now: the fix is a revert PR against main, not a remove.\\n');\n }\n\n /** Some of the copy's files are already on main: the remove proceeds, and says what it does NOT take off. */\n private partlyLandedWarning(targetRef: string, landing: DevCopyLanding): string {\n return '\\n' + SEP + `⚠️ Part of \\`${targetRef}\\` is already on origin/main\\n` + SEP + '\\n'\n + `${String(landing.landed.length)} of the ${String(landing.changed.length)} files this copy changes already have the copy's content on\\n`\n + 'origin/main. Removing the copy does NOT take these off dev — main keeps them there:\\n'\n + landing.landed.map((f: string): string => ` ${f}`).join('\\n') + '\\n'\n + 'Only the rest of the copy is being removed. If one of the files above broke dev, the fix is a revert PR.\\n';\n }\n\n /**\n * The one half-done state `--remove` can leave: the copy is deleted, the rebuild signal is not sent.\n * Said out loud because it is invisible otherwise — `--list` already looks right, while the deployed\n * `dev` still runs the removed branch until something else triggers a composition.\n */\n private markerPushFailed(cfg: DevDeployConfig, branch: string, targetRef: string, markerRef: string, stderr: string): never {\n throw new CliExitError(1,\n '\\n' + SEP + `⛔ Removed \\`${targetRef}\\`, but pushing the rebuild marker \\`${markerRef}\\` FAILED\\n` + SEP + '\\n'\n + `Your copy is already GONE from origin, but \\`${cfg.devBranch}\\` was NOT rebuilt: the deployed dev server\\n`\n + `still runs \\`${branch}\\` until the next composition run.\\n\\n`\n + 'git said:\\n' + (stderr === '' ? ' (no output)' : stderr.split('\\n').map((l: string): string => ` ${l}`).join('\\n')) + '\\n\\n'\n + 'Any later composition run drops your branch on its own, because the copy no longer exists — the next\\n'\n + `\\`${WP_PUSH_DEV}\\` by anyone, or a push to main if your workflow composes on that. To force one now,\\n`\n + 'once the cause above is fixed (network, auth, a branch-protection rule on the marker namespace),\\n'\n + 're-publish and remove again; the second remove pushes the marker:\\n\\n'\n + ` ${WP_PUSH_DEV}\\n ${WP_PUSH_DEV} --remove\\n`);\n }\n\n /**\n * The ordinary path: check the copy against `origin/<devBranch>`, build it, then publish it as\n * `<namespace>/<branch>` (#1397). The merge, the conflict halt and the build all happen on a throwaway\n * branch through DevResolveRunner, in DevResolveMode.PREBUILD — so a conflict stops in exactly the\n * same `wp-finish-push-dev` state machine `--resolve` uses, rather than inventing a second way to be\n * stuck.\n *\n * THE CLOBBER GUARD runs first. If the remote copy holds commits the local branch does not, somebody\n * (quite possibly this developer, days ago) put real work there, and a silent force-push destroys it,\n * so the default is refusal with two named ways forward — never a \"use --force\" one-liner, which is how\n * a warning becomes a reflex. The one exception is a commit this flow wrote itself\n * ({@link RESOLUTION_SUBJECT}): the check below re-derives it against today's dev, so replacing it\n * loses nothing.\n */\n private async publish(repoRoot: string, cfg: DevDeployConfig, branch: string, targetRef: string, opts: PushDevOptions): Promise<void> {\n const remoteSha = await this.refs.remoteSha(repoRoot, targetRef);\n if (remoteSha !== '') {\n await this.refs.fetchCopies(repoRoot, [targetRef]);\n const subjects = await this.refs.subjectsOnlyOnRemote(repoRoot, targetRef);\n const ahead = subjects.filter((s: string): boolean => !s.startsWith(RESOLUTION_SUBJECT)).length;\n if (ahead > 0 && opts.rebaseResolution) {\n await this.rebaseResolution(repoRoot, branch, targetRef);\n return;\n }\n if (ahead > 0 && !opts.force) this.refuseClobber(cfg, branch, targetRef, ahead);\n }\n // Before any git write: an unconfigured dev build refuses here, with nothing merged or published.\n this.devBuild.command(repoRoot);\n if (await this.refs.remoteSha(repoRoot, cfg.devBranch) === '') {\n await this.publishWithoutDev(repoRoot, cfg, branch, targetRef, remoteSha, opts.force);\n return;\n }\n const state = new PushDevState(branch, this.runner.tmpBranchFor(branch), targetRef, [cfg.devBranch]);\n state.mode = DevResolveMode.PREBUILD;\n state.leaseSha = remoteSha;\n state.force = opts.force;\n process.stdout.write(this.runner.announcePrebuild(cfg, state));\n await this.runner.start(repoRoot, state, 'HEAD', [cfg.devBranch]);\n }\n\n /**\n * `origin/<devBranch>` does not exist yet — the very first publish in a repo whose CI has never\n * composed. There is nothing to conflict with and no base for a dev-scoped build, so the copy is\n * published as it is; refusing here would make the first dev composition impossible to start.\n */\n private async publishWithoutDev(\n repoRoot: string, cfg: DevDeployConfig, branch: string, targetRef: string, remoteSha: string, force: boolean,\n ): Promise<void> {\n const lease = remoteSha === '' ? [] : force ? ['--force'] : [`--force-with-lease=refs/heads/${targetRef}:${remoteSha}`];\n await this.gitExec.runGitChecked(['-C', repoRoot, 'push', ...lease, 'origin', `HEAD:refs/heads/${targetRef}`],\n `Failed to publish the dev copy ${targetRef}`);\n const published = await this.refs.headSha(repoRoot);\n process.stdout.write(\n '\\n' + SEP + `✅ Published ${targetRef}\\n` + SEP + '\\n'\n + `\\`origin/${cfg.devBranch}\\` does not exist yet, so there was nothing to check the copy against and no\\n`\n + `dev build ran. \\`${branch}\\` is now in the pool your CI composes \\`${cfg.devBranch}\\` from.\\n\\n`\n + ` ${WP_PUSH_DEV} --list ← what else is in the pool\\n`\n + ` ${WP_PUSH_DEV} --remove ← take this branch back out\\n`\n + this.watchHints.render(cfg, targetRef, published));\n }\n\n /**\n * `--rebase-resolution`: keep the published resolution, replay it on top of the new commits.\n *\n * Implemented as a resolve whose BASE is the local HEAD and whose queue is the copy itself, so a\n * replay that conflicts again lands in exactly the same halt/`wp-finish-push-dev` state machine as\n * any other conflict, rather than inventing a second way to be stuck.\n */\n private async rebaseResolution(repoRoot: string, branch: string, targetRef: string): Promise<void> {\n const state = new PushDevState(branch, this.runner.tmpBranchFor(branch), targetRef, [targetRef]);\n state.mode = DevResolveMode.REPLAY;\n process.stdout.write(\n '\\n' + SEP + `♻️ Replaying the published resolution onto \\`${branch}\\`\\n` + SEP + '\\n'\n + `Merging \\`${targetRef}\\` (which holds the resolution) into your new commits on a throwaway branch.\\n`\n + `Your feature branch \\`${branch}\\` is not touched.\\n\\n`);\n await this.runner.start(repoRoot, state, 'HEAD', [targetRef]);\n }\n\n /**\n * `--resolve`: compose the other copies onto this one, so what is published is what CI will build.\n *\n * With no argument the queue is EVERY other copy, in the same sorted order CI composes them — the\n * local resolution is then a rehearsal of the real composition, not a guess at it. With an argument\n * (the branch a CI conflict message names) it is just that one.\n */\n private async startResolve(repoRoot: string, cfg: DevDeployConfig, branch: string, targetRef: string, only: string): Promise<void> {\n if (await this.refs.remoteSha(repoRoot, targetRef) === '') {\n throw new CliExitError(2,\n '\\n' + SEP + `⛔ \\`${targetRef}\\` is not published yet\\n` + SEP + '\\n'\n + 'There is nothing to compose against. Publish your copy first, then resolve:\\n'\n + ` ${WP_PUSH_DEV}\\n ${WP_PUSH_DEV} --resolve\\n`);\n }\n const queue = await this.resolveQueue(repoRoot, cfg, targetRef, only);\n if (queue.length === 0) {\n process.stdout.write(\n `\\nNothing to compose — \\`${targetRef}\\` is the only copy in \\`${cfg.copyRefGlob()}\\`.\\n`\n + `Your CI will merge it onto origin/main by itself; there is no other branch to conflict with.\\n`);\n return;\n }\n const state = new PushDevState(branch, this.runner.tmpBranchFor(branch), targetRef, queue);\n state.mode = DevResolveMode.COMPOSE;\n process.stdout.write(this.runner.announce(cfg, state));\n await this.runner.start(repoRoot, state, `refs/remotes/origin/${targetRef}`, [targetRef, ...queue]);\n }\n\n // The refs to merge: one named copy, or every copy that is not mine. A named branch is accepted with\n // or without the namespace prefix, because the CI message that names it may print either.\n private async resolveQueue(repoRoot: string, cfg: DevDeployConfig, targetRef: string, only: string): Promise<string[]> {\n const copies = await this.refs.liveCopies(repoRoot, cfg);\n if (only === '') {\n return copies.filter((c: DevCopy): boolean => c.ref !== targetRef).map((c: DevCopy): string => c.ref);\n }\n const wanted = only.startsWith(`${cfg.branchNamespace}/`) ? only : cfg.copyRefFor(only);\n if (wanted === targetRef) {\n throw new CliExitError(2, `\\n⛔ \\`${only}\\` is your own copy — there is nothing to compose it with.\\n`);\n }\n if (!copies.some((c: DevCopy): boolean => c.ref === wanted)) {\n throw new CliExitError(2,\n '\\n' + SEP + `⛔ No published copy \\`${wanted}\\`\\n` + SEP + '\\n'\n + `Live copies (${WP_PUSH_DEV} --list):\\n`\n + copies.map((c: DevCopy): string => ` ${c.ref}`).join('\\n') + '\\n');\n }\n return [wanted];\n }\n\n private refuseClobber(cfg: DevDeployConfig, branch: string, targetRef: string, ahead: number): never {\n throw new CliExitError(2,\n '\\n' + SEP + `⛔ \\`${targetRef}\\` holds ${String(ahead)} commit(s) your branch does not\\n` + SEP + '\\n'\n + 'That is what a CONFLICT RESOLUTION looks like: somebody composed this copy against another\\n'\n + `developer's branch so \\`${cfg.devBranch}\\` could build, and that work exists ONLY on the copy —\\n`\n + 'by design, because it must never reach your feature branch or your PR.\\n\\n'\n + 'Publishing now would force-push over it and destroy it, so this command refuses. Pick one:\\n\\n'\n + ` ${WP_PUSH_DEV} --rebase-resolution\\n`\n + ' Replay that resolution on top of your new commits. Keeps the work; may ask you to\\n'\n + ' re-resolve the parts your new commits actually changed.\\n\\n'\n + ` ${WP_PUSH_DEV} --force\\n`\n + ' Discard it and publish your branch as-is. The composition breaks again until someone\\n'\n + ` re-resolves it with \\`${WP_PUSH_DEV} --resolve\\`.\\n\\n`\n + `See what is on the copy: git log --oneline ${branch}..refs/remotes/origin/${targetRef}\\n`);\n }\n\n // A half-finished resolve owns the checkout — it is parked on a throwaway branch, so \"the current\n // branch\" is not the feature branch this command would otherwise act on.\n private assertNoResolveInProgress(repoRoot: string): void {\n const state = this.store.read(repoRoot);\n if (state === null) return;\n throw new CliExitError(2,\n '\\n' + SEP + '⛔ A dev-deploy resolve is already in progress\\n' + SEP + '\\n'\n + `You are on the throwaway branch \\`${state.tmpBranch}\\`, mid-composition. Finish it or bail out:\\n`\n + ` ${WP_FINISH_PUSH_DEV} ← commit the resolution, resume the queue, publish\\n`\n + ` ${WP_FINISH_PUSH_DEV} --abort ← throw it away and go back to \\`${state.originalBranch}\\`\\n`);\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wp-build-dev.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/scripts/wp-build-dev.ts"],"names":[],"mappings":";;;AACA,4BAA0B;AAC1B,0DAAkD;AAClD,2DAAsD;AACtD,uDAAiD;AACjD,qEAAsE;AAEtE,MAAM,SAAS,GAAG,IAAI,mCAAe,EAAE,CAAC,MAAM,EAAE,CAAC;AACjD,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 { PrGateContainer } from './pr-gate-container';\nimport { PrGateCliApp } from './pr-gate-cli-app';\nimport { PrGateCliInvocationFactory } from './pr-gate-cli-invocation';\n\nconst container = new PrGateContainer().create();\nrunMain(\n (): Promise<void> =>\n container\n .get(PrGateCliApp)\n .run(container.get(PrGateCliInvocationFactory).fromProcess('wp-build-dev')),\n);\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
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,2DAAsD;AACtD,uDAAiD;AACjD,qEAAsE;AAEtE,MAAM,SAAS,GAAG,IAAI,mCAAe,EAAE,CAAC,MAAM,EAAE,CAAC;AACjD,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 { PrGateContainer } from './pr-gate-container';\nimport { PrGateCliApp } from './pr-gate-cli-app';\nimport { PrGateCliInvocationFactory } from './pr-gate-cli-invocation';\n\nconst container = new PrGateContainer().create();\nrunMain(\n (): Promise<void> =>\n container\n .get(PrGateCliApp)\n .run(container.get(PrGateCliInvocationFactory).fromProcess('wp-push-dev')),\n);\n"]}
|
|
File without changes
|
|
File without changes
|