@open-mova/cli 0.1.9

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.
@@ -0,0 +1,28 @@
1
+ const VALID_NAME = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
2
+ export function normalizeName(value, label) {
3
+ const normalized = value
4
+ .trim()
5
+ .replace(/([a-z0-9])([A-Z])/g, '$1-$2')
6
+ .replace(/[^a-zA-Z0-9]+/g, '-')
7
+ .replace(/^-+|-+$/g, '')
8
+ .toLowerCase();
9
+ if (!VALID_NAME.test(normalized)) {
10
+ throw new Error(`${label} debe contener letras, números y guiones. Valor recibido: "${value}".`);
11
+ }
12
+ return normalized;
13
+ }
14
+ export function toDisplayName(value) {
15
+ return value
16
+ .split('-')
17
+ .map((part) => `${part[0]?.toUpperCase() ?? ''}${part.slice(1)}`)
18
+ .join(' ');
19
+ }
20
+ export function toPascalCase(value) {
21
+ return value
22
+ .split('-')
23
+ .map((part) => `${part[0]?.toUpperCase() ?? ''}${part.slice(1)}`)
24
+ .join('');
25
+ }
26
+ export function toRemoteName(name) {
27
+ return `${name}-microfrontend`;
28
+ }
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@open-mova/cli",
3
+ "version": "0.1.9",
4
+ "description": "CLI para crear y mantener aplicaciones Open Mova",
5
+ "license": "MIT",
6
+ "author": "Open Mova contributors",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/rgarciadelongoria/open-mova.git",
10
+ "directory": "open-mova-cli"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/rgarciadelongoria/open-mova/issues"
14
+ },
15
+ "homepage": "https://github.com/rgarciadelongoria/open-mova#readme",
16
+ "keywords": [
17
+ "angular",
18
+ "capacitor",
19
+ "cli",
20
+ "microfrontends",
21
+ "native-federation",
22
+ "open-mova"
23
+ ],
24
+ "engines": {
25
+ "node": ">=22"
26
+ },
27
+ "publishConfig": {
28
+ "access": "public"
29
+ },
30
+ "type": "module",
31
+ "files": [
32
+ "dist",
33
+ "README.md",
34
+ "LICENSE"
35
+ ],
36
+ "bin": {
37
+ "mova": "dist/cli.js"
38
+ },
39
+ "scripts": {
40
+ "build": "tsc",
41
+ "start": "tsx src/cli.ts",
42
+ "typecheck": "tsc --noEmit"
43
+ },
44
+ "dependencies": {
45
+ "commander": "^14.0.0"
46
+ },
47
+ "devDependencies": {
48
+ "@types/node": "^24.0.0",
49
+ "tsx": "^4.20.0",
50
+ "typescript": "^5.9.3"
51
+ }
52
+ }