@griddo/cx 11.9.7-rc.2 → 11.9.8-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.
- package/README.md +78 -193
- package/build/commands/end-render.js +31 -0
- package/build/commands/end-render.js.map +7 -0
- package/build/commands/prepare-assets-directory.js +9 -0
- package/build/commands/prepare-assets-directory.js.map +7 -0
- package/build/commands/prepare-domains-render.js +38 -0
- package/build/commands/prepare-domains-render.js.map +7 -0
- package/build/commands/reset-render.js +31 -0
- package/build/commands/reset-render.js.map +7 -0
- package/build/commands/start-embeddings.js +31 -0
- package/build/commands/start-embeddings.js.map +7 -0
- package/build/commands/start-render.js +66 -0
- package/build/commands/start-render.js.map +7 -0
- package/build/commands/upload-search-content.js +31 -0
- package/build/commands/upload-search-content.js.map +7 -0
- package/build/core/GriddoLog.d.ts +16 -0
- package/build/core/db.d.ts +4 -0
- package/build/core/dist-rollback.d.ts +2 -0
- package/build/{errors/index.d.ts → core/errors.d.ts} +5 -4
- package/build/core/fs.d.ts +69 -0
- package/build/core/logger.d.ts +18 -0
- package/build/index.d.ts +10 -29
- package/build/index.js +406 -73
- package/build/services/auth.d.ts +2 -5
- package/build/services/manage-store.d.ts +48 -0
- package/build/services/render.d.ts +70 -0
- package/build/shared/envs.d.ts +19 -0
- package/build/{errors/errors-data.d.ts → shared/errors.d.ts} +5 -3
- package/build/shared/npm-modules/brush.d.ts +18 -0
- package/build/shared/npm-modules/find-up-simple.d.ts +34 -0
- package/build/shared/npm-modules/pkg-dir.d.ts +7 -0
- package/build/{types → shared/types}/api.d.ts +18 -18
- package/build/{types → shared/types}/global.d.ts +15 -16
- package/build/{types → shared/types}/navigation.d.ts +5 -5
- package/build/{types → shared/types}/pages.d.ts +9 -9
- package/build/shared/types/render.d.ts +54 -0
- package/build/{types → shared/types}/sites.d.ts +18 -19
- package/cli.mjs +239 -0
- package/exporter/build-esbuild.noop +42 -0
- package/exporter/build.sh +17 -28
- package/exporter/commands/README.md +151 -0
- package/exporter/commands/end-render.ts +65 -86
- package/exporter/commands/prepare-assets-directory.ts +34 -0
- package/exporter/commands/prepare-domains-render.ts +143 -35
- package/exporter/commands/reset-render.ts +12 -7
- package/exporter/commands/single-domain-upload-search-content.noop +206 -0
- package/exporter/commands/start-embeddings.ts +29 -0
- package/exporter/commands/start-render.ts +26 -64
- package/exporter/commands/upload-search-content.ts +201 -26
- package/exporter/core/GriddoLog.ts +45 -0
- package/exporter/core/check-env-health.ts +200 -0
- package/exporter/core/db-class.ts +54 -0
- package/exporter/core/db.ts +33 -0
- package/exporter/core/dist-rollback.ts +40 -0
- package/exporter/core/errors.ts +82 -0
- package/exporter/core/fs.ts +385 -0
- package/exporter/{utils → core}/images.ts +1 -6
- package/exporter/{utils → core}/instance.ts +9 -13
- package/exporter/core/life-cycle.ts +73 -0
- package/exporter/core/logger.ts +141 -0
- package/exporter/core/objects.ts +37 -0
- package/exporter/core/print-logos.ts +21 -0
- package/exporter/index.ts +14 -56
- package/exporter/services/api.ts +306 -0
- package/exporter/services/auth.ts +8 -10
- package/exporter/services/domains.ts +23 -8
- package/exporter/services/manage-sites.ts +116 -0
- package/exporter/services/manage-store.ts +235 -0
- package/exporter/services/navigation.ts +12 -18
- package/exporter/{utils → services}/pages.ts +27 -92
- package/exporter/services/reference-fields.ts +14 -32
- package/exporter/services/render-artifacts.ts +44 -0
- package/exporter/services/render.ts +229 -0
- package/exporter/services/robots.ts +33 -61
- package/exporter/services/sitemaps.ts +129 -0
- package/exporter/services/sites.ts +40 -28
- package/exporter/services/store.ts +386 -319
- package/exporter/shared/context.ts +49 -0
- package/exporter/{constants → shared}/endpoints.ts +12 -11
- package/exporter/shared/envs.ts +62 -0
- package/exporter/{errors/errors-data.ts → shared/errors.ts} +24 -14
- package/exporter/shared/npm-modules/README.md +36 -0
- package/exporter/shared/npm-modules/brush.ts +34 -0
- package/exporter/shared/npm-modules/find-up-simple.ts +100 -0
- package/exporter/shared/npm-modules/pkg-dir.ts +17 -0
- package/exporter/shared/npm-modules/xml-parser.ts +57 -0
- package/exporter/{types → shared/types}/api.ts +40 -41
- package/exporter/{types → shared/types}/global.ts +17 -21
- package/exporter/{types → shared/types}/navigation.ts +3 -3
- package/exporter/{types → shared/types}/pages.ts +10 -11
- package/exporter/shared/types/render.ts +63 -0
- package/exporter/{types → shared/types}/sites.ts +18 -19
- package/exporter/ssg-adapters/gatsby/actions/clean.ts +26 -0
- package/exporter/ssg-adapters/gatsby/actions/close.ts +17 -0
- package/exporter/ssg-adapters/gatsby/actions/data.ts +22 -0
- package/exporter/ssg-adapters/gatsby/actions/healthCheck.ts +10 -0
- package/exporter/ssg-adapters/gatsby/actions/init.ts +12 -0
- package/exporter/ssg-adapters/gatsby/actions/logs.ts +10 -0
- package/exporter/ssg-adapters/gatsby/actions/meta.ts +13 -0
- package/exporter/ssg-adapters/gatsby/actions/prepare.ts +9 -0
- package/exporter/ssg-adapters/gatsby/actions/relocation.ts +15 -0
- package/exporter/ssg-adapters/gatsby/actions/restore.ts +21 -0
- package/exporter/ssg-adapters/gatsby/actions/ssg.ts +12 -0
- package/exporter/ssg-adapters/gatsby/actions/sync.ts +65 -0
- package/exporter/ssg-adapters/gatsby/index.ts +114 -0
- package/exporter/ssg-adapters/gatsby/shared/artifacts.ts +16 -0
- package/exporter/ssg-adapters/gatsby/shared/diff-assets.ts +128 -0
- package/exporter/ssg-adapters/gatsby/shared/extract-assets.ts +75 -0
- package/exporter/ssg-adapters/gatsby/shared/gatsby-build.ts +58 -0
- package/exporter/ssg-adapters/gatsby/shared/sync-render.ts +300 -0
- package/exporter/ssg-adapters/gatsby/shared/types.ts +35 -0
- package/exporter/ssg-adapters/gatsby/shared/utils.ts +33 -0
- package/gatsby-browser.tsx +41 -58
- package/gatsby-config.ts +10 -17
- package/gatsby-node.ts +20 -80
- package/gatsby-ssr.tsx +2 -1
- package/package.json +41 -92
- package/plugins/gatsby-plugin-svgr-loader/gatsby-node.js +55 -0
- package/plugins/gatsby-plugin-svgr-loader/package.json +8 -0
- package/react/DynamicScript/index.tsx +33 -0
- package/{exporter/react/Favicon → react/GriddoFavicon}/index.tsx +3 -9
- package/{exporter/react → react}/GriddoIntegrations/index.tsx +17 -23
- package/{exporter/react → react}/GriddoIntegrations/utils.ts +24 -12
- package/react/GriddoOpenGraph/index.tsx +39 -0
- package/src/components/Head.tsx +30 -73
- package/src/components/template.tsx +8 -30
- package/src/gatsby-node-utils.ts +76 -2
- package/src/html.tsx +2 -11
- package/src/types.ts +5 -5
- package/tsconfig.commands.json +36 -0
- package/tsconfig.exporter.json +20 -0
- package/tsconfig.json +5 -3
- package/build/adapters/gatsby/index.d.ts +0 -4
- package/build/adapters/gatsby/utils.d.ts +0 -22
- package/build/artifacts/index.d.ts +0 -6
- package/build/commands/end-render.d.ts +0 -2
- package/build/commands/move-assets.d.ts +0 -1
- package/build/commands/prepare-domains-render.d.ts +0 -1
- package/build/commands/reset-render.d.ts +0 -2
- package/build/commands/start-render.d.ts +0 -2
- package/build/commands/upload-search-content.d.ts +0 -2
- package/build/constants/envs.d.ts +0 -37
- package/build/constants/index.d.ts +0 -57
- package/build/end-render.js +0 -74
- package/build/end-render.js.map +0 -7
- package/build/index.js.map +0 -7
- package/build/prepare-domains-render.js +0 -73
- package/build/prepare-domains-render.js.map +0 -7
- package/build/react/Favicon/index.d.ts +0 -5
- package/build/react/Favicon/utils.d.ts +0 -9
- package/build/react/GriddoIntegrations/index.d.ts +0 -20
- package/build/react/GriddoIntegrations/utils.d.ts +0 -26
- package/build/react/index.d.ts +0 -3
- package/build/react/index.js +0 -3
- package/build/registers/api.d.ts +0 -9
- package/build/registers/gatsby.d.ts +0 -9
- package/build/registers/index.d.ts +0 -3
- package/build/reset-render.js +0 -74
- package/build/reset-render.js.map +0 -7
- package/build/services/domains.d.ts +0 -6
- package/build/services/navigation.d.ts +0 -50
- package/build/services/reference-fields.d.ts +0 -20
- package/build/services/register.d.ts +0 -36
- package/build/services/robots.d.ts +0 -19
- package/build/services/settings.d.ts +0 -4
- package/build/services/sites.d.ts +0 -29
- package/build/services/store.d.ts +0 -6
- package/build/start-render.js +0 -100
- package/build/start-render.js.map +0 -7
- package/build/types/templates.d.ts +0 -8
- package/build/upload-search-content.js +0 -74
- package/build/upload-search-content.js.map +0 -7
- package/build/utils/alerts.d.ts +0 -3
- package/build/utils/api.d.ts +0 -23
- package/build/utils/cache.d.ts +0 -35
- package/build/utils/core-utils.d.ts +0 -107
- package/build/utils/create-build-data.d.ts +0 -8
- package/build/utils/domains.d.ts +0 -13
- package/build/utils/folders.d.ts +0 -53
- package/build/utils/health-checks.d.ts +0 -7
- package/build/utils/images.d.ts +0 -16
- package/build/utils/loggin.d.ts +0 -51
- package/build/utils/pages.d.ts +0 -34
- package/build/utils/render.d.ts +0 -13
- package/build/utils/searches.d.ts +0 -15
- package/build/utils/sites.d.ts +0 -31
- package/build/utils/store.d.ts +0 -81
- package/cx.config.d.ts +0 -5
- package/cx.config.js +0 -36
- package/exporter/adapters/gatsby/index.ts +0 -162
- package/exporter/adapters/gatsby/utils.ts +0 -161
- package/exporter/artifacts/README.md +0 -34
- package/exporter/artifacts/index.ts +0 -33
- package/exporter/commands/move-assets.ts +0 -11
- package/exporter/constants/envs.ts +0 -94
- package/exporter/constants/index.ts +0 -129
- package/exporter/errors/index.ts +0 -40
- package/exporter/react/index.tsx +0 -11
- package/exporter/registers/api.ts +0 -14
- package/exporter/registers/gatsby.ts +0 -14
- package/exporter/registers/index.ts +0 -4
- package/exporter/services/register.ts +0 -113
- package/exporter/services/settings.ts +0 -17
- package/exporter/utils/alerts.ts +0 -29
- package/exporter/utils/api.ts +0 -243
- package/exporter/utils/cache.ts +0 -142
- package/exporter/utils/core-utils.ts +0 -458
- package/exporter/utils/create-build-data.ts +0 -17
- package/exporter/utils/domains.ts +0 -39
- package/exporter/utils/folders.ts +0 -320
- package/exporter/utils/health-checks.ts +0 -64
- package/exporter/utils/loggin.ts +0 -184
- package/exporter/utils/render.ts +0 -71
- package/exporter/utils/searches.ts +0 -156
- package/exporter/utils/sites.ts +0 -312
- package/exporter/utils/store.ts +0 -314
- package/src/README.md +0 -7
- package/start-render.js +0 -7
- /package/build/{utils → core}/instance.d.ts +0 -0
- /package/build/{constants → shared}/endpoints.d.ts +0 -0
- /package/exporter/{types → shared/types}/templates.ts +0 -0
- /package/{exporter/react/Favicon → react/GriddoFavicon}/utils.ts +0 -0
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
1
|
import { formatImage } from "./utils";
|
|
4
2
|
|
|
5
|
-
function
|
|
3
|
+
function GriddoFavicon({ url }: { url: string | undefined }) {
|
|
6
4
|
if (!url) {
|
|
7
5
|
return null;
|
|
8
6
|
}
|
|
@@ -26,13 +24,9 @@ function Favicon({ url }: { url: string | undefined }) {
|
|
|
26
24
|
sizes="180x180"
|
|
27
25
|
href={formatImage(url, { width: 180, height: 180, format: "png" })}
|
|
28
26
|
/>
|
|
29
|
-
<link
|
|
30
|
-
rel="icon"
|
|
31
|
-
type="image/svg+xml"
|
|
32
|
-
href={formatImage(url, { format: "svg" })}
|
|
33
|
-
/>
|
|
27
|
+
<link rel="icon" type="image/svg+xml" href={formatImage(url, { format: "svg" })} />
|
|
34
28
|
</>
|
|
35
29
|
);
|
|
36
30
|
}
|
|
37
31
|
|
|
38
|
-
export {
|
|
32
|
+
export { GriddoFavicon };
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import type { Dimensions } from "../../types/pages";
|
|
2
1
|
import type { Core } from "@griddo/core";
|
|
2
|
+
import type { Dimensions } from "../../build";
|
|
3
3
|
|
|
4
|
-
import { generateAutomaticDimensions } from "@griddo-instance";
|
|
5
|
-
import parse from "html-react-parser";
|
|
6
4
|
import * as React from "react";
|
|
7
5
|
|
|
6
|
+
import { generateAutomaticDimensions } from "@griddo-instance";
|
|
7
|
+
|
|
8
8
|
import {
|
|
9
9
|
composeAnalytics,
|
|
10
|
+
extractScriptContent,
|
|
10
11
|
filterBodyIntegrationFromPosition,
|
|
11
12
|
filterHeadIntegrations,
|
|
12
13
|
} from "./utils";
|
|
13
14
|
|
|
14
15
|
export interface GriddoIntegrationsProps {
|
|
15
|
-
integrations?:
|
|
16
|
+
integrations?: Core.PageIntegration[];
|
|
16
17
|
location: "head" | "start-body" | "end-body";
|
|
17
18
|
id?: string;
|
|
18
19
|
analyticScript?: string;
|
|
@@ -56,12 +57,7 @@ function GriddoIntegrations(props: GriddoIntegrationsProps) {
|
|
|
56
57
|
// @shame!
|
|
57
58
|
// El fix sería llamar a `composeAnalytics()` solo si `pageInfo` existe.
|
|
58
59
|
const { analyticsScript, analyticsDimensions } = pageInfo
|
|
59
|
-
? composeAnalytics(
|
|
60
|
-
siteScript,
|
|
61
|
-
dimensions,
|
|
62
|
-
pageInfo,
|
|
63
|
-
generateAutomaticDimensions,
|
|
64
|
-
)
|
|
60
|
+
? composeAnalytics(siteScript, dimensions, pageInfo, generateAutomaticDimensions)
|
|
65
61
|
: { analyticsDimensions: null, analyticsScript: null };
|
|
66
62
|
|
|
67
63
|
// GTAG WITH UA
|
|
@@ -70,9 +66,13 @@ function GriddoIntegrations(props: GriddoIntegrationsProps) {
|
|
|
70
66
|
`https://www.googletagmanager.com/gtag/js?id=${analyticsScript}`) ||
|
|
71
67
|
null;
|
|
72
68
|
|
|
69
|
+
const siteScriptContent = extractScriptContent(siteScript);
|
|
70
|
+
|
|
73
71
|
return (
|
|
74
72
|
<>
|
|
75
73
|
{integrationsOrdered?.map((integration, key) => {
|
|
74
|
+
const integrationScriptContent = extractScriptContent(integration.content);
|
|
75
|
+
|
|
76
76
|
/* Data Layer */
|
|
77
77
|
if (integration.type === "datalayer") {
|
|
78
78
|
return (
|
|
@@ -88,25 +88,19 @@ function GriddoIntegrations(props: GriddoIntegrationsProps) {
|
|
|
88
88
|
if (integration.type === "analytics") {
|
|
89
89
|
// If UA- is provided
|
|
90
90
|
if (analyticsWithUA) {
|
|
91
|
-
return
|
|
92
|
-
<script key={key} src={analyticsWithUA} data-griddo-id={id} />
|
|
93
|
-
);
|
|
91
|
+
return <script key={key} src={analyticsWithUA} data-griddo-id={id} />;
|
|
94
92
|
}
|
|
95
93
|
|
|
96
|
-
return (
|
|
97
|
-
<
|
|
98
|
-
|
|
99
|
-
</React.Fragment>
|
|
100
|
-
);
|
|
94
|
+
return siteScriptContent ? (
|
|
95
|
+
<script key={key} dangerouslySetInnerHTML={{ __html: siteScriptContent }} />
|
|
96
|
+
) : null;
|
|
101
97
|
}
|
|
102
98
|
|
|
103
99
|
/* Integration integration.type === "addon" */
|
|
104
100
|
if (integration.type === "addon") {
|
|
105
|
-
return (
|
|
106
|
-
<
|
|
107
|
-
|
|
108
|
-
</React.Fragment>
|
|
109
|
-
);
|
|
101
|
+
return integrationScriptContent ? (
|
|
102
|
+
<script key={key} dangerouslySetInnerHTML={{ __html: integrationScriptContent }} />
|
|
103
|
+
) : null;
|
|
110
104
|
}
|
|
111
105
|
|
|
112
106
|
return null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Dimensions } from "../../types/pages";
|
|
2
1
|
import type { Core } from "@griddo/core";
|
|
2
|
+
import type { Dimensions } from "../../build";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Return true if the argument is an object (not null)
|
|
@@ -9,7 +9,7 @@ function isObject(value: unknown) {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
function filterBodyIntegrationFromPosition(
|
|
12
|
-
integrations:
|
|
12
|
+
integrations: Core.PageIntegration[],
|
|
13
13
|
position: "start" | "end",
|
|
14
14
|
) {
|
|
15
15
|
return (
|
|
@@ -26,7 +26,7 @@ function filterBodyIntegrationFromPosition(
|
|
|
26
26
|
);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
function filterHeadIntegrations(integrations:
|
|
29
|
+
function filterHeadIntegrations(integrations: Core.PageIntegration[]) {
|
|
30
30
|
// A la hora de filtrar las integraciones, los addons si que tienen
|
|
31
31
|
// contenido en head pero en el caso de analytics y datalayer el contenido
|
|
32
32
|
// llega a null, pero deben ir en el <head>
|
|
@@ -48,7 +48,7 @@ function filterHeadIntegrations(integrations: Array<Core.PageIntegration>) {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
const filterPositionIntegrations = (
|
|
51
|
-
integrations:
|
|
51
|
+
integrations: Core.PageIntegration[],
|
|
52
52
|
position: "head" | "start" | "end",
|
|
53
53
|
) => {
|
|
54
54
|
switch (position) {
|
|
@@ -70,16 +70,13 @@ function composeAnalytics(
|
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
72
|
},
|
|
73
|
-
|
|
74
|
-
generateAutomaticDimensions = (page: Record<string, unknown>) => null,
|
|
73
|
+
generateAutomaticDimensions = (_page: Record<string, unknown>) => null,
|
|
75
74
|
) {
|
|
76
75
|
const analyticsScript = siteScriptRaw ? siteScriptRaw.trim() : "";
|
|
77
76
|
|
|
78
77
|
// Las dimensiones o DataLayer
|
|
79
78
|
const dynamicValuePrefix = "__SCRIPT:";
|
|
80
|
-
const dimensionValues = isObject(dimensions?.values)
|
|
81
|
-
? dimensions?.values
|
|
82
|
-
: {};
|
|
79
|
+
const dimensionValues = isObject(dimensions?.values) ? dimensions?.values : {};
|
|
83
80
|
const automaticDimensionValues = generateAutomaticDimensions
|
|
84
81
|
? generateAutomaticDimensions(page || {})
|
|
85
82
|
: {};
|
|
@@ -104,9 +101,7 @@ function composeAnalytics(
|
|
|
104
101
|
);
|
|
105
102
|
}
|
|
106
103
|
|
|
107
|
-
const analyticsDimensions = allDimensions.length
|
|
108
|
-
? `{${allDimensions.join(",")}}`
|
|
109
|
-
: null;
|
|
104
|
+
const analyticsDimensions = allDimensions.length ? `{${allDimensions.join(",")}}` : null;
|
|
110
105
|
|
|
111
106
|
return {
|
|
112
107
|
analyticsScript,
|
|
@@ -114,8 +109,25 @@ function composeAnalytics(
|
|
|
114
109
|
};
|
|
115
110
|
}
|
|
116
111
|
|
|
112
|
+
function extractScriptContent(rawInput?: unknown) {
|
|
113
|
+
if (typeof rawInput !== "string" || !rawInput) {
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const trimmedInput = rawInput.trim();
|
|
118
|
+
|
|
119
|
+
if (!trimmedInput.startsWith("<script>") || !trimmedInput.endsWith("</script>")) {
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const content = trimmedInput.replace(/<script>|<\/script>/g, "").trim();
|
|
124
|
+
|
|
125
|
+
return content || null;
|
|
126
|
+
}
|
|
127
|
+
|
|
117
128
|
export {
|
|
118
129
|
composeAnalytics,
|
|
130
|
+
extractScriptContent,
|
|
119
131
|
filterBodyIntegrationFromPosition,
|
|
120
132
|
filterHeadIntegrations,
|
|
121
133
|
filterPositionIntegrations,
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { CustomHeadProps } from "../../src/types";
|
|
2
|
+
|
|
3
|
+
interface GriddoOpenGraphProps {
|
|
4
|
+
openGraph?: CustomHeadProps["pageContext"]["openGraph"];
|
|
5
|
+
pageMetadata?: CustomHeadProps["pageContext"]["pageMetadata"];
|
|
6
|
+
siteMetadata?: CustomHeadProps["pageContext"]["siteMetadata"];
|
|
7
|
+
locale?: string;
|
|
8
|
+
fullUrl?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const GriddoOpenGraph = (props: GriddoOpenGraphProps) => {
|
|
12
|
+
const { openGraph, pageMetadata, siteMetadata, locale, fullUrl } = props;
|
|
13
|
+
|
|
14
|
+
// La lógica de fallback se encapsula aquí
|
|
15
|
+
const ogTitle = openGraph?.title || pageMetadata?.title;
|
|
16
|
+
const ogDescription = openGraph?.description || pageMetadata?.description;
|
|
17
|
+
const ogUrl = pageMetadata?.canonical || fullUrl || "";
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<>
|
|
21
|
+
{/* Open Graph */}
|
|
22
|
+
{!!siteMetadata?.title && <meta property="og:site_name" content={siteMetadata.title} />}
|
|
23
|
+
{!!locale && <meta property="og:locale" content={locale} />}
|
|
24
|
+
{!!ogTitle && <meta property="og:title" content={ogTitle} />}
|
|
25
|
+
<meta property="og:type" content={openGraph?.type || "website"} />
|
|
26
|
+
{!!ogDescription && <meta property="og:description" content={ogDescription} />}
|
|
27
|
+
{!!openGraph?.image && <meta property="og:image" content={openGraph.image} />}
|
|
28
|
+
<meta property="og:url" content={ogUrl} />
|
|
29
|
+
|
|
30
|
+
{/* Twitter */}
|
|
31
|
+
<meta property="twitter:card" content="summary_large_image" />
|
|
32
|
+
{!!openGraph?.twitterImage && (
|
|
33
|
+
<meta property="twitter:image" content={openGraph.twitterImage} />
|
|
34
|
+
)}
|
|
35
|
+
</>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export { GriddoOpenGraph };
|
package/src/components/Head.tsx
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import type { CustomHeadProps } from "../types";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
3
|
+
import { GriddoFavicon } from "../../react/GriddoFavicon";
|
|
4
|
+
import { GriddoIntegrations } from "../../react/GriddoIntegrations";
|
|
5
|
+
import { GriddoOpenGraph } from "../../react/GriddoOpenGraph";
|
|
6
|
+
|
|
7
|
+
function cleanCommaSeparated(str: string) {
|
|
8
|
+
return str
|
|
9
|
+
.split(",")
|
|
10
|
+
.map((item) => item.trim())
|
|
11
|
+
.filter(Boolean)
|
|
12
|
+
.join(",");
|
|
13
|
+
}
|
|
5
14
|
|
|
6
15
|
/**
|
|
7
16
|
* Gatsby Head API
|
|
@@ -12,13 +21,7 @@ const Head = (props: CustomHeadProps) => {
|
|
|
12
21
|
pageContext: {
|
|
13
22
|
locale,
|
|
14
23
|
openGraph,
|
|
15
|
-
page: {
|
|
16
|
-
disableHrefLangs,
|
|
17
|
-
fullUrl,
|
|
18
|
-
defaultLang,
|
|
19
|
-
integrations = [],
|
|
20
|
-
dimensions,
|
|
21
|
-
},
|
|
24
|
+
page: { disableHrefLangs, fullUrl, defaultLang, integrations = [], dimensions },
|
|
22
25
|
pageMetadata,
|
|
23
26
|
siteMetadata,
|
|
24
27
|
siteOptions,
|
|
@@ -31,19 +34,13 @@ const Head = (props: CustomHeadProps) => {
|
|
|
31
34
|
);
|
|
32
35
|
|
|
33
36
|
const showMetaRobots =
|
|
34
|
-
!!metaRobots &&
|
|
35
|
-
(siteOptions?.showBasicMetaRobots || metaRobots !== "index,follow");
|
|
37
|
+
!!metaRobots && (siteOptions?.showBasicMetaRobots || metaRobots !== "index,follow");
|
|
36
38
|
|
|
37
|
-
|
|
38
|
-
const cleanPageLanguages =
|
|
39
|
-
pageMetadata?.pageLanguages?.filter((item) => item.isLive) || [];
|
|
39
|
+
const cleanPageLanguages = pageMetadata?.pageLanguages?.filter((item) => item.isLive) || [];
|
|
40
40
|
|
|
41
41
|
const useCanonical =
|
|
42
42
|
!!pageMetadata?.canonical &&
|
|
43
|
-
!(
|
|
44
|
-
siteOptions?.avoidSelfReferenceCanonicals &&
|
|
45
|
-
pageMetadata?.canonical === fullUrl
|
|
46
|
-
);
|
|
43
|
+
!(siteOptions?.avoidSelfReferenceCanonicals && pageMetadata?.canonical === fullUrl);
|
|
47
44
|
|
|
48
45
|
const useHrefLangs =
|
|
49
46
|
!(
|
|
@@ -60,8 +57,7 @@ const Head = (props: CustomHeadProps) => {
|
|
|
60
57
|
(useHrefLangs &&
|
|
61
58
|
!siteOptions?.avoidHrefLangXDefault &&
|
|
62
59
|
defaultLangId &&
|
|
63
|
-
cleanPageLanguages.find((item) => item.languageId === defaultLangId)
|
|
64
|
-
?.url) ||
|
|
60
|
+
cleanPageLanguages.find((item) => item.languageId === defaultLangId)?.url) ||
|
|
65
61
|
null;
|
|
66
62
|
|
|
67
63
|
return (
|
|
@@ -72,15 +68,12 @@ const Head = (props: CustomHeadProps) => {
|
|
|
72
68
|
{!!pageMetadata?.description && (
|
|
73
69
|
<meta name="description" content={pageMetadata?.description} />
|
|
74
70
|
)}
|
|
75
|
-
{siteOptions?.useMetaTitle &&
|
|
76
|
-
<meta name="title" content={pageMetadata?.title} />
|
|
77
|
-
)}
|
|
71
|
+
{siteOptions?.useMetaTitle && <meta name="title" content={pageMetadata?.title} />}
|
|
78
72
|
{useCanonical && <link rel="canonical" href={pageMetadata?.canonical} />}
|
|
79
73
|
|
|
80
|
-
{
|
|
81
|
-
<Favicon url={siteMetadata?.favicon} />
|
|
74
|
+
<GriddoFavicon url={siteMetadata?.favicon} />
|
|
82
75
|
|
|
83
|
-
{/* Alternate,
|
|
76
|
+
{/* Alternate, only if the page is indexed and has translations */}
|
|
84
77
|
{hrefLangXDefaultUrl && (
|
|
85
78
|
<link rel="alternate" href={hrefLangXDefaultUrl} hrefLang="x-default" />
|
|
86
79
|
)}
|
|
@@ -97,51 +90,23 @@ const Head = (props: CustomHeadProps) => {
|
|
|
97
90
|
{/* Robots */}
|
|
98
91
|
{showMetaRobots && <meta name="robots" content={metaRobots} />}
|
|
99
92
|
|
|
100
|
-
{/*
|
|
101
|
-
{
|
|
102
|
-
<meta property="og:site_name" content={siteMetadata?.title} />
|
|
103
|
-
)}
|
|
104
|
-
{!!locale && <meta property="og:locale" content={locale} />}
|
|
105
|
-
{(!!openGraph?.title || !!pageMetadata?.title) && (
|
|
106
|
-
<meta
|
|
107
|
-
property="og:title"
|
|
108
|
-
content={openGraph?.title || pageMetadata?.title}
|
|
109
|
-
/>
|
|
110
|
-
)}
|
|
111
|
-
<meta property="og:type" content={openGraph?.type || "website"} />
|
|
112
|
-
{(!!openGraph?.description || !!pageMetadata?.description) && (
|
|
113
|
-
<meta
|
|
114
|
-
property="og:description"
|
|
115
|
-
content={openGraph?.description || pageMetadata?.description}
|
|
116
|
-
/>
|
|
117
|
-
)}
|
|
118
|
-
{!!openGraph?.image && (
|
|
119
|
-
<meta property="og:image" content={openGraph?.image} />
|
|
120
|
-
)}
|
|
121
|
-
<meta
|
|
122
|
-
property="og:url"
|
|
123
|
-
content={pageMetadata?.canonical || fullUrl || ""}
|
|
124
|
-
/>
|
|
125
|
-
|
|
126
|
-
{/* Twitter */}
|
|
127
|
-
<meta property="twitter:card" content="summary_large_image" />
|
|
128
|
-
{!!openGraph?.twitterImage && (
|
|
129
|
-
<meta property="twitter:image" content={openGraph?.twitterImage} />
|
|
130
|
-
)}
|
|
131
|
-
|
|
132
|
-
{/* Debug */}
|
|
133
|
-
{/* {!siteOptions?.avoidDebugMetas && (
|
|
134
|
-
<meta
|
|
135
|
-
property="debug"
|
|
136
|
-
content={`Griddo v${griddoVersion} @ ${renderDate}}`}
|
|
137
|
-
/>
|
|
138
|
-
)} */}
|
|
93
|
+
{/* Griddo Metadatos */}
|
|
94
|
+
{<meta name="griddo-render-date" content={new Date().toISOString()} />}
|
|
139
95
|
|
|
140
96
|
{/* Keywords */}
|
|
141
97
|
{siteOptions?.useMetaKeywords && !!pageMetadata?.metaKeywords && (
|
|
142
98
|
<meta name="keywords" content={pageMetadata.metaKeywords} />
|
|
143
99
|
)}
|
|
144
100
|
|
|
101
|
+
{/* Open Graph */}
|
|
102
|
+
<GriddoOpenGraph
|
|
103
|
+
openGraph={openGraph}
|
|
104
|
+
pageMetadata={pageMetadata}
|
|
105
|
+
siteMetadata={siteMetadata}
|
|
106
|
+
locale={locale}
|
|
107
|
+
fullUrl={fullUrl}
|
|
108
|
+
/>
|
|
109
|
+
|
|
145
110
|
{/* Integrations */}
|
|
146
111
|
<GriddoIntegrations
|
|
147
112
|
id={fullUrl}
|
|
@@ -155,12 +120,4 @@ const Head = (props: CustomHeadProps) => {
|
|
|
155
120
|
);
|
|
156
121
|
};
|
|
157
122
|
|
|
158
|
-
function cleanCommaSeparated(str: string) {
|
|
159
|
-
return str
|
|
160
|
-
.split(",")
|
|
161
|
-
.map((item) => item.trim())
|
|
162
|
-
.filter(Boolean)
|
|
163
|
-
.join(",");
|
|
164
|
-
}
|
|
165
|
-
|
|
166
123
|
export { Head };
|
|
@@ -1,30 +1,17 @@
|
|
|
1
|
-
import type { TemplateProps } from "../types";
|
|
2
1
|
import type { Core } from "@griddo/core";
|
|
2
|
+
import type { TemplateProps } from "../types";
|
|
3
3
|
|
|
4
4
|
import { Page as RenderGriddoPage } from "@griddo/core";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
components,
|
|
8
|
-
SiteProvider,
|
|
9
|
-
templates,
|
|
10
|
-
formsTemplates,
|
|
11
|
-
} from "@griddo-instance";
|
|
5
|
+
import { components, formsTemplates, SiteProvider, templates } from "@griddo-instance";
|
|
12
6
|
import { Link, navigate } from "gatsby";
|
|
13
|
-
import * as React from "react";
|
|
14
7
|
|
|
15
|
-
|
|
8
|
+
import { GriddoIntegrations } from "../../react/GriddoIntegrations";
|
|
9
|
+
|
|
16
10
|
export { Head } from "./Head";
|
|
17
11
|
|
|
18
12
|
const Template = (data: TemplateProps) => {
|
|
19
13
|
const {
|
|
20
|
-
pageContext: {
|
|
21
|
-
cloudinaryName,
|
|
22
|
-
page,
|
|
23
|
-
siteLangs,
|
|
24
|
-
siteMetadata,
|
|
25
|
-
socials,
|
|
26
|
-
theme,
|
|
27
|
-
},
|
|
14
|
+
pageContext: { cloudinaryName, page, siteLangs, siteMetadata, socials, theme },
|
|
28
15
|
} = data;
|
|
29
16
|
|
|
30
17
|
const library = {
|
|
@@ -33,8 +20,6 @@ const Template = (data: TemplateProps) => {
|
|
|
33
20
|
formsTemplates,
|
|
34
21
|
};
|
|
35
22
|
|
|
36
|
-
const mappedTheme = theme || "default-theme";
|
|
37
|
-
|
|
38
23
|
const header = data.pageContext.header as Core.HeaderModule;
|
|
39
24
|
const footer = data.pageContext.footer as Core.FooterModule;
|
|
40
25
|
|
|
@@ -52,14 +37,10 @@ const Template = (data: TemplateProps) => {
|
|
|
52
37
|
siteLangs={siteLangs}
|
|
53
38
|
siteMetadata={siteMetadata}
|
|
54
39
|
socials={socials}
|
|
55
|
-
theme={
|
|
40
|
+
theme={theme}
|
|
56
41
|
>
|
|
57
|
-
<GriddoIntegrations
|
|
58
|
-
location="start-body"
|
|
59
|
-
integrations={page.integrations}
|
|
60
|
-
/>
|
|
42
|
+
<GriddoIntegrations location="start-body" integrations={page.integrations} />
|
|
61
43
|
|
|
62
|
-
{/* Render every page */}
|
|
63
44
|
<RenderGriddoPage
|
|
64
45
|
apiUrl={page.apiUrl}
|
|
65
46
|
content={page}
|
|
@@ -70,10 +51,7 @@ const Template = (data: TemplateProps) => {
|
|
|
70
51
|
pageLanguages={page.pageLanguages}
|
|
71
52
|
/>
|
|
72
53
|
|
|
73
|
-
<GriddoIntegrations
|
|
74
|
-
location="end-body"
|
|
75
|
-
integrations={page.integrations}
|
|
76
|
-
/>
|
|
54
|
+
<GriddoIntegrations location="end-body" integrations={page.integrations} />
|
|
77
55
|
</SiteProvider>
|
|
78
56
|
);
|
|
79
57
|
};
|
package/src/gatsby-node-utils.ts
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import type { GatsbyNode } from "gatsby";
|
|
2
|
+
import type { GriddoPageObject } from "../build";
|
|
2
3
|
|
|
3
|
-
import
|
|
4
|
+
import fsp from "node:fs/promises";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
componentLibraryPathAlias,
|
|
9
|
+
getRenderPathsHydratedWithDomainFromDB,
|
|
10
|
+
isComponentLibrary,
|
|
11
|
+
ReadFromStoreError,
|
|
12
|
+
throwError,
|
|
13
|
+
walkStore,
|
|
14
|
+
} from "../build";
|
|
4
15
|
|
|
5
16
|
const onCreateWebpackConfig: GatsbyNode["onCreateWebpackConfig"] = ({
|
|
6
17
|
actions,
|
|
@@ -40,7 +51,70 @@ const onCreateWebpackConfig: GatsbyNode["onCreateWebpackConfig"] = ({
|
|
|
40
51
|
// No sourcemaps on builds
|
|
41
52
|
if (stage === "build-javascript") {
|
|
42
53
|
actions.setWebpackConfig({ devtool: false });
|
|
54
|
+
|
|
55
|
+
// TODO: Hablar con infra para no invalidar cache de los assets
|
|
56
|
+
// const newWebpackConfig = {
|
|
57
|
+
// ...getConfig(),
|
|
58
|
+
// output: {
|
|
59
|
+
// filename: `[name].js`, // no contenthash
|
|
60
|
+
// chunkFilename: `[name].js`, // no contenthash
|
|
61
|
+
// path: getConfig().output.path,
|
|
62
|
+
// publicPath: getConfig().output.publicPath,
|
|
63
|
+
// },
|
|
64
|
+
// };
|
|
65
|
+
|
|
66
|
+
// actions.replaceWebpackConfig(newWebpackConfig);
|
|
43
67
|
}
|
|
44
68
|
};
|
|
45
69
|
|
|
46
|
-
|
|
70
|
+
/**
|
|
71
|
+
* Return a scale size colors with a number and a measure string (KB by default).
|
|
72
|
+
*
|
|
73
|
+
* @param size The page size in KB.
|
|
74
|
+
* @param measure The measure string to be added in the log.
|
|
75
|
+
*/
|
|
76
|
+
function pageSizeLog(size: number, measure = "KB") {
|
|
77
|
+
return `${size}${measure}`;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Read all pages stored in the `store` Griddo directory and returns one by one
|
|
82
|
+
* with a generator.
|
|
83
|
+
*
|
|
84
|
+
* @param basePath - Base directory to get pages from.
|
|
85
|
+
* @param options.withSizeProp - Add size prop to the page object.
|
|
86
|
+
* @todo throw error if the basePath is not an store folder
|
|
87
|
+
*/
|
|
88
|
+
async function* getBuildPagesFromStore<PageType extends GriddoPageObject>(args?: {
|
|
89
|
+
basePath?: string;
|
|
90
|
+
withSizeProp?: boolean;
|
|
91
|
+
dbFilePath?: string;
|
|
92
|
+
}): AsyncGenerator<PageType> {
|
|
93
|
+
const { basePath, withSizeProp, dbFilePath } = args || {};
|
|
94
|
+
const { __root } = await getRenderPathsHydratedWithDomainFromDB({
|
|
95
|
+
dbFilePath,
|
|
96
|
+
});
|
|
97
|
+
const pagesDirPath = basePath || path.join(__root, "store");
|
|
98
|
+
|
|
99
|
+
// Procesamos archivos JSON uno por uno sin cargar todos los paths en memoria
|
|
100
|
+
for await (const filePath of walkStore(pagesDirPath)) {
|
|
101
|
+
try {
|
|
102
|
+
const fileContent = await fsp.readFile(filePath, "utf-8");
|
|
103
|
+
const page = JSON.parse(fileContent) as PageType;
|
|
104
|
+
|
|
105
|
+
if (withSizeProp) {
|
|
106
|
+
const fileStats = await fsp.stat(filePath);
|
|
107
|
+
page.size = fileStats.size / 1024;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// SECURITY: Only returns valid page objects
|
|
111
|
+
if (page.path) {
|
|
112
|
+
yield page;
|
|
113
|
+
}
|
|
114
|
+
} catch (error) {
|
|
115
|
+
throwError(ReadFromStoreError, error);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export { getBuildPagesFromStore, onCreateWebpackConfig, pageSizeLog };
|
package/src/html.tsx
CHANGED
|
@@ -1,26 +1,17 @@
|
|
|
1
1
|
import type { HtmlProps } from "./types";
|
|
2
2
|
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
|
|
5
3
|
function HTML(props: HtmlProps) {
|
|
6
4
|
return (
|
|
7
5
|
<html {...props.htmlAttributes}>
|
|
8
6
|
<head>
|
|
9
7
|
<meta charSet="utf-8" />
|
|
10
8
|
<meta httpEquiv="x-ua-compatible" content="ie=edge" />
|
|
11
|
-
<meta
|
|
12
|
-
name="viewport"
|
|
13
|
-
content="width=device-width, initial-scale=1, shrink-to-fit=no"
|
|
14
|
-
/>
|
|
9
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
|
15
10
|
{props.headComponents}
|
|
16
11
|
</head>
|
|
17
12
|
<body {...props.bodyAttributes}>
|
|
18
13
|
{props.preBodyComponents}
|
|
19
|
-
<div
|
|
20
|
-
key={"body"}
|
|
21
|
-
id="___gatsby"
|
|
22
|
-
dangerouslySetInnerHTML={{ __html: props.body }}
|
|
23
|
-
/>
|
|
14
|
+
<div key={"body"} id="___gatsby" dangerouslySetInnerHTML={{ __html: props.body }} />
|
|
24
15
|
<div id="modal" />
|
|
25
16
|
{props.postBodyComponents}
|
|
26
17
|
</body>
|
package/src/types.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Core } from "@griddo/core";
|
|
2
|
+
import type { HeadProps } from "gatsby";
|
|
2
3
|
import type {
|
|
3
4
|
AdditionalInfo,
|
|
4
5
|
Dimensions,
|
|
@@ -8,15 +9,14 @@ import type {
|
|
|
8
9
|
GriddoSinglePage,
|
|
9
10
|
Site,
|
|
10
11
|
SocialsResponse,
|
|
11
|
-
} from "
|
|
12
|
-
import type { HeadProps } from "gatsby";
|
|
12
|
+
} from "../build";
|
|
13
13
|
|
|
14
14
|
interface CustomHeadProps extends HeadProps {
|
|
15
15
|
pageContext: GriddoPageObject["context"] & {
|
|
16
16
|
page: Core.Page & {
|
|
17
17
|
defaultLang: { id: number };
|
|
18
18
|
dimensions: Dimensions;
|
|
19
|
-
disableHrefLangs:
|
|
19
|
+
disableHrefLangs: number[];
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
}
|
|
@@ -81,7 +81,7 @@ type GatsbyPageObject = {
|
|
|
81
81
|
siteMetadata: Site["siteMetadata"];
|
|
82
82
|
theme: string;
|
|
83
83
|
title: string;
|
|
84
|
-
siteLangs:
|
|
84
|
+
siteLangs: Core.SiteLanguage[];
|
|
85
85
|
siteOptions: AdditionalInfo["siteOptions"];
|
|
86
86
|
siteScript: string;
|
|
87
87
|
socials: SocialsResponse;
|
|
@@ -89,4 +89,4 @@ type GatsbyPageObject = {
|
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
91
|
|
|
92
|
-
export { CustomHeadProps, GatsbyPageObject, HtmlProps, TemplateProps };
|
|
92
|
+
export type { CustomHeadProps, GatsbyPageObject, HtmlProps, TemplateProps };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
/* Opciones del Proyecto */
|
|
4
|
+
"target": "es2022", // Genera JavaScript compatible con versiones modernas de Node.js
|
|
5
|
+
"module": "commonjs", // El formato de módulo que usará Node.js para ejecutar los scripts
|
|
6
|
+
"outDir": "./build", // Directorio de salida para los archivos .js compilados
|
|
7
|
+
"rootDir": "./exporter", // Directorio raíz de los fuentes, para mantener la estructura en 'outDir'
|
|
8
|
+
|
|
9
|
+
/* Módulos */
|
|
10
|
+
"moduleResolution": "node", // Cómo se resuelven los módulos (estándar para Node)
|
|
11
|
+
"esModuleInterop": true, // Permite una mejor interoperabilidad entre CommonJS y ES Modules
|
|
12
|
+
|
|
13
|
+
// AÑADIDO: Permitir la importación de archivos .json como módulos.
|
|
14
|
+
// Esto soluciona el error con `import ... from "../../package.json"`.
|
|
15
|
+
"resolveJsonModule": true,
|
|
16
|
+
|
|
17
|
+
/* Opciones de Emisión */
|
|
18
|
+
"sourceMap": true, // Genera sourcemaps para facilitar el debugging
|
|
19
|
+
|
|
20
|
+
/* Chequeo de Tipos Estricto */
|
|
21
|
+
"strict": true, // Habilita todas las opciones de chequeo de tipos estrictas
|
|
22
|
+
"skipLibCheck": true, // Evita el chequeo de tipos en los archivos de declaración (.d.ts) de las dependencias
|
|
23
|
+
|
|
24
|
+
/* Opciones Adicionales */
|
|
25
|
+
"forceConsistentCasingInFileNames": true, // Asegura que las mayúsculas y minúsculas en los nombres de archivo sean consistentes
|
|
26
|
+
"types": ["node"]
|
|
27
|
+
},
|
|
28
|
+
"include": [
|
|
29
|
+
"exporter/**/*.ts", // Incluye todos los archivos .ts dentro de la carpeta exporter
|
|
30
|
+
"exporter/**/*.tsx"
|
|
31
|
+
],
|
|
32
|
+
"exclude": [
|
|
33
|
+
"node_modules", // Excluye las dependencias
|
|
34
|
+
"**/*.test.ts" // Excluye los archivos de test
|
|
35
|
+
]
|
|
36
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2022",
|
|
4
|
+
"lib": ["dom", "esnext"],
|
|
5
|
+
"jsx": "react-jsx",
|
|
6
|
+
"module": "esnext",
|
|
7
|
+
"moduleResolution": "node",
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"forceConsistentCasingInFileNames": true,
|
|
10
|
+
"strict": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"outDir": "./build",
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"inlineSourceMap": false,
|
|
16
|
+
"types": ["node"],
|
|
17
|
+
"rootDir": "./exporter"
|
|
18
|
+
},
|
|
19
|
+
"include": ["./exporter/index.ts"]
|
|
20
|
+
}
|