@nmakarov/cli-toolkit 0.66.0 → 0.68.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/tasks.js CHANGED
@@ -2763,8 +2763,18 @@ var LOGGER_RUNTIME_KEYS = [
2763
2763
  "progressThrottleMs"
2764
2764
  ];
2765
2765
  var CONTROL_LANE_TASK_NAMES = ["stopRunner", "stop", "setRuntimeParam", "setRunnerParam"];
2766
- function controlLaneTaskNames() {
2767
- return [...CONTROL_LANE_TASK_NAMES];
2766
+ function controlLaneTaskNames(extra) {
2767
+ const names = [...CONTROL_LANE_TASK_NAMES];
2768
+ if (extra == null || extra === "") return names;
2769
+ const more = Array.isArray(extra) ? extra : String(extra).split(",");
2770
+ const seen = new Set(names);
2771
+ for (const raw of more) {
2772
+ const n = String(raw ?? "").trim();
2773
+ if (!n || seen.has(n)) continue;
2774
+ seen.add(n);
2775
+ names.push(n);
2776
+ }
2777
+ return names;
2768
2778
  }
2769
2779
  function asPositiveInt(value, key, { min = 1 } = {}) {
2770
2780
  const n = Number(value);
@@ -3571,6 +3581,7 @@ async function runTasksLoop(context, options) {
3571
3581
  const queueName = options.queueName ?? "tasks";
3572
3582
  const target = options.target;
3573
3583
  const allowedTasks = normalizeAllowedTasks(options.allowedTasks);
3584
+ const controlLaneNames = controlLaneTaskNames(options.controlLaneTasks);
3574
3585
  const registry = normalizeRegistry(options.registry);
3575
3586
  const { tasksTable, historyTable } = queueToTableNames(queueName);
3576
3587
  if (!target) throw new Error("runTasksLoop: target is required");
@@ -3641,7 +3652,7 @@ async function runTasksLoop(context, options) {
3641
3652
  target,
3642
3653
  registry,
3643
3654
  10,
3644
- controlLaneTaskNames(),
3655
+ controlLaneNames,
3645
3656
  runnerIdentity
3646
3657
  );
3647
3658
  if (claimedControlTask) {