@virmator/frontend 14.0.0 → 14.0.1
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/dist/frontend.js +5 -3
- package/package.json +6 -6
- package/src/frontend.ts +5 -3
package/dist/frontend.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { check } from '@augment-vir/assert';
|
|
2
2
|
import { RuntimeEnv } from '@augment-vir/common';
|
|
3
|
-
import { toPosixPath } from '@augment-vir/node';
|
|
3
|
+
import { doesPathContain, toPosixPath } from '@augment-vir/node';
|
|
4
4
|
import { defineVirmatorPlugin, NpmDepType, PackageType } from '@virmator/core';
|
|
5
5
|
import mri from 'mri';
|
|
6
6
|
import { cp, rm } from 'node:fs/promises';
|
|
@@ -92,7 +92,7 @@ export const virmatorFrontendPlugin = defineVirmatorPlugin(import.meta.dirname,
|
|
|
92
92
|
},
|
|
93
93
|
},
|
|
94
94
|
},
|
|
95
|
-
}, async ({ cliInputs: { filteredArgs, usedCommands }, package: { cwdPackagePath }, runShellCommand, cwd, configs, log, }) => {
|
|
95
|
+
}, async ({ cliInputs: { filteredArgs, usedCommands }, package: { cwdPackagePath, monoRepoRootPath }, runShellCommand, cwd, configs, log, }) => {
|
|
96
96
|
const args = mri(filteredArgs);
|
|
97
97
|
const needsBuild = usedCommands.frontend?.subCommands.build || usedCommands.frontend?.subCommands.preview;
|
|
98
98
|
const configPath = args.config || configs.frontend.configs.vite.fullCopyToPath;
|
|
@@ -113,7 +113,9 @@ export const virmatorFrontendPlugin = defineVirmatorPlugin(import.meta.dirname,
|
|
|
113
113
|
];
|
|
114
114
|
if (needsBuild) {
|
|
115
115
|
await rm(join(cwdPackagePath, 'node_modules', '.vite'), { force: true, recursive: true });
|
|
116
|
-
|
|
116
|
+
if (doesPathContain(monoRepoRootPath, outDir)) {
|
|
117
|
+
await rm(outDir, { recursive: true, force: true });
|
|
118
|
+
}
|
|
117
119
|
const buildCommand = [
|
|
118
120
|
...baseViteCommands,
|
|
119
121
|
'build',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@virmator/frontend",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.1",
|
|
4
4
|
"description": "Default frontend plugin for virmator.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"virmator",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"test:update": "npm test update"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@augment-vir/assert": "^31.
|
|
39
|
-
"@augment-vir/common": "^31.
|
|
40
|
-
"@augment-vir/node": "^31.
|
|
41
|
-
"@virmator/core": "^14.0.
|
|
38
|
+
"@augment-vir/assert": "^31.33.0",
|
|
39
|
+
"@augment-vir/common": "^31.33.0",
|
|
40
|
+
"@augment-vir/node": "^31.33.0",
|
|
41
|
+
"@virmator/core": "^14.0.1",
|
|
42
42
|
"mri": "^1.2.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@augment-vir/test": "^31.
|
|
45
|
+
"@augment-vir/test": "^31.33.0",
|
|
46
46
|
"@types/node": "^24.3.0",
|
|
47
47
|
"typescript": "^5.9.2",
|
|
48
48
|
"vite": "^7.1.3",
|
package/src/frontend.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {check} from '@augment-vir/assert';
|
|
2
2
|
import {type MaybePromise, RuntimeEnv} from '@augment-vir/common';
|
|
3
|
-
import {toPosixPath} from '@augment-vir/node';
|
|
3
|
+
import {doesPathContain, toPosixPath} from '@augment-vir/node';
|
|
4
4
|
import {defineVirmatorPlugin, NpmDepType, PackageType} from '@virmator/core';
|
|
5
5
|
import mri from 'mri';
|
|
6
6
|
import {cp, rm} from 'node:fs/promises';
|
|
@@ -99,7 +99,7 @@ export const virmatorFrontendPlugin = defineVirmatorPlugin(
|
|
|
99
99
|
},
|
|
100
100
|
async ({
|
|
101
101
|
cliInputs: {filteredArgs, usedCommands},
|
|
102
|
-
package: {cwdPackagePath},
|
|
102
|
+
package: {cwdPackagePath, monoRepoRootPath},
|
|
103
103
|
runShellCommand,
|
|
104
104
|
cwd,
|
|
105
105
|
configs,
|
|
@@ -134,7 +134,9 @@ export const virmatorFrontendPlugin = defineVirmatorPlugin(
|
|
|
134
134
|
|
|
135
135
|
if (needsBuild) {
|
|
136
136
|
await rm(join(cwdPackagePath, 'node_modules', '.vite'), {force: true, recursive: true});
|
|
137
|
-
|
|
137
|
+
if (doesPathContain(monoRepoRootPath, outDir)) {
|
|
138
|
+
await rm(outDir, {recursive: true, force: true});
|
|
139
|
+
}
|
|
138
140
|
|
|
139
141
|
const buildCommand = [
|
|
140
142
|
...baseViteCommands,
|