virmator 11.3.3 → 11.4.0
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/configs/package.json +1 -1
- package/configs/www-static/_redirects +1 -0
- package/dist/api/run-command/check-npm-deps.js +22 -17
- package/dist/commands/deps.command.js +0 -1
- package/dist/commands/frontend.command.d.ts +0 -15
- package/dist/commands/frontend.command.js +38 -94
- package/dist/index.d.ts +0 -15
- package/package.json +14 -14
package/configs/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"format": "virmator format",
|
|
10
10
|
"preview": "virmator frontend preview",
|
|
11
11
|
"publish": "virmator publish \"npm run compile && npm run test:all\"",
|
|
12
|
-
"start": "
|
|
12
|
+
"start": "virmator frontend",
|
|
13
13
|
"test": "virmator test",
|
|
14
14
|
"test:all": "concurrently --colors --kill-others-on-fail -c auto --names types,tests,spelling,format,docs,deps \"npm run test:types\" \"npm run test:coverage\" \"npm run test:spelling\" \"npm run test:format\" \"npm run test:docs\" \"npm run test:deps\"",
|
|
15
15
|
"test:coverage": "npm run test coverage",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* /index.html 200
|
|
@@ -68,24 +68,29 @@ async function getVersionsToUpgradeTo({ repoDir, packageDir, npmDeps: neededNpmD
|
|
|
68
68
|
...virmatorPackageJson.dependencies,
|
|
69
69
|
};
|
|
70
70
|
return neededNpmDeps.map((npmDep) => {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
try {
|
|
72
|
+
const currentRepoVersion = cleanDepVersion(currentRepoDepVersions[npmDep.name]);
|
|
73
|
+
const virmatorDepVersion = packageDepVersions[npmDep.name];
|
|
74
|
+
const cleanVirmatorDepVersion = cleanDepVersion(virmatorDepVersion);
|
|
75
|
+
if (!cleanVirmatorDepVersion || !virmatorDepVersion) {
|
|
76
|
+
throw new Error(`No npm dep version listed for "${npmDep.name}" in ${packageBinName}'s dependencies.`);
|
|
77
|
+
}
|
|
78
|
+
if (currentRepoVersion !== '*' &&
|
|
79
|
+
(!currentRepoVersion ||
|
|
80
|
+
semver.gt(cleanVirmatorDepVersion, currentRepoVersion) ||
|
|
81
|
+
(virmatorDepVersion.match(/^\d/) &&
|
|
82
|
+
cleanVirmatorDepVersion !== currentRepoVersion))) {
|
|
83
|
+
return {
|
|
84
|
+
...npmDep,
|
|
85
|
+
cleanVersion: cleanVirmatorDepVersion,
|
|
86
|
+
exactVersion: virmatorDepVersion,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
return undefined;
|
|
91
|
+
}
|
|
76
92
|
}
|
|
77
|
-
|
|
78
|
-
(!currentRepoVersion ||
|
|
79
|
-
semver.gt(cleanVirmatorDepVersion, currentRepoVersion) ||
|
|
80
|
-
(virmatorDepVersion.match(/^\d/) &&
|
|
81
|
-
cleanVirmatorDepVersion !== currentRepoVersion))) {
|
|
82
|
-
return {
|
|
83
|
-
...npmDep,
|
|
84
|
-
cleanVersion: cleanVirmatorDepVersion,
|
|
85
|
-
exactVersion: virmatorDepVersion,
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
93
|
+
catch (error) {
|
|
89
94
|
return undefined;
|
|
90
95
|
}
|
|
91
96
|
});
|
|
@@ -145,7 +145,6 @@ exports.depsCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
145
145
|
await (await Promise.resolve().then(() => __importStar(require('npm-check-updates')))).run({
|
|
146
146
|
...config,
|
|
147
147
|
cwd: repoDir,
|
|
148
|
-
json: false,
|
|
149
148
|
workspaces: !!repoPackageJson.workspaces,
|
|
150
149
|
format: [],
|
|
151
150
|
}, {
|
|
@@ -14,9 +14,6 @@ export declare const frontendCommandDefinition: {
|
|
|
14
14
|
npmDeps: readonly [{
|
|
15
15
|
readonly name: "@augment-vir/node-js";
|
|
16
16
|
readonly type: NpmDepTypeEnum.Dev;
|
|
17
|
-
}, {
|
|
18
|
-
readonly name: "esbuild";
|
|
19
|
-
readonly type: NpmDepTypeEnum.Dev;
|
|
20
17
|
}, {
|
|
21
18
|
readonly name: "typescript";
|
|
22
19
|
readonly type: NpmDepTypeEnum.Dev;
|
|
@@ -44,9 +41,6 @@ export declare const frontendCommandDefinition: {
|
|
|
44
41
|
npmDeps: readonly [{
|
|
45
42
|
readonly name: "@augment-vir/node-js";
|
|
46
43
|
readonly type: NpmDepTypeEnum.Dev;
|
|
47
|
-
}, {
|
|
48
|
-
readonly name: "esbuild";
|
|
49
|
-
readonly type: NpmDepTypeEnum.Dev;
|
|
50
44
|
}, {
|
|
51
45
|
readonly name: "typescript";
|
|
52
46
|
readonly type: NpmDepTypeEnum.Dev;
|
|
@@ -74,9 +68,6 @@ export declare const frontendCommandDefinition: {
|
|
|
74
68
|
npmDeps: readonly [{
|
|
75
69
|
readonly name: "@augment-vir/node-js";
|
|
76
70
|
readonly type: NpmDepTypeEnum.Dev;
|
|
77
|
-
}, {
|
|
78
|
-
readonly name: "esbuild";
|
|
79
|
-
readonly type: NpmDepTypeEnum.Dev;
|
|
80
71
|
}, {
|
|
81
72
|
readonly name: "typescript";
|
|
82
73
|
readonly type: NpmDepTypeEnum.Dev;
|
|
@@ -103,9 +94,6 @@ export declare const frontendCommandDefinition: {
|
|
|
103
94
|
npmDeps: readonly [{
|
|
104
95
|
readonly name: "@augment-vir/node-js";
|
|
105
96
|
readonly type: NpmDepTypeEnum.Dev;
|
|
106
|
-
}, {
|
|
107
|
-
readonly name: "esbuild";
|
|
108
|
-
readonly type: NpmDepTypeEnum.Dev;
|
|
109
97
|
}, {
|
|
110
98
|
readonly name: "typescript";
|
|
111
99
|
readonly type: NpmDepTypeEnum.Dev;
|
|
@@ -132,9 +120,6 @@ export declare const frontendCommandDefinition: {
|
|
|
132
120
|
npmDeps: readonly [{
|
|
133
121
|
readonly name: "@augment-vir/node-js";
|
|
134
122
|
readonly type: NpmDepTypeEnum.Dev;
|
|
135
|
-
}, {
|
|
136
|
-
readonly name: "esbuild";
|
|
137
|
-
readonly type: NpmDepTypeEnum.Dev;
|
|
138
123
|
}, {
|
|
139
124
|
readonly name: "typescript";
|
|
140
125
|
readonly type: NpmDepTypeEnum.Dev;
|
|
@@ -1,32 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.frontendCommandDefinition = void 0;
|
|
27
4
|
const common_1 = require("@augment-vir/common");
|
|
28
|
-
const node_js_1 = require("@augment-vir/node-js");
|
|
29
|
-
const promises_1 = require("fs/promises");
|
|
30
5
|
const path_1 = require("path");
|
|
31
6
|
const define_command_1 = require("../api/command/define-command");
|
|
32
7
|
const define_command_inputs_1 = require("../api/command/define-command-inputs");
|
|
@@ -46,7 +21,6 @@ exports.frontendCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
46
21
|
},
|
|
47
22
|
npmDeps: [
|
|
48
23
|
{ name: '@augment-vir/node-js', type: define_command_inputs_1.NpmDepTypeEnum.Dev },
|
|
49
|
-
{ name: 'esbuild', type: define_command_inputs_1.NpmDepTypeEnum.Dev },
|
|
50
24
|
{ name: 'typescript', type: define_command_inputs_1.NpmDepTypeEnum.Dev },
|
|
51
25
|
{ name: 'vite-tsconfig-paths', type: define_command_inputs_1.NpmDepTypeEnum.Dev },
|
|
52
26
|
{ name: 'vite', type: define_command_inputs_1.NpmDepTypeEnum.Dev },
|
|
@@ -67,74 +41,44 @@ exports.frontendCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
67
41
|
configFileDefinition: inputs.configFiles.vite,
|
|
68
42
|
packageDir: package_paths_1.virmatorPackageDir,
|
|
69
43
|
});
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
command: 'vite',
|
|
97
|
-
packageDirPath: inputs.packageDir,
|
|
98
|
-
});
|
|
99
|
-
const removeCommand = needToBuild
|
|
100
|
-
? `node -e "require('fs').rmSync('node_modules/.vite', {recursive: true, force: true})"`
|
|
101
|
-
: '';
|
|
102
|
-
const mainCommand = [
|
|
103
|
-
removeCommand,
|
|
44
|
+
const needToBuild = !!inputs.inputSubCommands.length;
|
|
45
|
+
const useDefaultConfigArgs = !inputs.filteredInputArgs.includes('--config');
|
|
46
|
+
const configString = useDefaultConfigArgs ? `--config ${viteConfigPath}` : '';
|
|
47
|
+
const viteBinPath = await (0, package_paths_1.getNpmBinPath)({
|
|
48
|
+
repoDir: inputs.repoDir,
|
|
49
|
+
command: 'vite',
|
|
50
|
+
packageDirPath: inputs.packageDir,
|
|
51
|
+
});
|
|
52
|
+
const removeCommand = needToBuild
|
|
53
|
+
? `node -e "require('fs').rmSync('node_modules/.vite', {recursive: true, force: true})"`
|
|
54
|
+
: '';
|
|
55
|
+
const mainCommand = [
|
|
56
|
+
removeCommand,
|
|
57
|
+
viteBinPath,
|
|
58
|
+
]
|
|
59
|
+
.filter(common_1.isTruthy)
|
|
60
|
+
.join(' && ');
|
|
61
|
+
const subCommandArgs = needToBuild
|
|
62
|
+
? [
|
|
63
|
+
'build',
|
|
64
|
+
...inputs.filteredInputArgs,
|
|
65
|
+
]
|
|
66
|
+
: inputs.filteredInputArgs;
|
|
67
|
+
const previewCommandArgs = inputs.inputSubCommands.includes(inputs.subCommands.preview)
|
|
68
|
+
? [
|
|
69
|
+
'&&',
|
|
104
70
|
viteBinPath,
|
|
71
|
+
'preview',
|
|
72
|
+
...inputs.filteredInputArgs,
|
|
105
73
|
]
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
]
|
|
117
|
-
: inputs.filteredInputArgs;
|
|
118
|
-
const previewCommandArgs = inputs.inputSubCommands.includes(inputs.subCommands.preview)
|
|
119
|
-
? [
|
|
120
|
-
'&&',
|
|
121
|
-
viteBinPath,
|
|
122
|
-
'preview',
|
|
123
|
-
...inputs.filteredInputArgs,
|
|
124
|
-
]
|
|
125
|
-
: [];
|
|
126
|
-
return {
|
|
127
|
-
args: [
|
|
128
|
-
mainCommand,
|
|
129
|
-
'--force',
|
|
130
|
-
configString,
|
|
131
|
-
...subCommandArgs,
|
|
132
|
-
...previewCommandArgs,
|
|
133
|
-
],
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
finally {
|
|
137
|
-
process.stdout.write = oldWrite;
|
|
138
|
-
await (0, promises_1.unlink)(tempFilePath);
|
|
139
|
-
}
|
|
74
|
+
: [];
|
|
75
|
+
return {
|
|
76
|
+
args: [
|
|
77
|
+
mainCommand,
|
|
78
|
+
'--force',
|
|
79
|
+
configString,
|
|
80
|
+
...subCommandArgs,
|
|
81
|
+
...previewCommandArgs,
|
|
82
|
+
],
|
|
83
|
+
};
|
|
140
84
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -565,9 +565,6 @@ export declare const virmator: Readonly<{
|
|
|
565
565
|
npmDeps: readonly [{
|
|
566
566
|
readonly name: "@augment-vir/node-js";
|
|
567
567
|
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
568
|
-
}, {
|
|
569
|
-
readonly name: "esbuild";
|
|
570
|
-
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
571
568
|
}, {
|
|
572
569
|
readonly name: "typescript";
|
|
573
570
|
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
@@ -595,9 +592,6 @@ export declare const virmator: Readonly<{
|
|
|
595
592
|
npmDeps: readonly [{
|
|
596
593
|
readonly name: "@augment-vir/node-js";
|
|
597
594
|
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
598
|
-
}, {
|
|
599
|
-
readonly name: "esbuild";
|
|
600
|
-
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
601
595
|
}, {
|
|
602
596
|
readonly name: "typescript";
|
|
603
597
|
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
@@ -625,9 +619,6 @@ export declare const virmator: Readonly<{
|
|
|
625
619
|
npmDeps: readonly [{
|
|
626
620
|
readonly name: "@augment-vir/node-js";
|
|
627
621
|
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
628
|
-
}, {
|
|
629
|
-
readonly name: "esbuild";
|
|
630
|
-
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
631
622
|
}, {
|
|
632
623
|
readonly name: "typescript";
|
|
633
624
|
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
@@ -654,9 +645,6 @@ export declare const virmator: Readonly<{
|
|
|
654
645
|
npmDeps: readonly [{
|
|
655
646
|
readonly name: "@augment-vir/node-js";
|
|
656
647
|
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
657
|
-
}, {
|
|
658
|
-
readonly name: "esbuild";
|
|
659
|
-
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
660
648
|
}, {
|
|
661
649
|
readonly name: "typescript";
|
|
662
650
|
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
@@ -683,9 +671,6 @@ export declare const virmator: Readonly<{
|
|
|
683
671
|
npmDeps: readonly [{
|
|
684
672
|
readonly name: "@augment-vir/node-js";
|
|
685
673
|
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
686
|
-
}, {
|
|
687
|
-
readonly name: "esbuild";
|
|
688
|
-
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
689
674
|
}, {
|
|
690
675
|
readonly name: "typescript";
|
|
691
676
|
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "virmator",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.4.0",
|
|
4
4
|
"description": "Handle common package configs, commands, and dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"test:types": "tsc --noEmit"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@augment-vir/common": "^23.3.
|
|
47
|
-
"@augment-vir/node-js": "^23.3.
|
|
46
|
+
"@augment-vir/common": "^23.3.4",
|
|
47
|
+
"@augment-vir/node-js": "^23.3.4",
|
|
48
48
|
"ansi-colors": "^4.1.3",
|
|
49
49
|
"concurrently": "^8.2.2",
|
|
50
50
|
"glob": "^8.1.0",
|
|
51
51
|
"glob-promise": "^6.0.5",
|
|
52
|
-
"mono-vir": "^0.
|
|
52
|
+
"mono-vir": "^1.0.0",
|
|
53
53
|
"semver": "^7.6.0",
|
|
54
54
|
"simple-git": "^3.22.0",
|
|
55
55
|
"type-fest": "^4.10.2"
|
|
@@ -70,26 +70,26 @@
|
|
|
70
70
|
"@web/test-runner-playwright": "^0.11.0",
|
|
71
71
|
"@web/test-runner-visual-regression": "^0.9.0",
|
|
72
72
|
"chai": "^4.3.10",
|
|
73
|
-
"cspell": "^8.
|
|
74
|
-
"dependency-cruiser": "^16.2.
|
|
75
|
-
"element-vir": "^20.0.
|
|
76
|
-
"esbuild": "^0.20.
|
|
73
|
+
"cspell": "^8.4.0",
|
|
74
|
+
"dependency-cruiser": "^16.2.1",
|
|
75
|
+
"element-vir": "^20.0.9",
|
|
76
|
+
"esbuild": "^0.20.1",
|
|
77
77
|
"fs-extra": "^11.2.0",
|
|
78
|
-
"istanbul-smart-text-reporter": "^1.1.
|
|
79
|
-
"markdown-code-example-inserter": "^0.
|
|
78
|
+
"istanbul-smart-text-reporter": "^1.1.4",
|
|
79
|
+
"markdown-code-example-inserter": "^1.0.0",
|
|
80
80
|
"mocha": "^10.3.0",
|
|
81
81
|
"mocha-spec-reporter-with-file-names": "^0.0.3",
|
|
82
82
|
"npm-check-updates": "~16.12.3",
|
|
83
83
|
"prettier": "^3.2.5",
|
|
84
|
-
"prettier-plugin-interpolated-html-tags": "^1.0.
|
|
84
|
+
"prettier-plugin-interpolated-html-tags": "^1.0.5",
|
|
85
85
|
"prettier-plugin-jsdoc": "^1.3.0",
|
|
86
|
-
"prettier-plugin-multiline-arrays": "^3.0.
|
|
86
|
+
"prettier-plugin-multiline-arrays": "^3.0.4",
|
|
87
87
|
"prettier-plugin-organize-imports": "^3.2.4",
|
|
88
88
|
"prettier-plugin-packagejson": "^2.4.11",
|
|
89
89
|
"prettier-plugin-sort-json": "^3.1.0",
|
|
90
90
|
"prettier-plugin-toml": "^2.0.1",
|
|
91
|
-
"test-as-package": "^0.0
|
|
92
|
-
"test-established-expectations": "^0.
|
|
91
|
+
"test-as-package": "^1.0.0",
|
|
92
|
+
"test-established-expectations": "^1.0.0",
|
|
93
93
|
"ts-node": "^10.9.2",
|
|
94
94
|
"tsconfig-paths": "^4.2.0",
|
|
95
95
|
"typedoc": "^0.25.8",
|