@workit-dev/pi 2.27.1 → 2.27.2

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/workit.js +12 -1
  2. package/package.json +1 -1
package/dist/workit.js CHANGED
@@ -33865,16 +33865,27 @@ var opaque = (rest, scan, assigns) => {
33865
33865
  if (hit && rest.some((word) => base3(word).toLowerCase() === "env"))
33866
33866
  scan.hit ??= hit.split("=")[0] ?? null;
33867
33867
  };
33868
+ var LOGIN_VALUED = {
33869
+ su: /[sgGwc]/u,
33870
+ runuser: /[sgGwuc]/u,
33871
+ script: /[cEIOBTmot]/u
33872
+ };
33868
33873
  var loginScript = (words) => {
33869
33874
  const at = words.findIndex((word) => /^(?:su|runuser|script)$/u.test(base3(word)));
33870
33875
  if (at < 0)
33871
33876
  return null;
33877
+ const valued = LOGIN_VALUED[base3(words[at])] ?? /c/u;
33872
33878
  for (let index = at + 1;index < words.length; index += 1) {
33873
33879
  const word = words[index] ?? "";
33874
- if (word === "-c" || word === "--command")
33880
+ if (word === "--command")
33875
33881
  return words[index + 1] ?? null;
33876
33882
  if (word.startsWith("--command="))
33877
33883
  return word.slice("--command=".length);
33884
+ if (!/^-[^-]/u.test(word))
33885
+ continue;
33886
+ const ends = word.slice(1).search(valued) + 1;
33887
+ if (ends > 0 && word[ends] === "c")
33888
+ return word.slice(ends + 1) || (words[index + 1] ?? null);
33878
33889
  }
33879
33890
  return null;
33880
33891
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workit-dev/pi",
3
- "version": "2.27.1",
3
+ "version": "2.27.2",
4
4
  "description": "Workit native extension for Pi — tools, method skills, and session continuity",
5
5
  "keywords": [
6
6
  "agentic-coding",