Use npm mirror for frontend dependencies
This commit is contained in:
@@ -110,7 +110,17 @@ def build_deployment_plan(scan: ScanResult, config: DeploymentConfig) -> list[De
|
|||||||
steps.append(
|
steps.append(
|
||||||
DeploymentStep(
|
DeploymentStep(
|
||||||
f"安装{display_name}依赖",
|
f"安装{display_name}依赖",
|
||||||
[npm_command, "install", "--no-audit", "--no-fund", "--progress=false"],
|
[
|
||||||
|
npm_command,
|
||||||
|
"install",
|
||||||
|
"--registry=https://registry.npmmirror.com",
|
||||||
|
"--strict-ssl=false",
|
||||||
|
"--legacy-peer-deps",
|
||||||
|
"--no-audit",
|
||||||
|
"--no-fund",
|
||||||
|
"--progress=false",
|
||||||
|
"--loglevel=verbose",
|
||||||
|
],
|
||||||
frontend.path,
|
frontend.path,
|
||||||
f"安装{display_name} package.json 中的依赖",
|
f"安装{display_name} package.json 中的依赖",
|
||||||
kind="frontend_install",
|
kind="frontend_install",
|
||||||
|
|||||||
@@ -992,7 +992,17 @@ class DeployerTests(unittest.TestCase):
|
|||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
plan[0].command,
|
plan[0].command,
|
||||||
[npm, "install", "--no-audit", "--no-fund", "--progress=false"],
|
[
|
||||||
|
npm,
|
||||||
|
"install",
|
||||||
|
"--registry=https://registry.npmmirror.com",
|
||||||
|
"--strict-ssl=false",
|
||||||
|
"--legacy-peer-deps",
|
||||||
|
"--no-audit",
|
||||||
|
"--no-fund",
|
||||||
|
"--progress=false",
|
||||||
|
"--loglevel=verbose",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
self.assertEqual(plan[1].command[1:3], ["run", "serve"])
|
self.assertEqual(plan[1].command[1:3], ["run", "serve"])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user