@public-ui/kolibri-cli 2.1.1 → 2.1.3
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/dist/index.js +2 -0
- package/dist/info/index.js +69 -0
- package/dist/migrate/index.js +1 -1
- package/dist/migrate/runner/tasks/common/RefactorPropertyIconAlign.js +67 -0
- package/dist/migrate/runner/tasks/v1/button.js +3 -3
- package/dist/migrate/runner/tasks/v1/index.js +2 -2
- package/dist/migrate/runner/tasks/v1/link.js +3 -3
- package/dist/migrate/shares/reuse.js +8 -8
- package/package.json +16 -16
package/README.md
CHANGED
|
@@ -39,10 +39,18 @@ Options:
|
|
|
39
39
|
-h, --help display help for command
|
|
40
40
|
|
|
41
41
|
Commands:
|
|
42
|
+
info Shows the system and KoliBri package information
|
|
42
43
|
migrate [options] <string> This command migrates KoliBri code to the current version.
|
|
43
44
|
help [command] display help for command
|
|
44
45
|
```
|
|
45
46
|
|
|
47
|
+
### Info
|
|
48
|
+
With the `info` command you can show the current system and KoliBri package information.
|
|
49
|
+
|
|
50
|
+
This command is mainly needed for our bug issue templates.
|
|
51
|
+
If errors occur in our packages, we would like to ask you to create an issue under the following link:
|
|
52
|
+
[Submit report](https://github.com/public-ui/kolibri/issues/new/choose)
|
|
53
|
+
|
|
46
54
|
### Migrate
|
|
47
55
|
|
|
48
56
|
With the `migrate` command you can migrate your project to the latest version of `KoliBri`.
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
const commander_1 = require("commander");
|
|
8
8
|
const gradient_string_1 = __importDefault(require("gradient-string"));
|
|
9
|
+
const info_1 = __importDefault(require("./info"));
|
|
9
10
|
const migrate_1 = __importDefault(require("./migrate"));
|
|
10
11
|
const reuse_1 = require("./migrate/shares/reuse");
|
|
11
12
|
const versionOfPublicUiKoliBriCli = (0, reuse_1.getVersionOfPublicUiKoliBriCli)();
|
|
@@ -23,5 +24,6 @@ console.log(banner);
|
|
|
23
24
|
const program = new commander_1.Command();
|
|
24
25
|
program.name('kolibri').description('CLI for executing some helpful commands for KoliBri projects.').version(versionOfPublicUiKoliBriCli);
|
|
25
26
|
// Add commands
|
|
27
|
+
(0, info_1.default)(program);
|
|
26
28
|
(0, migrate_1.default)(program);
|
|
27
29
|
program.parse();
|
|
@@ -0,0 +1,69 @@
|
|
|
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.default = default_1;
|
|
7
|
+
const os_1 = __importDefault(require("os"));
|
|
8
|
+
const child_process_1 = require("child_process");
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
10
|
+
const fs_1 = __importDefault(require("fs"));
|
|
11
|
+
// Function to get the binary version
|
|
12
|
+
const getBinaryVersion = (command) => {
|
|
13
|
+
try {
|
|
14
|
+
return (0, child_process_1.execSync)(`${command} --version`, { encoding: 'utf8' }).trim();
|
|
15
|
+
}
|
|
16
|
+
catch (_a) {
|
|
17
|
+
return 'N/A';
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
// Get operating system information
|
|
21
|
+
const getOsInfo = () => ({
|
|
22
|
+
platform: os_1.default.platform(),
|
|
23
|
+
arch: os_1.default.arch(),
|
|
24
|
+
version: os_1.default.release(),
|
|
25
|
+
});
|
|
26
|
+
// Get binaries information
|
|
27
|
+
const getBinariesInfo = () => ({
|
|
28
|
+
node: getBinaryVersion('node'),
|
|
29
|
+
npm: getBinaryVersion('npm'),
|
|
30
|
+
pnpm: getBinaryVersion('pnpm'),
|
|
31
|
+
yarn: getBinaryVersion('yarn'),
|
|
32
|
+
});
|
|
33
|
+
// Get relevant packages information
|
|
34
|
+
const getRelevantPackagesInfo = () => {
|
|
35
|
+
const packageJsonPath = path_1.default.join(process.cwd(), 'package.json');
|
|
36
|
+
const packageJson = JSON.parse(fs_1.default.readFileSync(packageJsonPath, 'utf8'));
|
|
37
|
+
const packagePattern = /^@public-ui\//;
|
|
38
|
+
const packagesInfo = {};
|
|
39
|
+
const allDependencies = Object.assign(Object.assign({}, packageJson === null || packageJson === void 0 ? void 0 : packageJson.dependencies), packageJson === null || packageJson === void 0 ? void 0 : packageJson.devDependencies);
|
|
40
|
+
Object.keys(allDependencies).forEach((pkg) => {
|
|
41
|
+
if (packagePattern.test(pkg)) {
|
|
42
|
+
packagesInfo[pkg] = allDependencies === null || allDependencies === void 0 ? void 0 : allDependencies[pkg];
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
// Add specific packages not matching the pattern
|
|
46
|
+
const additionalPackages = ['react', 'react-dom', 'typescript'];
|
|
47
|
+
additionalPackages.forEach((pkg) => {
|
|
48
|
+
packagesInfo[pkg] = (allDependencies === null || allDependencies === void 0 ? void 0 : allDependencies[pkg]) || 'N/A';
|
|
49
|
+
});
|
|
50
|
+
return packagesInfo;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* This function is used to register the migrate command.
|
|
54
|
+
* @param {Command} program The program object to register the command
|
|
55
|
+
*/
|
|
56
|
+
function default_1(program) {
|
|
57
|
+
program
|
|
58
|
+
.command('info')
|
|
59
|
+
.description('This command returns information about your system.')
|
|
60
|
+
.action(() => {
|
|
61
|
+
// Gather all information
|
|
62
|
+
const systemInfo = {
|
|
63
|
+
'Operating System': getOsInfo(),
|
|
64
|
+
Binaries: getBinariesInfo(),
|
|
65
|
+
'Relevant Packages': getRelevantPackagesInfo(),
|
|
66
|
+
};
|
|
67
|
+
console.log(JSON.stringify(systemInfo, null, 2));
|
|
68
|
+
});
|
|
69
|
+
}
|
package/dist/migrate/index.js
CHANGED
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = default_1;
|
|
6
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
7
8
|
const child_process_1 = require("child_process");
|
|
8
9
|
const commander_1 = require("commander");
|
|
@@ -209,4 +210,3 @@ Execute ${status.total} registered tasks...`);
|
|
|
209
210
|
});
|
|
210
211
|
});
|
|
211
212
|
}
|
|
212
|
-
exports.default = default_1;
|
|
@@ -0,0 +1,67 @@
|
|
|
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.RefactorPropertyIconAlign = void 0;
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
|
+
const types_1 = require("../../../../types");
|
|
9
|
+
const reuse_1 = require("../../../shares/reuse");
|
|
10
|
+
const abstract_task_1 = require("../../abstract-task");
|
|
11
|
+
class RefactorPropertyIconAlign extends abstract_task_1.AbstractTask {
|
|
12
|
+
constructor(tag) {
|
|
13
|
+
super(`refactor-property-icon-align`, `Refactor property "_icon-align" - integrate in "_icons" property`, types_1.MARKUP_EXTENSIONS, '^2'); //fixme revert version
|
|
14
|
+
this.tag = tag;
|
|
15
|
+
}
|
|
16
|
+
static getInstance(tag) {
|
|
17
|
+
const identifier = `${tag}-refactor-property-label-replace-false`;
|
|
18
|
+
if (!this.instances.has(identifier)) {
|
|
19
|
+
this.instances.set(identifier, new RefactorPropertyIconAlign(tag));
|
|
20
|
+
}
|
|
21
|
+
return this.instances.get(identifier);
|
|
22
|
+
}
|
|
23
|
+
run(baseDir) {
|
|
24
|
+
this.transpileComponentFile(baseDir);
|
|
25
|
+
this.transpileCustomElementFile(baseDir);
|
|
26
|
+
}
|
|
27
|
+
transpileComponentFile(baseDir) {
|
|
28
|
+
(0, reuse_1.filterFilesByExt)(baseDir, types_1.COMPONENT_FILE_EXTENSIONS).forEach((file) => {
|
|
29
|
+
const content = fs_1.default.readFileSync(file, 'utf8');
|
|
30
|
+
const newContent = this.rewriteComponentContents(content, true);
|
|
31
|
+
if (content !== newContent) {
|
|
32
|
+
reuse_1.MODIFIED_FILES.add(file);
|
|
33
|
+
fs_1.default.writeFileSync(file, newContent);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
transpileCustomElementFile(baseDir) {
|
|
38
|
+
(0, reuse_1.filterFilesByExt)(baseDir, types_1.CUSTOM_ELEMENT_FILE_EXTENSIONS).forEach((file) => {
|
|
39
|
+
const content = fs_1.default.readFileSync(file, 'utf8');
|
|
40
|
+
const newContent = this.rewriteComponentContents(content, false);
|
|
41
|
+
if (content !== newContent) {
|
|
42
|
+
reuse_1.MODIFIED_FILES.add(file);
|
|
43
|
+
fs_1.default.writeFileSync(file, newContent);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
rewriteComponentContents(input, isComponent) {
|
|
48
|
+
const tagName = isComponent ? (0, reuse_1.kebabToCapitalCase)(this.tag) : this.tag;
|
|
49
|
+
const tagsRegex = new RegExp(`<(${tagName}[^>]*_icon(?:-a|A)lign[^>]*)>`, 'g');
|
|
50
|
+
const iconAlignRegex = /_icon(?:-a|A)lign=["'{]+?(\w+)["'}]/;
|
|
51
|
+
const iconsRegex = /_icons=(?:'|"|{"|{')([\w\s-]+)["'}]/;
|
|
52
|
+
return input.replace(tagsRegex, (componentTag) => {
|
|
53
|
+
const iconAlignMatches = componentTag.match(iconAlignRegex);
|
|
54
|
+
const iconsMatches = componentTag.match(iconsRegex);
|
|
55
|
+
// Make sure icons and iconAlign are valid
|
|
56
|
+
if ((iconAlignMatches === null || iconAlignMatches === void 0 ? void 0 : iconAlignMatches[1]) && (iconsMatches === null || iconsMatches === void 0 ? void 0 : iconsMatches[1])) {
|
|
57
|
+
// Replace icons and iconAlign with one joined object
|
|
58
|
+
const newIcons = isComponent
|
|
59
|
+
? `_icons={{ '${iconAlignMatches === null || iconAlignMatches === void 0 ? void 0 : iconAlignMatches[1]}': '${iconsMatches === null || iconsMatches === void 0 ? void 0 : iconsMatches[1]}' }}`
|
|
60
|
+
: `_icons="{ '${iconAlignMatches === null || iconAlignMatches === void 0 ? void 0 : iconAlignMatches[1]}': '${iconsMatches === null || iconsMatches === void 0 ? void 0 : iconsMatches[1]}' }"`;
|
|
61
|
+
return componentTag.replace(iconAlignRegex, '').replace(iconsRegex, newIcons);
|
|
62
|
+
}
|
|
63
|
+
return componentTag;
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.RefactorPropertyIconAlign = RefactorPropertyIconAlign;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ButtonRenamePropertyIconToIcons = exports.ButtonRenamePropertyIconOnlyToHideLabel = exports.
|
|
3
|
+
exports.ButtonRenamePropertyIconToIcons = exports.ButtonRenamePropertyIconOnlyToHideLabel = exports.ButtonRefactorPropertyIconAlign = exports.ButtonRemovePropertyAriaLabel = exports.ButtonRemovePropertyAriaCurrent = void 0;
|
|
4
4
|
const RemovePropertyNameTask_1 = require("../common/RemovePropertyNameTask");
|
|
5
5
|
const RenamePropertyNameTask_1 = require("../common/RenamePropertyNameTask");
|
|
6
|
+
const RefactorPropertyIconAlign_1 = require("../common/RefactorPropertyIconAlign");
|
|
6
7
|
exports.ButtonRemovePropertyAriaCurrent = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-button', '_aria-current', '^1');
|
|
7
8
|
exports.ButtonRemovePropertyAriaLabel = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-button', '_aria-label', '^1');
|
|
8
|
-
|
|
9
|
-
exports.ButtonRemovePropertyIconAlign = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-button', '_icon-align', '^1');
|
|
9
|
+
exports.ButtonRefactorPropertyIconAlign = RefactorPropertyIconAlign_1.RefactorPropertyIconAlign.getInstance('kol-button');
|
|
10
10
|
exports.ButtonRenamePropertyIconOnlyToHideLabel = RenamePropertyNameTask_1.RenamePropertyNameTask.getInstance('kol-button', '_icon-only', '_hide-label', '^1');
|
|
11
11
|
exports.ButtonRenamePropertyIconToIcons = RenamePropertyNameTask_1.RenamePropertyNameTask.getInstance('kol-button', '_icon', '_icons', '^1');
|
|
@@ -60,8 +60,8 @@ exports.v1Tasks.push(button_link_1.ButtonLinkRenamePropertyIconOnlyToHideLabel);
|
|
|
60
60
|
exports.v1Tasks.push(button_link_1.ButtonLinkRenamePropertyIconToIcons);
|
|
61
61
|
exports.v1Tasks.push(button_1.ButtonRemovePropertyAriaCurrent);
|
|
62
62
|
exports.v1Tasks.push(button_1.ButtonRemovePropertyAriaLabel);
|
|
63
|
-
exports.v1Tasks.push(button_1.ButtonRemovePropertyIconAlign);
|
|
64
63
|
exports.v1Tasks.push(button_1.ButtonRenamePropertyIconOnlyToHideLabel);
|
|
64
|
+
exports.v1Tasks.push(button_1.ButtonRefactorPropertyIconAlign);
|
|
65
65
|
exports.v1Tasks.push(button_1.ButtonRenamePropertyIconToIcons);
|
|
66
66
|
exports.v1Tasks.push(card_1.CardRenamePropertyHeadingToLabel);
|
|
67
67
|
exports.v1Tasks.push(card_1.CardRenamePropertyHeadlineToLabel);
|
|
@@ -108,7 +108,7 @@ exports.v1Tasks.push(link_1.LinkRemovePropertyAriaExpanded);
|
|
|
108
108
|
exports.v1Tasks.push(link_1.LinkRemovePropertyAriaLabel);
|
|
109
109
|
exports.v1Tasks.push(link_1.LinkRemovePropertyAriaSelected);
|
|
110
110
|
exports.v1Tasks.push(link_1.LinkRemovePropertyDisabled);
|
|
111
|
-
exports.v1Tasks.push(link_1.
|
|
111
|
+
exports.v1Tasks.push(link_1.LinkRefactorPropertyIconAlign);
|
|
112
112
|
exports.v1Tasks.push(link_1.LinkRemovePropertySelector);
|
|
113
113
|
exports.v1Tasks.push(link_1.LinkRemovePropertyStealth);
|
|
114
114
|
exports.v1Tasks.push(link_1.LinkRemovePropertyUseCase);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LinkRemovePropertyUseCase = exports.LinkRemovePropertyStealth = exports.LinkRemovePropertySelector = exports.LinkRenamePropertyIconOnlyToHideLabel = exports.
|
|
3
|
+
exports.LinkRemovePropertyUseCase = exports.LinkRemovePropertyStealth = exports.LinkRemovePropertySelector = exports.LinkRenamePropertyIconOnlyToHideLabel = exports.LinkRefactorPropertyIconAlign = exports.LinkRenamePropertyIconToIcons = exports.LinkRemovePropertyDisabled = exports.LinkRemovePropertyAriaSelected = exports.LinkRemovePropertyAriaLabel = exports.LinkRemovePropertyAriaExpanded = exports.LinkRenamePropertyAriaCurrentToListenAriaCurrent = exports.LinkRemovePropertyAriaControls = void 0;
|
|
4
4
|
const RemovePropertyNameTask_1 = require("../common/RemovePropertyNameTask");
|
|
5
5
|
const RenamePropertyNameTask_1 = require("../common/RenamePropertyNameTask");
|
|
6
|
+
const RefactorPropertyIconAlign_1 = require("../common/RefactorPropertyIconAlign");
|
|
6
7
|
exports.LinkRemovePropertyAriaControls = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-link', '_aria-controls', '^1');
|
|
7
8
|
exports.LinkRenamePropertyAriaCurrentToListenAriaCurrent = RenamePropertyNameTask_1.RenamePropertyNameTask.getInstance('kol-link', '_aria-current', '_listen-aria-current', '^1');
|
|
8
9
|
exports.LinkRemovePropertyAriaExpanded = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-link', '_aria-expanded', '^1');
|
|
@@ -10,8 +11,7 @@ exports.LinkRemovePropertyAriaLabel = RemovePropertyNameTask_1.RemovePropertyNam
|
|
|
10
11
|
exports.LinkRemovePropertyAriaSelected = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-link', '_aria-selected', '^1');
|
|
11
12
|
exports.LinkRemovePropertyDisabled = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-link', '_disabled', '^1');
|
|
12
13
|
exports.LinkRenamePropertyIconToIcons = RenamePropertyNameTask_1.RenamePropertyNameTask.getInstance('kol-link', '_icon', '_icons', '^1');
|
|
13
|
-
|
|
14
|
-
exports.LinkRemovePropertyIconAlign = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-link', '_icon-align', '^1');
|
|
14
|
+
exports.LinkRefactorPropertyIconAlign = RefactorPropertyIconAlign_1.RefactorPropertyIconAlign.getInstance('kol-link');
|
|
15
15
|
exports.LinkRenamePropertyIconOnlyToHideLabel = RenamePropertyNameTask_1.RenamePropertyNameTask.getInstance('kol-link', '_icon-only', '_hide-label', '^1');
|
|
16
16
|
exports.LinkRemovePropertySelector = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-link', '_selector', '^1');
|
|
17
17
|
exports.LinkRemovePropertyStealth = RemovePropertyNameTask_1.RemovePropertyNameTask.getInstance('kol-link', '_stealth', '^1');
|
|
@@ -3,7 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.POST_MESSAGES = exports.findIndexHtml = exports.resolveIndexHtmlPath = exports.getVersionOfPublicUiKoliBriCli = exports.getVersionOfPublicUiComponents = exports.getContentOfProjectPkgJson = exports.
|
|
6
|
+
exports.POST_MESSAGES = exports.findIndexHtml = exports.resolveIndexHtmlPath = exports.getVersionOfPublicUiKoliBriCli = exports.getVersionOfPublicUiComponents = exports.getContentOfProjectPkgJson = exports.MODIFIED_FILES = exports.isPropertyKebabCaseRegExp = exports.isTagKebabCaseRegExp = exports.isKebabCaseRegExp = void 0;
|
|
7
|
+
exports.logAndCreateError = logAndCreateError;
|
|
8
|
+
exports.filterFilesByExt = filterFilesByExt;
|
|
9
|
+
exports.getPackageManagerCommand = getPackageManagerCommand;
|
|
10
|
+
exports.kebabToCapitalCase = kebabToCapitalCase;
|
|
11
|
+
exports.kebabToCamelCase = kebabToCamelCase;
|
|
12
|
+
exports.setRemoveMode = setRemoveMode;
|
|
13
|
+
exports.getRemoveMode = getRemoveMode;
|
|
7
14
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
15
|
const fs_1 = __importDefault(require("fs"));
|
|
9
16
|
const path_1 = __importDefault(require("path"));
|
|
@@ -27,7 +34,6 @@ Error:`), `${msg}
|
|
|
27
34
|
// @todo process.exit(1); // makes `hint` undefined - ?!
|
|
28
35
|
return new Error();
|
|
29
36
|
}
|
|
30
|
-
exports.logAndCreateError = logAndCreateError;
|
|
31
37
|
/**
|
|
32
38
|
* Recursively searches for files with the specified extension in the specified directory.
|
|
33
39
|
* @param {string} dir The directory to search in
|
|
@@ -49,7 +55,6 @@ function filterFilesByExt(dir, ext) {
|
|
|
49
55
|
});
|
|
50
56
|
return files;
|
|
51
57
|
}
|
|
52
|
-
exports.filterFilesByExt = filterFilesByExt;
|
|
53
58
|
/**
|
|
54
59
|
* This function is used to get the version of the package.json as string.
|
|
55
60
|
* @param {string} offsetPath The offset path to the package.json
|
|
@@ -97,7 +102,6 @@ function getPackageManagerCommand(command, baseDir = process.cwd()) {
|
|
|
97
102
|
}
|
|
98
103
|
return getPackageManagerCommand(command, baseDir);
|
|
99
104
|
}
|
|
100
|
-
exports.getPackageManagerCommand = getPackageManagerCommand;
|
|
101
105
|
exports.isKebabCaseRegExp = /^((data-removed-)?[a-z]+(-[a-z]+)*)?$/;
|
|
102
106
|
exports.isTagKebabCaseRegExp = /^kol-[a-z]+(-[a-z]+)*$/;
|
|
103
107
|
exports.isPropertyKebabCaseRegExp = /^(data-removed-)?_[a-z]+(-[a-z]+)*$/;
|
|
@@ -112,7 +116,6 @@ function kebabToCapitalCase(str) {
|
|
|
112
116
|
.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()) // Capitalize each word
|
|
113
117
|
.join(''); // Join without space
|
|
114
118
|
}
|
|
115
|
-
exports.kebabToCapitalCase = kebabToCapitalCase;
|
|
116
119
|
/**
|
|
117
120
|
* Converts a kebab case string to a camel case string.
|
|
118
121
|
* @param {string} str The kebab case string
|
|
@@ -124,7 +127,6 @@ function kebabToCamelCase(str) {
|
|
|
124
127
|
.map((word, index) => (index === 0 ? word : word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())) // Capitalize each word
|
|
125
128
|
.join(''); // Join without space
|
|
126
129
|
}
|
|
127
|
-
exports.kebabToCamelCase = kebabToCamelCase;
|
|
128
130
|
exports.MODIFIED_FILES = new Set();
|
|
129
131
|
let REMOVE_MODE = 'prefix';
|
|
130
132
|
/**
|
|
@@ -134,7 +136,6 @@ let REMOVE_MODE = 'prefix';
|
|
|
134
136
|
function setRemoveMode(mode) {
|
|
135
137
|
REMOVE_MODE = mode;
|
|
136
138
|
}
|
|
137
|
-
exports.setRemoveMode = setRemoveMode;
|
|
138
139
|
/**
|
|
139
140
|
* Gets the remove mode.
|
|
140
141
|
* @returns {RemoveMode} The remove mode
|
|
@@ -142,7 +143,6 @@ exports.setRemoveMode = setRemoveMode;
|
|
|
142
143
|
function getRemoveMode() {
|
|
143
144
|
return REMOVE_MODE;
|
|
144
145
|
}
|
|
145
|
-
exports.getRemoveMode = getRemoveMode;
|
|
146
146
|
const getContentOfProjectPkgJson = () => {
|
|
147
147
|
try {
|
|
148
148
|
return readPackageString(path_1.default.resolve(process.cwd()));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@public-ui/kolibri-cli",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"homepage": "https://public-ui.github.io",
|
|
6
6
|
"repository": {
|
|
@@ -22,34 +22,34 @@
|
|
|
22
22
|
"type": "commonjs",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"chalk": "4.1.2",
|
|
25
|
-
"commander": "12.
|
|
25
|
+
"commander": "12.1.0",
|
|
26
26
|
"deepmerge": "4.3.1",
|
|
27
27
|
"gradient-string": "2.0.2",
|
|
28
28
|
"loglevel": "1.9.1",
|
|
29
|
-
"prettier": "3.2
|
|
30
|
-
"semver": "7.6.
|
|
29
|
+
"prettier": "3.3.2",
|
|
30
|
+
"semver": "7.6.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/gradient-string": "1.1.6",
|
|
34
34
|
"@types/node": "ts5.4",
|
|
35
|
-
"@typescript-eslint/eslint-plugin": "7.
|
|
36
|
-
"@typescript-eslint/parser": "7.
|
|
35
|
+
"@typescript-eslint/eslint-plugin": "7.14.1",
|
|
36
|
+
"@typescript-eslint/parser": "7.14.1",
|
|
37
37
|
"cpy-cli": "5.0.0",
|
|
38
38
|
"eslint": "8.57.0",
|
|
39
39
|
"eslint-config-prettier": "9.1.0",
|
|
40
40
|
"eslint-plugin-html": "8.1.1",
|
|
41
|
-
"eslint-plugin-jsdoc": "48.
|
|
41
|
+
"eslint-plugin-jsdoc": "48.5.0",
|
|
42
42
|
"eslint-plugin-json": "3.1.0",
|
|
43
|
-
"eslint-plugin-jsx-a11y": "6.
|
|
44
|
-
"eslint-plugin-no-loops": "0.
|
|
45
|
-
"eslint-plugin-react": "7.34.
|
|
46
|
-
"knip": "5.
|
|
47
|
-
"mocha": "10.
|
|
48
|
-
"nodemon": "3.1.
|
|
49
|
-
"rimraf": "5.0.
|
|
43
|
+
"eslint-plugin-jsx-a11y": "6.9.0",
|
|
44
|
+
"eslint-plugin-no-loops": "0.4.0",
|
|
45
|
+
"eslint-plugin-react": "7.34.3",
|
|
46
|
+
"knip": "5.23.0",
|
|
47
|
+
"mocha": "10.5.1",
|
|
48
|
+
"nodemon": "3.1.4",
|
|
49
|
+
"rimraf": "5.0.7",
|
|
50
50
|
"ts-node": "10.9.2",
|
|
51
|
-
"typescript": "5.
|
|
52
|
-
"@public-ui/components": "2.1.
|
|
51
|
+
"typescript": "5.5.2",
|
|
52
|
+
"@public-ui/components": "2.1.3"
|
|
53
53
|
},
|
|
54
54
|
"files": [
|
|
55
55
|
"dist"
|