@pourkit/cli 0.0.0-next-20260531213458 → 0.0.0-next-20260601025244
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/cli.js +33 -16
- package/dist/cli.js.map +1 -1
- package/dist/e2e/run-live-e2e.js +24 -12
- package/dist/e2e/run-live-e2e.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1262,7 +1262,23 @@ function invalidateAfterBaseRefresh(state) {
|
|
|
1262
1262
|
}
|
|
1263
1263
|
|
|
1264
1264
|
// failure-resolution/effect-runtime.ts
|
|
1265
|
+
import { Effect as Effect2 } from "effect";
|
|
1266
|
+
|
|
1267
|
+
// shared/effect-runtime.ts
|
|
1265
1268
|
import { Effect } from "effect";
|
|
1269
|
+
var initialized = false;
|
|
1270
|
+
function initializeEffectRuntime() {
|
|
1271
|
+
if (initialized) return;
|
|
1272
|
+
initialized = true;
|
|
1273
|
+
}
|
|
1274
|
+
function runEffect(program) {
|
|
1275
|
+
if (!initialized) {
|
|
1276
|
+
throw new Error(
|
|
1277
|
+
"Effect runtime not initialized. Call initializeEffectRuntime() at CLI startup."
|
|
1278
|
+
);
|
|
1279
|
+
}
|
|
1280
|
+
return Effect.runPromiseExit(program);
|
|
1281
|
+
}
|
|
1266
1282
|
|
|
1267
1283
|
// failure-resolution/types.ts
|
|
1268
1284
|
var RebaseConflict = class extends Error {
|
|
@@ -1495,23 +1511,23 @@ function recordStageAttempt(worktreePath, record) {
|
|
|
1495
1511
|
|
|
1496
1512
|
// failure-resolution/effect-runtime.ts
|
|
1497
1513
|
function baseRefreshEffect(options) {
|
|
1498
|
-
return
|
|
1499
|
-
|
|
1514
|
+
return Effect2.promise(() => refreshStaleIssueBranch(options)).pipe(
|
|
1515
|
+
Effect2.flatMap(
|
|
1500
1516
|
(result) => {
|
|
1501
1517
|
switch (result.status) {
|
|
1502
1518
|
case "refreshed":
|
|
1503
|
-
return
|
|
1519
|
+
return Effect2.succeed({ status: "refreshed" });
|
|
1504
1520
|
case "skipped-current":
|
|
1505
|
-
return
|
|
1521
|
+
return Effect2.succeed({ status: "skipped-current" });
|
|
1506
1522
|
case "conflicted":
|
|
1507
|
-
return
|
|
1523
|
+
return Effect2.fail(
|
|
1508
1524
|
new RebaseConflict({
|
|
1509
1525
|
conflictedPaths: result.conflictedPaths,
|
|
1510
1526
|
message: result.message
|
|
1511
1527
|
})
|
|
1512
1528
|
);
|
|
1513
1529
|
case "refused-published-history":
|
|
1514
|
-
return
|
|
1530
|
+
return Effect2.fail(
|
|
1515
1531
|
new PublishedHistoryRisk({
|
|
1516
1532
|
prNumber: result.prNumber,
|
|
1517
1533
|
prState: result.prState
|
|
@@ -1526,8 +1542,8 @@ async function runBaseRefreshAttempt(options) {
|
|
|
1526
1542
|
const attemptId = createStageAttemptId();
|
|
1527
1543
|
const startedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
1528
1544
|
const program = baseRefreshEffect(options).pipe(
|
|
1529
|
-
|
|
1530
|
-
onSuccess: (success) =>
|
|
1545
|
+
Effect2.tapBoth({
|
|
1546
|
+
onSuccess: (success) => Effect2.sync(() => {
|
|
1531
1547
|
recordStageAttempt(options.worktreePath, {
|
|
1532
1548
|
id: attemptId,
|
|
1533
1549
|
stage: "baseRefresh",
|
|
@@ -1536,7 +1552,7 @@ async function runBaseRefreshAttempt(options) {
|
|
|
1536
1552
|
outcome: "success"
|
|
1537
1553
|
});
|
|
1538
1554
|
}),
|
|
1539
|
-
onFailure: (failure) =>
|
|
1555
|
+
onFailure: (failure) => Effect2.sync(() => {
|
|
1540
1556
|
recordStageAttempt(options.worktreePath, {
|
|
1541
1557
|
id: attemptId,
|
|
1542
1558
|
stage: "baseRefresh",
|
|
@@ -1552,7 +1568,7 @@ async function runBaseRefreshAttempt(options) {
|
|
|
1552
1568
|
})
|
|
1553
1569
|
})
|
|
1554
1570
|
);
|
|
1555
|
-
return
|
|
1571
|
+
return runEffect(program);
|
|
1556
1572
|
}
|
|
1557
1573
|
|
|
1558
1574
|
// commands/conflict-resolution.ts
|
|
@@ -1575,7 +1591,7 @@ async function hasUnresolvedConflictMarkers(worktreePath, files) {
|
|
|
1575
1591
|
}
|
|
1576
1592
|
|
|
1577
1593
|
// commands/issue-run.ts
|
|
1578
|
-
import { Exit as
|
|
1594
|
+
import { Exit as Exit3 } from "effect";
|
|
1579
1595
|
|
|
1580
1596
|
// serena/baseline.ts
|
|
1581
1597
|
init_common();
|
|
@@ -3706,7 +3722,7 @@ async function startIssueRun(options) {
|
|
|
3706
3722
|
prNumber: existingPr?.number,
|
|
3707
3723
|
prState: existingPr?.state
|
|
3708
3724
|
});
|
|
3709
|
-
if (
|
|
3725
|
+
if (Exit3.isSuccess(exit)) {
|
|
3710
3726
|
const refreshResult = exit.value;
|
|
3711
3727
|
if (refreshResult.status === "refreshed") {
|
|
3712
3728
|
if (worktreeState?.completedStages.builder) {
|
|
@@ -9076,11 +9092,11 @@ function createCliProgram(version) {
|
|
|
9076
9092
|
return program;
|
|
9077
9093
|
}
|
|
9078
9094
|
async function resolveCliVersion() {
|
|
9079
|
-
if (isPackageVersion("0.0.0-next-
|
|
9080
|
-
return "0.0.0-next-
|
|
9095
|
+
if (isPackageVersion("0.0.0-next-20260601025244")) {
|
|
9096
|
+
return "0.0.0-next-20260601025244";
|
|
9081
9097
|
}
|
|
9082
|
-
if (isReleaseVersion("0.0.0-next-
|
|
9083
|
-
return "0.0.0-next-
|
|
9098
|
+
if (isReleaseVersion("0.0.0-next-20260601025244")) {
|
|
9099
|
+
return "0.0.0-next-20260601025244";
|
|
9084
9100
|
}
|
|
9085
9101
|
try {
|
|
9086
9102
|
const root = repoRoot();
|
|
@@ -9106,6 +9122,7 @@ async function resolveCliVersion() {
|
|
|
9106
9122
|
return DEVELOPMENT_VERSION;
|
|
9107
9123
|
}
|
|
9108
9124
|
async function main(argv = process.argv.slice(2)) {
|
|
9125
|
+
initializeEffectRuntime();
|
|
9109
9126
|
const version = await resolveCliVersion();
|
|
9110
9127
|
const program = createCliProgram(version);
|
|
9111
9128
|
if (argv.length === 0) {
|