mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 01:39:52 +08:00
fix: freeze release runtime tools and npm consumer artifacts
This commit is contained in:
1 parent
a70ec66fe3
commit
2f359c6bf0
63 files changed
+42562
-8738
No files matched your search
@@ -71,14 +71,18 @@ export async function executableAvailable(
|
||||
export async function installPanelDependencies(
|
||||
context: LocalContext,
|
||||
cwd = context.root,
|
||||
staticRoot?: string,
|
||||
sourceCommit?: string,
|
||||
): Promise<void> {
|
||||
const termux = context.env.is_termux === '1';
|
||||
const pnpm = !termux && (await executableAvailable('pnpm', context.env));
|
||||
await checkedProcess(
|
||||
pnpm ? 'pnpm' : 'npm',
|
||||
pnpm
|
||||
? ['install', '--loglevel', 'error', '--production']
|
||||
: ['install', '--production', ...(termux ? ['--no-bin-links'] : [])],
|
||||
process.execPath,
|
||||
[
|
||||
path.join(context.root, 'scripts/install-panel-dependencies.cjs'),
|
||||
'--root',
|
||||
cwd,
|
||||
...(staticRoot ? ['--static-dir', staticRoot] : []),
|
||||
...(sourceCommit ? ['--source-commit', sourceCommit] : []),
|
||||
],
|
||||
{ cwd, env: context.env },
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user