griddo-sdk 2.0.12 → 2.0.14
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/CHANGELOG.md +149 -0
- package/CLAUDE.md +153 -0
- package/DEVELOPER_GUIDE.md +85 -0
- package/dist/config/Environment.d.ts.map +1 -1
- package/dist/config/version.d.ts +1 -1
- package/dist/exception/SiteException.d.ts +63 -0
- package/dist/exception/SiteException.d.ts.map +1 -0
- package/dist/facades/ImageFacade.d.ts +3 -3
- package/dist/facades/PageFacade.d.ts +49 -3
- package/dist/facades/PageFacade.d.ts.map +1 -1
- package/dist/facades/SiteFacade.d.ts +62 -0
- package/dist/facades/SiteFacade.d.ts.map +1 -0
- package/dist/factories/ServiceFactory.d.ts +13 -0
- package/dist/factories/ServiceFactory.d.ts.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +62 -40
- package/dist/interfaces/ImageManager.d.ts +5 -6
- package/dist/interfaces/ImageManager.d.ts.map +1 -1
- package/dist/interfaces/SiteManager.d.ts +12 -0
- package/dist/interfaces/SiteManager.d.ts.map +1 -0
- package/dist/sdk.d.ts +209 -4
- package/dist/sdk.d.ts.map +1 -1
- package/dist/services/SiteService.d.ts +63 -0
- package/dist/services/SiteService.d.ts.map +1 -0
- package/dist/services/index.d.ts +13 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/logging/LoggerFactory.d.ts +19 -0
- package/dist/services/logging/LoggerFactory.d.ts.map +1 -0
- package/dist/services/logging/PinoLogger.d.ts +20 -0
- package/dist/services/logging/PinoLogger.d.ts.map +1 -0
- package/dist/services/logging/StdoutLogger.d.ts +3 -0
- package/dist/services/logging/StdoutLogger.d.ts.map +1 -1
- package/dist/services/logging/index.d.ts +5 -0
- package/dist/services/logging/index.d.ts.map +1 -0
- package/docs-sdk/docusaurus.config.ts +160 -0
- package/docs-sdk/package.json +51 -0
- package/docs-sdk/sidebars-api.ts +85 -0
- package/docs-sdk/sidebars.ts +59 -0
- package/docs-sdk/static/.nojekyll +0 -0
- package/docs-sdk/static/img/docusaurus-social-card.jpg +0 -0
- package/docs-sdk/static/img/docusaurus.png +0 -0
- package/docs-sdk/static/img/favicon.ico +0 -0
- package/docs-sdk/static/img/logo.svg +1 -0
- package/docs-sdk/static/img/undraw_docusaurus_mountain.svg +171 -0
- package/docs-sdk/static/img/undraw_docusaurus_react.svg +170 -0
- package/docs-sdk/static/img/undraw_docusaurus_tree.svg +40 -0
- package/package.json +83 -80
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
#### Logging System
|
|
13
|
+
- **Sistema de logging flexible basado en el patrón Adapter** para permitir múltiples implementaciones de logger
|
|
14
|
+
- **PinoLogger**: Nueva implementación por defecto usando Pino (logger JSON de alto rendimiento, ~5x más rápido que console)
|
|
15
|
+
- **LoggerFactory**: Factory para crear instancias de Logger según configuración
|
|
16
|
+
- **Tipos LoggerConfig y LoggerType**: Configuración avanzada del sistema de logging
|
|
17
|
+
- **Inyección de loggers personalizados**: Posibilidad de inyectar cualquier logger que cumpla la interfaz `Logger`
|
|
18
|
+
- **Tipos exportados**: `Logger`, `LoggerConfig`, `LoggerType` disponibles para consumidores del SDK
|
|
19
|
+
- Niveles de soporte: `info`, `error`, `debug` con opción `verbose` para activar logs detallados
|
|
20
|
+
- Pretty print automático en desarrollo usando `pino-pretty`
|
|
21
|
+
- **Test Coverage**: 100% coverage para PinoLogger y LoggerFactory (19 tests nuevos)
|
|
22
|
+
- **Test Coverage**: 144 tests pasan exitosamente (sin breaking changes)
|
|
23
|
+
|
|
24
|
+
#### Site Management
|
|
25
|
+
- **`getSocials` method** in `SiteService` and `SiteFacade` for retrieving social network URLs
|
|
26
|
+
- New TypeScript types added to `src/sdk.ts`:
|
|
27
|
+
- `SocialName` type: Union type for supported social networks (instagram, linkedIn, facebook, twitter, youTube, flickr, tiktok, snapchat, newsletter)
|
|
28
|
+
- `SocialsResponse` type: Record mapping each social network name to its corresponding URL
|
|
29
|
+
- API endpoint: `GET /site/{id}/socials`
|
|
30
|
+
- Implemented in `SiteService.getSocials(id: string | number)`
|
|
31
|
+
- Facade available via `SiteFacade.getSocials(id: string | number)`
|
|
32
|
+
- Spanish log messages for success and error cases
|
|
33
|
+
- **Test Coverage:** 100% coverage for both SiteService and SiteFacade
|
|
34
|
+
- **Example:** `examples/site/get_socials.ts` demonstrates usage
|
|
35
|
+
- **Types exported:** `SocialName` and `SocialsResponse` available for consumer use
|
|
36
|
+
|
|
37
|
+
- **`getSitemap` method** in `SiteService` and `SiteFacade` for retrieving sitemaps
|
|
38
|
+
- New TypeScript types added to `src/sdk.ts`:
|
|
39
|
+
- `SitemapUrl` interface: Contains `path`, `domain`, and `home` properties
|
|
40
|
+
- `SitemapItem` interface: Contains `loc`, `lastmod`, and `priority` properties
|
|
41
|
+
- `SitemapItems` type: Record mapping URLs to sitemap items
|
|
42
|
+
- `SitemapResponse` interface: Complete sitemap response structure with URLs and items
|
|
43
|
+
- API endpoint: `GET /site/{id}/sitemap`
|
|
44
|
+
- Implemented in `SiteService.getSitemap(id: string | number)`
|
|
45
|
+
- Facade available via `SiteFacade.getSitemap(id: string | number)`
|
|
46
|
+
- Spanish log messages for success and error cases
|
|
47
|
+
- **Test Coverage:**
|
|
48
|
+
- SiteService: 100% coverage (5 tests passing)
|
|
49
|
+
- SiteFacade: 82.05% coverage (7 tests passing)
|
|
50
|
+
- Tests include success scenarios and error handling
|
|
51
|
+
- **Example:** `examples/site/get_sitemap.ts` demonstrates usage
|
|
52
|
+
|
|
53
|
+
#### Build Management
|
|
54
|
+
- **`buildStart` method** in `SiteService` and `SiteFacade` for initiating build processes
|
|
55
|
+
- API endpoint for build initialization
|
|
56
|
+
- Test coverage and mock updates included
|
|
57
|
+
|
|
58
|
+
- **`buildEnd` method** in `SiteService` and `SiteFacade` for finalizing builds
|
|
59
|
+
- Complete build lifecycle management
|
|
60
|
+
- Comprehensive test suite and examples
|
|
61
|
+
- Mock updates for testing scenarios
|
|
62
|
+
|
|
63
|
+
#### Error Handling
|
|
64
|
+
- **`SiteException` class** for site-specific error handling
|
|
65
|
+
- Custom error types extending `BaseException`
|
|
66
|
+
- Structured error codes with severity levels
|
|
67
|
+
- Integration with `ErrorHandlingService`
|
|
68
|
+
|
|
69
|
+
#### Architecture
|
|
70
|
+
- **SiteService integration** into SDK architecture
|
|
71
|
+
- `SiteFacade` added to main SDK entry point
|
|
72
|
+
- Lazy-loading pattern for site management functionality
|
|
73
|
+
- ServiceFactory integration for SiteService instances
|
|
74
|
+
- Dependency injection pattern throughout
|
|
75
|
+
|
|
76
|
+
### Changed
|
|
77
|
+
|
|
78
|
+
#### Logging
|
|
79
|
+
- **StdoutLogger marcado como @deprecated** en favor de PinoLogger
|
|
80
|
+
- Se mantiene por backwards compatibility pero se recomienda usar PinoLogger
|
|
81
|
+
- Aviso en JSDoc sobre preferir PinoLogger o inyectar logger personalizado
|
|
82
|
+
|
|
83
|
+
#### Configuration
|
|
84
|
+
- **Client header defaults** refactor in PageFacade
|
|
85
|
+
- Enhanced page update methods with improved header management
|
|
86
|
+
- Better separation of concerns between services
|
|
87
|
+
|
|
88
|
+
#### Documentation
|
|
89
|
+
- **Enhanced documentation** para sistema de logging en docs_dev y Docusaurus
|
|
90
|
+
- **Updated Configuración.md** con sección de Sistema de Logging integrada
|
|
91
|
+
- **Sistema de Logging.md** creado en docs_dev con ejemplos de uso
|
|
92
|
+
- **Enhanced documentation** for image management methods
|
|
93
|
+
- **Improved documentation** for page processing methods across services and facades
|
|
94
|
+
- Updated JSDoc comments for better API clarity
|
|
95
|
+
|
|
96
|
+
### Technical Details
|
|
97
|
+
|
|
98
|
+
#### Files Modified for getSocials Feature:
|
|
99
|
+
1. **src/sdk.ts** - Type definitions (SocialName, SocialsResponse)
|
|
100
|
+
2. **src/index.ts** - Exported new types
|
|
101
|
+
3. **src/interfaces/SiteManager.ts** - Method signature: `getSocials(id: string | number): Promise<SocialsResponse>`
|
|
102
|
+
4. **src/services/SiteService.ts** - GET endpoint implementation: `/site/{id}/socials`
|
|
103
|
+
5. **src/facades/SiteFacade.ts** - Facade with Spanish logging
|
|
104
|
+
6. **__tests__/services/SiteService.test.ts** - Test suite
|
|
105
|
+
7. **__tests__/facades/SiteFacade.test.ts** - Success and error tests
|
|
106
|
+
8. **__tests__/mocks/site.ts** - Socials response mock data
|
|
107
|
+
9. **examples/site/get_socials.ts** - Usage example
|
|
108
|
+
|
|
109
|
+
#### Files Modified for getSitemap Feature:
|
|
110
|
+
1. **src/sdk.ts** - Type definitions (SitemapUrl, SitemapItem, SitemapItems, SitemapResponse)
|
|
111
|
+
2. **src/index.ts** - Exported new types
|
|
112
|
+
3. **src/interfaces/SiteManager.ts** - Method signature: `getSitemap(id: string | number): Promise<SitemapResponse>`
|
|
113
|
+
4. **src/services/SiteService.ts** - GET endpoint implementation: `/site/{id}/sitemap`
|
|
114
|
+
5. **src/facades/SiteFacade.ts** - Facade with Spanish logging
|
|
115
|
+
6. **__tests__/services/SiteService.test.ts** - Test suite
|
|
116
|
+
7. **__tests__/facades/SiteFacade.test.ts** - Success and error tests
|
|
117
|
+
8. **__tests__/mocks/site.ts** - Sitemap response mock data
|
|
118
|
+
9. **examples/site/get_sitemap.ts** - Usage example
|
|
119
|
+
|
|
120
|
+
## [2.0.8] - 2025-01-XX
|
|
121
|
+
|
|
122
|
+
### Changed
|
|
123
|
+
- Made `clientName` and `clientVersion` optional in SDK configuration
|
|
124
|
+
|
|
125
|
+
## [2.0.7] - 2025-01-XX
|
|
126
|
+
|
|
127
|
+
### Changed
|
|
128
|
+
- Made `clientName` and `clientVersion` optional in SDK configuration
|
|
129
|
+
|
|
130
|
+
## [2.0.6] - 2025-01-XX
|
|
131
|
+
|
|
132
|
+
### Changed
|
|
133
|
+
- Made `clientName` and `clientVersion` optional in SDK configuration
|
|
134
|
+
|
|
135
|
+
## [2.0.4] - 2025-01-XX
|
|
136
|
+
|
|
137
|
+
### Changed
|
|
138
|
+
- Initial release candidate version
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Version Classification
|
|
143
|
+
|
|
144
|
+
- **Added**: New features
|
|
145
|
+
- **Changed**: Changes in existing functionality
|
|
146
|
+
- **Deprecated**: Soon-to-be removed features
|
|
147
|
+
- **Removed**: Removed features
|
|
148
|
+
- **Fixed**: Bug fixes
|
|
149
|
+
- **Security**: Security vulnerability fixes
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
Griddo SDK is a TypeScript library for integrating with the Griddo API. It provides a modular architecture using facades, services, and factories to interact with pages, alerts, languages, images, structured data, and site management.
|
|
8
|
+
|
|
9
|
+
## Common Commands
|
|
10
|
+
|
|
11
|
+
### Build
|
|
12
|
+
```bash
|
|
13
|
+
npm run build # Full build (esbuild + types + aliases)
|
|
14
|
+
npm run build:tsc # Build with esbuild and TypeScript declarations
|
|
15
|
+
npm run build:doc # Generate TypeDoc documentation
|
|
16
|
+
npm run build:doc:md # Generate documentation as markdown
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Testing
|
|
20
|
+
```bash
|
|
21
|
+
npm test # Run all tests with vitest
|
|
22
|
+
npm run test:ui # Run tests with UI
|
|
23
|
+
npm run test:coverage # Run tests with coverage report
|
|
24
|
+
npm run test:sync # Run tests synchronously (no file parallelism)
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Development
|
|
28
|
+
```bash
|
|
29
|
+
npm run lint # Lint source files
|
|
30
|
+
npm run lint:fix # Fix linting issues automatically
|
|
31
|
+
npm run prettier # Format code with Prettier
|
|
32
|
+
npm run dev:connection # Compile example connection file
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Running Examples
|
|
36
|
+
```bash
|
|
37
|
+
npm run run:example site/build_end # Run a specific example (use tsx under the hood)
|
|
38
|
+
# Usage: npm run run:example <filename> [testName]
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Release
|
|
42
|
+
```bash
|
|
43
|
+
npm run release # Create a new release using release-it
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Architecture
|
|
47
|
+
|
|
48
|
+
### Layer Structure
|
|
49
|
+
|
|
50
|
+
The SDK follows a layered architecture with clear separation of concerns:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
SDK (entry point)
|
|
54
|
+
↓
|
|
55
|
+
Facades (simplified user interface)
|
|
56
|
+
↓
|
|
57
|
+
Services (business logic)
|
|
58
|
+
↓
|
|
59
|
+
ApiService (HTTP communication)
|
|
60
|
+
↓
|
|
61
|
+
HttpClient (fetch/node-fetch/undici)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Key Patterns
|
|
65
|
+
|
|
66
|
+
1. **Factory Pattern** (`ServiceFactory`, `HttpClientFactory`): Centralizes instance creation with singleton services
|
|
67
|
+
2. **Facade Pattern** (`PageFacade`, `AlertFacade`, etc.): Simplifies service interfaces
|
|
68
|
+
3. **Dependency Injection**: All services receive dependencies via constructor
|
|
69
|
+
4. **Decorator Pattern**: HttpClient decorators add timeout, retry, logging, error handling
|
|
70
|
+
|
|
71
|
+
### Core Components
|
|
72
|
+
|
|
73
|
+
- **SDK** (`src/index.ts`): Main entry point, lazy-loads facades on first access
|
|
74
|
+
- **ServiceFactory** (`src/factories/ServiceFactory.ts`): Creates and manages service instances
|
|
75
|
+
- **HttpClientFactory** (`src/factories/HttpClientFactory.ts`): Creates HTTP clients with decorators
|
|
76
|
+
- **Services** (`src/services/`): Business logic layer (ApiService, PageService, etc.)
|
|
77
|
+
- **Facades** (`src/facades/`): User-facing interfaces for services
|
|
78
|
+
- **Exceptions** (`src/exception/`): Custom error classes extending `BaseException`
|
|
79
|
+
|
|
80
|
+
### Path Aliases
|
|
81
|
+
|
|
82
|
+
The project uses path aliases defined in `tsconfig.json`:
|
|
83
|
+
- `@griddo-sdk` → `src/sdk`
|
|
84
|
+
- `@clients/*` → `src/clients/*`
|
|
85
|
+
- `@config/*` → `src/config/*`
|
|
86
|
+
- `@exceptions/*` → `src/exception/*`
|
|
87
|
+
- `@facades/*` → `src/facades/*`
|
|
88
|
+
- `@factories/*` → `src/factories/*`
|
|
89
|
+
- `@interfaces/*` → `src/interfaces/*`
|
|
90
|
+
- `@services/*` → `src/services/*`
|
|
91
|
+
- `@utils/*` → `src/utils/*`
|
|
92
|
+
- `@adapters/*` → `src/adapters/*`
|
|
93
|
+
|
|
94
|
+
## TypeScript Configuration
|
|
95
|
+
|
|
96
|
+
- Target: ES2020
|
|
97
|
+
- Module: ESNext
|
|
98
|
+
- Strict mode enabled
|
|
99
|
+
- Path aliases used for imports (see above)
|
|
100
|
+
|
|
101
|
+
## Error Handling
|
|
102
|
+
|
|
103
|
+
All custom exceptions extend `BaseException`. When adding new exceptions:
|
|
104
|
+
|
|
105
|
+
1. Create in `src/exception/`
|
|
106
|
+
2. Extend `BaseException`
|
|
107
|
+
3. Define error codes with severity levels
|
|
108
|
+
4. Use `ErrorHandlingService` for logging
|
|
109
|
+
|
|
110
|
+
See `docs_dev/errors.md` for the complete error reference.
|
|
111
|
+
|
|
112
|
+
## Testing
|
|
113
|
+
|
|
114
|
+
- Tests located in `__tests__/`
|
|
115
|
+
- Uses vitest with node environment
|
|
116
|
+
- Coverage excludes: interfaces, types, test files, examples
|
|
117
|
+
- Run specific test file: `vitest path/to/test.test.ts`
|
|
118
|
+
|
|
119
|
+
## Concurrency
|
|
120
|
+
|
|
121
|
+
The SDK uses `ConcurrencyLimiter` interface (implemented by `PLimitConcurrencyLimiter`) for controlling concurrent API requests. Default concurrency is 10, configurable via `ApiEnvironment.concurrency`.
|
|
122
|
+
|
|
123
|
+
## HTTP Client Configuration
|
|
124
|
+
|
|
125
|
+
Three HTTP clients available via `HttpClients` enum:
|
|
126
|
+
- `FETCH` (default): Native fetch
|
|
127
|
+
- `NODE_FETCH`: node-fetch package
|
|
128
|
+
- `UNDICI`: Undici package
|
|
129
|
+
|
|
130
|
+
Clients can be decorated with:
|
|
131
|
+
- Timeout (`timeoutMs`)
|
|
132
|
+
- Retry (`retries`, `retryDelay`)
|
|
133
|
+
- HTTP logging (`httpLog`)
|
|
134
|
+
- Error handling
|
|
135
|
+
|
|
136
|
+
## Documentation Files
|
|
137
|
+
|
|
138
|
+
- `docs_dev/README.md`: Main development documentation
|
|
139
|
+
- `docs_dev/design_patterns.md`: Applied design patterns
|
|
140
|
+
- `docs_dev/errors.md`: Error handling reference
|
|
141
|
+
- `docs_dev/guia_estilo_typescript.md`: TypeScript style guide
|
|
142
|
+
- `docs_dev/maintenance_doc.md`: Maintenance guide
|
|
143
|
+
- `RELEASE_MANAGEMENT.md`: Release process using release-it
|
|
144
|
+
|
|
145
|
+
## When Working on This Codebase
|
|
146
|
+
|
|
147
|
+
1. **Use path aliases** instead of relative imports
|
|
148
|
+
2. **Follow the facade pattern**: Users interact with facades, not services directly
|
|
149
|
+
3. **Add exceptions** to `src/exception/` for new error scenarios
|
|
150
|
+
4. **Create tests** in `__tests__/` mirroring the `src/` structure
|
|
151
|
+
5. **Run linting** before committing: `npm run lint:fix && npm run prettier`
|
|
152
|
+
6. **Build** before committing to ensure types are correct
|
|
153
|
+
- @CLAUDE.md
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Guía del Desarrollador IA - Griddo SDK
|
|
2
|
+
|
|
3
|
+
Esta guía explica cómo orquestar los agentes y comandos para trabajar de forma autónoma en el SDK de Griddo. Sigue estos
|
|
4
|
+
flujos para garantizar la calidad y consistencia del proyecto.
|
|
5
|
+
|
|
6
|
+
## Roles y Agentes
|
|
7
|
+
|
|
8
|
+
- **`planning-agent`**: Arquitecto. Crea planes en `.claude/plans/`.
|
|
9
|
+
- **`backend-developer`**: Programador. Implementa lógica y tipos.
|
|
10
|
+
- **`testing-agent`**: Especialista en Vitest. Crea tests TDD (AAA).
|
|
11
|
+
- **`code-reviewer`**: Revisor. Valida calidad y seguridad.
|
|
12
|
+
- **`debugger-agent`**: Investigador. Encuentra causas raíz de fallos.
|
|
13
|
+
- **`technical-writer`**: Documentador. JSDoc, README y guías.
|
|
14
|
+
- **`release-agent`**: Gestor de versiones. CHANGELOG y SemVer.
|
|
15
|
+
|
|
16
|
+
## Flujos de Trabajo Principales
|
|
17
|
+
|
|
18
|
+
### 1. Implementar una Nueva Funcionalidad (Feature)
|
|
19
|
+
|
|
20
|
+
Usa este flujo para añadir nuevos endpoints, servicios o fachadas.
|
|
21
|
+
|
|
22
|
+
1. `plan-manage start {feature-name}`: Inicializa el plan.
|
|
23
|
+
2. **ESPERAR APROBACIÓN**: El usuario debe validar el plan generado antes de continuar.
|
|
24
|
+
3. `new-feature {descripción}`: Sigue el ciclo TDD completo tras la aprobación.
|
|
25
|
+
4. El comando ejecutará automáticamente:
|
|
26
|
+
- `testing-agent` (Fase Roja).
|
|
27
|
+
- `backend-developer` (Fase Verde).
|
|
28
|
+
- `pre-flight` (Gatekeeper).
|
|
29
|
+
- `release-agent` (CHANGELOG).
|
|
30
|
+
|
|
31
|
+
### 2. Corregir un Error (Bug Fix)
|
|
32
|
+
|
|
33
|
+
Usa este flujo cuando algo no funciona como se espera.
|
|
34
|
+
|
|
35
|
+
1. `bug-fix {descripción}`: Inicia la investigación.
|
|
36
|
+
2. El comando orquestará:
|
|
37
|
+
- `debugger-agent` (Análisis).
|
|
38
|
+
- `testing-agent` (Reproducción).
|
|
39
|
+
- `backend-developer` (Corrección).
|
|
40
|
+
- `pre-flight` (Validación).
|
|
41
|
+
|
|
42
|
+
### 3. Refactorizar Código
|
|
43
|
+
|
|
44
|
+
Usa este flujo para mejorar el código existente sin cambiar su funcionalidad.
|
|
45
|
+
|
|
46
|
+
1. `refactor {objetivo}`: Analiza el impacto.
|
|
47
|
+
2. Sigue el flujo de validación continua con los tests existentes.
|
|
48
|
+
3. Ejecuta `pre-flight` al finalizar para asegurar la integridad.
|
|
49
|
+
|
|
50
|
+
## Comandos Especiales
|
|
51
|
+
|
|
52
|
+
### `pre-flight` (El Gatekeeper)
|
|
53
|
+
|
|
54
|
+
**OBLIGATORIO** antes de finalizar cualquier tarea.
|
|
55
|
+
|
|
56
|
+
- Ejecuta el build de producción.
|
|
57
|
+
- Analiza Breaking Changes.
|
|
58
|
+
- Verifica exportaciones globales.
|
|
59
|
+
|
|
60
|
+
### `plan-manage` (Persistencia)
|
|
61
|
+
|
|
62
|
+
- `start`: Nueva tarea (crea el plan en la raíz).
|
|
63
|
+
- `resume`: Carga contexto de una sesión previa (mueve el plan a `active/` tras aprobación).
|
|
64
|
+
- `status`: Muestra progreso y bloqueos.
|
|
65
|
+
- `finish`: Finaliza la tarea y mueve los archivos a `completed/`.
|
|
66
|
+
|
|
67
|
+
## Reglas de Oro para la IA
|
|
68
|
+
|
|
69
|
+
1. **Auto-Corrección (Self-Healing)**: Si un test falla o el revisor encuentra un problema, corrígelo automáticamente
|
|
70
|
+
usando el `backend-developer` antes de informar al usuario.
|
|
71
|
+
2. **Path Aliases**: Usa siempre `@services`, `@facades`, etc. Nunca imports relativos.
|
|
72
|
+
3. **TDD**: Nunca escribas código de producción sin un test que valide su comportamiento (o falle antes).
|
|
73
|
+
4. **Git**: Realiza commits granulares y haz `push` a la rama correspondiente. Sugiere siempre un Pull Request.
|
|
74
|
+
5. **CHANGELOG**: El usuario debe saber qué ha cambiado a nivel de negocio. Usa el `release-agent`.
|
|
75
|
+
|
|
76
|
+
## Estructura de Archivos del Sistema IA
|
|
77
|
+
|
|
78
|
+
- `.claude/agents/`: Definición de roles.
|
|
79
|
+
- `.claude/commands/`: Guías de ejecución de tareas.
|
|
80
|
+
- `.claude/plans/`: Planes detallados por funcionalidad.
|
|
81
|
+
- `active/`: Planes aprobados y en desarrollo.
|
|
82
|
+
- `completed/`: Planes finalizados y archivados.
|
|
83
|
+
- `.claude/sessions/`: Contexto persistente de cada tarea.
|
|
84
|
+
- `active/`: Sesiones en curso.
|
|
85
|
+
- `completed/`: Historial de sesiones finalizadas.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Environment.d.ts","sourceRoot":"","sources":["../../src/config/Environment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,qBAAa,WAAY,YAAW,kBAAkB;IACrD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;gBAE5B,MAAM,EAAE,cAAc;IAOlC,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,aAAa;
|
|
1
|
+
{"version":3,"file":"Environment.d.ts","sourceRoot":"","sources":["../../src/config/Environment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAIzE,qBAAa,WAAY,YAAW,kBAAkB;IACrD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;gBAE5B,MAAM,EAAE,cAAc;IAOlC,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,aAAa;IAMrB,SAAS;CAGT"}
|
package/dist/config/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "v2.0.
|
|
1
|
+
export declare const version = "v2.0.14";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { SeverityError } from "../interfaces/ErrorHandling";
|
|
2
|
+
import type { ExceptionErrors } from "../interfaces/ErrorHandling";
|
|
3
|
+
import { BaseException } from "./BaseException";
|
|
4
|
+
export type SiteExceptionsErrors = ExceptionErrors;
|
|
5
|
+
export declare const SiteExceptionsErrors: {
|
|
6
|
+
REQUIRED_API_SERVICE_PROPERTY: {
|
|
7
|
+
code: number;
|
|
8
|
+
message: string;
|
|
9
|
+
severity: SeverityError.WARNING;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
REQUIRED_SITE_SERVICE_PROPERTY: {
|
|
13
|
+
code: number;
|
|
14
|
+
message: string;
|
|
15
|
+
severity: SeverityError.WARNING;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
REQUIRED_LOGGING_SERVICE_PROPERTY: {
|
|
19
|
+
code: number;
|
|
20
|
+
message: string;
|
|
21
|
+
severity: SeverityError.WARNING;
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
interface SiteErrorParams {
|
|
26
|
+
context: string;
|
|
27
|
+
error: string | object;
|
|
28
|
+
detail: (typeof SiteExceptionsErrors)[keyof typeof SiteExceptionsErrors];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Represents a validation error that occurs when input data is invalid.
|
|
32
|
+
*/
|
|
33
|
+
export declare class SiteException extends BaseException {
|
|
34
|
+
static internalErrors: {
|
|
35
|
+
REQUIRED_API_SERVICE_PROPERTY: {
|
|
36
|
+
code: number;
|
|
37
|
+
message: string;
|
|
38
|
+
severity: SeverityError.WARNING;
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
REQUIRED_SITE_SERVICE_PROPERTY: {
|
|
42
|
+
code: number;
|
|
43
|
+
message: string;
|
|
44
|
+
severity: SeverityError.WARNING;
|
|
45
|
+
description: string;
|
|
46
|
+
};
|
|
47
|
+
REQUIRED_LOGGING_SERVICE_PROPERTY: {
|
|
48
|
+
code: number;
|
|
49
|
+
message: string;
|
|
50
|
+
severity: SeverityError.WARNING;
|
|
51
|
+
description: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Creates an instance of SiteError.
|
|
56
|
+
* @param message - The error message.
|
|
57
|
+
* @param error
|
|
58
|
+
* @param detail
|
|
59
|
+
*/
|
|
60
|
+
constructor({ context, error, detail }: SiteErrorParams);
|
|
61
|
+
}
|
|
62
|
+
export {};
|
|
63
|
+
//# sourceMappingURL=SiteException.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SiteException.d.ts","sourceRoot":"","sources":["../../src/exception/SiteException.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,MAAM,oBAAoB,GAAG,eAAe,CAAC;AAEnD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;CAmBD,CAAC;AAEjC,UAAU,eAAe;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,EAAE,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;CACzE;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,aAAa;IAC/C,MAAM,CAAC,cAAc;;;;;;;;;;;;;;;;;;;MAAwB;IAE7C;;;;;OAKG;gBACS,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,eAAe;CAIvD"}
|
|
@@ -38,10 +38,10 @@ export declare class ImageFacade implements ImageManager {
|
|
|
38
38
|
*
|
|
39
39
|
* @param image - The image data as a readable stream.
|
|
40
40
|
* @param imageName - The name of the image.
|
|
41
|
-
* @param site - The site identifier to which the image belongs.
|
|
42
|
-
* @param mimetype - The MIME type of the image.
|
|
41
|
+
* @param site - The site identifier to which the image belongs. Defaults to "global".
|
|
42
|
+
* @param mimetype - The MIME type of the image (optional).
|
|
43
43
|
* @returns A Promise resolving to the detailed information of the newly added image.
|
|
44
|
-
* @throws {ImageException}
|
|
44
|
+
* @throws {ImageException} If the image is invalid.
|
|
45
45
|
*/
|
|
46
46
|
add({ image, imageName, site, mimetype, }: {
|
|
47
47
|
image: Readable;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { SiteSyncActionsResponseDTO } from "@griddo/api-types";
|
|
1
2
|
import { ConcurrencyLimiter } from "../interfaces/ConcurrencyLimiter";
|
|
2
3
|
import type { Pageable } from "../interfaces/Pageable";
|
|
3
4
|
import type { PageUpdateHelpers } from "../interfaces/PageUpdateHelpers";
|
|
4
5
|
import type { LoggingService } from "../services/LoggingService";
|
|
5
6
|
import type { PageService } from "../services/PageService";
|
|
7
|
+
import { SiteService } from "../services/SiteService";
|
|
6
8
|
import { ApiResponse, PagePaginateParams, PagePaginationResponse, PageResponse, UpdateModulesOptions } from "../sdk";
|
|
7
9
|
/**
|
|
8
10
|
* Facade that simplifies page-related operations for the user.
|
|
@@ -18,18 +20,62 @@ import { ApiResponse, PagePaginateParams, PagePaginationResponse, PageResponse,
|
|
|
18
20
|
export declare class PageFacade implements Pageable {
|
|
19
21
|
private readonly pageService;
|
|
20
22
|
private readonly loggingService;
|
|
23
|
+
private readonly siteService;
|
|
21
24
|
private readonly concurrencyLimiter;
|
|
22
25
|
/**
|
|
23
26
|
* Constructs an instance of PageController.
|
|
24
27
|
*
|
|
25
28
|
* @param pageService - The service responsible for page-related operations.
|
|
26
29
|
* @param loggingService - The service used for logging operations.
|
|
30
|
+
* @param siteService
|
|
31
|
+
* @param siteService
|
|
32
|
+
* @param siteService
|
|
27
33
|
* @param concurrencyLimiter
|
|
28
34
|
*/
|
|
29
|
-
constructor(pageService: PageService, loggingService: LoggingService, concurrencyLimiter: ConcurrencyLimiter);
|
|
35
|
+
constructor(pageService: PageService, loggingService: LoggingService, siteService: SiteService, concurrencyLimiter: ConcurrencyLimiter);
|
|
36
|
+
/**
|
|
37
|
+
* Compares two pages to determine if they are equal using JSON serialization.
|
|
38
|
+
*
|
|
39
|
+
* @template TTemplate - The type of the page template.
|
|
40
|
+
* @param originalPage - The original page to compare.
|
|
41
|
+
* @param modifiedPage - The modified page to compare.
|
|
42
|
+
* @returns `true` if the pages are identical, `false` otherwise.
|
|
43
|
+
*/
|
|
30
44
|
private arePagesEqual;
|
|
45
|
+
/**
|
|
46
|
+
* Recursively traverses page modules and applies a callback to those
|
|
47
|
+
* matching the specified component name.
|
|
48
|
+
*
|
|
49
|
+
* @template TModule - The type of the target module.
|
|
50
|
+
* @param modules - The object containing the modules to traverse.
|
|
51
|
+
* @param moduleName - The component name of the module to find.
|
|
52
|
+
* @param callback - The async function to apply to each found module.
|
|
53
|
+
* @returns `true` if at least one module was modified, `false` otherwise.
|
|
54
|
+
*/
|
|
31
55
|
private applyCallbackToModules;
|
|
56
|
+
/**
|
|
57
|
+
* Processes multiple pages by applying a callback to each one.
|
|
58
|
+
*
|
|
59
|
+
* This method handles concurrency, page cloning, and automatic saving
|
|
60
|
+
* if changes are detected. It also manages errors on a per-page basis.
|
|
61
|
+
*
|
|
62
|
+
* @template TTemplate - The type of the page template.
|
|
63
|
+
* @param pageIDs - Array of page IDs to process.
|
|
64
|
+
* @param callback - Async function applied to each page.
|
|
65
|
+
* @param skipDeletePages - If `true`, skips pages marked as deleted.
|
|
66
|
+
* @returns A promise that resolves when all pages have been processed.
|
|
67
|
+
*/
|
|
32
68
|
private processPages;
|
|
69
|
+
/**
|
|
70
|
+
* Applies a callback to specific modules within a page.
|
|
71
|
+
*
|
|
72
|
+
* @template TModule - The type of the target module.
|
|
73
|
+
* @param callback - Async function to apply to each found module.
|
|
74
|
+
* @param page - The page containing the modules to process.
|
|
75
|
+
* @param moduleName - The component name of the module to find.
|
|
76
|
+
* @returns The page with modified modules.
|
|
77
|
+
* @throws {PageException} If the page is invalid or module name is missing.
|
|
78
|
+
*/
|
|
33
79
|
private readonly updateModulesFromPages;
|
|
34
80
|
listIDs(template?: string | null): Promise<number[]>;
|
|
35
81
|
paginate<TPage>({ queryParams, site, language, }: PagePaginateParams): Promise<PagePaginationResponse<TPage>>;
|
|
@@ -57,7 +103,7 @@ export declare class PageFacade implements Pageable {
|
|
|
57
103
|
* @returns A promise that resolves when all pages have been processed.
|
|
58
104
|
* @throws Will throw a `ValidationException` if pages cannot be retrieved or the callback is invalid.
|
|
59
105
|
*/
|
|
60
|
-
updatePages<TTemplate = unknown>(callback: (page: PageResponse<TTemplate>, helpers: PageUpdateHelpers) => Promise<PageResponse<TTemplate> | void>, options?: UpdateModulesOptions): Promise<
|
|
106
|
+
updatePages<TTemplate = unknown>(callback: (page: PageResponse<TTemplate>, helpers: PageUpdateHelpers) => Promise<PageResponse<TTemplate> | void>, options?: UpdateModulesOptions): Promise<SiteSyncActionsResponseDTO>;
|
|
61
107
|
/**
|
|
62
108
|
* Applies a callback to modules with a specific name across multiple pages.
|
|
63
109
|
*
|
|
@@ -77,6 +123,6 @@ export declare class PageFacade implements Pageable {
|
|
|
77
123
|
* @returns A promise that resolves when all matching modules have been processed.
|
|
78
124
|
* @throws Will throw a `PageException` if `moduleName` is not provided.
|
|
79
125
|
*/
|
|
80
|
-
updateModules<TModule, TTemplate = unknown>(callback: (module: TModule) => Promise<TModule>, moduleName: string, options?: UpdateModulesOptions): Promise<
|
|
126
|
+
updateModules<TModule, TTemplate = unknown>(callback: (module: TModule) => Promise<TModule>, moduleName: string, options?: UpdateModulesOptions): Promise<SiteSyncActionsResponseDTO>;
|
|
81
127
|
}
|
|
82
128
|
//# sourceMappingURL=PageFacade.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageFacade.d.ts","sourceRoot":"","sources":["../../src/facades/PageFacade.ts"],"names":[],"mapp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AAoB,GAC5B,OAAO,CAAC,0BAA0B,CAAC;CA+BtC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { SiteSyncActionsResponseDTO } from "@griddo/api-types";
|
|
2
|
+
import { SiteManager } from "../interfaces/SiteManager";
|
|
3
|
+
import type { LoggingService } from "../services/LoggingService";
|
|
4
|
+
import { SiteService } from "../services/SiteService";
|
|
5
|
+
import { SiteBuildStartResponse, SiteBuildEndParams, SiteBuildEndResponse, SitemapResponse, SocialsResponse, SiteLanguagesResponse, ReferenceFieldBody, ReferenceFieldResponse } from "../sdk";
|
|
6
|
+
/**
|
|
7
|
+
* Facade that simplifies site-related operations for the user.
|
|
8
|
+
*
|
|
9
|
+
* This class provides an easy-to-use interface for site operations
|
|
10
|
+
* such as syncing content. By using this facade, users can interact
|
|
11
|
+
* with site functionality without needing to manage the underlying
|
|
12
|
+
* `SiteService` directly.
|
|
13
|
+
*
|
|
14
|
+
* The facade abstracts the complexity, allowing you to perform operations
|
|
15
|
+
* in a streamlined manner within the SDK.
|
|
16
|
+
*/
|
|
17
|
+
export declare class SiteFacade implements SiteManager {
|
|
18
|
+
private readonly siteService;
|
|
19
|
+
private readonly loggingService;
|
|
20
|
+
/**
|
|
21
|
+
* Constructs an instance of SiteFacade.
|
|
22
|
+
*
|
|
23
|
+
* @param siteService - The service responsible for site-related operations.
|
|
24
|
+
* @param loggingService - The service used for logging operations.
|
|
25
|
+
* @throws {SiteException} If siteService or loggingService is not provided.
|
|
26
|
+
*/
|
|
27
|
+
constructor(siteService: SiteService, loggingService: LoggingService);
|
|
28
|
+
/**
|
|
29
|
+
* Synchronizes site content.
|
|
30
|
+
*/
|
|
31
|
+
syncContent(): Promise<SiteSyncActionsResponseDTO>;
|
|
32
|
+
/**
|
|
33
|
+
* Starts the build process for a site.
|
|
34
|
+
*/
|
|
35
|
+
buildStart(id: string | number): Promise<SiteBuildStartResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* Ends the build process for a site.
|
|
38
|
+
*/
|
|
39
|
+
buildEnd(id: string | number, body: SiteBuildEndParams): Promise<SiteBuildEndResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* Gets the sitemap for a site.
|
|
42
|
+
*/
|
|
43
|
+
getSitemap(id: string | number): Promise<SitemapResponse>;
|
|
44
|
+
/**
|
|
45
|
+
* Gets the social networks for a site.
|
|
46
|
+
*/
|
|
47
|
+
getSocials(id: string | number): Promise<SocialsResponse>;
|
|
48
|
+
/**
|
|
49
|
+
* Gets the languages for a site.
|
|
50
|
+
*/
|
|
51
|
+
getLanguages(id: string | number): Promise<SiteLanguagesResponse>;
|
|
52
|
+
/**
|
|
53
|
+
* Gets distributor data for a site.
|
|
54
|
+
*
|
|
55
|
+
* @param id - The site ID.
|
|
56
|
+
* @param body - The request body for distributor configuration.
|
|
57
|
+
* @param language - Language ID (numeric or string) for the lang header.
|
|
58
|
+
* @returns A promise that resolves to the distributor response.
|
|
59
|
+
*/
|
|
60
|
+
distributor(id: string | number, body: ReferenceFieldBody, language: string | number): Promise<ReferenceFieldResponse>;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=SiteFacade.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SiteFacade.d.ts","sourceRoot":"","sources":["../../src/facades/SiteFacade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAG/D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EACN,sBAAsB,EACtB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,EACtB,MAAM,aAAa,CAAC;AAErB;;;;;;;;;;GAUG;AACH,qBAAa,UAAW,YAAW,WAAW;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