virmator 9.0.0 → 9.0.2
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/base-configs/base-cspell.js +1 -0
- package/configs/.prettierignore +1 -0
- package/configs/gitignore.txt +1 -0
- package/configs/npmignore.txt +1 -0
- package/configs/package.json +2 -1
- package/dist/augments/typescript-config-file.js +5 -2
- package/dist/commands/deps.command.js +13 -4
- package/package.json +4 -3
package/configs/.prettierignore
CHANGED
package/configs/gitignore.txt
CHANGED
package/configs/npmignore.txt
CHANGED
package/configs/package.json
CHANGED
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
"publish": "virmator publish \"npm run compile && npm run test:all\"",
|
|
12
12
|
"start": "npm install && virmator frontend",
|
|
13
13
|
"test": "virmator test",
|
|
14
|
-
"test:all": "concurrently --colors --kill-others-on-fail -c auto --names types,tests,spelling,format,docs \"npm run test:types\" \"npm run test:coverage\" \"npm run test:spelling\" \"npm run test:format\" \"npm run test:docs\"",
|
|
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",
|
|
16
|
+
"test:deps": "virmator deps check",
|
|
16
17
|
"test:docs": "virmator docs check",
|
|
17
18
|
"test:format": "virmator format check",
|
|
18
19
|
"test:spelling": "virmator spellcheck",
|
|
@@ -24,8 +24,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.compileTs = exports.withTypescriptConfigFile = void 0;
|
|
27
|
-
const common_1 = require("@augment-vir/common");
|
|
28
27
|
const promises_1 = require("fs/promises");
|
|
28
|
+
const path_1 = require("path");
|
|
29
29
|
async function withTypescriptConfigFile(configPath, callback) {
|
|
30
30
|
const tempFilePath = createOutfilePath(configPath);
|
|
31
31
|
try {
|
|
@@ -42,7 +42,10 @@ async function withTypescriptConfigFile(configPath, callback) {
|
|
|
42
42
|
}
|
|
43
43
|
exports.withTypescriptConfigFile = withTypescriptConfigFile;
|
|
44
44
|
function createOutfilePath(inputFilePath) {
|
|
45
|
-
return (0,
|
|
45
|
+
return (0, path_1.join)((0, path_1.dirname)(inputFilePath), [
|
|
46
|
+
'generated-config',
|
|
47
|
+
(0, path_1.basename)(inputFilePath).replace(/\.ts$/, '.cjs'),
|
|
48
|
+
].join('-'));
|
|
46
49
|
}
|
|
47
50
|
async function compileTs({ inputPath, outputPath, }) {
|
|
48
51
|
const outfile = outputPath || createOutfilePath(inputPath);
|
|
@@ -28,6 +28,7 @@ const common_1 = require("@augment-vir/common");
|
|
|
28
28
|
const node_js_1 = require("@augment-vir/node-js");
|
|
29
29
|
const fs_1 = require("fs");
|
|
30
30
|
const promises_1 = require("fs/promises");
|
|
31
|
+
const mono_vir_1 = require("mono-vir");
|
|
31
32
|
const path_1 = require("path");
|
|
32
33
|
const define_command_1 = require("../api/command/define-command");
|
|
33
34
|
const define_command_inputs_1 = require("../api/command/define-command-inputs");
|
|
@@ -106,21 +107,29 @@ exports.depsCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
106
107
|
else if (inputSubCommands[0] === subCommands.check) {
|
|
107
108
|
const depCruiserConfigPath = (0, path_1.join)(repoDir, configFiles.depCruiserConfig.copyToPathRelativeToRepoDir);
|
|
108
109
|
const compiledConfigPath = await (0, typescript_config_file_1.compileTs)({ inputPath: depCruiserConfigPath });
|
|
109
|
-
const pathsToCheck = filteredInputArgs.length
|
|
110
|
-
? filteredInputArgs
|
|
111
|
-
: [(0, path_1.join)(repoDir, 'src')];
|
|
112
110
|
const depCruiseCommand = await (0, package_paths_1.getNpmBinPath)({
|
|
113
111
|
repoDir: repoDir,
|
|
114
112
|
command: 'depcruise',
|
|
115
113
|
packageDirPath: packageDir,
|
|
116
114
|
});
|
|
115
|
+
const npmWorkspaces = await (0, mono_vir_1.getNpmPackages)(repoDir);
|
|
116
|
+
const nonFlagInputs = filteredInputArgs.filter((arg) => !arg.startsWith('-'));
|
|
117
|
+
const serial = filteredInputArgs.some((arg) => arg === '--serial');
|
|
118
|
+
const pathsToCheck = nonFlagInputs.length ? nonFlagInputs : ['src'];
|
|
119
|
+
const monoVirCommands = npmWorkspaces.length && !nonFlagInputs.length
|
|
120
|
+
? [
|
|
121
|
+
'mono-vir',
|
|
122
|
+
serial ? 'for-each' : 'for-each-async',
|
|
123
|
+
]
|
|
124
|
+
: [];
|
|
117
125
|
return {
|
|
118
126
|
args: [
|
|
127
|
+
...monoVirCommands,
|
|
119
128
|
depCruiseCommand,
|
|
120
129
|
'--config',
|
|
121
130
|
compiledConfigPath,
|
|
122
131
|
...pathsToCheck,
|
|
123
|
-
],
|
|
132
|
+
].filter(common_1.isTruthy),
|
|
124
133
|
async postExecute() {
|
|
125
134
|
await (0, promises_1.unlink)(compiledConfigPath);
|
|
126
135
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "virmator",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.2",
|
|
4
4
|
"description": "Handle common package configs, commands, and dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"concurrently": "^8.2.1",
|
|
50
50
|
"glob": "^8.1.0",
|
|
51
51
|
"glob-promise": "^6.0.5",
|
|
52
|
+
"mono-vir": "^0.1.6",
|
|
52
53
|
"semver": "^7.5.4",
|
|
53
54
|
"simple-git": "^3.20.0",
|
|
54
55
|
"type-fest": "^4.4.0"
|
|
@@ -71,7 +72,7 @@
|
|
|
71
72
|
"chai": "^4.3.10",
|
|
72
73
|
"cspell": "^7.3.7",
|
|
73
74
|
"dependency-cruiser": "^14.1.1",
|
|
74
|
-
"element-vir": "^16.4.
|
|
75
|
+
"element-vir": "^16.4.5",
|
|
75
76
|
"esbuild": "^0.19.4",
|
|
76
77
|
"fs-extra": "^11.1.1",
|
|
77
78
|
"istanbul-smart-text-reporter": "^1.1.2",
|
|
@@ -93,7 +94,7 @@
|
|
|
93
94
|
"tsconfig-paths": "^4.2.0",
|
|
94
95
|
"typedoc": "^0.25.2",
|
|
95
96
|
"typescript": "^5.2.2",
|
|
96
|
-
"virmator": "^
|
|
97
|
+
"virmator": "^9.0.1",
|
|
97
98
|
"vite": "^4.4.11",
|
|
98
99
|
"vite-tsconfig-paths": "^4.2.1"
|
|
99
100
|
},
|