virmator 12.0.3 → 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.
Files changed (158) hide show
  1. package/README.md +224 -129
  2. package/dist/cli.d.ts +1 -1
  3. package/dist/cli.js +21 -5
  4. package/dist/index.d.ts +1416 -1310
  5. package/dist/index.js +25 -63
  6. package/dist/tests/test-virmator.mock.d.ts +3 -0
  7. package/dist/tests/test-virmator.mock.js +5 -0
  8. package/package.json +25 -69
  9. package/src/cli.ts +29 -0
  10. package/src/index.ts +26 -0
  11. package/src/tests/test-virmator.mock.ts +13 -0
  12. package/base-configs/base-cspell.js +0 -272
  13. package/base-configs/base-mocharc.cjs +0 -20
  14. package/base-configs/base-nyc.js +0 -40
  15. package/base-configs/base-prettierrc.js +0 -32
  16. package/base-configs/base-web-test-runner.mjs +0 -137
  17. package/base-configs/test-files-glob.js +0 -13
  18. package/base-configs/tsconfig.base.json +0 -32
  19. package/configs/.gitattributes +0 -2
  20. package/configs/.github/workflows/build-for-gh-pages.yml +0 -24
  21. package/configs/.github/workflows/tagged-release.yml +0 -41
  22. package/configs/.github/workflows/tests.yml +0 -25
  23. package/configs/.nvmrc +0 -1
  24. package/configs/.prettierignore +0 -11
  25. package/configs/.prettierrc.js +0 -13
  26. package/configs/.vscode/settings.json +0 -50
  27. package/configs/LICENSE-CC0 +0 -121
  28. package/configs/LICENSE-MIT +0 -21
  29. package/configs/configs/dep-cruiser.config.ts +0 -22
  30. package/configs/configs/mocha.config.cjs +0 -8
  31. package/configs/configs/ncu.config.ts +0 -12
  32. package/configs/configs/nyc.config.js +0 -7
  33. package/configs/configs/typedoc.config.ts +0 -20
  34. package/configs/configs/vite.config.ts +0 -14
  35. package/configs/configs/web-test-runner.config.mjs +0 -21
  36. package/configs/cspell.config.cjs +0 -11
  37. package/configs/dep-cruiser.config.ts +0 -22
  38. package/configs/gitignore.txt +0 -13
  39. package/configs/ncu.config.ts +0 -13
  40. package/configs/npmignore.txt +0 -26
  41. package/configs/package.json +0 -23
  42. package/configs/src/index.html +0 -12
  43. package/configs/src/ui/elements/vir-app.element.ts +0 -10
  44. package/configs/tsconfig.json +0 -16
  45. package/configs/www-static/_redirects +0 -1
  46. package/configs/www-static/index.css +0 -7
  47. package/cspell.config.cjs +0 -13
  48. package/dist/api/command/command-configs.d.ts +0 -3
  49. package/dist/api/command/command-configs.js +0 -10
  50. package/dist/api/command/command-description.d.ts +0 -8
  51. package/dist/api/command/command-description.js +0 -2
  52. package/dist/api/command/command-executor.d.ts +0 -30
  53. package/dist/api/command/command-executor.js +0 -6
  54. package/dist/api/command/command-help.d.ts +0 -8
  55. package/dist/api/command/command-help.js +0 -2
  56. package/dist/api/command/command-logging.d.ts +0 -11
  57. package/dist/api/command/command-logging.js +0 -17
  58. package/dist/api/command/command-mapping.d.ts +0 -7
  59. package/dist/api/command/command-mapping.js +0 -9
  60. package/dist/api/command/command-messages.d.ts +0 -1
  61. package/dist/api/command/command-messages.js +0 -9
  62. package/dist/api/command/command-to-help-message.d.ts +0 -9
  63. package/dist/api/command/command-to-help-message.js +0 -175
  64. package/dist/api/command/define-command-inputs.d.ts +0 -22
  65. package/dist/api/command/define-command-inputs.js +0 -8
  66. package/dist/api/command/define-command.d.ts +0 -22
  67. package/dist/api/command/define-command.js +0 -41
  68. package/dist/api/config/config-file-definition.d.ts +0 -15
  69. package/dist/api/config/config-file-definition.js +0 -2
  70. package/dist/api/config/config-paths.d.ts +0 -7
  71. package/dist/api/config/config-paths.js +0 -7
  72. package/dist/api/config/copy-config.d.ts +0 -27
  73. package/dist/api/config/copy-config.js +0 -98
  74. package/dist/api/create-virmator.d.ts +0 -8
  75. package/dist/api/create-virmator.js +0 -67
  76. package/dist/api/run-command/check-npm-deps.d.ts +0 -8
  77. package/dist/api/run-command/check-npm-deps.js +0 -111
  78. package/dist/api/run-command/extract-arguments.d.ts +0 -6
  79. package/dist/api/run-command/extract-arguments.js +0 -36
  80. package/dist/api/run-command/run-command-executor.d.ts +0 -5
  81. package/dist/api/run-command/run-command-executor.js +0 -50
  82. package/dist/api/run-command/run-extended-virmator.d.ts +0 -10
  83. package/dist/api/run-command/run-extended-virmator.js +0 -53
  84. package/dist/api/run-command/run-shell-command.d.ts +0 -8
  85. package/dist/api/run-command/run-shell-command.js +0 -21
  86. package/dist/api/virmator-types.d.ts +0 -18
  87. package/dist/api/virmator-types.js +0 -2
  88. package/dist/augments/array.d.ts +0 -1
  89. package/dist/augments/array.js +0 -6
  90. package/dist/augments/console.d.ts +0 -9
  91. package/dist/augments/console.js +0 -43
  92. package/dist/augments/fs.d.ts +0 -11
  93. package/dist/augments/fs.js +0 -71
  94. package/dist/augments/git.d.ts +0 -1
  95. package/dist/augments/git.js +0 -12
  96. package/dist/augments/json.d.ts +0 -1
  97. package/dist/augments/json.js +0 -11
  98. package/dist/augments/npm.d.ts +0 -11
  99. package/dist/augments/npm.js +0 -52
  100. package/dist/augments/object.d.ts +0 -4
  101. package/dist/augments/object.js +0 -44
  102. package/dist/augments/path.d.ts +0 -1
  103. package/dist/augments/path.js +0 -12
  104. package/dist/augments/prettier.d.ts +0 -1
  105. package/dist/augments/prettier.js +0 -52
  106. package/dist/augments/regexp.d.ts +0 -1
  107. package/dist/augments/regexp.js +0 -6
  108. package/dist/augments/string.d.ts +0 -2
  109. package/dist/augments/string.js +0 -9
  110. package/dist/augments/type.d.ts +0 -1
  111. package/dist/augments/type.js +0 -2
  112. package/dist/augments/typescript-config-file.d.ts +0 -5
  113. package/dist/augments/typescript-config-file.js +0 -62
  114. package/dist/commands/compile.command.d.ts +0 -84
  115. package/dist/commands/compile.command.js +0 -58
  116. package/dist/commands/deps.command.d.ts +0 -144
  117. package/dist/commands/deps.command.js +0 -208
  118. package/dist/commands/docs.command.d.ts +0 -99
  119. package/dist/commands/docs.command.js +0 -192
  120. package/dist/commands/extra-configs/all-extra-configs.d.ts +0 -2
  121. package/dist/commands/extra-configs/all-extra-configs.js +0 -71
  122. package/dist/commands/extra-configs/combine-json-config.d.ts +0 -2
  123. package/dist/commands/extra-configs/combine-json-config.js +0 -21
  124. package/dist/commands/extra-configs/combine-text-config.d.ts +0 -2
  125. package/dist/commands/extra-configs/combine-text-config.js +0 -26
  126. package/dist/commands/extra-configs/create-default-package-json.d.ts +0 -1
  127. package/dist/commands/extra-configs/create-default-package-json.js +0 -86
  128. package/dist/commands/format.command.d.ts +0 -215
  129. package/dist/commands/format.command.js +0 -157
  130. package/dist/commands/frontend.command.d.ts +0 -149
  131. package/dist/commands/frontend.command.js +0 -140
  132. package/dist/commands/init.command.d.ts +0 -163
  133. package/dist/commands/init.command.js +0 -53
  134. package/dist/commands/publish.command.d.ts +0 -33
  135. package/dist/commands/publish.command.js +0 -193
  136. package/dist/commands/spellcheck.command.d.ts +0 -74
  137. package/dist/commands/spellcheck.command.js +0 -60
  138. package/dist/commands/test-web.command.d.ts +0 -189
  139. package/dist/commands/test-web.command.js +0 -125
  140. package/dist/commands/test.command.d.ts +0 -224
  141. package/dist/commands/test.command.js +0 -100
  142. package/dist/commands/update-configs.command.d.ts +0 -33
  143. package/dist/commands/update-configs.command.js +0 -35
  144. package/dist/compiled-base-configs/base-dep-cruiser.config.d.ts +0 -195
  145. package/dist/compiled-base-configs/base-dep-cruiser.config.js +0 -206
  146. package/dist/compiled-base-configs/base-ncu.d.ts +0 -6
  147. package/dist/compiled-base-configs/base-ncu.js +0 -16
  148. package/dist/compiled-base-configs/base-typedoc.d.ts +0 -3
  149. package/dist/compiled-base-configs/base-typedoc.js +0 -36
  150. package/dist/compiled-base-configs/base-vite.d.ts +0 -27
  151. package/dist/compiled-base-configs/base-vite.js +0 -74
  152. package/dist/compiled-base-configs/vite-always-reload-plugin.d.ts +0 -10
  153. package/dist/compiled-base-configs/vite-always-reload-plugin.js +0 -99
  154. package/dist/file-paths/package-paths.d.ts +0 -12
  155. package/dist/file-paths/package-paths.js +0 -46
  156. package/dist/scripts/save-help-message.d.ts +0 -1
  157. package/dist/scripts/save-help-message.js +0 -33
  158. package/mocha.config.cjs +0 -16
