@svayam-opensource/prj 0.5.6 → 0.5.7

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 +1 -1
  2. package/prj +8 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@svayam-opensource/prj",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "description": "Governed Agentic Development Framework CLI (prj). A bash CLI wrapped for npm; operates on a governance workspace resolved via $ADF_WORKSPACE or the nearest org-config.yaml. Runtime prerequisites (not npm deps): bash, git, gh, yq, python3 (use Git Bash on Windows).",
5
5
  "bin": {
6
6
  "prj": "bin/prj"
package/prj CHANGED
@@ -1409,6 +1409,11 @@ cmd_upgrade() {
1409
1409
  label "for review + commit."
1410
1410
  echo ""
1411
1411
 
1412
+ # Operate on the WORKSPACE (the governance data repo), not the CLI package.
1413
+ # Under npm install, SCRIPT_DIR is the package dir; the workspace is resolved
1414
+ # via $ADF_WORKSPACE / org-config discovery into $WORKSPACE_ROOT.
1415
+ cd "$WORKSPACE_ROOT" || { err "Cannot cd to workspace: $WORKSPACE_ROOT"; exit 1; }
1416
+
1412
1417
  # Pre-conditions
1413
1418
  if [[ -n "$(git status --porcelain)" ]]; then
1414
1419
  err "Working tree has uncommitted changes. Commit or stash first."
@@ -1441,15 +1446,15 @@ cmd_upgrade() {
1441
1446
  git checkout "$target" -- framework/ \
1442
1447
  || { err "git checkout $target failed. Is the tag/branch published?"; exit 1; }
1443
1448
 
1444
- if [[ ! -d "$SCRIPT_DIR/framework" ]]; then
1445
- err "framework/ directory was not created by the checkout. Aborting."
1449
+ if [[ ! -f "$WORKSPACE_ROOT/framework/bin/setup.sh" ]]; then
1450
+ err "framework/bin/setup.sh not found after checkout. Aborting."
1446
1451
  exit 1
1447
1452
  fi
1448
1453
 
1449
1454
  echo ""
1450
1455
  label "Running framework/bin/setup.sh..."
1451
1456
  echo ""
1452
- bash "$SCRIPT_DIR/framework/bin/setup.sh"
1457
+ bash "$WORKSPACE_ROOT/framework/bin/setup.sh"
1453
1458
  echo ""
1454
1459
 
1455
1460
  divider