@nmakarov/cli-toolkit 0.65.0 → 0.67.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.
package/dist/index.cjs CHANGED
@@ -3484,6 +3484,12 @@ var FileDatabase = class _FileDatabase {
3484
3484
  getCurrentVersion() {
3485
3485
  return this.currentVersion;
3486
3486
  }
3487
+ /**
3488
+ * Max retained version folders (used by harvest_sync.loaded_versions cap, etc.).
3489
+ */
3490
+ getMaxVersions() {
3491
+ return this.maxVersions;
3492
+ }
3487
3493
  /**
3488
3494
  * Get current metadata
3489
3495
  */
@@ -8314,8 +8320,18 @@ var LOGGER_RUNTIME_KEYS = [
8314
8320
  "progressThrottleMs"
8315
8321
  ];
8316
8322
  var CONTROL_LANE_TASK_NAMES = ["stopRunner", "stop", "setRuntimeParam", "setRunnerParam"];
8317
- function controlLaneTaskNames() {
8318
- return [...CONTROL_LANE_TASK_NAMES];
8323
+ function controlLaneTaskNames(extra) {
8324
+ const names = [...CONTROL_LANE_TASK_NAMES];
8325
+ if (extra == null || extra === "") return names;
8326
+ const more = Array.isArray(extra) ? extra : String(extra).split(",");
8327
+ const seen = new Set(names);
8328
+ for (const raw of more) {
8329
+ const n = String(raw ?? "").trim();
8330
+ if (!n || seen.has(n)) continue;
8331
+ seen.add(n);
8332
+ names.push(n);
8333
+ }
8334
+ return names;
8319
8335
  }
8320
8336
  function asPositiveInt(value, key, { min = 1 } = {}) {
8321
8337
  const n = Number(value);
@@ -9122,6 +9138,7 @@ async function runTasksLoop(context, options) {
9122
9138
  const queueName = options.queueName ?? "tasks";
9123
9139
  const target = options.target;
9124
9140
  const allowedTasks = normalizeAllowedTasks(options.allowedTasks);
9141
+ const controlLaneNames = controlLaneTaskNames(options.controlLaneTasks);
9125
9142
  const registry = normalizeRegistry(options.registry);
9126
9143
  const { tasksTable, historyTable } = queueToTableNames(queueName);
9127
9144
  if (!target) throw new Error("runTasksLoop: target is required");
@@ -9192,7 +9209,7 @@ async function runTasksLoop(context, options) {
9192
9209
  target,
9193
9210
  registry,
9194
9211
  10,
9195
- controlLaneTaskNames(),
9212
+ controlLaneNames,
9196
9213
  runnerIdentity
9197
9214
  );
9198
9215
  if (claimedControlTask) {