@griddo/cx 10.4.21 → 10.4.22

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.
@@ -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 url `assetPrefix/domain`
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 getGatsbyAssetPrefixSlug(domain: string): string;
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
- declare function gatsbyBuild(domain: string): void;
27
- export { attempts, formatImage, gatsbyBuild, getGatsbyAssetPrefixSlug };
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 gatsbyBuild(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, gatsbyBuild, getGatsbyAssetPrefixWithDomain, legacy__createDistFromGatsbyPublic, };
@@ -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[];
@@ -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 P={};u(P,{filterBodyIntegrationFromPosition:()=>d,filterHeadIntegrations:()=>c,filterPositionIntegrations:()=>I});module.exports=s(P);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 I(e,t){switch(t){case"head":return c(e);default:return d(e,t)}}0&&(module.exports={filterBodyIntegrationFromPosition,filterHeadIntegrations,filterPositionIntegrations});
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});