@griddo/cx 11.7.5 → 11.7.6-rc.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 (300) hide show
  1. package/README.md +25 -228
  2. package/build/adapters/gatsby/actions/clean.js +10 -0
  3. package/build/adapters/gatsby/actions/clean.js.map +1 -0
  4. package/build/adapters/gatsby/actions/close.js +12 -0
  5. package/build/adapters/gatsby/actions/close.js.map +1 -0
  6. package/build/adapters/gatsby/actions/data.js +18 -0
  7. package/build/adapters/gatsby/actions/data.js.map +1 -0
  8. package/build/adapters/gatsby/actions/healthCheck.js +10 -0
  9. package/build/adapters/gatsby/actions/healthCheck.js.map +1 -0
  10. package/build/adapters/gatsby/actions/init.js +9 -0
  11. package/build/adapters/gatsby/actions/init.js.map +1 -0
  12. package/build/adapters/gatsby/actions/meta.js +14 -0
  13. package/build/adapters/gatsby/actions/meta.js.map +1 -0
  14. package/build/adapters/gatsby/actions/prepare.js +9 -0
  15. package/build/adapters/gatsby/actions/prepare.js.map +1 -0
  16. package/build/adapters/gatsby/actions/relocation.js +15 -0
  17. package/build/adapters/gatsby/actions/relocation.js.map +1 -0
  18. package/build/adapters/gatsby/actions/restore.js +26 -0
  19. package/build/adapters/gatsby/actions/restore.js.map +1 -0
  20. package/build/adapters/gatsby/actions/ssg.js +9 -0
  21. package/build/adapters/gatsby/actions/ssg.js.map +1 -0
  22. package/build/adapters/gatsby/actions/sync.js +50 -0
  23. package/build/adapters/gatsby/actions/sync.js.map +1 -0
  24. package/build/adapters/gatsby/index.js +74 -0
  25. package/build/adapters/gatsby/index.js.map +1 -0
  26. package/build/adapters/gatsby/shared/context.js +25 -0
  27. package/build/adapters/gatsby/shared/context.js.map +1 -0
  28. package/build/adapters/gatsby/shared/extract-assets.js +58 -0
  29. package/build/adapters/gatsby/shared/extract-assets.js.map +1 -0
  30. package/build/adapters/gatsby/shared/gatsby-build.js +49 -0
  31. package/build/adapters/gatsby/shared/gatsby-build.js.map +1 -0
  32. package/build/adapters/gatsby/shared/sync-render.js +208 -0
  33. package/build/adapters/gatsby/shared/sync-render.js.map +1 -0
  34. package/build/adapters/gatsby/shared/types.js +3 -0
  35. package/build/adapters/gatsby/shared/types.js.map +1 -0
  36. package/build/commands/end-render.js +63 -0
  37. package/build/commands/end-render.js.map +1 -0
  38. package/build/commands/prepare-assets-directory.js +32 -0
  39. package/build/commands/prepare-assets-directory.js.map +1 -0
  40. package/build/commands/prepare-domains-render.js +138 -0
  41. package/build/commands/prepare-domains-render.js.map +1 -0
  42. package/build/commands/reset-render.js +22 -0
  43. package/build/commands/reset-render.js.map +1 -0
  44. package/build/commands/start-render.js +35 -0
  45. package/build/commands/start-render.js.map +1 -0
  46. package/build/commands/upload-search-content.js +189 -0
  47. package/build/commands/upload-search-content.js.map +1 -0
  48. package/build/constants/endpoints.js +42 -0
  49. package/build/constants/endpoints.js.map +1 -0
  50. package/build/constants/envs.js +73 -0
  51. package/build/constants/envs.js.map +1 -0
  52. package/build/constants/errors.js +89 -0
  53. package/build/constants/errors.js.map +1 -0
  54. package/build/exporter/adapters/gatsby/actions/clean.d.ts +3 -0
  55. package/build/exporter/adapters/gatsby/actions/close.d.ts +3 -0
  56. package/build/exporter/adapters/gatsby/actions/data.d.ts +2 -0
  57. package/build/exporter/adapters/gatsby/actions/healthCheck.d.ts +2 -0
  58. package/build/exporter/adapters/gatsby/actions/init.d.ts +2 -0
  59. package/build/exporter/adapters/gatsby/actions/meta.d.ts +2 -0
  60. package/build/exporter/adapters/gatsby/actions/prepare.d.ts +2 -0
  61. package/build/exporter/adapters/gatsby/actions/relocation.d.ts +2 -0
  62. package/build/exporter/adapters/gatsby/actions/restore.d.ts +3 -0
  63. package/build/exporter/adapters/gatsby/actions/ssg.d.ts +3 -0
  64. package/build/exporter/adapters/gatsby/actions/sync.d.ts +3 -0
  65. package/build/exporter/adapters/gatsby/index.d.ts +9 -0
  66. package/build/exporter/adapters/gatsby/shared/context.d.ts +38 -0
  67. package/build/exporter/adapters/gatsby/shared/extract-assets.d.ts +7 -0
  68. package/build/exporter/adapters/gatsby/shared/gatsby-build.d.ts +7 -0
  69. package/build/exporter/adapters/gatsby/shared/sync-render.d.ts +36 -0
  70. package/build/exporter/adapters/gatsby/shared/types.d.ts +34 -0
  71. package/build/exporter/commands/start-render.d.ts +2 -0
  72. package/build/exporter/commands/upload-search-content.d.ts +2 -0
  73. package/build/{constants → exporter/constants}/envs.d.ts +1 -7
  74. package/build/{errors/errors-data.d.ts → exporter/constants/errors.d.ts} +5 -3
  75. package/build/{services → exporter/services}/auth.d.ts +1 -1
  76. package/build/exporter/services/db.d.ts +4 -0
  77. package/build/{services → exporter/services}/robots.d.ts +0 -6
  78. package/build/{services → exporter/services}/sites.d.ts +5 -2
  79. package/build/exporter/services/store.d.ts +15 -0
  80. package/build/{types → exporter/types}/api.d.ts +3 -4
  81. package/build/{types → exporter/types}/global.d.ts +6 -6
  82. package/build/{types → exporter/types}/navigation.d.ts +1 -1
  83. package/build/exporter/types/render.d.ts +50 -0
  84. package/build/{types → exporter/types}/sites.d.ts +1 -2
  85. package/build/exporter/utils/artifacts.d.ts +6 -0
  86. package/build/exporter/utils/brush.d.ts +18 -0
  87. package/build/{utils → exporter/utils}/cache.d.ts +7 -12
  88. package/build/{utils/health-checks.d.ts → exporter/utils/check-health.d.ts} +2 -2
  89. package/build/exporter/utils/core-utils.d.ts +77 -0
  90. package/build/{utils → exporter/utils}/domains.d.ts +1 -1
  91. package/build/{errors/index.d.ts → exporter/utils/errors.d.ts} +3 -3
  92. package/build/exporter/utils/folders.d.ts +66 -0
  93. package/build/{utils → exporter/utils}/loggin.d.ts +2 -16
  94. package/build/{utils → exporter/utils}/pages.d.ts +2 -2
  95. package/build/exporter/utils/render.d.ts +49 -0
  96. package/build/{utils → exporter/utils}/sites.d.ts +3 -3
  97. package/build/{utils → exporter/utils}/store.d.ts +10 -38
  98. package/build/services/auth.js +39 -0
  99. package/build/services/auth.js.map +1 -0
  100. package/build/services/db.js +34 -0
  101. package/build/services/db.js.map +1 -0
  102. package/build/services/navigation.js +93 -0
  103. package/build/services/navigation.js.map +1 -0
  104. package/build/services/reference-fields.js +131 -0
  105. package/build/services/reference-fields.js.map +1 -0
  106. package/build/services/robots.js +58 -0
  107. package/build/services/robots.js.map +1 -0
  108. package/build/services/sites.js +109 -0
  109. package/build/services/sites.js.map +1 -0
  110. package/build/services/store.js +282 -0
  111. package/build/services/store.js.map +1 -0
  112. package/build/types/api.js +3 -0
  113. package/build/types/api.js.map +1 -0
  114. package/build/types/global.js +3 -0
  115. package/build/types/global.js.map +1 -0
  116. package/build/types/navigation.js +3 -0
  117. package/build/types/navigation.js.map +1 -0
  118. package/build/types/pages.js +3 -0
  119. package/build/types/pages.js.map +1 -0
  120. package/build/types/render.js +10 -0
  121. package/build/types/render.js.map +1 -0
  122. package/build/types/sites.js +3 -0
  123. package/build/types/sites.js.map +1 -0
  124. package/build/types/templates.js +3 -0
  125. package/build/types/templates.js.map +1 -0
  126. package/build/utils/api.js +161 -0
  127. package/build/utils/api.js.map +1 -0
  128. package/build/utils/artifacts.js +34 -0
  129. package/build/utils/artifacts.js.map +1 -0
  130. package/build/utils/brush.js +30 -0
  131. package/build/utils/brush.js.map +1 -0
  132. package/build/utils/cache.js +106 -0
  133. package/build/utils/cache.js.map +1 -0
  134. package/build/utils/check-health.js +68 -0
  135. package/build/utils/check-health.js.map +1 -0
  136. package/build/utils/core-utils.js +251 -0
  137. package/build/utils/core-utils.js.map +1 -0
  138. package/build/utils/domains.js +37 -0
  139. package/build/utils/domains.js.map +1 -0
  140. package/build/utils/errors.js +30 -0
  141. package/build/utils/errors.js.map +1 -0
  142. package/build/utils/folders.js +339 -0
  143. package/build/utils/folders.js.map +1 -0
  144. package/build/utils/images.js +45 -0
  145. package/build/utils/images.js.map +1 -0
  146. package/build/utils/instance.js +66 -0
  147. package/build/utils/instance.js.map +1 -0
  148. package/build/utils/loggin.js +102 -0
  149. package/build/utils/loggin.js.map +1 -0
  150. package/build/utils/pages.js +359 -0
  151. package/build/utils/pages.js.map +1 -0
  152. package/build/utils/render.js +144 -0
  153. package/build/utils/render.js.map +1 -0
  154. package/build/utils/sites.js +239 -0
  155. package/build/utils/sites.js.map +1 -0
  156. package/build/utils/store.js +193 -0
  157. package/build/utils/store.js.map +1 -0
  158. package/exporter/adapters/gatsby/actions/clean.ts +14 -0
  159. package/exporter/adapters/gatsby/actions/close.ts +17 -0
  160. package/exporter/adapters/gatsby/actions/data.ts +25 -0
  161. package/exporter/adapters/gatsby/actions/healthCheck.ts +10 -0
  162. package/exporter/adapters/gatsby/actions/init.ts +12 -0
  163. package/exporter/adapters/gatsby/actions/meta.ts +18 -0
  164. package/exporter/adapters/gatsby/actions/prepare.ts +9 -0
  165. package/exporter/adapters/gatsby/actions/relocation.ts +15 -0
  166. package/exporter/adapters/gatsby/actions/restore.ts +36 -0
  167. package/exporter/adapters/gatsby/actions/ssg.ts +12 -0
  168. package/exporter/adapters/gatsby/actions/sync.ts +70 -0
  169. package/exporter/adapters/gatsby/index.ts +60 -146
  170. package/exporter/adapters/gatsby/shared/context.ts +50 -0
  171. package/exporter/adapters/gatsby/shared/extract-assets.ts +61 -0
  172. package/exporter/adapters/gatsby/shared/gatsby-build.ts +54 -0
  173. package/exporter/adapters/gatsby/shared/sync-render.ts +294 -0
  174. package/exporter/adapters/gatsby/shared/types.ts +35 -0
  175. package/exporter/build-esbuild.noop +42 -0
  176. package/exporter/build.sh +5 -38
  177. package/exporter/commands/end-render.ts +56 -81
  178. package/exporter/commands/prepare-assets-directory.ts +33 -0
  179. package/exporter/commands/prepare-domains-render.ts +149 -31
  180. package/exporter/commands/reset-render.ts +12 -3
  181. package/exporter/commands/start-render.ts +18 -47
  182. package/exporter/commands/upload-search-content.ts +206 -21
  183. package/exporter/constants/envs.ts +59 -51
  184. package/exporter/{errors/errors-data.ts → constants/errors.ts} +24 -15
  185. package/exporter/services/auth.ts +7 -6
  186. package/exporter/services/db.ts +32 -0
  187. package/exporter/services/navigation.ts +4 -10
  188. package/exporter/services/reference-fields.ts +8 -23
  189. package/exporter/services/robots.ts +8 -15
  190. package/exporter/services/sites.ts +35 -24
  191. package/exporter/services/store.ts +118 -76
  192. package/exporter/types/api.ts +24 -27
  193. package/exporter/types/global.ts +8 -10
  194. package/exporter/types/navigation.ts +1 -1
  195. package/exporter/types/pages.ts +2 -3
  196. package/exporter/types/render.ts +59 -0
  197. package/exporter/types/sites.ts +1 -2
  198. package/exporter/utils/api.ts +46 -82
  199. package/exporter/{artifacts/index.ts → utils/artifacts.ts} +9 -8
  200. package/exporter/utils/brush.ts +34 -0
  201. package/exporter/utils/cache.ts +34 -59
  202. package/exporter/utils/check-health.ts +79 -0
  203. package/exporter/utils/core-utils.ts +86 -247
  204. package/exporter/utils/domains.ts +10 -7
  205. package/exporter/{errors/index.ts → utils/errors.ts} +10 -9
  206. package/exporter/utils/folders.ts +161 -92
  207. package/exporter/utils/images.ts +1 -6
  208. package/exporter/utils/instance.ts +9 -12
  209. package/exporter/utils/loggin.ts +24 -89
  210. package/exporter/utils/pages.ts +23 -88
  211. package/exporter/utils/render.ts +147 -48
  212. package/exporter/utils/sites.ts +67 -77
  213. package/exporter/utils/store.ts +85 -178
  214. package/gatsby-browser.tsx +41 -58
  215. package/gatsby-config.ts +6 -12
  216. package/gatsby-node.ts +30 -89
  217. package/gatsby-ssr.tsx +2 -1
  218. package/package.json +32 -73
  219. package/plugins/gatsby-plugin-svgr-loader/gatsby-node.js +55 -0
  220. package/plugins/gatsby-plugin-svgr-loader/package.json +8 -0
  221. package/{exporter/react → react}/Favicon/index.tsx +1 -7
  222. package/{exporter/react → react}/GriddoIntegrations/index.tsx +6 -14
  223. package/{exporter/react → react}/GriddoIntegrations/utils.ts +4 -9
  224. package/{build/react/index.d.ts → react/index.tsx} +1 -0
  225. package/src/components/Head.tsx +13 -46
  226. package/src/components/template.tsx +8 -30
  227. package/src/gatsby-node-utils.ts +91 -2
  228. package/src/html.tsx +2 -11
  229. package/src/types.ts +5 -5
  230. package/start-render.js +1 -3
  231. package/tsconfig.json +3 -2
  232. package/build/adapters/gatsby/index.d.ts +0 -4
  233. package/build/adapters/gatsby/utils.d.ts +0 -22
  234. package/build/artifacts/index.d.ts +0 -6
  235. package/build/commands/move-assets.d.ts +0 -1
  236. package/build/commands/prepare-domains-render.d.ts +0 -1
  237. package/build/constants/index.d.ts +0 -57
  238. package/build/end-render.js +0 -74
  239. package/build/end-render.js.map +0 -7
  240. package/build/index.d.ts +0 -29
  241. package/build/index.js +0 -73
  242. package/build/index.js.map +0 -7
  243. package/build/prepare-domains-render.js +0 -73
  244. package/build/prepare-domains-render.js.map +0 -7
  245. package/build/react/Favicon/index.d.ts +0 -5
  246. package/build/react/Favicon/utils.d.ts +0 -9
  247. package/build/react/GriddoIntegrations/index.d.ts +0 -20
  248. package/build/react/GriddoIntegrations/utils.d.ts +0 -26
  249. package/build/react/index.js +0 -3
  250. package/build/registers/api.d.ts +0 -9
  251. package/build/registers/gatsby.d.ts +0 -9
  252. package/build/registers/index.d.ts +0 -3
  253. package/build/reset-render.js +0 -74
  254. package/build/reset-render.js.map +0 -7
  255. package/build/services/domains.d.ts +0 -6
  256. package/build/services/register.d.ts +0 -36
  257. package/build/services/settings.d.ts +0 -4
  258. package/build/services/store.d.ts +0 -6
  259. package/build/start-render.js +0 -100
  260. package/build/start-render.js.map +0 -7
  261. package/build/upload-search-content.js +0 -74
  262. package/build/upload-search-content.js.map +0 -7
  263. package/build/utils/alerts.d.ts +0 -3
  264. package/build/utils/core-utils.d.ts +0 -107
  265. package/build/utils/create-build-data.d.ts +0 -8
  266. package/build/utils/folders.d.ts +0 -53
  267. package/build/utils/render.d.ts +0 -13
  268. package/build/utils/searches.d.ts +0 -15
  269. package/cx.config.d.ts +0 -5
  270. package/cx.config.js +0 -36
  271. package/exporter/adapters/gatsby/utils.ts +0 -161
  272. package/exporter/artifacts/README.md +0 -34
  273. package/exporter/commands/move-assets.ts +0 -11
  274. package/exporter/constants/index.ts +0 -129
  275. package/exporter/index.ts +0 -82
  276. package/exporter/react/index.tsx +0 -11
  277. package/exporter/registers/api.ts +0 -14
  278. package/exporter/registers/gatsby.ts +0 -14
  279. package/exporter/registers/index.ts +0 -4
  280. package/exporter/services/domains.ts +0 -16
  281. package/exporter/services/register.ts +0 -113
  282. package/exporter/services/settings.ts +0 -17
  283. package/exporter/utils/alerts.ts +0 -29
  284. package/exporter/utils/create-build-data.ts +0 -17
  285. package/exporter/utils/health-checks.ts +0 -64
  286. package/exporter/utils/searches.ts +0 -179
  287. package/src/README.md +0 -7
  288. package/build/{commands → exporter/commands}/end-render.d.ts +0 -0
  289. package/build/{commands/reset-render.d.ts → exporter/commands/prepare-assets-directory.d.ts} +0 -0
  290. package/build/{commands/start-render.d.ts → exporter/commands/prepare-domains-render.d.ts} +0 -0
  291. package/build/{commands/upload-search-content.d.ts → exporter/commands/reset-render.d.ts} +0 -0
  292. package/build/{constants → exporter/constants}/endpoints.d.ts +0 -0
  293. package/build/{services → exporter/services}/navigation.d.ts +0 -0
  294. package/build/{services → exporter/services}/reference-fields.d.ts +0 -0
  295. package/build/{types → exporter/types}/pages.d.ts +1 -1
  296. /package/build/{types → exporter/types}/templates.d.ts +0 -0
  297. /package/build/{utils → exporter/utils}/api.d.ts +0 -0
  298. /package/build/{utils → exporter/utils}/images.d.ts +0 -0
  299. /package/build/{utils → exporter/utils}/instance.d.ts +0 -0
  300. /package/{exporter/react → react}/Favicon/utils.ts +0 -0
