@forgenex/cli 0.4.0 → 0.5.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.
- package/GUIA-IA.md +194 -13
- package/README.md +30 -4
- package/REFERENCIA.md +225 -0
- package/dist/forgenex.js +29 -24
- package/dist/locales/ca.js +1 -1
- package/dist/locales/en.js +1 -1
- package/dist/locales/es.js +1 -1
- package/ejemplos/escuela-natacion/README.md +26 -0
- package/ejemplos/escuela-natacion/extension.json +83 -0
- package/ejemplos/escuela-natacion/funciones/opciones.js +3 -0
- package/ejemplos/escuela-natacion/interfaz/agenda.html +5 -0
- package/ejemplos/escuela-natacion/interfaz/alta.html +2 -0
- package/ejemplos/escuela-natacion/interfaz/alta.js +31 -0
- package/ejemplos/escuela-natacion/interfaz/horario.js +64 -0
- package/ejemplos/escuela-natacion/interfaz/inscripcion.html +4 -0
- package/ejemplos/escuela-natacion/interfaz/inscripcion.js +29 -0
- package/ejemplos/escuela-natacion/interfaz/panel.html +7 -0
- package/ejemplos/escuela-natacion/interfaz/panel.js +103 -0
- package/ejemplos/escuela-natacion/interfaz/piscina.html +5 -0
- package/ejemplos/escuela-natacion/solucion.json +399 -0
- package/ejemplos/kit-visual/extension.json +13 -0
- package/ejemplos/kit-visual/interfaz/galeria.js +71 -0
- package/ejemplos/kit-visual/interfaz/index.html +9 -0
- package/extension.schema.json +215 -8
- package/kit/pantalla.mjs +980 -0
- package/licencias.txt +1 -1
- package/package.json +2 -1
- package/puente-extension.d.ts +3 -2
- package/puente-extension.mjs +4 -0
- package/solucion.schema.json +145 -0
package/licencias.txt
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forgenex/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "CLI para crear, probar, empaquetar e instalar apps del CRM ForgeNEX.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"files": [
|
|
14
|
+
"kit",
|
|
14
15
|
"dist",
|
|
15
16
|
"ejemplos",
|
|
16
17
|
"licencias",
|
package/puente-extension.d.ts
CHANGED
|
@@ -41,17 +41,18 @@ export interface ArchivosCRM {
|
|
|
41
41
|
/**
|
|
42
42
|
* Dónde está colgada la caja (`contexto.actual`). `punto` es el montaje; en la
|
|
43
43
|
* ficha, `modulo` e `id`; en «accion_tabla», `modulo` e `ids` (la selección, hasta
|
|
44
|
-
* 500); en «vista»,
|
|
44
|
+
* 500); en «vista», filtros, orden y selección; en «ajustes» y «publica», solo `punto`. En
|
|
45
45
|
* «pagina» e «inicio_bloque», null.
|
|
46
46
|
*/
|
|
47
47
|
export type ContextoCaja =
|
|
48
48
|
| { punto: "ficha_pestana" | "ficha_bloque" | "accion_ficha"; modulo: string; id: number }
|
|
49
49
|
| { punto: "accion_tabla"; modulo: string; ids: number[] }
|
|
50
|
-
| { punto: "vista"; modulo: string }
|
|
50
|
+
| { punto: "vista"; modulo: string; filtros: Record<string, unknown>; orden: { campo: string; direccion: string } | null; ids: number[] }
|
|
51
51
|
| { punto: "ajustes" }
|
|
52
52
|
| { punto: "publica" };
|
|
53
53
|
|
|
54
54
|
export interface ClienteCRM {
|
|
55
|
+
conexion(clave: string, valores?: Record<string, unknown>): Promise<{ data: { estado: number; cuerpo: string } }>;
|
|
55
56
|
contexto(): Promise<ContextoCaja | null>;
|
|
56
57
|
pedir<T = unknown>(op: string, parametros?: Record<string, unknown>, opciones?: OpcionesPeticion): Promise<T>;
|
|
57
58
|
/** Solo en la página pública: llama a una de las `funciones` del montaje «publica». */
|
package/puente-extension.mjs
CHANGED
|
@@ -4,6 +4,10 @@ export function crearClienteCRM(ventana = window, espera = 15000) {
|
|
|
4
4
|
let cerrado = false;
|
|
5
5
|
const pendientes = new Map();
|
|
6
6
|
const cliente = {
|
|
7
|
+
conexion(clave, valores = {}) {
|
|
8
|
+
return this.pedir("app.conexion_llamar", { clave, valores },
|
|
9
|
+
{ metodo: "POST", idempotencia: `conexion-${Date.now().toString(36)}-${siguiente}` });
|
|
10
|
+
},
|
|
7
11
|
contexto() { return this.pedir("contexto.actual"); },
|
|
8
12
|
// 1.14.0: en la página pública (montaje «publica»), una de sus funciones «publica».
|
|
9
13
|
publica(funcion, entrada = null) {
|
package/solucion.schema.json
CHANGED
|
@@ -62,6 +62,150 @@
|
|
|
62
62
|
"type": "string",
|
|
63
63
|
"pattern": "^[a-z0-9-]{1,40}$"
|
|
64
64
|
},
|
|
65
|
+
"conexiones": {
|
|
66
|
+
"type": "array",
|
|
67
|
+
"maxItems": 25,
|
|
68
|
+
"items": {
|
|
69
|
+
"oneOf": [
|
|
70
|
+
{
|
|
71
|
+
"type": "object",
|
|
72
|
+
"additionalProperties": false,
|
|
73
|
+
"required": [
|
|
74
|
+
"tipo",
|
|
75
|
+
"conector"
|
|
76
|
+
],
|
|
77
|
+
"properties": {
|
|
78
|
+
"clave": {
|
|
79
|
+
"type": "string"
|
|
80
|
+
},
|
|
81
|
+
"nombre": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"maxLength": 80
|
|
84
|
+
},
|
|
85
|
+
"tipo": {
|
|
86
|
+
"const": "conector"
|
|
87
|
+
},
|
|
88
|
+
"conector": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"pattern": "^[a-z][a-z0-9_-]{0,39}$"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"type": "object",
|
|
96
|
+
"additionalProperties": false,
|
|
97
|
+
"required": [
|
|
98
|
+
"clave",
|
|
99
|
+
"nombre",
|
|
100
|
+
"tipo"
|
|
101
|
+
],
|
|
102
|
+
"properties": {
|
|
103
|
+
"clave": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"pattern": "^[a-z][a-z0-9_]{0,39}$"
|
|
106
|
+
},
|
|
107
|
+
"nombre": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"minLength": 1,
|
|
110
|
+
"maxLength": 120
|
|
111
|
+
},
|
|
112
|
+
"tipo": {
|
|
113
|
+
"enum": [
|
|
114
|
+
"api",
|
|
115
|
+
"mcp"
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"fuentesExternas": {
|
|
124
|
+
"type": "array",
|
|
125
|
+
"maxItems": 30,
|
|
126
|
+
"items": {
|
|
127
|
+
"type": "object",
|
|
128
|
+
"additionalProperties": false,
|
|
129
|
+
"required": [
|
|
130
|
+
"modulo",
|
|
131
|
+
"conexion",
|
|
132
|
+
"operacion",
|
|
133
|
+
"filas",
|
|
134
|
+
"mapeo",
|
|
135
|
+
"modo"
|
|
136
|
+
],
|
|
137
|
+
"properties": {
|
|
138
|
+
"modulo": {
|
|
139
|
+
"type": "string"
|
|
140
|
+
},
|
|
141
|
+
"conexion": {
|
|
142
|
+
"type": "string"
|
|
143
|
+
},
|
|
144
|
+
"operacion": {
|
|
145
|
+
"type": "string"
|
|
146
|
+
},
|
|
147
|
+
"filas": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"maxLength": 160
|
|
150
|
+
},
|
|
151
|
+
"mapeo": {
|
|
152
|
+
"type": "object",
|
|
153
|
+
"minProperties": 1,
|
|
154
|
+
"additionalProperties": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"maxLength": 160
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"modo": {
|
|
160
|
+
"enum": [
|
|
161
|
+
"vivo",
|
|
162
|
+
"espejo"
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
"minutos": {
|
|
166
|
+
"type": "integer",
|
|
167
|
+
"minimum": 5,
|
|
168
|
+
"maximum": 10080
|
|
169
|
+
},
|
|
170
|
+
"id_externo": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"maxLength": 160
|
|
173
|
+
},
|
|
174
|
+
"cursor": {
|
|
175
|
+
"type": "object",
|
|
176
|
+
"additionalProperties": false,
|
|
177
|
+
"required": [
|
|
178
|
+
"ruta",
|
|
179
|
+
"parametro"
|
|
180
|
+
],
|
|
181
|
+
"properties": {
|
|
182
|
+
"ruta": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"maxLength": 160
|
|
185
|
+
},
|
|
186
|
+
"parametro": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"maxLength": 80
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"if": {
|
|
194
|
+
"properties": {
|
|
195
|
+
"modo": {
|
|
196
|
+
"const": "espejo"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"then": {
|
|
201
|
+
"required": [
|
|
202
|
+
"minutos",
|
|
203
|
+
"id_externo",
|
|
204
|
+
"cursor"
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
65
209
|
"modulos": {
|
|
66
210
|
"type": "array",
|
|
67
211
|
"minItems": 1,
|
|
@@ -213,6 +357,7 @@
|
|
|
213
357
|
"firma",
|
|
214
358
|
"hora",
|
|
215
359
|
"articulo",
|
|
360
|
+
"dispositivo",
|
|
216
361
|
"creado_el",
|
|
217
362
|
"creado_por",
|
|
218
363
|
"modificado_el",
|