buntic 0.3.0 → 0.4.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.
Files changed (34) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +39 -39
  3. package/dist/cli.js +1362 -189
  4. package/dist/config.d.ts +5 -5
  5. package/dist/index.d.ts +6 -5
  6. package/dist/index.js +1389 -201
  7. package/dist/router/routes.d.ts +1 -1
  8. package/dist/runtime.d.ts +8 -9
  9. package/dist/server/dev-helpers.d.ts +1 -1
  10. package/dist/storage/oras/adapter.d.ts +2 -2
  11. package/dist/template/block-scanner.d.ts +28 -0
  12. package/dist/template/directives.d.ts +17 -8
  13. package/dist/template/engine.d.ts +2 -1
  14. package/dist/template/errors.d.ts +58 -0
  15. package/dist/template/expressions.d.ts +16 -0
  16. package/dist/template/scoped-css.d.ts +1 -1
  17. package/dist/types.d.ts +1 -1
  18. package/dist/utils/html.d.ts +1 -1
  19. package/dist/utils/logger.d.ts +1 -1
  20. package/package.json +7 -7
  21. package/templates/blank/_gitignore +2 -2
  22. package/templates/blank/{bustatic.config.ts → buntic.config.ts} +2 -2
  23. package/templates/blank/src/pages/index.html +2 -2
  24. package/templates/blank/tsconfig.json +4 -9
  25. package/templates/simple/README.md +6 -6
  26. package/templates/simple/_gitignore +2 -2
  27. package/templates/simple/{bustatic.config.ts → buntic.config.ts} +2 -2
  28. package/templates/simple/src/components/footer.html +1 -1
  29. package/templates/simple/src/data/site.json +3 -3
  30. package/templates/simple/src/pages/about.html +1 -1
  31. package/templates/simple/src/pages/contact.html +1 -1
  32. package/templates/simple/tsconfig.json +4 -9
  33. package/templates/skills/{bustatic → buntic}/SKILL.md +83 -43
  34. package/templates/skills/{bustatic → buntic}/examples/README.md +4 -4
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Bustatic Authors
3
+ Copyright (c) 2026 Buntic Authors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # ⚡ Bustatic
1
+ # ⚡ Buntic
2
2
 
3
3
  > **Zero-dependency, blazing-fast static site generator native to Bun.**
4
4
 
5
- Inspirado en la simplicidad de la web y el rendimiento de Bun, **Bustatic** te permite construir sitios web modernos utilizando exclusivamente **HTML estándar, CSS, JavaScript/TypeScript, Web Components, SQL y almacenamiento en la nube**.
5
+ Inspirado en la simplicidad de la web y el rendimiento de Bun, **Buntic** te permite construir sitios web modernos utilizando exclusivamente **HTML estándar, CSS, JavaScript/TypeScript, Web Components, SQL y almacenamiento en la nube**.
6
6
 
7
7
  Sin extensiones de archivo propietarias, sin `node_modules` de cientos de megabytes, sin `package.json` obligatorio en tus sitios y con **cero dependencias externas**.
8
8
 
@@ -11,13 +11,13 @@ Sin extensiones de archivo propietarias, sin `node_modules` de cientos de megaby
11
11
  ## ✨ Características Principales
12
12
 
13
13
  - ⚡ **100% Nativo de Bun (`>=1.4.0`):** Aprovecha al máximo `Bun.build`, `Bun.serve`, `Bun.Image`, `Bun.S3Client`, `bun:sqlite`, `Bun.sql`, y `Bun.redis`.
14
- - 📦 **Cero Dependencias Externas y Sin `package.json`:** Instala Bustatic una sola vez de forma global y crea proyectos limpios con solo HTML, CSS, TypeScript y `tsconfig.json`.
14
+ - 📦 **Cero Dependencias Externas y Sin `package.json`:** Instala Buntic una sola vez de forma global y crea proyectos limpios con solo HTML, CSS, TypeScript y `tsconfig.json`.
15
15
  - 🖼️ **Pipeline de Imágenes Nativo (`<photo>`):** Compresión automática a WebP a velocidad C++, cálculo de dimensiones anti-CLS y generación responsiva de `srcset` y `sizes`.
