@robert.tools/setup 1.1.1 → 1.2.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/dist/_shared/changes/changes.d.ts +10 -9
- package/dist/_shared/changes/changes.js +27 -16
- package/dist/_shared/changes/changes.js.map +1 -1
- package/dist/_shared/check/check.d.ts +43 -3
- package/dist/_shared/check/check.js +154 -11
- package/dist/_shared/check/check.js.map +1 -1
- package/dist/_shared/git/git.d.ts +1 -0
- package/dist/_shared/git/git.js +7 -1
- package/dist/_shared/git/git.js.map +1 -1
- package/dist/_shared/logger/logger.d.ts +9 -0
- package/dist/_shared/logger/logger.js +85 -0
- package/dist/_shared/logger/logger.js.map +1 -0
- package/dist/_shared/npm/npm.d.ts +22 -2
- package/dist/_shared/npm/npm.js +35 -18
- package/dist/_shared/npm/npm.js.map +1 -1
- package/dist/_shared/test-vars.config.d.ts +72 -0
- package/dist/_shared/test-vars.config.js +107 -0
- package/dist/_shared/test-vars.config.js.map +1 -0
- package/dist/_shared/testing/testing.d.ts +6 -0
- package/dist/_shared/testing/testing.js +9 -1
- package/dist/_shared/testing/testing.js.map +1 -1
- package/dist/_shared/tools/tools.d.ts +3 -0
- package/dist/_shared/tools/tools.js +21 -0
- package/dist/_shared/tools/tools.js.map +1 -0
- package/dist/apps/index.d.ts +2 -2
- package/dist/apps/index.js +21 -11
- package/dist/apps/index.js.map +1 -1
- package/dist/apps/init/init.config.d.ts +21 -0
- package/dist/apps/init/init.config.js +75 -0
- package/dist/apps/init/init.config.js.map +1 -0
- package/dist/apps/init/init.d.ts +4 -3
- package/dist/apps/init/init.js +65 -45
- package/dist/apps/init/init.js.map +1 -1
- package/dist/apps/messages.config.d.ts +4 -0
- package/dist/apps/messages.config.js +56 -0
- package/dist/apps/messages.config.js.map +1 -0
- package/package.json +7 -2
package/dist/apps/init/init.js
CHANGED
|
@@ -1,38 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.hasValidParam = exports.run = exports.init = void 0;
|
|
3
|
+
exports.hasValidParam = exports.run = exports.init = exports.updateResult = void 0;
|
|
4
4
|
const fs_1 = require("@robert.tools/fs");
|
|
5
|
-
const log_1 = require("@robert.tools/log");
|
|
6
5
|
const config_1 = require("../config");
|
|
7
6
|
const changes_1 = require("../../_shared/changes/changes");
|
|
8
7
|
const check_1 = require("../../_shared/check/check");
|
|
9
|
-
const npm_1 = require("../../_shared/npm/npm");
|
|
10
|
-
const git_1 = require("../../_shared/git/git");
|
|
11
8
|
const shell_1 = require("../../_shared/shell/shell");
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
const logger_1 = require("../../_shared/logger/logger");
|
|
10
|
+
const messages_config_1 = require("../messages.config");
|
|
11
|
+
const tools_1 = require("../../_shared/tools/tools");
|
|
12
|
+
const updateResult = (result, file_changes) => {
|
|
13
|
+
const { file } = file_changes;
|
|
14
|
+
if (!result.changes[file]) {
|
|
15
|
+
result.changes[file] = { file, updated: file_changes.updated };
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
result.changes[file].updated = [
|
|
19
|
+
...result.changes[file].updated,
|
|
20
|
+
...file_changes.updated,
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
result.logs = [...result.logs, ...file_changes.logs];
|
|
24
|
+
};
|
|
25
|
+
exports.updateResult = updateResult;
|
|
26
|
+
const init = (root, version, opts, result) => {
|
|
27
|
+
const isInitial = (0, tools_1.getProperty)(opts, 'isInitial', false);
|
|
28
|
+
const noSpec = (0, tools_1.getProperty)(opts, 'noSpec', false);
|
|
15
29
|
// if root is not test_data
|
|
16
|
-
const start = new Date().getTime();
|
|
17
30
|
if (root.indexOf('test_data') === -1) {
|
|
18
31
|
config_1.BLACKLIST.push('test_data');
|
|
19
|
-
|
|
32
|
+
(0, logger_1.addLogItem)(messages_config_1.MSG.BLACKLIST, result.logs);
|
|
20
33
|
}
|
|
21
34
|
let files = fs_1.FS.list(root, true, true, config_1.BLACKLIST);
|
|
22
35
|
if (noSpec) {
|
|
23
36
|
files = files.filter((file) => !file.endsWith('spec.ts'));
|
|
24
37
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const items = isInitial ? (0, changes_1.getItems)(version) : [];
|
|
38
|
+
const _items = isInitial ? (0, changes_1.getItems)(version) : [];
|
|
39
|
+
const items = opts.items ? [...opts.items, ..._items] : _items;
|
|
28
40
|
// avoid reading node_modules, .git etc by checking number of files
|
|
29
41
|
if (files.length > config_1.MAX_FILES) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return
|
|
42
|
+
const count = files.length.toString();
|
|
43
|
+
(0, logger_1.addLogItem)({ ...messages_config_1.MSG.TOO_MANY_FILES, param: { count } }, result.logs);
|
|
44
|
+
return result;
|
|
33
45
|
}
|
|
34
46
|
// replace placeholders
|
|
35
|
-
const allChanges = [];
|
|
36
47
|
const PROP_ITEMS = [
|
|
37
48
|
{
|
|
38
49
|
property: 'version',
|
|
@@ -49,55 +60,64 @@ const init = (root, version, opts) => {
|
|
|
49
60
|
const hasFullPath = file.startsWith('~') || file.startsWith('/');
|
|
50
61
|
const homeDir = (0, shell_1.getHomeDir)();
|
|
51
62
|
const filePath = hasFullPath ? file : `${homeDir}/${file}`;
|
|
52
|
-
|
|
63
|
+
const file_changes = { logs: [], updated: [], file: filePath };
|
|
64
|
+
const doWrite = (0, tools_1.getProperty)(opts, 'doWrite', true);
|
|
65
|
+
(0, check_1.checkFile)(items, PROP_ITEMS, file_changes, doWrite);
|
|
66
|
+
(0, exports.updateResult)(result, file_changes);
|
|
53
67
|
});
|
|
54
68
|
// update jsdoc version
|
|
55
|
-
return
|
|
69
|
+
return result;
|
|
56
70
|
};
|
|
57
71
|
exports.init = init;
|
|
58
72
|
const run = (cmd, params = []) => {
|
|
59
|
-
const result = {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
};
|
|
73
|
+
const result = { changes: {}, logs: [] };
|
|
74
|
+
const LOGS = [];
|
|
75
|
+
const opts = {};
|
|
63
76
|
const param = params[0];
|
|
77
|
+
opts.cmd = cmd;
|
|
78
|
+
opts.params = params;
|
|
64
79
|
// get package name from package.json
|
|
65
|
-
const
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const localVersion = (0, npm_1.getLocalVersion)(packageName, repoRoot);
|
|
71
|
-
if (latest !== localVersion) {
|
|
72
|
-
result.logs.push({
|
|
73
|
-
type: 'WARN',
|
|
74
|
-
message: `Version mismatch for package ${packageName}: npm registry version is ${latest}, local package.json version is ${localVersion}`,
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
const baseVersion = isInit ? localVersion : latest;
|
|
78
|
-
const newVersion = (0, git_1.incrementVersion)(baseVersion, param);
|
|
79
|
-
const opts = {};
|
|
80
|
+
const root = (0, check_1.checkBase)(cmd, opts, LOGS);
|
|
81
|
+
const pkgName = (0, check_1.checkPackageName)(root, opts, LOGS);
|
|
82
|
+
const packageName = pkgName.name;
|
|
83
|
+
// todo: do change
|
|
84
|
+
// TODO: wenn remote nicht 0.0.0 und aber immer noch default Name nicht wie remote name
|
|
80
85
|
// special for setup
|
|
81
|
-
if (
|
|
86
|
+
if (pkgName.name.indexOf('/setup') !== -1) {
|
|
82
87
|
opts.noSpec = true;
|
|
83
88
|
if (params && params[1] && params[1] === 'all') {
|
|
84
89
|
opts.noSpec = false;
|
|
85
90
|
}
|
|
86
91
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
log_1.LOG.INFO(`run ${cmd} with param ${param} and version ${newVersion}`);
|
|
91
|
-
log_1.LOG.OK(`latest version ${latest}, name: ${packageName}, root ${repoRoot}`);
|
|
92
|
+
const versions = (0, check_1.checkVersions)(packageName, root, param, LOGS);
|
|
93
|
+
const newVersion = versions.next;
|
|
94
|
+
// console.log(result.changes);
|
|
92
95
|
switch (cmd) {
|
|
93
96
|
case 'init':
|
|
94
|
-
|
|
97
|
+
opts.isInitial = true;
|
|
98
|
+
(0, exports.init)(root, newVersion, opts, result);
|
|
95
99
|
break;
|
|
96
100
|
case 'release':
|
|
97
101
|
// TODO: check for changed files
|
|
98
|
-
|
|
102
|
+
(0, exports.init)(root, newVersion, opts, result);
|
|
103
|
+
break;
|
|
104
|
+
case 'verbose':
|
|
105
|
+
// TODO: check for changed files
|
|
106
|
+
opts.doWrite = false;
|
|
107
|
+
(0, exports.init)(root, newVersion, opts, result);
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
result.logs = [...result.logs, ...LOGS];
|
|
111
|
+
const filterTags = [];
|
|
112
|
+
switch (cmd) {
|
|
113
|
+
case 'status':
|
|
114
|
+
filterTags.push('status');
|
|
115
|
+
break;
|
|
116
|
+
case 'version':
|
|
117
|
+
filterTags.push('version');
|
|
99
118
|
break;
|
|
100
119
|
}
|
|
120
|
+
result.logs = (0, logger_1.getFilteredLogsByTags)(result.logs, filterTags);
|
|
101
121
|
return result;
|
|
102
122
|
};
|
|
103
123
|
exports.run = run;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/apps/init/init.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/apps/init/init.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,sCAAiD;AACjD,2DAAyD;AACzD,qDAKmC;AAGnC,qDAAuD;AAEvD,wDAAgF;AAChF,wDAAyC;AAEzC,qDAAwD;AAEjD,MAAM,YAAY,GAAG,CAAC,MAAc,EAAE,YAA0B,EAAE,EAAE;IACvE,MAAM,EAAE,IAAI,EAAE,GAAG,YAAY,CAAC;IAC9B,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAA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M,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CACzD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAC1B,CAAC;IACF,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC;AARW,QAAA,aAAa,iBAQxB"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MSG = void 0;
|
|
4
|
+
const msgNewName = `Overwrite name: {oldName} to {newName}`;
|
|
5
|
+
const msgDiffName = `Mismatch of names. local {local} vs remote {remote}`;
|
|
6
|
+
// const msgOverwrite = `Overwrite local version from {from} to {to}`;
|
|
7
|
+
const msgNoRemote = `No remote version for package {name}. Set to {version}`;
|
|
8
|
+
const msgLatestV = `Latest version: {version}`;
|
|
9
|
+
const msgNextV = `Next possible version: {version}`;
|
|
10
|
+
const msgLocalV = `version [local]: {version}`;
|
|
11
|
+
const msgLocalName = 'Package name [local]: {name}';
|
|
12
|
+
const msgRemoteName = 'Package name [remote]: {name}';
|
|
13
|
+
const msgEmptyLocalN = 'Package name [local] is empty: {name}';
|
|
14
|
+
const msgDiffVersion = `Mismatch of versions. local {local} vs remote {remote}`;
|
|
15
|
+
const msgCMD = `run Command: {cmd} with {params}`;
|
|
16
|
+
const msgNoVerbose = `no verbose command: {verbose}`;
|
|
17
|
+
const msgTooManyFiles = `Too many files ({count}) to process.`;
|
|
18
|
+
const msgBlacklist = `add test_data to blacklist`;
|
|
19
|
+
const msgNoPackage = `No package found in local package.json`;
|
|
20
|
+
const msgNoLocalV = `No local version found in package.json`;
|
|
21
|
+
const msgNoFile = `File {file} does not exist`;
|
|
22
|
+
const msgNoJSDoc = `File {file} does not have a JSDoc comment at the beginning`;
|
|
23
|
+
const msgJSONError = `File {file} is not a valid JSON file. Error: {error}`;
|
|
24
|
+
const msgFileEmpty = `File {file} is empty`;
|
|
25
|
+
const T_VERSION_STATUS = { tags: ['version', 'status'] };
|
|
26
|
+
const T_STATUS_INIT_REL = { tags: ['status', 'init', 'release'] };
|
|
27
|
+
exports.MSG = {
|
|
28
|
+
// name
|
|
29
|
+
NAME: { type: 'DEBUG', msg: 'Package name: {name}', tags: ['status'] },
|
|
30
|
+
NEW_NAME: { type: 'INFO', msg: msgNewName },
|
|
31
|
+
DIFF_NAME: { type: 'WARN', msg: msgDiffName },
|
|
32
|
+
LOCAL_NAME: { type: 'DEBUG', msg: msgLocalName, tags: ['status'] },
|
|
33
|
+
EMPTY_LOCAL_NAME: { type: 'WARN', msg: msgEmptyLocalN, tags: ['status'] },
|
|
34
|
+
REMOTE_NAME: { type: 'DEBUG', msg: msgRemoteName, tags: ['status'] },
|
|
35
|
+
// version
|
|
36
|
+
DIFF_VERSION: { type: 'WARN', msg: msgDiffVersion, ...T_VERSION_STATUS },
|
|
37
|
+
NO_REMOTE_VERSION: { type: 'INFO', msg: msgNoRemote, ...T_VERSION_STATUS },
|
|
38
|
+
LATEST_VERSION: { type: 'DEBUG', msg: msgLatestV, ...T_VERSION_STATUS },
|
|
39
|
+
NEXT_VERSION: { type: 'DEBUG', msg: msgNextV, ...T_VERSION_STATUS },
|
|
40
|
+
LOCAL_VERSION: { type: 'DEBUG', msg: msgLocalV, ...T_VERSION_STATUS },
|
|
41
|
+
NO_LOCAL_VERSION: { type: 'FAIL', msg: msgNoLocalV, ...T_VERSION_STATUS },
|
|
42
|
+
// other
|
|
43
|
+
ROOT: { type: 'DEBUG', msg: 'Root: {root}', tags: ['status'] },
|
|
44
|
+
CMD: { type: 'INFO', msg: msgCMD, tags: ['all'] },
|
|
45
|
+
NO_VERBOSE: { type: 'DEBUG', msg: msgNoVerbose, tags: ['status'] },
|
|
46
|
+
BLACKLIST: { type: 'DEBUG', msg: msgBlacklist, tags: ['status'] },
|
|
47
|
+
NO_PACKAGE: { type: 'FAIL', msg: msgNoPackage, tags: ['all'] },
|
|
48
|
+
NO_JSDOC: { type: 'WARN', msg: msgNoJSDoc, ...T_STATUS_INIT_REL },
|
|
49
|
+
DONE: { type: 'OK', msg: `✅ Done in {time}ms`, tags: ['all'] },
|
|
50
|
+
JSON_ERROR: { type: 'FAIL', msg: msgJSONError, tags: ['all'] },
|
|
51
|
+
// files
|
|
52
|
+
TOO_MANY_FILES: { type: 'FAIL', msg: msgTooManyFiles, tags: ['all'] },
|
|
53
|
+
FILE_NOT_EXISTS: { type: 'WARN', msg: msgNoFile, ...T_STATUS_INIT_REL },
|
|
54
|
+
EMPTY_FILE: { type: 'WARN', msg: msgFileEmpty, ...T_STATUS_INIT_REL },
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=messages.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.config.js","sourceRoot":"","sources":["../../src/apps/messages.config.ts"],"names":[],"mappings":";;;AAEA,MAAM,UAAU,GAAG,wCAAwC,CAAC;AAC5D,MAAM,WAAW,GAAG,qDAAqD,CAAC;AAC1E,sEAAsE;AACtE,MAAM,WAAW,GAAG,wDAAwD,CAAC;AAC7E,MAAM,UAAU,GAAG,2BAA2B,CAAC;AAC/C,MAAM,QAAQ,GAAG,kCAAkC,CAAC;AACpD,MAAM,SAAS,GAAG,4BAA4B,CAAC;AAC/C,MAAM,YAAY,GAAG,8BAA8B,CAAC;AACpD,MAAM,aAAa,GAAG,+BAA+B,CAAC;AACtD,MAAM,cAAc,GAAG,uCAAuC,CAAC;AAE/D,MAAM,cAAc,GAAG,wDAAwD,CAAC;AAChF,MAAM,MAAM,GAAG,kCAAkC,CAAC;AAClD,MAAM,YAAY,GAAG,+BAA+B,CAAC;AACrD,MAAM,eAAe,GAAG,sCAAsC,CAAC;AAC/D,MAAM,YAAY,GAAG,4BAA4B,CAAC;AAClD,MAAM,YAAY,GAAG,wCAAwC,CAAC;AAC9D,MAAM,WAAW,GAAG,wCAAwC,CAAC;AAC7D,MAAM,SAAS,GAAG,4BAA4B,CAAC;AAC/C,MAAM,U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AE,CAAC,KAAK,CAAC,EAAE;IACrE,eAAe,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,iBAAiB,EAAE;IACvE,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,iBAAiB,EAAE;CACxE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robert.tools/setup",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "A couple of tools to initialize and update a repo.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -14,6 +14,11 @@
|
|
|
14
14
|
"dist"
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
|
+
"init": "npm run run init",
|
|
18
|
+
"release": "npm run run release",
|
|
19
|
+
"status": "npm run run status",
|
|
20
|
+
"version": "npm run run version",
|
|
21
|
+
"verbose": "npm run run verbose",
|
|
17
22
|
"build": "tsc -p tsconfig.build.json",
|
|
18
23
|
"run": "tsx src/apps/index.ts",
|
|
19
24
|
"test": "jest --coverage --runInBand --verbose",
|
|
@@ -63,7 +68,7 @@
|
|
|
63
68
|
"dependencies": {
|
|
64
69
|
"@robert.tools/cmd": "^1.0.0",
|
|
65
70
|
"@robert.tools/colors": "^1.0.0",
|
|
66
|
-
"@robert.tools/fs": "^1.
|
|
71
|
+
"@robert.tools/fs": "^1.3.0",
|
|
67
72
|
"@robert.tools/log": "^1.0.0"
|
|
68
73
|
}
|
|
69
74
|
}
|