From 93c9dde57209b246de832b532c5153ea15264aff Mon Sep 17 00:00:00 2001 From: 3252a8 <3252a8@proton.me> Date: Thu, 28 May 2026 08:21:54 +0300 Subject: [PATCH] chore: harden docs demo config fetch --- docs-site/scripts/build-demo-runtime.mjs | 35 ++++++++++++++++++------ 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/docs-site/scripts/build-demo-runtime.mjs b/docs-site/scripts/build-demo-runtime.mjs index 87911a8..5c09ee6 100644 --- a/docs-site/scripts/build-demo-runtime.mjs +++ b/docs-site/scripts/build-demo-runtime.mjs @@ -13,6 +13,7 @@ const localesDir = path.join(repoRoot, 'locales'); const runtimeBase = '/demo/runtime'; const installGuidesConfigUrl = 'https://raw.githubusercontent.com/legiz-ru/my-remnawave/main/sub-page/subpage-config/multiapp.json'; +const installGuidesConfigRetries = 3; const isWindows = process.platform === 'win32'; const npmExecPath = process.env.npm_execpath || ''; @@ -92,6 +93,10 @@ async function copyRuntimeAsset(name) { await copyFile(path.join(templatesDir, name), path.join(runtimeDir, name)); } +function wait(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); +} + function jsonScriptPayload(value) { return JSON.stringify(value).replace(/