pipe-kan 0.23.4 → 0.23.5

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/pipe-kan.js +9 -1
  2. package/package.json +1 -1
package/dist/pipe-kan.js CHANGED
@@ -225,6 +225,7 @@ function mergeEpics(listed, fromBoard) {
225
225
  import { spawn } from "node:child_process";
226
226
  import { existsSync } from "node:fs";
227
227
  import { delimiter, join, resolve } from "node:path";
228
+ import { availableParallelism } from "node:os";
228
229
 
229
230
  // src/flags.ts
230
231
  var DEFAULT_FLAGS = "";
@@ -638,7 +639,14 @@ function createJiraCli(opts = {}) {
638
639
  console.log(`Refresh children chunk ${chunkIndex + 1} failed; ${lastError ?? "unknown error"}`);
639
640
  return { issues: [], error: lastError };
640
641
  }
641
- const concurrency = 5;
642
+ function childrenConcurrency() {
643
+ const env = Number(process.env.PIPE_KAN_CHILDREN_CONCURRENCY);
644
+ if (!Number.isNaN(env) && env > 0)
645
+ return env;
646
+ return Math.max(3, Math.min(10, availableParallelism()));
647
+ }
648
+ const concurrency = childrenConcurrency();
649
+ console.log(`Refresh children ${validKeys.length} epics; concurrency ${concurrency}`);
642
650
  const chunks = [];
643
651
  let cursor = 0;
644
652
  for (let i = 0;i < validKeys.length; i += chunkSizeFor(lockedMode ?? "or")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pipe-kan",
3
- "version": "0.23.4",
3
+ "version": "0.23.5",
4
4
  "description": "Local Kanban for jira-cli",
5
5
  "license": "MIT",
6
6
  "type": "module",