g360-cli 1.12.0 → 1.13.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/README.md +141 -12
- package/package.json +1 -1
- package/src/assets/brand/brand.json +1 -3
- package/src/assets/templates/ARCHITECTURE.md +50 -0
- package/src/assets/templates/lit-web/README.md +47 -0
- package/src/assets/templates/python-cli/README.md +47 -0
- package/src/assets/templates/python-customtkinter/README.md +45 -34
- package/src/assets/templates/python-flet/README.md +46 -66
- package/src/assets/templates/python-flet-migrate/README.md +35 -55
- package/src/assets/templates/solid-web/README.md +47 -0
- package/src/assets/templates/svelte-web/README.md +47 -0
- package/src/assets/templates/web-pwa/README.md +47 -0
- package/src/cli.js +16 -0
- package/src/commands/clean.js +2 -23
- package/src/commands/convert.js +1 -23
- package/src/commands/docs.js +815 -0
- package/src/commands/init.js +46 -4
- package/src/commands/lint.js +578 -0
- package/src/lib/file-utils.js +27 -0
- package/src/assets/brand/g360/logotypes/logo_g360_dark_b64.txt +0 -1
- package/src/assets/brand/g360/logotypes/logo_g360_light_b64.txt +0 -1
- package/src/lib/global-config.js +0 -260
- package/src/lib/i18n.js +0 -238
- package/src/lib/python_runner.js +0 -89
|
@@ -1,70 +1,50 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Mi Proyecto G360 Migracion
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="g360/brand/g360/logotypes/logo-g360-light.svg">
|
|
5
|
+
<img alt="G360" height="64" src="g360/brand/g360/logotypes/logo-g360-dark.svg">
|
|
6
|
+
</picture>
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
> Migracion de tkinter/CustomTkinter a Flet con el ecosistema G360
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
│ ├── core/
|
|
13
|
-
│ │ ├── skill.json # Configuracion del skill G360
|
|
14
|
-
│ │ └── g360_theme.py # Theme engine
|
|
15
|
-
├── assets/
|
|
16
|
-
│ └── images/
|
|
17
|
-
├── skill.json # Skill G360 aplicado
|
|
18
|
-
├── pyproject.toml # Dependencias
|
|
19
|
-
├── run.bat # Ejecutar app
|
|
20
|
-
├── build.bat # Build EXE standalone
|
|
21
|
-
└── README.md
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
uv sync
|
|
14
|
+
uv run python src/main.py
|
|
22
15
|
```
|
|
23
16
|
|
|
24
|
-
##
|
|
17
|
+
## Estructura del Proyecto
|
|
25
18
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
```mermaid
|
|
20
|
+
flowchart TD
|
|
21
|
+
UI["UI<br/>Flet widgets"]
|
|
22
|
+
Migrate["Migration<br/>migrate_tkinter.py"]
|
|
23
|
+
Core["Core<br/>business logic"]
|
|
24
|
+
Theme["Theme<br/>G360Theme"]
|
|
31
25
|
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
UI --> Core
|
|
27
|
+
UI --> Theme
|
|
28
|
+
Migrate --> UI
|
|
34
29
|
```
|
|
35
30
|
|
|
36
|
-
|
|
37
|
-
| tkinter | Flet |
|
|
38
|
-
|---------|------|
|
|
39
|
-
| `tk.Button` | `ft.ElevatedButton` |
|
|
40
|
-
| `tk.Entry` | `ft.TextField` |
|
|
41
|
-
| `tk.Label` | `ft.Text` |
|
|
42
|
-
| `tk.Frame` | `ft.Container` |
|
|
43
|
-
| `ttk.Treeview` | `ft.DataTable` |
|
|
44
|
-
| `messagebox` | `ft.AlertDialog` |
|
|
31
|
+
## Identidad de Marca
|
|
45
32
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
self._setup_page()
|
|
53
|
-
|
|
54
|
-
def _setup_page(self):
|
|
55
|
-
self.page.title = self.theme.build_name()
|
|
56
|
-
self.page.theme_mode = ft.ThemeMode.DARK
|
|
57
|
-
self.page.bgcolor = self.theme.bg
|
|
58
|
-
```
|
|
33
|
+
| Elemento | Valor |
|
|
34
|
+
|---|---|
|
|
35
|
+
| Marca | G360 |
|
|
36
|
+
| Color primario | `#00d084` |
|
|
37
|
+
| Signature mode | `powered` |
|
|
38
|
+
| Signature text | "powered by G360" |
|
|
59
39
|
|
|
60
|
-
##
|
|
40
|
+
## Footer
|
|
61
41
|
|
|
62
|
-
```
|
|
63
|
-
|
|
42
|
+
```python
|
|
43
|
+
from core.components.g360_signature import g360_footer
|
|
44
|
+
page.add(g360_footer())
|
|
64
45
|
```
|
|
65
46
|
|
|
66
|
-
|
|
47
|
+
---
|
|
67
48
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
```
|
|
49
|
+
**Marca**: G360 · **Isotipo**: 3 puntos + chevron `>`
|
|
50
|
+
**Signature**: powered by G360 · **Powered by**: [g360-signature](https://github.com/carloscus/g360-signature)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Mi Proyecto G360
|
|
2
|
+
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="g360/brand/g360/logotypes/logo-g360-light.svg">
|
|
5
|
+
<img alt="G360" height="64" src="g360/brand/g360/logotypes/logo-g360-dark.svg">
|
|
6
|
+
</picture>
|
|
7
|
+
|
|
8
|
+
> Aplicacion web G360 con SolidJS
|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install
|
|
14
|
+
npm run dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Estructura del Proyecto
|
|
18
|
+
|
|
19
|
+
```mermaid
|
|
20
|
+
flowchart TD
|
|
21
|
+
Frontend["Frontend<br/>SolidJS"]
|
|
22
|
+
Assets["Assets<br/>brand · signature · favicon"]
|
|
23
|
+
Config["Config<br/>skill.json"]
|
|
24
|
+
|
|
25
|
+
Frontend --> Assets
|
|
26
|
+
Frontend --> Config
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Identidad de Marca
|
|
30
|
+
|
|
31
|
+
| Elemento | Valor |
|
|
32
|
+
|---|---|
|
|
33
|
+
| Marca | G360 |
|
|
34
|
+
| Color primario | `#00d084` |
|
|
35
|
+
| Signature mode | `powered` |
|
|
36
|
+
| Signature text | "powered by G360" |
|
|
37
|
+
|
|
38
|
+
## Footer
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<g360-signature mode="powered"></g360-signature>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
**Marca**: G360 · **Isotipo**: 3 puntos + chevron `>`
|
|
47
|
+
**Signature**: powered by G360 · **Powered by**: [g360-signature](https://github.com/carloscus/g360-signature)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Mi Proyecto G360
|
|
2
|
+
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="g360/brand/g360/logotypes/logo-g360-light.svg">
|
|
5
|
+
<img alt="G360" height="64" src="g360/brand/g360/logotypes/logo-g360-dark.svg">
|
|
6
|
+
</picture>
|
|
7
|
+
|
|
8
|
+
> Aplicacion web G360 con SvelteKit
|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install
|
|
14
|
+
npm run dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Estructura del Proyecto
|
|
18
|
+
|
|
19
|
+
```mermaid
|
|
20
|
+
flowchart TD
|
|
21
|
+
Frontend["Frontend<br/>SvelteKit"]
|
|
22
|
+
Assets["Assets<br/>brand · signature · favicon"]
|
|
23
|
+
Config["Config<br/>skill.json"]
|
|
24
|
+
|
|
25
|
+
Frontend --> Assets
|
|
26
|
+
Frontend --> Config
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Identidad de Marca
|
|
30
|
+
|
|
31
|
+
| Elemento | Valor |
|
|
32
|
+
|---|---|
|
|
33
|
+
| Marca | G360 |
|
|
34
|
+
| Color primario | `#00d084` |
|
|
35
|
+
| Signature mode | `powered` |
|
|
36
|
+
| Signature text | "powered by G360" |
|
|
37
|
+
|
|
38
|
+
## Footer
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<g360-signature mode="powered"></g360-signature>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
**Marca**: G360 · **Isotipo**: 3 puntos + chevron `>`
|
|
47
|
+
**Signature**: powered by G360 · **Powered by**: [g360-signature](https://github.com/carloscus/g360-signature)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Mi Proyecto G360
|
|
2
|
+
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="g360/brand/g360/logotypes/logo-g360-light.svg">
|
|
5
|
+
<img alt="G360" height="64" src="g360/brand/g360/logotypes/logo-g360-dark.svg">
|
|
6
|
+
</picture>
|
|
7
|
+
|
|
8
|
+
> Aplicacion web G360 con React + Vite + PWA
|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install
|
|
14
|
+
npm run dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Estructura del Proyecto
|
|
18
|
+
|
|
19
|
+
```mermaid
|
|
20
|
+
flowchart TD
|
|
21
|
+
Frontend["Frontend<br/>React + Vite"]
|
|
22
|
+
Assets["Assets<br/>brand · signature · favicon"]
|
|
23
|
+
Config["Config<br/>skill.json"]
|
|
24
|
+
|
|
25
|
+
Frontend --> Assets
|
|
26
|
+
Frontend --> Config
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Identidad de Marca
|
|
30
|
+
|
|
31
|
+
| Elemento | Valor |
|
|
32
|
+
|---|---|
|
|
33
|
+
| Marca | G360 |
|
|
34
|
+
| Color primario | `#00d084` |
|
|
35
|
+
| Signature mode | `powered` |
|
|
36
|
+
| Signature text | "powered by G360" |
|
|
37
|
+
|
|
38
|
+
## Footer
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<g360-signature mode="powered"></g360-signature>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
**Marca**: G360 · **Isotipo**: 3 puntos + chevron `>`
|
|
47
|
+
**Signature**: powered by G360 · **Powered by**: [g360-signature](https://github.com/carloscus/g360-signature)
|
package/src/cli.js
CHANGED
|
@@ -20,6 +20,8 @@ import { scan } from './commands/scan.js';
|
|
|
20
20
|
import { validate } from './commands/validate.js';
|
|
21
21
|
import { ingest } from './commands/ingest.js';
|
|
22
22
|
import { addon } from './commands/addon.js';
|
|
23
|
+
import { docs } from './commands/docs.js';
|
|
24
|
+
import { lint } from './commands/lint.js';
|
|
23
25
|
|
|
24
26
|
// Comando config (no requiere archivo separado)
|
|
25
27
|
function configAction(options) {
|
|
@@ -77,6 +79,7 @@ program
|
|
|
77
79
|
.option('--force', 'Overwrite existing files')
|
|
78
80
|
.option('--portable', 'Create portable version (for python-flet, python-cli)')
|
|
79
81
|
.option('--no-portable', 'Skip portable version creation')
|
|
82
|
+
.option('--brand', 'Apply G360 branding (logo, colors, signature) after init')
|
|
80
83
|
.action(init);
|
|
81
84
|
|
|
82
85
|
program
|
|
@@ -196,4 +199,17 @@ program
|
|
|
196
199
|
.option('--force', 'Force reinstall/remove')
|
|
197
200
|
.action(addon);
|
|
198
201
|
|
|
202
|
+
program
|
|
203
|
+
.command('docs')
|
|
204
|
+
.argument('[level]', 'Documentation level: readme, architecture, business-rules, api, dependencies, classes, code-graph, all', 'readme')
|
|
205
|
+
.option('--project <path>', 'Project path', '.')
|
|
206
|
+
.option('--dry-run', 'Preview without writing files')
|
|
207
|
+
.action(docs);
|
|
208
|
+
|
|
209
|
+
program
|
|
210
|
+
.command('lint')
|
|
211
|
+
.argument('[level]', 'Lint level: naming, duplicates, syntax, structure, all', 'all')
|
|
212
|
+
.option('--project <path>', 'Project path', '.')
|
|
213
|
+
.action(lint);
|
|
214
|
+
|
|
199
215
|
program.parse();
|
package/src/commands/clean.js
CHANGED
|
@@ -8,6 +8,7 @@ import chalk from 'chalk';
|
|
|
8
8
|
import fs from 'fs-extra';
|
|
9
9
|
import path from 'path';
|
|
10
10
|
import { fileURLToPath } from 'url';
|
|
11
|
+
import { getAllFiles } from '../lib/file-utils.js';
|
|
11
12
|
|
|
12
13
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
13
14
|
|
|
@@ -343,28 +344,6 @@ function findEmptyDirectories(dir, baseDir = dir) {
|
|
|
343
344
|
return empty;
|
|
344
345
|
}
|
|
345
346
|
|
|
346
|
-
|
|
347
|
-
const files = [];
|
|
348
|
-
const ignoreDirs = ['node_modules', '.git', 'dist', 'build', '.next', 'out', '.nuxt', 'coverage', '.cache', '.svelte-kit'];
|
|
349
|
-
|
|
350
|
-
if (!fs.existsSync(dir)) return files;
|
|
351
|
-
|
|
352
|
-
const items = fs.readdirSync(dir, { withFileTypes: true });
|
|
353
|
-
|
|
354
|
-
for (const item of items) {
|
|
355
|
-
if (ignoreDirs.includes(item.name)) continue;
|
|
356
|
-
|
|
357
|
-
const fullPath = path.join(dir, item.name);
|
|
358
|
-
const relativePath = path.relative(baseDir, fullPath).replace(/\\/g, '/');
|
|
359
|
-
|
|
360
|
-
if (item.isDirectory()) {
|
|
361
|
-
files.push(...await getAllFiles(fullPath, baseDir));
|
|
362
|
-
} else {
|
|
363
|
-
files.push(relativePath);
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
return files;
|
|
368
|
-
}
|
|
347
|
+
|
|
369
348
|
|
|
370
349
|
export default { clean };
|
package/src/commands/convert.js
CHANGED
|
@@ -8,6 +8,7 @@ import chalk from 'chalk';
|
|
|
8
8
|
import fs from 'fs-extra';
|
|
9
9
|
import path from 'path';
|
|
10
10
|
import { fileURLToPath } from 'url';
|
|
11
|
+
import { getAllFiles } from '../lib/file-utils.js';
|
|
11
12
|
|
|
12
13
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
13
14
|
|
|
@@ -362,27 +363,4 @@ async function createBackupFolder(projectPath) {
|
|
|
362
363
|
console.log(chalk.gray(` Backup en: ${backupDir}`));
|
|
363
364
|
}
|
|
364
365
|
|
|
365
|
-
async function getAllFiles(dir, baseDir = dir) {
|
|
366
|
-
const files = [];
|
|
367
|
-
|
|
368
|
-
if (!fs.existsSync(dir)) return files;
|
|
369
|
-
|
|
370
|
-
const items = fs.readdirSync(dir, { withFileTypes: true });
|
|
371
|
-
|
|
372
|
-
for (const item of items) {
|
|
373
|
-
const fullPath = path.join(dir, item.name);
|
|
374
|
-
const relativePath = path.relative(baseDir, fullPath);
|
|
375
|
-
|
|
376
|
-
if (item.name === 'node_modules' || item.name === '.git') continue;
|
|
377
|
-
|
|
378
|
-
if (item.isDirectory()) {
|
|
379
|
-
files.push(...await getAllFiles(fullPath, baseDir));
|
|
380
|
-
} else {
|
|
381
|
-
files.push(relativePath);
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
return files;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
366
|
export default { convert };
|