@@ -0,0 +1,34 @@
1
+ interface SSG {
2
+ assetPrefix: string;
3
+ ssgArtifacts: {
4
+ disposables: string[];
5
+ cacheables: string[];
6
+ };
7
+ }
8
+ interface GatsbyPageData {
9
+ path: string;
10
+ result: {
11
+ pageContext: {
12
+ id: number;
13
+ title: string;
14
+ path: string;
15
+ openGraph: any;
16
+ pageMetadata: any;
17
+ page: {
18
+ site: number;
19
+ id: number;
20
+ fullPath: {
21
+ compose: string;
22
+ };
23
+ language: number;
24
+ title: string;
25
+ fullUrl: string;
26
+ templateId: string;
27
+ template: {
28
+ templateType: string;
29
+ };
30
+ };
31
+ };
32
+ };
33
+ }
34
+ export type { GatsbyPageData, SSG };
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -1,6 +1,3 @@
1
- /**
2
- * Here are all the environment variables that the CX code uses.
3
- */
4
1
  declare const GRIDDO_API_URL: string | undefined;
5
2
  declare const GRIDDO_PUBLIC_API_URL: string | undefined;
6
3
  declare const GRIDDO_BOT_USER: string | undefined;
@@ -19,9 +16,6 @@ declare const GRIDDO_ASSET_PREFIX: string | undefined;
19
16
  declare const GRIDDO_REACT_APP_INSTANCE: string | undefined;
