create-workframe 0.1.16 → 0.1.18
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/README.md +1 -1
- package/package.json +1 -1
- package/scripts/apply-update-workframe.sh +21 -18
- package/scripts/compose-docker-host.sh +29 -1
- package/workframe-api/updates.py +14 -5
- package/workframe-supervisor/server.py +18 -2
- package/workframe-ui/public/assets/{arc-esSBm9C_.js → arc-CSddOtMa.js} +1 -1
- package/workframe-ui/public/assets/architecture-7EHR7CIX-CDDNM1ni.js +1 -0
- package/workframe-ui/public/assets/{architectureDiagram-3BPJPVTR-DVVz9RGn.js → architectureDiagram-3BPJPVTR-BSiUei3D.js} +1 -1
- package/workframe-ui/public/assets/{blockDiagram-GPEHLZMM-B6i10GMX.js → blockDiagram-GPEHLZMM-BhKTULPo.js} +1 -1
- package/workframe-ui/public/assets/{c4Diagram-AAUBKEIU-BqwJ7JoH.js → c4Diagram-AAUBKEIU-Bv_xZi-a.js} +1 -1
- package/workframe-ui/public/assets/channel-R52LrLO3.js +1 -0
- package/workframe-ui/public/assets/{chunk-2J33WTMH-CyhcedSa.js → chunk-2J33WTMH-Bh0WiqFE.js} +1 -1
- package/workframe-ui/public/assets/{chunk-3OPIFGDE-1Rr6WuvI.js → chunk-3OPIFGDE-qN09pRuK.js} +1 -1
- package/workframe-ui/public/assets/{chunk-4BX2VUAB-D2bRrARV.js → chunk-4BX2VUAB-Dz6FVuMa.js} +1 -1
- package/workframe-ui/public/assets/{chunk-55IACEB6-CKXeZxSr.js → chunk-55IACEB6-DWtPHVfR.js} +1 -1
- package/workframe-ui/public/assets/{chunk-5ZQYHXKU-DYQxxPZ4.js → chunk-5ZQYHXKU-CyOUeDAo.js} +1 -1
- package/workframe-ui/public/assets/{chunk-727SXJPM-CGpIgqvD.js → chunk-727SXJPM-BrICvWwx.js} +1 -1
- package/workframe-ui/public/assets/{chunk-AQP2D5EJ-B88NGQ7d.js → chunk-AQP2D5EJ-CQu2SmLM.js} +1 -1
- package/workframe-ui/public/assets/{chunk-BSJP7CBP-CCymiI0O.js → chunk-BSJP7CBP-uJbYXNNG.js} +1 -1
- package/workframe-ui/public/assets/{chunk-CSCIHK7Q-DRgey03j.js → chunk-CSCIHK7Q-CCS_FtVZ.js} +1 -1
- package/workframe-ui/public/assets/{chunk-FMBD7UC4-l1adn8gM.js → chunk-FMBD7UC4-CoLUtPiK.js} +1 -1
- package/workframe-ui/public/assets/{chunk-KSCS5N6A-CaEvDRPK.js → chunk-KSCS5N6A-DLW4gvEW.js} +1 -1
- package/workframe-ui/public/assets/{chunk-L5ZTLDWV-BgCnvPTv.js → chunk-L5ZTLDWV-CMt0LJAd.js} +1 -1
- package/workframe-ui/public/assets/{chunk-LZXEDZCA-t2zokHpn.js → chunk-LZXEDZCA-Bn-maIlt.js} +2 -2
- package/workframe-ui/public/assets/{chunk-ND2GUHAM-C3c9p0sv.js → chunk-ND2GUHAM-CG7yoApR.js} +1 -1
- package/workframe-ui/public/assets/{chunk-NZK2D7GU-DSujF-R8.js → chunk-NZK2D7GU-B4dIvbii.js} +1 -1
- package/workframe-ui/public/assets/{chunk-O5CBEL6O-DJJTbM6p.js → chunk-O5CBEL6O-B5spDyXy.js} +1 -1
- package/workframe-ui/public/assets/chunk-QZHKN3VN-C_9MbT10.js +1 -0
- package/workframe-ui/public/assets/chunk-WU5MYG2G-VJadzJmf.js +1 -0
- package/workframe-ui/public/assets/{chunk-XPW4576I-D2Cxn3AG.js → chunk-XPW4576I-D5c0TMX6.js} +1 -1
- package/workframe-ui/public/assets/classDiagram-4FO5ZUOK-CpBjaI3g.js +1 -0
- package/workframe-ui/public/assets/classDiagram-v2-Q7XG4LA2-CpBjaI3g.js +1 -0
- package/workframe-ui/public/assets/{cose-bilkent-S5V4N54A---dQ-pFK.js → cose-bilkent-S5V4N54A-DFRM3DZv.js} +1 -1
- package/workframe-ui/public/assets/{dagre-BM42HDAG-B_qe1ODY.js → dagre-BM42HDAG-CnUdKeJa.js} +1 -1
- package/workframe-ui/public/assets/{diagram-2AECGRRQ-Bou8vEYl.js → diagram-2AECGRRQ-Ds3-e-hW.js} +1 -1
- package/workframe-ui/public/assets/{diagram-5GNKFQAL-DEUEzONU.js → diagram-5GNKFQAL-B41zx8FF.js} +1 -1
- package/workframe-ui/public/assets/{diagram-KO2AKTUF-Ctq571VA.js → diagram-KO2AKTUF-D83tI9I8.js} +1 -1
- package/workframe-ui/public/assets/{diagram-LMA3HP47-CnKn89lm.js → diagram-LMA3HP47-h_EuFyLI.js} +1 -1
- package/workframe-ui/public/assets/{diagram-OG6HWLK6-DnKlrMx2.js → diagram-OG6HWLK6-CpU-d3RZ.js} +1 -1
- package/workframe-ui/public/assets/{dist-ubrEgQyZ.js → dist-_igeSJ9r.js} +1 -1
- package/workframe-ui/public/assets/{erDiagram-TEJ5UH35-PjqO7CJd.js → erDiagram-TEJ5UH35-jLFoncRU.js} +1 -1
- package/workframe-ui/public/assets/eventmodeling-FCH6USID-kzOxPvtj.js +1 -0
- package/workframe-ui/public/assets/{flowDiagram-I6XJVG4X-B2PN_nNG.js → flowDiagram-I6XJVG4X-C9IaNgCy.js} +1 -1
- package/workframe-ui/public/assets/{ganttDiagram-6RSMTGT7-ThyAtNQP.js → ganttDiagram-6RSMTGT7-A9FhfFc5.js} +1 -1
- package/workframe-ui/public/assets/{gitGraph-WXDBUCRP-CB2UgoWy.js → gitGraph-WXDBUCRP-BqK_IjZb.js} +1 -1
- package/workframe-ui/public/assets/{gitGraphDiagram-PVQCEYII-DRJJ-zT-.js → gitGraphDiagram-PVQCEYII-CDVqxhyW.js} +1 -1
- package/workframe-ui/public/assets/{index-BLVAsAeO.css → index-Bco9IDMA.css} +1 -1
- package/workframe-ui/public/assets/index-Do34PZS2.js +132 -0
- package/workframe-ui/public/assets/{info-J43DQDTF-CLtR33Q_.js → info-J43DQDTF-C2EKRglL.js} +1 -1
- package/workframe-ui/public/assets/{infoDiagram-5YYISTIA-Cmunqfvi.js → infoDiagram-5YYISTIA-azQtFzpU.js} +1 -1
- package/workframe-ui/public/assets/{ishikawaDiagram-YF4QCWOH-DWE_84eL.js → ishikawaDiagram-YF4QCWOH-BuDOLv1t.js} +1 -1
- package/workframe-ui/public/assets/{journeyDiagram-JHISSGLW-BtBhpyRL.js → journeyDiagram-JHISSGLW-ypTHFoT0.js} +1 -1
- package/workframe-ui/public/assets/{kanban-definition-UN3LZRKU-B8QspDDL.js → kanban-definition-UN3LZRKU-Cgr78J_x.js} +1 -1
- package/workframe-ui/public/assets/{line-iOgDn4O8.js → line-CcwgaMdv.js} +1 -1
- package/workframe-ui/public/assets/{linear-BBehZNVA.js → linear-CswIlWaW.js} +1 -1
- package/workframe-ui/public/assets/{mermaid-parser.core-DQK5HcdU.js → mermaid-parser.core-CQYhP37X.js} +2 -2
- package/workframe-ui/public/assets/{mermaid.core-Dsrdd1Wr.js → mermaid.core-Cz1XNBaK.js} +3 -3
- package/workframe-ui/public/assets/{mindmap-definition-RKZ34NQL-Ds_BfsJA.js → mindmap-definition-RKZ34NQL-BJLu0829.js} +1 -1
- package/workframe-ui/public/assets/{packet-YPE3B663-Bz3pi4i8.js → packet-YPE3B663-AB1qh96V.js} +1 -1
- package/workframe-ui/public/assets/{pie-LRSECV5Y-BFFah-6g.js → pie-LRSECV5Y-CokIXLdT.js} +1 -1
- package/workframe-ui/public/assets/{pieDiagram-4H26LBE5-CVCvLPcC.js → pieDiagram-4H26LBE5-DyrwQn5F.js} +1 -1
- package/workframe-ui/public/assets/{quadrantDiagram-W4KKPZXB-Cx6rrc_7.js → quadrantDiagram-W4KKPZXB-C_Fdg3F6.js} +1 -1
- package/workframe-ui/public/assets/{radar-GUYGQ44K-DJ5vN_cg.js → radar-GUYGQ44K-C21Xfrrg.js} +1 -1
- package/workframe-ui/public/assets/{requirementDiagram-4Y6WPE33-Cbry6b5c.js → requirementDiagram-4Y6WPE33-ChhaWgaF.js} +1 -1
- package/workframe-ui/public/assets/{sankeyDiagram-5OEKKPKP-CICUr5En.js → sankeyDiagram-5OEKKPKP-C5T4sDTt.js} +1 -1
- package/workframe-ui/public/assets/{sequenceDiagram-3UESZ5HK-BsOuB3F-.js → sequenceDiagram-3UESZ5HK-DRks8i3A.js} +1 -1
- package/workframe-ui/public/assets/{src-TS8jZspq.js → src-BQu5waHd.js} +1 -1
- package/workframe-ui/public/assets/{stateDiagram-AJRCARHV-avBzMQy_.js → stateDiagram-AJRCARHV-BI-AKYta.js} +1 -1
- package/workframe-ui/public/assets/stateDiagram-v2-BHNVJYJU-vJyhFZbx.js +1 -0
- package/workframe-ui/public/assets/{timeline-definition-PNZ67QCA-DHLm6UFN.js → timeline-definition-PNZ67QCA-DnAIWzEc.js} +1 -1
- package/workframe-ui/public/assets/{treeView-BLDUP644-B3Qd5t3j.js → treeView-BLDUP644-BEF_sjx7.js} +1 -1
- package/workframe-ui/public/assets/{treemap-LRROVOQU-D1dMQS7x.js → treemap-LRROVOQU-BcbL7g5c.js} +1 -1
- package/workframe-ui/public/assets/{vennDiagram-CIIHVFJN-DZ6SoniY.js → vennDiagram-CIIHVFJN-DAoIbCkz.js} +1 -1
- package/workframe-ui/public/assets/{wardley-L42UT6IY-9gK17Tp3.js → wardley-L42UT6IY-3SOmFBFw.js} +1 -1
- package/workframe-ui/public/assets/{wardleyDiagram-YWT4CUSO-FCU_wmRE.js → wardleyDiagram-YWT4CUSO-DlQV_-LH.js} +1 -1
- package/workframe-ui/public/assets/{xychartDiagram-2RQKCTM6-DWowvseN.js → xychartDiagram-2RQKCTM6-CVoTTRHF.js} +1 -1
- package/workframe-ui/public/index.html +2 -2
- package/workframe-ui/public/workframe-build.json +3 -3
- package/workframe-ui/public/assets/architecture-7EHR7CIX-j-DiBdGu.js +0 -1
- package/workframe-ui/public/assets/channel-CJ9pFXbx.js +0 -1
- package/workframe-ui/public/assets/chunk-QZHKN3VN-Bxk3enxo.js +0 -1
- package/workframe-ui/public/assets/chunk-WU5MYG2G-DdbkX1rg.js +0 -1
- package/workframe-ui/public/assets/classDiagram-4FO5ZUOK-bwCRiiUl.js +0 -1
- package/workframe-ui/public/assets/classDiagram-v2-Q7XG4LA2-bwCRiiUl.js +0 -1
- package/workframe-ui/public/assets/eventmodeling-FCH6USID-g-Xo_eS4.js +0 -1
- package/workframe-ui/public/assets/index-1euVfd3b.js +0 -132
- package/workframe-ui/public/assets/stateDiagram-v2-BHNVJYJU-BFRA5TYD.js +0 -1
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -6,15 +6,18 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
|
6
6
|
source "$SCRIPT_DIR/compose-docker-host.sh"
|
|
7
7
|
|
|
8
8
|
# ponytail: npm integrity via python3 — Alpine supervisor has no xxd
|
|
9
|
-
|
|
10
|
-
local tarball="$1"
|
|
9
|
+
_wf_prefetched_integrity_ok() {
|
|
10
|
+
local tarball="$1" manifest="${1}.sha512"
|
|
11
11
|
local expected actual
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
if [[ ! -s "$manifest" ]]; then
|
|
13
|
+
echo "prefetched tarball integrity manifest is missing: $manifest" >&2
|
|
14
|
+
return 1
|
|
15
|
+
fi
|
|
14
16
|
if ! command -v python3 >/dev/null 2>&1; then
|
|
15
|
-
echo "
|
|
16
|
-
return
|
|
17
|
+
echo "python3 is required to verify the prefetched update tarball" >&2
|
|
18
|
+
return 1
|
|
17
19
|
fi
|
|
20
|
+
expected="$(tr -d '\r\n' < "$manifest")"
|
|
18
21
|
actual="$(python3 -c 'import base64, hashlib, sys
|
|
19
22
|
p = sys.argv[1]
|
|
20
23
|
d = hashlib.sha512(open(p, "rb").read()).digest()
|
|
@@ -69,11 +72,12 @@ _wf_sync_from_pack_dir() {
|
|
|
69
72
|
_wf_apply_npm_tarball() {
|
|
70
73
|
local tarball="$1"
|
|
71
74
|
local ver="${2:-latest}"
|
|
72
|
-
|
|
73
|
-
|
|
75
|
+
local source="${3:-npm}"
|
|
76
|
+
if [[ "$source" == "prefetched" ]] && ! _wf_prefetched_integrity_ok "$tarball"; then
|
|
77
|
+
echo "integrity mismatch for API-prefetched ${NPM_PACKAGE}@${ver}" >&2
|
|
74
78
|
exit 1
|
|
75
79
|
fi
|
|
76
|
-
echo "integrity
|
|
80
|
+
echo "integrity verified: ${NPM_PACKAGE}@${ver} ($source)"
|
|
77
81
|
local extract_dir
|
|
78
82
|
extract_dir="$(mktemp -d)"
|
|
79
83
|
tar -xf "$tarball" -C "$extract_dir"
|
|
@@ -125,10 +129,9 @@ if [[ "${WF_APPLY_UPDATE_SELF_CHECK:-}" == "1" ]]; then
|
|
|
125
129
|
TMP="$(mktemp -d)"
|
|
126
130
|
trap 'rm -rf "$TMP"' EXIT
|
|
127
131
|
echo test > "$TMP/t"
|
|
128
|
-
if ! _wf_npm_integrity_ok "$TMP/t" create-workframe latest 2>/dev/null; then
|
|
129
|
-
: # empty file won't match registry integrity — exercise python path only
|
|
130
|
-
fi
|
|
131
132
|
command -v python3 >/dev/null || { echo "self-check: python3 required" >&2; exit 1; }
|
|
133
|
+
python3 -c 'import base64, hashlib, sys; print("sha512-" + base64.b64encode(hashlib.sha512(open(sys.argv[1], "rb").read()).digest()).decode())' "$TMP/t" > "$TMP/t.sha512"
|
|
134
|
+
_wf_prefetched_integrity_ok "$TMP/t"
|
|
132
135
|
echo "apply-update-workframe self-check ok"
|
|
133
136
|
exit 0
|
|
134
137
|
fi
|
|
@@ -147,7 +150,7 @@ PREFETCH_TARBALL="${WORKFRAME_UPDATE_TARBALL:-}"
|
|
|
147
150
|
|
|
148
151
|
if [[ -n "$PREFETCH_TARBALL" && -f "$PREFETCH_TARBALL" ]]; then
|
|
149
152
|
echo "Applying API-prefetched tarball: $PREFETCH_TARBALL"
|
|
150
|
-
_wf_apply_npm_tarball "$PREFETCH_TARBALL" "${TARGET_VERSION:-latest}"
|
|
153
|
+
_wf_apply_npm_tarball "$PREFETCH_TARBALL" "${TARGET_VERSION:-latest}" prefetched
|
|
151
154
|
elif [[ "${WORKFRAME_UPDATE_SKIP_NPM:-1}" == "1" ]] && [[ "${WORKFRAME_UPDATE_ALLOW_NPM:-}" != "1" ]]; then
|
|
152
155
|
echo "Skipping npm template sync (WORKFRAME_UPDATE_SKIP_NPM=1; set WORKFRAME_UPDATE_ALLOW_NPM=1 to fetch)"
|
|
153
156
|
elif command -v npm >/dev/null 2>&1; then
|
|
@@ -164,7 +167,7 @@ elif command -v npm >/dev/null 2>&1; then
|
|
|
164
167
|
fi
|
|
165
168
|
TARBALL="$(ls -1 "$TMP"/${NPM_PACKAGE}-*.tgz 2>/dev/null | head -n1 || true)"
|
|
166
169
|
if [[ -n "$TARBALL" ]]; then
|
|
167
|
-
_wf_apply_npm_tarball "$TARBALL" "${TARGET_VERSION:-latest}"
|
|
170
|
+
_wf_apply_npm_tarball "$TARBALL" "${TARGET_VERSION:-latest}" npm
|
|
168
171
|
else
|
|
169
172
|
echo "npm pack produced no tarball — skipping template sync" >&2
|
|
170
173
|
exit 1
|
|
@@ -177,19 +180,19 @@ echo "Rebuilding workframe-api and workframe-supervisor..."
|
|
|
177
180
|
workframe_compose build workframe-api workframe-supervisor
|
|
178
181
|
if [[ "${WORKFRAME_UPDATE_FROM_SUPERVISOR:-}" == "1" ]]; then
|
|
179
182
|
# ponytail: supervisor cannot recreate itself inside the stack.apply request — defer after handler returns
|
|
180
|
-
|
|
183
|
+
workframe_compose_host_bindings up -d --no-build --no-deps workframe-api
|
|
181
184
|
(
|
|
182
185
|
sleep 3
|
|
183
|
-
|
|
186
|
+
workframe_compose_host_bindings up -d --no-build --no-deps workframe-supervisor
|
|
184
187
|
) >/tmp/workframe-supervisor-restart.log 2>&1 &
|
|
185
188
|
else
|
|
186
189
|
workframe_compose up -d --build --no-deps workframe-api workframe-supervisor
|
|
187
190
|
fi
|
|
188
191
|
|
|
189
192
|
if workframe_compose config --services 2>/dev/null | grep -qx workframe-ui; then
|
|
190
|
-
|
|
193
|
+
workframe_compose_host_bindings up -d --no-build --no-deps workframe-ui || workframe_compose_host_bindings restart workframe-ui || true
|
|
191
194
|
elif workframe_compose config --services 2>/dev/null | grep -qx workframe; then
|
|
192
|
-
|
|
195
|
+
workframe_compose_host_bindings up -d --no-build --no-deps workframe || workframe_compose_host_bindings restart workframe || true
|
|
193
196
|
fi
|
|
194
197
|
|
|
195
198
|
_wf_record_package_version "${TARGET_VERSION:-}"
|
|
@@ -6,6 +6,17 @@ workframe_compose_prepare() {
|
|
|
6
6
|
compose_cd=""
|
|
7
7
|
compose_files=()
|
|
8
8
|
|
|
9
|
+
# A supervisor invokes compose through the Docker socket. Its /compose mount is
|
|
10
|
+
# the only build context it can package, so never feed the host-bindings overlay
|
|
11
|
+
# back into that invocation (Windows paths become /compose/D:/... in build).
|
|
12
|
+
if [[ "${WORKFRAME_UPDATE_FROM_SUPERVISOR:-}" == "1" \
|
|
13
|
+
&& -n "${WORKFRAME_COMPOSE_DIR:-}" \
|
|
14
|
+
&& -f "${WORKFRAME_COMPOSE_DIR}/docker-compose.yml" ]]; then
|
|
15
|
+
compose_cd="${WORKFRAME_COMPOSE_DIR}"
|
|
16
|
+
compose_files=(-f docker-compose.yml)
|
|
17
|
+
return 0
|
|
18
|
+
fi
|
|
19
|
+
|
|
9
20
|
# Host-bindings overlay: absolute WORKFRAME_HOST_* paths for docker.sock on the real host.
|
|
10
21
|
# Skip inside supervisor when only the /compose bind mount is visible — host paths become
|
|
11
22
|
# /compose/D:/... and break build contexts.
|
|
@@ -13,7 +24,9 @@ workframe_compose_prepare() {
|
|
|
13
24
|
&& -f "${WORKFRAME_COMPOSE_DIR}/docker-compose.yml" \
|
|
14
25
|
&& -f "${WORKFRAME_COMPOSE_DIR}/docker-compose.host-bindings.yml" ]]; then
|
|
15
26
|
compose_cd="${WORKFRAME_COMPOSE_DIR}"
|
|
16
|
-
|
|
27
|
+
# Docker Desktop resolves Windows host paths via the daemon even when the
|
|
28
|
+
# supervisor cannot see them as Linux directories.
|
|
29
|
+
if [[ -d "${WORKFRAME_HOST_COMPOSE_DIR}" || "${WORKFRAME_HOST_COMPOSE_DIR}" =~ ^[A-Za-z]:[/\\] ]]; then
|
|
17
30
|
compose_files=(-f docker-compose.yml -f docker-compose.host-bindings.yml)
|
|
18
31
|
else
|
|
19
32
|
compose_files=(-f docker-compose.yml)
|
|
@@ -41,3 +54,18 @@ workframe_compose() {
|
|
|
41
54
|
fi
|
|
42
55
|
docker compose "${compose_files[@]}" "$@"
|
|
43
56
|
}
|
|
57
|
+
|
|
58
|
+
# Builds from inside the supervisor use /compose, but recreating a service must
|
|
59
|
+
# pass the generated host-bindings overlay back to Docker Desktop for its binds.
|
|
60
|
+
workframe_compose_host_bindings() {
|
|
61
|
+
if [[ "${WORKFRAME_UPDATE_FROM_SUPERVISOR:-}" == "1" \
|
|
62
|
+
&& -n "${WORKFRAME_HOST_COMPOSE_DIR:-}" \
|
|
63
|
+
&& -n "${WORKFRAME_HOST_PROJECT_ROOT:-}" \
|
|
64
|
+
&& -n "${WORKFRAME_COMPOSE_DIR:-}" \
|
|
65
|
+
&& -f "${WORKFRAME_COMPOSE_DIR}/docker-compose.host-bindings.yml" ]]; then
|
|
66
|
+
cd "${WORKFRAME_COMPOSE_DIR}"
|
|
67
|
+
docker compose -f docker-compose.yml -f docker-compose.host-bindings.yml "$@"
|
|
68
|
+
return
|
|
69
|
+
fi
|
|
70
|
+
workframe_compose "$@"
|
|
71
|
+
}
|
package/workframe-api/updates.py
CHANGED
|
@@ -96,11 +96,13 @@ def prefetch_workframe_npm_tarball(version: str) -> str:
|
|
|
96
96
|
body = resp.read()
|
|
97
97
|
except (urllib.error.URLError, TimeoutError, OSError) as exc:
|
|
98
98
|
raise ValueError(f"npm_download_failed:{exc}") from exc
|
|
99
|
-
if integrity.startswith("sha512-"):
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
if not integrity.startswith("sha512-"):
|
|
100
|
+
raise ValueError("npm_integrity_missing")
|
|
101
|
+
actual = "sha512-" + base64.b64encode(hashlib.sha512(body).digest()).decode()
|
|
102
|
+
if actual != integrity:
|
|
103
|
+
raise ValueError("npm_integrity_mismatch")
|
|
103
104
|
dest.write_bytes(body)
|
|
105
|
+
dest.with_suffix(dest.suffix + ".sha512").write_text(actual + "\n", encoding="utf-8")
|
|
104
106
|
return _supervisor_tarball_path(pkg, ver)
|
|
105
107
|
|
|
106
108
|
|
|
@@ -540,7 +542,9 @@ def _run_apply_scripts(target: str, env: dict[str, str]) -> dict[str, Any]:
|
|
|
540
542
|
)
|
|
541
543
|
logs.append(f"=== {script} (exit {proc.returncode}) ===\n{proc.stdout}\n{proc.stderr}")
|
|
542
544
|
if proc.returncode != 0:
|
|
543
|
-
|
|
545
|
+
detail = (proc.stderr or proc.stdout).strip().splitlines()
|
|
546
|
+
tail = detail[-1].strip() if detail else f"exit_{proc.returncode}"
|
|
547
|
+
raise ValueError(f"update_failed:{Path(script).name}:{tail[-600:]}")
|
|
544
548
|
return {"ok": True, "target": target, "log": "\n".join(logs)[-12000:]}
|
|
545
549
|
|
|
546
550
|
|
|
@@ -573,6 +577,11 @@ def apply_update(target: str, *, user_ack: bool = False) -> dict[str, Any]:
|
|
|
573
577
|
|
|
574
578
|
if channel == "supervisor":
|
|
575
579
|
body: dict[str, Any] = {"target": target}
|
|
580
|
+
host_compose_dir = str(os.environ.get("WORKFRAME_HOST_COMPOSE_DIR") or "").strip()
|
|
581
|
+
host_project_root = str(os.environ.get("WORKFRAME_HOST_PROJECT_ROOT") or "").strip()
|
|
582
|
+
if host_compose_dir and host_project_root:
|
|
583
|
+
body["host_compose_dir"] = host_compose_dir
|
|
584
|
+
body["host_project_root"] = host_project_root
|
|
576
585
|
if workframe_version:
|
|
577
586
|
body["workframe_version"] = workframe_version
|
|
578
587
|
if workframe_tarball:
|
|
@@ -60,7 +60,14 @@ def _exec_targets_runtime_profile_secrets(cmd: list[str], acting_profile: str =
|
|
|
60
60
|
return exec_blocked_for_profile(cmd, acting_profile)
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
def _stack_apply(
|
|
63
|
+
def _stack_apply(
|
|
64
|
+
target: str,
|
|
65
|
+
*,
|
|
66
|
+
workframe_version: str = "",
|
|
67
|
+
workframe_tarball: str = "",
|
|
68
|
+
host_compose_dir: str = "",
|
|
69
|
+
host_project_root: str = "",
|
|
70
|
+
) -> dict[str, Any]:
|
|
64
71
|
target = str(target or "all").strip().lower()
|
|
65
72
|
if target == "gateway-restart":
|
|
66
73
|
script = SCRIPTS_DIR / "restart-gateway-hermes.sh"
|
|
@@ -94,6 +101,9 @@ def _stack_apply(target: str, *, workframe_version: str = "", workframe_tarball:
|
|
|
94
101
|
version = str(workframe_version or "").strip()
|
|
95
102
|
tarball = str(workframe_tarball or "").strip()
|
|
96
103
|
env["WORKFRAME_UPDATE_FROM_SUPERVISOR"] = "1"
|
|
104
|
+
if host_compose_dir and host_project_root:
|
|
105
|
+
env["WORKFRAME_HOST_COMPOSE_DIR"] = str(host_compose_dir).strip()
|
|
106
|
+
env["WORKFRAME_HOST_PROJECT_ROOT"] = str(host_project_root).strip()
|
|
97
107
|
if tarball and target in {"workframe", "all"}:
|
|
98
108
|
env["WORKFRAME_UPDATE_TARBALL"] = tarball
|
|
99
109
|
if version:
|
|
@@ -113,7 +123,9 @@ def _stack_apply(target: str, *, workframe_version: str = "", workframe_tarball:
|
|
|
113
123
|
)
|
|
114
124
|
logs.append(f"=== {script} (exit {proc.returncode}) ===\n{proc.stdout}\n{proc.stderr}")
|
|
115
125
|
if proc.returncode != 0:
|
|
116
|
-
|
|
126
|
+
detail = (proc.stderr or proc.stdout).strip().splitlines()
|
|
127
|
+
tail = detail[-1].strip() if detail else f"exit_{proc.returncode}"
|
|
128
|
+
raise ValueError(f"update_failed:{script.name}:{tail[-600:]}")
|
|
117
129
|
return {"ok": True, "target": target, "log": "\n".join(logs)[-12000:]}
|
|
118
130
|
|
|
119
131
|
|
|
@@ -796,6 +808,8 @@ class Handler(BaseHTTPRequestHandler):
|
|
|
796
808
|
target = str(body.get("target") or "all").strip().lower()
|
|
797
809
|
workframe_version = str(body.get("workframe_version") or "").strip()
|
|
798
810
|
workframe_tarball = str(body.get("workframe_tarball") or "").strip()
|
|
811
|
+
host_compose_dir = str(body.get("host_compose_dir") or "").strip()
|
|
812
|
+
host_project_root = str(body.get("host_project_root") or "").strip()
|
|
799
813
|
try:
|
|
800
814
|
return self._json(
|
|
801
815
|
200,
|
|
@@ -803,6 +817,8 @@ class Handler(BaseHTTPRequestHandler):
|
|
|
803
817
|
target,
|
|
804
818
|
workframe_version=workframe_version,
|
|
805
819
|
workframe_tarball=workframe_tarball,
|
|
820
|
+
host_compose_dir=host_compose_dir,
|
|
821
|
+
host_project_root=host_project_root,
|
|
806
822
|
),
|
|
807
823
|
)
|
|
808
824
|
except ValueError as exc:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./path-BWPyau1x.js";import{a as n,c as r,d as i,f as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,u as p}from"./dist-
|
|
1
|
+
import{n as e,t}from"./path-BWPyau1x.js";import{a as n,c as r,d as i,f as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,u as p}from"./dist-_igeSJ9r.js";function m(e){return e.innerRadius}function h(e){return e.outerRadius}function g(e){return e.startAngle}function _(e){return e.endAngle}function v(e){return e&&e.padAngle}function y(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function b(e,t,n,r,i,a,o){var c=e-n,l=t-r,u=(o?a:-a)/d(c*c+l*l),f=u*l,p=-u*c,m=e+f,h=t+p,g=n+f,_=r+p,v=(m+g)/2,y=(h+_)/2,b=g-m,x=_-h,S=b*b+x*x,C=i-a,w=m*_-g*h,T=(x<0?-1:1)*d(s(0,C*C*S-w*w)),E=(w*x-b*T)/S,D=(-w*b-x*T)/S,O=(w*x+b*T)/S,k=(-w*b+x*T)/S,A=E-v,j=D-y,M=O-v,N=k-y;return A*A+j*j>M*M+N*N&&(E=O,D=k),{cx:E,cy:D,x01:-f,y01:-p,x11:E*(i/C-1),y11:D*(i/C-1)}}function x(){var s=m,x=h,S=e(0),C=null,w=g,T=_,E=v,D=null,O=t(k);function k(){var e,t,m=+s.apply(this,arguments),h=+x.apply(this,arguments),g=w.apply(this,arguments)-r,_=T.apply(this,arguments)-r,v=l(_-g),k=_>g;if(D||=e=O(),h<m&&(t=h,h=m,m=t),!(h>1e-12))D.moveTo(0,0);else if(v>c-1e-12)D.moveTo(h*u(g),h*a(g)),D.arc(0,0,h,g,_,!k),m>1e-12&&(D.moveTo(m*u(_),m*a(_)),D.arc(0,0,m,_,g,k));else{var A=g,j=_,M=g,N=_,P=v,F=v,I=E.apply(this,arguments)/2,L=I>1e-12&&(C?+C.apply(this,arguments):d(m*m+h*h)),R=p(l(h-m)/2,+S.apply(this,arguments)),z=R,B=R,V,H;if(L>1e-12){var U=o(L/m*a(I)),W=o(L/h*a(I));(P-=U*2)>1e-12?(U*=k?1:-1,M+=U,N-=U):(P=0,M=N=(g+_)/2),(F-=W*2)>1e-12?(W*=k?1:-1,A+=W,j-=W):(F=0,A=j=(g+_)/2)}var G=h*u(A),K=h*a(A),q=m*u(N),J=m*a(N);if(R>1e-12){var Y=h*u(j),X=h*a(j),Z=m*u(M),Q=m*a(M),$;if(v<i)if($=y(G,K,Z,Q,Y,X,q,J)){var ee=G-$[0],te=K-$[1],ne=Y-$[0],re=X-$[1],ie=1/a(f((ee*ne+te*re)/(d(ee*ee+te*te)*d(ne*ne+re*re)))/2),ae=d($[0]*$[0]+$[1]*$[1]);z=p(R,(m-ae)/(ie-1)),B=p(R,(h-ae)/(ie+1))}else z=B=0}F>1e-12?B>1e-12?(V=b(Z,Q,G,K,h,B,k),H=b(Y,X,q,J,h,B,k),D.moveTo(V.cx+V.x01,V.cy+V.y01),B<R?D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,h,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),!k),D.arc(H.cx,H.cy,B,n(H.y11,H.x11),n(H.y01,H.x01),!k))):(D.moveTo(G,K),D.arc(0,0,h,A,j,!k)):D.moveTo(G,K),!(m>1e-12)||!(P>1e-12)?D.lineTo(q,J):z>1e-12?(V=b(q,J,Y,X,m,-z,k),H=b(G,K,Z,Q,m,-z,k),D.lineTo(V.cx+V.x01,V.cy+V.y01),z<R?D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,m,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),k),D.arc(H.cx,H.cy,z,n(H.y11,H.x11),n(H.y01,H.x01),!k))):D.arc(0,0,m,N,M,k)}if(D.closePath(),e)return D=null,e+``||null}return k.centroid=function(){var e=(+s.apply(this,arguments)+ +x.apply(this,arguments))/2,t=(+w.apply(this,arguments)+ +T.apply(this,arguments))/2-i/2;return[u(t)*e,a(t)*e]},k.innerRadius=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),k):s},k.outerRadius=function(t){return arguments.length?(x=typeof t==`function`?t:e(+t),k):x},k.cornerRadius=function(t){return arguments.length?(S=typeof t==`function`?t:e(+t),k):S},k.padRadius=function(t){return arguments.length?(C=t==null?null:typeof t==`function`?t:e(+t),k):C},k.startAngle=function(t){return arguments.length?(w=typeof t==`function`?t:e(+t),k):w},k.endAngle=function(t){return arguments.length?(T=typeof t==`function`?t:e(+t),k):T},k.padAngle=function(t){return arguments.length?(E=typeof t==`function`?t:e(+t),k):E},k.context=function(e){return arguments.length?(D=e??null,k):D},k}export{x as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-NNHCCRGN-DlpIbxXb.js";import{x as e}from"./mermaid-parser.core-CQYhP37X.js";export{e as createArchitectureServices};
|