@griddo/cx 10.4.21 → 10.4.23
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/build/adapters/gatsby/utils.d.ts +21 -15
- package/build/browser/index.d.ts +1 -1
- package/build/browser/index.js +1 -1
- package/build/build-complete.js +21 -21
- package/build/index.d.ts +2 -3
- package/build/index.js +30 -34
- package/build/react/Foo/index.d.ts +3 -0
- package/build/react/index.d.ts +1 -1
- package/build/react/index.js +1 -0
- package/build/reset-render.js +21 -21
- package/build/run-start-render.js +29 -33
- package/build/start-render.js +30 -34
- package/build/types/global.d.ts +1 -0
- package/build/upload-search-content.js +22 -22
- package/build/utils/{shared.d.ts → core-utils.d.ts} +44 -2
- package/build/utils/folders.d.ts +6 -1
- package/build/utils/store.d.ts +1 -1
- package/cx.config.js +7 -0
- package/exporter/adapters/gatsby/index.ts +67 -14
- package/exporter/adapters/gatsby/utils.ts +116 -31
- package/exporter/browser/index.ts +1 -1
- package/exporter/build-complete.ts +5 -5
- package/exporter/index.ts +6 -5
- package/exporter/react/Foo/index.tsx +7 -0
- package/exporter/react/index.tsx +3 -0
- package/exporter/services/distributors.ts +1 -1
- package/exporter/services/robots.ts +1 -1
- package/exporter/services/store.ts +9 -16
- package/exporter/start-render.ts +1 -1
- package/exporter/types/global.ts +1 -0
- package/exporter/utils/api.ts +1 -1
- package/exporter/utils/cache.ts +1 -1
- package/exporter/utils/{shared.ts → core-utils.ts} +120 -20
- package/exporter/utils/create-build-data.ts +1 -1
- package/exporter/utils/domains.ts +3 -0
- package/exporter/utils/folders.ts +38 -2
- package/exporter/utils/health-checks.ts +1 -1
- package/exporter/utils/searches.ts +1 -1
- package/exporter/utils/sites.ts +12 -18
- package/exporter/utils/store.ts +2 -3
- package/gatsby-config.ts +10 -6
- package/gatsby-node.ts +20 -11
- package/package.json +8 -5
- package/src/components/template.tsx +2 -1
- package/src/gatsby-node-utils.ts +2 -39
- package/src/types.ts +6 -7
- package/build/utils/temp-utils.d.ts +0 -10
- package/exporter/react/index.ts +0 -5
- package/exporter/utils/temp-utils.ts +0 -103
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import { Fields } from "@griddo/core";
|
|
2
|
-
declare const attempts: {
|
|
3
|
-
prepare: any;
|
|
4
|
-
restore: any;
|
|
5
|
-
data: any;
|
|
6
|
-
ssg: any;
|
|
7
|
-
relocation: any;
|
|
8
|
-
meta: any;
|
|
9
|
-
archive: any;
|
|
10
|
-
clean: any;
|
|
11
|
-
};
|
|
1
|
+
import type { Fields } from "@griddo/core";
|
|
12
2
|
/**
|
|
13
|
-
* Return the assetPrefix
|
|
3
|
+
* Return the assetPrefix with the domain concatenated `assetPrefix/domain` only
|
|
4
|
+
* if the domain is "pro-" **and** there is a env `GRIDDO_ASSET_PREFIX` with any
|
|
5
|
+
* value different from `null`, `undefined` or `empty string`
|
|
6
|
+
*
|
|
7
|
+
* else...
|
|
8
|
+
* - If assetPrefix or domain is falsy, returns ""
|
|
9
|
+
* - If the domain is not "pro-", returns ""
|
|
14
10
|
*/
|
|
15
|
-
declare function
|
|
11
|
+
declare function getGatsbyAssetPrefixWithDomain(domain: string): string;
|
|
16
12
|
/**
|
|
17
13
|
* Format Cloudinary or DAM URL
|
|
18
14
|
*
|
|
@@ -23,5 +19,15 @@ declare function getGatsbyAssetPrefixSlug(domain: string): string;
|
|
|
23
19
|
* @returns A composed URL for the Cloudinary or DAM service
|
|
24
20
|
*/
|
|
25
21
|
declare function formatImage(image: Fields.Image | string, width: number, height: number, format?: string): string | null;
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Spawn a new node process `yarn gatsby-build`
|
|
24
|
+
* @note This proccess (`yarn gatsby-build`) can not access to the custom Griddo
|
|
25
|
+
* `process.env` so it needs variables passed to it via the `env` prop.
|
|
26
|
+
*/
|
|
27
|
+
declare function runGatsbyBuildCommand(assetPrefixWithDomain: string): void;
|
|
28
|
+
/**
|
|
29
|
+
* Update the Griddo's `/dist` dir with the contents from `public` dir only
|
|
30
|
+
* with files of type: js, json and css.
|
|
31
|
+
*/
|
|
32
|
+
declare function legacy__createDistFromGatsbyPublic(domain: string, needsAssetPrefix: boolean): Promise<void>;
|
|
33
|
+
export { formatImage, getGatsbyAssetPrefixWithDomain, legacy__createDistFromGatsbyPublic, runGatsbyBuildCommand, };
|
package/build/browser/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Core } from "@griddo/core";
|
|
1
|
+
import type { Core } from "@griddo/core";
|
|
2
2
|
declare function filterBodyIntegrationFromPosition(integrations: Array<Core.PageIntegration>, position: "start" | "end"): string[];
|
|
3
3
|
declare function filterHeadIntegrations(integrations: Array<Core.PageIntegration>): string[];
|
|
4
4
|
declare function filterPositionIntegrations(integrations: Array<Core.PageIntegration>, position: "head" | "start" | "end"): string[];
|
package/build/browser/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var o=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var u=(e,t)=>{for(var n in t)o(e,n,{get:t[n],enumerable:!0})},y=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of f(t))!l.call(e,r)&&r!==n&&o(e,r,{get:()=>t[r],enumerable:!(a=i(t,r))||a.enumerable});return e};var s=e=>y(o({},"__esModule",{value:!0}),e);var
|
|
1
|
+
"use strict";var o=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var u=(e,t)=>{for(var n in t)o(e,n,{get:t[n],enumerable:!0})},y=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of f(t))!l.call(e,r)&&r!==n&&o(e,r,{get:()=>t[r],enumerable:!(a=i(t,r))||a.enumerable});return e};var s=e=>y(o({},"__esModule",{value:!0}),e);var I={};u(I,{filterBodyIntegrationFromPosition:()=>d,filterHeadIntegrations:()=>c,filterPositionIntegrations:()=>g});module.exports=s(I);function d(e,t){return e?.filter(n=>n.contentBody!==null&&n.contentBody!==""&&n.contentBodyPosition===t).map(n=>n.contentBody)||[]}function c(e){return e?.filter(t=>t.contentHead!==null&&t.contentHead!=="").map(t=>t.contentHead)||[]}function g(e,t){switch(t){case"head":return c(e);default:return d(e,t)}}0&&(module.exports={filterBodyIntegrationFromPosition,filterHeadIntegrations,filterPositionIntegrations});
|