adminforth 3.6.5 → 3.6.7
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/commands/createApp/utils.js +7 -40
- package/package.json +1 -2
|
@@ -487,42 +487,13 @@ async function writeTemplateFiles(dirname, cwd, useNpm, includePrismaMigrations,
|
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
489
|
|
|
490
|
-
async function
|
|
491
|
-
const
|
|
492
|
-
|
|
493
|
-
const nodeBinary = process.execPath;
|
|
494
|
-
const pnpmPath = path.join(path.dirname(nodeBinary), isWindows ? 'pnpm.cmd' : 'pnpm');
|
|
495
|
-
const customDir = ctx.customDir;
|
|
496
|
-
if (isWindows) {
|
|
497
|
-
const res = await Promise.all([
|
|
498
|
-
execAsync(`pnpm install`, { cwd, env: { PATH: process.env.PATH } }),
|
|
499
|
-
execAsync(`pnpm install`, { cwd: customDir, env: { PATH: process.env.PATH } }),
|
|
500
|
-
]);
|
|
501
|
-
} else {
|
|
502
|
-
const res = await Promise.all([
|
|
503
|
-
execAsync(`${nodeBinary} ${pnpmPath} install`, { cwd, env: { PATH: process.env.PATH } }),
|
|
504
|
-
execAsync(`${nodeBinary} ${pnpmPath} install`, { cwd: customDir, env: { PATH: process.env.PATH } }),
|
|
505
|
-
]);
|
|
506
|
-
}
|
|
507
|
-
}
|
|
490
|
+
async function installDependencies(ctx, cwd, packageManager) {
|
|
491
|
+
const command = `${packageManager} install`;
|
|
508
492
|
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
const npmPath = path.join(path.dirname(nodeBinary), isWindows ? 'npm.cmd' : 'npm');
|
|
514
|
-
const customDir = ctx.customDir;
|
|
515
|
-
if (isWindows) {
|
|
516
|
-
const res = await Promise.all([
|
|
517
|
-
execAsync(`npm install`, { cwd, env: { PATH: process.env.PATH } }),
|
|
518
|
-
execAsync(`npm install`, { cwd: customDir, env: { PATH: process.env.PATH } }),
|
|
519
|
-
]);
|
|
520
|
-
} else {
|
|
521
|
-
const res = await Promise.all([
|
|
522
|
-
execAsync(`${nodeBinary} ${npmPath} install`, { cwd, env: { PATH: process.env.PATH } }),
|
|
523
|
-
execAsync(`${nodeBinary} ${npmPath} install`, { cwd: customDir, env: { PATH: process.env.PATH } }),
|
|
524
|
-
]);
|
|
525
|
-
}
|
|
493
|
+
await Promise.all([
|
|
494
|
+
execAsync(command, { cwd, env: process.env }),
|
|
495
|
+
execAsync(command, { cwd: ctx.customDir, env: process.env }),
|
|
496
|
+
]);
|
|
526
497
|
}
|
|
527
498
|
|
|
528
499
|
function generateFinalInstructionsPnpm(skipPrismaSetup, options) {
|
|
@@ -596,11 +567,7 @@ export function prepareWorkflow(options) {
|
|
|
596
567
|
{
|
|
597
568
|
title: '📦 Installing dependencies...',
|
|
598
569
|
task: async (ctx) => {
|
|
599
|
-
|
|
600
|
-
await installDependenciesNpm(ctx, ctx.projectDir);
|
|
601
|
-
} else {
|
|
602
|
-
await installDependenciesPnpm(ctx, ctx.projectDir);
|
|
603
|
-
}
|
|
570
|
+
await installDependencies(ctx, ctx.projectDir, options.useNpm ? 'npm' : 'pnpm');
|
|
604
571
|
}
|
|
605
572
|
},
|
|
606
573
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adminforth",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.7",
|
|
4
4
|
"description": "OpenSource Agent-Native forth-generation admin panel",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"adminforth",
|
|
@@ -89,7 +89,6 @@
|
|
|
89
89
|
"@inquirer/prompts": "^7.4.1",
|
|
90
90
|
"@scalar/express-api-reference": "^0.9.7",
|
|
91
91
|
"@types/express": "^4.17.21",
|
|
92
|
-
"adminforth": "link:.",
|
|
93
92
|
"ajv": "^8.18.0",
|
|
94
93
|
"arg": "^5.0.2",
|
|
95
94
|
"ast-types": "^0.14.2",
|