@@ -1,149 +0,0 @@
1
- import { NpmDepTypeEnum } from '../api/command/define-command-inputs';
2
- export declare const frontendCommandDefinition: {
3
- commandName: "frontend";
4
- subCommandDescriptions: {
5
- readonly build: "Builds and bundles the frontend for deployment.";
6
- readonly preview: "Builds and previews the built output.";
7
- };
8
- configFiles: {
9
- readonly vite: {
10
- readonly copyFromInternalPath: string;
11
- readonly copyToPathRelativeToRepoDir: string;
12
- };
13
- };
14
- npmDeps: readonly [{
15
- readonly name: "@augment-vir/node-js";
16
- readonly type: NpmDepTypeEnum.Dev;
17
- }, {
18
- readonly name: "esbuild";
19
- readonly type: NpmDepTypeEnum.Dev;
20
- }, {
21
- readonly name: "typescript";
22
- readonly type: NpmDepTypeEnum.Dev;
23
- }, {
24
- readonly name: "vite-tsconfig-paths";
25
- readonly type: NpmDepTypeEnum.Dev;
26
- }, {
27
- readonly name: "vite";
28
- readonly type: NpmDepTypeEnum.Dev;
29
- }];
30
- } & {
31
- allAvailableSubCommands: readonly ("build" | "preview")[];
32
- subCommands: import("../api/command/define-command-inputs").SubCommandsMap<{
33
- commandName: "frontend";
34
- subCommandDescriptions: {
35
- readonly build: "Builds and bundles the frontend for deployment.";
36
- readonly preview: "Builds and previews the built output.";
37
- };
38
- configFiles: {
39
- readonly vite: {
40
- readonly copyFromInternalPath: string;
41
- readonly copyToPathRelativeToRepoDir: string;
42
- };
43
- };
44
- npmDeps: readonly [{
45
- readonly name: "@augment-vir/node-js";
46
- readonly type: NpmDepTypeEnum.Dev;
47
- }, {
48
- readonly name: "esbuild";
49
- readonly type: NpmDepTypeEnum.Dev;
50
- }, {
51
- readonly name: "typescript";
52
- readonly type: NpmDepTypeEnum.Dev;
53
- }, {
54
- readonly name: "vite-tsconfig-paths";
55
- readonly type: NpmDepTypeEnum.Dev;
56
- }, {
57
- readonly name: "vite";
58
- readonly type: NpmDepTypeEnum.Dev;
59
- }];
60
- }>;
61
- } & {
62
- executor: import("..").CommandExecutor<{
63
- commandName: "frontend";
64
- subCommandDescriptions: {
65
- readonly build: "Builds and bundles the frontend for deployment.";
66
- readonly preview: "Builds and previews the built output.";
67
- };
68
- configFiles: {
69
- readonly vite: {
70
- readonly copyFromInternalPath: string;
71
- readonly copyToPathRelativeToRepoDir: string;
72
- };
73
- };
74
- npmDeps: readonly [{
75
- readonly name: "@augment-vir/node-js";
76
- readonly type: NpmDepTypeEnum.Dev;
77
- }, {
78
- readonly name: "esbuild";
79
- readonly type: NpmDepTypeEnum.Dev;
80
- }, {
81
- readonly name: "typescript";
82
- readonly type: NpmDepTypeEnum.Dev;
83
- }, {
84
- readonly name: "vite-tsconfig-paths";
85
- readonly type: NpmDepTypeEnum.Dev;
86
- }, {
87
- readonly name: "vite";
88
- readonly type: NpmDepTypeEnum.Dev;
89
- }];
90
- }>;
91
- createDescription: import("..").CreateDescriptionsCallback<{
92
- commandName: "frontend";
93
- subCommandDescriptions: {
94
- readonly build: "Builds and bundles the frontend for deployment.";
95
- readonly preview: "Builds and previews the built output.";
96
- };
97
- configFiles: {
98
- readonly vite: {
99
- readonly copyFromInternalPath: string;
100
- readonly copyToPathRelativeToRepoDir: string;
101
- };
102
- };
103
- npmDeps: readonly [{
104
- readonly name: "@augment-vir/node-js";
105
- readonly type: NpmDepTypeEnum.Dev;
106
- }, {
107
- readonly name: "esbuild";
108
- readonly type: NpmDepTypeEnum.Dev;
109
- }, {
110
- readonly name: "typescript";
111
- readonly type: NpmDepTypeEnum.Dev;
112
- }, {
113
- readonly name: "vite-tsconfig-paths";
114
- readonly type: NpmDepTypeEnum.Dev;
115
- }, {
116
- readonly name: "vite";
117
- readonly type: NpmDepTypeEnum.Dev;
118
- }];
119
- }>;
120
- extend: import("../api/command/define-command").ExtendCallback<{
121
- commandName: "frontend";
122
- subCommandDescriptions: {
123
- readonly build: "Builds and bundles the frontend for deployment.";
124
- readonly preview: "Builds and previews the built output.";
125
- };
126
- configFiles: {
127
- readonly vite: {
128
- readonly copyFromInternalPath: string;
129
- readonly copyToPathRelativeToRepoDir: string;
130
- };
131
- };
132
- npmDeps: readonly [{
133
- readonly name: "@augment-vir/node-js";
134
- readonly type: NpmDepTypeEnum.Dev;
135
- }, {
136
- readonly name: "esbuild";
137
- readonly type: NpmDepTypeEnum.Dev;
138
- }, {
139
- readonly name: "typescript";
140
- readonly type: NpmDepTypeEnum.Dev;
141
- }, {
142
- readonly name: "vite-tsconfig-paths";
143
- readonly type: NpmDepTypeEnum.Dev;
144
- }, {
145
- readonly name: "vite";
146
- readonly type: NpmDepTypeEnum.Dev;
147
- }];
148
- }>;
149
- };
@@ -1,140 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.frontendCommandDefinition = void 0;
27
- const common_1 = require("@augment-vir/common");
28
- const node_js_1 = require("@augment-vir/node-js");
29
- const promises_1 = require("fs/promises");
30
- const path_1 = require("path");
31
- const define_command_1 = require("../api/command/define-command");
32
- const define_command_inputs_1 = require("../api/command/define-command-inputs");
33
- const config_paths_1 = require("../api/config/config-paths");
34
- const package_paths_1 = require("../file-paths/package-paths");
35
- exports.frontendCommandDefinition = (0, define_command_1.defineCommand)({
36
- commandName: 'frontend',
37
- subCommandDescriptions: {
38
- build: 'Builds and bundles the frontend for deployment.',
39
- preview: 'Builds and previews the built output.',
40
- },
41
- configFiles: {
42
- vite: {
43
- copyFromInternalPath: (0, path_1.join)(package_paths_1.virmatorConfigsDir, 'configs', 'vite.config.ts'),
44
- copyToPathRelativeToRepoDir: (0, path_1.join)('configs', 'vite.config.ts'),
45
- },
46
- },
47
- npmDeps: [
48
- { name: '@augment-vir/node-js', type: define_command_inputs_1.NpmDepTypeEnum.Dev },
49
- { name: 'esbuild', type: define_command_inputs_1.NpmDepTypeEnum.Dev },
50
- { name: 'typescript', type: define_command_inputs_1.NpmDepTypeEnum.Dev },
51
- { name: 'vite-tsconfig-paths', type: define_command_inputs_1.NpmDepTypeEnum.Dev },
52
- { name: 'vite', type: define_command_inputs_1.NpmDepTypeEnum.Dev },
53
- ],
54
- }, () => {
55
- return {
56
- sections: [
57
- {
58
- title: '',
59
- content: `Runs a frontend. Currently uses vite.`,
60
- },
61
- ],
62
- examples: [],
63
- };
64
- }, async (inputs) => {
65
- const viteConfigPath = (0, config_paths_1.getCopyToPath)({
66
- repoDir: inputs.repoDir,
67
- configFileDefinition: inputs.configFiles.vite,
68
- packageDir: package_paths_1.virmatorPackageDir,
69
- });
70
- const tempFilePath = (0, path_1.join)((0, path_1.dirname)(viteConfigPath), `generated-config-${Date.now()}-${(0, common_1.randomString)()}.cjs`);
71
- const oldWrite = process.stdout.write;
72
- try {
73
- const needToBuild = !!inputs.inputSubCommands.length;
74
- const useDefaultConfigArgs = !inputs.filteredInputArgs.includes('--config');
75
- const configString = useDefaultConfigArgs ? `--config ${viteConfigPath}` : '';
76
- await (await Promise.resolve().then(() => __importStar(require('esbuild')))).build({
77
- entryPoints: [viteConfigPath],
78
- outfile: tempFilePath,
79
- write: true,
80
- target: ['node20'],
81
- platform: 'node',
82
- bundle: false,
83
- format: 'cjs',
84
- });
85
- /**
86
- * Disable console logs the first time we require this, as logs will also print when
87
- * Vite loads the config again.
88
- */
89
- process.stdout.write = () => false;
90
- const viteConfig = await require(tempFilePath).default;
91
- process.stdout.write = oldWrite;
92
- const root = viteConfig.root ? (0, path_1.resolve)(process.cwd(), viteConfig.root) : process.cwd();
93
- const buildOutputPath = (0, path_1.resolve)(root, viteConfig?.build?.outDir || 'dist');
94
- const viteBinPath = await (0, package_paths_1.getNpmBinPath)({
95
- repoDir: inputs.repoDir,
96
- command: 'vite',
97
- packageDirPath: inputs.packageDir,
98
- });
99
- const removeCommand = needToBuild
100
- ? `node -e "require('fs').rmSync('node_modules/.vite', {recursive: true, force: true})"`
101
- : '';
102
- const mainCommand = [
103
- removeCommand,
104
- viteBinPath,
105
- ]
106
- .filter(common_1.isTruthy)
107
- .join(' && ');
108
- const indexPath = (0, path_1.join)(buildOutputPath, 'index.html');
109
- const dist404Path = (0, path_1.join)(buildOutputPath, '404.html');
110
- const subCommandArgs = needToBuild
111
- ? [
112
- 'build',
113
- ...inputs.filteredInputArgs,
114
- '&&',
115
- `node -e "require('fs').copyFileSync('${(0, node_js_1.interpolationSafeWindowsPath)(indexPath)}', '${(0, node_js_1.interpolationSafeWindowsPath)(dist404Path)}')"`,
116
- ]
117
- : inputs.filteredInputArgs;
118
- const previewCommandArgs = inputs.inputSubCommands.includes(inputs.subCommands.preview)
119
- ? [
120
- '&&',
121
- viteBinPath,
122
- 'preview',
123
- ...inputs.filteredInputArgs,
124
- ]
125
- : [];
126
- return {
127
- args: [
128
- mainCommand,
129
- '--force',
130
- configString,
131
- ...subCommandArgs,
132
- ...previewCommandArgs,
133
- ],
134
- };
135
- }
136
- finally {
137
- process.stdout.write = oldWrite;
138
- await (0, promises_1.unlink)(tempFilePath);
139
- }
140
- });
@@ -1,163 +0,0 @@
1
- export declare const initCommandDefinition: {
2
- commandName: "init";
3
- subCommandDescriptions: {
4
- readonly force: "force overwrite files even if they already exist.";
5
- };
6
- configFiles: {};
7
- npmDeps: readonly [{
8
- readonly name: "prettier";
9
- readonly type: import("..").NpmDepTypeEnum.Dev;
10
- }, {
11
- readonly name: "prettier-plugin-jsdoc";
12
- readonly type: import("..").NpmDepTypeEnum.Dev;
13
- }, {
14
- readonly name: "prettier-plugin-multiline-arrays";
15
- readonly type: import("..").NpmDepTypeEnum.Dev;
16
- }, {
17
- readonly name: "prettier-plugin-organize-imports";
18
- readonly type: import("..").NpmDepTypeEnum.Dev;
19
- }, {
20
- readonly name: "prettier-plugin-packagejson";
21
- readonly type: import("..").NpmDepTypeEnum.Dev;
22
- }, {
23
- readonly name: "prettier-plugin-sort-json";
24
- readonly type: import("..").NpmDepTypeEnum.Dev;
25
- }, {
26
- readonly name: "prettier-plugin-toml";
27
- readonly type: import("..").NpmDepTypeEnum.Dev;
28
- }, {
29
- readonly name: "prettier-plugin-interpolated-html-tags";
30
- readonly type: import("..").NpmDepTypeEnum.Dev;
31
- }];
32
- } & {
33
- allAvailableSubCommands: readonly "force"[];
34
- subCommands: import("..").SubCommandsMap<{
35
- commandName: "init";
36
- subCommandDescriptions: {
37
- readonly force: "force overwrite files even if they already exist.";
38
- };
39
- configFiles: {};
40
- npmDeps: readonly [{
41
- readonly name: "prettier";
42
- readonly type: import("..").NpmDepTypeEnum.Dev;
43
- }, {
44
- readonly name: "prettier-plugin-jsdoc";
45
- readonly type: import("..").NpmDepTypeEnum.Dev;
46
- }, {
47
- readonly name: "prettier-plugin-multiline-arrays";
48
- readonly type: import("..").NpmDepTypeEnum.Dev;
49
- }, {
50
- readonly name: "prettier-plugin-organize-imports";
51
- readonly type: import("..").NpmDepTypeEnum.Dev;
52
- }, {
53
- readonly name: "prettier-plugin-packagejson";
54
- readonly type: import("..").NpmDepTypeEnum.Dev;
55
- }, {
56
- readonly name: "prettier-plugin-sort-json";
57
- readonly type: import("..").NpmDepTypeEnum.Dev;
58
- }, {
59
- readonly name: "prettier-plugin-toml";
60
- readonly type: import("..").NpmDepTypeEnum.Dev;
61
- }, {
62
- readonly name: "prettier-plugin-interpolated-html-tags";
63
- readonly type: import("..").NpmDepTypeEnum.Dev;
64
- }];
65
- }>;
66
- } & {
67
- executor: import("..").CommandExecutor<{
68
- commandName: "init";
69
- subCommandDescriptions: {
70
- readonly force: "force overwrite files even if they already exist.";
71
- };
72
- configFiles: {};
73
- npmDeps: readonly [{
74
- readonly name: "prettier";
75
- readonly type: import("..").NpmDepTypeEnum.Dev;
76
- }, {
77
- readonly name: "prettier-plugin-jsdoc";
78
- readonly type: import("..").NpmDepTypeEnum.Dev;
79
- }, {
80
- readonly name: "prettier-plugin-multiline-arrays";
81
- readonly type: import("..").NpmDepTypeEnum.Dev;
82
- }, {
83
- readonly name: "prettier-plugin-organize-imports";
84
- readonly type: import("..").NpmDepTypeEnum.Dev;
85
- }, {
86
- readonly name: "prettier-plugin-packagejson";
87
- readonly type: import("..").NpmDepTypeEnum.Dev;
88
- }, {
89
- readonly name: "prettier-plugin-sort-json";
90
- readonly type: import("..").NpmDepTypeEnum.Dev;
91
- }, {
92
- readonly name: "prettier-plugin-toml";
93
- readonly type: import("..").NpmDepTypeEnum.Dev;
94
- }, {
95
- readonly name: "prettier-plugin-interpolated-html-tags";
96
- readonly type: import("..").NpmDepTypeEnum.Dev;
97
- }];
98
- }>;
99
- createDescription: import("..").CreateDescriptionsCallback<{
100
- commandName: "init";
101
- subCommandDescriptions: {
102
- readonly force: "force overwrite files even if they already exist.";
103
- };
104
- configFiles: {};
105
- npmDeps: readonly [{
106
- readonly name: "prettier";
107
- readonly type: import("..").NpmDepTypeEnum.Dev;
108
- }, {
109
- readonly name: "prettier-plugin-jsdoc";
110
- readonly type: import("..").NpmDepTypeEnum.Dev;
111
- }, {
112
- readonly name: "prettier-plugin-multiline-arrays";
113
- readonly type: import("..").NpmDepTypeEnum.Dev;
114
- }, {
115
- readonly name: "prettier-plugin-organize-imports";
116
- readonly type: import("..").NpmDepTypeEnum.Dev;
117
- }, {
118
- readonly name: "prettier-plugin-packagejson";
119
- readonly type: import("..").NpmDepTypeEnum.Dev;
120
- }, {
121
- readonly name: "prettier-plugin-sort-json";
122
- readonly type: import("..").NpmDepTypeEnum.Dev;
123
- }, {
124
- readonly name: "prettier-plugin-toml";
125
- readonly type: import("..").NpmDepTypeEnum.Dev;
126
- }, {
127
- readonly name: "prettier-plugin-interpolated-html-tags";
128
- readonly type: import("..").NpmDepTypeEnum.Dev;
129
- }];
130
- }>;
131
- extend: import("../api/command/define-command").ExtendCallback<{
132
- commandName: "init";
133
- subCommandDescriptions: {
134
- readonly force: "force overwrite files even if they already exist.";
135
- };
136
- configFiles: {};
137
- npmDeps: readonly [{
138
- readonly name: "prettier";
139
- readonly type: import("..").NpmDepTypeEnum.Dev;
140
- }, {
141
- readonly name: "prettier-plugin-jsdoc";
142
- readonly type: import("..").NpmDepTypeEnum.Dev;
143
- }, {
144
- readonly name: "prettier-plugin-multiline-arrays";
145
- readonly type: import("..").NpmDepTypeEnum.Dev;
146
- }, {
147
- readonly name: "prettier-plugin-organize-imports";
148
- readonly type: import("..").NpmDepTypeEnum.Dev;
149
- }, {
150
- readonly name: "prettier-plugin-packagejson";
151
- readonly type: import("..").NpmDepTypeEnum.Dev;
152
- }, {
153
- readonly name: "prettier-plugin-sort-json";
154
- readonly type: import("..").NpmDepTypeEnum.Dev;
155
- }, {
156
- readonly name: "prettier-plugin-toml";
157
- readonly type: import("..").NpmDepTypeEnum.Dev;
158
- }, {
159
- readonly name: "prettier-plugin-interpolated-html-tags";
160
- readonly type: import("..").NpmDepTypeEnum.Dev;
161
- }];
162
- }>;
163
- };
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.initCommandDefinition = void 0;
4
- const command_logging_1 = require("../api/command/command-logging");
5
- const define_command_1 = require("../api/command/define-command");
6
- const copy_config_1 = require("../api/config/copy-config");
7
- const all_extra_configs_1 = require("./extra-configs/all-extra-configs");
8
- const format_command_1 = require("./format.command");
9
- exports.initCommandDefinition = (0, define_command_1.defineCommand)({
10
- commandName: 'init',
11
- subCommandDescriptions: {
12
- force: 'force overwrite files even if they already exist.',
13
- },
14
- configFiles: {},
15
- npmDeps: [...format_command_1.formatCommandDefinition.npmDeps],
16
- }, ({ commandName, subCommands, packageBinName }) => {
17
- return {
18
- sections: [
19
- {
20
- title: '',
21
- content: `Initialize a repo with all virmator config files.`,
22
- },
23
- ],
24
- examples: [
25
- {
26
- title: 'run init',
27
- content: `${packageBinName} ${commandName}`,
28
- },
29
- {
30
- title: 'run init and force all configs to be written',
31
- content: `${packageBinName} ${commandName} ${subCommands.force}`,
32
- },
33
- ],
34
- };
35
- }, async (inputs) => {
36
- const copyStyle = inputs.inputSubCommands.includes(inputs.subCommands.force)
37
- ? copy_config_1.CopyConfigOperation.Overwrite
38
- : copy_config_1.CopyConfigOperation.Init;
39
- const allConfigs = [
40
- ...all_extra_configs_1.nonCommandConfigs,
41
- ...inputs.allConfigs,
42
- ];
43
- const success = await (0, copy_config_1.copyAllConfigFiles)({
44
- configFiles: allConfigs,
45
- logging: command_logging_1.defaultConsoleLogging,
46
- operation: copyStyle,
47
- repoDir: inputs.repoDir,
48
- packageDir: inputs.packageDir,
49
- });
50
- return {
51
- success,
52
- };
53
- });
@@ -1,33 +0,0 @@
1
- export declare const publishCommandDefinition: {
2
- commandName: "publish";
3
- subCommandDescriptions: {};
4
- configFiles: {};
5
- npmDeps: readonly [];
6
- } & {
7
- allAvailableSubCommands: readonly never[];
8
- subCommands: import("..").SubCommandsMap<{
9
- commandName: "publish";
10
- subCommandDescriptions: {};
11
- configFiles: {};
12
- npmDeps: readonly [];
13
- }>;
14
- } & {
15
- executor: import("..").CommandExecutor<{
16
- commandName: "publish";
17
- subCommandDescriptions: {};
18
- configFiles: {};
19
- npmDeps: readonly [];
20
- }>;
21
- createDescription: import("..").CreateDescriptionsCallback<{
22
- commandName: "publish";
23
- subCommandDescriptions: {};
24
- configFiles: {};
25
- npmDeps: readonly [];
26
- }>;
27
- extend: import("../api/command/define-command").ExtendCallback<{
28
- commandName: "publish";
29
- subCommandDescriptions: {};
30
- configFiles: {};
31
- npmDeps: readonly [];
32
- }>;
33
- };