create-workframe 0.1.9 → 0.1.11

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-workframe",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "Scaffold a Workframe + Hermes workspace with guided onboarding",
5
5
  "type": "module",
6
6
  "bin": {
@@ -57,12 +57,13 @@ _wf_sync_from_pack_dir() {
57
57
  echo "Syncing workframe-ui/public -> $UI_DIR"
58
58
  _wf_sync_tree "$pkg/workframe-ui/public" "$UI_DIR"
59
59
  fi
60
- for script in apply-update-hermes.sh apply-update-workframe.sh restart-gateway-hermes.sh compose-docker-host.sh update-hermes.sh; do
61
- if [[ -f "$pkg/scripts/$script" ]]; then
62
- cp -a "$pkg/scripts/$script" "$SCRIPTS_DIR/$script"
63
- chmod +x "$SCRIPTS_DIR/$script" 2>/dev/null || true
64
- fi
65
- done
60
+ if [[ -d "$pkg/scripts" ]]; then
61
+ for script in "$pkg/scripts"/*.sh; do
62
+ [[ -f "$script" ]] || continue
63
+ cp -a "$script" "$SCRIPTS_DIR/$(basename "$script")"
64
+ chmod +x "$SCRIPTS_DIR/$(basename "$script")" 2>/dev/null || true
65
+ done
66
+ fi
66
67
  }
67
68
 
68
69
  _wf_apply_npm_tarball() {
@@ -174,7 +175,16 @@ fi
174
175
 
175
176
  echo "Rebuilding workframe-api and workframe-supervisor..."
176
177
  workframe_compose build workframe-api workframe-supervisor
177
- workframe_compose up -d --build --no-deps workframe-api workframe-supervisor
178
+ if [[ "${WORKFRAME_UPDATE_FROM_SUPERVISOR:-}" == "1" ]]; then
179
+ # ponytail: supervisor cannot recreate itself inside the stack.apply request — defer after handler returns
180
+ workframe_compose up -d --build --no-deps workframe-api
181
+ (
182
+ sleep 3
183
+ workframe_compose up -d --no-deps workframe-supervisor
184
+ ) >/tmp/workframe-supervisor-restart.log 2>&1 &
185
+ else
186
+ workframe_compose up -d --build --no-deps workframe-api workframe-supervisor
187
+ fi
178
188
 
179
189
  if workframe_compose config --services 2>/dev/null | grep -qx workframe-ui; then
180
190
  workframe_compose up -d --no-deps workframe-ui || workframe_compose restart workframe-ui || true
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workframe/workframe-api",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -93,6 +93,7 @@ def _stack_apply(target: str, *, workframe_version: str = "", workframe_tarball:
93
93
  env = os.environ.copy()
94
94
  version = str(workframe_version or "").strip()
95
95
  tarball = str(workframe_tarball or "").strip()
96
+ env["WORKFRAME_UPDATE_FROM_SUPERVISOR"] = "1"
96
97
  if tarball and target in {"workframe", "all"}:
97
98
  env["WORKFRAME_UPDATE_TARBALL"] = tarball
98
99
  if version: