@griddo/cx 10.4.12 → 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 +21 -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
package/README.md
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Return the assetPrefix url `assetPrefix/domain`
|
|
14
|
+
*/
|
|
15
|
+
declare function getGatsbyAssetPrefixSlug(domain: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Format Cloudinary or DAM URL
|
|
18
|
+
*
|
|
19
|
+
* @param image The image url
|
|
20
|
+
* @param width With of the image
|
|
21
|
+
* @param height Height of the image
|
|
22
|
+
* @param format Format of the image
|
|
23
|
+
* @returns A composed URL for the Cloudinary or DAM service
|
|
24
|
+
*/
|
|
25
|
+
declare function formatImage(image: Fields.Image | string, width: number, height: number, format?: string): string | null;
|
|
26
|
+
export { attempts, formatImage, getGatsbyAssetPrefixSlug };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Core } from "@griddo/core";
|
|
2
|
+
declare function filterBodyIntegrationFromPosition(integrations: Array<Core.PageIntegration>, position: "start" | "end"): string[];
|
|
3
|
+
declare function filterHeadIntegrations(integrations: Array<Core.PageIntegration>): string[];
|
|
4
|
+
declare function filterPositionIntegrations(integrations: Array<Core.PageIntegration>, position: "head" | "start" | "end"): string[];
|
|
5
|
+
export { filterBodyIntegrationFromPosition, filterHeadIntegrations, filterPositionIntegrations, };
|
|
@@ -0,0 +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});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type Report = {
|
|
2
|
+
authControl: {
|
|
3
|
+
Authorization: string;
|
|
4
|
+
"Cache-Control": string;
|
|
5
|
+
lang?: string | undefined;
|
|
6
|
+
} | undefined;
|
|
7
|
+
sites: Array<{
|
|
8
|
+
siteId: number;
|
|
9
|
+
publishHashes: Array<string>;
|
|
10
|
+
siteHash: string | null;
|
|
11
|
+
unpublishHashes: Array<string>;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Informa a la API del estado de publicación de los sites: published y unpublished.
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildComplete(report: Report): Promise<void>;
|
|
18
|
+
export {};
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Griddo CX library main export file.
|
|
4
|
+
*
|
|
5
|
+
* This file exports functions to use in both: adapters and SSG's frameworks.
|
|
6
|
+
* Turning CX basically in a javascript library.
|
|
7
|
+
*
|
|
8
|
+
* # Browser context.
|
|
9
|
+
* There is another export in the `/browser` directory to use exclusivelly in
|
|
10
|
+
* the browser context where nodejs (path, fs, etc..) is not available.
|
|
11
|
+
*
|
|
12
|
+
* # Render script (bin)
|
|
13
|
+
* The binary file of the package is `run-start-render.ts`.
|
|
14
|
+
*
|
|
15
|
+
* # Separate scripts.
|
|
16
|
+
* There are some separate .ts files as build-complete.ts or reset-render.ts
|
|
17
|
+
* that are intended to be used by infra via npm script like `npm run
|
|
18
|
+
* build-complete`
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
import type { SocialsResponse } from "./types/api";
|
|
22
|
+
import type { AdditionalInfo, GriddoListPage, GriddoMultiPage, GriddoPageObject, GriddoSinglePage } from "./types/pages";
|
|
23
|
+
import type { Site } from "./types/sites";
|
|
24
|
+
import { startRender } from "./start-render";
|
|
25
|
+
import { IS_COMPONENT_LIBRARY, PROJECT_ALIASES, resolveComponentsPath } from "./utils/instance";
|
|
26
|
+
import { logInfo, logPageSize } from "./utils/shared";
|
|
27
|
+
import { getBuildPages } from "./utils/store";
|
|
28
|
+
import { getConfig } from "./utils/temp-utils";
|
|
29
|
+
export { AdditionalInfo, GriddoListPage, GriddoMultiPage, GriddoPageObject, GriddoSinglePage, IS_COMPONENT_LIBRARY, PROJECT_ALIASES, Site, SocialsResponse, getBuildPages, getConfig, logInfo, logPageSize, resolveComponentsPath, startRender, };
|