@griddo/cx 11.9.12-rc.0 → 11.9.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 +240 -13
- 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 +1 -0
- package/build/commands/reset-render.d.ts +1 -0
- package/build/commands/start-render.d.ts +1 -0
- package/build/commands/upload-search-content.d.ts +1 -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/{shared/errors.d.ts → errors/errors-data.d.ts} +3 -5
- package/build/errors/index.d.ts +15 -0
- package/build/index.d.ts +29 -10
- package/build/index.js +73 -406
- 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/GriddoIntegrations/index.d.ts +4 -3
- package/build/react/GriddoIntegrations/utils.d.ts +6 -7
- package/build/react/index.d.ts +2 -3
- package/build/react/index.js +3 -1
- 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 +5 -2
- package/build/services/domains.d.ts +4 -3
- package/build/services/navigation.d.ts +16 -16
- package/build/services/reference-fields.d.ts +3 -3
- package/build/services/register.d.ts +36 -0
- package/build/services/robots.d.ts +19 -2
- package/build/services/settings.d.ts +4 -0
- package/build/services/sites.d.ts +5 -8
- package/build/services/store.d.ts +1 -10
- package/build/start-render.js +100 -0
- package/build/start-render.js.map +7 -0
- package/build/{shared/types → types}/api.d.ts +18 -18
- package/build/{shared/types → types}/global.d.ts +16 -15
- package/build/{shared/types → types}/navigation.d.ts +5 -5
- package/build/{shared/types → types}/pages.d.ts +9 -9
- package/build/{shared/types → types}/sites.d.ts +19 -18
- 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/{services → utils}/api.d.ts +1 -1
- 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/{core/check-env-health.d.ts → utils/health-checks.d.ts} +2 -4
- package/build/utils/loggin.d.ts +51 -0
- package/build/{services → utils}/pages.d.ts +3 -3
- 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 +162 -0
- 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 +24 -16
- package/exporter/commands/end-render.ts +86 -65
- package/exporter/commands/move-assets.ts +11 -0
- package/exporter/commands/prepare-domains-render.ts +35 -132
- package/exporter/commands/reset-render.ts +8 -13
- package/exporter/commands/start-render.ts +64 -26
- package/exporter/commands/upload-search-content.ts +26 -204
- package/exporter/{shared → constants}/endpoints.ts +11 -12
- package/exporter/constants/envs.ts +94 -0
- package/exporter/constants/index.ts +129 -0
- package/exporter/{shared/errors.ts → errors/errors-data.ts} +14 -24
- package/exporter/errors/index.ts +40 -0
- package/exporter/index.ts +56 -14
- package/exporter/react/{GriddoFavicon → Favicon}/index.tsx +9 -3
- package/exporter/react/GriddoIntegrations/index.tsx +23 -17
- package/exporter/react/GriddoIntegrations/utils.ts +12 -24
- package/exporter/react/index.tsx +9 -3
- 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 +10 -8
- package/exporter/services/domains.ts +8 -23
- package/exporter/services/navigation.ts +18 -12
- package/exporter/services/reference-fields.ts +32 -14
- package/exporter/services/register.ts +113 -0
- package/exporter/services/robots.ts +61 -33
- package/exporter/services/settings.ts +17 -0
- package/exporter/services/sites.ts +28 -40
- package/exporter/services/store.ts +321 -354
- package/exporter/{shared/types → types}/api.ts +41 -40
- package/exporter/{shared/types → types}/global.ts +21 -17
- package/exporter/{shared/types → types}/navigation.ts +3 -3
- package/exporter/{shared/types → types}/pages.ts +11 -10
- package/exporter/{shared/types → types}/sites.ts +19 -18
- package/exporter/utils/alerts.ts +29 -0
- package/exporter/utils/api.ts +243 -0
- package/exporter/utils/cache.ts +142 -0
- package/exporter/utils/core-utils.ts +458 -0
- package/exporter/utils/create-build-data.ts +17 -0
- package/exporter/utils/domains.ts +39 -0
- package/exporter/utils/folders.ts +320 -0
- package/exporter/utils/health-checks.ts +64 -0
- package/exporter/{core → utils}/images.ts +6 -1
- package/exporter/{core → utils}/instance.ts +13 -9
- package/exporter/utils/loggin.ts +184 -0
- package/exporter/{services → utils}/pages.ts +92 -27
- package/exporter/utils/render.ts +71 -0
- package/exporter/utils/searches.ts +156 -0
- package/exporter/utils/sites.ts +312 -0
- package/exporter/utils/store.ts +314 -0
- package/gatsby-browser.tsx +58 -41
- package/gatsby-config.ts +17 -10
- package/gatsby-node.ts +79 -20
- package/gatsby-ssr.tsx +1 -2
- package/package.json +80 -41
- package/src/README.md +7 -0
- package/src/components/Head.tsx +73 -28
- package/src/components/template.tsx +29 -6
- package/src/gatsby-node-utils.ts +2 -76
- package/src/html.tsx +11 -2
- package/src/types.ts +3 -3
- package/start-render.js +7 -0
- package/tsconfig.json +3 -5
- package/build/commands/end-render.js +0 -31
- package/build/commands/end-render.js.map +0 -7
- package/build/commands/prepare-assets-directory.js +0 -9
- package/build/commands/prepare-assets-directory.js.map +0 -7
- package/build/commands/prepare-domains-render.js +0 -38
- package/build/commands/prepare-domains-render.js.map +0 -7
- package/build/commands/reset-render.js +0 -31
- package/build/commands/reset-render.js.map +0 -7
- package/build/commands/single-domain-upload-search-content.d.ts +0 -1
- package/build/commands/start-render.js +0 -66
- package/build/commands/start-render.js.map +0 -7
- package/build/commands/upload-search-content.js +0 -32
- package/build/commands/upload-search-content.js.map +0 -7
- package/build/core/GriddoLog.d.ts +0 -16
- package/build/core/db-class.d.ts +0 -11
- package/build/core/db.d.ts +0 -4
- package/build/core/dist-rollback.d.ts +0 -11
- package/build/core/errors.d.ts +0 -26
- package/build/core/fs.d.ts +0 -69
- package/build/core/life-cycle.d.ts +0 -26
- package/build/core/logger.d.ts +0 -18
- package/build/core/objects.d.ts +0 -11
- package/build/core/print-logos.d.ts +0 -5
- package/build/react/DynamicScript/index.d.ts +0 -4
- package/build/react/GriddoFavicon/index.d.ts +0 -4
- package/build/react/GriddoOpenGraph/index.d.ts +0 -10
- package/build/services/manage-sites.d.ts +0 -22
- package/build/services/manage-store.d.ts +0 -32
- package/build/services/render-artifacts.d.ts +0 -6
- package/build/services/render.d.ts +0 -70
- package/build/services/sitemaps.d.ts +0 -5
- package/build/shared/context.d.ts +0 -36
- package/build/shared/envs.d.ts +0 -19
- package/build/shared/npm-modules/brush.d.ts +0 -18
- package/build/shared/npm-modules/find-up-simple.d.ts +0 -34
- package/build/shared/npm-modules/pkg-dir.d.ts +0 -7
- package/build/shared/npm-modules/xml-parser.d.ts +0 -4
- package/build/shared/types/render.d.ts +0 -54
- package/build/shared/types.d.ts +0 -15
- package/build/ssg-adapters/gatsby/actions/clean.d.ts +0 -3
- package/build/ssg-adapters/gatsby/actions/close.d.ts +0 -3
- package/build/ssg-adapters/gatsby/actions/data.d.ts +0 -2
- package/build/ssg-adapters/gatsby/actions/healthCheck.d.ts +0 -2
- package/build/ssg-adapters/gatsby/actions/init.d.ts +0 -2
- package/build/ssg-adapters/gatsby/actions/logs.d.ts +0 -3
- package/build/ssg-adapters/gatsby/actions/meta.d.ts +0 -2
- package/build/ssg-adapters/gatsby/actions/prepare.d.ts +0 -2
- package/build/ssg-adapters/gatsby/actions/relocation.d.ts +0 -2
- package/build/ssg-adapters/gatsby/actions/restore.d.ts +0 -3
- package/build/ssg-adapters/gatsby/actions/ssg.d.ts +0 -3
- package/build/ssg-adapters/gatsby/actions/sync.d.ts +0 -3
- package/build/ssg-adapters/gatsby/index.d.ts +0 -9
- package/build/ssg-adapters/gatsby/shared/artifacts.d.ts +0 -4
- package/build/ssg-adapters/gatsby/shared/diff-assets.d.ts +0 -15
- package/build/ssg-adapters/gatsby/shared/extract-assets.d.ts +0 -7
- package/build/ssg-adapters/gatsby/shared/gatsby-build.d.ts +0 -7
- package/build/ssg-adapters/gatsby/shared/render-rollback.d.ts +0 -18
- package/build/ssg-adapters/gatsby/shared/sync-render.d.ts +0 -26
- package/build/ssg-adapters/gatsby/shared/types.d.ts +0 -34
- package/cli.mjs +0 -231
- package/exporter/build-esbuild.noop +0 -42
- package/exporter/commands/README.md +0 -151
- package/exporter/commands/prepare-assets-directory.ts +0 -35
- package/exporter/commands/single-domain-upload-search-content.ts +0 -206
- package/exporter/core/GriddoLog.ts +0 -45
- package/exporter/core/check-env-health.ts +0 -204
- package/exporter/core/db-class.ts +0 -54
- package/exporter/core/db.ts +0 -33
- package/exporter/core/dist-rollback.ts +0 -49
- package/exporter/core/errors.ts +0 -93
- package/exporter/core/fs.ts +0 -385
- package/exporter/core/life-cycle.ts +0 -73
- package/exporter/core/logger.ts +0 -141
- package/exporter/core/objects.ts +0 -37
- package/exporter/core/print-logos.ts +0 -21
- package/exporter/react/DynamicScript/index.tsx +0 -33
- package/exporter/react/GriddoOpenGraph/index.tsx +0 -39
- package/exporter/services/api.ts +0 -306
- package/exporter/services/manage-sites.ts +0 -116
- package/exporter/services/manage-store.ts +0 -173
- package/exporter/services/render-artifacts.ts +0 -44
- package/exporter/services/render.ts +0 -229
- package/exporter/services/sitemaps.ts +0 -129
- package/exporter/shared/context.ts +0 -49
- package/exporter/shared/envs.ts +0 -62
- package/exporter/shared/npm-modules/README.md +0 -36
- package/exporter/shared/npm-modules/brush.ts +0 -34
- package/exporter/shared/npm-modules/find-up-simple.ts +0 -100
- package/exporter/shared/npm-modules/pkg-dir.ts +0 -17
- package/exporter/shared/npm-modules/xml-parser.ts +0 -57
- package/exporter/shared/types/render.ts +0 -63
- package/exporter/shared/types.ts +0 -15
- package/exporter/ssg-adapters/gatsby/actions/clean.ts +0 -26
- package/exporter/ssg-adapters/gatsby/actions/close.ts +0 -17
- package/exporter/ssg-adapters/gatsby/actions/data.ts +0 -22
- package/exporter/ssg-adapters/gatsby/actions/healthCheck.ts +0 -10
- package/exporter/ssg-adapters/gatsby/actions/init.ts +0 -12
- package/exporter/ssg-adapters/gatsby/actions/logs.ts +0 -10
- package/exporter/ssg-adapters/gatsby/actions/meta.ts +0 -13
- package/exporter/ssg-adapters/gatsby/actions/prepare.ts +0 -9
- package/exporter/ssg-adapters/gatsby/actions/relocation.ts +0 -15
- package/exporter/ssg-adapters/gatsby/actions/restore.ts +0 -21
- package/exporter/ssg-adapters/gatsby/actions/ssg.ts +0 -12
- package/exporter/ssg-adapters/gatsby/actions/sync.ts +0 -65
- package/exporter/ssg-adapters/gatsby/index.ts +0 -114
- package/exporter/ssg-adapters/gatsby/shared/artifacts.ts +0 -17
- package/exporter/ssg-adapters/gatsby/shared/diff-assets.ts +0 -128
- package/exporter/ssg-adapters/gatsby/shared/extract-assets.ts +0 -75
- package/exporter/ssg-adapters/gatsby/shared/gatsby-build.ts +0 -58
- package/exporter/ssg-adapters/gatsby/shared/render-rollback.ts +0 -33
- package/exporter/ssg-adapters/gatsby/shared/sync-render.ts +0 -298
- package/exporter/ssg-adapters/gatsby/shared/types.ts +0 -35
- package/plugins/gatsby-plugin-svgr-loader/gatsby-node.js +0 -55
- package/plugins/gatsby-plugin-svgr-loader/package.json +0 -8
- package/tsconfig.commands.json +0 -36
- package/tsconfig.exporter.json +0 -21
- /package/build/commands/{prepare-assets-directory.d.ts → move-assets.d.ts} +0 -0
- /package/build/{shared → constants}/endpoints.d.ts +0 -0
- /package/build/react/{GriddoFavicon → Favicon}/utils.d.ts +0 -0
- /package/build/{shared/types → types}/templates.d.ts +0 -0
- /package/build/{core → utils}/images.d.ts +0 -0
- /package/build/{core → utils}/instance.d.ts +0 -0
- /package/exporter/react/{GriddoFavicon → Favicon}/utils.ts +0 -0
- /package/exporter/{shared/types → types}/templates.ts +0 -0
|
@@ -1,59 +1,60 @@
|
|
|
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 = {
|
|
8
8
|
/** Site hashes to publish. */
|
|
9
|
-
publishHashes: string
|
|
9
|
+
publishHashes: Array<string>;
|
|
10
10
|
/** Current site hash. */
|
|
11
11
|
siteHash: string | null;
|
|
12
12
|
/** Site hashes to unpublish. */
|
|
13
|
-
unpublishHashes: string
|
|
13
|
+
unpublishHashes: Array<string>;
|
|
14
14
|
/** Page ids that publish */
|
|
15
|
-
publishPagesIds: number
|
|
15
|
+
publishPagesIds: Array<number>;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
/** ReferenceField Body */
|
|
19
19
|
export interface ReferenceFieldBody {
|
|
20
20
|
mode?: "auto" | "manual" | "navigation";
|
|
21
21
|
order?: string;
|
|
22
|
-
sources?: Fields.Source<unknown
|
|
22
|
+
sources?: Array<Fields.Source<unknown>>;
|
|
23
23
|
quantity?: number;
|
|
24
|
-
filter?: unknown
|
|
24
|
+
filter?: Array<unknown>;
|
|
25
25
|
fullRelations?: boolean;
|
|
26
26
|
allLanguages?: boolean;
|
|
27
|
-
fixed?: number
|
|
27
|
+
fixed?: Array<number>;
|
|
28
28
|
referenceId?: number;
|
|
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. */
|
|
@@ -73,7 +74,7 @@ interface URL {
|
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
/** Describes the items returned by a sitemap response. */
|
|
76
|
-
export type SitemapItems = Record<string, SitemapItem
|
|
77
|
+
export type SitemapItems = Record<string, Array<SitemapItem>>;
|
|
77
78
|
|
|
78
79
|
/** Describes the response object returned by a Griddo ReferenceField. */
|
|
79
80
|
export type ReferenceFieldResponse = Fields.QueriedData<unknown>;
|
|
@@ -104,7 +105,7 @@ export interface LanguagesResponse {
|
|
|
104
105
|
/** Total of languages */
|
|
105
106
|
totalItems: number;
|
|
106
107
|
/** Array of languages objects */
|
|
107
|
-
items: Core.SiteLanguage
|
|
108
|
+
items: Array<Core.SiteLanguage>;
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
/** Describes common props for api responses. */
|
|
@@ -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. */
|
|
@@ -141,11 +142,11 @@ export type PutAPI = APIRequest;
|
|
|
141
142
|
/** Response type for the start render API call */
|
|
142
143
|
export interface StartPageRenderResponse {
|
|
143
144
|
/** Site hashes to publish */
|
|
144
|
-
publishIds: number
|
|
145
|
+
publishIds: Array<number>;
|
|
145
146
|
/** Current site hash */
|
|
146
147
|
siteHash: string | null;
|
|
147
148
|
/** Site hashes to unpublish */
|
|
148
|
-
unpublishHashes: string
|
|
149
|
+
unpublishHashes: Array<string>;
|
|
149
150
|
}
|
|
150
151
|
|
|
151
152
|
/** Response type for the end render API call */
|
|
@@ -159,7 +160,7 @@ export interface EndPageInfoResponse {
|
|
|
159
160
|
export type PostEmbeddingsResponse = string;
|
|
160
161
|
|
|
161
162
|
/** Describes a response type for GET all sites */
|
|
162
|
-
export type AllSitesReponse = Site
|
|
163
|
+
export type AllSitesReponse = Array<Site>;
|
|
163
164
|
|
|
164
165
|
/** Describes a response type for GET one page */
|
|
165
166
|
export type PageResponse = APIPageObject;
|
|
@@ -188,8 +189,8 @@ export interface ShowApiErrorOptions {
|
|
|
188
189
|
|
|
189
190
|
export interface BuildMetaData {
|
|
190
191
|
buildProcessData: Record<string, EndSiteRenderBody>;
|
|
191
|
-
createdPages: number
|
|
192
|
-
sitesToPublish: Site
|
|
192
|
+
createdPages: Array<number>;
|
|
193
|
+
sitesToPublish: Array<Site>;
|
|
193
194
|
}
|
|
194
195
|
|
|
195
196
|
export interface Auth {
|
|
@@ -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;
|
|
@@ -55,22 +55,24 @@ type Domain = {
|
|
|
55
55
|
url: string;
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
type Domains = Domain
|
|
58
|
+
type Domains = Array<Domain>;
|
|
59
59
|
|
|
60
60
|
/** Describes the type of build process data object. */
|
|
61
61
|
type BuildProcessData = Record<string, EndSiteRenderBody>;
|
|
62
62
|
|
|
63
63
|
type Robot = { path: string; content: string };
|
|
64
64
|
|
|
65
|
-
type Robots = Robot
|
|
65
|
+
type Robots = Array<Robot>;
|
|
66
66
|
|
|
67
67
|
interface RenderInfo {
|
|
68
68
|
buildProcessData: BuildProcessData;
|
|
69
|
-
createdPages: number
|
|
70
|
-
sitesToPublish: Site
|
|
69
|
+
createdPages: Array<number>;
|
|
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,11 +97,13 @@ type PlaceholderPath =
|
|
|
94
97
|
| "__components"
|
|
95
98
|
| "__root"
|
|
96
99
|
| "__exports_dist"
|
|
97
|
-
| "
|
|
100
|
+
| "__cx_dist";
|
|
98
101
|
|
|
99
102
|
interface CXConfig {
|
|
103
|
+
proDomain: string;
|
|
100
104
|
griddoVersion: string;
|
|
101
105
|
buildReportFileName: string;
|
|
106
|
+
paths: (domain?: string) => Record<PlaceholderPath, string>;
|
|
102
107
|
}
|
|
103
108
|
|
|
104
109
|
interface AIEmbeddingsResponse {
|
|
@@ -106,17 +111,16 @@ interface AIEmbeddingsResponse {
|
|
|
106
111
|
message: string;
|
|
107
112
|
}
|
|
108
113
|
|
|
109
|
-
interface
|
|
110
|
-
disposables: string
|
|
111
|
-
cacheables: string
|
|
112
|
-
initials: string
|
|
113
|
-
archivables: string
|
|
114
|
-
restaurable: string[];
|
|
114
|
+
interface Artifacts {
|
|
115
|
+
disposables: Array<string>;
|
|
116
|
+
cacheables: Array<string>;
|
|
117
|
+
initials: Array<string>;
|
|
118
|
+
archivables: Array<string>;
|
|
115
119
|
}
|
|
116
120
|
|
|
117
121
|
export type {
|
|
118
122
|
AIEmbeddingsResponse,
|
|
119
|
-
|
|
123
|
+
Artifacts,
|
|
120
124
|
BuildProcessData,
|
|
121
125
|
CXConfig,
|
|
122
126
|
Domain,
|
|
@@ -130,5 +134,5 @@ export type {
|
|
|
130
134
|
Robot,
|
|
131
135
|
Robots,
|
|
132
136
|
Settings,
|
|
133
|
-
|
|
137
|
+
LifeCycleSteps,
|
|
134
138
|
};
|
|
@@ -4,7 +4,7 @@ export type Header = {
|
|
|
4
4
|
id: number;
|
|
5
5
|
isDefault: boolean;
|
|
6
6
|
language: number;
|
|
7
|
-
navigationLanguages: { navigationId: number }
|
|
7
|
+
navigationLanguages: Array<{ navigationId: number }>;
|
|
8
8
|
setAsDefault: boolean;
|
|
9
9
|
theme: null | string;
|
|
10
10
|
title: string;
|
|
@@ -17,9 +17,9 @@ export type Footer = {
|
|
|
17
17
|
id: number;
|
|
18
18
|
isDefault: boolean;
|
|
19
19
|
language: number;
|
|
20
|
-
navigationLanguages: { navigationId: number }
|
|
20
|
+
navigationLanguages: Array<{ navigationId: number }>;
|
|
21
21
|
setAsDefault: boolean;
|
|
22
22
|
theme: null | string;
|
|
23
23
|
title: string;
|
|
24
|
-
type: "
|
|
24
|
+
type: "header";
|
|
25
25
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Core, Fields } from "@griddo/core";
|
|
2
1
|
import type { SocialsResponse } from "./api";
|
|
3
2
|
import type { Settings } from "./global";
|
|
4
3
|
import type { Site } from "./sites";
|
|
4
|
+
import type { Core, Fields } from "@griddo/core";
|
|
5
5
|
|
|
6
6
|
// TODO: In @griddo/core the type Core.Page has header/footer as React-Types,
|
|
7
7
|
// but API return `number | null`.
|
|
@@ -35,7 +35,7 @@ export type GriddoSinglePage = Core.Page & {
|
|
|
35
35
|
|
|
36
36
|
export type GriddoListPage = Core.Page & {
|
|
37
37
|
page: APIPageObject;
|
|
38
|
-
pages: Fields.QueriedDataItem
|
|
38
|
+
pages: Array<Array<Fields.QueriedDataItem>>;
|
|
39
39
|
isRoot?: boolean;
|
|
40
40
|
defaultLang?: Core.SiteLanguage;
|
|
41
41
|
template: {
|
|
@@ -45,7 +45,7 @@ export type GriddoListPage = Core.Page & {
|
|
|
45
45
|
activeSectionSlug: string;
|
|
46
46
|
activeSectionBase: string;
|
|
47
47
|
};
|
|
48
|
-
totalQueriedItems: Fields.QueriedDataItem
|
|
48
|
+
totalQueriedItems: Array<Fields.QueriedDataItem>;
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
export type GriddoMultiPage = Core.Page & {
|
|
@@ -62,7 +62,7 @@ export interface AdditionalInfo {
|
|
|
62
62
|
griddoVersion: string;
|
|
63
63
|
instance?: string;
|
|
64
64
|
publicBaseUrl: string;
|
|
65
|
-
siteLangs: Core.SiteLanguage
|
|
65
|
+
siteLangs: Array<Core.SiteLanguage>;
|
|
66
66
|
siteMetadata: Site["siteMetadata"];
|
|
67
67
|
siteSlug: string;
|
|
68
68
|
socials: SocialsResponse;
|
|
@@ -90,14 +90,14 @@ export interface PageAdditionalInfo extends AdditionalInfo {
|
|
|
90
90
|
export type MultiPageElement = {
|
|
91
91
|
component: string;
|
|
92
92
|
title: string | Required<Fields.Heading>;
|
|
93
|
-
elements: Record<string, unknown
|
|
94
|
-
componentModules: Record<string, unknown
|
|
93
|
+
elements: Array<Record<string, unknown>>;
|
|
94
|
+
componentModules: Array<Record<string, unknown>>;
|
|
95
95
|
sectionSlug: string;
|
|
96
96
|
metaTitle: string;
|
|
97
97
|
metaDescription: string;
|
|
98
98
|
};
|
|
99
99
|
|
|
100
|
-
export type MultiPageElements = MultiPageElement
|
|
100
|
+
export type MultiPageElements = Array<MultiPageElement>;
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
103
|
* Gatsby page object format.
|
|
@@ -140,7 +140,7 @@ export type GriddoPageObject = {
|
|
|
140
140
|
siteMetadata: Site["siteMetadata"];
|
|
141
141
|
theme: string;
|
|
142
142
|
title: string;
|
|
143
|
-
siteLangs: Core.SiteLanguage
|
|
143
|
+
siteLangs: Array<Core.SiteLanguage>;
|
|
144
144
|
siteOptions: AdditionalInfo["siteOptions"];
|
|
145
145
|
siteScript: string;
|
|
146
146
|
socials: SocialsResponse;
|
|
@@ -153,10 +153,11 @@ export interface Dimensions {
|
|
|
153
153
|
values: Record<string, string> | null;
|
|
154
154
|
contentSelect?: "group" | "individual" | null;
|
|
155
155
|
groupSelect?: string;
|
|
156
|
-
dimensionsSelect?: string
|
|
156
|
+
dimensionsSelect?: Array<string>;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
export interface GatsbyPageTemplateProps
|
|
159
|
+
export interface GatsbyPageTemplateProps
|
|
160
|
+
extends Omit<GriddoPageObject, "context"> {
|
|
160
161
|
pageContext: GriddoPageObject["context"] & {
|
|
161
162
|
page: Core.Page;
|
|
162
163
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Core } from "@griddo/core";
|
|
2
1
|
import type { SocialsResponse } from "./api";
|
|
3
2
|
import type { Footer, Header } from "./navigation";
|
|
3
|
+
import type { Core } from "@griddo/core";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Describes a Griddo site object from API.
|
|
@@ -28,12 +28,12 @@ export interface Site
|
|
|
28
28
|
> {
|
|
29
29
|
author: string;
|
|
30
30
|
deleted: number;
|
|
31
|
-
domains: Record<string, string
|
|
32
|
-
footers: Footer
|
|
31
|
+
domains: Array<Record<string, string>>;
|
|
32
|
+
footers: Array<Footer>;
|
|
33
33
|
hash: string | null;
|
|
34
|
-
headers: Header
|
|
35
|
-
languages: Core.SiteLanguage
|
|
36
|
-
languageSites: number
|
|
34
|
+
headers: Array<Header>;
|
|
35
|
+
languages: Array<Core.SiteLanguage>; // in Core is Array<number>
|
|
36
|
+
languageSites: Array<number>;
|
|
37
37
|
navigationModules: { header?: string; footer?: string } | null;
|
|
38
38
|
/**
|
|
39
39
|
* Array of all pages (from day 0): published, unpublished and deleted
|
|
@@ -41,8 +41,9 @@ export interface Site
|
|
|
41
41
|
* `select/site/33/pages` -> [{id,label}, {id,label}, {id,label}] // array of published, pending, unpublished... page objects
|
|
42
42
|
* `select/site/33/pages?liveStatus=active` -> // array of publishedpage objects
|
|
43
43
|
*/
|
|
44
|
-
pages: number
|
|
45
|
-
onlinePages: number
|
|
44
|
+
pages: Array<number>;
|
|
45
|
+
onlinePages: Array<number>;
|
|
46
|
+
changedPages: Array<number>;
|
|
46
47
|
published: string;
|
|
47
48
|
rendering: boolean;
|
|
48
49
|
renderingHours: number;
|
|
@@ -51,23 +52,23 @@ export interface Site
|
|
|
51
52
|
smallAvatar: string;
|
|
52
53
|
updated: boolean;
|
|
53
54
|
pagesStatus: {
|
|
54
|
-
active: number
|
|
55
|
-
uploadPending: number
|
|
56
|
-
offlinePending: number
|
|
57
|
-
offline: number
|
|
58
|
-
deleted: number
|
|
55
|
+
active: Array<number>;
|
|
56
|
+
uploadPending: Array<number>;
|
|
57
|
+
offlinePending: Array<number>;
|
|
58
|
+
offline: Array<number>;
|
|
59
|
+
deleted: Array<number>;
|
|
59
60
|
};
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
export interface SiteData {
|
|
63
64
|
siteInfo: Site;
|
|
64
|
-
validPagesIds: number
|
|
65
|
+
validPagesIds: Array<number>;
|
|
65
66
|
siteHash: string | null;
|
|
66
|
-
unpublishHashes: string
|
|
67
|
-
siteLangs: Core.SiteLanguage
|
|
67
|
+
unpublishHashes: Array<string>;
|
|
68
|
+
siteLangs: Array<Core.SiteLanguage>;
|
|
68
69
|
defaultLang: Core.SiteLanguage | undefined;
|
|
69
|
-
headers: Header
|
|
70
|
-
footers: Footer
|
|
70
|
+
headers: Array<Header>;
|
|
71
|
+
footers: Array<Footer>;
|
|
71
72
|
socials: SocialsResponse;
|
|
72
73
|
}
|
|
73
74
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { GriddoAlertRegisterProps } from "@griddo/core";
|
|
2
|
+
|
|
3
|
+
import axios from "axios";
|
|
4
|
+
|
|
5
|
+
import { endpoints } from "../constants";
|
|
6
|
+
|
|
7
|
+
// Esta función está duplicada de core de manera intencionada por si esta recibe
|
|
8
|
+
// cambios necesitados solo por CX.
|
|
9
|
+
// Nota: Sí estamos reutilizando el type.
|
|
10
|
+
async function insertAlert({
|
|
11
|
+
area,
|
|
12
|
+
description,
|
|
13
|
+
fullData,
|
|
14
|
+
instantNotification = false,
|
|
15
|
+
level,
|
|
16
|
+
}: Omit<GriddoAlertRegisterProps, "publicApiUrl">) {
|
|
17
|
+
const url = endpoints.ALERT;
|
|
18
|
+
const body = { level, area, description, fullData, instantNotification };
|
|
19
|
+
|
|
20
|
+
try {
|
|
21
|
+
await axios.post(url, body, {
|
|
22
|
+
headers: { "Content-Type": "application/json", Connection: "close" },
|
|
23
|
+
});
|
|
24
|
+
} catch (error) {
|
|
25
|
+
console.error("Error creating Griddo alert:", error);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { insertAlert };
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
APIRequest,
|
|
3
|
+
APIResponses,
|
|
4
|
+
GetAPI,
|
|
5
|
+
PostAPI,
|
|
6
|
+
PutAPI,
|
|
7
|
+
ShowApiErrorOptions,
|
|
8
|
+
} from "../types/api";
|
|
9
|
+
import type { AxiosError, Method } from "axios";
|
|
10
|
+
|
|
11
|
+
import axios from "axios";
|
|
12
|
+
import dotenv from "dotenv";
|
|
13
|
+
import kleur from "kleur";
|
|
14
|
+
|
|
15
|
+
import { saveCache, searchCacheData } from "./cache";
|
|
16
|
+
import { delay, getSafeSiteId, msToSec } from "./core-utils";
|
|
17
|
+
import { buildLog } from "./loggin";
|
|
18
|
+
import { envs } from "../constants";
|
|
19
|
+
import { apiRegister } from "../registers";
|
|
20
|
+
import { AuthService } from "../services/auth";
|
|
21
|
+
|
|
22
|
+
dotenv.config();
|
|
23
|
+
|
|
24
|
+
// Envs
|
|
25
|
+
const {
|
|
26
|
+
env: { RETRY_WAIT_SECONDS = "4", RETRY_ATTEMPTS = "4" },
|
|
27
|
+
} = process;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Make a GET/PUT/POST request to the Griddo API.
|
|
31
|
+
*
|
|
32
|
+
* @template T Response Type returned.
|
|
33
|
+
* @returns {Promise<T>} A promise that is resolved with the data from the API response.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* const response = await requestAPI<Site>(
|
|
37
|
+
* { endpoint: "...", cacheKey: "...", ... },
|
|
38
|
+
* "get",
|
|
39
|
+
* "..."
|
|
40
|
+
* );
|
|
41
|
+
*/
|
|
42
|
+
async function requestAPI<T extends APIResponses>(
|
|
43
|
+
props: APIRequest,
|
|
44
|
+
method: Method,
|
|
45
|
+
appendToLog = "",
|
|
46
|
+
): Promise<T> {
|
|
47
|
+
const {
|
|
48
|
+
endpoint,
|
|
49
|
+
body,
|
|
50
|
+
cacheKey = "",
|
|
51
|
+
attempt = 1,
|
|
52
|
+
headers,
|
|
53
|
+
useApiCacheDir = true,
|
|
54
|
+
} = props;
|
|
55
|
+
const cacheOptions = { endpoint, body, headers, cacheKey };
|
|
56
|
+
|
|
57
|
+
// Cache
|
|
58
|
+
if (cacheKey && useApiCacheDir) {
|
|
59
|
+
const start = new Date();
|
|
60
|
+
const cacheData = searchCacheData<T>(cacheOptions);
|
|
61
|
+
|
|
62
|
+
if (cacheData) {
|
|
63
|
+
const siteId = getSafeSiteId(cacheData);
|
|
64
|
+
const siteIdMsg = siteId ? `site: ${siteId}` : "";
|
|
65
|
+
const duration = msToSec(new Date().getTime() - start.getTime());
|
|
66
|
+
buildLog(
|
|
67
|
+
`${method} (cache) ${siteIdMsg} ${endpoint} - ${duration}s ${appendToLog}`,
|
|
68
|
+
);
|
|
69
|
+
return cacheData;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Network
|
|
74
|
+
try {
|
|
75
|
+
const start = new Date();
|
|
76
|
+
const {
|
|
77
|
+
data,
|
|
78
|
+
headers: responseHeaders,
|
|
79
|
+
}: { data: T; headers: { "content-length": string } } = await axios({
|
|
80
|
+
url: endpoint,
|
|
81
|
+
method,
|
|
82
|
+
headers: Object.assign({}, headers, AuthService.headers),
|
|
83
|
+
data: body,
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
const siteId = getSafeSiteId(data);
|
|
87
|
+
const siteIdMsg = siteId ? `site: ${siteId}` : "";
|
|
88
|
+
const duration = msToSec(new Date().getTime() - start.getTime());
|
|
89
|
+
buildLog(
|
|
90
|
+
`${method} (fetch) ${siteIdMsg} ${endpoint} - ${duration}s ${appendToLog}`,
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
if (useApiCacheDir) {
|
|
94
|
+
saveCache(cacheOptions, data);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Only save registers if alerts are enabled
|
|
98
|
+
if (envs.GRIDDO_ALERT_FEATURE) {
|
|
99
|
+
const responseSize = Number.parseInt(responseHeaders["content-length"]);
|
|
100
|
+
if (responseSize > envs.GRIDDO_API_MAX_RESPONSE_SIZE) {
|
|
101
|
+
apiRegister.insert("API_RESPONSE_TOO_BIG", {
|
|
102
|
+
endpoint,
|
|
103
|
+
responseSize,
|
|
104
|
+
duration,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return data;
|
|
110
|
+
} catch (e) {
|
|
111
|
+
const error = e as AxiosError;
|
|
112
|
+
|
|
113
|
+
if (error.response?.status === 404) {
|
|
114
|
+
// @ts-expect-error page maybe will be 404
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if (attempt > parseInt(RETRY_ATTEMPTS)) {
|
|
119
|
+
console.log(`
|
|
120
|
+
Max attempts ${RETRY_ATTEMPTS} reached
|
|
121
|
+
--------------------------------------
|
|
122
|
+
- ${method.toUpperCase()} ${endpoint}
|
|
123
|
+
- BODY: ${JSON.stringify(body)}
|
|
124
|
+
- HEADERS: ${JSON.stringify(headers)}
|
|
125
|
+
- RESPONSE: ${error.response?.status} ${JSON.stringify(error.response?.data)}
|
|
126
|
+
--------------------------------------
|
|
127
|
+
`);
|
|
128
|
+
|
|
129
|
+
console.log(JSON.stringify(error, null, 2));
|
|
130
|
+
process.exit(1);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (!error.response) {
|
|
134
|
+
console.log("Unknown error occurred");
|
|
135
|
+
console.log(JSON.stringify(error, null, 2));
|
|
136
|
+
process.exit(1);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
showApiError(error, {
|
|
140
|
+
callInfo: { endpoint, body },
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
console.warn(`Waiting for retry: ${method}`, endpoint);
|
|
144
|
+
|
|
145
|
+
await delay(parseInt(RETRY_WAIT_SECONDS) * 1000);
|
|
146
|
+
|
|
147
|
+
return requestAPI<T>(
|
|
148
|
+
{
|
|
149
|
+
endpoint,
|
|
150
|
+
body,
|
|
151
|
+
headers,
|
|
152
|
+
cacheKey,
|
|
153
|
+
attempt: attempt + 1,
|
|
154
|
+
},
|
|
155
|
+
method,
|
|
156
|
+
appendToLog,
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Make a GET request to the Griddo API.
|
|
163
|
+
*
|
|
164
|
+
* @template T Response Type returned.
|
|
165
|
+
* @returns A promise that is resolved with the data from the API response.
|
|
166
|
+
*/
|
|
167
|
+
async function getApi<T extends APIResponses>(props: GetAPI) {
|
|
168
|
+
return requestAPI<T>(props, "get");
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Make a PUT request to the Griddo API.
|
|
173
|
+
*
|
|
174
|
+
* @template T Response Type returned.
|
|
175
|
+
* @returns A promise that is resolved with the data from the API response.
|
|
176
|
+
*/
|
|
177
|
+
async function putApi<T extends APIResponses>(props: PutAPI) {
|
|
178
|
+
return requestAPI<T>(props, "put");
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Make a POST request to the Griddo API.
|
|
183
|
+
*
|
|
184
|
+
* @template T Response Type returned.
|
|
185
|
+
* @returns A promise that is resolved with the data from the API response.
|
|
186
|
+
*/
|
|
187
|
+
async function postApi<T extends APIResponses>(props: PostAPI) {
|
|
188
|
+
const { endpoint, body, headers } = props;
|
|
189
|
+
const referenceFieldBodyParams =
|
|
190
|
+
endpoint.endsWith("/distributor") &&
|
|
191
|
+
`# ReferenceField body: ${JSON.stringify(body)} lang: ${JSON.stringify(
|
|
192
|
+
headers?.lang,
|
|
193
|
+
)}`;
|
|
194
|
+
|
|
195
|
+
return requestAPI<T>(props, "post", referenceFieldBodyParams || "");
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Shows an API error through the terminal.
|
|
200
|
+
*/
|
|
201
|
+
function showApiError(error: AxiosError, options: ShowApiErrorOptions) {
|
|
202
|
+
const { response, message, stack } = error;
|
|
203
|
+
const { callInfo } = options;
|
|
204
|
+
const { status, statusText, data } = response || {};
|
|
205
|
+
const callInfoArray = [];
|
|
206
|
+
|
|
207
|
+
for (const item of Object.keys(callInfo) as Array<keyof typeof callInfo>) {
|
|
208
|
+
callInfoArray.push(
|
|
209
|
+
`${item}: ${
|
|
210
|
+
typeof callInfo[item] === "object"
|
|
211
|
+
? JSON.stringify(callInfo[item])
|
|
212
|
+
: callInfo[item]
|
|
213
|
+
}`,
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// Compose the errors output
|
|
218
|
+
const callInfoStr = callInfoArray.join("\n");
|
|
219
|
+
const apiResponseStr = response
|
|
220
|
+
? `Code: ${status} - ${statusText}\nResponse: ${JSON.stringify(data)}`
|
|
221
|
+
: "";
|
|
222
|
+
const errorDetailsStr = `${message}\n${stack}`;
|
|
223
|
+
|
|
224
|
+
// Print the error
|
|
225
|
+
console.warn(
|
|
226
|
+
kleur.red(`
|
|
227
|
+
=============
|
|
228
|
+
|
|
229
|
+
{ Call info }
|
|
230
|
+
${callInfoStr}
|
|
231
|
+
|
|
232
|
+
{ API Response }
|
|
233
|
+
${apiResponseStr}
|
|
234
|
+
|
|
235
|
+
{ Error details }
|
|
236
|
+
${errorDetailsStr}
|
|
237
|
+
|
|
238
|
+
=============
|
|
239
|
+
`),
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export { getApi as get, postApi as post, putApi as put };
|