20
17
  declare const GRIDDO_AI_EMBEDDINGS: boolean;
21
18
  declare const GRIDDO_VERBOSE_LOGS: boolean;
22
- declare const GRIDDO_ALERT_FEATURE: boolean;
23
- declare const GRIDDO_API_MAX_RESPONSE_SIZE: number;
24
- declare const GRIDDO_SSG_MAX_PAGE_SIZE: number;
25
19
  declare const GRIDDO_INIT_LIFECYCLE_MAX_ATTEMPTS: number;
26
20
  declare const GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS: number;
27
21
  declare const GRIDDO_CLOSE_LIFECYCLE_MAX_ATTEMPTS: number;
@@ -34,4 +28,4 @@ declare const GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS: number;
34
28
  declare const GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS: number;
35
29
  declare const GRIDDO_FIXTURES_DOMAIN_NAMES: string | undefined;
36
30
  declare const GRIDDO_FIXTURES_SITE_NAMES: string | undefined;
37
- export { GRIDDO_AI_EMBEDDINGS, GRIDDO_ALERT_FEATURE, GRIDDO_API_CONCURRENCY_COUNT, GRIDDO_API_MAX_RESPONSE_SIZE, GRIDDO_API_URL, GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS, GRIDDO_ASSET_PREFIX, GRIDDO_BOT_PASSWORD, GRIDDO_BOT_USER, GRIDDO_BUILD_LOGS, GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS, GRIDDO_CLOSE_LIFECYCLE_MAX_ATTEMPTS, GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS, GRIDDO_DEBUG_LOGS, GRIDDO_FIXTURES_DOMAIN_NAMES, GRIDDO_FIXTURES_SITE_NAMES, GRIDDO_INIT_LIFECYCLE_MAX_ATTEMPTS, GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS, GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS, GRIDDO_PUBLIC_API_URL, GRIDDO_REACT_APP_INSTANCE, GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS, GRIDDO_RENDER_ALL_SITES, GRIDDO_RENDER_BREAKPOINTS_FEATURE, GRIDDO_RENDER_PAGES, GRIDDO_RENDER_SITE, GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS, GRIDDO_SEARCH_FEATURE, GRIDDO_SKIP_BUILD_CHECKS, GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS, GRIDDO_SSG_MAX_PAGE_SIZE, GRIDDO_SSG_VERBOSE_LOGS, GRIDDO_VERBOSE_LOGS, };
31
+ export { GRIDDO_AI_EMBEDDINGS, GRIDDO_API_CONCURRENCY_COUNT, GRIDDO_API_URL, GRIDDO_ARCHIVE_LIFECYCLE_MAX_ATTEMPTS, GRIDDO_ASSET_PREFIX, GRIDDO_BOT_PASSWORD, GRIDDO_BOT_USER, GRIDDO_BUILD_LOGS, GRIDDO_CLEAN_LIFECYCLE_MAX_ATTEMPTS, GRIDDO_CLOSE_LIFECYCLE_MAX_ATTEMPTS, GRIDDO_DATA_LIFECYCLE_MAX_ATTEMPTS, GRIDDO_DEBUG_LOGS, GRIDDO_FIXTURES_DOMAIN_NAMES, GRIDDO_FIXTURES_SITE_NAMES, GRIDDO_INIT_LIFECYCLE_MAX_ATTEMPTS, GRIDDO_META_LIFECYCLE_MAX_ATTEMPTS, GRIDDO_PREPARE_LIFECYCLE_MAX_ATTEMPTS, GRIDDO_PUBLIC_API_URL, GRIDDO_REACT_APP_INSTANCE, GRIDDO_RELOCATION_LIFECYCLE_MAX_ATTEMPTS, GRIDDO_RENDER_ALL_SITES, GRIDDO_RENDER_BREAKPOINTS_FEATURE, GRIDDO_RENDER_PAGES, GRIDDO_RENDER_SITE, GRIDDO_RESTORE_LIFECYCLE_MAX_ATTEMPTS, GRIDDO_SEARCH_FEATURE, GRIDDO_SKIP_BUILD_CHECKS, GRIDDO_SSG_LIFECYCLE_MAX_ATTEMPTS, GRIDDO_SSG_VERBOSE_LOGS, GRIDDO_VERBOSE_LOGS, };
@@ -6,9 +6,9 @@
6
6
  * file by completing the `error` (ErrosType) and `message` (string) properties
