@griddo/cx 10.4.11 → 10.4.13
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 +1 -1
- package/build/adapters/gatsby/index.d.ts +2 -0
- package/build/adapters/gatsby/utils.d.ts +26 -0
- package/build/adapters/index.d.ts +3 -0
- package/build/browser/index.d.ts +5 -0
- package/build/browser/index.js +1 -0
- package/build/build-complete.d.ts +18 -0
- package/build/index.d.ts +29 -0
- package/build/index.js +37 -38
- package/build/move-assets.d.ts +1 -0
- package/build/react/index.d.ts +2 -0
- package/build/reset-render.d.ts +1 -0
- package/build/run-start-render.d.ts +1 -0
- package/build/run-start-render.js +69 -0
- package/build/services/auth.d.ts +21 -0
- package/build/services/distributors.d.ts +45 -0
- package/build/services/domains.d.ts +8 -0
- package/build/services/navigation.d.ts +77 -0
- package/build/services/robots.d.ts +21 -0
- package/build/services/settings.d.ts +23 -0
- package/build/services/sites.d.ts +42 -0
- package/build/services/store.d.ts +6 -0
- package/build/start-render.d.ts +3 -0
- package/build/start-render.js +70 -0
- package/build/types/api.d.ts +130 -0
- package/build/types/global.d.ts +78 -0
- package/build/types/navigation.d.ts +28 -0
- package/build/types/pages.d.ts +128 -0
- package/build/types/sites.d.ts +43 -0
- package/build/types/templates.d.ts +8 -0
- package/build/utils/api.d.ts +23 -0
- package/build/utils/cache.d.ts +35 -0
- package/build/utils/create-build-data.d.ts +8 -0
- package/build/utils/domains.d.ts +5 -0
- package/build/utils/folders.d.ts +48 -0
- package/build/utils/health-checks.d.ts +7 -0
- package/build/utils/instance.d.ts +21 -0
- package/build/utils/messages.d.ts +2 -0
- package/build/utils/pages.d.ts +34 -0
- package/build/utils/searches.d.ts +14 -0
- package/build/utils/shared.d.ts +109 -0
- package/build/utils/sites.d.ts +36 -0
- package/build/utils/store.d.ts +63 -0
- package/build/utils/temp-utils.d.ts +10 -0
- package/{exporter/cx.config.d.ts → cx.config.d.ts} +1 -2
- package/{exporter/cx.config.js → cx.config.js} +5 -8
- package/package.json +24 -29
- package/src/adapters/gatsby/index.ts +219 -0
- package/src/adapters/gatsby/utils.ts +85 -0
- package/src/browser/README.md +3 -0
- package/src/browser/index.ts +46 -0
- package/src/index.ts +48 -0
- package/src/move-assets.ts +8 -0
- package/src/react/index.ts +5 -0
- package/src/run-start-render.ts +3 -0
- package/{exporter → src}/services/robots.ts +1 -5
- package/{exporter → src}/services/store.ts +6 -1
- package/src/start-render.ts +19 -0
- package/{exporter → src}/types/global.ts +4 -3
- package/src/utils/folders.ts +268 -0
- package/{exporter → src}/utils/instance.ts +2 -2
- package/{exporter → src}/utils/pages.ts +2 -9
- package/{exporter → src}/utils/searches.ts +5 -8
- package/{exporter → src}/utils/shared.ts +5 -2
- package/{exporter → src}/utils/sites.ts +1 -8
- package/{exporter → src}/utils/temp-utils.ts +35 -8
- package/ssg/README.md +1 -0
- package/ssg/astro/.gitkeep +0 -0
- package/ssg/gatsby/.eslintrc.json +51 -0
- package/ssg/gatsby/.prettierignore +6 -0
- package/ssg/gatsby/.prettierrc.json +3 -0
- package/{gatsby-browser.tsx → ssg/gatsby/gatsby-browser.tsx} +42 -44
- package/{gatsby-config.ts → ssg/gatsby/gatsby-config.ts} +1 -2
- package/{gatsby-node.ts → ssg/gatsby/gatsby-node.ts} +11 -8
- package/{gatsby-ssr.tsx → ssg/gatsby/gatsby-ssr.tsx} +1 -1
- package/ssg/gatsby/global.d.ts +1 -0
- package/ssg/gatsby/package.json +85 -0
- package/{src → ssg/gatsby/src}/components/Head.tsx +2 -2
- package/{src → ssg/gatsby/src}/components/template.tsx +2 -3
- package/{src → ssg/gatsby/src}/gatsby-node-utils.ts +6 -5
- package/{src → ssg/gatsby/src}/types.ts +5 -4
- package/ssg/gatsby/tsconfig.json +15 -0
- package/start-render.js +7 -0
- package/build/create-build-data.js +0 -60
- package/exporter/adapters/gatsby/index.ts +0 -159
- package/exporter/adapters/gatsby/utils.ts +0 -377
- package/exporter/create-build-data.ts +0 -22
- package/exporter/index.ts +0 -23
- package/exporter/utils/folders.ts +0 -318
- package/exporter/utils/integrations.ts +0 -36
- package/exporter/utils/runners.ts +0 -52
- package/index.js +0 -7
- /package/{exporter → src}/adapters/index.ts +0 -0
- /package/{exporter → src}/build-complete.ts +0 -0
- /package/{exporter → src}/reset-render.ts +0 -0
- /package/{exporter → src}/services/auth.ts +0 -0
- /package/{exporter → src}/services/distributors.ts +0 -0
- /package/{exporter → src}/services/domains.ts +0 -0
- /package/{exporter → src}/services/navigation.ts +0 -0
- /package/{exporter → src}/services/settings.ts +0 -0
- /package/{exporter → src}/services/sites.ts +0 -0
- /package/{exporter → src}/types/api.ts +0 -0
- /package/{exporter → src}/types/navigation.ts +0 -0
- /package/{exporter → src}/types/pages.ts +0 -0
- /package/{exporter → src}/types/sites.ts +0 -0
- /package/{exporter → src}/types/templates.ts +0 -0
- /package/{exporter → src}/utils/api.ts +0 -0
- /package/{exporter → src}/utils/cache.ts +0 -0
- /package/{exporter/utils/download-build-data.ts → src/utils/create-build-data.ts} +0 -0
- /package/{exporter → src}/utils/domains.ts +0 -0
- /package/{exporter → src}/utils/health-checks.ts +0 -0
- /package/{exporter → src}/utils/messages.ts +0 -0
- /package/{exporter → src}/utils/store.ts +0 -0
- /package/{src → ssg/gatsby/src}/README.md +0 -0
- /package/{src → ssg/gatsby/src}/html.tsx +0 -0
- /package/{src → ssg/gatsby/src}/utils.ts +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"browser": true,
|
|
4
|
+
"node": true,
|
|
5
|
+
"es6": true
|
|
6
|
+
},
|
|
7
|
+
"extends": [
|
|
8
|
+
"plugin:node/recommended",
|
|
9
|
+
"eslint:recommended",
|
|
10
|
+
"plugin:@typescript-eslint/eslint-recommended",
|
|
11
|
+
"plugin:@typescript-eslint/recommended"
|
|
12
|
+
],
|
|
13
|
+
"plugins": ["node", "react", "prettier", "import"],
|
|
14
|
+
"parserOptions": {
|
|
15
|
+
"ecmaVersion": 2020,
|
|
16
|
+
"ecmaFeatures": { "jsx": true },
|
|
17
|
+
"sourceType": "module",
|
|
18
|
+
"allowImportExportEverywhere": true
|
|
19
|
+
},
|
|
20
|
+
"parser": "@typescript-eslint/parser",
|
|
21
|
+
"rules": {
|
|
22
|
+
"@typescript-eslint/explicit-module-boundary-types": 0,
|
|
23
|
+
"@typescript-eslint/no-explicit-any": 0,
|
|
24
|
+
"@typescript-eslint/no-non-null-assertion": 0,
|
|
25
|
+
"@typescript-eslint/array-type": ["error", { "default": "generic" }],
|
|
26
|
+
"no-process-exit": 0,
|
|
27
|
+
"node/no-missing-import": 0,
|
|
28
|
+
"node/no-unsupported-features/es-syntax": 0,
|
|
29
|
+
"node/no-extraneous-import": 0,
|
|
30
|
+
"react/jsx-uses-react": "error",
|
|
31
|
+
"react/jsx-uses-vars": "error",
|
|
32
|
+
"linebreak-style": ["error", "unix"],
|
|
33
|
+
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
|
|
34
|
+
"import/order": [
|
|
35
|
+
"error",
|
|
36
|
+
{
|
|
37
|
+
"newlines-between": "always",
|
|
38
|
+
"groups": [
|
|
39
|
+
["type"],
|
|
40
|
+
["builtin"],
|
|
41
|
+
["external"],
|
|
42
|
+
["parent", "internal", "sibling", "index", "unknown"]
|
|
43
|
+
],
|
|
44
|
+
"alphabetize": {
|
|
45
|
+
"order": "asc",
|
|
46
|
+
"caseInsensitive": true
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { GatsbyBrowser } from "gatsby";
|
|
2
2
|
|
|
3
|
+
import { browser } from "@components";
|
|
3
4
|
import { SessionProvider } from "@griddo/core";
|
|
4
|
-
import { browser } from "components";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
|
|
7
7
|
export const disableCorePrefetching = () => {
|
|
@@ -60,49 +60,47 @@ export const onServiceWorkerActive: GatsbyBrowser["onServiceWorkerActive"] = (
|
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
-
export const onServiceWorkerInstalled: GatsbyBrowser["onServiceWorkerInstalled"] =
|
|
64
|
-
props
|
|
65
|
-
)
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
};
|
|
63
|
+
export const onServiceWorkerInstalled: GatsbyBrowser["onServiceWorkerInstalled"] =
|
|
64
|
+
(props) => {
|
|
65
|
+
if (browser.onServiceWorkerInstalled) {
|
|
66
|
+
browser.onServiceWorkerInstalled(props);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const onServiceWorkerRedundant: GatsbyBrowser["onServiceWorkerRedundant"] =
|
|
71
|
+
(props) => {
|
|
72
|
+
if (browser.onServiceWorkerRedundant) {
|
|
73
|
+
browser.onServiceWorkerRedundant(props);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const onServiceWorkerUpdateFound: GatsbyBrowser["onServiceWorkerUpdateFound"] =
|
|
78
|
+
(props) => {
|
|
79
|
+
if (browser.onServiceWorkerUpdateFound) {
|
|
80
|
+
browser.onServiceWorkerUpdateFound(props);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export const onServiceWorkerUpdateReady: GatsbyBrowser["onServiceWorkerUpdateReady"] =
|
|
85
|
+
(props) => {
|
|
86
|
+
if (browser.onServiceWorkerUpdateReady) {
|
|
87
|
+
browser.onServiceWorkerUpdateReady(props);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export const registerServiceWorker: GatsbyBrowser["registerServiceWorker"] =
|
|
92
|
+
() => {
|
|
93
|
+
if (browser.registerServiceWorker) {
|
|
94
|
+
return browser.registerServiceWorker();
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export const replaceHydrateFunction: GatsbyBrowser["replaceHydrateFunction"] =
|
|
99
|
+
() => {
|
|
100
|
+
if (browser.replaceHydrateFunction) {
|
|
101
|
+
return browser.replaceHydrateFunction();
|
|
102
|
+
}
|
|
103
|
+
};
|
|
106
104
|
|
|
107
105
|
export const shouldUpdateScroll: GatsbyBrowser["shouldUpdateScroll"] = (
|
|
108
106
|
props
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { GatsbyConfig } from "gatsby";
|
|
2
2
|
|
|
3
|
+
import { resolveComponentsPath } from "@griddo/cx/build";
|
|
3
4
|
import dotenv from "dotenv";
|
|
4
5
|
|
|
5
|
-
import { resolveComponentsPath } from "./exporter/utils/instance";
|
|
6
|
-
|
|
7
6
|
dotenv.config();
|
|
8
7
|
|
|
9
8
|
// Este process.env.GRIDDO_ASSET_PREFIX se lee porque se ha introducido en
|
|
@@ -2,18 +2,22 @@ import type { GatsbyNode } from "gatsby";
|
|
|
2
2
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import {
|
|
6
|
+
getBuildPages,
|
|
7
|
+
getConfig,
|
|
8
|
+
logInfo,
|
|
9
|
+
logPageSize,
|
|
10
|
+
} from "@griddo/cx/build";
|
|
11
|
+
|
|
8
12
|
import { getMatchPath } from "./src/gatsby-node-utils";
|
|
9
13
|
import { GatsbyPageObject } from "./src/types";
|
|
10
14
|
|
|
11
15
|
const dirs = getConfig().dirs();
|
|
12
|
-
const
|
|
13
|
-
const
|
|
16
|
+
const store = path.join(dirs.__cx, "store");
|
|
17
|
+
const template = path.join(dirs.__ssg, "src/components/template.tsx");
|
|
14
18
|
|
|
15
19
|
const createPages: GatsbyNode["createPages"] = async ({ actions }) => {
|
|
16
|
-
const pages = getBuildPages<GatsbyPageObject>(
|
|
20
|
+
const pages = getBuildPages<GatsbyPageObject>(store);
|
|
17
21
|
|
|
18
22
|
for await (const page of pages) {
|
|
19
23
|
if (!page) return;
|
|
@@ -21,7 +25,7 @@ const createPages: GatsbyNode["createPages"] = async ({ actions }) => {
|
|
|
21
25
|
const { domain, compose } = page.context.fullPath;
|
|
22
26
|
const matchPath = getMatchPath(domain, compose);
|
|
23
27
|
|
|
24
|
-
page.component =
|
|
28
|
+
page.component = template;
|
|
25
29
|
page.matchPath = matchPath;
|
|
26
30
|
|
|
27
31
|
actions.createPage(page);
|
|
@@ -34,6 +38,5 @@ const createPages: GatsbyNode["createPages"] = async ({ actions }) => {
|
|
|
34
38
|
}
|
|
35
39
|
};
|
|
36
40
|
|
|
37
|
-
// onCreateWebpackConfig
|
|
38
41
|
export { onCreateWebpackConfig } from "./src/gatsby-node-utils";
|
|
39
42
|
export { createPages };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { GatsbySSR } from "gatsby";
|
|
2
2
|
|
|
3
|
+
import { ssr } from "@components";
|
|
3
4
|
import { SessionProvider } from "@griddo/core";
|
|
4
|
-
import { ssr } from "components";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
|
|
7
7
|
export const wrapPageElement: GatsbySSR["wrapPageElement"] = ({ props }) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module "@components";
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@griddo/gatsby",
|
|
3
|
+
"description": "gatsbyjs",
|
|
4
|
+
"version": "10.4.7",
|
|
5
|
+
"authors": [
|
|
6
|
+
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
7
|
+
"Diego M. Béjar <diego.bejar@secuoyas.com>",
|
|
8
|
+
"Francis Vega <francis.vega@secuoyas.com>",
|
|
9
|
+
"Gonzalo Hernández <gonzalo.hernandez@secuoyas.com>",
|
|
10
|
+
"Sergio Ródenas <sergio.rodenas@secuoyas.com>"
|
|
11
|
+
],
|
|
12
|
+
"license": "UNLICENSED",
|
|
13
|
+
"homepage": "https://griddo.io",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/griddo/griddo"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"clean": "gatsby clean; rm -rf .cache public assets",
|
|
20
|
+
"gatsby-build": "gatsby telemetry --disable && gatsby build --prefix-paths"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@babel/core": "^7.21.0",
|
|
24
|
+
"@babel/plugin-proposal-class-properties": "^7.7.4",
|
|
25
|
+
"@babel/preset-env": "^7.14.5",
|
|
26
|
+
"@babel/preset-react": "^7.14.5",
|
|
27
|
+
"@babel/preset-typescript": "^7.16.5",
|
|
28
|
+
"@svgr/webpack": "^5.5.0",
|
|
29
|
+
"babel-loader": "^8.0.6",
|
|
30
|
+
"babel-plugin-styled-components": "^1.10.7",
|
|
31
|
+
"babel-plugin-transform-runtime": "^6.23.0",
|
|
32
|
+
"babel-polyfill": "^6.26.0",
|
|
33
|
+
"dotenv": "^8.1.0",
|
|
34
|
+
"gatsby": "^4.8.0",
|
|
35
|
+
"gatsby-plugin-react-helmet": "^5.8.0",
|
|
36
|
+
"gatsby-plugin-svgr-loader": "^0.1.0",
|
|
37
|
+
"html-react-parser": "^1.4.10",
|
|
38
|
+
"path-browserify": "^1.0.1",
|
|
39
|
+
"react-helmet": "^6.0.0"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@types/eslint": "^7.29.0",
|
|
43
|
+
"@types/fs-extra": "^9.0.13",
|
|
44
|
+
"@types/gradient-string": "^1.1.2",
|
|
45
|
+
"@types/prettier": "2.7.2",
|
|
46
|
+
"@types/react": "18.0.28",
|
|
47
|
+
"@types/react-dom": "18.0.11",
|
|
48
|
+
"@types/react-helmet": "^6.1.6",
|
|
49
|
+
"@types/webpack": "^5.28.0",
|
|
50
|
+
"eslint": "^7.5.0",
|
|
51
|
+
"eslint-plugin-node": "^11.1.0",
|
|
52
|
+
"eslint-plugin-react": "7.14.3",
|
|
53
|
+
"prettier": "2.0.4"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"axios": "*",
|
|
57
|
+
"react": "*",
|
|
58
|
+
"react-dom": "*"
|
|
59
|
+
},
|
|
60
|
+
"engines": {
|
|
61
|
+
"node": ">=16.17.0"
|
|
62
|
+
},
|
|
63
|
+
"files": [
|
|
64
|
+
".babelrc",
|
|
65
|
+
"build",
|
|
66
|
+
"gatsby-browser.tsx",
|
|
67
|
+
"gatsby-config.ts",
|
|
68
|
+
"gatsby-node.ts",
|
|
69
|
+
"gatsby-ssr.tsx",
|
|
70
|
+
"exporter",
|
|
71
|
+
"index.js",
|
|
72
|
+
"src",
|
|
73
|
+
"static"
|
|
74
|
+
],
|
|
75
|
+
"keywords": [
|
|
76
|
+
"gatsby",
|
|
77
|
+
"griddo",
|
|
78
|
+
"secuoyas",
|
|
79
|
+
"typescript",
|
|
80
|
+
"SSG"
|
|
81
|
+
],
|
|
82
|
+
"publishConfig": {
|
|
83
|
+
"access": "public"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { CustomHeadProps } from "../types";
|
|
2
2
|
|
|
3
|
-
import { generateAutomaticDimensions } from "components";
|
|
3
|
+
import { generateAutomaticDimensions } from "@components";
|
|
4
|
+
import { filterHeadIntegrations } from "@griddo/cx/build/browser";
|
|
4
5
|
import parse from "html-react-parser";
|
|
5
6
|
import * as React from "react";
|
|
6
7
|
|
|
7
|
-
import { filterHeadIntegrations } from "../../exporter/utils/integrations";
|
|
8
8
|
import { cleanCommaSeparated, composeAnalytics, formatImage } from "../utils";
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import type { TemplateProps } from "../types";
|
|
2
2
|
|
|
3
|
+
import { components, SiteProvider, templates } from "@components";
|
|
3
4
|
import { Core, Page as RenderGriddoPage } from "@griddo/core";
|
|
4
|
-
import {
|
|
5
|
+
import { filterPositionIntegrations } from "@griddo/cx/build/browser";
|
|
5
6
|
import { Link, navigate } from "gatsby";
|
|
6
7
|
import parse from "html-react-parser";
|
|
7
8
|
import * as React from "react";
|
|
8
9
|
import { Helmet } from "react-helmet";
|
|
9
10
|
|
|
10
|
-
import { filterPositionIntegrations } from "../../exporter/utils/integrations";
|
|
11
|
-
|
|
12
11
|
// Gatsby Head
|
|
13
12
|
export { Head } from "./Head";
|
|
14
13
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { GatsbyNode } from "gatsby";
|
|
2
2
|
|
|
3
|
-
import fs from "fs-extra";
|
|
4
|
-
|
|
5
3
|
import {
|
|
6
4
|
IS_COMPONENT_LIBRARY,
|
|
7
5
|
PROJECT_ALIASES,
|
|
6
|
+
getConfig,
|
|
8
7
|
resolveComponentsPath,
|
|
9
|
-
} from "
|
|
8
|
+
} from "@griddo/cx/build";
|
|
9
|
+
import fs from "fs-extra";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Copy the instance's `/static` dir into the Gatsby's to include it in the render assets.
|
|
@@ -72,11 +72,12 @@ const onCreateWebpackConfig: GatsbyNode["onCreateWebpackConfig"] = ({
|
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
function getGatsbyAssetPrefixSlug(domain: string) {
|
|
75
|
+
const { proDomain } = getConfig();
|
|
76
|
+
|
|
75
77
|
const assetPrefix =
|
|
76
78
|
process.env.GRIDDO_ASSET_PREFIX || process.env.ASSET_PREFIX;
|
|
77
|
-
|
|
78
79
|
if (!assetPrefix || !domain) return "";
|
|
79
|
-
if (!domain.startsWith(
|
|
80
|
+
if (!domain.startsWith(proDomain)) return "";
|
|
80
81
|
|
|
81
82
|
return `${assetPrefix}/${domain}`;
|
|
82
83
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable node/no-unpublished-import */
|
|
2
|
+
import type { Core } from "@griddo/core";
|
|
2
3
|
import type {
|
|
3
4
|
AdditionalInfo,
|
|
4
5
|
GriddoListPage,
|
|
5
6
|
GriddoMultiPage,
|
|
6
7
|
GriddoPageObject,
|
|
7
8
|
GriddoSinglePage,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
Site,
|
|
10
|
+
SocialsResponse,
|
|
11
|
+
} from "@griddo/cx/build";
|
|
11
12
|
import type { HeadProps } from "gatsby";
|
|
12
13
|
|
|
13
14
|
interface CustomHeadProps extends HeadProps {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "esnext",
|
|
4
|
+
"lib": ["dom", "esnext"],
|
|
5
|
+
"jsx": "react",
|
|
6
|
+
"module": "esnext",
|
|
7
|
+
"moduleResolution": "node",
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"forceConsistentCasingInFileNames": true,
|
|
10
|
+
"strict": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"resolveJsonModule": true
|
|
13
|
+
},
|
|
14
|
+
"include": ["./src/**/*", "./*.ts", "./*.tsx"]
|
|
15
|
+
}
|
package/start-render.js
ADDED