g360-cli 1.12.0 → 1.13.0

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.
@@ -1,70 +1,50 @@
1
- # G360 Python Flet Migration App
1
+ # Mi Proyecto G360 Migracion
2
2
 
3
- Template para migrar aplicaciones de **tkinter/CustomTkinter a Flet** con el ecosistema G360.
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
- ## Estructura del Proyecto
8
+ > Migracion de tkinter/CustomTkinter a Flet con el ecosistema G360
6
9
 
7
- ```
8
- mi-proyecto/
9
- ├── src/
10
- │ ├── main.py # Entry point: ft.run(main)
11
- │ ├── migrate_tkinter.py # Asistente de migracion
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
- ## Migracion de tkinter/CustomTkinter
17
+ ## Estructura del Proyecto
25
18
 
26
- ### Paso 1: Reemplazar imports
27
- ```python
28
- # Antes (tkinter)
29
- import tkinter as tk
30
- from tkinter import ttk, messagebox
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
- # Despues (Flet)
33
- import flet as ft
26
+ UI --> Core
27
+ UI --> Theme
28
+ Migrate --> UI
34
29
  ```
35
30
 
36
- ### Paso 2: Convertir widgets
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
- ### Paso 3: Aplicar tema G360
47
- ```python
48
- class MigratedApp:
49
- def __init__(self, page: ft.Page):
50
- self.theme = G360Theme()
51
- self.page = page
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
- ## Ejecucion
40
+ ## Footer
61
41
 
62
- ```bash
63
- run.bat
42
+ ```python
43
+ from core.components.g360_signature import g360_footer
44
+ page.add(g360_footer())
64
45
  ```
65
46
 
66
- ## Build Windows
47
+ ---
67
48
 
68
- ```bash
69
- build.bat
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();
@@ -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
- async function getAllFiles(dir, baseDir = dir) {
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 };
@@ -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 };