@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.
- package/LICENSE +21 -0
- package/README.md +172 -0
- package/dist/application/configuration.d.ts +7 -0
- package/dist/application/configuration.js +135 -0
- package/dist/application/microfrontend-profile.d.ts +2 -0
- package/dist/application/microfrontend-profile.js +66 -0
- package/dist/application/microfrontend.d.ts +22 -0
- package/dist/application/microfrontend.js +135 -0
- package/dist/application/shell-configuration.d.ts +2 -0
- package/dist/application/shell-configuration.js +30 -0
- package/dist/application/shell-repository.d.ts +10 -0
- package/dist/application/shell-repository.js +141 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +31 -0
- package/dist/commands/build.d.ts +2 -0
- package/dist/commands/build.js +34 -0
- package/dist/commands/capacitor.d.ts +2 -0
- package/dist/commands/capacitor.js +84 -0
- package/dist/commands/create.d.ts +2 -0
- package/dist/commands/create.js +70 -0
- package/dist/commands/info.d.ts +2 -0
- package/dist/commands/info.js +26 -0
- package/dist/commands/microfrontend.d.ts +2 -0
- package/dist/commands/microfrontend.js +85 -0
- package/dist/commands/shell.d.ts +2 -0
- package/dist/commands/shell.js +18 -0
- package/dist/commands/start.d.ts +2 -0
- package/dist/commands/start.js +69 -0
- package/dist/types.d.ts +26 -0
- package/dist/types.js +1 -0
- package/dist/utils/names.d.ts +4 -0
- package/dist/utils/names.js +28 -0
- package/package.json +52 -0
|
@@ -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
|
+
}
|