16
- - 🗄️ **Storage Loaders Remotos (`storage/`):** Integración nativa con **Amazon S3 / R2 / MinIO** y servidores **OCI Registry / Docker Registry** vía `OrasClient` y `createOrasStorage` con versionado por tags y caché inmutable persistente por ETag/Digest en `.bustatic/cache/images`.
16
+ - 🗄️ **Storage Loaders Remotos (`storage/`):** Integración nativa con **Amazon S3 / R2 / MinIO** y servidores **OCI Registry / Docker Registry** vía `OrasClient` y `createOrasStorage` con versionado por tags y caché inmutable persistente por ETag/Digest en `.buntic/cache/images`.
17
17
  - 🔍 **Suite SEO Out-of-the-Box:** Componente `<seo>`, generación dinámica de `sitemap.xml`, `robots.txt` configurable y feeds RSS 2.0 y Atom 1.0.
18
18
  - 📱 **Tarjetas Sociales Automáticas:** Generación de tarjetas OpenGraph y Twitter Cards a tamaño estándar 1200x630 WebP a partir de imágenes locales o remotas en S3/OCI.
19
19
  - 🚀 **Enrutamiento Dinámico, SQL y Redis:** Parámetros en rutas (`pages/[slug].html`), loaders `.data.ts`, integración directa con SQLite, PostgreSQL y Redis, y paginación declarativa.
20
- - 📑 **Plantillas Estándar:** Usa `<layout>`, `<slot>`, `<each>` y `<if>` directamente en HTML estándar.
20
+ - 📑 **Plantillas Declarativas y Control de Flujo:** Usa `<layout>`, `<slot>`, `<each>`, `<if>`, `<unless>` y `<match>`/`<case>` directamente en HTML estándar, con expresiones seguras sin `eval`, atributos tipados/rango (`string`, `number`, `boolean`, `min`, `max`), fallbacks uniformes (`<else>`, `<none>`, `<default>`) y reportes de error con archivo, línea exacta, *code frame* y sugerencias.
21
21
  - 🧩 **Componentes SVG Nativos:** Inclusión inline con `<component src="...svg" />`, passthrough de atributos (`class`, `width`, `aria-*`), `<style scoped>`, CSS hermano co-ubicado (`.svg` + `.css`) y compatibilidad con DSD.
22
22
  - 🎨 **Estilos Scoped Nativos:** Escribe `<style scoped>` dentro de cualquier elemento con sintaxis `&` o `:host`, deduplicación automática y cero FOUC.
23
23
  - 🔄 **Live-Reload Integrado:** Servidor de desarrollo con WebSockets nativos y recarga en caliente automática.
