@toon-protocol/rig 5.1.0 → 5.3.0

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.
@@ -12,7 +12,7 @@ import {
12
12
  parseMaintainers,
13
13
  queryRelay,
14
14
  resolveIdentity
15
- } from "./chunk-ITC7ESTZ.js";
15
+ } from "./chunk-OVZJ5P6E.js";
16
16
  import {
17
17
  defaultDaemonPort,
18
18
  standaloneForced,
@@ -1383,7 +1383,7 @@ function serializePushResult(plan, result) {
1383
1383
  var NonFastForwardError = class extends Error {
1384
1384
  constructor(refs) {
1385
1385
  super(
1386
- `non-fast-forward update rejected for ${refs.map((r) => r.refname).join(", ")} \u2014 re-run with force to overwrite the remote ref(s)`
1386
+ `non-fast-forward update rejected for ${refs.map((r) => r.refname).join(", ")} \u2014 run \`rig fetch\` and integrate the remote commits, or re-run with force to overwrite the remote ref(s)`
1387
1387
  );
1388
1388
  this.refs = refs;
1389
1389
  this.name = "NonFastForwardError";
@@ -3188,13 +3188,23 @@ rig can create one for you: re-run \`rig init --git-init\` (in a terminal, plain
3188
3188
  this.name = "NotAGitRepositoryError";
3189
3189
  }
3190
3190
  };
3191
+ var PrMergeError = class extends Error {
3192
+ constructor(code, message) {
3193
+ super(message);
3194
+ this.code = code;
3195
+ this.name = "PrMergeError";
3196
+ }
3197
+ code;
3198
+ };
3191
3199
  function nonFastForwardLines(refs) {
3192
3200
  return [
3193
3201
  "Push rejected: non-fast-forward update for:",
3194
3202
  ...refs.map(
3195
3203
  (r) => ` ${r.refname} remote ${r.remoteSha.slice(0, 7)} is not an ancestor of local ${r.localSha.slice(0, 7)}`
3196
3204
  ),
3197
- "The remote moved since your last push. Re-run with --force to overwrite it",
3205
+ "The remote moved since your last push. Run `rig fetch`, integrate the remote",
3206
+ "commits (merge or rebase), then push again.",
3207
+ "Re-running with --force overwrites the remote instead.",
3198
3208
  "WARNING: --force rewrites the published ref history for every reader of this repo."
3199
3209
  ];
3200
3210
  }
@@ -3265,6 +3275,13 @@ function describeError(err, command = "push") {
3265
3275
  json: { error: "missing_identity", detail: err.message }
3266
3276
  };
3267
3277
  }
3278
+ if (err instanceof PrMergeError) {
3279
+ return {
3280
+ code: err.code,
3281
+ lines: err.message.split("\n"),
3282
+ json: { error: err.code, detail: err.message }
3283
+ };
3284
+ }
3268
3285
  if (err instanceof NonFastForwardError) {
3269
3286
  return {
3270
3287
  code: "non_fast_forward",
@@ -4306,6 +4323,7 @@ export {
4306
4323
  UnknownRemoteError,
4307
4324
  MultiUrlRemoteError,
4308
4325
  NotAGitRepositoryError,
4326
+ PrMergeError,
4309
4327
  emitCliError,
4310
4328
  resolveRepoRoot,
4311
4329
  initGitRepository,
@@ -4323,4 +4341,4 @@ export {
4323
4341
  assembleCiStatus,
4324
4342
  runCiStatus
4325
4343
  };
4326
- //# sourceMappingURL=chunk-J6GNB54J.js.map
4344
+ //# sourceMappingURL=chunk-DGF7WCRW.js.map