7
7
  * obligatorily.
8
8
  */
9
- import type { ErrorData } from ".";
10
9
  import type { SpawnSyncReturns } from "node:child_process";
11
- type ErrorsType = "ArtifactError" | "ErrorInSSGBuildProcess" | "LifecycleExecutionError" | "LoginError" | "NoDomainsFoundError" | "NoJSConfigFileFound" | "ReadFromStoreError" | "ReferenceFieldSourcesNotFoundError" | "RenderUUIDError" | "WriteToStoreError";
10
+ import type { ErrorData } from "../utils/errors";
11
+ type ErrorsType = "UploadSearchError" | "ArtifactError" | "ErrorInSSGBuildProcess" | "LifecycleExecutionError" | "LoginError" | "NoDomainsFoundError" | "NoJSConfigFileFound" | "ReadFromStoreError" | "ReferenceFieldSourcesNotFoundError" | "RenderUUIDError" | "WriteToStoreError" | "CheckHealthError";
12
12
  declare const ArtifactError: ErrorData;
13
13
  declare const ErrorInSSGBuildProcess: (command: SpawnSyncReturns<string>) => ErrorData;
14
14
  declare const LifecycleExecutionError: (attempts: number, name: string) => ErrorData;
@@ -19,4 +19,6 @@ declare const ReadFromStoreError: ErrorData;
19
19
  declare const ReferenceFieldSourcesNotFoundError: ErrorData;
20
20
  declare const RenderUUIDError: ErrorData;
21
21
  declare const WriteToStoreError: ErrorData;