@@ -30,43 +30,43 @@ Requiere [Bun](https://bun.sh) `>=1.4.0`.
30
30
 
31
31
  ### 1. Instalación Global (Recomendada — sin `package.json`)
32
32
  ```bash
33
- bun add -g bun-bustatic
33
+ bun add -g buntic
34
34
  ```
35
35
 
36
36
  Crea un proyecto nuevo desde cualquier directorio:
37
37
  ```bash
38
38
  # Plantilla en blanco por defecto (blank)
39
- bustatic init mi-sitio
39
+ buntic init mi-sitio
40
40
 
41
41
  # O usando la plantilla multipágina (simple)
42
- bustatic init mi-sitio --template simple
42
+ buntic init mi-sitio --template simple
43
43
 
44
44
  cd mi-sitio
45
- bustatic dev
45
+ buntic dev
46
46
  ```
47
47
 
48
- `bustatic init` genera un proyecto limpio **sin `package.json` ni `node_modules`**, incluyendo:
49
- - `tsconfig.json` y definiciones de tipos locales en `.bustatic/types/` (autocompletado completo para `import { defineConfig } from "bun-bustatic"` sin instalar dependencias en el proyecto).
50
- - La skill de Bustatic para agentes de IA en `.agents/skills/bustatic/` (omitible con `--no-skills`).
48
+ `buntic init` genera un proyecto limpio **sin `package.json` ni `node_modules`**, incluyendo:
49
+ - `tsconfig.json` y definiciones de tipos locales en `.buntic/types/` (autocompletado completo para `import { defineConfig } from "buntic"` sin instalar dependencias en el proyecto).
50
+ - La skill de Buntic para agentes de IA en `.agents/skills/buntic/` (omitible con `--no-skills`).
51
51
 
52
52
  ### 2. Ejecución directa con `bunx`
53
53
  ```bash
54
- bunx --package bun-bustatic bustatic init mi-sitio
55
- bunx --package bun-bustatic bustatic dev mi-sitio
54
+ bunx buntic init mi-sitio
55
+ bunx buntic dev mi-sitio
56
56
  ```
57
57
 
58
58
  ### 3. Uso local opcional en un proyecto con `package.json`
59
- Si prefieres fijar la versión de Bustatic por proyecto:
59
+ Si prefieres fijar la versión de Buntic por proyecto:
60
60
  ```bash
61
- bun add -d bun-bustatic
61
+ bun add -d buntic
62
62
  ```
63
63
 
64
64
  ```json
65
65
  {
66
66
  "scripts": {
67
- "dev": "bustatic dev",
68
- "build": "bustatic build",
69
- "clean": "bustatic clean"
67
+ "dev": "buntic dev",
68
+ "build": "buntic build",
69
+ "clean": "buntic clean"
70
70
  }
71
71
  }
72
72
  ```
@@ -75,7 +75,7 @@ bun add -d bun-bustatic
75
75
 
76
76
  ## 📁 Estructura del Proyecto
77
77
 
78
- Bustatic auto-detecta tanto la estructura estándar recomendada con `src/` como la estructura plana en la raíz:
78
+ Buntic auto-detecta tanto la estructura estándar recomendada con `src/` como la estructura plana en la raíz:
79
79
 
80
80
  ```text
81
81
  mi-sitio/
@@ -87,10 +87,10 @@ mi-sitio/
87
87
  │ ├── storage/ # Loaders de objetos remotos (S3, Cloudflare R2, MinIO, OCI)
88
88
  │ ├── styles/ # Hojas de estilo globales (main.css)
89
89
  │ └── public/ # Archivos estáticos copiados directamente a dist/
90
- ├── .agents/skills/ # Skill de Bustatic instalada por `bustatic init`
90
+ ├── .agents/skills/ # Skill de Buntic instalada por `buntic init`
91
91
  ├── dist/ # Carpeta de salida compilada
92
- ├── bustatic.config.ts # Configuración de URLs, SEO, feeds y almacenamiento
93
- └── tsconfig.json # Configuración TypeScript (tipos en .bustatic/types/)
92
+ ├── buntic.config.ts # Configuración de URLs, SEO, feeds y almacenamiento
93
+ └── tsconfig.json # Configuración TypeScript (tipos en .buntic/types/)
94
94
  ```
95
95
 
96
96
  ---
@@ -98,27 +98,27 @@ mi-sitio/
98
98
  ## 📚 Documentación Técnica
99
99
 
100
100
  ### 🚀 Primeros Pasos
101
- - [Guía de Inicio Rápido](https://github.com/jloons/bustatic/blob/main/docs/getting-started.md)
102
- - [Referencia del CLI](https://github.com/jloons/bustatic/blob/main/docs/cli.md)
103
- - [Roadmap del Proyecto](https://github.com/jloons/bustatic/blob/main/ROADMAP.md)
104
- - [Ejemplo Simple (Plantillas y Web Components)](https://github.com/jloons/bustatic/blob/main/examples/simple/README.md)
105
- - [Ejemplo Catalog (OCI Registry, S3, Postgres, Redis y Podman)](https://github.com/jloons/bustatic/blob/main/examples/catalog/README.md)
101
+ - [Guía de Inicio Rápido](https://github.com/jloons/buntic/blob/main/docs/getting-started.md)
102
+ - [Referencia del CLI](https://github.com/jloons/buntic/blob/main/docs/cli.md)
103
+ - [Roadmap del Proyecto](https://github.com/jloons/buntic/blob/main/ROADMAP.md)
104
+ - [Ejemplo Simple (Plantillas y Web Components)](https://github.com/jloons/buntic/blob/main/examples/simple/README.md)
105
+ - [Ejemplo Catalog (OCI Registry, S3, Postgres, Redis y Podman)](https://github.com/jloons/buntic/blob/main/examples/catalog/README.md)
106
106
 
107
107
  ### 🎨 Fundación y Plantillas (Fase 0)
108
- - [Guía de Plantillas y Componentes](https://github.com/jloons/bustatic/blob/main/docs/templating.md)
109
- - [Estilos Scoped y Grafo de Dependencias CSS](https://github.com/jloons/bustatic/blob/main/docs/scoped-css.md)
110
- - [Web Components Nativos y Declarative Shadow DOM](https://github.com/jloons/bustatic/blob/main/docs/web-components.md)
108
+ - [Guía de Plantillas y Componentes](https://github.com/jloons/buntic/blob/main/docs/templating.md)
109
+ - [Estilos Scoped y Grafo de Dependencias CSS](https://github.com/jloons/buntic/blob/main/docs/scoped-css.md)
110
+ - [Web Components Nativos y Declarative Shadow DOM](https://github.com/jloons/buntic/blob/main/docs/web-components.md)
111
111
 
112
112
  ### 📊 Enrutamiento y Datos (Fase 1)
113
- - [Enrutamiento Basado en Archivos y Páginas Dinámicas](https://github.com/jloons/bustatic/blob/main/docs/routing-and-pages.md)
114
- - [Datos, Loaders y Variables de Entorno](https://github.com/jloons/bustatic/blob/main/docs/data-and-loaders.md)
115
- - [Motores SQL Nativos (`bun:sqlite` y `Bun.sql`)](https://github.com/jloons/bustatic/blob/main/docs/databases-sql.md)
116
- - [Sistema de Paginación Automática](https://github.com/jloons/bustatic/blob/main/docs/pagination.md)
113
+ - [Enrutamiento Basado en Archivos y Páginas Dinámicas](https://github.com/jloons/buntic/blob/main/docs/routing-and-pages.md)
114
+ - [Datos, Loaders y Variables de Entorno](https://github.com/jloons/buntic/blob/main/docs/data-and-loaders.md)
115
+ - [Motores SQL Nativos (`bun:sqlite` y `Bun.sql`)](https://github.com/jloons/buntic/blob/main/docs/databases-sql.md)
116
+ - [Sistema de Paginación Automática](https://github.com/jloons/buntic/blob/main/docs/pagination.md)
117
117
 
118
118
  ### 🖼️ Assets, Cloud y SEO (Fase 2)
119
- - [Optimización de Imágenes con `<photo>`](https://github.com/jloons/bustatic/blob/main/docs/assets-and-images.md)
120
- - [Storage Loaders Remotos (S3, R2, MinIO y OCI)](https://github.com/jloons/bustatic/blob/main/docs/storage-loaders.md)
121
- - [Suite SEO, Metadatos Sociales y Feeds](https://github.com/jloons/bustatic/blob/main/docs/seo.md)
119
+ - [Optimización de Imágenes con `<photo>`](https://github.com/jloons/buntic/blob/main/docs/assets-and-images.md)
120
+ - [Storage Loaders Remotos (S3, R2, MinIO y OCI)](https://github.com/jloons/buntic/blob/main/docs/storage-loaders.md)
121
+ - [Suite SEO, Metadatos Sociales y Feeds](https://github.com/jloons/buntic/blob/main/docs/seo.md)
122
122
 
123
123
  ---
124
124
 
@@ -133,4 +133,4 @@ bun test
133
133
 
134
134
  ## 📄 Licencia
135
135
 
136
- [MIT](https://github.com/jloons/bustatic/blob/main/LICENSE)
136
+ [MIT](https://github.com/jloons/buntic/blob/main/LICENSE)