@locale-labs/miniapp-builder 0.1.8-dev.6.cd1d325 → 0.1.8-dev.7.e60ab83
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 +6 -29
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
CLI que empaqueta una mini-app de Localé en un único `index.html` self-contained, listo para deployar al Kernel.
|
|
4
4
|
|
|
5
|
+
> **Agente / contexto técnico:** [`NOTES/LEARNINGS.md`](./NOTES/LEARNINGS.md) — pipeline detallado, SDK resolution, version format, gotchas, release flow.
|
|
6
|
+
|
|
5
7
|
## Instalar
|
|
6
8
|
|
|
7
9
|
```bash
|
|
@@ -20,35 +22,10 @@ Agregar al `package.json`:
|
|
|
20
22
|
}
|
|
21
23
|
```
|
|
22
24
|
|
|
23
|
-
## Cómo funciona
|
|
24
|
-
|
|
25
|
-
El builder es el último paso del pipeline. Asume que tu build previo (esbuild, tailwind, etc.) ya dejó archivos en `.temp/`:
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
.temp/
|
|
29
|
-
index.html # estructura HTML base
|
|
30
|
-
output.css # CSS compilado (Tailwind)
|
|
31
|
-
alpine.js # bundle de tu app
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
El comando `build` resuelve el SDK (`@locale-labs/miniapp-sdk` desde `node_modules` o `LOCALE_SDK_PATH`), inlinea CSS + SDK + tu bundle dentro del HTML, y genera:
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
build/index.html # artefacto único listo para subir
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
`deploy` toma ese HTML, lo sube a Supabase Storage del miniapp (`miniapp-builds/builds/<version>/index.html`) y registra la versión en el Core via la edge function `register_miniapp_version`. La versión se compone como `<package.json version>+<MINIAPP_GIT_SHA>` (build metadata semver).
|
|
41
|
-
|
|
42
|
-
## Resolución del SDK
|
|
43
|
-
|
|
44
|
-
El builder busca el SDK en este orden:
|
|
45
|
-
|
|
46
|
-
1. `LOCALE_SDK_PATH` env var (útil para dev local).
|
|
47
|
-
2. `node_modules/@locale-labs/miniapp-sdk`.
|
|
48
|
-
3. Fallbacks locales.
|
|
25
|
+
## Cómo funciona (alto nivel)
|
|
49
26
|
|
|
50
|
-
|
|
27
|
+
Es el último paso del pipeline. Asume que tu build previo (esbuild + tailwind) dejó `.temp/index.html`, CSS y JS compilados. El builder inlinea el SDK + CSS + bundle dentro del HTML y genera `build/index.html` (artefacto único listo para subir).
|
|
51
28
|
|
|
52
|
-
|
|
29
|
+
`deploy` sube ese HTML al Supabase Storage del miniapp y registra la versión en el Core.
|
|
53
30
|
|
|
54
|
-
|
|
31
|
+
Detalle del pipeline, SDK resolution y version format: [`NOTES/LEARNINGS.md`](./NOTES/LEARNINGS.md).
|