virmator 4.3.4 → 5.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/README.md +4 -3
- package/base-configs/base-mocharc.js +5 -3
- package/base-configs/base-nyc.js +8 -4
- package/base-configs/base-tsconfig.json +3 -6
- package/base-configs/web-test-runner-base.mjs +4 -3
- package/configs/.github/workflows/build-for-gh-pages.yml +1 -1
- package/configs/.github/workflows/tagged-release.yml +1 -1
- package/configs/.nvmrc +1 -1
- package/configs/gitignore.txt +1 -0
- package/dist/api/command/command-configs.d.ts +1 -0
- package/dist/api/command/command-configs.d.ts.map +1 -0
- package/dist/api/command/command-configs.js +3 -3
- package/dist/api/command/command-description.d.ts +1 -0
- package/dist/api/command/command-description.d.ts.map +1 -0
- package/dist/api/command/command-executor.d.ts +1 -0
- package/dist/api/command/command-executor.d.ts.map +1 -0
- package/dist/api/command/command-help.d.ts +1 -0
- package/dist/api/command/command-help.d.ts.map +1 -0
- package/dist/api/command/command-logging.d.ts +1 -0
- package/dist/api/command/command-logging.d.ts.map +1 -0
- package/dist/api/command/command-mapping.d.ts +2 -1
- package/dist/api/command/command-mapping.d.ts.map +1 -0
- package/dist/api/command/command-messages.d.ts +1 -0
- package/dist/api/command/command-messages.d.ts.map +1 -0
- package/dist/api/command/command-messages.js +3 -3
- package/dist/api/command/command-to-help-message.d.ts +1 -0
- package/dist/api/command/command-to-help-message.d.ts.map +1 -0
- package/dist/api/command/command-to-help-message.js +11 -10
- package/dist/api/command/define-command-inputs.d.ts +1 -0
- package/dist/api/command/define-command-inputs.d.ts.map +1 -0
- package/dist/api/command/define-command.d.ts +1 -0
- package/dist/api/command/define-command.d.ts.map +1 -0
- package/dist/api/command/define-command.js +3 -3
- package/dist/api/config/config-file-definition.d.ts +1 -0
- package/dist/api/config/config-file-definition.d.ts.map +1 -0
- package/dist/api/config/config-paths.d.ts +1 -0
- package/dist/api/config/config-paths.d.ts.map +1 -0
- package/dist/api/config/copy-config.d.ts +1 -0
- package/dist/api/config/copy-config.d.ts.map +1 -0
- package/dist/api/config/copy-config.js +5 -5
- package/dist/api/create-virmator.d.ts +1 -0
- package/dist/api/create-virmator.d.ts.map +1 -0
- package/dist/api/create-virmator.js +2 -2
- package/dist/api/run-command/check-npm-deps.d.ts +1 -0
- package/dist/api/run-command/check-npm-deps.d.ts.map +1 -0
- package/dist/api/run-command/check-npm-deps.js +9 -10
- package/dist/api/run-command/extract-arguments.d.ts +1 -0
- package/dist/api/run-command/extract-arguments.d.ts.map +1 -0
- package/dist/api/run-command/run-command-executor.d.ts +1 -0
- package/dist/api/run-command/run-command-executor.d.ts.map +1 -0
- package/dist/api/run-command/run-command-executor.js +6 -7
- package/dist/api/run-command/run-extended-virmator.d.ts +1 -0
- package/dist/api/run-command/run-extended-virmator.d.ts.map +1 -0
- package/dist/api/run-command/run-extended-virmator.js +3 -3
- package/dist/api/run-command/run-shell-command.d.ts +2 -1
- package/dist/api/run-command/run-shell-command.d.ts.map +1 -0
- package/dist/api/run-command/run-shell-command.js +2 -2
- package/dist/api/virmator-types.d.ts +1 -0
- package/dist/api/virmator-types.d.ts.map +1 -0
- package/dist/augments/array.d.ts +1 -0
- package/dist/augments/array.d.ts.map +1 -0
- package/dist/augments/console.d.ts +1 -0
- package/dist/augments/console.d.ts.map +1 -0
- package/dist/augments/fs.d.ts +1 -0
- package/dist/augments/fs.d.ts.map +1 -0
- package/dist/augments/fs.js +2 -2
- package/dist/augments/git.d.ts +1 -0
- package/dist/augments/git.d.ts.map +1 -0
- package/dist/augments/git.js +2 -2
- package/dist/augments/json.d.ts +1 -0
- package/dist/augments/json.d.ts.map +1 -0
- package/dist/augments/npm.d.ts +3 -2
- package/dist/augments/npm.d.ts.map +1 -0
- package/dist/augments/npm.js +2 -2
- package/dist/augments/object.d.ts +2 -1
- package/dist/augments/object.d.ts.map +1 -0
- package/dist/augments/object.js +7 -7
- package/dist/augments/path.d.ts +1 -0
- package/dist/augments/path.d.ts.map +1 -0
- package/dist/augments/prettier.d.ts +1 -0
- package/dist/augments/prettier.d.ts.map +1 -0
- package/dist/augments/prettier.js +1 -1
- package/dist/augments/regexp.d.ts +1 -0
- package/dist/augments/regexp.d.ts.map +1 -0
- package/dist/augments/string.d.ts +1 -0
- package/dist/augments/string.d.ts.map +1 -0
- package/dist/augments/test.d.ts.map +1 -0
- package/dist/augments/type.d.ts +1 -0
- package/dist/augments/type.d.ts.map +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/commands/code-in-markdown.command.d.ts +1 -0
- package/dist/commands/code-in-markdown.command.d.ts.map +1 -0
- package/dist/commands/code-in-markdown.command.test.d.ts.map +1 -0
- package/dist/commands/compile.command.d.ts +1 -0
- package/dist/commands/compile.command.d.ts.map +1 -0
- package/dist/commands/compile.command.js +1 -1
- package/dist/commands/compile.command.test.d.ts.map +1 -0
- package/dist/commands/extra-configs/all-extra-configs.d.ts +1 -0
- package/dist/commands/extra-configs/all-extra-configs.d.ts.map +1 -0
- package/dist/commands/extra-configs/combine-json-config.d.ts +1 -0
- package/dist/commands/extra-configs/combine-json-config.d.ts.map +1 -0
- package/dist/commands/extra-configs/combine-json-config.js +2 -2
- package/dist/commands/extra-configs/combine-text-config.d.ts +1 -0
- package/dist/commands/extra-configs/combine-text-config.d.ts.map +1 -0
- package/dist/commands/extra-configs/combine-text-config.js +2 -2
- package/dist/commands/extra-configs/create-default-package-json.d.ts +1 -0
- package/dist/commands/extra-configs/create-default-package-json.d.ts.map +1 -0
- package/dist/commands/extra-configs/create-default-package-json.js +4 -4
- package/dist/commands/format.command.d.ts +1 -0
- package/dist/commands/format.command.d.ts.map +1 -0
- package/dist/commands/format.command.js +3 -3
- package/dist/commands/format.command.test.d.ts.map +1 -0
- package/dist/commands/frontend.command.d.ts +2 -1
- package/dist/commands/frontend.command.d.ts.map +1 -0
- package/dist/commands/frontend.command.js +1 -1
- package/dist/commands/init.command.d.ts +1 -0
- package/dist/commands/init.command.d.ts.map +1 -0
- package/dist/commands/init.command.test.d.ts.map +1 -0
- package/dist/commands/publish.command.d.ts +1 -0
- package/dist/commands/publish.command.d.ts.map +1 -0
- package/dist/commands/publish.command.js +13 -13
- package/dist/commands/spellcheck.command.d.ts +1 -0
- package/dist/commands/spellcheck.command.d.ts.map +1 -0
- package/dist/commands/spellcheck.command.test.d.ts.map +1 -0
- package/dist/commands/test-web.command.d.ts +1 -0
- package/dist/commands/test-web.command.d.ts.map +1 -0
- package/dist/commands/test-web.command.test.d.ts.map +1 -0
- package/dist/commands/test.command.d.ts +2 -1
- package/dist/commands/test.command.d.ts.map +1 -0
- package/dist/commands/test.command.js +2 -2
- package/dist/commands/test.command.test.d.ts.map +1 -0
- package/dist/commands/update-configs.command.d.ts +1 -0
- package/dist/commands/update-configs.command.d.ts.map +1 -0
- package/dist/commands/update-configs.command.test.d.ts.map +1 -0
- package/dist/compiled-base-configs/base-vite.d.ts +1 -0
- package/dist/compiled-base-configs/base-vite.d.ts.map +1 -0
- package/dist/compiled-base-configs/vite-always-reload-plugin.d.ts +1 -0
- package/dist/compiled-base-configs/vite-always-reload-plugin.d.ts.map +1 -0
- package/dist/compiled-base-configs/vite-always-reload-plugin.js +2 -2
- package/dist/file-paths/package-paths.d.ts +1 -0
- package/dist/file-paths/package-paths.d.ts.map +1 -0
- package/dist/file-paths/package-paths.js +4 -4
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +0 -1
- package/dist/scripts/save-help-message.d.ts +1 -0
- package/dist/scripts/save-help-message.d.ts.map +1 -0
- package/dist/scripts/save-help-message.js +2 -2
- package/mocha.config.js +1 -1
- package/package.json +24 -23
- package/tsconfig.tsbuildinfo +1 -0
- package/dist/api/cli-color.d.ts +0 -9
- package/dist/api/cli-color.js +0 -13
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.publishCommandDefinition = void 0;
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const common_1 = require("@augment-vir/common");
|
|
8
|
+
const node_js_1 = require("@augment-vir/node-js");
|
|
9
9
|
const fs_1 = require("fs");
|
|
10
10
|
const promises_1 = require("fs/promises");
|
|
11
11
|
const glob_1 = __importDefault(require("glob"));
|
|
@@ -46,7 +46,7 @@ exports.publishCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
46
46
|
await bumpPackageVersion(packageJson, packageJsonPath);
|
|
47
47
|
}
|
|
48
48
|
await updateWorkspaceVersions(packageJsonPath, workspaceDirs);
|
|
49
|
-
await (0,
|
|
49
|
+
await (0, node_js_1.runShellCommand)(`npm i`, {
|
|
50
50
|
rejectOnError: true,
|
|
51
51
|
cwd: (0, path_1.dirname)(packageJsonPath),
|
|
52
52
|
});
|
|
@@ -60,19 +60,19 @@ async function updateGit(packageJsonPath) {
|
|
|
60
60
|
const newVersion = (await (0, npm_1.readPackageJson)(packageJsonPath)).version;
|
|
61
61
|
const packageDirPath = (0, path_1.dirname)(packageJsonPath);
|
|
62
62
|
if (await (0, git_1.doChangesExist)(packageDirPath)) {
|
|
63
|
-
await (0,
|
|
63
|
+
await (0, node_js_1.runShellCommand)(`git commit -a --amend --no-edit`, {
|
|
64
64
|
cwd: packageDirPath,
|
|
65
65
|
rejectOnError: true,
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
await (0,
|
|
68
|
+
await (0, node_js_1.runShellCommand)(`git tag v${newVersion} && git push && git push --tags`, {
|
|
69
69
|
cwd: packageDirPath,
|
|
70
70
|
rejectOnError: true,
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
async function updateWorkspaceVersions(packageJsonPath, workspaceDirPaths) {
|
|
74
74
|
const newVersion = (await (0, npm_1.readPackageJson)(packageJsonPath)).version;
|
|
75
|
-
await (0,
|
|
75
|
+
await (0, common_1.awaitedForEach)(workspaceDirPaths, async (workspacePath) => {
|
|
76
76
|
const workspacePackageJsonPath = (0, path_1.join)(workspacePath, 'package.json');
|
|
77
77
|
const workspacePackageJson = await (0, npm_1.readPackageJson)(workspacePackageJsonPath);
|
|
78
78
|
const newWorkspacePackageJson = { ...workspacePackageJson };
|
|
@@ -83,11 +83,11 @@ async function updateWorkspaceVersions(packageJsonPath, workspaceDirPaths) {
|
|
|
83
83
|
async function publishPackages(workspaceDirPaths, packageJsonPath) {
|
|
84
84
|
const packagePath = (0, path_1.dirname)(packageJsonPath);
|
|
85
85
|
if (workspaceDirPaths.length) {
|
|
86
|
-
await (0,
|
|
86
|
+
await (0, common_1.awaitedForEach)(workspaceDirPaths, async (workspaceDirPath) => {
|
|
87
87
|
const workspacePackageJson = await (0, npm_1.readPackageJson)((0, path_1.join)(workspaceDirPath, 'package.json'));
|
|
88
88
|
if (!workspacePackageJson.private) {
|
|
89
89
|
console.info(`\nPublishing ${(0, path_1.basename)(workspaceDirPath)}`);
|
|
90
|
-
await (0,
|
|
90
|
+
await (0, node_js_1.runShellCommand)(`npm publish`, {
|
|
91
91
|
rejectOnError: true,
|
|
92
92
|
cwd: workspaceDirPath,
|
|
93
93
|
hookUpToConsole: true,
|
|
@@ -100,7 +100,7 @@ async function publishPackages(workspaceDirPaths, packageJsonPath) {
|
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
102
|
else {
|
|
103
|
-
await (0,
|
|
103
|
+
await (0, node_js_1.runShellCommand)(`npm publish`, {
|
|
104
104
|
rejectOnError: true,
|
|
105
105
|
cwd: packagePath,
|
|
106
106
|
hookUpToConsole: true,
|
|
@@ -119,7 +119,7 @@ async function isCurrentVersionPublished(packageJson, workspaceDirs) {
|
|
|
119
119
|
return arePublished.some((entry) => entry) || (await isPublished(packageJson));
|
|
120
120
|
}
|
|
121
121
|
async function isPublished({ name, version }) {
|
|
122
|
-
const output = await (0,
|
|
122
|
+
const output = await (0, node_js_1.runShellCommand)(`npm show ${name}@${version}`);
|
|
123
123
|
return output.exitCode === 0;
|
|
124
124
|
}
|
|
125
125
|
// this is just used to ensure we have every release type
|
|
@@ -132,14 +132,14 @@ const releaseTypesObject = {
|
|
|
132
132
|
prepatch: 'prepatch',
|
|
133
133
|
prerelease: 'prerelease',
|
|
134
134
|
};
|
|
135
|
-
const releaseTypeOptions = (0,
|
|
136
|
-
const releaseTypeMessage = `Choose a release type: ${(0,
|
|
135
|
+
const releaseTypeOptions = (0, common_1.getObjectTypedKeys)(releaseTypesObject);
|
|
136
|
+
const releaseTypeMessage = `Choose a release type: ${(0, common_1.joinWithFinalConjunction)(releaseTypeOptions, 'or')}:`;
|
|
137
137
|
async function bumpPackageVersion(packageJson, packageJsonPath) {
|
|
138
138
|
const releaseType = (await (0, console_1.askQuestionUntilConditionMet)({
|
|
139
139
|
conditionCallback: (input) => {
|
|
140
140
|
return releaseTypeOptions.includes(input.toLowerCase());
|
|
141
141
|
},
|
|
142
|
-
invalidInputMessage: `Invalid release type. Expected ${(0,
|
|
142
|
+
invalidInputMessage: `Invalid release type. Expected ${(0, common_1.joinWithFinalConjunction)(releaseTypeOptions, 'or')}.`,
|
|
143
143
|
questionToAsk: releaseTypeMessage,
|
|
144
144
|
timeoutMs: 0,
|
|
145
145
|
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spellcheck.command.d.ts","sourceRoot":"","sources":["../../src/commands/spellcheck.command.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,2BAA2B;;;;;;;;;;EAiDvC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spellcheck.command.test.d.ts","sourceRoot":"","sources":["../../src/commands/spellcheck.command.test.ts"],"names":[],"mappings":""}
|
|
@@ -9,3 +9,4 @@ export declare const testWebCommandDefinition: import("../api/command/define-com
|
|
|
9
9
|
};
|
|
10
10
|
npmDeps: readonly ["@open-wc/testing", "@types/mocha", "@web/dev-server-esbuild", "@web/test-runner-commands", "@web/test-runner-playwright", "@web/test-runner"];
|
|
11
11
|
}>;
|
|
12
|
+
//# sourceMappingURL=test-web.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-web.command.d.ts","sourceRoot":"","sources":["../../src/commands/test-web.command.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,wBAAwB;;;;;;;;;;EAwEpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-web.command.test.d.ts","sourceRoot":"","sources":["../../src/commands/test-web.command.test.ts"],"names":[],"mappings":""}
|
|
@@ -11,5 +11,6 @@ export declare const testCommandDefinition: import("../api/command/define-comman
|
|
|
11
11
|
readonly copyToPathRelativeToRepoDir: string;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
npmDeps: readonly ["@istanbuljs/nyc-config-typescript", "@types/chai", "@types/mocha", "chai", "istanbul-smart-text-reporter", "mocha-spec-reporter-with-file-names", "mocha", "
|
|
14
|
+
npmDeps: readonly ["@electrovir/nyc", "@istanbuljs/nyc-config-typescript", "@types/chai", "@types/mocha", "chai", "istanbul-smart-text-reporter", "mocha-spec-reporter-with-file-names", "mocha", "tsx"];
|
|
15
15
|
}>;
|
|
16
|
+
//# sourceMappingURL=test.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.command.d.ts","sourceRoot":"","sources":["../../src/commands/test.command.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;EAoFjC,CAAC"}
|
|
@@ -18,6 +18,7 @@ exports.testCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
npmDeps: [
|
|
21
|
+
'@electrovir/nyc',
|
|
21
22
|
'@istanbuljs/nyc-config-typescript',
|
|
22
23
|
'@types/chai',
|
|
23
24
|
'@types/mocha',
|
|
@@ -25,8 +26,7 @@ exports.testCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
25
26
|
'istanbul-smart-text-reporter',
|
|
26
27
|
'mocha-spec-reporter-with-file-names',
|
|
27
28
|
'mocha',
|
|
28
|
-
'
|
|
29
|
-
'ts-node',
|
|
29
|
+
'tsx',
|
|
30
30
|
],
|
|
31
31
|
}, ({ commandName, packageBinName }) => {
|
|
32
32
|
return {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.command.test.d.ts","sourceRoot":"","sources":["../../src/commands/test.command.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-configs.command.d.ts","sourceRoot":"","sources":["../../src/commands/update-configs.command.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,8BAA8B;;;;;EAiC1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-configs.command.test.d.ts","sourceRoot":"","sources":["../../src/commands/update-configs.command.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-vite.d.ts","sourceRoot":"","sources":["../../src/compiled-base-configs/base-vite.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,iCAIzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vite-always-reload-plugin.d.ts","sourceRoot":"","sources":["../../src/compiled-base-configs/vite-always-reload-plugin.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAwBlC;;;GAGG;AACH,wBAAgB,kBAAkB,CAC9B,MAAM,GAAE,OAAO,CAAC;IACZ,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,0EAA0E;IAC1E,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CAChB,CAAM,GACR,YAAY,CAqDd"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.alwaysReloadPlugin = void 0;
|
|
4
|
-
const
|
|
4
|
+
const node_js_1 = require("@augment-vir/node-js");
|
|
5
5
|
const fs_1 = require("fs");
|
|
6
6
|
const path_1 = require("path");
|
|
7
7
|
/**
|
|
@@ -53,7 +53,7 @@ function alwaysReloadPlugin(config = {}) {
|
|
|
53
53
|
type: 'full-reload',
|
|
54
54
|
path: '*',
|
|
55
55
|
});
|
|
56
|
-
logger.info(`${
|
|
56
|
+
logger.info(`${node_js_1.logColors.success}page reload ${node_js_1.logColors.faint}${(0, path_1.relative)(root, path)}${node_js_1.logColors.reset}`, { clear: true, timestamp: true });
|
|
57
57
|
/**
|
|
58
58
|
* Debounce reloads calls so that they don't get spammed. If you're saving
|
|
59
59
|
* faster than this, then what the heck are you doing anyway?
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-paths.d.ts","sourceRoot":"","sources":["../../src/file-paths/package-paths.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,kBAAkB,QAA8B,CAAC;AAE9D,eAAO,MAAM,kBAAkB,QAAsC,CAAC;AACtE,eAAO,MAAM,eAAe;;;;;CAK3B,CAAC;AAEF,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA2CrF"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getNpmBinPath = exports.virmatorConfigs = exports.virmatorConfigsDir = exports.virmatorPackageDir = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const common_1 = require("@augment-vir/common");
|
|
5
|
+
const node_js_1 = require("@augment-vir/node-js");
|
|
6
6
|
const fs_1 = require("fs");
|
|
7
7
|
const path_1 = require("path");
|
|
8
8
|
const fs_2 = require("../augments/fs");
|
|
@@ -34,10 +34,10 @@ async function getNpmBinPath(repoDir, command) {
|
|
|
34
34
|
if (!(0, fs_1.existsSync)(actualBinPath)) {
|
|
35
35
|
throw new Error(`Discovered bin path for "${command}" does not actually exist: "${actualBinPath}". Started at "${startSearchDirPath}".`);
|
|
36
36
|
}
|
|
37
|
-
return (0,
|
|
37
|
+
return (0, node_js_1.interpolationSafeWindowsPath)(actualBinPath);
|
|
38
38
|
}
|
|
39
39
|
catch (error) {
|
|
40
|
-
throw new Error(`Failed to find npm bin path for "${command}": ${(0,
|
|
40
|
+
throw new Error(`Failed to find npm bin path for "${command}": ${(0, common_1.extractErrorMessage)(error)}. Started at "${startSearchDirPath}".`);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
exports.getNpmBinPath = getNpmBinPath;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from './api/cli-color';
|
|
2
1
|
export * from './api/command/command-description';
|
|
3
2
|
export * from './api/command/command-executor';
|
|
4
3
|
export * from './api/command/command-help';
|
|
@@ -63,7 +62,7 @@ export declare const virmator: Readonly<{
|
|
|
63
62
|
readonly copyToPathRelativeToRepoDir: string;
|
|
64
63
|
};
|
|
65
64
|
};
|
|
66
|
-
npmDeps: readonly ["vite", "
|
|
65
|
+
npmDeps: readonly ["vite", "@augment-vir/node-js"];
|
|
67
66
|
}> | import("./api/command/define-command").CommandDefinition<{
|
|
68
67
|
commandName: "init";
|
|
69
68
|
subCommandDescriptions: {
|
|
@@ -99,7 +98,7 @@ export declare const virmator: Readonly<{
|
|
|
99
98
|
readonly copyToPathRelativeToRepoDir: string;
|
|
100
99
|
};
|
|
101
100
|
};
|
|
102
|
-
npmDeps: readonly ["@istanbuljs/nyc-config-typescript", "@types/chai", "@types/mocha", "chai", "istanbul-smart-text-reporter", "mocha-spec-reporter-with-file-names", "mocha", "
|
|
101
|
+
npmDeps: readonly ["@electrovir/nyc", "@istanbuljs/nyc-config-typescript", "@types/chai", "@types/mocha", "chai", "istanbul-smart-text-reporter", "mocha-spec-reporter-with-file-names", "mocha", "tsx"];
|
|
103
102
|
}> | import("./api/command/define-command").CommandDefinition<{
|
|
104
103
|
commandName: "test-web";
|
|
105
104
|
subCommandDescriptions: {};
|
|
@@ -134,3 +133,4 @@ export declare const virmator: Readonly<{
|
|
|
134
133
|
runInCli: () => Promise<void>;
|
|
135
134
|
run: (allArgs: string[], repoDir: string) => Promise<void>;
|
|
136
135
|
}>;
|
|
136
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,8CAA8C,CAAC;AAE7D,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAenB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -27,7 +27,6 @@ const test_web_command_1 = require("./commands/test-web.command");
|
|
|
27
27
|
const test_command_1 = require("./commands/test.command");
|
|
28
28
|
const update_configs_command_1 = require("./commands/update-configs.command");
|
|
29
29
|
const package_paths_1 = require("./file-paths/package-paths");
|
|
30
|
-
__exportStar(require("./api/cli-color"), exports);
|
|
31
30
|
__exportStar(require("./api/command/command-description"), exports);
|
|
32
31
|
__exportStar(require("./api/command/command-executor"), exports);
|
|
33
32
|
__exportStar(require("./api/command/command-help"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"save-help-message.d.ts","sourceRoot":"","sources":["../../src/scripts/save-help-message.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const node_js_1 = require("@augment-vir/node-js");
|
|
3
4
|
const promises_1 = require("fs/promises");
|
|
4
5
|
const __1 = require("..");
|
|
5
|
-
const cli_color_1 = require("../api/cli-color");
|
|
6
6
|
const command_to_help_message_1 = require("../api/command/command-to-help-message");
|
|
7
7
|
const prettier_1 = require("../augments/prettier");
|
|
8
8
|
const virmator_test_file_paths_1 = require("../test/virmator-test-file-paths");
|
|
@@ -22,7 +22,7 @@ async function main(args) {
|
|
|
22
22
|
const wasReadmeChanged = formattedReadme !== originalReadme;
|
|
23
23
|
await (0, promises_1.writeFile)(virmator_test_file_paths_1.virmatorReadme, originalReadme);
|
|
24
24
|
if (wasReadmeChanged) {
|
|
25
|
-
console.info(`${
|
|
25
|
+
console.info(`${node_js_1.logColors.bold}${node_js_1.logColors.error}README usage message is not up to date.${node_js_1.logColors.reset}\nRun ${node_js_1.logColors.info}npm run docs:update${node_js_1.logColors.reset} to update.\n`);
|
|
26
26
|
throw new Error(`README not up to date.`);
|
|
27
27
|
}
|
|
28
28
|
}
|
package/mocha.config.js
CHANGED
|
@@ -6,7 +6,7 @@ const oneMinuteMs = 60_000;
|
|
|
6
6
|
/** @type {import('mocha').MochaOptions} */
|
|
7
7
|
const mochaConfig = {
|
|
8
8
|
...baseOptions,
|
|
9
|
-
slow:
|
|
9
|
+
slow: oneMinuteMs,
|
|
10
10
|
timeout: 20 * oneMinuteMs,
|
|
11
11
|
// heavy modification of files requires parallel to be off
|
|
12
12
|
parallel: false,
|
package/package.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "virmator",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Handle
|
|
3
|
+
"version": "5.0.1",
|
|
4
|
+
"description": "Handle common package configs, commands, and dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
7
|
+
"config",
|
|
8
|
+
"configs",
|
|
9
9
|
"formatting",
|
|
10
|
+
"publish",
|
|
10
11
|
"spellcheck",
|
|
11
|
-
"
|
|
12
|
+
"template",
|
|
13
|
+
"vir"
|
|
12
14
|
],
|
|
13
15
|
"homepage": "https://github.com/electrovir/virmator",
|
|
14
16
|
"bugs": {
|
|
@@ -27,9 +29,9 @@
|
|
|
27
29
|
"types": "dist/index.d.ts",
|
|
28
30
|
"bin": "dist/cli.js",
|
|
29
31
|
"scripts": {
|
|
30
|
-
"compile": "rm -rf dist && tsc",
|
|
31
|
-
"docs:check": "npm run compile &&
|
|
32
|
-
"docs:update": "npm run compile &&
|
|
32
|
+
"compile": "rm -rf dist && rm -f ./*.tsbuildinfo && tsc",
|
|
33
|
+
"docs:check": "npm run compile && tsx src/scripts/save-help-message.ts check && md-code --check README.md",
|
|
34
|
+
"docs:update": "npm run compile && tsx src/scripts/save-help-message.ts && md-code README.md",
|
|
33
35
|
"format": "npm run format:base -- --write --list-different",
|
|
34
36
|
"format:base": "prettier \"./**/*.+(ts|json|html|css|md|js)\"",
|
|
35
37
|
"prepublishOnly": "npm run test:all",
|
|
@@ -37,49 +39,48 @@
|
|
|
37
39
|
"test": "bash src/scripts/run-tests.sh",
|
|
38
40
|
"test:all": "npm run test && npm run spellcheck -- --no-progress && npm run test:format && npm run docs:check",
|
|
39
41
|
"test:format": "npm run format:base -- --check",
|
|
40
|
-
"test:help": "
|
|
42
|
+
"test:help": "tsx src/cli/cli.ts --help",
|
|
41
43
|
"test:types": "tsc --noEmit"
|
|
42
44
|
},
|
|
43
45
|
"dependencies": {
|
|
46
|
+
"@augment-vir/common": "^5.0.1",
|
|
47
|
+
"@augment-vir/node-js": "^5.0.1",
|
|
44
48
|
"ansi-colors": "^4.1.3",
|
|
45
|
-
"augment-vir": "^3.1.2",
|
|
46
49
|
"glob": "^8.0.3",
|
|
47
50
|
"semver": "^7.3.8",
|
|
48
|
-
"simple-git": "^3.15.
|
|
51
|
+
"simple-git": "^3.15.1"
|
|
49
52
|
},
|
|
50
53
|
"devDependencies": {
|
|
54
|
+
"@electrovir/nyc": "^15.1.0",
|
|
51
55
|
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
|
52
56
|
"@open-wc/testing": "^3.1.7",
|
|
53
57
|
"@types/chai": "^4.3.4",
|
|
54
58
|
"@types/fs-extra": "^9.0.13",
|
|
55
59
|
"@types/glob": "^8.0.0",
|
|
56
|
-
"@types/mocha": "^10.0.
|
|
57
|
-
"@types/node": "^18.11.
|
|
60
|
+
"@types/mocha": "^10.0.1",
|
|
61
|
+
"@types/node": "^18.11.10",
|
|
58
62
|
"@types/semver": "^7.3.13",
|
|
59
63
|
"@web/dev-server-esbuild": "^0.3.3",
|
|
60
64
|
"@web/test-runner": "^0.15.0",
|
|
61
65
|
"@web/test-runner-commands": "^0.6.5",
|
|
62
66
|
"@web/test-runner-playwright": "^0.9.0",
|
|
63
|
-
"ansi-colors": "^4.1.3",
|
|
64
|
-
"augment-vir": "^3.1.2",
|
|
65
67
|
"chai": "^4.3.7",
|
|
66
|
-
"cspell": "^6.
|
|
67
|
-
"fs-extra": "^
|
|
68
|
-
"istanbul-smart-text-reporter": "^1.0.
|
|
68
|
+
"cspell": "^6.15.1",
|
|
69
|
+
"fs-extra": "^11.1.0",
|
|
70
|
+
"istanbul-smart-text-reporter": "^1.0.1",
|
|
69
71
|
"markdown-code-example-inserter": "^0.1.11",
|
|
70
72
|
"mocha": "^10.1.0",
|
|
71
73
|
"mocha-spec-reporter-with-file-names": "^0.0.2",
|
|
72
|
-
"nyc": "^15.1.0",
|
|
73
74
|
"prettier": "^2.8.0",
|
|
74
75
|
"prettier-plugin-jsdoc": "^0.4.2",
|
|
75
76
|
"prettier-plugin-multiline-arrays": "^1.1.1",
|
|
76
|
-
"prettier-plugin-organize-imports": "^3.2.
|
|
77
|
+
"prettier-plugin-organize-imports": "^3.2.1",
|
|
77
78
|
"prettier-plugin-packagejson": "^2.3.0",
|
|
78
79
|
"prettier-plugin-sort-json": "^0.0.3",
|
|
79
80
|
"prettier-plugin-toml": "^0.3.1",
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"type-fest": "^3.
|
|
81
|
+
"tsconfig-paths": "^4.1.1",
|
|
82
|
+
"tsx": "^3.12.1",
|
|
83
|
+
"type-fest": "^3.3.0",
|
|
83
84
|
"typescript": "^4.9.3",
|
|
84
85
|
"vite": "^3.2.4"
|
|
85
86
|
},
|