@griddo/cx 11.14.2-rc.0 → 11.14.2

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/build/index.js CHANGED
@@ -25328,7 +25328,7 @@ var SITE_URI = `${GRIDDO_API_URL2}/site/`;
25328
25328
  var package_default = {
25329
25329
  name: "@griddo/cx",
25330
25330
  description: "Griddo SSG based on Gatsby",
25331
- version: "11.14.2-rc.0",
25331
+ version: "11.14.2",
25332
25332
  authors: [
25333
25333
  "Hisco <francis.vega@griddo.io>"
25334
25334
  ],
@@ -25389,7 +25389,7 @@ var package_default = {
25389
25389
  },
25390
25390
  devDependencies: {
25391
25391
  "@biomejs/biome": "2.3.4",
25392
- "@griddo/core": "11.14.2-rc.0",
25392
+ "@griddo/core": "11.14.2",
25393
25393
  "@types/node": "20.19.4",
25394
25394
  "@typescript/native-preview": "7.0.0-dev.20260401.1",
25395
25395
  cheerio: "1.1.2",
@@ -25423,7 +25423,7 @@ var package_default = {
25423
25423
  publishConfig: {
25424
25424
  access: "public"
25425
25425
  },
25426
- gitHead: "b93ad3eedf58a5187667f87764045b815c87cc68"
25426
+ gitHead: "92256859b4b631e6fbd04d6ab48804b42b293614"
25427
25427
  };
25428
25428
 
25429
25429
  // exporter/shared/headers.ts
@@ -62,7 +62,7 @@ type LLMs = {
62
62
  id: number;
63
63
  title: string;
64
64
  url: string;
65
- socialDescription: string;
65
+ description: string;
66
66
  }[];
67
67
  interface RenderInfo {
68
68
  buildProcessData: BuildProcessData;
@@ -69,8 +69,8 @@ async function generateLlmsTxt(domain: string): Promise<void> {
69
69
 
70
70
  // llms.txt url entry
71
71
  const pageLinks = llmsResponse
72
- .map(({ title, url, socialDescription }) => {
73
- const description = socialDescription ? `: ${socialDescription}` : "";
72
+ .map(({ title, url, description }) => {
73
+ const pageDescription = description ? `: ${description}` : "";
74
74
  const strippedUrl = removeTrailingSlash(url);
75
75
  // Home: pathname "/" → /index.md evita que quede dominio.com.md
76
76
  const isHome = (() => {
@@ -84,7 +84,7 @@ async function generateLlmsTxt(domain: string): Promise<void> {
84
84
  GRIDDO_RENDER_ENABLED_LLM_MD && isHome
85
85
  ? `${strippedUrl}/index.md`
86
86
  : `${strippedUrl}${pageIndexName}`;
87
- return `- [${title}](${href})${description}`;
87
+ return `- [${title}](${href})${pageDescription}`;
88
88
  })
89
89
  .join("\n");
90
90
 
@@ -90,26 +90,32 @@ export async function loadConfig<T = unknown>(
90
90
 
91
91
  if (!configPath) {
92
92
  throw new ConfigLoadError(
93
- `No se encontró archivo de configuración en ${dirname}. ` +
94
- `Buscando: ${configName}.{ts,js,mjs}`,
93
+ `Config file not found in ${dirname}. ` + `Looking for: ${configName}.{ts,js,mjs}`,
95
94
  );
96
95
  }
97
96
 
98
- GriddoLog.verbose(`[loadConfig] Configuración encontrada: ${configPath}`);
97
+ GriddoLog.verbose(`[loadConfig] Config file found: ${configPath}`);
99
98
 
100
- // 2. Buscar tsconfig.json en el directorio del config
99
+ // 2. Buscar tsconfig.json (o jsconfig.json como fallback) en el directorio del config
101
100
  const tsconfigPath = join(dirname, tsconfigName);
102
- const hasTsconfig = existsSync(tsconfigPath);
101
+ const jsconfigPath = join(dirname, "jsconfig.json");
103
102
 
104
- if (hasTsconfig) {
105
- GriddoLog.verbose(`[loadConfig] tsconfig encontrado: ${tsconfigPath}`);
103
+ let resolvedConfigPath: string | null = null;
104
+ if (existsSync(tsconfigPath)) {
105
+ resolvedConfigPath = tsconfigPath;
106
+ } else if (existsSync(jsconfigPath)) {
107
+ resolvedConfigPath = jsconfigPath;
106
108
  }
107
109
 
108
- // 3. Extraer path aliases del tsconfig si existe
109
- const aliases = hasTsconfig ? parseTsConfigPaths(tsconfigPath, dirname) : {};
110
+ if (resolvedConfigPath) {
111
+ GriddoLog.verbose(`[loadConfig] ts/jsconfig found: ${resolvedConfigPath}`);
112
+ }
113
+
114
+ // 3. Extraer path aliases del tsconfig/jsconfig si existe
115
+ const aliases = resolvedConfigPath ? parseTsConfigPaths(resolvedConfigPath, dirname) : {};
110
116
 
111
117
  if (Object.keys(aliases).length > 0) {
112
- GriddoLog.verbose(`[loadConfig] Path aliases resueltos:`, aliases);
118
+ GriddoLog.verbose(`[loadConfig] Resolved path aliases:`, aliases);
113
119
  }
114
120
 
115
121
  // 4. Crear instancia de jiti con configuración adecuada
@@ -132,17 +138,17 @@ export async function loadConfig<T = unknown>(
132
138
  // 6. Extraer la configuración (maneja tanto default export como named exports)
133
139
  const config = (module as { default?: T }).default ?? (module as T);
134
140
 
135
- GriddoLog.verbose(`[loadConfig] Configuración cargada exitosamente`);
141
+ GriddoLog.verbose(`[loadConfig] Config loaded successfully`);
136
142
 
137
143
  return {
138
144
  config,
139
145
  path: configPath,
140
- tsconfigPath: hasTsconfig ? tsconfigPath : null,
146
+ tsconfigPath: resolvedConfigPath,
141
147
  };
142
148
  } catch (error) {
143
149
  const err = error instanceof Error ? error : new Error(String(error));
144
150
  throw new ConfigLoadError(
145
- `Error al cargar la configuración desde ${configPath}: ${err.message}`,
151
+ `Failed to load config from ${configPath}: ${err.message}`,
146
152
  err,
147
153
  );
148
154
  }
@@ -69,7 +69,7 @@ type LLMs = {
69
69
  id: number;
70
70
  title: string;
71
71
  url: string;
72
- socialDescription: string;
72
+ description: string;
73
73
  }[];
74
74
 
75
75
  interface RenderInfo {
@@ -134,17 +134,17 @@ class SyncRender {
134
134
 
135
135
  for (const page of newPages) {
136
136
  if (candidateIdsToCreate.has(page.id)) {
137
- const htmlTo = path.join(this.bundleDir, page.composePath, "index.html");
138
- const mdTo = path.join(this.bundleDir, `${page.composePath}.md`);
139
-
140
- // El page-data.json del índice principal tiene como slug solo
141
- // la barra (`/`) por eso gatsby lo guarda en el directorio
142
- // `index` de forma "reservada".
143
- // Ejemplos
137
+ // La home del dominio tiene `composePath` vacío (scanPages le
138
+ // quita la barra final). Gatsby la guarda como `index` reservado
139
+ // y `generate-md` escribe el markdown en `<dist>/index.md`.
140
+ // Ejemplos:
144
141
  // ../page-data/about-us/page-data.json // página con slug
145
- // ../page-data/programs/page-data.json // página con slug
146
- // ../page-data/index/page-data.json // <---- ¡página root index!
147
- const normalizedCompose = page.composePath === "/" ? "index" : page.composePath;
142
+ // ../page-data/index/page-data.json // <-- ¡home!
143
+ // ../about-us.md // página con slug
144
+ // ../index.md // <-- ¡home!
145
+ const normalizedCompose = page.composePath === "" ? "index" : page.composePath;
146
+ const htmlTo = path.join(this.bundleDir, page.composePath, "index.html");
147
+ const mdTo = path.join(this.bundleDir, `${normalizedCompose}.md`);
148
148
  const jsonTo = path.join(this.bundleDir, "page-data", normalizedCompose, "page-data.json");
149
149
 
150
150
  this.state.htmlToAdd.push({ from: page.htmlPath, to: htmlTo });
@@ -303,12 +303,13 @@ class SyncRender {
303
303
 
304
304
  const id = content.result.pageContext.id;
305
305
  const composePath = removeTrailingSlash(content.result.pageContext.fullPath.compose);
306
+ const normalizedCompose = composePath === "" ? "index" : composePath;
306
307
 
307
308
  return {
308
309
  id,
309
310
  composePath,
310
311
  htmlPath: path.join(dir, composePath, "index.html"),
311
- mdPath: path.join(dir, `${composePath}.md`),
312
+ mdPath: path.join(dir, `${normalizedCompose}.md`),
312
313
  jsonPath: file,
313
314
  };
314
315
  } catch (e) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@griddo/cx",
3
3
  "description": "Griddo SSG based on Gatsby",
4
- "version": "11.14.2-rc.0",
4
+ "version": "11.14.2",
5
5
  "authors": [
6
6
  "Hisco <francis.vega@griddo.io>"
7
7
  ],
@@ -62,7 +62,7 @@
62
62
  },
63
63
  "devDependencies": {
64
64
  "@biomejs/biome": "2.3.4",
65
- "@griddo/core": "11.14.2-rc.0",
65
+ "@griddo/core": "11.14.2",
66
66
  "@types/node": "20.19.4",
67
67
  "@typescript/native-preview": "7.0.0-dev.20260401.1",
68
68
  "cheerio": "1.1.2",
@@ -96,5 +96,5 @@
96
96
  "publishConfig": {
97
97
  "access": "public"
98
98
  },
99
- "gitHead": "b93ad3eedf58a5187667f87764045b815c87cc68"
99
+ "gitHead": "92256859b4b631e6fbd04d6ab48804b42b293614"
100
100
  }