@f5xc-salesdemos/pi-utils 15.7.0 → 15.8.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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/dirs.ts +13 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@f5xc-salesdemos/pi-utils",
4
- "version": "15.7.0",
4
+ "version": "15.8.0",
5
5
  "description": "Shared utilities for pi packages",
6
6
  "homepage": "https://github.com/f5xc-salesdemos/xcsh",
7
7
  "author": "Can Boluk",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/bun": "^1.3",
41
- "@f5xc-salesdemos/pi-natives": "15.7.0"
41
+ "@f5xc-salesdemos/pi-natives": "15.8.0"
42
42
  },
43
43
  "engines": {
44
44
  "bun": ">=1.3.7"
package/src/dirs.ts CHANGED
@@ -89,6 +89,19 @@ export function setProjectDir(dir: string): void {
89
89
  process.chdir(projectDir);
90
90
  }
91
91
 
92
+ /** Shell-tracked working directory (follows persistent-shell cd). */
93
+ let shellPwd = projectDir;
94
+
95
+ /** Get the shell's current working directory (may differ from Agent CWD). */
96
+ export function getShellPwd(): string {
97
+ return shellPwd;
98
+ }
99
+
100
+ /** Update the shell's tracked working directory. Does NOT change Agent CWD. */
101
+ export function setShellPwd(dir: string): void {
102
+ shellPwd = standardizeMacOSPath(path.resolve(dir));
103
+ }
104
+
92
105
  /** Get the config directory name relative to home (e.g. ".xcsh" or PI_CONFIG_DIR override). */
93
106
  export function getConfigDirName(): string {
94
107
  return process.env.PI_CONFIG_DIR || CONFIG_DIR_NAME;