@brainervirus/workit-cli 2.1.3 → 2.1.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.
Files changed (2) hide show
  1. package/dist/index.js +34 -21
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -50649,7 +50649,7 @@ import {
50649
50649
  mkdtempSync,
50650
50650
  readFileSync as readFileSync12,
50651
50651
  readdirSync as readdirSync5,
50652
- realpathSync as realpathSync2,
50652
+ realpathSync as realpathSync3,
50653
50653
  renameSync as renameSync2,
50654
50654
  rmSync,
50655
50655
  statSync as statSync4,
@@ -54639,7 +54639,15 @@ var runDoctor = (options = {}) => {
54639
54639
 
54640
54640
  // packages/workit-core/src/core/host-install.ts
54641
54641
  import { spawnSync as spawnSync3 } from "node:child_process";
54642
- import { accessSync, constants as constants2, existsSync as existsSync10, readFileSync as readFileSync11, readdirSync as readdirSync4, statSync as statSync3 } from "node:fs";
54642
+ import {
54643
+ accessSync,
54644
+ constants as constants2,
54645
+ existsSync as existsSync10,
54646
+ readFileSync as readFileSync11,
54647
+ readdirSync as readdirSync4,
54648
+ realpathSync as realpathSync2,
54649
+ statSync as statSync3
54650
+ } from "node:fs";
54643
54651
  import os6 from "node:os";
54644
54652
  import path13 from "node:path";
54645
54653
  function hostCommand(name, args, options = {}) {
@@ -54973,6 +54981,11 @@ function runHostCommand(step, context = {}) {
54973
54981
  };
54974
54982
  }
54975
54983
  var findNpmCli = (npm) => {
54984
+ try {
54985
+ const resolved = realpathSync2(npm);
54986
+ if (path13.basename(resolved) === "npm-cli.js")
54987
+ return resolved;
54988
+ } catch {}
54976
54989
  const dir = path13.dirname(npm);
54977
54990
  const candidates = [
54978
54991
  path13.join(dir, "node_modules", "npm", "bin", "npm-cli.js"),
@@ -55588,7 +55601,7 @@ var preservedCursorRules = (src, dest) => {
55588
55601
  return preserved;
55589
55602
  };
55590
55603
  function copyPluginDir(src, dest) {
55591
- const realSrc = realpathSync2(src);
55604
+ const realSrc = realpathSync3(src);
55592
55605
  const marker = path14.join(dest, ".workit-root");
55593
55606
  const destIsLink = existsSync11(dest) && lstatSync4(dest).isSymbolicLink();
55594
55607
  const synced = !destIsLink && readFileSafe(marker)?.trim() === realSrc && samePluginContent(realSrc, dest);
@@ -56861,7 +56874,7 @@ function workspaceDraftText(draft, field, value) {
56861
56874
  import os9 from "node:os";
56862
56875
 
56863
56876
  // packages/workit-core/src/core/uninstall.ts
56864
- import { existsSync as existsSync13, readFileSync as readFileSync13, realpathSync as realpathSync3, rmSync as rmSync2, writeFileSync as writeFileSync6 } from "node:fs";
56877
+ import { existsSync as existsSync13, readFileSync as readFileSync13, realpathSync as realpathSync4, rmSync as rmSync2, writeFileSync as writeFileSync6 } from "node:fs";
56865
56878
  import os8 from "node:os";
56866
56879
  import path16 from "node:path";
56867
56880
  var resolveUninstallPaths = (options = {}) => {
@@ -57060,7 +57073,7 @@ var canonicalRemoveDirAllowed = (actionPath, res) => {
57060
57073
  return false;
57061
57074
  }
57062
57075
  try {
57063
- return realpathSync3(actionPath) === realpathSync3(expected);
57076
+ return realpathSync4(actionPath) === realpathSync4(expected);
57064
57077
  } catch {
57065
57078
  return true;
57066
57079
  }
@@ -59570,7 +59583,7 @@ import { createInterface as createInterface2 } from "node:readline/promises";
59570
59583
 
59571
59584
  // packages/workit-core/src/core.ts
59572
59585
  import { spawnSync as spawnSync6 } from "node:child_process";
59573
- import { existsSync as existsSync17, realpathSync as realpathSync10 } from "node:fs";
59586
+ import { existsSync as existsSync17, realpathSync as realpathSync11 } from "node:fs";
59574
59587
  import path27 from "node:path";
59575
59588
 
59576
59589
  // packages/workit-core/src/core/task-store.ts
@@ -61314,7 +61327,7 @@ class TaskStore {
61314
61327
  }
61315
61328
  }
61316
61329
  // packages/workit-core/src/core/task-engine.ts
61317
- import { realpathSync as realpathSync8 } from "node:fs";
61330
+ import { realpathSync as realpathSync9 } from "node:fs";
61318
61331
 
61319
61332
  // packages/workit-core/src/core/authority.ts
61320
61333
  import { createHash as createHash9 } from "node:crypto";
@@ -61323,7 +61336,7 @@ import path24 from "node:path";
61323
61336
 
61324
61337
  // packages/workit-core/src/core/auto-approval.ts
61325
61338
  import { createHash as createHash8 } from "node:crypto";
61326
- import { readFileSync as readFileSync16, realpathSync as realpathSync5 } from "node:fs";
61339
+ import { readFileSync as readFileSync16, realpathSync as realpathSync6 } from "node:fs";
61327
61340
  import path23 from "node:path";
61328
61341
 
61329
61342
  // packages/workit-core/src/core/branch.ts
@@ -62284,7 +62297,7 @@ var targetOf = (root, descriptor) => {
62284
62297
  return root;
62285
62298
  if (typeof cwd !== "string" || !path23.isAbsolute(cwd))
62286
62299
  return null;
62287
- return realpathSync5(cwd);
62300
+ return realpathSync6(cwd);
62288
62301
  } catch {
62289
62302
  return null;
62290
62303
  }
@@ -64379,7 +64392,7 @@ class WorkitCore {
64379
64392
  }
64380
64393
  contextRootError() {
64381
64394
  try {
64382
- if (realpathSync8(this.context.root) !== this.store.root)
64395
+ if (realpathSync9(this.context.root) !== this.store.root)
64383
64396
  return failure("invalid_input", "operation context root does not match the task store root");
64384
64397
  } catch {
64385
64398
  return failure("invalid_input", "operation context root cannot be resolved");
@@ -65710,7 +65723,7 @@ class WorkitCore {
65710
65723
  if (view.task.workspaceId !== view.workspace.id)
65711
65724
  return failure("invalid_input", "task and workspace bindings are invalid");
65712
65725
  try {
65713
- if (realpathSync8(view.workspace.root) !== this.store.root)
65726
+ if (realpathSync9(view.workspace.root) !== this.store.root)
65714
65727
  return failure("invalid_input", "task view root does not match the task store");
65715
65728
  } catch {
65716
65729
  return failure("invalid_input", "task view root cannot be resolved");
@@ -65965,7 +65978,7 @@ class WorkitCore {
65965
65978
  var cache3 = new Map;
65966
65979
  // packages/workit-core/src/core/external-action.ts
65967
65980
  import { execFileSync as execFileSync4 } from "node:child_process";
65968
- import { realpathSync as realpathSync9 } from "node:fs";
65981
+ import { realpathSync as realpathSync10 } from "node:fs";
65969
65982
  import path26 from "node:path";
65970
65983
  var chainStepSchema = union2([
65971
65984
  string2().min(1),
@@ -66303,7 +66316,7 @@ var descriptorTargetRoot = (store, operation) => {
66303
66316
  const cwd = descriptor.payload?.cwd;
66304
66317
  if (cwd === undefined)
66305
66318
  return store.root;
66306
- return typeof cwd === "string" && path26.isAbsolute(cwd) ? realpathSync9(cwd) : null;
66319
+ return typeof cwd === "string" && path26.isAbsolute(cwd) ? realpathSync10(cwd) : null;
66307
66320
  } catch {
66308
66321
  return null;
66309
66322
  }
@@ -66519,19 +66532,19 @@ var externalActionTargetRoot = (operation, coordinationRoot) => {
66519
66532
  try {
66520
66533
  value = JSON.parse(operation);
66521
66534
  } catch {
66522
- return realpathSync9(coordinationRoot);
66535
+ return realpathSync10(coordinationRoot);
66523
66536
  }
66524
66537
  if (typeof value !== "object" || value === null)
66525
- return realpathSync9(coordinationRoot);
66538
+ return realpathSync10(coordinationRoot);
66526
66539
  const descriptor = value;
66527
66540
  if (typeof descriptor.operation !== "string" || typeof descriptor.payload !== "object" || descriptor.payload === null)
66528
- return realpathSync9(coordinationRoot);
66541
+ return realpathSync10(coordinationRoot);
66529
66542
  if (!descriptor.operation.startsWith("git.") && !descriptor.operation.startsWith("hosting.") && descriptor.operation !== "changelog.apply")
66530
- return realpathSync9(coordinationRoot);
66543
+ return realpathSync10(coordinationRoot);
66531
66544
  const payload = descriptor.payload;
66532
66545
  const cwd = typeof payload.cwd === "string" ? payload.cwd : coordinationRoot;
66533
66546
  try {
66534
- return realpathSync9(path26.resolve(coordinationRoot, cwd));
66547
+ return realpathSync10(path26.resolve(coordinationRoot, cwd));
66535
66548
  } catch {
66536
66549
  return null;
66537
66550
  }
@@ -66675,7 +66688,7 @@ function resolveGitRevision(root, value) {
66675
66688
  }
66676
66689
  }
66677
66690
  function resolveInside(root, candidate) {
66678
- const base = realpathSync10(root);
66691
+ const base = realpathSync11(root);
66679
66692
  const target = path27.resolve(base, candidate);
66680
66693
  if (target !== base && !target.startsWith(base + path27.sep)) {
66681
66694
  throw new Error("path must stay inside repository root");
@@ -66683,14 +66696,14 @@ function resolveInside(root, candidate) {
66683
66696
  let ancestor = target;
66684
66697
  while (!existsSync17(ancestor))
66685
66698
  ancestor = path27.dirname(ancestor);
66686
- const canonicalAncestor = realpathSync10(ancestor);
66699
+ const canonicalAncestor = realpathSync11(ancestor);
66687
66700
  if (canonicalAncestor !== base && !canonicalAncestor.startsWith(base + path27.sep)) {
66688
66701
  throw new Error("path must stay inside repository root");
66689
66702
  }
66690
66703
  return target;
66691
66704
  }
66692
66705
  function run2(root, executable, args, env = {}) {
66693
- const cwd = realpathSync10(root);
66706
+ const cwd = realpathSync11(root);
66694
66707
  const result = spawnSync6(executable, args, {
66695
66708
  cwd,
66696
66709
  encoding: "utf8",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-cli",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "private": false,
5
5
  "description": "Workit CLI — setup wizard, doctor, and task control for agentic coding workflows",
6
6
  "keywords": [
@@ -37,9 +37,9 @@
37
37
  "typecheck": "tsc --noEmit"
38
38
  },
39
39
  "dependencies": {
40
- "@brainervirus/workit-core": "^2.1.3",
41
- "@brainervirus/workit-cursor": "^2.1.3",
42
- "@brainervirus/workit-opencode": "^2.1.3",
40
+ "@brainervirus/workit-core": "^2.1.4",
41
+ "@brainervirus/workit-cursor": "^2.1.4",
42
+ "@brainervirus/workit-opencode": "^2.1.4",
43
43
  "@inkjs/ui": "2.0.0",
44
44
  "ink": "7.1.1",
45
45
  "react": "19.2.8"