virmator 4.2.18 → 4.3.0
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 +8 -0
- package/base-configs/base-cspell.js +4 -0
- package/configs/npmignore.txt +1 -0
- package/dist/api/run-command/check-npm-deps.js +2 -1
- package/dist/augments/console.d.ts +7 -0
- package/dist/augments/console.js +39 -0
- package/dist/augments/fs.d.ts +1 -0
- package/dist/augments/fs.js +2 -1
- package/dist/augments/git.d.ts +1 -0
- package/dist/augments/git.js +13 -0
- package/dist/augments/npm.d.ts +11 -0
- package/dist/augments/npm.js +53 -0
- package/dist/commands/publish.command.d.ts +6 -0
- package/dist/commands/publish.command.js +164 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +3 -1
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -121,6 +121,14 @@ Initialize a repo with all virmator config files.
|
|
|
121
121
|
|
|
122
122
|
force overwrite files even if they already exist.
|
|
123
123
|
|
|
124
|
+
## publish
|
|
125
|
+
|
|
126
|
+
Publish an npm package. Includes workspace support.
|
|
127
|
+
|
|
128
|
+
### Examples
|
|
129
|
+
|
|
130
|
+
- publish a package: `virmator publish`
|
|
131
|
+
|
|
124
132
|
## spellcheck
|
|
125
133
|
|
|
126
134
|
Spellcheck code with cspell. By default this spellchecks every file in the entire repo (except for those ignored in the config file), including .dot files. If any arguments are passed to this command, the default cspell args that this command applies are ignored, you'll have to supply them via your args.
|
|
@@ -57,6 +57,9 @@ const baseConfig = {
|
|
|
57
57
|
'peta',
|
|
58
58
|
'postpack',
|
|
59
59
|
'postupgrade',
|
|
60
|
+
'premajor',
|
|
61
|
+
'preminor',
|
|
62
|
+
'prepatch',
|
|
60
63
|
'prettierignore',
|
|
61
64
|
'prettierrc',
|
|
62
65
|
'preupgrade',
|
|
@@ -75,6 +78,7 @@ const baseConfig = {
|
|
|
75
78
|
'threejs',
|
|
76
79
|
'transpiled',
|
|
77
80
|
'transpiling',
|
|
81
|
+
'tsbuildinfo',
|
|
78
82
|
'typeof',
|
|
79
83
|
'virmator',
|
|
80
84
|
'vite',
|
package/configs/npmignore.txt
CHANGED
|
@@ -30,6 +30,7 @@ const fs_1 = require("fs");
|
|
|
30
30
|
const promises_1 = require("fs/promises");
|
|
31
31
|
const path_1 = require("path");
|
|
32
32
|
const semver = __importStar(require("semver"));
|
|
33
|
+
const fs_2 = require("../../augments/fs");
|
|
33
34
|
const cli_color_1 = require("../cli-color");
|
|
34
35
|
async function updateDepsAsNeeded(inputs) {
|
|
35
36
|
try {
|
|
@@ -92,7 +93,7 @@ async function getVersionsToUpgradeTo({ repoDir, packageDir, npmDeps, packageBin
|
|
|
92
93
|
});
|
|
93
94
|
}
|
|
94
95
|
async function findDepsListWithPackageName(repoDir, packageName) {
|
|
95
|
-
if (repoDir ===
|
|
96
|
+
if (repoDir === fs_2.systemRootPath) {
|
|
96
97
|
return {};
|
|
97
98
|
}
|
|
98
99
|
if (!(0, fs_1.existsSync)((0, path_1.join)(repoDir, 'package.json'))) {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function askQuestion(questionToAsk: string, timeoutMs?: number): Promise<string>;
|
|
2
|
+
export declare function askQuestionUntilConditionMet({ questionToAsk, conditionCallback, invalidInputMessage, tryCountMax, }: {
|
|
3
|
+
questionToAsk: string;
|
|
4
|
+
conditionCallback: (response: string) => boolean | Promise<boolean>;
|
|
5
|
+
invalidInputMessage: string;
|
|
6
|
+
tryCountMax?: number;
|
|
7
|
+
}): Promise<string>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askQuestionUntilConditionMet = exports.askQuestion = void 0;
|
|
4
|
+
const readline_1 = require("readline");
|
|
5
|
+
async function askQuestion(questionToAsk, timeoutMs = 60000) {
|
|
6
|
+
const cliInterface = (0, readline_1.createInterface)({
|
|
7
|
+
input: process.stdin,
|
|
8
|
+
output: process.stdout,
|
|
9
|
+
});
|
|
10
|
+
return new Promise((resolve, reject) => {
|
|
11
|
+
cliInterface.question(questionToAsk + ' ', (response) => {
|
|
12
|
+
cliInterface.close();
|
|
13
|
+
resolve(response);
|
|
14
|
+
});
|
|
15
|
+
setTimeout(() => {
|
|
16
|
+
cliInterface.close();
|
|
17
|
+
reject(`Took too long to response (over "${timeoutMs / 1000}" seconds)`);
|
|
18
|
+
}, timeoutMs);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
exports.askQuestion = askQuestion;
|
|
22
|
+
async function askQuestionUntilConditionMet({ questionToAsk, conditionCallback, invalidInputMessage, tryCountMax = 5, }) {
|
|
23
|
+
let wasConditionMet = false;
|
|
24
|
+
let retryCount = 0;
|
|
25
|
+
let response = '';
|
|
26
|
+
while (!wasConditionMet && retryCount <= tryCountMax) {
|
|
27
|
+
response = (await askQuestion(questionToAsk)).trim();
|
|
28
|
+
wasConditionMet = await conditionCallback(response);
|
|
29
|
+
if (!wasConditionMet) {
|
|
30
|
+
console.error(invalidInputMessage);
|
|
31
|
+
}
|
|
32
|
+
retryCount++;
|
|
33
|
+
}
|
|
34
|
+
if (retryCount > tryCountMax) {
|
|
35
|
+
throw new Error(`Max input attempts (${tryCountMax}) exceeded.`);
|
|
36
|
+
}
|
|
37
|
+
return response;
|
|
38
|
+
}
|
|
39
|
+
exports.askQuestionUntilConditionMet = askQuestionUntilConditionMet;
|
package/dist/augments/fs.d.ts
CHANGED
package/dist/augments/fs.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.recursivelyUpwardsSearchForDir = exports.writeFiles = exports.readAllDirContents = void 0;
|
|
3
|
+
exports.recursivelyUpwardsSearchForDir = exports.writeFiles = exports.readAllDirContents = exports.systemRootPath = void 0;
|
|
4
4
|
const augment_vir_1 = require("augment-vir");
|
|
5
5
|
const fs_1 = require("fs");
|
|
6
6
|
const promises_1 = require("fs/promises");
|
|
7
7
|
const path_1 = require("path");
|
|
8
|
+
exports.systemRootPath = (0, path_1.parse)(process.cwd()).root;
|
|
8
9
|
async function readAllDirContents({ dir, recursive = false, }) {
|
|
9
10
|
const fileNames = await (0, promises_1.readdir)(dir);
|
|
10
11
|
const allFileContents = await Promise.all(fileNames.map(async (fileName) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function doChangesExist(repoDirPath: string): Promise<boolean>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.doChangesExist = void 0;
|
|
4
|
+
const node_only_1 = require("augment-vir/dist/cjs/node-only");
|
|
5
|
+
async function doChangesExist(repoDirPath) {
|
|
6
|
+
const getChangesCommand = `git status --porcelain=v1 2>/dev/null`;
|
|
7
|
+
const getChangesOutput = await (0, node_only_1.runShellCommand)(getChangesCommand, {
|
|
8
|
+
cwd: repoDirPath,
|
|
9
|
+
rejectOnError: true,
|
|
10
|
+
});
|
|
11
|
+
return !!getChangesOutput.stdout;
|
|
12
|
+
}
|
|
13
|
+
exports.doChangesExist = doChangesExist;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RequiredAndNotNullBy } from 'augment-vir';
|
|
2
|
+
import { PackageJson } from 'type-fest';
|
|
3
|
+
export declare type CleanPackageJson = Readonly<RequiredAndNotNullBy<PackageJson.PackageJsonStandard, 'name' | 'version'> & {
|
|
4
|
+
workspaces?: ReadonlyArray<string>;
|
|
5
|
+
}>;
|
|
6
|
+
export declare function findTopLevelPackageJsonFile(startDir: string): string | undefined;
|
|
7
|
+
export declare function readPackageJson(packageJsonPath: string): Promise<CleanPackageJson>;
|
|
8
|
+
export declare function readTopLevelPackageJson(startDir: string): Promise<Readonly<{
|
|
9
|
+
packageJson: CleanPackageJson;
|
|
10
|
+
path: string;
|
|
11
|
+
}>>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readTopLevelPackageJson = exports.readPackageJson = exports.findTopLevelPackageJsonFile = void 0;
|
|
4
|
+
const augment_vir_1 = require("augment-vir");
|
|
5
|
+
const fs_1 = require("fs");
|
|
6
|
+
const promises_1 = require("fs/promises");
|
|
7
|
+
const path_1 = require("path");
|
|
8
|
+
const fs_2 = require("./fs");
|
|
9
|
+
function findTopLevelPackageJsonFile(startDir) {
|
|
10
|
+
if (startDir === fs_2.systemRootPath) {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
const topLevelPath = findTopLevelPackageJsonFile((0, path_1.dirname)(startDir));
|
|
14
|
+
const currentLevelPath = (0, path_1.join)(startDir, 'package.json');
|
|
15
|
+
if (topLevelPath) {
|
|
16
|
+
return topLevelPath;
|
|
17
|
+
}
|
|
18
|
+
else if ((0, fs_1.existsSync)(currentLevelPath)) {
|
|
19
|
+
return currentLevelPath;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.findTopLevelPackageJsonFile = findTopLevelPackageJsonFile;
|
|
26
|
+
async function readPackageJson(packageJsonPath) {
|
|
27
|
+
let parsed;
|
|
28
|
+
try {
|
|
29
|
+
parsed = JSON.parse((await (0, promises_1.readFile)(packageJsonPath)).toString());
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
throw new Error(`Failed to read package json file "${packageJsonPath}": ${(0, augment_vir_1.extractErrorMessage)(error)}`);
|
|
33
|
+
}
|
|
34
|
+
if (!parsed.name) {
|
|
35
|
+
throw new Error(`Missing package name from "${packageJsonPath}"`);
|
|
36
|
+
}
|
|
37
|
+
if (!parsed.version) {
|
|
38
|
+
throw new Error(`Missing package version from "${packageJsonPath}"`);
|
|
39
|
+
}
|
|
40
|
+
return parsed;
|
|
41
|
+
}
|
|
42
|
+
exports.readPackageJson = readPackageJson;
|
|
43
|
+
async function readTopLevelPackageJson(startDir) {
|
|
44
|
+
const topLevelPackageJsonPath = findTopLevelPackageJsonFile(startDir);
|
|
45
|
+
if (!topLevelPackageJsonPath) {
|
|
46
|
+
throw new Error(`Failed to find package.json path in any ancestor directories from "${startDir}"`);
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
packageJson: await readPackageJson(topLevelPackageJsonPath),
|
|
50
|
+
path: topLevelPackageJsonPath,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
exports.readTopLevelPackageJson = readTopLevelPackageJson;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.publishCommandDefinition = void 0;
|
|
7
|
+
const augment_vir_1 = require("augment-vir");
|
|
8
|
+
const node_only_1 = require("augment-vir/dist/cjs/node-only");
|
|
9
|
+
const fs_1 = require("fs");
|
|
10
|
+
const promises_1 = require("fs/promises");
|
|
11
|
+
const glob_1 = __importDefault(require("glob"));
|
|
12
|
+
const path_1 = require("path");
|
|
13
|
+
const semver_1 = require("semver");
|
|
14
|
+
const define_command_1 = require("../api/command/define-command");
|
|
15
|
+
const console_1 = require("../augments/console");
|
|
16
|
+
const git_1 = require("../augments/git");
|
|
17
|
+
const npm_1 = require("../augments/npm");
|
|
18
|
+
exports.publishCommandDefinition = (0, define_command_1.defineCommand)({
|
|
19
|
+
commandName: 'publish',
|
|
20
|
+
subCommandDescriptions: {},
|
|
21
|
+
configFiles: {},
|
|
22
|
+
npmDeps: [],
|
|
23
|
+
}, ({ commandName, packageBinName }) => {
|
|
24
|
+
return {
|
|
25
|
+
sections: [
|
|
26
|
+
{
|
|
27
|
+
title: '',
|
|
28
|
+
content: `Publish an npm package. Includes workspace support.`,
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
examples: [
|
|
32
|
+
{
|
|
33
|
+
title: 'publish a package',
|
|
34
|
+
content: `${packageBinName} ${commandName}`,
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
}, async (inputs) => {
|
|
39
|
+
const { packageJson, path: packageJsonPath } = await (0, npm_1.readTopLevelPackageJson)(inputs.repoDir);
|
|
40
|
+
if (await (0, git_1.doChangesExist)((0, path_1.dirname)(packageJsonPath))) {
|
|
41
|
+
throw new Error(`git changes detected in "${packageJsonPath}". Cannot run publish command with changes, commit them first.`);
|
|
42
|
+
}
|
|
43
|
+
const workspaceDirs = getWorkspaceDirs(packageJson, packageJsonPath);
|
|
44
|
+
if (await isCurrentVersionPublished(packageJson)) {
|
|
45
|
+
await bumpPackageVersion(packageJson, packageJsonPath, workspaceDirs);
|
|
46
|
+
}
|
|
47
|
+
await updateWorkspaceVersions(packageJsonPath, workspaceDirs);
|
|
48
|
+
await publishPackages(workspaceDirs, packageJsonPath);
|
|
49
|
+
await updateGit(packageJsonPath);
|
|
50
|
+
return {
|
|
51
|
+
success: true,
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
async function updateGit(packageJsonPath) {
|
|
55
|
+
const newVersion = (await (0, npm_1.readPackageJson)(packageJsonPath)).version;
|
|
56
|
+
const packageDirPath = (0, path_1.dirname)(packageJsonPath);
|
|
57
|
+
if (await (0, git_1.doChangesExist)(packageDirPath)) {
|
|
58
|
+
await (0, node_only_1.runShellCommand)(`git commit -a --amend --no-edit`, {
|
|
59
|
+
cwd: packageDirPath,
|
|
60
|
+
rejectOnError: true,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
await (0, node_only_1.runShellCommand)(`git tag v${newVersion} && git push && git push --tags`, {
|
|
64
|
+
cwd: packageDirPath,
|
|
65
|
+
rejectOnError: true,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
async function updateWorkspaceVersions(packageJsonPath, workspaceDirPaths) {
|
|
69
|
+
const newVersion = (await (0, npm_1.readPackageJson)(packageJsonPath)).version;
|
|
70
|
+
await (0, augment_vir_1.awaitedForEach)(workspaceDirPaths, async (workspacePath) => {
|
|
71
|
+
const workspacePackageJsonPath = (0, path_1.join)(workspacePath, 'package.json');
|
|
72
|
+
const workspacePackageJson = await (0, npm_1.readPackageJson)(workspacePackageJsonPath);
|
|
73
|
+
const newWorkspacePackageJson = { ...workspacePackageJson };
|
|
74
|
+
newWorkspacePackageJson.version = newVersion;
|
|
75
|
+
await (0, promises_1.writeFile)(workspacePackageJsonPath, JSON.stringify(newWorkspacePackageJson, null, 4) + '\n');
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
async function publishPackages(workspaceDirPaths, packageJsonPath) {
|
|
79
|
+
const packagePath = (0, path_1.dirname)(packageJsonPath);
|
|
80
|
+
if (workspaceDirPaths.length) {
|
|
81
|
+
await (0, augment_vir_1.awaitedForEach)(workspaceDirPaths, async (workspaceDirPath) => {
|
|
82
|
+
const workspacePackageJson = await (0, npm_1.readPackageJson)((0, path_1.join)(workspaceDirPath, 'package.json'));
|
|
83
|
+
if (!workspacePackageJson.private) {
|
|
84
|
+
console.info(`\nPublishing ${(0, path_1.basename)(workspaceDirPath)}`);
|
|
85
|
+
await (0, node_only_1.runShellCommand)(`npm publish`, {
|
|
86
|
+
rejectOnError: true,
|
|
87
|
+
cwd: workspaceDirPath,
|
|
88
|
+
hookUpToConsole: true,
|
|
89
|
+
env: {
|
|
90
|
+
...process.env,
|
|
91
|
+
NPM_CONFIG_COLOR: 'always',
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
await (0, node_only_1.runShellCommand)(`npm publish`, {
|
|
99
|
+
rejectOnError: true,
|
|
100
|
+
cwd: packagePath,
|
|
101
|
+
hookUpToConsole: true,
|
|
102
|
+
env: {
|
|
103
|
+
...process.env,
|
|
104
|
+
NPM_CONFIG_COLOR: 'always',
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
async function isCurrentVersionPublished(packageJson) {
|
|
110
|
+
const output = await (0, node_only_1.runShellCommand)(`npm show ${packageJson.name}@${packageJson.version}`);
|
|
111
|
+
return output.exitCode === 0;
|
|
112
|
+
}
|
|
113
|
+
// this is just used to ensure we have every release type
|
|
114
|
+
const releaseTypesObject = {
|
|
115
|
+
major: 'major',
|
|
116
|
+
premajor: 'premajor',
|
|
117
|
+
minor: 'minor',
|
|
118
|
+
preminor: 'preminor',
|
|
119
|
+
patch: 'patch',
|
|
120
|
+
prepatch: 'prepatch',
|
|
121
|
+
prerelease: 'prerelease',
|
|
122
|
+
};
|
|
123
|
+
const releaseTypeOptions = (0, augment_vir_1.getObjectTypedKeys)(releaseTypesObject);
|
|
124
|
+
const releaseTypeMessage = `Choose a release type: ${(0, augment_vir_1.joinWithFinalConjunction)(releaseTypeOptions, 'or')}:`;
|
|
125
|
+
async function bumpPackageVersion(packageJson, packageJsonPath, workspaceDirPaths) {
|
|
126
|
+
const releaseType = (await (0, console_1.askQuestionUntilConditionMet)({
|
|
127
|
+
conditionCallback: (input) => {
|
|
128
|
+
return releaseTypeOptions.includes(input.toLowerCase());
|
|
129
|
+
},
|
|
130
|
+
invalidInputMessage: `Invalid release type. Expected ${(0, augment_vir_1.joinWithFinalConjunction)(releaseTypeOptions, 'or')}.`,
|
|
131
|
+
questionToAsk: releaseTypeMessage,
|
|
132
|
+
}));
|
|
133
|
+
const newVersion = (0, semver_1.inc)(packageJson.version, releaseType);
|
|
134
|
+
if (!newVersion) {
|
|
135
|
+
throw new Error(`New version was not calculated from version "${packageJson.version}" and release type "${releaseType}"`);
|
|
136
|
+
}
|
|
137
|
+
const newPackageJson = {
|
|
138
|
+
...packageJson,
|
|
139
|
+
};
|
|
140
|
+
// assign this after the const assignment above so we don't change the key ordering
|
|
141
|
+
newPackageJson.version = newVersion;
|
|
142
|
+
await (0, promises_1.writeFile)(packageJsonPath, JSON.stringify(newPackageJson, null, 4) + '\n');
|
|
143
|
+
}
|
|
144
|
+
function getWorkspaceDirs(packageJson, packageJsonPath) {
|
|
145
|
+
if (!packageJson.workspaces) {
|
|
146
|
+
return [];
|
|
147
|
+
}
|
|
148
|
+
const paths = packageJson.workspaces
|
|
149
|
+
.map((workspacePattern) => {
|
|
150
|
+
const packageDir = (0, path_1.dirname)(packageJsonPath);
|
|
151
|
+
const exactPath = (0, path_1.join)(packageDir, workspacePattern);
|
|
152
|
+
if ((0, fs_1.existsSync)(exactPath)) {
|
|
153
|
+
return exactPath;
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
return glob_1.default.sync(workspacePattern, {
|
|
157
|
+
cwd: packageDir,
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
})
|
|
161
|
+
.flat()
|
|
162
|
+
.sort();
|
|
163
|
+
return paths;
|
|
164
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -71,6 +71,11 @@ export declare const virmator: Readonly<{
|
|
|
71
71
|
};
|
|
72
72
|
configFiles: {};
|
|
73
73
|
npmDeps: readonly ["prettier", "prettier-plugin-jsdoc", "prettier-plugin-multiline-arrays", "prettier-plugin-organize-imports", "prettier-plugin-packagejson", "prettier-plugin-sort-json", "prettier-plugin-toml"];
|
|
74
|
+
}> | import("./api/command/define-command").CommandDefinition<{
|
|
75
|
+
commandName: "publish";
|
|
76
|
+
subCommandDescriptions: {};
|
|
77
|
+
configFiles: {};
|
|
78
|
+
npmDeps: readonly [];
|
|
74
79
|
}> | import("./api/command/define-command").CommandDefinition<{
|
|
75
80
|
commandName: "spellcheck";
|
|
76
81
|
subCommandDescriptions: {};
|
package/dist/index.js
CHANGED
|
@@ -21,6 +21,7 @@ const compile_command_1 = require("./commands/compile.command");
|
|
|
21
21
|
const format_command_1 = require("./commands/format.command");
|
|
22
22
|
const frontend_command_1 = require("./commands/frontend.command");
|
|
23
23
|
const init_command_1 = require("./commands/init.command");
|
|
24
|
+
const publish_command_1 = require("./commands/publish.command");
|
|
24
25
|
const spellcheck_command_1 = require("./commands/spellcheck.command");
|
|
25
26
|
const test_web_command_1 = require("./commands/test-web.command");
|
|
26
27
|
const test_command_1 = require("./commands/test.command");
|
|
@@ -49,9 +50,10 @@ exports.virmator = (0, create_virmator_1.createVirmator)({
|
|
|
49
50
|
format_command_1.formatCommandDefinition,
|
|
50
51
|
frontend_command_1.frontendCommandDefinition,
|
|
51
52
|
init_command_1.initCommandDefinition,
|
|
53
|
+
publish_command_1.publishCommandDefinition,
|
|
52
54
|
spellcheck_command_1.spellcheckCommandDefinition,
|
|
53
|
-
test_web_command_1.testWebCommandDefinition,
|
|
54
55
|
test_command_1.testCommandDefinition,
|
|
56
|
+
test_web_command_1.testWebCommandDefinition,
|
|
55
57
|
update_configs_command_1.updateConfigsCommandDefinition,
|
|
56
58
|
],
|
|
57
59
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "virmator",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "Handle all the stuffs in one package.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
"bin": "dist/cli.js",
|
|
29
29
|
"scripts": {
|
|
30
30
|
"compile": "rm -rf dist && tsc",
|
|
31
|
+
"docs:check": "npm run compile && ts-node -r tsconfig-paths/register src/scripts/save-help-message.ts check && md-code --check README.md",
|
|
32
|
+
"docs:update": "npm run compile && ts-node -r tsconfig-paths/register src/scripts/save-help-message.ts && md-code README.md",
|
|
31
33
|
"format": "npm run format:base -- --write --list-different",
|
|
32
34
|
"format:base": "prettier \"./**/*.+(ts|json|html|css|md|js)\"",
|
|
33
35
|
"prepublishOnly": "npm run test:all",
|
|
34
|
-
"readme:check": "npm run compile && ts-node -r tsconfig-paths/register src/scripts/save-help-message.ts check && md-code --check README.md",
|
|
35
|
-
"readme:update": "npm run compile && ts-node -r tsconfig-paths/register src/scripts/save-help-message.ts && md-code README.md",
|
|
36
36
|
"spellcheck": "cspell \"{*,.*,**/{.*,*}/**/{.*,*}}\" --exclude \"test-files/spellcheck/invalid-spellcheck-repo/**/*\" --exclude \"extender-configs\"",
|
|
37
37
|
"test": "bash src/scripts/run-tests.sh",
|
|
38
|
-
"test:all": "npm run test && npm run spellcheck -- --no-progress && npm run test:format && npm run
|
|
38
|
+
"test:all": "npm run test && npm run spellcheck -- --no-progress && npm run test:format && npm run docs:check",
|
|
39
39
|
"test:format": "npm run format:base -- --check",
|
|
40
40
|
"test:help": "ts-node -r tsconfig-paths/register src/cli/cli.ts --help",
|
|
41
41
|
"test:types": "tsc --noEmit"
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"ansi-colors": "^4.1.3",
|
|
45
45
|
"augment-vir": "^3.1.2",
|
|
46
|
+
"glob": "^8.0.3",
|
|
46
47
|
"semver": "^7.3.8",
|
|
47
48
|
"simple-git": "^3.15.0"
|
|
48
49
|
},
|
|
@@ -51,6 +52,7 @@
|
|
|
51
52
|
"@open-wc/testing": "^3.1.7",
|
|
52
53
|
"@types/chai": "^4.3.4",
|
|
53
54
|
"@types/fs-extra": "^9.0.13",
|
|
55
|
+
"@types/glob": "^8.0.0",
|
|
54
56
|
"@types/mocha": "^10.0.0",
|
|
55
57
|
"@types/node": "^18.11.9",
|
|
56
58
|
"@types/semver": "^7.3.13",
|
|
@@ -77,6 +79,7 @@
|
|
|
77
79
|
"prettier-plugin-toml": "^0.3.1",
|
|
78
80
|
"ts-node": "^10.9.1",
|
|
79
81
|
"tsconfig-paths": "^4.1.0",
|
|
82
|
+
"type-fest": "^3.2.0",
|
|
80
83
|
"typescript": "^4.8.4",
|
|
81
84
|
"vite": "^3.2.3"
|
|
82
85
|
},
|