virmator 12.0.4 → 13.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 +224 -129
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +21 -5
- package/dist/index.d.ts +1416 -1310
- package/dist/index.js +25 -63
- package/dist/tests/test-virmator.mock.d.ts +3 -0
- package/dist/tests/test-virmator.mock.js +5 -0
- package/package.json +25 -69
- package/src/cli.ts +29 -0
- package/src/index.ts +26 -0
- package/src/tests/test-virmator.mock.ts +13 -0
- package/base-configs/base-cspell.js +0 -272
- package/base-configs/base-mocharc.cjs +0 -20
- package/base-configs/base-nyc.js +0 -40
- package/base-configs/base-prettierrc.js +0 -32
- package/base-configs/base-web-test-runner.mjs +0 -137
- package/base-configs/test-files-glob.js +0 -13
- package/base-configs/tsconfig.base.json +0 -32
- package/configs/.gitattributes +0 -2
- package/configs/.github/workflows/build-for-gh-pages.yml +0 -24
- package/configs/.github/workflows/tagged-release.yml +0 -41
- package/configs/.github/workflows/tests.yml +0 -25
- package/configs/.nvmrc +0 -1
- package/configs/.prettierignore +0 -11
- package/configs/.prettierrc.js +0 -13
- package/configs/.vscode/settings.json +0 -50
- package/configs/LICENSE-CC0 +0 -121
- package/configs/LICENSE-MIT +0 -21
- package/configs/configs/dep-cruiser.config.ts +0 -22
- package/configs/configs/mocha.config.cjs +0 -8
- package/configs/configs/ncu.config.ts +0 -12
- package/configs/configs/nyc.config.js +0 -7
- package/configs/configs/typedoc.config.ts +0 -20
- package/configs/configs/vite.config.ts +0 -14
- package/configs/configs/web-test-runner.config.mjs +0 -21
- package/configs/cspell.config.cjs +0 -11
- package/configs/dep-cruiser.config.ts +0 -22
- package/configs/gitignore.txt +0 -13
- package/configs/ncu.config.ts +0 -13
- package/configs/npmignore.txt +0 -26
- package/configs/package.json +0 -23
- package/configs/src/index.html +0 -12
- package/configs/src/ui/elements/vir-app.element.ts +0 -10
- package/configs/tsconfig.json +0 -16
- package/configs/www-static/_redirects +0 -1
- package/configs/www-static/index.css +0 -7
- package/cspell.config.cjs +0 -13
- package/dist/api/command/command-configs.d.ts +0 -3
- package/dist/api/command/command-configs.js +0 -10
- package/dist/api/command/command-description.d.ts +0 -8
- package/dist/api/command/command-description.js +0 -2
- package/dist/api/command/command-executor.d.ts +0 -30
- package/dist/api/command/command-executor.js +0 -6
- package/dist/api/command/command-help.d.ts +0 -8
- package/dist/api/command/command-help.js +0 -2
- package/dist/api/command/command-logging.d.ts +0 -11
- package/dist/api/command/command-logging.js +0 -17
- package/dist/api/command/command-mapping.d.ts +0 -7
- package/dist/api/command/command-mapping.js +0 -9
- package/dist/api/command/command-messages.d.ts +0 -1
- package/dist/api/command/command-messages.js +0 -9
- package/dist/api/command/command-to-help-message.d.ts +0 -9
- package/dist/api/command/command-to-help-message.js +0 -175
- package/dist/api/command/define-command-inputs.d.ts +0 -22
- package/dist/api/command/define-command-inputs.js +0 -8
- package/dist/api/command/define-command.d.ts +0 -22
- package/dist/api/command/define-command.js +0 -41
- package/dist/api/config/config-file-definition.d.ts +0 -15
- package/dist/api/config/config-file-definition.js +0 -2
- package/dist/api/config/config-paths.d.ts +0 -7
- package/dist/api/config/config-paths.js +0 -7
- package/dist/api/config/copy-config.d.ts +0 -27
- package/dist/api/config/copy-config.js +0 -98
- package/dist/api/create-virmator.d.ts +0 -8
- package/dist/api/create-virmator.js +0 -67
- package/dist/api/run-command/check-npm-deps.d.ts +0 -8
- package/dist/api/run-command/check-npm-deps.js +0 -111
- package/dist/api/run-command/extract-arguments.d.ts +0 -6
- package/dist/api/run-command/extract-arguments.js +0 -36
- package/dist/api/run-command/run-command-executor.d.ts +0 -5
- package/dist/api/run-command/run-command-executor.js +0 -50
- package/dist/api/run-command/run-extended-virmator.d.ts +0 -10
- package/dist/api/run-command/run-extended-virmator.js +0 -53
- package/dist/api/run-command/run-shell-command.d.ts +0 -8
- package/dist/api/run-command/run-shell-command.js +0 -21
- package/dist/api/virmator-types.d.ts +0 -18
- package/dist/api/virmator-types.js +0 -2
- package/dist/augments/array.d.ts +0 -1
- package/dist/augments/array.js +0 -6
- package/dist/augments/console.d.ts +0 -9
- package/dist/augments/console.js +0 -43
- package/dist/augments/fs.d.ts +0 -11
- package/dist/augments/fs.js +0 -71
- package/dist/augments/git.d.ts +0 -1
- package/dist/augments/git.js +0 -12
- package/dist/augments/json.d.ts +0 -1
- package/dist/augments/json.js +0 -11
- package/dist/augments/npm.d.ts +0 -11
- package/dist/augments/npm.js +0 -52
- package/dist/augments/object.d.ts +0 -4
- package/dist/augments/object.js +0 -44
- package/dist/augments/path.d.ts +0 -1
- package/dist/augments/path.js +0 -12
- package/dist/augments/prettier.d.ts +0 -1
- package/dist/augments/prettier.js +0 -52
- package/dist/augments/regexp.d.ts +0 -1
- package/dist/augments/regexp.js +0 -6
- package/dist/augments/string.d.ts +0 -2
- package/dist/augments/string.js +0 -9
- package/dist/augments/type.d.ts +0 -1
- package/dist/augments/type.js +0 -2
- package/dist/augments/typescript-config-file.d.ts +0 -5
- package/dist/augments/typescript-config-file.js +0 -62
- package/dist/commands/compile.command.d.ts +0 -84
- package/dist/commands/compile.command.js +0 -58
- package/dist/commands/deps.command.d.ts +0 -144
- package/dist/commands/deps.command.js +0 -208
- package/dist/commands/docs.command.d.ts +0 -99
- package/dist/commands/docs.command.js +0 -192
- package/dist/commands/extra-configs/all-extra-configs.d.ts +0 -2
- package/dist/commands/extra-configs/all-extra-configs.js +0 -71
- package/dist/commands/extra-configs/combine-json-config.d.ts +0 -2
- package/dist/commands/extra-configs/combine-json-config.js +0 -21
- package/dist/commands/extra-configs/combine-text-config.d.ts +0 -2
- package/dist/commands/extra-configs/combine-text-config.js +0 -26
- package/dist/commands/extra-configs/create-default-package-json.d.ts +0 -1
- package/dist/commands/extra-configs/create-default-package-json.js +0 -86
- package/dist/commands/format.command.d.ts +0 -215
- package/dist/commands/format.command.js +0 -157
- package/dist/commands/frontend.command.d.ts +0 -149
- package/dist/commands/frontend.command.js +0 -140
- package/dist/commands/init.command.d.ts +0 -163
- package/dist/commands/init.command.js +0 -53
- package/dist/commands/publish.command.d.ts +0 -33
- package/dist/commands/publish.command.js +0 -193
- package/dist/commands/spellcheck.command.d.ts +0 -74
- package/dist/commands/spellcheck.command.js +0 -60
- package/dist/commands/test-web.command.d.ts +0 -189
- package/dist/commands/test-web.command.js +0 -125
- package/dist/commands/test.command.d.ts +0 -224
- package/dist/commands/test.command.js +0 -100
- package/dist/commands/update-configs.command.d.ts +0 -33
- package/dist/commands/update-configs.command.js +0 -35
- package/dist/compiled-base-configs/base-dep-cruiser.config.d.ts +0 -195
- package/dist/compiled-base-configs/base-dep-cruiser.config.js +0 -206
- package/dist/compiled-base-configs/base-ncu.d.ts +0 -6
- package/dist/compiled-base-configs/base-ncu.js +0 -16
- package/dist/compiled-base-configs/base-typedoc.d.ts +0 -3
- package/dist/compiled-base-configs/base-typedoc.js +0 -36
- package/dist/compiled-base-configs/base-vite.d.ts +0 -27
- package/dist/compiled-base-configs/base-vite.js +0 -74
- package/dist/compiled-base-configs/vite-always-reload-plugin.d.ts +0 -10
- package/dist/compiled-base-configs/vite-always-reload-plugin.js +0 -99
- package/dist/file-paths/package-paths.d.ts +0 -12
- package/dist/file-paths/package-paths.js +0 -46
- package/dist/scripts/save-help-message.d.ts +0 -1
- package/dist/scripts/save-help-message.js +0 -33
- package/mocha.config.cjs +0 -16
package/dist/index.js
CHANGED
|
@@ -1,63 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const spellcheck_command_1 = require("./commands/spellcheck.command");
|
|
27
|
-
const test_web_command_1 = require("./commands/test-web.command");
|
|
28
|
-
const test_command_1 = require("./commands/test.command");
|
|
29
|
-
const update_configs_command_1 = require("./commands/update-configs.command");
|
|
30
|
-
const package_paths_1 = require("./file-paths/package-paths");
|
|
31
|
-
__exportStar(require("./api/command/command-description"), exports);
|
|
32
|
-
__exportStar(require("./api/command/command-executor"), exports);
|
|
33
|
-
__exportStar(require("./api/command/command-help"), exports);
|
|
34
|
-
__exportStar(require("./api/command/command-logging"), exports);
|
|
35
|
-
__exportStar(require("./api/command/command-mapping"), exports);
|
|
36
|
-
__exportStar(require("./api/command/command-messages"), exports);
|
|
37
|
-
__exportStar(require("./api/command/command-to-help-message"), exports);
|
|
38
|
-
__exportStar(require("./api/command/define-command"), exports);
|
|
39
|
-
__exportStar(require("./api/command/define-command-inputs"), exports);
|
|
40
|
-
__exportStar(require("./api/config/config-file-definition"), exports);
|
|
41
|
-
__exportStar(require("./api/config/config-paths"), exports);
|
|
42
|
-
__exportStar(require("./api/create-virmator"), exports);
|
|
43
|
-
__exportStar(require("./api/virmator-types"), exports);
|
|
44
|
-
__exportStar(require("./commands/extra-configs/combine-text-config"), exports);
|
|
45
|
-
var package_paths_2 = require("./file-paths/package-paths");
|
|
46
|
-
Object.defineProperty(exports, "getNpmBinPath", { enumerable: true, get: function () { return package_paths_2.getNpmBinPath; } });
|
|
47
|
-
exports.virmator = (0, create_virmator_1.createVirmator)({
|
|
48
|
-
packageBinName: 'virmator',
|
|
49
|
-
packageRootDir: package_paths_1.virmatorPackageDir,
|
|
50
|
-
commandDefinitions: [
|
|
51
|
-
compile_command_1.compileCommandDefinition,
|
|
52
|
-
deps_command_1.depsCommandDefinition,
|
|
53
|
-
docs_command_1.docsCommandDefinition,
|
|
54
|
-
format_command_1.formatCommandDefinition,
|
|
55
|
-
frontend_command_1.frontendCommandDefinition,
|
|
56
|
-
init_command_1.initCommandDefinition,
|
|
57
|
-
publish_command_1.publishCommandDefinition,
|
|
58
|
-
spellcheck_command_1.spellcheckCommandDefinition,
|
|
59
|
-
test_command_1.testCommandDefinition,
|
|
60
|
-
test_web_command_1.testWebCommandDefinition,
|
|
61
|
-
update_configs_command_1.updateConfigsCommandDefinition,
|
|
62
|
-
],
|
|
63
|
-
});
|
|
1
|
+
import { virmatorCompilePlugin } from '@virmator/compile';
|
|
2
|
+
import { virmatorDepsPlugin } from '@virmator/deps';
|
|
3
|
+
import { virmatorDocsPlugin } from '@virmator/docs';
|
|
4
|
+
import { virmatorFormatPlugin } from '@virmator/format';
|
|
5
|
+
import { virmatorFrontendPlugin } from '@virmator/frontend';
|
|
6
|
+
import { virmatorHelpPlugin } from '@virmator/help';
|
|
7
|
+
import { virmatorInitPlugin } from '@virmator/init';
|
|
8
|
+
import { virmatorLintPlugin } from '@virmator/lint';
|
|
9
|
+
import { virmatorPublishPlugin } from '@virmator/publish';
|
|
10
|
+
import { virmatorSpellcheckPlugin } from '@virmator/spellcheck';
|
|
11
|
+
import { virmatorTestPlugin } from '@virmator/test';
|
|
12
|
+
/** Default list of plugins that the virmator npm package's CLI uses. */
|
|
13
|
+
export const defaultVirmatorPlugins = [
|
|
14
|
+
virmatorCompilePlugin,
|
|
15
|
+
virmatorDepsPlugin,
|
|
16
|
+
virmatorDocsPlugin,
|
|
17
|
+
virmatorFormatPlugin,
|
|
18
|
+
virmatorFrontendPlugin,
|
|
19
|
+
virmatorHelpPlugin,
|
|
20
|
+
virmatorInitPlugin,
|
|
21
|
+
virmatorLintPlugin,
|
|
22
|
+
virmatorPublishPlugin,
|
|
23
|
+
virmatorSpellcheckPlugin,
|
|
24
|
+
virmatorTestPlugin,
|
|
25
|
+
];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { testPlugin } from '@virmator/plugin-testing';
|
|
2
|
+
import { defaultVirmatorPlugins } from '../index';
|
|
3
|
+
export async function testVirmator(shouldPass, context, command, cwd, testOptions = {}) {
|
|
4
|
+
await testPlugin(shouldPass, context, defaultVirmatorPlugins, command, cwd, testOptions);
|
|
5
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "virmator",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.1",
|
|
4
4
|
"description": "Handle common package configs, commands, and dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -20,85 +20,41 @@
|
|
|
20
20
|
"type": "git",
|
|
21
21
|
"url": "git+https://github.com/electrovir/virmator.git"
|
|
22
22
|
},
|
|
23
|
-
"license": "MIT",
|
|
23
|
+
"license": "(MIT or CC0 1.0)",
|
|
24
24
|
"author": {
|
|
25
25
|
"name": "electrovir",
|
|
26
26
|
"url": "https://github.com/electrovir"
|
|
27
27
|
},
|
|
28
|
+
"type": "module",
|
|
28
29
|
"main": "dist/index.js",
|
|
30
|
+
"module": "dist/index.js",
|
|
29
31
|
"types": "dist/index.d.ts",
|
|
30
|
-
"bin": "
|
|
32
|
+
"bin": "src/cli.ts",
|
|
31
33
|
"scripts": {
|
|
32
|
-
"compile": "
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"format:base": "prettier \"./**/*.+(ts|json|html|css|md|js)\" --config .prettierrc.js",
|
|
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.cjs",
|
|
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
|
-
"test:format": "npm run format:base -- --check",
|
|
41
|
-
"test:help": "ts-node src/cli/cli.ts --help",
|
|
42
|
-
"test:spelling": "cspell \"{*,.*,**/{.*,*}/**/{.*,*}}\" --exclude \"test-files/spellcheck/invalid-spellcheck-repo/**/*\" --exclude \"extender-configs\"",
|
|
43
|
-
"test:types": "tsc --noEmit"
|
|
34
|
+
"compile": "virmator compile",
|
|
35
|
+
"test": "virmator test node",
|
|
36
|
+
"test:coverage": "npm test coverage",
|
|
37
|
+
"test:update": "npm test update"
|
|
44
38
|
},
|
|
45
39
|
"dependencies": {
|
|
46
|
-
"@augment-vir/common": "^29.3.0",
|
|
47
40
|
"@augment-vir/node-js": "^29.3.0",
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
41
|
+
"@virmator/compile": "^13.0.1",
|
|
42
|
+
"@virmator/core": "^13.0.1",
|
|
43
|
+
"@virmator/deps": "^13.0.1",
|
|
44
|
+
"@virmator/docs": "^13.0.1",
|
|
45
|
+
"@virmator/format": "^13.0.1",
|
|
46
|
+
"@virmator/frontend": "^13.0.1",
|
|
47
|
+
"@virmator/help": "^13.0.1",
|
|
48
|
+
"@virmator/init": "^13.0.1",
|
|
49
|
+
"@virmator/lint": "^13.0.1",
|
|
50
|
+
"@virmator/publish": "^13.0.1",
|
|
51
|
+
"@virmator/spellcheck": "^13.0.1",
|
|
52
|
+
"@virmator/test": "^13.0.1",
|
|
53
|
+
"tsx": "^4.16.5"
|
|
57
54
|
},
|
|
58
55
|
"devDependencies": {
|
|
59
|
-
"@
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"@types/chai": "^4.3.16",
|
|
63
|
-
"@types/fs-extra": "^11.0.4",
|
|
64
|
-
"@types/glob": "^8.1.0",
|
|
65
|
-
"@types/mocha": "^10.0.7",
|
|
66
|
-
"@types/node": "^20.14.11",
|
|
67
|
-
"@types/semver": "^7.5.8",
|
|
68
|
-
"@web/dev-server-esbuild": "^1.0.2",
|
|
69
|
-
"@web/test-runner": "^0.18.2",
|
|
70
|
-
"@web/test-runner-commands": "^0.9.0",
|
|
71
|
-
"@web/test-runner-playwright": "^0.11.0",
|
|
72
|
-
"@web/test-runner-visual-regression": "^0.9.0",
|
|
73
|
-
"chai": "^4.3.10",
|
|
74
|
-
"cspell": "^8.11.0",
|
|
75
|
-
"dependency-cruiser": "^16.3.7",
|
|
76
|
-
"element-vir": "^22.2.2",
|
|
77
|
-
"esbuild": "^0.23.0",
|
|
78
|
-
"istanbul-smart-text-reporter": "^1.1.4",
|
|
79
|
-
"markdown-code-example-inserter": "^1.0.0",
|
|
80
|
-
"mocha": "^10.6.0",
|
|
81
|
-
"mocha-spec-reporter-with-file-names": "^0.0.3",
|
|
82
|
-
"npm-check-updates": "~16.12.3",
|
|
83
|
-
"prettier": "^3.3.3",
|
|
84
|
-
"prettier-plugin-interpolated-html-tags": "^1.0.5",
|
|
85
|
-
"prettier-plugin-jsdoc": "^1.3.0",
|
|
86
|
-
"prettier-plugin-multiline-arrays": "^3.0.6",
|
|
87
|
-
"prettier-plugin-organize-imports": "^4.0.0",
|
|
88
|
-
"prettier-plugin-packagejson": "^2.5.1",
|
|
89
|
-
"prettier-plugin-sort-json": "^4.0.0",
|
|
90
|
-
"prettier-plugin-toml": "^2.0.1",
|
|
91
|
-
"test-as-package": "^1.0.0",
|
|
92
|
-
"test-established-expectations": "^1.0.0",
|
|
93
|
-
"ts-node": "^10.9.2",
|
|
94
|
-
"tsconfig-paths": "^4.2.0",
|
|
95
|
-
"typedoc": "^0.26.4",
|
|
96
|
-
"typescript": "^5.5.3",
|
|
97
|
-
"virmator": "^12.0.2",
|
|
98
|
-
"vite": "^4.5.0",
|
|
99
|
-
"vite-tsconfig-paths": "^4.3.2"
|
|
100
|
-
},
|
|
101
|
-
"overrides": {
|
|
102
|
-
"virmator": "*"
|
|
56
|
+
"@types/node": "^22.1.0",
|
|
57
|
+
"c8": "^10.1.2",
|
|
58
|
+
"istanbul-smart-text-reporter": "^1.1.4"
|
|
103
59
|
}
|
|
104
60
|
}
|
package/src/cli.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env -S npx tsx
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
createPluginLogger,
|
|
5
|
+
executeVirmatorCommand,
|
|
6
|
+
hideNoTraceTraces,
|
|
7
|
+
VirmatorNoTraceError,
|
|
8
|
+
} from '@virmator/core';
|
|
9
|
+
import {fileURLToPath} from 'node:url';
|
|
10
|
+
import {defaultVirmatorPlugins} from './index';
|
|
11
|
+
|
|
12
|
+
const log = createPluginLogger(process);
|
|
13
|
+
|
|
14
|
+
executeVirmatorCommand({
|
|
15
|
+
cliCommand: process.argv,
|
|
16
|
+
plugins: defaultVirmatorPlugins,
|
|
17
|
+
entryPointFilePath: fileURLToPath(import.meta.url),
|
|
18
|
+
log,
|
|
19
|
+
}).catch((error: unknown) => {
|
|
20
|
+
if (error instanceof VirmatorNoTraceError && hideNoTraceTraces) {
|
|
21
|
+
if (error.message) {
|
|
22
|
+
log.error(error.message);
|
|
23
|
+
}
|
|
24
|
+
} else {
|
|
25
|
+
log.error(error);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
process.exit(1);
|
|
29
|
+
});
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {virmatorCompilePlugin} from '@virmator/compile';
|
|
2
|
+
import {virmatorDepsPlugin} from '@virmator/deps';
|
|
3
|
+
import {virmatorDocsPlugin} from '@virmator/docs';
|
|
4
|
+
import {virmatorFormatPlugin} from '@virmator/format';
|
|
5
|
+
import {virmatorFrontendPlugin} from '@virmator/frontend';
|
|
6
|
+
import {virmatorHelpPlugin} from '@virmator/help';
|
|
7
|
+
import {virmatorInitPlugin} from '@virmator/init';
|
|
8
|
+
import {virmatorLintPlugin} from '@virmator/lint';
|
|
9
|
+
import {virmatorPublishPlugin} from '@virmator/publish';
|
|
10
|
+
import {virmatorSpellcheckPlugin} from '@virmator/spellcheck';
|
|
11
|
+
import {virmatorTestPlugin} from '@virmator/test';
|
|
12
|
+
|
|
13
|
+
/** Default list of plugins that the virmator npm package's CLI uses. */
|
|
14
|
+
export const defaultVirmatorPlugins = [
|
|
15
|
+
virmatorCompilePlugin,
|
|
16
|
+
virmatorDepsPlugin,
|
|
17
|
+
virmatorDocsPlugin,
|
|
18
|
+
virmatorFormatPlugin,
|
|
19
|
+
virmatorFrontendPlugin,
|
|
20
|
+
virmatorHelpPlugin,
|
|
21
|
+
virmatorInitPlugin,
|
|
22
|
+
virmatorLintPlugin,
|
|
23
|
+
virmatorPublishPlugin,
|
|
24
|
+
virmatorSpellcheckPlugin,
|
|
25
|
+
virmatorTestPlugin,
|
|
26
|
+
];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {testPlugin, TestPluginOptions} from '@virmator/plugin-testing';
|
|
2
|
+
import {TestContext} from 'node:test';
|
|
3
|
+
import {defaultVirmatorPlugins} from '../index';
|
|
4
|
+
|
|
5
|
+
export async function testVirmator(
|
|
6
|
+
shouldPass: boolean,
|
|
7
|
+
context: TestContext,
|
|
8
|
+
command: string,
|
|
9
|
+
cwd: string,
|
|
10
|
+
testOptions: TestPluginOptions = {},
|
|
11
|
+
) {
|
|
12
|
+
await testPlugin(shouldPass, context, defaultVirmatorPlugins, command, cwd, testOptions);
|
|
13
|
+
}
|
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
const baseConfig = {
|
|
2
|
-
ignorePaths: [
|
|
3
|
-
'.DS_Store',
|
|
4
|
-
'.git/',
|
|
5
|
-
'*.docx',
|
|
6
|
-
'*.mp4',
|
|
7
|
-
'*.otf',
|
|
8
|
-
'*.sqlite',
|
|
9
|
-
'*.tgz',
|
|
10
|
-
'**/.not-committed/',
|
|
11
|
-
'**/build/',
|
|
12
|
-
'**/coverage/',
|
|
13
|
-
'**/dist-*/',
|
|
14
|
-
'**/dist/',
|
|
15
|
-
'**/graphics/',
|
|
16
|
-
'**/node_modules/',
|
|
17
|
-
'generated-config-*',
|
|
18
|
-
'package-lock.json',
|
|
19
|
-
'tsconfig.tsbuildinfo',
|
|
20
|
-
],
|
|
21
|
-
version: '0.2',
|
|
22
|
-
words: [
|
|
23
|
-
'accum',
|
|
24
|
-
'adak',
|
|
25
|
-
'addis_ababa',
|
|
26
|
-
'anadyr',
|
|
27
|
-
'apca',
|
|
28
|
-
'aqtau',
|
|
29
|
-
'aqtobe',
|
|
30
|
-
'araguaina',
|
|
31
|
-
'argb',
|
|
32
|
-
'atikokan',
|
|
33
|
-
'atyrau',
|
|
34
|
-
'autocorrect',
|
|
35
|
-
'autofix',
|
|
36
|
-
'autofixable',
|
|
37
|
-
'autofixing',
|
|
38
|
-
'bahia_banderas',
|
|
39
|
-
'bazel',
|
|
40
|
-
'bignumber',
|
|
41
|
-
'blanc-sablon',
|
|
42
|
-
'bowser',
|
|
43
|
-
'browserconfig',
|
|
44
|
-
'browserlist',
|
|
45
|
-
'browserslist',
|
|
46
|
-
'catamarca',
|
|
47
|
-
'checkmark',
|
|
48
|
-
'choibalsan',
|
|
49
|
-
'chuuk',
|
|
50
|
-
'codegen',
|
|
51
|
-
'codeowners',
|
|
52
|
-
'colorjs',
|
|
53
|
-
'combinator',
|
|
54
|
-
'combinators',
|
|
55
|
-
'comodrivadavia',
|
|
56
|
-
'costa_rica',
|
|
57
|
-
'cpsell',
|
|
58
|
-
'creston',
|
|
59
|
-
'cuiaba',
|
|
60
|
-
'danmarkshavn',
|
|
61
|
-
'darkgreen',
|
|
62
|
-
'darkred',
|
|
63
|
-
'datamodel',
|
|
64
|
-
'datasource',
|
|
65
|
-
'datetime',
|
|
66
|
-
'deduped',
|
|
67
|
-
'depcruise',
|
|
68
|
-
'derp',
|
|
69
|
-
'describedby',
|
|
70
|
-
'devs',
|
|
71
|
-
'dexie',
|
|
72
|
-
'dili',
|
|
73
|
-
'dmmf',
|
|
74
|
-
'docgen',
|
|
75
|
-
'dodgerblue',
|
|
76
|
-
'drawio',
|
|
77
|
-
'dumontdurville',
|
|
78
|
-
'efate',
|
|
79
|
-
'eirunepe',
|
|
80
|
-
'el_aaiun',
|
|
81
|
-
'electrovir',
|
|
82
|
-
'enderbury',
|
|
83
|
-
'ensenada',
|
|
84
|
-
'entrypoint',
|
|
85
|
-
'entrypoints',
|
|
86
|
-
'esbenp',
|
|
87
|
-
'esbuild',
|
|
88
|
-
'estree',
|
|
89
|
-
'eucla',
|
|
90
|
-
'evenodd',
|
|
91
|
-
'evir',
|
|
92
|
-
'exitcrash',
|
|
93
|
-
'fakaofo',
|
|
94
|
-
'faunadb',
|
|
95
|
-
'firestore',
|
|
96
|
-
'fleek',
|
|
97
|
-
'fontawesome',
|
|
98
|
-
'fontsource',
|
|
99
|
-
'gamepad',
|
|
100
|
-
'gitattributes',
|
|
101
|
-
'globbing',
|
|
102
|
-
'globby',
|
|
103
|
-
'globstar',
|
|
104
|
-
'hardline',
|
|
105
|
-
'hcaptcha',
|
|
106
|
-
'heightmaps',
|
|
107
|
-
'ho_chi_minh',
|
|
108
|
-
'hovd',
|
|
109
|
-
'htmliframeelement',
|
|
110
|
-
'iframe',
|
|
111
|
-
'iframes',
|
|
112
|
-
'inconsolata',
|
|
113
|
-
'indexeddb',
|
|
114
|
-
'inuvik',
|
|
115
|
-
'jan_mayen',
|
|
116
|
-
'jetpack',
|
|
117
|
-
'jsonifiable',
|
|
118
|
-
'jsonify',
|
|
119
|
-
'jsplugin',
|
|
120
|
-
'jujuy',
|
|
121
|
-
'kanton',
|
|
122
|
-
'khandyga',
|
|
123
|
-
'kiritimati',
|
|
124
|
-
'kolkata',
|
|
125
|
-
'kosrae',
|
|
126
|
-
'kuala_lumpur',
|
|
127
|
-
'la_rioja',
|
|
128
|
-
'labelledby',
|
|
129
|
-
'lexend',
|
|
130
|
-
'lfsr',
|
|
131
|
-
'licensecheck',
|
|
132
|
-
'limnah',
|
|
133
|
-
'lindeman',
|
|
134
|
-
'listbox',
|
|
135
|
-
'localforage',
|
|
136
|
-
'localmodule',
|
|
137
|
-
'localstorage',
|
|
138
|
-
'locationchange',
|
|
139
|
-
'longterm',
|
|
140
|
-
'luxon',
|
|
141
|
-
'macquarie',
|
|
142
|
-
'magadan',
|
|
143
|
-
'mahe',
|
|
144
|
-
'manaus',
|
|
145
|
-
'marvinpinto',
|
|
146
|
-
'mcmurdo',
|
|
147
|
-
'mdast',
|
|
148
|
-
'mergeable',
|
|
149
|
-
'metlakatla',
|
|
150
|
-
'millis',
|
|
151
|
-
'minecraft',
|
|
152
|
-
'mmultiline',
|
|
153
|
-
'mocharc',
|
|
154
|
-
'monospace',
|
|
155
|
-
'mpath',
|
|
156
|
-
'msapplication',
|
|
157
|
-
'mstile',
|
|
158
|
-
'ncurc',
|
|
159
|
-
'nipigon',
|
|
160
|
-
'nodir',
|
|
161
|
-
'nojekyll',
|
|
162
|
-
'noopener',
|
|
163
|
-
'noreferrer',
|
|
164
|
-
'noronha',
|
|
165
|
-
'npmchecker',
|
|
166
|
-
'npmignore',
|
|
167
|
-
'nuuk',
|
|
168
|
-
'nvmrc',
|
|
169
|
-
'nycrc',
|
|
170
|
-
'observavir',
|
|
171
|
-
'ojinaga',
|
|
172
|
-
'openlogin',
|
|
173
|
-
'opentype',
|
|
174
|
-
'outfile',
|
|
175
|
-
'packagejson',
|
|
176
|
-
'pago_pago',
|
|
177
|
-
'pako',
|
|
178
|
-
'pangnirtung',
|
|
179
|
-
'parens',
|
|
180
|
-
'pdfs',
|
|
181
|
-
'peta',
|
|
182
|
-
'phnom_penh',
|
|
183
|
-
'pibling',
|
|
184
|
-
'pkgid',
|
|
185
|
-
'pohnpei',
|
|
186
|
-
'port_moresby',
|
|
187
|
-
'portfinder',
|
|
188
|
-
'porto_velho',
|
|
189
|
-
'postpack',
|
|
190
|
-
'postpublish',
|
|
191
|
-
'postupgrade',
|
|
192
|
-
'preinstall',
|
|
193
|
-
'premajor',
|
|
194
|
-
'preminor',
|
|
195
|
-
'prepatch',
|
|
196
|
-
'prettierignore',
|
|
197
|
-
'prettierrc',
|
|
198
|
-
'preupgrade',
|
|
199
|
-
'prismjs',
|
|
200
|
-
'promisable',
|
|
201
|
-
'protobuf',
|
|
202
|
-
'punta_arenas',
|
|
203
|
-
'pushstate',
|
|
204
|
-
'qostanay',
|
|
205
|
-
'qyzylorda',
|
|
206
|
-
'referrerpolicy',
|
|
207
|
-
'regen',
|
|
208
|
-
'rehype',
|
|
209
|
-
'replacestate',
|
|
210
|
-
'repos',
|
|
211
|
-
'revparse',
|
|
212
|
-
'rgba',
|
|
213
|
-
'rio_branco',
|
|
214
|
-
'roboto',
|
|
215
|
-
'rothera',
|
|
216
|
-
'santarem',
|
|
217
|
-
'santo_domingo',
|
|
218
|
-
'sao_paulo',
|
|
219
|
-
'scandir',
|
|
220
|
-
'scoresbysund',
|
|
221
|
-
'sigint',
|
|
222
|
-
'sigterm',
|
|
223
|
-
'skyblue',
|
|
224
|
-
'sonarjs',
|
|
225
|
-
'srednekolymsk',
|
|
226
|
-
'st_kitts',
|
|
227
|
-
'stackoverflow',
|
|
228
|
-
'stylelint',
|
|
229
|
-
'stylelintrc',
|
|
230
|
-
'sublicensable',
|
|
231
|
-
'svgr',
|
|
232
|
-
'svgs',
|
|
233
|
-
'syowa',
|
|
234
|
-
'tabbable',
|
|
235
|
-
'tabindex',
|
|
236
|
-
'tel_aviv',
|
|
237
|
-
'thingie',
|
|
238
|
-
'threejs',
|
|
239
|
-
'tiktok',
|
|
240
|
-
'tiraspol',
|
|
241
|
-
'tongatapu',
|
|
242
|
-
'transpiled',
|
|
243
|
-
'transpiling',
|
|
244
|
-
'truetype',
|
|
245
|
-
'tsbuildinfo',
|
|
246
|
-
'typeof',
|
|
247
|
-
'ulaanbaatar',
|
|
248
|
-
'uncompiled',
|
|
249
|
-
'uncomposable',
|
|
250
|
-
'unist',
|
|
251
|
-
'unlisten',
|
|
252
|
-
'ushuaia',
|
|
253
|
-
'ust-nera',
|
|
254
|
-
'uzhgorod',
|
|
255
|
-
'vevay',
|
|
256
|
-
'vira',
|
|
257
|
-
'virmator',
|
|
258
|
-
'vite',
|
|
259
|
-
'vitejs',
|
|
260
|
-
'websql',
|
|
261
|
-
'winamac',
|
|
262
|
-
'xlink',
|
|
263
|
-
'yakutat',
|
|
264
|
-
'yotta',
|
|
265
|
-
'zetta',
|
|
266
|
-
"config's",
|
|
267
|
-
"repo's",
|
|
268
|
-
"virmator's",
|
|
269
|
-
],
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
module.exports = {baseConfig};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const testFiles = require('./test-files-glob.js');
|
|
2
|
-
const SpecReporterWithFileNames = require('mocha-spec-reporter-with-file-names');
|
|
3
|
-
|
|
4
|
-
const oneMinuteMs = 60_000;
|
|
5
|
-
|
|
6
|
-
/** @type {import('mocha').MochaOptions} */
|
|
7
|
-
const mochaConfig = {
|
|
8
|
-
checkLeaks: true,
|
|
9
|
-
color: true,
|
|
10
|
-
parallel: true,
|
|
11
|
-
require: ['ts-node/register'],
|
|
12
|
-
slow: oneMinuteMs,
|
|
13
|
-
fullTrace: true,
|
|
14
|
-
timeout: 20 * oneMinuteMs,
|
|
15
|
-
reporter: SpecReporterWithFileNames.pathToThisReporter,
|
|
16
|
-
watchFiles: ['src/**/*.ts'],
|
|
17
|
-
...testFiles,
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
module.exports = mochaConfig;
|
package/base-configs/base-nyc.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function getBaseConfigWithCoveragePercent(percent = 0) {
|
|
4
|
-
return {
|
|
5
|
-
// only works with @electrovir/nyc
|
|
6
|
-
failBelow: percent,
|
|
7
|
-
|
|
8
|
-
branches: percent,
|
|
9
|
-
functions: percent,
|
|
10
|
-
lines: percent,
|
|
11
|
-
statements: percent,
|
|
12
|
-
|
|
13
|
-
extends: '@istanbuljs/nyc-config-typescript',
|
|
14
|
-
all: true,
|
|
15
|
-
clean: true,
|
|
16
|
-
cache: true,
|
|
17
|
-
instrument: true,
|
|
18
|
-
// use the reporter (istanbul-smart-text-reporter) to fail instead of printing errors for
|
|
19
|
-
// every message
|
|
20
|
-
checkCoverage: false,
|
|
21
|
-
exclude: [
|
|
22
|
-
'**/*.test.ts',
|
|
23
|
-
'**/*.example.ts',
|
|
24
|
-
'**/*.type.test.ts',
|
|
25
|
-
'**/*.test-helper.ts',
|
|
26
|
-
],
|
|
27
|
-
include: ['src/**/*.ts'],
|
|
28
|
-
// so we don't get error messages printed for every file
|
|
29
|
-
perFile: false,
|
|
30
|
-
reporter: [
|
|
31
|
-
'html',
|
|
32
|
-
'istanbul-smart-text-reporter',
|
|
33
|
-
],
|
|
34
|
-
skipEmpty: true,
|
|
35
|
-
skipFull: true,
|
|
36
|
-
tempDir: './node_modules/.nyc-output/',
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
module.exports = {getBaseConfigWithCoveragePercent};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {import('prettier-plugin-multiline-arrays').MultilineArrayOptions} MultilineOptions
|
|
3
|
-
*
|
|
4
|
-
* @typedef {import('prettier').Options} PrettierOptions
|
|
5
|
-
* @type {PrettierOptions & MultilineOptions}
|
|
6
|
-
*/
|
|
7
|
-
const basePrettierConfig = {
|
|
8
|
-
arrowParens: 'always',
|
|
9
|
-
bracketSameLine: false,
|
|
10
|
-
bracketSpacing: false,
|
|
11
|
-
endOfLine: 'lf',
|
|
12
|
-
htmlWhitespaceSensitivity: 'ignore',
|
|
13
|
-
jsonRecursiveSort: true,
|
|
14
|
-
multilineArraysWrapThreshold: 1,
|
|
15
|
-
plugins: [
|
|
16
|
-
'prettier-plugin-toml',
|
|
17
|
-
'prettier-plugin-sort-json',
|
|
18
|
-
'prettier-plugin-packagejson',
|
|
19
|
-
'prettier-plugin-multiline-arrays',
|
|
20
|
-
'prettier-plugin-organize-imports',
|
|
21
|
-
'prettier-plugin-jsdoc',
|
|
22
|
-
'prettier-plugin-interpolated-html-tags',
|
|
23
|
-
],
|
|
24
|
-
printWidth: 100,
|
|
25
|
-
singleQuote: true,
|
|
26
|
-
tabWidth: 4,
|
|
27
|
-
trailingComma: 'all',
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
module.exports = {
|
|
31
|
-
basePrettierConfig,
|
|
32
|
-
};
|