depository-deploy 1.2.0 → 1.2.3

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.
@@ -236,6 +236,13 @@ if [ ! -d "$UI_SRC" ]; then
236
236
  fi
237
237
  cp -r "$UI_SRC/"* "$INSTALL_DIR/ui/"
238
238
 
239
+ # Inject API base URL so the React app routes through the nginx proxy (same origin → no CORS)
240
+ UI_INDEX="$INSTALL_DIR/ui/index.html"
241
+ if [ -f "$UI_INDEX" ]; then
242
+ sed -i.bak "s|</head>|<script>window.__API_BASE__='${SITE_URL}';window.__CORE_API_BASE__='${SITE_URL}';</script></head>|" "$UI_INDEX" && rm -f "${UI_INDEX}.bak"
243
+ info "UI configured: API base → $SITE_URL"
244
+ fi
245
+
239
246
  chmod +x "$INSTALL_DIR/api/DEPOSITORY.API.REST"
240
247
  chmod +x "$INSTALL_DIR/auth/DEPOSITORY.API.OATH"
241
248
  chmod +x "$INSTALL_DIR/worker/DEPOSITORY.CORE.WORKER"
@@ -222,6 +222,17 @@ if (-not (Test-Path $uiSrc)) {
222
222
  }
223
223
  if (-not (Test-Path $uiSrc)) { Write-Fail "UI folder not found at $ReleaseDir\ui or $(Split-Path -Parent $ReleaseDir)\ui" }
224
224
  Copy-Item "$uiSrc\*" (Join-Path $INSTALL_DIR "ui") -Recurse -Force
225
+
226
+ # Inject API base URL so the React app routes through the IIS proxy (same origin → no CORS)
227
+ $uiIndex = Join-Path $INSTALL_DIR "ui\index.html"
228
+ if (Test-Path $uiIndex) {
229
+ $html = Get-Content $uiIndex -Raw -Encoding UTF8
230
+ $inject = "<script>window.__API_BASE__='$SITE_URL';window.__CORE_API_BASE__='$SITE_URL';</script>"
231
+ $html = $html -replace '</head>', "$inject</head>"
232
+ Set-Content $uiIndex -Value $html -Encoding UTF8
233
+ Write-OK "UI configured: API base → $SITE_URL"
234
+ }
235
+
225
236
  $setupSrc = Join-Path $ReleaseDir "setup"
226
237
  if (Test-Path $setupSrc) {
227
238
  Copy-Item "$setupSrc\*" (Join-Path $INSTALL_DIR "setup") -Recurse -Force
@@ -13,6 +13,7 @@
13
13
  },
14
14
  "ApplicationSettings": {
15
15
  "JWT_Secret": "{{JWT_SECRET}}",
16
+ "Client_URL": "{{SITE_URL}}",
16
17
  "BatchWorkingRoot": "{{DATA_DIR}}",
17
18
  "AzureMainRoot": "main",
18
19
  "AzureStagingRoot": "staging",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "depository-deploy",
3
- "version": "1.2.0",
3
+ "version": "1.2.3",
4
4
  "description": "Depository document management system – deployment wizard and installers",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {
@@ -25,9 +25,9 @@
25
25
  "scripts/publish.mjs"
26
26
  ],
27
27
  "optionalDependencies": {
28
- "depository-deploy-linux": "1.2.0",
29
- "depository-deploy-macos": "1.2.0",
30
- "depository-deploy-windows": "1.2.0"
28
+ "depository-deploy-linux": "1.2.3",
29
+ "depository-deploy-macos": "1.2.3",
30
+ "depository-deploy-windows": "1.2.3"
31
31
  },
32
32
  "scripts": {
33
33
  "start": "node wizard-server.mjs"