alink-cli 0.12.3 → 0.12.4

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/bin.mjs CHANGED
@@ -20689,6 +20689,7 @@ const DEFAULT_CLIENT_LANGUAGE = "system";
20689
20689
  const FontFamilyPreference = String$1.check(isMaxLength(200));
20690
20690
  const DEFAULT_CLIENT_SETTINGS = decodeSync(Struct({
20691
20691
  autoOpenPlanSidebar: Boolean$1.pipe(withDecodingDefault(succeed$1(false))),
20692
+ threadCompletionNotifications: Boolean$1.pipe(withDecodingDefault(succeed$1(false))),
20692
20693
  language: ClientLanguage.pipe(withDecodingDefault(succeed$1(DEFAULT_CLIENT_LANGUAGE))),
20693
20694
  confirmThreadArchive: Boolean$1.pipe(withDecodingDefault(succeed$1(false))),
20694
20695
  confirmThreadDelete: Boolean$1.pipe(withDecodingDefault(succeed$1(true))),
@@ -21006,6 +21007,7 @@ const ServerSettingsPatch = Struct({
21006
21007
  });
21007
21008
  Struct({
21008
21009
  autoOpenPlanSidebar: optionalKey(Boolean$1),
21010
+ threadCompletionNotifications: optionalKey(Boolean$1),
21009
21011
  language: optionalKey(ClientLanguage),
21010
21012
  confirmThreadArchive: optionalKey(Boolean$1),
21011
21013
  confirmThreadDelete: optionalKey(Boolean$1),
@@ -50409,13 +50411,13 @@ const makeProviderMaintenanceCommandCoordinator = fn("makeProviderMaintenanceCom
50409
50411
  return [lock, next];
50410
50412
  });
50411
50413
  });
50412
- const withCommandLock = ({ targetKey, lockKey, onQueued, run }) => gen(function* () {
50414
+ const withCommandLock = ({ targetKey, lockKey, onQueued, onInterrupted, run }) => gen(function* () {
50413
50415
  if (!(yield* acquireTarget(targetKey))) return yield* fail(input.makeAlreadyRunningError(targetKey));
50414
50416
  return yield* gen(function* () {
50415
50417
  const lock = yield* getLock(lockKey);
50416
50418
  if (onQueued) yield* onQueued;
50417
50419
  return yield* lock.withPermits(1)(run);
50418
- }).pipe(ensuring(releaseTarget(targetKey)));
50420
+ }).pipe(onInterrupt(() => onInterrupted ?? void_$1), ensuring(releaseTarget(targetKey)));
50419
50421
  });
50420
50422
  return { withCommandLock };
50421
50423
  });
@@ -50889,6 +50891,15 @@ const layer$14 = effect(ProviderMaintenanceRunner, fn("ProviderMaintenanceRunner
50889
50891
  action: "update",
50890
50892
  state
50891
50893
  });
50894
+ const startedAtRef = yield* make$65(null);
50895
+ const recordInterruptedUpdate = gen(function* () {
50896
+ yield* setUpdateState(makeUpdateState({
50897
+ status: "failed",
50898
+ startedAt: yield* get$3(startedAtRef),
50899
+ finishedAt: yield* nowIso$3,
50900
+ message: "Provider update was interrupted. Try updating again."
50901
+ }));
50902
+ });
50892
50903
  const setQueuedState = setUpdateState(makeUpdateState({
50893
50904
  status: "queued",
50894
50905
  startedAt: null,
@@ -50897,7 +50908,6 @@ const layer$14 = effect(ProviderMaintenanceRunner, fn("ProviderMaintenanceRunner
50897
50908
  })).pipe(asVoid);
50898
50909
  const runProviderUpdate = fn("ProviderMaintenanceRunner.runProviderUpdate")(function* () {
50899
50910
  const finish = (state) => setUpdateState(state).pipe(map$4((providers) => ({ providers })));
50900
- const startedAtRef = yield* make$65(null);
50901
50911
  const runCommandAndVerify = fn("ProviderMaintenanceRunner.runCommandAndVerify")(function* () {
50902
50912
  const startedAt = yield* nowIso$3;
50903
50913
  yield* set$2(startedAtRef, startedAt);
@@ -50944,6 +50954,7 @@ const layer$14 = effect(ProviderMaintenanceRunner, fn("ProviderMaintenanceRunner
50944
50954
  targetKey,
50945
50955
  lockKey: update.lockKey,
50946
50956
  onQueued: setQueuedState,
50957
+ onInterrupted: recordInterruptedUpdate,
50947
50958
  run: runProviderUpdate()
50948
50959
  }).pipe(mapError((error) => isServerProviderUpdateError(error) ? new ServerProviderUpdateError({
50949
50960
  provider,