22
- export { ArtifactError, ErrorInSSGBuildProcess, LifecycleExecutionError, LoginError, NoDomainsFoundError, NoJSConfigFileFound, ReadFromStoreError, ReferenceFieldSourcesNotFoundError, RenderUUIDError, WriteToStoreError, type ErrorsType, };
22
+ declare const UploadSearchError: ErrorData;
23
+ declare const CheckHealthError: ErrorData;
24
+ export { ArtifactError, ErrorInSSGBuildProcess, LifecycleExecutionError, LoginError, NoDomainsFoundError, NoJSConfigFileFound, ReadFromStoreError, ReferenceFieldSourcesNotFoundError, RenderUUIDError, UploadSearchError, WriteToStoreError, CheckHealthError, type ErrorsType, };
@@ -4,7 +4,7 @@ import type { AuthHeaders } from "../types/api";
4
4
  */
5
5
  declare class AuthService {
6
6
  headers: AuthHeaders | undefined;
7
- login(): Promise<AuthHeaders | undefined>;
7
+ login(): Promise<AuthHeaders>;
8
8
  }
9
9
  declare const authService: AuthService;
10
10
  export { authService as AuthService };
@@ -0,0 +1,4 @@
1
+ import type { RenderDB } from "../types/render";
2
+ declare function readDB(customDBPath?: string): Promise<RenderDB>;
3
+ declare function writeDB(renderDB: RenderDB, customDBPath?: string): Promise<void>;
4
+ export { readDB, writeDB };
@@ -1,14 +1,8 @@
1
1
  import type { Robots } from "../types/global";
