@gitpm/cli 0.1.15 → 0.1.16

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 (2) hide show
  1. package/dist/index.js +28 -2
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -1403,6 +1403,10 @@ var pushCommand = new Command11("push").description("Push local .meta/ changes t
1403
1403
  }
1404
1404
  spinner.succeed("Dry run complete.");
1405
1405
  printPreview(result2.value);
1406
+ if (result2.value.failures?.length) {
1407
+ printFailures(result2.value.failures, "Would fail:");
1408
+ process.exit(1);
1409
+ }
1406
1410
  return;
1407
1411
  }
1408
1412
  const previewSpinner = ora3("Calculating changes...").start();
@@ -1421,6 +1425,7 @@ var pushCommand = new Command11("push").description("Push local .meta/ changes t
1421
1425
  }
1422
1426
  previewSpinner.succeed("Changes calculated.");
1423
1427
  printPreview(preview.value);
1428
+ printFailures(preview.value.failures ?? [], "Would fail:");
1424
1429
  if (preview.value.totalChanges === 0) {
1425
1430
  printSuccess("Nothing to push \u2014 already in sync.");
1426
1431
  return;
@@ -1458,18 +1463,39 @@ var pushCommand = new Command11("push").description("Push local .meta/ changes t
1458
1463
  printError(result.error.message);
1459
1464
  process.exit(1);
1460
1465
  }
1461
- pushSpinner.succeed("Push complete.");
1462
- const { created, updated } = result.value;
1466
+ const { created, updated, failures = [] } = result.value;
1467
+ if (failures.length > 0) {
1468
+ pushSpinner.warn(
1469
+ `Push finished with ${failures.length} failed ${failures.length === 1 ? "entity" : "entities"}.`
1470
+ );
1471
+ } else {
1472
+ pushSpinner.succeed("Push complete.");
1473
+ }
1463
1474
  console.log(
1464
1475
  ` Created ${created.milestones + created.issues}, Updated ${updated.milestones + updated.issues}`
1465
1476
  );
1477
+ printFailures(failures);
1466
1478
  await runHooks3(config, "post-export", {
1467
1479
  metaDir,
1468
1480
  event: "post-export",
1469
1481
  adapterName: adapter.name,
1470
1482
  result: result.value
1471
1483
  });
1484
+ if (failures.length > 0) {
1485
+ process.exit(1);
1486
+ }
1472
1487
  });
1488
+ function printFailures(failures, heading = "Failed:") {
1489
+ if (failures.length === 0) return;
1490
+ console.log();
1491
+ console.log(chalk9.red.bold(heading));
1492
+ for (const failure of failures) {
1493
+ console.log(
1494
+ ` ${chalk9.red("\u2717")} ${failure.title} ${chalk9.dim(`(${failure.entityId})`)}: ${failure.message}`
1495
+ );
1496
+ }
1497
+ console.log();
1498
+ }
1473
1499
  function printPreview(result) {
1474
1500
  console.log();
1475
1501
  console.log(chalk9.bold("Changes to push:"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitpm/cli",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "license": "MIT",
5
5
  "description": "Git-native project management CLI — manage roadmaps, epics, and stories from a .meta/ tree synced with GitHub, GitLab, Jira, Linear, and Bitbucket",
6
6
  "keywords": [
@@ -40,14 +40,14 @@
40
40
  "build": "tsup"
41
41
  },
42
42
  "dependencies": {
43
- "@gitpm/core": "0.1.15",
44
- "@inquirer/prompts": "^8.3.2",
45
- "chalk": "^5.3.0",
43
+ "@gitpm/core": "0.1.16",
44
+ "@inquirer/prompts": "^8.7.5",
45
+ "chalk": "^6.0.1",
46
46
  "commander": "^15.0.0",
47
- "ora": "^9.3.0"
47
+ "ora": "^10.0.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "@gitpm/sync-github": "^0.1.12",
50
+ "@gitpm/sync-github": "^0.1.14",
51
51
  "@gitpm/sync-gitlab": "^0.1.11",
52
52
  "@gitpm/sync-jira": "^0.1.10",
53
53
  "@gitpm/sync-linear": "^0.1.2",