adminforth 3.6.8 → 3.6.10
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.
|
@@ -487,32 +487,42 @@ async function writeTemplateFiles(dirname, cwd, useNpm, includePrismaMigrations,
|
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
489
|
|
|
490
|
-
async function
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
490
|
+
async function installDependenciesPnpm(ctx, cwd) {
|
|
491
|
+
const isWindows = process.platform === 'win32';
|
|
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
|
+
]);
|
|
505
506
|
}
|
|
506
507
|
}
|
|
507
508
|
|
|
508
|
-
async function
|
|
509
|
-
const
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
509
|
+
async function installDependenciesNpm(ctx, cwd) {
|
|
510
|
+
const isWindows = process.platform === 'win32';
|
|
511
|
+
|
|
512
|
+
const nodeBinary = process.execPath;
|
|
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
|
+
}
|
|
516
526
|
}
|
|
517
527
|
|
|
518
528
|
function generateFinalInstructionsPnpm(skipPrismaSetup, options) {
|
|
@@ -586,7 +596,11 @@ export function prepareWorkflow(options) {
|
|
|
586
596
|
{
|
|
587
597
|
title: '📦 Installing dependencies...',
|
|
588
598
|
task: async (ctx) => {
|
|
589
|
-
|
|
599
|
+
if (options.useNpm) {
|
|
600
|
+
await installDependenciesNpm(ctx, ctx.projectDir);
|
|
601
|
+
} else {
|
|
602
|
+
await installDependenciesPnpm(ctx, ctx.projectDir);
|
|
603
|
+
}
|
|
590
604
|
}
|
|
591
605
|
},
|
|
592
606
|
{
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
@dragleave.prevent="dragging = false"
|
|
6
6
|
@drop.prevent="dragging = false; doEmit(($event.dataTransfer as DataTransfer).files)"
|
|
7
7
|
>
|
|
8
|
-
<label :id="id" class="flex flex-col items-center justify-center w-full border-2 border-dashed rounded-
|
|
8
|
+
<label :id="id" class="flex flex-col items-center justify-center w-full border-2 border-dashed rounded-default cursor-pointer
|
|
9
9
|
hover:bg-lightDropzoneBackgroundHover hover:border-lightDropzoneBorderHover dark:hover:border-darkDropzoneBorderHover dark:hover:bg-darkDropzoneBackgroundHover"
|
|
10
10
|
:class="{
|
|
11
11
|
'border-lightDropzoneBorderDragging dark:border-darkDropzoneBorderDragging': dragging,
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
>
|
|
51
51
|
<template v-for="(file, index) in selectedFiles" :key="index">
|
|
52
52
|
<div
|
|
53
|
-
class="text-sm text-lightDropzoneIcon dark:text-darkDropzoneIcon bg-lightDropzoneBackgroundHover dark:bg-darkDropzoneBackgroundHover rounded-
|
|
53
|
+
class="text-sm text-lightDropzoneIcon dark:text-darkDropzoneIcon bg-lightDropzoneBackgroundHover dark:bg-darkDropzoneBackgroundHover rounded-default
|
|
54
54
|
flex items-center gap-1 px-2 py-1 group"
|
|
55
55
|
>
|
|
56
56
|
<IconFileSolid class="w-4 h-4 flex-shrink-0" />
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="relative w-full bg-lightProgressBarUnfilledColor rounded-full h-2.5 dark:bg-darkProgressBarUnfilledColor" :class="props.height ? `h-${props.height}` : ''">
|
|
3
|
-
<span v-if="leftLabel" class="absolute -top-6 left-0 text-sm
|
|
4
|
-
<span v-if="rightLabel" class="absolute -top-6 right-0 text-sm
|
|
5
|
-
<div
|
|
3
|
+
<span v-if="leftLabel" class="absolute -top-6 left-0 text-sm" :class="textClass">{{ leftLabel }}</span>
|
|
4
|
+
<span v-if="rightLabel" class="absolute -top-6 right-0 text-sm" :class="textClass">{{ rightLabel }}</span>
|
|
5
|
+
<div
|
|
6
6
|
class="bg-lightPrimary dark:bg-darkPrimary h-2.5 rounded-full transition-all duration-300 ease-in-out"
|
|
7
|
-
:class="{ 'progress-bar': showAnimation, [`h-${props.height}`]: props.height }"
|
|
7
|
+
:class="{ 'progress-bar': showAnimation, [`h-${props.height}`]: props.height }"
|
|
8
8
|
:style="{ width: `${percentage}%` }"
|
|
9
9
|
></div>
|
|
10
10
|
<div v-if="showValues || showProgress" class="flex justify-between mt-2">
|
|
11
|
-
<span v-if="showValues" class="text-sm
|
|
12
|
-
<span v-if="showProgress" class="text-sm
|
|
13
|
-
<span v-if="showValues" class="text-sm
|
|
11
|
+
<span v-if="showValues" class="text-sm" :class="textClass">{{ formatValue(minValue) }}</span>
|
|
12
|
+
<span v-if="showProgress" class="text-sm" :class="textClass">{{ progressText }}</span>
|
|
13
|
+
<span v-if="showValues" class="text-sm" :class="textClass">{{ formatValue(maxValue) }}</span>
|
|
14
14
|
</div>
|
|
15
15
|
</div>
|
|
16
16
|
</template>
|
|
@@ -31,6 +31,7 @@ interface Props {
|
|
|
31
31
|
showProgress?: boolean
|
|
32
32
|
showAnimation?: boolean
|
|
33
33
|
height?: number
|
|
34
|
+
textClass?: string
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -39,7 +40,8 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
39
40
|
formatter: (value: number) => `${value}`,
|
|
40
41
|
progressFormatter: (value: number, percentage: number) => `${value}`,
|
|
41
42
|
showValues: true,
|
|
42
|
-
showProgress: true
|
|
43
|
+
showProgress: true,
|
|
44
|
+
textClass: 'text-lightProgressBarText dark:text-darkProgressBarText',
|
|
43
45
|
})
|
|
44
46
|
|
|
45
47
|
const percentage = computed((): number => {
|