@griddo/cx 11.7.12-rc.4 → 11.7.12
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/README.md +226 -27
- package/build/adapters/gatsby/index.d.ts +4 -0
- package/build/adapters/gatsby/utils.d.ts +22 -0
- package/build/artifacts/index.d.ts +6 -0
- package/build/commands/end-render.d.ts +2 -0
- package/build/commands/move-assets.d.ts +1 -0
- package/build/commands/prepare-domains-render.d.ts +1 -0
- package/build/commands/reset-render.d.ts +2 -0
- package/build/commands/start-render.d.ts +2 -0
- package/build/commands/upload-search-content.d.ts +2 -0
- package/build/constants/endpoints.d.ts +19 -0
- package/build/constants/envs.d.ts +37 -0
- package/build/constants/index.d.ts +57 -0
- package/build/end-render.js +74 -0
- package/build/end-render.js.map +7 -0
- package/build/errors/errors-data.d.ts +22 -0
- package/build/errors/index.d.ts +15 -0
- package/build/index.d.ts +29 -0
- package/build/index.js +73 -0
- package/build/index.js.map +7 -0
- package/build/prepare-domains-render.js +73 -0
- package/build/prepare-domains-render.js.map +7 -0
- package/build/react/Favicon/index.d.ts +5 -0
- package/build/react/Favicon/utils.d.ts +9 -0
- package/build/react/GriddoIntegrations/index.d.ts +20 -0
- package/build/react/GriddoIntegrations/utils.d.ts +26 -0
- package/{react/index.tsx → build/react/index.d.ts} +0 -1
- package/build/react/index.js +3 -0
- package/build/registers/api.d.ts +9 -0
- package/build/registers/gatsby.d.ts +9 -0
- package/build/registers/index.d.ts +3 -0
- package/build/reset-render.js +74 -0
- package/build/reset-render.js.map +7 -0
- package/build/services/auth.d.ts +10 -0
- package/build/services/domains.d.ts +6 -0
- package/build/services/navigation.d.ts +50 -0
- package/build/services/reference-fields.d.ts +20 -0
- package/build/services/register.d.ts +36 -0
- package/build/services/robots.d.ts +19 -0
- package/build/services/settings.d.ts +4 -0
- package/build/services/sites.d.ts +29 -0
- package/build/services/store.d.ts +6 -0
- package/build/start-render.js +100 -0
- package/build/start-render.js.map +7 -0
- package/build/types/api.d.ts +142 -0
- package/build/types/global.d.ts +84 -0
- package/build/types/navigation.d.ts +28 -0
- package/build/types/pages.d.ts +144 -0
- package/build/types/sites.d.ts +57 -0
- package/build/types/templates.d.ts +8 -0
- package/build/upload-search-content.js +74 -0
- package/build/upload-search-content.js.map +7 -0
- package/build/utils/alerts.d.ts +3 -0
- package/build/utils/api.d.ts +23 -0
- package/build/utils/cache.d.ts +35 -0
- package/build/utils/core-utils.d.ts +107 -0
- package/build/utils/create-build-data.d.ts +8 -0
- package/build/utils/domains.d.ts +13 -0
- package/build/utils/folders.d.ts +53 -0
- package/build/utils/health-checks.d.ts +7 -0
- package/build/utils/images.d.ts +16 -0
- package/build/utils/instance.d.ts +21 -0
- package/build/utils/loggin.d.ts +51 -0
- package/build/utils/pages.d.ts +34 -0
- package/build/utils/render.d.ts +13 -0
- package/build/utils/searches.d.ts +15 -0
- package/build/utils/sites.d.ts +31 -0
- package/build/utils/store.d.ts +81 -0
- package/cx.config.d.ts +5 -0
- package/cx.config.js +36 -0
- package/exporter/adapters/gatsby/index.ts +153 -73
- package/exporter/adapters/gatsby/utils.ts +161 -0
- package/exporter/artifacts/README.md +34 -0
- package/exporter/artifacts/index.ts +33 -0
- package/exporter/build.sh +38 -4
- package/exporter/commands/end-render.ts +70 -72
- package/exporter/commands/move-assets.ts +11 -0
- package/exporter/commands/prepare-domains-render.ts +31 -143
- package/exporter/commands/reset-render.ts +3 -10
- package/exporter/commands/start-render.ts +45 -22
- package/exporter/commands/upload-search-content.ts +21 -194
- package/exporter/constants/endpoints.ts +1 -2
- package/exporter/constants/envs.ts +55 -57
- package/exporter/constants/index.ts +129 -0
- package/exporter/{constants/errors.ts → errors/errors-data.ts} +14 -24
- package/exporter/{utils/errors.ts → errors/index.ts} +9 -10
- package/exporter/index.ts +82 -0
- package/{react → exporter/react}/Favicon/index.tsx +7 -1
- package/{react → exporter/react}/GriddoIntegrations/index.tsx +22 -16
- package/{react → exporter/react}/GriddoIntegrations/utils.ts +9 -21
- package/exporter/react/index.tsx +11 -0
- package/exporter/registers/api.ts +14 -0
- package/exporter/registers/gatsby.ts +14 -0
- package/exporter/registers/index.ts +4 -0
- package/exporter/services/auth.ts +6 -7
- package/exporter/services/domains.ts +16 -0
- package/exporter/services/navigation.ts +10 -4
- package/exporter/services/reference-fields.ts +24 -9
- package/exporter/services/register.ts +113 -0
- package/exporter/services/robots.ts +16 -9
- package/exporter/services/settings.ts +17 -0
- package/exporter/services/sites.ts +24 -36
- package/exporter/services/store.ts +96 -107
- package/exporter/types/api.ts +28 -27
- package/exporter/types/global.ts +11 -8
- package/exporter/types/navigation.ts +1 -1
- package/exporter/types/pages.ts +3 -2
- package/exporter/types/sites.ts +2 -1
- package/exporter/utils/alerts.ts +29 -0
- package/exporter/utils/api.ts +75 -55
- package/exporter/utils/cache.ts +62 -37
- package/exporter/utils/core-utils.ts +272 -133
- package/exporter/utils/create-build-data.ts +17 -0
- package/exporter/utils/domains.ts +7 -10
- package/exporter/utils/folders.ts +98 -163
- package/exporter/utils/health-checks.ts +64 -0
- package/exporter/utils/images.ts +6 -1
- package/exporter/utils/instance.ts +13 -9
- package/exporter/utils/loggin.ts +91 -44
- package/exporter/utils/pages.ts +88 -23
- package/exporter/utils/render.ts +48 -180
- package/exporter/utils/searches.ts +156 -0
- package/exporter/utils/sites.ts +197 -19
- package/exporter/utils/store.ts +180 -87
- package/gatsby-browser.tsx +58 -41
- package/gatsby-config.ts +17 -10
- package/gatsby-node.ts +78 -17
- package/gatsby-ssr.tsx +1 -2
- package/package.json +86 -36
- package/src/README.md +7 -0
- package/src/components/Head.tsx +46 -13
- package/src/components/template.tsx +30 -8
- package/src/gatsby-node-utils.ts +2 -73
- package/src/html.tsx +11 -2
- package/src/types.ts +5 -5
- package/start-render.js +7 -0
- package/tsconfig.json +3 -5
- package/build/adapters/gatsby/actions/clean.js +0 -10
- package/build/adapters/gatsby/actions/clean.js.map +0 -1
- package/build/adapters/gatsby/actions/close.js +0 -12
- package/build/adapters/gatsby/actions/close.js.map +0 -1
- package/build/adapters/gatsby/actions/data.js +0 -18
- package/build/adapters/gatsby/actions/data.js.map +0 -1
- package/build/adapters/gatsby/actions/healthCheck.js +0 -10
- package/build/adapters/gatsby/actions/healthCheck.js.map +0 -1
- package/build/adapters/gatsby/actions/init.js +0 -22
- package/build/adapters/gatsby/actions/init.js.map +0 -1
- package/build/adapters/gatsby/actions/logs.js +0 -12
- package/build/adapters/gatsby/actions/logs.js.map +0 -1
- package/build/adapters/gatsby/actions/meta.js +0 -13
- package/build/adapters/gatsby/actions/meta.js.map +0 -1
- package/build/adapters/gatsby/actions/prepare.js +0 -9
- package/build/adapters/gatsby/actions/prepare.js.map +0 -1
- package/build/adapters/gatsby/actions/relocation.js +0 -15
- package/build/adapters/gatsby/actions/relocation.js.map +0 -1
- package/build/adapters/gatsby/actions/restore.js +0 -26
- package/build/adapters/gatsby/actions/restore.js.map +0 -1
- package/build/adapters/gatsby/actions/ssg.js +0 -9
- package/build/adapters/gatsby/actions/ssg.js.map +0 -1
- package/build/adapters/gatsby/actions/sync.js +0 -51
- package/build/adapters/gatsby/actions/sync.js.map +0 -1
- package/build/adapters/gatsby/index.js +0 -78
- package/build/adapters/gatsby/index.js.map +0 -1
- package/build/adapters/gatsby/shared/artifacts.js +0 -20
- package/build/adapters/gatsby/shared/artifacts.js.map +0 -1
- package/build/adapters/gatsby/shared/context.js +0 -31
- package/build/adapters/gatsby/shared/context.js.map +0 -1
- package/build/adapters/gatsby/shared/diff-assets.js +0 -101
- package/build/adapters/gatsby/shared/diff-assets.js.map +0 -1
- package/build/adapters/gatsby/shared/extract-assets.js +0 -58
- package/build/adapters/gatsby/shared/extract-assets.js.map +0 -1
- package/build/adapters/gatsby/shared/gatsby-build.js +0 -55
- package/build/adapters/gatsby/shared/gatsby-build.js.map +0 -1
- package/build/adapters/gatsby/shared/sync-render.js +0 -210
- package/build/adapters/gatsby/shared/sync-render.js.map +0 -1
- package/build/adapters/gatsby/shared/types.js +0 -3
- package/build/adapters/gatsby/shared/types.js.map +0 -1
- package/build/commands/end-render.js +0 -87
- package/build/commands/end-render.js.map +0 -1
- package/build/commands/prepare-assets-directory.js +0 -30
- package/build/commands/prepare-assets-directory.js.map +0 -1
- package/build/commands/prepare-domains-render.js +0 -133
- package/build/commands/prepare-domains-render.js.map +0 -1
- package/build/commands/reset-render.js +0 -21
- package/build/commands/reset-render.js.map +0 -1
- package/build/commands/start-render.js +0 -44
- package/build/commands/start-render.js.map +0 -1
- package/build/commands/upload-search-content.js +0 -180
- package/build/commands/upload-search-content.js.map +0 -1
- package/build/constants/endpoints.js +0 -43
- package/build/constants/endpoints.js.map +0 -1
- package/build/constants/envs.js +0 -68
- package/build/constants/envs.js.map +0 -1
- package/build/constants/errors.js +0 -81
- package/build/constants/errors.js.map +0 -1
- package/build/services/auth.js +0 -40
- package/build/services/auth.js.map +0 -1
- package/build/services/db-class.js +0 -49
- package/build/services/db-class.js.map +0 -1
- package/build/services/db.js +0 -34
- package/build/services/db.js.map +0 -1
- package/build/services/navigation.js +0 -96
- package/build/services/navigation.js.map +0 -1
- package/build/services/reference-fields.js +0 -131
- package/build/services/reference-fields.js.map +0 -1
- package/build/services/robots.js +0 -60
- package/build/services/robots.js.map +0 -1
- package/build/services/sites.js +0 -110
- package/build/services/sites.js.map +0 -1
- package/build/services/store.js +0 -257
- package/build/services/store.js.map +0 -1
- package/build/types/api.js +0 -3
- package/build/types/api.js.map +0 -1
- package/build/types/global.js +0 -3
- package/build/types/global.js.map +0 -1
- package/build/types/navigation.js +0 -3
- package/build/types/navigation.js.map +0 -1
- package/build/types/pages.js +0 -3
- package/build/types/pages.js.map +0 -1
- package/build/types/render.js +0 -10
- package/build/types/render.js.map +0 -1
- package/build/types/sites.js +0 -3
- package/build/types/sites.js.map +0 -1
- package/build/types/templates.js +0 -3
- package/build/types/templates.js.map +0 -1
- package/build/utils/api.js +0 -165
- package/build/utils/api.js.map +0 -1
- package/build/utils/artifacts.js +0 -38
- package/build/utils/artifacts.js.map +0 -1
- package/build/utils/brush.js +0 -30
- package/build/utils/brush.js.map +0 -1
- package/build/utils/cache.js +0 -106
- package/build/utils/cache.js.map +0 -1
- package/build/utils/check-environment-health.js +0 -73
- package/build/utils/check-environment-health.js.map +0 -1
- package/build/utils/core-utils.js +0 -270
- package/build/utils/core-utils.js.map +0 -1
- package/build/utils/domains.js +0 -37
- package/build/utils/domains.js.map +0 -1
- package/build/utils/errors.js +0 -30
- package/build/utils/errors.js.map +0 -1
- package/build/utils/folders.js +0 -341
- package/build/utils/folders.js.map +0 -1
- package/build/utils/images.js +0 -45
- package/build/utils/images.js.map +0 -1
- package/build/utils/instance.js +0 -66
- package/build/utils/instance.js.map +0 -1
- package/build/utils/loggin.js +0 -119
- package/build/utils/loggin.js.map +0 -1
- package/build/utils/npm-deps/find-up-simple.js +0 -75
- package/build/utils/npm-deps/find-up-simple.js.map +0 -1
- package/build/utils/npm-deps/pkg-dir.js +0 -20
- package/build/utils/npm-deps/pkg-dir.js.map +0 -1
- package/build/utils/npm-deps/xml-parser.js +0 -49
- package/build/utils/npm-deps/xml-parser.js.map +0 -1
- package/build/utils/pages.js +0 -359
- package/build/utils/pages.js.map +0 -1
- package/build/utils/render.js +0 -168
- package/build/utils/render.js.map +0 -1
- package/build/utils/sitemaps.js +0 -110
- package/build/utils/sitemaps.js.map +0 -1
- package/build/utils/sites.js +0 -105
- package/build/utils/sites.js.map +0 -1
- package/build/utils/store.js +0 -193
- package/build/utils/store.js.map +0 -1
- package/cli.mjs +0 -136
- package/exporter/adapters/gatsby/actions/clean.ts +0 -14
- package/exporter/adapters/gatsby/actions/close.ts +0 -17
- package/exporter/adapters/gatsby/actions/data.ts +0 -25
- package/exporter/adapters/gatsby/actions/healthCheck.ts +0 -10
- package/exporter/adapters/gatsby/actions/init.ts +0 -26
- package/exporter/adapters/gatsby/actions/logs.ts +0 -13
- package/exporter/adapters/gatsby/actions/meta.ts +0 -16
- package/exporter/adapters/gatsby/actions/prepare.ts +0 -9
- package/exporter/adapters/gatsby/actions/relocation.ts +0 -15
- package/exporter/adapters/gatsby/actions/restore.ts +0 -36
- package/exporter/adapters/gatsby/actions/ssg.ts +0 -12
- package/exporter/adapters/gatsby/actions/sync.ts +0 -71
- package/exporter/adapters/gatsby/shared/artifacts.ts +0 -16
- package/exporter/adapters/gatsby/shared/context.ts +0 -50
- package/exporter/adapters/gatsby/shared/diff-assets.ts +0 -113
- package/exporter/adapters/gatsby/shared/extract-assets.ts +0 -61
- package/exporter/adapters/gatsby/shared/gatsby-build.ts +0 -58
- package/exporter/adapters/gatsby/shared/sync-render.ts +0 -276
- package/exporter/adapters/gatsby/shared/types.ts +0 -35
- package/exporter/build-esbuild.noop +0 -42
- package/exporter/commands/prepare-assets-directory.ts +0 -30
- package/exporter/services/db-class.ts +0 -54
- package/exporter/services/db.ts +0 -32
- package/exporter/types/render.ts +0 -59
- package/exporter/utils/artifacts.ts +0 -38
- package/exporter/utils/brush.ts +0 -34
- package/exporter/utils/check-environment-health.ts +0 -84
- package/exporter/utils/npm-deps/find-up-simple.ts +0 -100
- package/exporter/utils/npm-deps/pkg-dir.ts +0 -17
- package/exporter/utils/npm-deps/xml-parser.ts +0 -57
- package/exporter/utils/sitemaps.ts +0 -129
- package/plugins/gatsby-plugin-svgr-loader/gatsby-node.js +0 -55
- package/plugins/gatsby-plugin-svgr-loader/package.json +0 -8
- package/react/DynamicScript/index.tsx +0 -33
- package/tsconfig.commands.json +0 -36
- package/tsconfig.exporter.json +0 -19
- /package/{react → exporter/react}/Favicon/utils.ts +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Core } from "@griddo/core";
|
|
2
1
|
import type {
|
|
3
2
|
AllSitesReponse,
|
|
4
3
|
EndPageInfoResponse,
|
|
@@ -12,26 +11,17 @@ import type {
|
|
|
12
11
|
StartPageRenderResponse,
|
|
13
12
|
} from "../types/api";
|
|
14
13
|
import type { Site } from "../types/sites";
|
|
14
|
+
import type { Core } from "@griddo/core";
|
|
15
15
|
|
|
16
|
-
import {
|
|
17
|
-
BUILD_END,
|
|
18
|
-
BUILD_START,
|
|
19
|
-
GET_ALL,
|
|
20
|
-
GET_PAGE,
|
|
21
|
-
GET_REFERENCE_FIELD_DATA,
|
|
22
|
-
GET_SITEMAP,
|
|
23
|
-
INFO,
|
|
24
|
-
LANGUAGES,
|
|
25
|
-
SOCIALS,
|
|
26
|
-
} from "../constants/endpoints";
|
|
16
|
+
import { endpoints } from "../constants";
|
|
27
17
|
import { get, post } from "../utils/api";
|
|
28
18
|
|
|
29
19
|
/**
|
|
30
20
|
* Get a list of site objects.
|
|
31
21
|
*/
|
|
32
22
|
async function getAllSites(domain: string) {
|
|
33
|
-
return get<AllSitesReponse>({
|
|
34
|
-
endpoint: `${GET_ALL}?domainSlug=${domain}`,
|
|
23
|
+
return await get<AllSitesReponse>({
|
|
24
|
+
endpoint: `${endpoints.GET_ALL}?domainSlug=${domain}`,
|
|
35
25
|
});
|
|
36
26
|
}
|
|
37
27
|
|
|
@@ -39,7 +29,7 @@ async function getAllSites(domain: string) {
|
|
|
39
29
|
* Get a list of site objects from a domain.
|
|
40
30
|
*/
|
|
41
31
|
async function getAllSitesFromDomain(domain: string) {
|
|
42
|
-
const allSites = await get<AllSitesReponse>({ endpoint: GET_ALL });
|
|
32
|
+
const allSites = await get<AllSitesReponse>({ endpoint: endpoints.GET_ALL });
|
|
43
33
|
|
|
44
34
|
if (allSites.length) {
|
|
45
35
|
for (const site of allSites) {
|
|
@@ -50,7 +40,8 @@ async function getAllSitesFromDomain(domain: string) {
|
|
|
50
40
|
site.domains = items
|
|
51
41
|
.filter(
|
|
52
42
|
(item) =>
|
|
53
|
-
item.domain &&
|
|
43
|
+
item.domain &&
|
|
44
|
+
(item.domain.slug === domain || item.domain.slug === `/${domain}`),
|
|
54
45
|
)
|
|
55
46
|
.map((item) => ({ [item.id]: `${item.domain.slug}${item.path}` }));
|
|
56
47
|
}
|
|
@@ -63,8 +54,8 @@ async function getAllSitesFromDomain(domain: string) {
|
|
|
63
54
|
* Fetch a page object from API.
|
|
64
55
|
*/
|
|
65
56
|
async function getPage(id: number, cacheKey: string) {
|
|
66
|
-
return get<PageResponse>({
|
|
67
|
-
endpoint: `${GET_PAGE}/${id}`,
|
|
57
|
+
return await get<PageResponse>({
|
|
58
|
+
endpoint: `${endpoints.GET_PAGE}/${id}`,
|
|
68
59
|
cacheKey,
|
|
69
60
|
});
|
|
70
61
|
}
|
|
@@ -73,27 +64,27 @@ async function getPage(id: number, cacheKey: string) {
|
|
|
73
64
|
* Get site info
|
|
74
65
|
*/
|
|
75
66
|
async function getSiteInfo(id: number, cacheKey = "") {
|
|
76
|
-
const [prefix, suffix] = INFO;
|
|
67
|
+
const [prefix, suffix] = endpoints.INFO;
|
|
77
68
|
|
|
78
|
-
return get<Site>({
|
|
69
|
+
return await get<Site>({
|
|
79
70
|
endpoint: `${prefix}${id}${suffix}`,
|
|
80
71
|
cacheKey,
|
|
81
72
|
});
|
|
82
73
|
}
|
|
83
74
|
|
|
84
75
|
async function getSiteLanguages(id: number, cacheKey = "") {
|
|
85
|
-
const [prefix, suffix] = LANGUAGES;
|
|
76
|
+
const [prefix, suffix] = endpoints.LANGUAGES;
|
|
86
77
|
|
|
87
|
-
return get<LanguagesResponse>({
|
|
78
|
+
return await get<LanguagesResponse>({
|
|
88
79
|
endpoint: `${prefix}${id}${suffix}`,
|
|
89
80
|
cacheKey,
|
|
90
81
|
});
|
|
91
82
|
}
|
|
92
83
|
|
|
93
84
|
async function startSiteRender(id: number) {
|
|
94
|
-
const [prefix, suffix] = BUILD_START;
|
|
85
|
+
const [prefix, suffix] = endpoints.BUILD_START;
|
|
95
86
|
|
|
96
|
-
return get<StartPageRenderResponse>({
|
|
87
|
+
return await get<StartPageRenderResponse>({
|
|
97
88
|
endpoint: `${prefix}${id}${suffix}`,
|
|
98
89
|
});
|
|
99
90
|
}
|
|
@@ -102,13 +93,12 @@ async function startSiteRender(id: number) {
|
|
|
102
93
|
* Send the end signal to API for a render site.
|
|
103
94
|
*/
|
|
104
95
|
async function endSiteRender(id: number, body: EndSiteRenderBody) {
|
|
105
|
-
const [prefix, suffix] = BUILD_END;
|
|
96
|
+
const [prefix, suffix] = endpoints.BUILD_END;
|
|
106
97
|
|
|
107
|
-
return post<EndPageInfoResponse>({
|
|
98
|
+
return await post<EndPageInfoResponse>({
|
|
108
99
|
endpoint: `${prefix}${id}${suffix}`,
|
|
109
100
|
body,
|
|
110
101
|
useApiCacheDir: false,
|
|
111
|
-
logToFile: false,
|
|
112
102
|
});
|
|
113
103
|
}
|
|
114
104
|
|
|
@@ -119,11 +109,11 @@ async function getReferenceFieldSiteData(
|
|
|
119
109
|
dataSiteId?: number,
|
|
120
110
|
dataLangID?: number,
|
|
121
111
|
) {
|
|
122
|
-
const [prefix, suffix] = GET_REFERENCE_FIELD_DATA;
|
|
112
|
+
const [prefix, suffix] = endpoints.GET_REFERENCE_FIELD_DATA;
|
|
123
113
|
const site = dataSiteId || page.site;
|
|
124
114
|
const lang = dataLangID || page.language;
|
|
125
115
|
|
|
126
|
-
return post<ReferenceFieldResponse>({
|
|
116
|
+
return await post<ReferenceFieldResponse>({
|
|
127
117
|
endpoint: `${prefix}${site}${suffix}`,
|
|
128
118
|
body,
|
|
129
119
|
headers: { lang },
|
|
@@ -131,20 +121,18 @@ async function getReferenceFieldSiteData(
|
|
|
131
121
|
});
|
|
132
122
|
}
|
|
133
123
|
|
|
134
|
-
async function getSitemap(
|
|
135
|
-
const
|
|
136
|
-
const [prefix, suffix] = GET_SITEMAP;
|
|
124
|
+
async function getSitemap(id: number) {
|
|
125
|
+
const [prefix, suffix] = endpoints.GET_SITEMAP;
|
|
137
126
|
|
|
138
127
|
return get<SitemapAPIResponse>({
|
|
139
|
-
endpoint: `${prefix}${
|
|
140
|
-
headers,
|
|
128
|
+
endpoint: `${prefix}${id}${suffix}`,
|
|
141
129
|
});
|
|
142
130
|
}
|
|
143
131
|
|
|
144
132
|
async function getSiteSocials(id: number, cacheKey = "") {
|
|
145
|
-
const [prefix, suffix] = SOCIALS;
|
|
133
|
+
const [prefix, suffix] = endpoints.SOCIALS;
|
|
146
134
|
|
|
147
|
-
return get<SocialsResponse>({
|
|
135
|
+
return await get<SocialsResponse>({
|
|
148
136
|
endpoint: `${prefix}${id}${suffix}`,
|
|
149
137
|
cacheKey,
|
|
150
138
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BuildProcessData
|
|
1
|
+
import type { BuildProcessData } from "../types/global";
|
|
2
2
|
import type {
|
|
3
3
|
GriddoListPage,
|
|
4
4
|
GriddoMultiPage,
|
|
@@ -6,23 +6,20 @@ import type {
|
|
|
6
6
|
GriddoSinglePage,
|
|
7
7
|
PageAdditionalInfo,
|
|
8
8
|
} from "../types/pages";
|
|
9
|
-
import type { RenderMode } from "../types/render";
|
|
10
9
|
|
|
11
|
-
import
|
|
10
|
+
import fs from "node:fs";
|
|
12
11
|
import path from "node:path";
|
|
13
12
|
|
|
14
13
|
import pLimit from "p-limit";
|
|
15
14
|
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
GRIDDO_REACT_APP_INSTANCE,
|
|
22
|
-
} from "../constants/envs";
|
|
23
|
-
import { get } from "../utils/api";
|
|
15
|
+
import { envs } from "../constants";
|
|
16
|
+
import { NavigationService } from "./navigation";
|
|
17
|
+
import { getReferenceFieldData } from "./reference-fields";
|
|
18
|
+
import { getAllSettings } from "./settings";
|
|
19
|
+
import { getPage } from "./sites";
|
|
24
20
|
import { updatedSiteHash } from "../utils/cache";
|
|
25
|
-
import {
|
|
21
|
+
import { getConfig, removeAllSiteDirsFromStore } from "../utils/core-utils";
|
|
22
|
+
import { buildLog, listSitesLog } from "../utils/loggin";
|
|
26
23
|
import {
|
|
27
24
|
createGriddoListPages,
|
|
28
25
|
createGriddoMultiPages,
|
|
@@ -32,38 +29,26 @@ import {
|
|
|
32
29
|
} from "../utils/pages";
|
|
33
30
|
import { getSiteData, getSitesToRender, unpublishSites } from "../utils/sites";
|
|
34
31
|
import {
|
|
32
|
+
getMissingPublishedPagesInStore,
|
|
35
33
|
getZombiePagesInStore,
|
|
36
34
|
removeOrphanSites,
|
|
37
35
|
removeSitePagesFromStore,
|
|
38
36
|
saveRenderInfoInStore,
|
|
39
37
|
saveSitePagesInStore,
|
|
40
38
|
} from "../utils/store";
|
|
41
|
-
import { NavigationService } from "./navigation";
|
|
42
|
-
import { getReferenceFieldData } from "./reference-fields";
|
|
43
|
-
import { getPage } from "./sites";
|
|
44
39
|
|
|
45
|
-
const renderId = Date.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
40
|
+
const renderId = new Date().valueOf().toString();
|
|
41
|
+
const { griddoVersion, paths } = getConfig();
|
|
42
|
+
const { __cx } = paths();
|
|
43
|
+
const storeDir = path.join(__cx, "store");
|
|
50
44
|
|
|
51
45
|
/**
|
|
52
46
|
* Fetch, process and save object pages and sites data into the file system to
|
|
53
47
|
* be consumed by other services (Griddo itself, Adapters, etc.)
|
|
54
48
|
*/
|
|
55
|
-
async function createStore(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
griddoVersion: string;
|
|
59
|
-
basePath: string;
|
|
60
|
-
}) {
|
|
61
|
-
console.info(`API calls with ${GRIDDO_API_CONCURRENCY_COUNT} threads`);
|
|
62
|
-
console.info(`API URL ${GRIDDO_API_URL as string}`);
|
|
63
|
-
|
|
64
|
-
const { renderMode, domain, griddoVersion, basePath } = options;
|
|
65
|
-
const renderFromScratch = renderMode === "FROM_SCRATCH";
|
|
66
|
-
const storeDir = path.join(basePath, "store");
|
|
49
|
+
async function createStore(domain: string) {
|
|
50
|
+
console.info(`API calls with ${envs.GRIDDO_API_CONCURRENCY_COUNT} threads`);
|
|
51
|
+
console.info(`API URL ${envs.GRIDDO_API_URL as string}`);
|
|
67
52
|
|
|
68
53
|
try {
|
|
69
54
|
// Vars to save later in the report file
|
|
@@ -73,43 +58,31 @@ async function createStore(options: {
|
|
|
73
58
|
// Get sites objects to publish and unpublish from this domain
|
|
74
59
|
const { sitesToPublish, sitesToUnpublish } = await getSitesToRender(domain);
|
|
75
60
|
|
|
61
|
+
const domainHasSites =
|
|
62
|
+
sitesToPublish.length > 0 || sitesToUnpublish.length > 0;
|
|
63
|
+
|
|
64
|
+
if (!domainHasSites) {
|
|
65
|
+
console.warn(`There are no sites to update in the domain ${domain}`);
|
|
66
|
+
}
|
|
67
|
+
|
|
76
68
|
listSitesLog("Sites to publish:", sitesToPublish);
|
|
77
69
|
listSitesLog("Sites to unpublish:", sitesToUnpublish);
|
|
78
70
|
|
|
79
71
|
// Send unpublished sites to API.
|
|
72
|
+
// @todo ¿mover esta llamada al final del proceso de render?
|
|
73
|
+
// Aquí también se están eliminado físicamente los archivos json del
|
|
74
|
+
// store de los sites para despublicar.
|
|
80
75
|
await unpublishSites(sitesToUnpublish);
|
|
81
76
|
|
|
82
77
|
// Eliminamos posibles sites que estén en el store pero que no deberían
|
|
83
78
|
// porque han sido cambiados de dominio. Si han sido despublicados ya se
|
|
84
79
|
// despublican bien porque entran en `sitesToUnpublish`
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
const allPagesToRemoveFromBuild: Array<number> = [];
|
|
88
|
-
// let numberOfFinalActivePages: Array<number> = [];
|
|
89
|
-
|
|
90
|
-
for (const site of sitesToUnpublish) {
|
|
91
|
-
const { pagesStatus } = site;
|
|
92
|
-
|
|
93
|
-
// Añadimos a allPagesToRemoveFromBuild todas las páginas de un site
|
|
94
|
-
// para despublicar.
|
|
95
|
-
allPagesToRemoveFromBuild.push(
|
|
96
|
-
...pagesStatus.active,
|
|
97
|
-
...pagesStatus.offlinePending,
|
|
98
|
-
...pagesStatus.uploadPending,
|
|
99
|
-
...pagesStatus.deleted,
|
|
100
|
-
...pagesStatus.offline,
|
|
101
|
-
);
|
|
102
|
-
}
|
|
80
|
+
removeOrphanSites(sitesToPublish, domain);
|
|
103
81
|
|
|
82
|
+
// Solo los sites to publish...
|
|
104
83
|
for (const site of sitesToPublish) {
|
|
105
84
|
const { id: siteId, slug: siteSlug, theme, favicon, pagesStatus } = site;
|
|
106
85
|
const siteDirName = siteId.toString();
|
|
107
|
-
// numberOfFinalActivePages.push(
|
|
108
|
-
// ...pagesStatus.active,
|
|
109
|
-
// ...pagesStatus.uploadPending,
|
|
110
|
-
// );
|
|
111
|
-
|
|
112
|
-
allPagesToRemoveFromBuild.push(...pagesStatus.offlinePending, ...pagesStatus.deleted);
|
|
113
86
|
|
|
114
87
|
const {
|
|
115
88
|
siteInfo,
|
|
@@ -131,7 +104,7 @@ async function createStore(options: {
|
|
|
131
104
|
avoidSelfReferenceCanonicals,
|
|
132
105
|
avoidHrefLangXDefault,
|
|
133
106
|
avoidDebugMetas,
|
|
134
|
-
} = await
|
|
107
|
+
} = await getAllSettings();
|
|
135
108
|
|
|
136
109
|
buildProcessData[siteId] = {
|
|
137
110
|
siteHash,
|
|
@@ -145,7 +118,7 @@ async function createStore(options: {
|
|
|
145
118
|
|
|
146
119
|
site.languages = siteLangs;
|
|
147
120
|
|
|
148
|
-
const shouldUpdateSite =
|
|
121
|
+
const shouldUpdateSite = updatedSiteHash(siteId, siteHash);
|
|
149
122
|
|
|
150
123
|
const siteScript = siteInfo.siteScript;
|
|
151
124
|
|
|
@@ -156,9 +129,9 @@ async function createStore(options: {
|
|
|
156
129
|
};
|
|
157
130
|
|
|
158
131
|
const additionalInfo = {
|
|
159
|
-
baseUrl: GRIDDO_API_URL,
|
|
160
|
-
publicBaseUrl: GRIDDO_PUBLIC_API_URL,
|
|
161
|
-
instance: GRIDDO_REACT_APP_INSTANCE,
|
|
132
|
+
baseUrl: envs.GRIDDO_API_URL,
|
|
133
|
+
publicBaseUrl: envs.GRIDDO_PUBLIC_API_URL,
|
|
134
|
+
instance: envs.GRIDDO_REACT_APP_INSTANCE,
|
|
162
135
|
siteSlug,
|
|
163
136
|
theme,
|
|
164
137
|
siteMetadata,
|
|
@@ -178,10 +151,10 @@ async function createStore(options: {
|
|
|
178
151
|
siteScript,
|
|
179
152
|
};
|
|
180
153
|
|
|
181
|
-
|
|
154
|
+
buildLog(`${site.name} site`);
|
|
182
155
|
|
|
183
156
|
/// Creates the store directory for each site using the id
|
|
184
|
-
|
|
157
|
+
fs.mkdirSync(path.join(storeDir, siteDirName), {
|
|
185
158
|
recursive: true,
|
|
186
159
|
});
|
|
187
160
|
|
|
@@ -190,7 +163,10 @@ async function createStore(options: {
|
|
|
190
163
|
// -------------------------------------------------------------------------
|
|
191
164
|
// Async function that process every page for one site to use later in the
|
|
192
165
|
// `Promise.all` with pLimit.
|
|
193
|
-
const fetchSitePageAndSaveInStore = async (
|
|
166
|
+
const fetchSitePageAndSaveInStore = async (
|
|
167
|
+
siteIdName: string,
|
|
168
|
+
pageId: number,
|
|
169
|
+
) => {
|
|
194
170
|
// Here will be store every page returned by the API and processed
|
|
195
171
|
let griddoPageObjects: Array<GriddoPageObject> = [];
|
|
196
172
|
|
|
@@ -209,7 +185,9 @@ async function createStore(options: {
|
|
|
209
185
|
// SHAME: This new pageAdditionalInfo needs to be a copy because
|
|
210
186
|
// additionalInfo referenced from outside this function and
|
|
211
187
|
// its used by other pages.
|
|
212
|
-
const pageAdditionalInfo = JSON.parse(
|
|
188
|
+
const pageAdditionalInfo = JSON.parse(
|
|
189
|
+
JSON.stringify(additionalInfo),
|
|
190
|
+
) as PageAdditionalInfo;
|
|
213
191
|
|
|
214
192
|
// Updated with navigations (header & footer)
|
|
215
193
|
pageAdditionalInfo.navigations = NavService.getPageNavigations(page);
|
|
@@ -239,7 +217,8 @@ async function createStore(options: {
|
|
|
239
217
|
// - Single: just one page
|
|
240
218
|
|
|
241
219
|
// Griddo page types
|
|
242
|
-
const isStaticListPage =
|
|
220
|
+
const isStaticListPage =
|
|
221
|
+
page?.mode === "list" || page?.mode === "paginated-data";
|
|
243
222
|
const isMultiPage = !isStaticListPage && multiPageElements;
|
|
244
223
|
const isSinglePage = !isMultiPage && !isStaticListPage;
|
|
245
224
|
|
|
@@ -255,12 +234,10 @@ async function createStore(options: {
|
|
|
255
234
|
} as GriddoListPage;
|
|
256
235
|
|
|
257
236
|
// pageObjects = await createGriddoListPages({ adapter: "Gatsby" })
|
|
258
|
-
griddoPageObjects = await createGriddoListPages(
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
// Esto hace que no se pueda rastrear bien el render.
|
|
263
|
-
allPagesToRemoveFromBuild.push(page.id);
|
|
237
|
+
griddoPageObjects = await createGriddoListPages(
|
|
238
|
+
griddoListPage,
|
|
239
|
+
pageAdditionalInfo,
|
|
240
|
+
);
|
|
264
241
|
}
|
|
265
242
|
|
|
266
243
|
// >> Multi-page <<
|
|
@@ -272,12 +249,10 @@ async function createStore(options: {
|
|
|
272
249
|
griddoMultipage.multiPageElements = multiPageElements;
|
|
273
250
|
griddoMultipage.defaultLang = defaultLang;
|
|
274
251
|
|
|
275
|
-
griddoPageObjects = await createGriddoMultiPages(
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
// Esto hace que no se pueda rastrear bien el render.
|
|
280
|
-
allPagesToRemoveFromBuild.push(page.id);
|
|
252
|
+
griddoPageObjects = await createGriddoMultiPages(
|
|
253
|
+
griddoMultipage,
|
|
254
|
+
pageAdditionalInfo,
|
|
255
|
+
);
|
|
281
256
|
}
|
|
282
257
|
|
|
283
258
|
// >> Single template <<
|
|
@@ -288,7 +263,9 @@ async function createStore(options: {
|
|
|
288
263
|
griddoSinglePage.template = template;
|
|
289
264
|
griddoSinglePage.defaultLang = defaultLang;
|
|
290
265
|
|
|
291
|
-
griddoPageObjects = [
|
|
266
|
+
griddoPageObjects = [
|
|
267
|
+
await createGriddoSinglePage(griddoSinglePage, pageAdditionalInfo),
|
|
268
|
+
];
|
|
292
269
|
}
|
|
293
270
|
|
|
294
271
|
// Upload only the valid pages hashes or ids of pages that has
|
|
@@ -299,26 +276,25 @@ async function createStore(options: {
|
|
|
299
276
|
}
|
|
300
277
|
|
|
301
278
|
// Save build data to store
|
|
302
|
-
|
|
279
|
+
saveSitePagesInStore(siteIdName, griddoPageObjects);
|
|
303
280
|
};
|
|
304
281
|
|
|
305
|
-
// Pages that needs to be fetched from the API and written to the
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
}
|
|
282
|
+
// Pages that needs to be fetched from the API and written to the
|
|
283
|
+
// store.
|
|
284
|
+
const pagesToFetchFromAPI = [
|
|
285
|
+
// These pages are news or has been updated.
|
|
286
|
+
...pagesStatus.uploadPending,
|
|
287
|
+
// You should take into account the pages that, even though they are
|
|
288
|
+
// already published and therefore should be avoided from requesting
|
|
289
|
+
// them to the API, are not in the store, probably due to a failed
|
|
290
|
+
// render. In that case, you have to request them again from the API
|
|
291
|
+
// to include them in the store.
|
|
292
|
+
...getMissingPublishedPagesInStore(siteDirName, pagesStatus.active),
|
|
293
|
+
];
|
|
318
294
|
|
|
319
295
|
// Create pages to the store. First requesting from API,
|
|
320
296
|
// transform, etc., and then writing them to disk.
|
|
321
|
-
const limit = pLimit(GRIDDO_API_CONCURRENCY_COUNT);
|
|
297
|
+
const limit = pLimit(envs.GRIDDO_API_CONCURRENCY_COUNT);
|
|
322
298
|
const pagesToStore = pagesToFetchFromAPI.map((id: number) =>
|
|
323
299
|
limit(() => fetchSitePageAndSaveInStore(siteDirName, id)),
|
|
324
300
|
);
|
|
@@ -326,13 +302,13 @@ async function createStore(options: {
|
|
|
326
302
|
await Promise.all(pagesToStore);
|
|
327
303
|
|
|
328
304
|
// @ts-expect-error Mutate pagesStatus for reading pourposes.
|
|
329
|
-
pagesStatus.zombie =
|
|
305
|
+
pagesStatus.zombie = getZombiePagesInStore(siteDirName, [
|
|
330
306
|
...pagesStatus.active,
|
|
331
307
|
...pagesStatus.uploadPending,
|
|
332
308
|
]);
|
|
333
309
|
|
|
334
310
|
// Delete pages from the store removing them from disk.
|
|
335
|
-
|
|
311
|
+
removeSitePagesFromStore(siteDirName, [
|
|
336
312
|
pagesStatus.deleted,
|
|
337
313
|
pagesStatus.offline,
|
|
338
314
|
pagesStatus.offlinePending,
|
|
@@ -345,22 +321,35 @@ async function createStore(options: {
|
|
|
345
321
|
// sean que hayan cambiado etc.) guardamos un archivo con la información
|
|
346
322
|
// del render para usos posteriores.
|
|
347
323
|
|
|
348
|
-
//
|
|
324
|
+
// Tenemos dos casos:
|
|
325
|
+
|
|
326
|
+
// ( 1 ) - Render de dominios con sites para publicar o despublicar. Se
|
|
349
327
|
// guarda la infor del render normalmente.
|
|
350
328
|
|
|
351
|
-
|
|
352
|
-
|
|
329
|
+
// ( 2 ) - Render de un dominio que no tiene sites ni para publicar ni para
|
|
330
|
+
// despublicar, lo que llamamos un dominio "vacío".
|
|
331
|
+
// Entonces se eliminan las páginas "huérfanas" de la carpeta `store`
|
|
332
|
+
// así el proceso de SSG se encontrará efectivamente con un dominio "sin
|
|
333
|
+
// páginas" y "borrará" lo que exista en ese momento en el store para
|
|
334
|
+
// ese dominio y se guarda la información del render con arrays vacíos
|
|
335
|
+
// directamente en `createdPages` y `sitesToPublish`.
|
|
336
|
+
|
|
337
|
+
if (domainHasSites) {
|
|
338
|
+
// ( 1 )
|
|
339
|
+
saveRenderInfoInStore({
|
|
353
340
|
buildProcessData,
|
|
354
341
|
createdPages,
|
|
355
342
|
sitesToPublish,
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
343
|
+
});
|
|
344
|
+
} else {
|
|
345
|
+
// ( 2 )
|
|
346
|
+
removeAllSiteDirsFromStore();
|
|
347
|
+
saveRenderInfoInStore({
|
|
348
|
+
buildProcessData,
|
|
349
|
+
createdPages: [],
|
|
350
|
+
sitesToPublish: [],
|
|
351
|
+
});
|
|
352
|
+
}
|
|
364
353
|
} catch (e) {
|
|
365
354
|
const error = e as { message: string };
|
|
366
355
|
console.error(error.message);
|
package/exporter/types/api.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Core, Fields } from "@griddo/core";
|
|
2
1
|
import type { Domains, Robots, Settings } from "./global";
|
|
3
2
|
import type { APIPageObject } from "./pages";
|
|
4
3
|
import type { Site } from "./sites";
|
|
4
|
+
import type { Core, Fields } from "@griddo/core";
|
|
5
5
|
|
|
6
6
|
/** EndSiteRender Body */
|
|
7
7
|
export type EndSiteRenderBody = {
|
|
@@ -29,31 +29,32 @@ export interface ReferenceFieldBody {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/** Describes the props of the body object for the get page */
|
|
32
|
-
//
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
33
|
+
interface PageBody {
|
|
34
|
+
/** The title of the page. */
|
|
35
|
+
title?: string;
|
|
36
|
+
/** The description of the page. */
|
|
37
|
+
description?: string;
|
|
38
|
+
/** The URL of the page's image. */
|
|
39
|
+
image?: string;
|
|
40
|
+
/** The ID of the page. */
|
|
41
|
+
pageId?: number;
|
|
42
|
+
/** The ID of the page's language. */
|
|
43
|
+
languageId?: number;
|
|
44
|
+
/** The ID of the page's site. */
|
|
45
|
+
siteId?: number;
|
|
46
|
+
/** The URL of the page. */
|
|
47
|
+
url?: string;
|
|
48
|
+
/** The template of the page. */
|
|
49
|
+
template?: string | null | number;
|
|
50
|
+
/** The content of the page. */
|
|
51
|
+
content?: string;
|
|
52
|
+
/** Additional properties. */
|
|
53
|
+
[key: string]: unknown;
|
|
54
|
+
}
|
|
54
55
|
|
|
55
56
|
/** Describes an item in a sitemap. */
|
|
56
|
-
|
|
57
|
+
interface SitemapItem {
|
|
57
58
|
/** The URL of the page. */
|
|
58
59
|
loc: string;
|
|
59
60
|
/** The date the page was last modified. */
|
|
@@ -119,12 +120,12 @@ export interface APIRequest {
|
|
|
119
120
|
attempt?: number;
|
|
120
121
|
/**
|
|
121
122
|
* Headers for the post api fetch
|
|
123
|
+
* @shame any
|
|
124
|
+
* @todo type this correctly from axios types
|
|
122
125
|
*/
|
|
123
|
-
headers?: Record<string, unknown>;
|
|
126
|
+
headers?: any; // Record<string, unknown>;
|
|
124
127
|
/* Save results in apiCache folder */
|
|
125
128
|
useApiCacheDir?: boolean;
|
|
126
|
-
/* Save log in the cx log file */
|
|
127
|
-
logToFile?: boolean;
|
|
128
129
|
}
|
|
129
130
|
|
|
130
131
|
/** Type with the POST request properties. */
|
package/exporter/types/global.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Core, Fields } from "@griddo/core";
|
|
2
1
|
import type { EndSiteRenderBody } from "./api";
|
|
3
2
|
import type { Site } from "./sites";
|
|
3
|
+
import type { Core, Fields } from "@griddo/core";
|
|
4
4
|
|
|
5
5
|
interface Settings {
|
|
6
6
|
apiVersion?: string;
|
|
@@ -70,7 +70,9 @@ interface RenderInfo {
|
|
|
70
70
|
sitesToPublish: Array<Site>;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
type
|
|
73
|
+
type LifeCycleSteps = Array<
|
|
74
|
+
(...args: Array<unknown>) => unknown | Promise<unknown>
|
|
75
|
+
>;
|
|
74
76
|
|
|
75
77
|
type LifeCyclesNames =
|
|
76
78
|
| "Init"
|
|
@@ -80,11 +82,12 @@ type LifeCyclesNames =
|
|
|
80
82
|
| "SSG"
|
|
81
83
|
| "Relocation"
|
|
82
84
|
| "Meta"
|
|
83
|
-
| "
|
|
85
|
+
| "Archive"
|
|
84
86
|
| "Clean"
|
|
85
87
|
| "Close"
|
|
86
88
|
| "HealthCheck"
|
|
87
|
-
| "Close"
|
|
89
|
+
| "Close"
|
|
90
|
+
| "__DEBUG__";
|
|
88
91
|
|
|
89
92
|
type PlaceholderPath =
|
|
90
93
|
| "__exports"
|
|
@@ -94,12 +97,13 @@ type PlaceholderPath =
|
|
|
94
97
|
| "__components"
|
|
95
98
|
| "__root"
|
|
96
99
|
| "__exports_dist"
|
|
97
|
-
| "
|
|
100
|
+
| "__cx_dist";
|
|
98
101
|
|
|
99
102
|
interface CXConfig {
|
|
100
|
-
|
|
103
|
+
proDomain: string;
|
|
101
104
|
griddoVersion: string;
|
|
102
105
|
buildReportFileName: string;
|
|
106
|
+
paths: (domain?: string) => Record<PlaceholderPath, string>;
|
|
103
107
|
}
|
|
104
108
|
|
|
105
109
|
interface AIEmbeddingsResponse {
|
|
@@ -112,7 +116,6 @@ interface Artifacts {
|
|
|
112
116
|
cacheables: Array<string>;
|
|
113
117
|
initials: Array<string>;
|
|
114
118
|
archivables: Array<string>;
|
|
115
|
-
restaurable: Array<string>;
|
|
116
119
|
}
|
|
117
120
|
|
|
118
121
|
export type {
|
|
@@ -131,5 +134,5 @@ export type {
|
|
|
131
134
|
Robot,
|
|
132
135
|
Robots,
|
|
133
136
|
Settings,
|
|
134
|
-
|
|
137
|
+
LifeCycleSteps,
|
|
135
138
|
};
|