@xdevops/issue-auto-finish 1.0.83 → 1.0.84
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/dist/{chunk-UDCMSDNT.js → chunk-7YCDMVIF.js} +27 -3
- package/dist/chunk-7YCDMVIF.js.map +1 -0
- package/dist/{chunk-LFN7NUFS.js → chunk-PWA46LUR.js} +1 -1
- package/dist/{chunk-GV2ORWT3.js → chunk-WHFY274N.js} +2 -2
- package/dist/cli.js +2 -2
- package/dist/index.js +2 -2
- package/dist/lib.js +1 -1
- package/dist/orchestrator/IssueProcessingContext.d.ts +1 -0
- package/dist/orchestrator/IssueProcessingContext.d.ts.map +1 -1
- package/dist/orchestrator/PipelineOrchestrator.d.ts.map +1 -1
- package/dist/orchestrator/steps/PhaseLoopStep.d.ts.map +1 -1
- package/dist/{restart-KFRHCALK.js → restart-TP5RAFXZ.js} +2 -2
- package/dist/run.js +2 -2
- package/dist/{start-46GW453L.js → start-KOBDZ2XN.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-UDCMSDNT.js.map +0 -1
- /package/dist/{chunk-LFN7NUFS.js.map → chunk-PWA46LUR.js.map} +0 -0
- /package/dist/{chunk-GV2ORWT3.js.map → chunk-WHFY274N.js.map} +0 -0
- /package/dist/{restart-KFRHCALK.js.map → restart-TP5RAFXZ.js.map} +0 -0
- /package/dist/{start-46GW453L.js.map → start-KOBDZ2XN.js.map} +0 -0
|
@@ -3713,6 +3713,26 @@ async function executePhaseLoop(ctx, deps, wtGit, wtPlan, wtGitMap) {
|
|
|
3713
3713
|
);
|
|
3714
3714
|
const needsDeployment = deps.shouldDeployServers(issue.iid);
|
|
3715
3715
|
let serversStarted = false;
|
|
3716
|
+
if (needsDeployment && startIdx > 0) {
|
|
3717
|
+
const skippedDeployPhase = pipelineDef.phases.slice(0, startIdx).some((p) => p.deploysPreview);
|
|
3718
|
+
if (skippedDeployPhase && !phaseCtx.ports) {
|
|
3719
|
+
const existingPorts = deps.getPortsForIssue(issue.iid);
|
|
3720
|
+
if (existingPorts) {
|
|
3721
|
+
logger16.info("Restored preview ports from allocator", { iid: issue.iid, ...existingPorts });
|
|
3722
|
+
phaseCtx.ports = existingPorts;
|
|
3723
|
+
ctx.wtCtx.ports = existingPorts;
|
|
3724
|
+
serversStarted = true;
|
|
3725
|
+
} else {
|
|
3726
|
+
logger16.info("Restarting preview servers for resumed pipeline", { iid: issue.iid });
|
|
3727
|
+
const ports = await deps.startPreviewServers(ctx.wtCtx, issue);
|
|
3728
|
+
if (ports) {
|
|
3729
|
+
phaseCtx.ports = ports;
|
|
3730
|
+
ctx.wtCtx.ports = ports;
|
|
3731
|
+
serversStarted = true;
|
|
3732
|
+
}
|
|
3733
|
+
}
|
|
3734
|
+
}
|
|
3735
|
+
}
|
|
3716
3736
|
for (let i = startIdx; i < pipelineDef.phases.length; i++) {
|
|
3717
3737
|
if (isShuttingDown()) {
|
|
3718
3738
|
throw new ServiceShutdownError();
|
|
@@ -4414,7 +4434,8 @@ var PipelineOrchestrator = class {
|
|
|
4414
4434
|
startPreviewServers: (wtCtx, issue) => this.startPreviewServers(wtCtx, issue),
|
|
4415
4435
|
stopPreviewServers: (iid) => this.stopPreviewServers(iid),
|
|
4416
4436
|
tryCreateMergeRequest: (issue, branch, workDir, previewUrl) => this.tryCreateMergeRequest(issue, branch, workDir, previewUrl),
|
|
4417
|
-
buildPreviewUrl: (iid) => this.buildPreviewUrl(iid)
|
|
4437
|
+
buildPreviewUrl: (iid) => this.buildPreviewUrl(iid),
|
|
4438
|
+
getPortsForIssue: (iid) => this.portAllocator.getPortsForIssue(iid)
|
|
4418
4439
|
};
|
|
4419
4440
|
}
|
|
4420
4441
|
async _processIssueImpl(issue) {
|
|
@@ -4454,6 +4475,9 @@ var PipelineOrchestrator = class {
|
|
|
4454
4475
|
branchName,
|
|
4455
4476
|
pipelineMode: issuePipelineDef.mode
|
|
4456
4477
|
};
|
|
4478
|
+
if (record.ports) {
|
|
4479
|
+
phaseCtx.ports = record.ports;
|
|
4480
|
+
}
|
|
4457
4481
|
const ctx = {
|
|
4458
4482
|
issue,
|
|
4459
4483
|
branchName,
|
|
@@ -4688,7 +4712,7 @@ E2E \u6D4B\u8BD5\u5C06\u5C1D\u8BD5\u4F7F\u7528 config.json \u4E2D\u7684\u9ED8\u8
|
|
|
4688
4712
|
wtCtx.ports = ports;
|
|
4689
4713
|
try {
|
|
4690
4714
|
this.tracker.updateState(issueIid, record.state, {
|
|
4691
|
-
ports
|
|
4715
|
+
ports,
|
|
4692
4716
|
previewStartedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
4693
4717
|
});
|
|
4694
4718
|
await this.devServerManager.startServers(wtCtx, ports);
|
|
@@ -5098,4 +5122,4 @@ export {
|
|
|
5098
5122
|
PipelineOrchestrator,
|
|
5099
5123
|
BrainstormService
|
|
5100
5124
|
};
|
|
5101
|
-
//# sourceMappingURL=chunk-
|
|
5125
|
+
//# sourceMappingURL=chunk-7YCDMVIF.js.map
|