virmator 8.0.0 → 8.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ name: build-for-gh-pages
3
3
  on:
4
4
  push:
5
5
  branches:
6
- - main
6
+ - dev
7
7
 
8
8
  jobs:
9
9
  build-for-gh-pages:
@@ -5,7 +5,7 @@ import {baseTypedocConfig} from 'virmator/dist/compiled-base-configs/base-typedo
5
5
  const repoRoot = resolve(__dirname, '..');
6
6
  const indexTsFile = join(repoRoot, 'src', 'index.ts');
7
7
 
8
- export const typedocConfig: Partial<TypeDocOptions> = {
8
+ export const typeDocConfig: Partial<TypeDocOptions> = {
9
9
  ...baseTypedocConfig,
10
10
  out: join(repoRoot, 'docs-dist'),
11
11
  entryPoints: [
@@ -5,7 +5,7 @@
5
5
  "scripts": {
6
6
  "build": "virmator frontend build",
7
7
  "compile": "virmator compile",
8
- "docs:update": "virmator docs",
8
+ "docs": "virmator docs",
9
9
  "format": "virmator format",
10
10
  "preview": "virmator frontend preview",
11
11
  "publish": "virmator publish \"npm run compile && npm run test:all\"",
@@ -5,7 +5,7 @@ export declare const docsCommandDefinition: {
5
5
  readonly check: "Check that documentation is up-to-date.";
6
6
  };
7
7
  configFiles: {
8
- readonly typedocConfig: {
8
+ readonly typeDocConfig: {
9
9
  readonly copyFromInternalPath: string;
10
10
  readonly copyToPathRelativeToRepoDir: string;
11
11
  };
@@ -25,7 +25,7 @@ export declare const docsCommandDefinition: {
25
25
  readonly check: "Check that documentation is up-to-date.";
26
26
  };
27
27
  configFiles: {
28
- readonly typedocConfig: {
28
+ readonly typeDocConfig: {
29
29
  readonly copyFromInternalPath: string;
30
30
  readonly copyToPathRelativeToRepoDir: string;
31
31
  };
@@ -45,7 +45,7 @@ export declare const docsCommandDefinition: {
45
45
  readonly check: "Check that documentation is up-to-date.";
46
46
  };
47
47
  configFiles: {
48
- readonly typedocConfig: {
48
+ readonly typeDocConfig: {
49
49
  readonly copyFromInternalPath: string;
50
50
  readonly copyToPathRelativeToRepoDir: string;
51
51
  };
@@ -64,7 +64,7 @@ export declare const docsCommandDefinition: {
64
64
  readonly check: "Check that documentation is up-to-date.";
65
65
  };
66
66
  configFiles: {
67
- readonly typedocConfig: {
67
+ readonly typeDocConfig: {
68
68
  readonly copyFromInternalPath: string;
69
69
  readonly copyToPathRelativeToRepoDir: string;
70
70
  };
@@ -83,7 +83,7 @@ export declare const docsCommandDefinition: {
83
83
  readonly check: "Check that documentation is up-to-date.";
84
84
  };
85
85
  configFiles: {
86
- readonly typedocConfig: {
86
+ readonly typeDocConfig: {
87
87
  readonly copyFromInternalPath: string;
88
88
  readonly copyToPathRelativeToRepoDir: string;
89
89
  };
@@ -25,7 +25,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.docsCommandDefinition = void 0;
27
27
  const path_1 = require("path");
28
- const typedoc_1 = require("typedoc");
29
28
  const define_command_1 = require("../api/command/define-command");
30
29
  const define_command_inputs_1 = require("../api/command/define-command-inputs");
31
30
  const typescript_config_file_1 = require("../augments/typescript-config-file");
@@ -36,7 +35,7 @@ exports.docsCommandDefinition = (0, define_command_1.defineCommand)({
36
35
  check: 'Check that documentation is up-to-date.',
37
36
  },
38
37
  configFiles: {
39
- typedocConfig: {
38
+ typeDocConfig: {
40
39
  copyFromInternalPath: (0, path_1.join)(package_paths_1.virmatorConfigsDir, 'configs', 'typedoc.config.ts'),
41
40
  copyToPathRelativeToRepoDir: (0, path_1.join)('configs', 'typedoc.config.ts'),
42
41
  },
@@ -87,8 +86,8 @@ exports.docsCommandDefinition = (0, define_command_1.defineCommand)({
87
86
  ],
88
87
  };
89
88
  }, async ({ repoDir, packageDir, configFiles, filteredInputArgs, inputSubCommands, subCommands, packageBinName, }) => {
90
- const typedocConfigPath = (0, path_1.join)(repoDir, configFiles.typedocConfig.copyToPathRelativeToRepoDir);
91
- return await (0, typescript_config_file_1.withTypescriptConfigFile)(typedocConfigPath, async (loadedConfig) => {
89
+ const typeDocConfigPath = (0, path_1.join)(repoDir, configFiles.typeDocConfig.copyToPathRelativeToRepoDir);
90
+ return await (0, typescript_config_file_1.withTypescriptConfigFile)(typeDocConfigPath, async (loadedConfig) => {
92
91
  const containsManualMarkdownArgs = filteredInputArgs.some((arg) => arg.match(/\.md['"]?$/));
93
92
  const args = containsManualMarkdownArgs
94
93
  ? filteredInputArgs
@@ -98,14 +97,13 @@ exports.docsCommandDefinition = (0, define_command_1.defineCommand)({
98
97
  const logTransforms = {
99
98
  stderr: (stderrInput) => stderrInput.replace('Run without --check to update.', 'Run without the "check" sub-command in order to update.'),
100
99
  };
101
- const options = loadedConfig.typedocConfig;
102
- const checkTypeDocOptions = isCheckingOnly
103
- ? { emit: typedoc_1.Configuration.EmitStrategy.none }
104
- : {};
100
+ const options = loadedConfig.typeDocConfig;
101
+ const typeDoc = await Promise.resolve().then(() => __importStar(require('typedoc')));
102
+ const checkTypeDocOptions = isCheckingOnly ? { emit: typeDoc.Configuration.EmitStrategy.none } : {};
105
103
  if (!(await runTypeDoc({
106
104
  ...options,
107
105
  ...checkTypeDocOptions,
108
- }, packageBinName))) {
106
+ }, packageBinName, typeDoc))) {
109
107
  return { success: false };
110
108
  }
111
109
  return {
@@ -122,12 +120,11 @@ exports.docsCommandDefinition = (0, define_command_1.defineCommand)({
122
120
  };
123
121
  });
124
122
  });
125
- async function runTypeDoc(options, packageBinName) {
126
- const typedoc = await Promise.resolve().then(() => __importStar(require('typedoc')));
127
- const app = await typedoc.Application.bootstrapWithPlugins(options, [
128
- new typedoc.TypeDocReader(),
129
- new typedoc.PackageJsonReader(),
130
- new typedoc.TSConfigReader(),
123
+ async function runTypeDoc(options, packageBinName, typeDoc) {
124
+ const app = await typeDoc.Application.bootstrapWithPlugins(options, [
125
+ new typeDoc.TypeDocReader(),
126
+ new typeDoc.PackageJsonReader(),
127
+ new typeDoc.TSConfigReader(),
131
128
  ]);
132
129
  if (app.options.getValue('version')) {
133
130
  console.log(app.toString());
@@ -3,23 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.baseTypedocConfig = exports.defaultDocumentationRequirements = void 0;
4
4
  exports.defaultDocumentationRequirements = [
5
5
  'Accessor',
6
- 'CallSignature',
7
6
  'Class',
8
7
  'Constructor',
9
- 'ConstructorSignature',
10
8
  'Enum',
11
9
  'Function',
12
- 'GetSignature',
13
- 'IndexSignature',
14
10
  'Interface',
15
11
  'Method',
16
12
  'Module',
17
13
  'Namespace',
18
- 'Parameter',
19
14
  'Reference',
20
- 'SetSignature',
21
15
  'TypeAlias',
22
- 'TypeLiteral',
23
16
  'Variable',
24
17
  ];
25
18
  exports.baseTypedocConfig = {
package/dist/index.d.ts CHANGED
@@ -105,7 +105,7 @@ export declare const virmator: Readonly<{
105
105
  readonly check: "Check that documentation is up-to-date.";
106
106
  };
107
107
  configFiles: {
108
- readonly typedocConfig: {
108
+ readonly typeDocConfig: {
109
109
  readonly copyFromInternalPath: string;
110
110
  readonly copyToPathRelativeToRepoDir: string;
111
111
  };
@@ -125,7 +125,7 @@ export declare const virmator: Readonly<{
125
125
  readonly check: "Check that documentation is up-to-date.";
126
126
  };
127
127
  configFiles: {
128
- readonly typedocConfig: {
128
+ readonly typeDocConfig: {
129
129
  readonly copyFromInternalPath: string;
130
130
  readonly copyToPathRelativeToRepoDir: string;
131
131
  };
@@ -145,7 +145,7 @@ export declare const virmator: Readonly<{
145
145
  readonly check: "Check that documentation is up-to-date.";
146
146
  };
147
147
  configFiles: {
148
- readonly typedocConfig: {
148
+ readonly typeDocConfig: {
149
149
  readonly copyFromInternalPath: string;
150
150
  readonly copyToPathRelativeToRepoDir: string;
151
151
  };
@@ -164,7 +164,7 @@ export declare const virmator: Readonly<{
164
164
  readonly check: "Check that documentation is up-to-date.";
165
165
  };
166
166
  configFiles: {
167
- readonly typedocConfig: {
167
+ readonly typeDocConfig: {
168
168
  readonly copyFromInternalPath: string;
169
169
  readonly copyToPathRelativeToRepoDir: string;
170
170
  };
@@ -183,7 +183,7 @@ export declare const virmator: Readonly<{
183
183
  readonly check: "Check that documentation is up-to-date.";
184
184
  };
185
185
  configFiles: {
186
- readonly typedocConfig: {
186
+ readonly typeDocConfig: {
187
187
  readonly copyFromInternalPath: string;
188
188
  readonly copyToPathRelativeToRepoDir: string;
189
189
  };
@@ -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(`${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`);
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${node_js_1.logColors.reset} to update.\n`);
26
26
  throw new Error(`README not up to date.`);
27
27
  }
28
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virmator",
3
- "version": "8.0.0",
3
+ "version": "8.0.2",
4
4
  "description": "Handle common package configs, commands, and dependencies.",
5
5
  "keywords": [
6
6
  "automation",
@@ -30,8 +30,8 @@
30
30
  "bin": "dist/cli.js",
31
31
  "scripts": {
32
32
  "compile": "rm -rf dist && tsc",
33
+ "docs": "npm run compile && ts-node src/scripts/save-help-message.ts && md-code README.md",
33
34
  "docs:check": "npm run compile && ts-node src/scripts/save-help-message.ts check && md-code --check README.md",
34
- "docs:update": "npm run compile && ts-node src/scripts/save-help-message.ts && md-code README.md",
35
35
  "format": "npm run format:base -- --write --list-different",
36
36
  "format:base": "prettier \"./**/*.+(ts|json|html|css|md|js)\"",
37
37
  "publish": "virmator publish \"npm run test:all\"",