@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/commands/end-render.js +1 -1
- package/build/commands/end-render.js.map +2 -2
- package/build/commands/notify-indexnow.js +1 -1
- package/build/commands/notify-indexnow.js.map +2 -2
- package/build/commands/prepare-assets-directory.js +1 -1
- package/build/commands/prepare-assets-directory.js.map +2 -2
- package/build/commands/prepare-domains-render.js +1 -1
- package/build/commands/prepare-domains-render.js.map +2 -2
- package/build/commands/reset-render.js +1 -1
- package/build/commands/reset-render.js.map +2 -2
- package/build/commands/start-render.js +23 -23
- package/build/commands/start-render.js.map +3 -3
- package/build/commands/upload-search-content.js +1 -1
- package/build/commands/upload-search-content.js.map +2 -2
- package/build/index.js +3 -3
- package/build/shared/types/global.d.ts +1 -1
- package/exporter/services/llms.ts +3 -3
- package/exporter/shared/load-config.ts +19 -13
- package/exporter/shared/types/global.ts +1 -1
- package/exporter/ssg-adapters/gatsby/shared/sync-render.ts +12 -11
- package/package.json +3 -3
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
|
|
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
|
|
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: "
|
|
25426
|
+
gitHead: "92256859b4b631e6fbd04d6ab48804b42b293614"
|
|
25427
25427
|
};
|
|
25428
25428
|
|
|
25429
25429
|
// exporter/shared/headers.ts
|
|
@@ -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,
|
|
73
|
-
const
|
|
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})${
|
|
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
|
-
`
|
|
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]
|
|
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
|
|
101
|
+
const jsconfigPath = join(dirname, "jsconfig.json");
|
|
103
102
|
|
|
104
|
-
|
|
105
|
-
|
|
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
|
-
|
|
109
|
-
|
|
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]
|
|
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]
|
|
141
|
+
GriddoLog.verbose(`[loadConfig] Config loaded successfully`);
|
|
136
142
|
|
|
137
143
|
return {
|
|
138
144
|
config,
|
|
139
145
|
path: configPath,
|
|
140
|
-
tsconfigPath:
|
|
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
|
-
`
|
|
151
|
+
`Failed to load config from ${configPath}: ${err.message}`,
|
|
146
152
|
err,
|
|
147
153
|
);
|
|
148
154
|
}
|
|
@@ -134,17 +134,17 @@ class SyncRender {
|
|
|
134
134
|
|
|
135
135
|
for (const page of newPages) {
|
|
136
136
|
if (candidateIdsToCreate.has(page.id)) {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
//
|
|
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/
|
|
146
|
-
// ../
|
|
147
|
-
|
|
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, `${
|
|
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
|
|
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
|
|
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": "
|
|
99
|
+
"gitHead": "92256859b4b631e6fbd04d6ab48804b42b293614"
|
|
100
100
|
}
|