virmator 12.0.1 → 12.0.3
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/README.md +1 -1
- package/base-configs/base-cspell.js +1 -0
- package/base-configs/base-web-test-runner.mjs +2 -3
- package/configs/configs/{mocha.config.js → mocha.config.cjs} +1 -1
- package/dist/api/command/command-configs.js +1 -2
- package/dist/api/command/command-executor.js +1 -2
- package/dist/api/command/command-mapping.js +1 -2
- package/dist/api/command/command-messages.js +1 -2
- package/dist/api/command/command-to-help-message.js +4 -4
- package/dist/api/command/define-command.js +1 -2
- package/dist/api/config/config-paths.js +1 -2
- package/dist/api/config/copy-config.js +3 -3
- package/dist/api/create-virmator.js +1 -2
- package/dist/api/run-command/check-npm-deps.js +4 -5
- package/dist/api/run-command/extract-arguments.js +2 -3
- package/dist/api/run-command/run-command-executor.js +2 -3
- package/dist/api/run-command/run-extended-virmator.js +1 -2
- package/dist/api/run-command/run-shell-command.js +1 -2
- package/dist/augments/array.js +1 -2
- package/dist/augments/console.js +2 -3
- package/dist/augments/fs.js +5 -5
- package/dist/augments/git.js +1 -2
- package/dist/augments/json.js +1 -2
- package/dist/augments/npm.js +3 -4
- package/dist/augments/object.js +3 -4
- package/dist/augments/path.js +1 -2
- package/dist/augments/prettier.js +1 -2
- package/dist/augments/regexp.js +1 -2
- package/dist/augments/string.js +1 -2
- package/dist/augments/typescript-config-file.js +2 -3
- package/dist/commands/docs.command.js +1 -1
- package/dist/commands/extra-configs/combine-json-config.js +1 -2
- package/dist/commands/extra-configs/combine-text-config.js +1 -2
- package/dist/commands/extra-configs/create-default-package-json.js +1 -2
- package/dist/commands/test.command.js +4 -4
- package/dist/compiled-base-configs/base-dep-cruiser.config.js +1 -2
- package/dist/compiled-base-configs/base-vite.js +5 -5
- package/dist/compiled-base-configs/vite-always-reload-plugin.js +1 -2
- package/dist/file-paths/package-paths.js +2 -2
- package/dist/index.d.ts +2 -15
- package/{mocha.config.js → mocha.config.cjs} +1 -1
- package/package.json +19 -19
- /package/base-configs/{base-mocharc.js → base-mocharc.cjs} +0 -0
package/README.md
CHANGED
|
@@ -172,7 +172,7 @@ Spellcheck code with cspell. By default this spellchecks every file in the entir
|
|
|
172
172
|
|
|
173
173
|
## test
|
|
174
174
|
|
|
175
|
-
Test all .test.ts files with Mocha and Chai. By default this command tests all ".test.ts" files in the current directory (recursively) that are not ".type.test.ts" files. To override this behavior, override the "spec" property in .mocharc.
|
|
175
|
+
Test all .test.ts files with Mocha and Chai. By default this command tests all ".test.ts" files in the current directory (recursively) that are not ".type.test.ts" files. To override this behavior, override the "spec" property in .mocharc.cjs.
|
|
176
176
|
|
|
177
177
|
This command is meant to run Node.js tests. For running web-based testing, see the test-web command.
|
|
178
178
|
|
|
@@ -7,7 +7,6 @@ import {join, relative} from 'path';
|
|
|
7
7
|
import testFiles from './test-files-glob.js';
|
|
8
8
|
|
|
9
9
|
const oneMinuteMs = 60_000;
|
|
10
|
-
const minutesTwenty = 20 * oneMinuteMs;
|
|
11
10
|
|
|
12
11
|
function getTestFileName(args, repoDir, type) {
|
|
13
12
|
const screenshotDir = relative(repoDir, args.testFile.replace(/\.[jt]sx?$/, ''));
|
|
@@ -89,7 +88,7 @@ export function getWebTestRunnerConfigWithCoveragePercent({
|
|
|
89
88
|
summaryReporter(),
|
|
90
89
|
defaultReporter({reportTestResults: true, reportTestProgress: false}),
|
|
91
90
|
],
|
|
92
|
-
browserStartTimeout:
|
|
91
|
+
browserStartTimeout: process.env.CI ? 10 * oneMinuteMs : oneMinuteMs,
|
|
93
92
|
/** Reduce concurrency in CI environments to improve stability. */
|
|
94
93
|
concurrentBrowsers: process.env.ci ? 1 : 3,
|
|
95
94
|
/** Reduce concurrency in CI environments to improve stability. */
|
|
@@ -104,7 +103,7 @@ export function getWebTestRunnerConfigWithCoveragePercent({
|
|
|
104
103
|
],
|
|
105
104
|
testFramework: {
|
|
106
105
|
config: {
|
|
107
|
-
timeout:
|
|
106
|
+
timeout: process.env.CI ? 20 * oneMinuteMs : 5 * oneMinuteMs,
|
|
108
107
|
},
|
|
109
108
|
},
|
|
110
109
|
coverageConfig: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.extractAllConfigs =
|
|
3
|
+
exports.extractAllConfigs = extractAllConfigs;
|
|
4
4
|
const common_1 = require("@augment-vir/common");
|
|
5
5
|
function extractAllConfigs(commandMapping) {
|
|
6
6
|
const configFiles = (0, common_1.getObjectTypedValues)(commandMapping)
|
|
@@ -8,4 +8,3 @@ function extractAllConfigs(commandMapping) {
|
|
|
8
8
|
.flat();
|
|
9
9
|
return configFiles;
|
|
10
10
|
}
|
|
11
|
-
exports.extractAllConfigs = extractAllConfigs;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isCompletedExecutor =
|
|
3
|
+
exports.isCompletedExecutor = isCompletedExecutor;
|
|
4
4
|
function isCompletedExecutor(executorOutput) {
|
|
5
5
|
return 'success' in executorOutput;
|
|
6
6
|
}
|
|
7
|
-
exports.isCompletedExecutor = isCompletedExecutor;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.commandsToMapping =
|
|
3
|
+
exports.commandsToMapping = commandsToMapping;
|
|
4
4
|
function commandsToMapping(commands) {
|
|
5
5
|
return commands.reduce((mapping, currentCommandDefinition) => {
|
|
6
6
|
mapping[currentCommandDefinition.commandName] = currentCommandDefinition;
|
|
7
7
|
return mapping;
|
|
8
8
|
}, {});
|
|
9
9
|
}
|
|
10
|
-
exports.commandsToMapping = commandsToMapping;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCommandResultMessage =
|
|
3
|
+
exports.getCommandResultMessage = getCommandResultMessage;
|
|
4
4
|
const node_js_1 = require("@augment-vir/node-js");
|
|
5
5
|
function getCommandResultMessage(commandName, success) {
|
|
6
6
|
const specificColor = success ? node_js_1.logColors.success : node_js_1.logColors.error;
|
|
7
7
|
const specificPhrase = success ? 'succeeded' : 'failed';
|
|
8
8
|
return `${node_js_1.logColors.bold}${specificColor}${commandName} ${specificPhrase}.${node_js_1.logColors.reset}`;
|
|
9
9
|
}
|
|
10
|
-
exports.getCommandResultMessage = getCommandResultMessage;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.HelpMessageSyntax = void 0;
|
|
4
|
+
exports.generateHelpMessage = generateHelpMessage;
|
|
5
|
+
exports.flagToHelpString = flagToHelpString;
|
|
6
|
+
exports.commandToHelpString = commandToHelpString;
|
|
4
7
|
const common_1 = require("@augment-vir/common");
|
|
5
8
|
const node_js_1 = require("@augment-vir/node-js");
|
|
6
9
|
var HelpMessageSyntax;
|
|
@@ -24,7 +27,6 @@ function generateHelpMessage(packageBinName, commandDefinitions, syntax, cliWrap
|
|
|
24
27
|
? wrapLines(helpMessage, cliWrapIfMoreThanThisManyColumns)
|
|
25
28
|
: helpMessage;
|
|
26
29
|
}
|
|
27
|
-
exports.generateHelpMessage = generateHelpMessage;
|
|
28
30
|
const formatting = ((input) => input)({
|
|
29
31
|
h1: {
|
|
30
32
|
[HelpMessageSyntax.Cli]: `${node_js_1.logColors.info}`,
|
|
@@ -77,7 +79,6 @@ function flagToHelpString(flagName, description, syntax) {
|
|
|
77
79
|
const format = (key) => formatWithSyntax(key, syntax);
|
|
78
80
|
return `${indent(1, syntax)}${format('h2')}${code(flagName, false, '', syntax)}${format('reset')}${format('colon')}\n${indent(2, syntax)}${description.trim()}`;
|
|
79
81
|
}
|
|
80
|
-
exports.flagToHelpString = flagToHelpString;
|
|
81
82
|
function commandToHelpString(packageBinName, commandDefinition, syntax) {
|
|
82
83
|
const commandDescription = commandDefinition.createDescription({
|
|
83
84
|
packageBinName,
|
|
@@ -91,7 +92,6 @@ function commandToHelpString(packageBinName, commandDefinition, syntax) {
|
|
|
91
92
|
const subCommandDescriptions = subCommandDescriptionsToMessage(commandDefinition.subCommandDescriptions, syntax);
|
|
92
93
|
return `${title}\n${description}\n${subCommandDescriptions}\n`;
|
|
93
94
|
}
|
|
94
|
-
exports.commandToHelpString = commandToHelpString;
|
|
95
95
|
function subCommandDescriptionsToMessage(subCommandDescriptions, syntax) {
|
|
96
96
|
return (0, common_1.getObjectTypedKeys)(subCommandDescriptions).reduce((accum, currentKey, index) => {
|
|
97
97
|
const keyDescription = subCommandDescriptions[currentKey];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defineCommand =
|
|
3
|
+
exports.defineCommand = defineCommand;
|
|
4
4
|
const common_1 = require("@augment-vir/common");
|
|
5
5
|
function defineCommand(defineCommandInputs, createDescription, inputExecutor) {
|
|
6
6
|
const allAvailableSubCommands = (0, common_1.getObjectTypedKeys)(defineCommandInputs.subCommandDescriptions);
|
|
@@ -39,4 +39,3 @@ function defineCommand(defineCommandInputs, createDescription, inputExecutor) {
|
|
|
39
39
|
extend,
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
exports.defineCommand = defineCommand;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCopyToPath =
|
|
3
|
+
exports.getCopyToPath = getCopyToPath;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
function getCopyToPath({ repoDir, configFileDefinition }) {
|
|
6
6
|
return (0, path_1.join)(repoDir, configFileDefinition.copyToPathRelativeToRepoDir);
|
|
7
7
|
}
|
|
8
|
-
exports.getCopyToPath = getCopyToPath;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.CopyConfigOperation = void 0;
|
|
4
|
+
exports.copyConfig = copyConfig;
|
|
5
|
+
exports.copyAllConfigFiles = copyAllConfigFiles;
|
|
4
6
|
const common_1 = require("@augment-vir/common");
|
|
5
7
|
const node_js_1 = require("@augment-vir/node-js");
|
|
6
8
|
const fs_1 = require("fs");
|
|
@@ -55,7 +57,6 @@ async function copyConfig(inputs) {
|
|
|
55
57
|
shouldWrite,
|
|
56
58
|
};
|
|
57
59
|
}
|
|
58
|
-
exports.copyConfig = copyConfig;
|
|
59
60
|
const successfulOperation = {
|
|
60
61
|
[CopyConfigOperation.Init]: 'copied',
|
|
61
62
|
[CopyConfigOperation.Overwrite]: 'overwrote',
|
|
@@ -95,4 +96,3 @@ async function copyAllConfigFiles(inputs) {
|
|
|
95
96
|
});
|
|
96
97
|
return !errors.length;
|
|
97
98
|
}
|
|
98
|
-
exports.copyAllConfigFiles = copyAllConfigFiles;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createVirmator =
|
|
3
|
+
exports.createVirmator = createVirmator;
|
|
4
4
|
const common_1 = require("@augment-vir/common");
|
|
5
5
|
const command_configs_1 = require("./command/command-configs");
|
|
6
6
|
const command_mapping_1 = require("./command/command-mapping");
|
|
@@ -65,4 +65,3 @@ function createVirmator(inputs) {
|
|
|
65
65
|
run,
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
-
exports.createVirmator = createVirmator;
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.updateDepsAsNeeded =
|
|
26
|
+
exports.updateDepsAsNeeded = updateDepsAsNeeded;
|
|
27
27
|
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");
|
|
@@ -49,14 +49,13 @@ async function updateDepsAsNeeded(inputs) {
|
|
|
49
49
|
throw new Error(`Failed to update deps: ${(0, common_1.extractErrorMessage)(error)}`);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
exports.updateDepsAsNeeded = updateDepsAsNeeded;
|
|
53
52
|
function cleanDepVersion(input) {
|
|
54
53
|
if (input === '*') {
|
|
55
54
|
return '*';
|
|
56
55
|
}
|
|
57
|
-
return input ? semver.clean(input) ?? semver.minVersion(input)?.raw ?? undefined : undefined;
|
|
56
|
+
return input ? (semver.clean(input) ?? semver.minVersion(input)?.raw ?? undefined) : undefined;
|
|
58
57
|
}
|
|
59
|
-
async function getVersionsToUpgradeTo({ repoDir, packageDir, npmDeps
|
|
58
|
+
async function getVersionsToUpgradeTo({ repoDir, packageDir, npmDeps, packageBinName, }) {
|
|
60
59
|
const packageName = (await (0, node_js_1.runShellCommand)(`cut -d "=" -f 2 <<< $(npm run env | grep "npm_package_name")`, {
|
|
61
60
|
cwd: repoDir,
|
|
62
61
|
rejectOnError: true,
|
|
@@ -67,7 +66,7 @@ async function getVersionsToUpgradeTo({ repoDir, packageDir, npmDeps: neededNpmD
|
|
|
67
66
|
...virmatorPackageJson.devDependencies,
|
|
68
67
|
...virmatorPackageJson.dependencies,
|
|
69
68
|
};
|
|
70
|
-
return
|
|
69
|
+
return npmDeps.map((npmDep) => {
|
|
71
70
|
try {
|
|
72
71
|
const currentRepoVersion = cleanDepVersion(currentRepoDepVersions[npmDep.name]);
|
|
73
72
|
const virmatorDepVersion = packageDepVersions[npmDep.name];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getRelevantArgs = getRelevantArgs;
|
|
4
|
+
exports.extractSubCommands = extractSubCommands;
|
|
4
5
|
const path_1 = require("path");
|
|
5
6
|
const array_1 = require("../../augments/array");
|
|
6
7
|
function getRelevantArgs(allArgs, binName) {
|
|
@@ -15,7 +16,6 @@ function getRelevantArgs(allArgs, binName) {
|
|
|
15
16
|
const sliceIndexStart = binWasFound ? binIndex : firstJsOrTsWasFound ? firstJsOrTsIndex : 0;
|
|
16
17
|
return allArgs.slice(sliceIndexStart + 1);
|
|
17
18
|
}
|
|
18
|
-
exports.getRelevantArgs = getRelevantArgs;
|
|
19
19
|
function extractSubCommands(allArgs, availableSubCommands) {
|
|
20
20
|
let stillInSubCommands = true;
|
|
21
21
|
return allArgs.reduce((accum, currentArg) => {
|
|
@@ -34,4 +34,3 @@ function extractSubCommands(allArgs, availableSubCommands) {
|
|
|
34
34
|
return accum;
|
|
35
35
|
}, { subCommands: [], filteredArgs: [] });
|
|
36
36
|
}
|
|
37
|
-
exports.extractSubCommands = extractSubCommands;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.createCommandString = createCommandString;
|
|
4
|
+
exports.runCommandExecutor = runCommandExecutor;
|
|
4
5
|
const common_1 = require("@augment-vir/common");
|
|
5
6
|
const node_js_1 = require("@augment-vir/node-js");
|
|
6
7
|
const path_1 = require("path");
|
|
@@ -22,7 +23,6 @@ function createCommandString(executorOutput) {
|
|
|
22
23
|
const commandString = `${args.filter(common_1.isTruthy).join(' ')}`;
|
|
23
24
|
return commandString;
|
|
24
25
|
}
|
|
25
|
-
exports.createCommandString = createCommandString;
|
|
26
26
|
async function runCommandExecutor(commandDefinition, commandInputs) {
|
|
27
27
|
console.info(`${node_js_1.logColors.info}running ${commandDefinition.commandName}...${node_js_1.logColors.reset}`);
|
|
28
28
|
await (0, copy_config_1.copyAllConfigFiles)({
|
|
@@ -48,4 +48,3 @@ async function runCommandExecutor(commandDefinition, commandInputs) {
|
|
|
48
48
|
return commandResult.exitCode === 0;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
exports.runCommandExecutor = runCommandExecutor;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.runExtendedVirmator =
|
|
3
|
+
exports.runExtendedVirmator = runExtendedVirmator;
|
|
4
4
|
const common_1 = require("@augment-vir/common");
|
|
5
5
|
const command_logging_1 = require("../command/command-logging");
|
|
6
6
|
const command_messages_1 = require("../command/command-messages");
|
|
@@ -51,4 +51,3 @@ async function runExtendedVirmator({ allArgs, allConfigs, commandMapping, packag
|
|
|
51
51
|
throw new Error(resultMessage);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
exports.runExtendedVirmator = runExtendedVirmator;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.runVirmatorShellCommand =
|
|
3
|
+
exports.runVirmatorShellCommand = runVirmatorShellCommand;
|
|
4
4
|
const node_js_1 = require("@augment-vir/node-js");
|
|
5
5
|
const command_logging_1 = require("../command/command-logging");
|
|
6
6
|
function logWrapper(handleLog, logTransformer) {
|
|
@@ -19,4 +19,3 @@ async function runVirmatorShellCommand(command, { repoDir: cwd, logging, logTran
|
|
|
19
19
|
});
|
|
20
20
|
return shellResults;
|
|
21
21
|
}
|
|
22
|
-
exports.runVirmatorShellCommand = runVirmatorShellCommand;
|
package/dist/augments/array.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isInTypedArray =
|
|
3
|
+
exports.isInTypedArray = isInTypedArray;
|
|
4
4
|
function isInTypedArray(input, array) {
|
|
5
5
|
return array.includes(input);
|
|
6
6
|
}
|
|
7
|
-
exports.isInTypedArray = isInTypedArray;
|
package/dist/augments/console.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.askQuestion = askQuestion;
|
|
4
|
+
exports.askQuestionUntilConditionMet = askQuestionUntilConditionMet;
|
|
4
5
|
const readline_1 = require("readline");
|
|
5
6
|
async function askQuestion(questionToAsk, timeoutMs = 60_000) {
|
|
6
7
|
const cliInterface = (0, readline_1.createInterface)({
|
|
@@ -23,7 +24,6 @@ async function askQuestion(questionToAsk, timeoutMs = 60_000) {
|
|
|
23
24
|
});
|
|
24
25
|
});
|
|
25
26
|
}
|
|
26
|
-
exports.askQuestion = askQuestion;
|
|
27
27
|
async function askQuestionUntilConditionMet({ questionToAsk, conditionCallback, invalidInputMessage, tryCountMax = 5, timeoutMs = 60_000, }) {
|
|
28
28
|
let wasConditionMet = false;
|
|
29
29
|
let retryCount = 0;
|
|
@@ -41,4 +41,3 @@ async function askQuestionUntilConditionMet({ questionToAsk, conditionCallback,
|
|
|
41
41
|
}
|
|
42
42
|
return response;
|
|
43
43
|
}
|
|
44
|
-
exports.askQuestionUntilConditionMet = askQuestionUntilConditionMet;
|
package/dist/augments/fs.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.systemRootPath = void 0;
|
|
4
|
+
exports.removeDirectory = removeDirectory;
|
|
5
|
+
exports.readAllDirContents = readAllDirContents;
|
|
6
|
+
exports.writeFiles = writeFiles;
|
|
7
|
+
exports.recursivelyUpwardsSearchForDir = recursivelyUpwardsSearchForDir;
|
|
4
8
|
const common_1 = require("@augment-vir/common");
|
|
5
9
|
const fs_1 = require("fs");
|
|
6
10
|
const fs_extra_1 = require("fs-extra");
|
|
@@ -18,7 +22,6 @@ async function removeDirectory(dirPath) {
|
|
|
18
22
|
await (0, fs_extra_1.remove)(dirPath);
|
|
19
23
|
}
|
|
20
24
|
}
|
|
21
|
-
exports.removeDirectory = removeDirectory;
|
|
22
25
|
exports.systemRootPath = (0, path_1.parse)(process.cwd()).root;
|
|
23
26
|
async function readAllDirContents({ dir, recursive = false, }) {
|
|
24
27
|
const fileNames = await (0, promises_1.readdir)(dir);
|
|
@@ -38,7 +41,6 @@ async function readAllDirContents({ dir, recursive = false, }) {
|
|
|
38
41
|
}, {});
|
|
39
42
|
return mappedFileContents;
|
|
40
43
|
}
|
|
41
|
-
exports.readAllDirContents = readAllDirContents;
|
|
42
44
|
async function writeFiles(dir, allFileContents) {
|
|
43
45
|
await (0, common_1.awaitedForEach)(Object.keys(allFileContents), async (fileOrDirName) => {
|
|
44
46
|
const value = allFileContents[fileOrDirName];
|
|
@@ -54,7 +56,6 @@ async function writeFiles(dir, allFileContents) {
|
|
|
54
56
|
}
|
|
55
57
|
});
|
|
56
58
|
}
|
|
57
|
-
exports.writeFiles = writeFiles;
|
|
58
59
|
async function recursivelyUpwardsSearchForDir(startDirPath, check) {
|
|
59
60
|
if (!(0, fs_1.existsSync)(startDirPath) || !startDirPath) {
|
|
60
61
|
throw new Error(`Could not search in "${startDirPath}": it does not exist.`);
|
|
@@ -68,4 +69,3 @@ async function recursivelyUpwardsSearchForDir(startDirPath, check) {
|
|
|
68
69
|
}
|
|
69
70
|
return recursivelyUpwardsSearchForDir(parent, check);
|
|
70
71
|
}
|
|
71
|
-
exports.recursivelyUpwardsSearchForDir = recursivelyUpwardsSearchForDir;
|
package/dist/augments/git.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.doChangesExist =
|
|
3
|
+
exports.doChangesExist = doChangesExist;
|
|
4
4
|
const node_js_1 = require("@augment-vir/node-js");
|
|
5
5
|
async function doChangesExist(repoDirPath) {
|
|
6
6
|
const getChangesCommand = `git status --porcelain=v1 2>/dev/null`;
|
|
@@ -10,4 +10,3 @@ async function doChangesExist(repoDirPath) {
|
|
|
10
10
|
});
|
|
11
11
|
return !!getChangesOutput.stdout;
|
|
12
12
|
}
|
|
13
|
-
exports.doChangesExist = doChangesExist;
|
package/dist/augments/json.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.jsonParseOrUndefined =
|
|
3
|
+
exports.jsonParseOrUndefined = jsonParseOrUndefined;
|
|
4
4
|
function jsonParseOrUndefined(input) {
|
|
5
5
|
try {
|
|
6
6
|
return JSON.parse(input);
|
|
@@ -9,4 +9,3 @@ function jsonParseOrUndefined(input) {
|
|
|
9
9
|
return undefined;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
exports.jsonParseOrUndefined = jsonParseOrUndefined;
|
package/dist/augments/npm.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.findTopLevelPackageJsonFile = findTopLevelPackageJsonFile;
|
|
4
|
+
exports.readPackageJson = readPackageJson;
|
|
5
|
+
exports.readTopLevelPackageJson = readTopLevelPackageJson;
|
|
4
6
|
const common_1 = require("@augment-vir/common");
|
|
5
7
|
const fs_1 = require("fs");
|
|
6
8
|
const promises_1 = require("fs/promises");
|
|
@@ -22,7 +24,6 @@ function findTopLevelPackageJsonFile(startDir) {
|
|
|
22
24
|
return undefined;
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
|
-
exports.findTopLevelPackageJsonFile = findTopLevelPackageJsonFile;
|
|
26
27
|
async function readPackageJson(packageJsonPath) {
|
|
27
28
|
let parsed;
|
|
28
29
|
try {
|
|
@@ -39,7 +40,6 @@ async function readPackageJson(packageJsonPath) {
|
|
|
39
40
|
}
|
|
40
41
|
return parsed;
|
|
41
42
|
}
|
|
42
|
-
exports.readPackageJson = readPackageJson;
|
|
43
43
|
async function readTopLevelPackageJson(startDir) {
|
|
44
44
|
const topLevelPackageJsonPath = findTopLevelPackageJsonFile(startDir);
|
|
45
45
|
if (!topLevelPackageJsonPath) {
|
|
@@ -50,4 +50,3 @@ async function readTopLevelPackageJson(startDir) {
|
|
|
50
50
|
path: topLevelPackageJsonPath,
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
exports.readTopLevelPackageJson = readTopLevelPackageJson;
|
package/dist/augments/object.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.filterObject = filterObject;
|
|
4
|
+
exports.deeplyCombineObjects = deeplyCombineObjects;
|
|
5
|
+
exports.filterToDifferentValues = filterToDifferentValues;
|
|
4
6
|
const common_1 = require("@augment-vir/common");
|
|
5
7
|
function filterObject(fullObject, callback) {
|
|
6
8
|
return (0, common_1.getObjectTypedKeys)(fullObject).reduce((accum, key) => {
|
|
@@ -11,7 +13,6 @@ function filterObject(fullObject, callback) {
|
|
|
11
13
|
return accum;
|
|
12
14
|
}, {});
|
|
13
15
|
}
|
|
14
|
-
exports.filterObject = filterObject;
|
|
15
16
|
function deeplyCombineObjects(originalObject, overwriteObject) {
|
|
16
17
|
return (0, common_1.getObjectTypedKeys)(overwriteObject).reduce((accum, currentKey) => {
|
|
17
18
|
const currentNewValue = overwriteObject[currentKey];
|
|
@@ -25,7 +26,6 @@ function deeplyCombineObjects(originalObject, overwriteObject) {
|
|
|
25
26
|
return accum;
|
|
26
27
|
}, originalObject);
|
|
27
28
|
}
|
|
28
|
-
exports.deeplyCombineObjects = deeplyCombineObjects;
|
|
29
29
|
function filterToDifferentValues(baseObject, changedObject) {
|
|
30
30
|
return (0, common_1.getObjectTypedKeys)(baseObject).reduce((accum, key) => {
|
|
31
31
|
const beforeValue = baseObject[key];
|
|
@@ -42,4 +42,3 @@ function filterToDifferentValues(baseObject, changedObject) {
|
|
|
42
42
|
return accum;
|
|
43
43
|
}, {});
|
|
44
44
|
}
|
|
45
|
-
exports.filterToDifferentValues = filterToDifferentValues;
|
package/dist/augments/path.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getFirstPartOfPath =
|
|
3
|
+
exports.getFirstPartOfPath = getFirstPartOfPath;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
function getFirstPartOfPath(inputPath) {
|
|
6
6
|
const split = inputPath.split(path_1.sep);
|
|
@@ -10,4 +10,3 @@ function getFirstPartOfPath(inputPath) {
|
|
|
10
10
|
}
|
|
11
11
|
return firstPart;
|
|
12
12
|
}
|
|
13
|
-
exports.getFirstPartOfPath = getFirstPartOfPath;
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.formatCode =
|
|
26
|
+
exports.formatCode = formatCode;
|
|
27
27
|
const fs_1 = require("fs");
|
|
28
28
|
const path_1 = require("path");
|
|
29
29
|
async function formatCode(text, filePath) {
|
|
@@ -41,7 +41,6 @@ async function formatCode(text, filePath) {
|
|
|
41
41
|
return text;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
exports.formatCode = formatCode;
|
|
45
44
|
function findNearestConfig(dir) {
|
|
46
45
|
const currentDirConfig = (0, path_1.join)(dir, '.prettierrc.js');
|
|
47
46
|
if ((0, fs_1.existsSync)(currentDirConfig)) {
|
package/dist/augments/regexp.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sanitizeStringForRegExpCreation =
|
|
3
|
+
exports.sanitizeStringForRegExpCreation = sanitizeStringForRegExpCreation;
|
|
4
4
|
function sanitizeStringForRegExpCreation(inputString) {
|
|
5
5
|
return inputString.replace(/\//g, '\\/').replace(/(\(|\)|\[|\]|\.|\}|\{|\||\+)/g, '\\$1');
|
|
6
6
|
}
|
|
7
|
-
exports.sanitizeStringForRegExpCreation = sanitizeStringForRegExpCreation;
|
package/dist/augments/string.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ensureNonEmptyString =
|
|
3
|
+
exports.ensureNonEmptyString = ensureNonEmptyString;
|
|
4
4
|
function ensureNonEmptyString(inputString) {
|
|
5
5
|
if (!inputString) {
|
|
6
6
|
throw new Error(`Expected a non-empty string.`);
|
|
7
7
|
}
|
|
8
8
|
return inputString;
|
|
9
9
|
}
|
|
10
|
-
exports.ensureNonEmptyString = ensureNonEmptyString;
|
|
@@ -23,7 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
26
|
+
exports.withTypescriptConfigFile = withTypescriptConfigFile;
|
|
27
|
+
exports.compileTs = compileTs;
|
|
27
28
|
const promises_1 = require("fs/promises");
|
|
28
29
|
const path_1 = require("path");
|
|
29
30
|
async function withTypescriptConfigFile(configPath, callback) {
|
|
@@ -40,7 +41,6 @@ async function withTypescriptConfigFile(configPath, callback) {
|
|
|
40
41
|
catch (error) { }
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
|
-
exports.withTypescriptConfigFile = withTypescriptConfigFile;
|
|
44
44
|
function createOutfilePath(inputFilePath) {
|
|
45
45
|
return (0, path_1.join)((0, path_1.dirname)(inputFilePath), [
|
|
46
46
|
'generated-config',
|
|
@@ -60,4 +60,3 @@ async function compileTs({ inputPath, outputPath, }) {
|
|
|
60
60
|
});
|
|
61
61
|
return outfile;
|
|
62
62
|
}
|
|
63
|
-
exports.compileTs = compileTs;
|
|
@@ -139,7 +139,7 @@ async function runTypeDoc(options, packageBinName, typeDoc) {
|
|
|
139
139
|
return true;
|
|
140
140
|
}
|
|
141
141
|
else if (app.options.getValue('help')) {
|
|
142
|
-
console.info(app.options.getHelp
|
|
142
|
+
console.info(app.options.getHelp);
|
|
143
143
|
return true;
|
|
144
144
|
}
|
|
145
145
|
else if (app.options.getValue('showConfig')) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.combineJsonConfig =
|
|
3
|
+
exports.combineJsonConfig = combineJsonConfig;
|
|
4
4
|
const common_1 = require("@augment-vir/common");
|
|
5
5
|
const object_1 = require("../../augments/object");
|
|
6
6
|
const prettier_1 = require("../../augments/prettier");
|
|
@@ -16,7 +16,6 @@ async function combineJsonConfig(...[newConfigContents, existingConfigContents,]
|
|
|
16
16
|
}
|
|
17
17
|
return stringify((0, object_1.deeplyCombineObjects)(oldJson, newJson));
|
|
18
18
|
}
|
|
19
|
-
exports.combineJsonConfig = combineJsonConfig;
|
|
20
19
|
async function stringify(input) {
|
|
21
20
|
return await (0, prettier_1.formatCode)(JSON.stringify(input, null, 4), 'a.json');
|
|
22
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.combineTextConfig =
|
|
3
|
+
exports.combineTextConfig = combineTextConfig;
|
|
4
4
|
const common_1 = require("@augment-vir/common");
|
|
5
5
|
function splitContentsIntoArrayOfLines(input) {
|
|
6
6
|
return input
|
|
@@ -24,4 +24,3 @@ function combineTextConfig(...[newConfigContents, existingConfigContents,]) {
|
|
|
24
24
|
});
|
|
25
25
|
return sortedNew.join('\n');
|
|
26
26
|
}
|
|
27
|
-
exports.combineTextConfig = combineTextConfig;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.createDefaultPackageJson =
|
|
6
|
+
exports.createDefaultPackageJson = createDefaultPackageJson;
|
|
7
7
|
const common_1 = require("@augment-vir/common");
|
|
8
8
|
const path_1 = require("path");
|
|
9
9
|
const simple_git_1 = __importDefault(require("simple-git"));
|
|
@@ -29,7 +29,6 @@ async function createDefaultPackageJson(copyFromContents, existingConfigContents
|
|
|
29
29
|
};
|
|
30
30
|
return await (0, prettier_1.formatCode)(JSON.stringify(newPackageJson), 'package.json');
|
|
31
31
|
}
|
|
32
|
-
exports.createDefaultPackageJson = createDefaultPackageJson;
|
|
33
32
|
function combineScripts(virmatorPackageJson, currentRepoPackageJson) {
|
|
34
33
|
const scripts = {
|
|
35
34
|
...currentRepoPackageJson.scripts,
|
|
@@ -12,8 +12,8 @@ exports.testCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
12
12
|
},
|
|
13
13
|
configFiles: {
|
|
14
14
|
mochaConfig: {
|
|
15
|
-
copyFromInternalPath: (0, path_1.join)(package_paths_1.virmatorConfigsDir, 'configs', 'mocha.config.
|
|
16
|
-
copyToPathRelativeToRepoDir: (0, path_1.join)('configs', 'mocha.config.
|
|
15
|
+
copyFromInternalPath: (0, path_1.join)(package_paths_1.virmatorConfigsDir, 'configs', 'mocha.config.cjs'),
|
|
16
|
+
copyToPathRelativeToRepoDir: (0, path_1.join)('configs', 'mocha.config.cjs'),
|
|
17
17
|
},
|
|
18
18
|
nycConfig: {
|
|
19
19
|
copyFromInternalPath: (0, path_1.join)(package_paths_1.virmatorConfigsDir, 'configs', 'nyc.config.js'),
|
|
@@ -36,7 +36,7 @@ exports.testCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
36
36
|
sections: [
|
|
37
37
|
{
|
|
38
38
|
title: '',
|
|
39
|
-
content: `Test all .test.ts files with Mocha and Chai. By default this command tests all ".test.ts" files in the current directory (recursively) that are not ".type.test.ts" files. To override this behavior, override the "spec" property in .mocharc.
|
|
39
|
+
content: `Test all .test.ts files with Mocha and Chai. By default this command tests all ".test.ts" files in the current directory (recursively) that are not ".type.test.ts" files. To override this behavior, override the "spec" property in .mocharc.cjs.`,
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
title: '',
|
|
@@ -78,7 +78,7 @@ exports.testCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
78
78
|
? [
|
|
79
79
|
await (0, package_paths_1.getNpmBinPath)({
|
|
80
80
|
repoDir: inputs.repoDir,
|
|
81
|
-
command: '
|
|
81
|
+
command: 'vir-nyc',
|
|
82
82
|
packageDirPath: inputs.packageDir,
|
|
83
83
|
}),
|
|
84
84
|
// force colors in nyc
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateDepCruiserConfig =
|
|
3
|
+
exports.generateDepCruiserConfig = generateDepCruiserConfig;
|
|
4
4
|
function generateDepCruiserConfig({ fileExceptions, omitRules, }) {
|
|
5
5
|
const forbiddenRules = [
|
|
6
6
|
/* rules from the 'recommended' preset: */
|
|
@@ -204,4 +204,3 @@ function generateDepCruiserConfig({ fileExceptions, omitRules, }) {
|
|
|
204
204
|
},
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
|
-
exports.generateDepCruiserConfig = generateDepCruiserConfig;
|
|
@@ -3,7 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.basePlugins = void 0;
|
|
7
|
+
exports.findGitRepoRoot = findGitRepoRoot;
|
|
8
|
+
exports.createBaseConfig = createBaseConfig;
|
|
9
|
+
exports.combineConfigs = combineConfigs;
|
|
10
|
+
exports.defineConfig = defineConfig;
|
|
7
11
|
const node_js_1 = require("@augment-vir/node-js");
|
|
8
12
|
const fs_1 = require("fs");
|
|
9
13
|
const path_1 = require("path");
|
|
@@ -24,7 +28,6 @@ function findGitRepoRoot(dir) {
|
|
|
24
28
|
}
|
|
25
29
|
return findGitRepoRoot(nextDir);
|
|
26
30
|
}
|
|
27
|
-
exports.findGitRepoRoot = findGitRepoRoot;
|
|
28
31
|
function createBaseConfig({ forGitHubPages, packageDirPath }) {
|
|
29
32
|
const cwd = packageDirPath || process.cwd();
|
|
30
33
|
const basePath = forGitHubPages && process.env.CI ? `/${(0, path_1.basename)(findGitRepoRoot(cwd))}` : '/';
|
|
@@ -53,7 +56,6 @@ function createBaseConfig({ forGitHubPages, packageDirPath }) {
|
|
|
53
56
|
},
|
|
54
57
|
};
|
|
55
58
|
}
|
|
56
|
-
exports.createBaseConfig = createBaseConfig;
|
|
57
59
|
async function combineConfigs(baseConfigOptions, overrideCallback) {
|
|
58
60
|
const { baseConfig, basePaths } = createBaseConfig(baseConfigOptions);
|
|
59
61
|
const fullConfig = overrideCallback
|
|
@@ -67,8 +69,6 @@ async function combineConfigs(baseConfigOptions, overrideCallback) {
|
|
|
67
69
|
}
|
|
68
70
|
return fullConfig;
|
|
69
71
|
}
|
|
70
|
-
exports.combineConfigs = combineConfigs;
|
|
71
72
|
function defineConfig(baseConfigOptions, overrideCallback) {
|
|
72
73
|
return combineConfigs(baseConfigOptions, overrideCallback);
|
|
73
74
|
}
|
|
74
|
-
exports.defineConfig = defineConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.alwaysReloadPlugin =
|
|
3
|
+
exports.alwaysReloadPlugin = alwaysReloadPlugin;
|
|
4
4
|
const node_js_1 = require("@augment-vir/node-js");
|
|
5
5
|
const fs_1 = require("fs");
|
|
6
6
|
const path_1 = require("path");
|
|
@@ -97,4 +97,3 @@ function alwaysReloadPlugin(config = {}) {
|
|
|
97
97
|
},
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
|
-
exports.alwaysReloadPlugin = alwaysReloadPlugin;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.virmatorConfigs = exports.virmatorConfigsDir = exports.virmatorPackageDir = void 0;
|
|
4
|
+
exports.getNpmBinPath = getNpmBinPath;
|
|
4
5
|
const common_1 = require("@augment-vir/common");
|
|
5
6
|
const node_js_1 = require("@augment-vir/node-js");
|
|
6
7
|
const fs_1 = require("fs");
|
|
@@ -17,7 +18,6 @@ async function getNpmBinPath({ repoDir, command, packageDirPath, }) {
|
|
|
17
18
|
return ((await getNpmBinPathInternal({ repoDir, command, packageDirPath })) ??
|
|
18
19
|
getNpmBinPathInternal({ repoDir, command, packageDirPath: exports.virmatorPackageDir }));
|
|
19
20
|
}
|
|
20
|
-
exports.getNpmBinPath = getNpmBinPath;
|
|
21
21
|
async function getNpmBinPathInternal({ repoDir, command, packageDirPath, }) {
|
|
22
22
|
const topLevelBinPath = (0, path_1.join)('node_modules', '.bin', command);
|
|
23
23
|
const internalPackageBinPath = (0, path_1.join)(packageDirPath, 'node_modules', '.bin', command);
|
package/dist/index.d.ts
CHANGED
|
@@ -1405,21 +1405,8 @@ export declare const virmator: Readonly<{
|
|
|
1405
1405
|
npmDeps: readonly [];
|
|
1406
1406
|
}>;
|
|
1407
1407
|
}))[]>;
|
|
1408
|
-
extend: <CommandDefinitionsGeneric extends
|
|
1409
|
-
|
|
1410
|
-
packageRootDir: string;
|
|
1411
|
-
commandDefinitions?: CommandDefinitionsGeneric;
|
|
1412
|
-
}>) => Readonly<{
|
|
1413
|
-
packageBinName: string;
|
|
1414
|
-
cliHelpMessage: string;
|
|
1415
|
-
markdownHelpMessage: string;
|
|
1416
|
-
commandMapping: import("./api/command/command-mapping").CommandDefinitionArrayToMapping<CommandDefinitionsGeneric>;
|
|
1417
|
-
extend: any;
|
|
1418
|
-
allConfigs: readonly import("./api/config/config-file-definition").ConfigFileDefinition[];
|
|
1419
|
-
runInCli: () => Promise<void>;
|
|
1420
|
-
run: (allArgs: string[], repoDir: string) => Promise<void>;
|
|
1421
|
-
}>;
|
|
1422
|
-
allConfigs: readonly import("./api/config/config-file-definition").ConfigFileDefinition[];
|
|
1408
|
+
extend: <CommandDefinitionsGeneric extends ReadonlyArray<import("./api/command/define-command").CommandDefinition>>(inputs: import("./api/virmator-types").ExtendVirmatorInputs<CommandDefinitionsGeneric>) => import("./api/virmator-types").ExtendedVirmator<import("./api/command/command-mapping").CommandDefinitionArrayToMapping<CommandDefinitionsGeneric>>;
|
|
1409
|
+
allConfigs: ReadonlyArray<import("./api/config/config-file-definition").ConfigFileDefinition>;
|
|
1423
1410
|
runInCli: () => Promise<void>;
|
|
1424
1411
|
run: (allArgs: string[], repoDir: string) => Promise<void>;
|
|
1425
1412
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "virmator",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.3",
|
|
4
4
|
"description": "Handle common package configs, commands, and dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"format": "npm run format:base -- --write --list-different",
|
|
36
36
|
"format:base": "prettier \"./**/*.+(ts|json|html|css|md|js)\" --config .prettierrc.js",
|
|
37
37
|
"publish": "npm run compile && npm ci && virmator publish \"npm run test:all\"",
|
|
38
|
-
"test": "npm run compile && test-as-package mocha --config mocha.config.
|
|
38
|
+
"test": "npm run compile && test-as-package mocha --config mocha.config.cjs",
|
|
39
39
|
"test:all": "npm ci && concurrently --color --kill-others-on-fail -c auto --names tests,spelling,format,docs \"npm run compile && npm run test\" \"npm run test:spelling -- --no-progress\" \"npm run test:format\" \"npm run docs:check\"",
|
|
40
40
|
"test:format": "npm run format:base -- --check",
|
|
41
41
|
"test:help": "ts-node src/cli/cli.ts --help",
|
|
@@ -43,27 +43,27 @@
|
|
|
43
43
|
"test:types": "tsc --noEmit"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@augment-vir/common": "^
|
|
47
|
-
"@augment-vir/node-js": "^
|
|
46
|
+
"@augment-vir/common": "^29.3.0",
|
|
47
|
+
"@augment-vir/node-js": "^29.3.0",
|
|
48
48
|
"ansi-colors": "^4.1.3",
|
|
49
49
|
"concurrently": "^8.2.2",
|
|
50
50
|
"fs-extra": "^11.2.0",
|
|
51
51
|
"glob": "^8.1.0",
|
|
52
52
|
"glob-promise": "^6.0.7",
|
|
53
53
|
"mono-vir": "^1.0.1",
|
|
54
|
-
"semver": "^7.6.
|
|
54
|
+
"semver": "^7.6.3",
|
|
55
55
|
"simple-git": "^3.25.0",
|
|
56
|
-
"type-fest": "^4.
|
|
56
|
+
"type-fest": "^4.22.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@electrovir/nyc": "
|
|
59
|
+
"@electrovir/nyc": "17.0.0",
|
|
60
60
|
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
|
61
61
|
"@open-wc/testing": "^4.0.0",
|
|
62
62
|
"@types/chai": "^4.3.16",
|
|
63
63
|
"@types/fs-extra": "^11.0.4",
|
|
64
64
|
"@types/glob": "^8.1.0",
|
|
65
|
-
"@types/mocha": "^10.0.
|
|
66
|
-
"@types/node": "^20.14.
|
|
65
|
+
"@types/mocha": "^10.0.7",
|
|
66
|
+
"@types/node": "^20.14.11",
|
|
67
67
|
"@types/semver": "^7.5.8",
|
|
68
68
|
"@web/dev-server-esbuild": "^1.0.2",
|
|
69
69
|
"@web/test-runner": "^0.18.2",
|
|
@@ -71,30 +71,30 @@
|
|
|
71
71
|
"@web/test-runner-playwright": "^0.11.0",
|
|
72
72
|
"@web/test-runner-visual-regression": "^0.9.0",
|
|
73
73
|
"chai": "^4.3.10",
|
|
74
|
-
"cspell": "^8.
|
|
75
|
-
"dependency-cruiser": "^16.3.
|
|
74
|
+
"cspell": "^8.11.0",
|
|
75
|
+
"dependency-cruiser": "^16.3.7",
|
|
76
76
|
"element-vir": "^22.2.2",
|
|
77
|
-
"esbuild": "^0.
|
|
77
|
+
"esbuild": "^0.23.0",
|
|
78
78
|
"istanbul-smart-text-reporter": "^1.1.4",
|
|
79
79
|
"markdown-code-example-inserter": "^1.0.0",
|
|
80
|
-
"mocha": "^10.
|
|
80
|
+
"mocha": "^10.6.0",
|
|
81
81
|
"mocha-spec-reporter-with-file-names": "^0.0.3",
|
|
82
82
|
"npm-check-updates": "~16.12.3",
|
|
83
|
-
"prettier": "^3.3.
|
|
83
|
+
"prettier": "^3.3.3",
|
|
84
84
|
"prettier-plugin-interpolated-html-tags": "^1.0.5",
|
|
85
85
|
"prettier-plugin-jsdoc": "^1.3.0",
|
|
86
86
|
"prettier-plugin-multiline-arrays": "^3.0.6",
|
|
87
|
-
"prettier-plugin-organize-imports": "^
|
|
88
|
-
"prettier-plugin-packagejson": "^2.5.
|
|
87
|
+
"prettier-plugin-organize-imports": "^4.0.0",
|
|
88
|
+
"prettier-plugin-packagejson": "^2.5.1",
|
|
89
89
|
"prettier-plugin-sort-json": "^4.0.0",
|
|
90
90
|
"prettier-plugin-toml": "^2.0.1",
|
|
91
91
|
"test-as-package": "^1.0.0",
|
|
92
92
|
"test-established-expectations": "^1.0.0",
|
|
93
93
|
"ts-node": "^10.9.2",
|
|
94
94
|
"tsconfig-paths": "^4.2.0",
|
|
95
|
-
"typedoc": "^0.
|
|
96
|
-
"typescript": "5.
|
|
97
|
-
"virmator": "
|
|
95
|
+
"typedoc": "^0.26.4",
|
|
96
|
+
"typescript": "^5.5.3",
|
|
97
|
+
"virmator": "^12.0.2",
|
|
98
98
|
"vite": "^4.5.0",
|
|
99
99
|
"vite-tsconfig-paths": "^4.3.2"
|
|
100
100
|
},
|
|
File without changes
|