2
- /**
3
- * TODO: JSDoc
4
- */
5
2
  declare class RobotsService {
6
3
  robots: Robots;
7
4
  settings: Record<string, unknown>;
8
5
  constructor();
9
- /**
10
- * TODO: JSDoc
11
- */
12
6
  private getRobots;
13
7
  /**
14
8
  * Write robots.txt files for the domain.
@@ -1,6 +1,6 @@
1
+ import type { Core } from "@griddo/core";
1
2
  import type { AllSitesReponse, EndPageInfoResponse, EndSiteRenderBody, LanguagesResponse, ReferenceFieldBody, ReferenceFieldResponse, SitemapAPIResponse, SocialsResponse, StartPageRenderResponse } from "../types/api";
2
3
  import type { Site } from "../types/sites";
3
- import type { Core } from "@griddo/core";
4
4
  /**
5
5
  * Get a list of site objects.
6
6
  */
@@ -24,6 +24,9 @@ declare function startSiteRender(id: number): Promise<StartPageRenderResponse>;
24
24
  */
25
25
  declare function endSiteRender(id: number, body: EndSiteRenderBody): Promise<EndPageInfoResponse>;
26
26
  declare function getReferenceFieldSiteData(page: Core.Page, body: ReferenceFieldBody, cacheKey: string, dataSiteId?: number, dataLangID?: number): Promise<ReferenceFieldResponse>;
27
- declare function getSitemap(id: number): Promise<SitemapAPIResponse>;
27
+ declare function getSitemap(options: {
28
+ siteId: number;
29
+ headers?: Record<string, string>;
30
+ }): Promise<SitemapAPIResponse>;
28
31
  declare function getSiteSocials(id: number, cacheKey?: string): Promise<SocialsResponse>;
29
32
  export { endSiteRender, getAllSites, getAllSitesFromDomain, getPage, getReferenceFieldSiteData, getSiteInfo, getSiteLanguages, getSitemap, getSiteSocials, startSiteRender, };
@@ -0,0 +1,15 @@
1
+ import type { RenderMode } from "../types/render";
2
+ /**
3
+ * Fetch, process and save object pages and sites data into the file system to
4
+ * be consumed by other services (Griddo itself, Adapters, etc.)
5
+ */
6
+ declare function createStore(options: {
7
+ domain: string;
8
+ renderMode: RenderMode;
9
+ griddoVersion: string;
10
+ basePath: string;
11
+ }): Promise<{
12
+ pagesToCreate: number[];
13
+ pagesToDelete: number[];
14
+ }>;
15
+ export { createStore };
@@ -1,7 +1,7 @@
1
+ import type { Core, Fields } from "@griddo/core";
1
2
  import type { Domains, Robots, Settings } from "./global";
2
3
  import type { APIPageObject } from "./pages";
3
4
  import type { Site } from "./sites";
4
- import type { Core, Fields } from "@griddo/core";
5
5
  /** EndSiteRender Body */
6
6
  export type EndSiteRenderBody = {
7
7
  /** Site hashes to publish. */
@@ -25,6 +25,7 @@ export interface ReferenceFieldBody {
25
25
  fixed?: Array<number>;
26
26
  referenceId?: number;
27
27
  }
28
+ /** Describes the props of the body object for the get page */
28
29
  /** Describes an item in a sitemap. */
29
30
  interface SitemapItem {
30
31
  /** The URL of the page. */
@@ -84,10 +85,8 @@ export interface APIRequest {
84
85
  attempt?: number;
85
86
  /**
86
87
  * Headers for the post api fetch
87
- * @shame any
88
- * @todo type this correctly from axios types
89
88
  */
90
- headers?: any;
89
+ headers?: Record<string, unknown>;
91
90
  useApiCacheDir?: boolean;
92
91
  }
93
92
  /** Type with the POST request properties. */
@@ -1,6 +1,6 @@
1
+ import type { Core, Fields } from "@griddo/core";
1
2
  import type { EndSiteRenderBody } from "./api";
2
3
  import type { Site } from "./sites";
3
- import type { Core, Fields } from "@griddo/core";
4
4
  interface Settings {
5
5
  apiVersion?: string;
6
6
  avoidCanonicalsOnSitemaps?: boolean;
@@ -62,14 +62,13 @@ interface RenderInfo {
62
62
  createdPages: Array<number>;
63
63
  sitesToPublish: Array<Site>;
64
64
  }
65
- type LifeCycleSteps = Array<(...args: Array<unknown>) => unknown | Promise<unknown>>;
66
- type LifeCyclesNames = "Init" | "Prepare" | "Restore" | "Data" | "SSG" | "Relocation" | "Meta" | "Archive" | "Clean" | "Close" | "HealthCheck" | "Close" | "__DEBUG__";
67
- type PlaceholderPath = "__exports" | "__cache" | "__cx" | "__ssg" | "__components" | "__root" | "__exports_dist" | "__cx_dist";
65
+ type LifeCycleAction = (...args: Array<unknown>) => void | Promise<void>;
66
+ type LifeCyclesNames = "Init" | "Prepare" | "Restore" | "Data" | "SSG" | "Relocation" | "Meta" | "Sync" | "Clean" | "Close" | "HealthCheck" | "Close";
67
+ type PlaceholderPath = "__exports" | "__cache" | "__cx" | "__ssg" | "__components" | "__root" | "__exports_dist" | "__cx_dist" | "__sites";
68
68
  interface CXConfig {
69
69
  proDomain: string;
70
70
  griddoVersion: string;
71
71
  buildReportFileName: string;
72
- paths: (domain?: string) => Record<PlaceholderPath, string>;
73
72
  }
74
73
  interface AIEmbeddingsResponse {
75
74
  code: number;
@@ -80,5 +79,6 @@ interface Artifacts {
80
79
  cacheables: Array<string>;
81
80
  initials: Array<string>;
82
81
  archivables: Array<string>;
82
+ restaurable: Array<string>;
83
83
  }
84
- export type { AIEmbeddingsResponse, Artifacts, BuildProcessData, CXConfig, Domain, Domains, FetchDataProps, LifeCyclesNames, Petition, PlaceholderPath, PostSearchInfoProps, RenderInfo, Robot, Robots, Settings, LifeCycleSteps, };
84
+ export type { AIEmbeddingsResponse, Artifacts, BuildProcessData, CXConfig, Domain, Domains, FetchDataProps, LifeCyclesNames, Petition, PlaceholderPath, PostSearchInfoProps, RenderInfo, Robot, Robots, Settings, LifeCycleAction, };
@@ -24,5 +24,5 @@ export type Footer = {
24
24
  setAsDefault: boolean;
25
25
  theme: null | string;
26
26
  title: string;
27
- type: "header";
27
+ type: "footer";
28
28
  };
@@ -0,0 +1,50 @@
1
+ import type { RenderInfo } from "./global";
2
+ declare const RENDER_MODE: {
3
+ readonly FROM_SCRATCH: "FROM_SCRATCH";
4
+ readonly INCREMENTAL: "INCREMENTAL";
5
+ readonly IDLE: "IDLE";
6
+ };
7
+ type RenderMode = (typeof RENDER_MODE)[keyof typeof RENDER_MODE];
8
+ export interface RenderModeTuple {
9
+ renderMode: RenderMode;
10
+ reason?: string;
11
+ }
12
+ type DomainLike = string;
13
+ type RenderDB = {
14
+ proDomain: string;
15
+ griddoVersion: string;
16
+ buildReportFileName: string;
17
+ sortedDomains: Array<DomainLike>;
18
+ paths: {
19
+ root: string;
20
+ cx: string;
21
+ ssg: string;
22
+ cxCache: string;
23
+ components: string;
24
+ exportsDir: string;
25
+ };
26
+ domains: {
27
+ [key: DomainLike]: {
28
+ renderMode?: RenderMode;
29
+ shouldBeRendered?: boolean;
30
+ isRendering?: boolean;
31
+ renderInfo?: RenderInfo;
32
+ renderModeReason?: string;
33
+ };
34
+ };
35
+ };
36
+ interface Report {
37
+ authControl: {
38
+ Authorization: string;
39
+ "Cache-Control": string;
40
+ lang?: string | undefined;
41
+ } | undefined;
42
+ sites: Array<{
43
+ siteId: number;
44
+ publishHashes: Array<string>;
45
+ siteHash: string | null;
46
+ unpublishHashes: Array<string>;
47
+ publishPagesIds: Array<number>;
48
+ }>;
49
+ }
50
+ export { RENDER_MODE, type RenderDB, type RenderMode, type Report };
@@ -1,6 +1,6 @@
1
+ import type { Core } from "@griddo/core";
1
2
  import type { SocialsResponse } from "./api";
2
3
  import type { Footer, Header } from "./navigation";
3
- import type { Core } from "@griddo/core";
4
4
  /**
5
5
  * Describes a Griddo site object from API.
6
6
  * This takes some type props from Core.Site.
@@ -26,7 +26,6 @@ export interface Site extends Required<Pick<Core.Site, "bigAvatar" | "favicon" |
26
26
  */
27
27
  pages: Array<number>;
28
28
  onlinePages: Array<number>;
29
- changedPages: Array<number>;
30
29
  published: string;
31
30
  rendering: boolean;
32
31
  renderingHours: number;
@@ -0,0 +1,6 @@
1
+ import type { Artifacts } from "../types/global";
2
+ /**
3
+ * Returns the artifacts of CX.
4
+ */
5
+ declare function getCxArtifacts(domain: string): Promise<Artifacts>;
6
+ export { getCxArtifacts };
@@ -0,0 +1,18 @@
1
+ declare const CODES: {
2
+ readonly black: "\u001B[30m";
3
+ readonly red: "\u001B[31m";
4
+ readonly green: "\u001B[32m";
5
+ readonly yellow: "\u001B[33m";
6
+ readonly blue: "\u001B[34m";
7
+ readonly magenta: "\u001B[35m";
8
+ readonly cyan: "\u001B[36m";
9
+ readonly white: "\u001B[37m";
10
+ readonly gray: "\u001B[90m";
11
+ readonly bold: "\u001B[1m";
12
+ readonly dim: "\u001B[2m";
13
+ };
14
+ type ColorFunction = (text: string | number) => string;
15
+ type ColorName = keyof typeof CODES;
16
+ type Brush = Record<ColorName, ColorFunction>;
17
+ declare const brush: Brush;
18
+ export { brush };
@@ -3,33 +3,28 @@ import type { SiteHash } from "../types/sites";
3
3
  /**
4
4
  * Creates an `apiCache` dir to store pages fetched from them API.
5
5
  */
6
- declare function createAPICacheDir(): void;
7
- /**
8
- * Generate a filename with a hash using a string.
9
- *
10
- * @todo Merge with generateFilenameWithHash
11
- * @param data A string to create a sha256 based on.
12
- */
13
- declare function createSha256(data: string): string;
6
+ declare function createAPICacheDir(options: {
7
+ basePath: string;
8
+ }): Promise<void>;
14
9
  /**
15
10
  * Save a file using a hash name.
16
11
  *
17
12
  * @param petition An object.
18
13
  * @param content Content to be saved.
19
14
  */
20
- declare function saveCache<T>(petition: Petition, content: T): void;
15
+ declare function saveCache<T>(petition: Petition, content: T): Promise<void>;
21
16
  /**
22
17
  * Search in the `apiCache` dir for a file using the petition as hash generator.
23
18
  * Return the file content if found or null if not.
24
19
  *
25
20
  * @param petition An object
26
21
  */
27
- declare function searchCacheData<T>(petition: Petition): T | null;
22
+ declare function searchCacheData<T>(petition: Petition): Promise<T | null>;
28
23
  /**
29
24
  * Update (write) the site hash file.
30
25
  *
31
26
  * @param siteId The id of the site.
32
27
  * @param siteHash The has of the site.
33
28
  */
34
- declare function updatedSiteHash(siteId: number, siteHash: SiteHash): string;
35
- export { createAPICacheDir, createSha256, saveCache, searchCacheData, updatedSiteHash, };
29
+ declare function updatedSiteHash(siteId: number, siteHash: SiteHash): Promise<string>;
30
+ export { createAPICacheDir, saveCache, searchCacheData, updatedSiteHash };
@@ -1,7 +1,7 @@
1
+ #!/usr/bin/env node
1
2
  /**
2
3
  * Check if the environment is secure to launch a render.
3
4
  * If something fails then log an error message and exit from the process.
4
5
  * Otherwise just return true.
5
6
  */
6
- declare function checkRenderHealthOrExit(): boolean;
7
- export { checkRenderHealthOrExit };
7
+ export declare function checkHealth(): boolean;
@@ -0,0 +1,77 @@
1
+ import type { APIResponses } from "../types/api";
2
+ import type { LifeCycleAction, LifeCyclesNames } from "../types/global";
3
+ /**
4
+ * Returns true for "true", "on", true and positive numbers.
5
+ * Returns false for "false", "off", false, 0, negative integers and anything else.
6
+ */
7
+ declare function isTruthy(value: any): boolean;
8
+ /**
9
+ * Walk a directory and returns the JSON file absolute paths with one level of depth.
10
+ * /abs/.../sotre/<siteId>/jsonfile.json
11
+ * /abs/.../sotre/<siteId>/jsonfile.json
12
+ * /abs/.../sotre/<siteId>/jsonfile.json
13
+ * /abs/.../sotre/<siteId>/jsonfile.json
14
+ */
15
+ declare function walkStore(storeDir: string): AsyncGenerator<string>;
16
+ /**
17
+ * Custom delay using the "promise hack",
18
+ *
19
+ * @param ms Amount of miliseconds to be delayed
20
+ */
21
+ declare function delay(ms: number): Promise<unknown>;
22
+ /**
23
+ * Converts milliseconds to seconds with a fixed number of decimals.
24
+ *
25
+ * @param ms The number in milliseconds.
26
+ * @param fixed The amount of fixed decimals.
27
+ * @returns The converted number in seconds with the fixed number of decimals.
28
+ */
29
+ declare function msToSec(ms: number, decimals?: number): string;
30
+ /**
31
+ * Return a siteID from a response object if exist
32
+ * @param response A response object
33
+ */
34
+ declare function getSafeSiteId(response: APIResponses): number | undefined;
35
+ /**
36
+ * Remove props from an object
37
+ *
38
+ * @param obj The object
39
+ * @param props An array of props to be removed
40
+ */
41
+ declare function removeProperties(obj: Record<string, unknown>, props: Array<string>): void;
42
+ /**
43
+ * Measures the execution time of a series of sync or async functions.
44
+ *
45
+ * @async
46
+ * @param functions - Functions to be executed to measure their execution time.
47
+ * @returns A promise that resolves with the total execution time in seconds.
48
+ */
49
+ declare function executeAndReturnExecutionTime<T>(func: () => T | Promise<T>): Promise<number>;
50
+ /**
51
+ * Executes a life cycle process, which involves executing a callback
52
+ * function, printing to the console, and handling errors with optional retries.
53
+ *
54
+ * @async
55
+ * @param name - The name of the life cycle.
56
+ * @param action - A callback function to execute.
57
+ * @param options - Optional configuration for the life cycle process.
58
+ * @param options.maxRetrys - The maximum number of retries for the life cycle.
59
+ * @param options.enabled - Whether the life cycle process should be executed.
60
+ * @returns - A promise that resolves when the life cycle process is completed.
61
+ */
62
+ declare function doLifeCycle(name: string, action: LifeCycleAction, options?: {
63
+ maxRetrys?: number;
64
+ spinner?: boolean;
65
+ }): Promise<void>;
66
+ declare function removeAllSiteDirsFromStore(): Promise<void>;
67
+ /**
68
+ * Save render information to a file to use as debug log.
69
+ *
70
+ * This information will **not** be sent to any API.
71
+ */
72
+ declare function saveBuildEndLogs(options: {
73
+ basePath: string;
74
+ domain: string;
75
+ }): Promise<void>;
76
+ declare const lifeCycleNames: Record<LifeCyclesNames, LifeCyclesNames>;
77
+ export { delay, doLifeCycle, executeAndReturnExecutionTime, getSafeSiteId, isTruthy, lifeCycleNames, msToSec, removeAllSiteDirsFromStore, removeProperties, saveBuildEndLogs, walkStore, };
@@ -10,4 +10,4 @@ declare function getInstanceDomains(): Promise<string[]>;
10
10
  * @see Domains
11
11
  */
12
12
  declare function getDomainSlugs(domains: Domains): string[];
13
- export { getInstanceDomains, getDomainSlugs };
13
+ export { getDomainSlugs, getInstanceDomains };
@@ -1,4 +1,4 @@
1
- import type { ErrorsType } from "./errors-data";
1
+ import type { ErrorsType } from "../constants/errors";
2
2
  export type ErrorData = {
3
3
  error: ErrorsType;
4
4
  message: string;
@@ -6,10 +6,10 @@ export type ErrorData = {
6
6
  hint?: string;
7
7
  };
8
8
  export declare class RenderError extends Error {
9
- constructor();
9
+ constructor(originalError?: unknown);
10
10
  }
11
11
  /**
12
12
  * Throws an error with the provided error message, expected value, and hint.
13
13
  */
14
- declare function throwError(options: ErrorData, stack?: unknown): void;
14
+ declare function throwError(options: ErrorData, stack?: unknown): never;
15
15
  export { throwError };
@@ -0,0 +1,66 @@
1
+ import type { MakeDirectoryOptions } from "node:fs";
2
+ /**
3
+ * Remove an empty directory from the basePath recursively.
4
+ * If the directory has only .xml files it will handle as empty too (empty site)
5
+ *
6
+ * @param baseDir - The base directory.
7
+ */
8
+ declare function deleteDisposableSiteDirs(baseDir: string): Promise<void>;
9
+ /**
10
+ * Creates multiple artifact directories.
11
+ *
12
+ * @param dirs - An array of directory paths.
13
+ * @param options - Same option as `fs.mkdirSync()`
14
+ */
15
+ declare function createDirs(dirs: Array<string>, options?: MakeDirectoryOptions): Promise<void>;
16
+ declare function renamePath(src: string, dst: string): Promise<void>;
17
+ /**
18
+ * Copy multiple directories with backup option.
19
+ *
20
+ * @param src - Source directory.
21
+ * @param dst - Destination directory.
22
+ * @param dirs - Directories to copy.
23
+ * @param options.withBackup - Create a previous backup before copy.
24
+ */
25
+ declare function copyDirs(src: string, dst: string, dirs: Array<string>, options?: {
26
+ withBackup: boolean;
27
+ }): Promise<void>;
28
+ /**
29
+ * Move artifacts between cx-paths
30
+ *
31
+ * @param src - Source directory.
32
+ * @param dst - Destination directory.
33
+ * @param dirs - Directories to move.
34
+ * @param options - Options.
35
+ */
36
+ declare function moveDirs(src: string, dst: string, dirs: Array<string>, options?: {
37
+ withBackup?: boolean;
38
+ override?: boolean;
39
+ }): Promise<void>;
40
+ /**
41
+ * Removes multiple artifact directories.
42
+ *
43
+ * @param dirs - An array of directory paths.
44
+ */
45
+ declare function removeDirs(dirs: Array<string>): Promise<void>;
46
+ /**
47
+ * Elimina todas las páginas del store (de todos los sites) cuyo nombre empiece
48
+ * con un guión "-". Estas páginas son "virtuales" y no tienen ids desde API por
49
+ * lo que mantenerlas en el store es un problema cuando se hacen modificaciones
50
+ * en la página "madre". La solución por ahora es borrarlas del store y
51
+ * rehacerlas en todos los renders.
52
+ */
53
+ declare function removeVirtualPages(dirPath: string): Promise<void>;
54
+ declare function prependFileSync(filePath: string, content: string): Promise<void>;
55
+ /**
56
+ * Delete empty directories from the given directory in a recursive way.
57
+ */
58
+ declare function deleteEmptyDirectories(dirPath: string): Promise<void>;
59
+ declare function pathExists(dir: string): Promise<boolean>;
60
+ declare function pkgDir(options?: {
61
+ readonly cwd?: string;
62
+ }): Promise<string | undefined>;
63
+ declare function pkgDirSync(options?: {
64
+ readonly cwd?: string;
65
+ }): string | undefined;
66
+ export { copyDirs, createDirs, deleteDisposableSiteDirs, deleteEmptyDirectories, moveDirs, pathExists, pkgDir, pkgDirSync, prependFileSync, removeDirs, removeVirtualPages, renamePath, };
@@ -1,13 +1,11 @@
1
1
  import type { Site } from "../types/sites";
2
2
  /**
3
3
  * Custom basic logging function controlled by a environment variable.
4
- *
5
4
  * @param str The string to be logged.
6
5
  */
7
6
  declare function verboseLog(str: string): void;
8
7
  /**
9
8
  * Custom log inside a line-box.
10
- *
11
9
  * @param stringValue The string to be logged.
12
10
  * @param paddingInline The number of white spaces inside the box at left and right.
13
11
  * @param paddingBlock The number of white spaces inside the box at top and bottom.
@@ -30,22 +28,10 @@ declare function infoLog(str: string): void;
30
28
  * @param str The string to be logged.
31
29
  */
32
30
  declare function successLog(str: string): void;
33
- /**
34
- * Internal log
35
- * @param values The values to be logged.
36
- */
37
- declare function debugLog(...values: Array<unknown>): void;
38
- /**
39
- * Return a scale size colors with a number and a measure string (KB by default).
40
- *
41
- * @param size The page size in KB.
42
- * @param measure The measure string to be added in the log.
43
- */
44
- declare function pageSizeLog(size: number, measure?: string): string;
45
31
  /**
46
32
  * Console log the Griddo exporter version.
47
33
  */
48
- declare function showExporterVersion(): void;
34
+ declare function showExporterVersion(): Promise<void>;
49
35
  declare function listSitesLog(title: string, sites: Array<Site>): void;
50
36
  declare function errorLabelLog(msg: string): void;
51
- export { boxLog, buildLog, debugLog, errorLabelLog, infoLog, listSitesLog, pageSizeLog, showExporterVersion, successLog, verboseLog, };
37
+ export { boxLog, buildLog, errorLabelLog, infoLog, listSitesLog, showExporterVersion, successLog, verboseLog, };
@@ -1,6 +1,6 @@
1
+ import type { Fields } from "@griddo/core";
1
2
  import type { GriddoListPage, GriddoMultiPage, GriddoPageObject, GriddoSinglePage, MultiPageElements, PageAdditionalInfo } from "../types/pages";
2
3
  import type { TemplateWithReferenceField } from "../types/templates";
3
- import type { Fields } from "@griddo/core";
4
4
  /**
5
5
  * Create a single Griddo page object.
6
6
  *
@@ -11,7 +11,7 @@ declare function createGriddoSinglePage(page: GriddoSinglePage, additionalInfo:
11
11
  /**
12
12
  * Create multiples pages from one page as list paginated pages
13
13
  */
14
- declare function createGriddoListPages({ page, pages, isRoot, defaultLang, template, totalQueriedItems, }: GriddoListPage, additionalInfo: PageAdditionalInfo): Promise<GriddoPageObject[]>;
14
+ declare function createGriddoListPages({ page, pages, isRoot, defaultLang, template, totalQueriedItems }: GriddoListPage, additionalInfo: PageAdditionalInfo): Promise<GriddoPageObject[]>;
15
15
  /**
16
16
  * Create multiples pages from a MultiPage module
17
17
  *
@@ -0,0 +1,49 @@
1
+ import type { RenderModeTuple } from "../types/render";
2
+ /**
3
+ * Creates a sentinel file with the current date and time.
4
+ * This file is used to track later if node_modules/@griddo/cx was cleaned by a
5
+ * npm install coming from a deploy.
6
+ */
7
+ declare function markRenderAsStarted(options: {
8
+ domain: string;
9
+ basePath: string;
10
+ }): Promise<void>;
11
+ declare function markRenderAsCompleted(domain: string): Promise<void>;
12
+ declare function assertRenderIsValid(): Promise<void>;
13
+ declare function resolveDomainRenderMode(options: {
14
+ domain: string;
15
+ shouldBeRendered: boolean;
16
+ }): Promise<{
17
+ renderMode: "FROM_SCRATCH";
18
+ reason: string;
19
+ } | {
20
+ renderMode: "IDLE";
21
+ reason: string;
22
+ } | {
23
+ renderMode: "INCREMENTAL";
24
+ reason: string;
25
+ }>;
26
+ declare function updateCommitFile(options: {
27
+ basePath: string;
28
+ }): Promise<void>;
29
+ declare function getRenderMode(domain: string): Promise<RenderModeTuple>;
30
+ declare function getRenderPathsFromDB(options?: {
31
+ domain?: string;
32
+ dbFilePath?: string;
33
+ }): Promise<{
34
+ __root: string;
35
+ __cache: string;
36
+ __components: string;
37
+ __cx: string;
38
+ __sites: string;
39
+ __exports: string;
40
+ __ssg: string;
41
+ __exports_dist: string;
42
+ __cx_dist: string;
43
+ }>;
44
+ declare function getRenderMetadataFromDB(): Promise<{
45
+ proDomain: string;
46
+ griddoVersion: string;
47
+ buildReportFileName: string;
48
+ }>;
49
+ export { assertRenderIsValid, getRenderMetadataFromDB, getRenderMode, getRenderPathsFromDB, markRenderAsCompleted, markRenderAsStarted, resolveDomainRenderMode, updateCommitFile, };