@griddo/cx 11.6.7 → 11.6.8-rc.3

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.
@@ -9,5 +9,5 @@ declare function isValidRender(): void;
9
9
  /**
10
10
  * Send the default registers through Griddo alerts.
11
11
  */
12
- declare function sendGriddoDefaultAlerts(): void;
12
+ declare function sendGriddoDefaultAlerts(): Promise<void>;
13
13
  export { createSentinelRenderFile, deleteSentinelRenderFile, isValidRender, sendGriddoDefaultAlerts, };
@@ -143,7 +143,7 @@ async function createDistFromGatsbyPublic(
143
143
  }
144
144
 
145
145
  // Copia el resto de archivos...
146
- validFilesFromPublic.map(async (file) => {
146
+ validFilesFromPublic.map((file) => {
147
147
  const fileSrc = `${publicDir}/${file}`;
148
148
  const fileDest = `${cxAssetsDir}/${file}`;
149
149
  fsx.copySync(fileSrc, fileDest, { preserveTimestamps: true });
@@ -89,7 +89,7 @@ function getDomainRenderReport(domain: string) {
89
89
 
90
90
  infoLog(`Sending ending call to ${domain} sites`);
91
91
 
92
- sendEndSiteRender(reports);
92
+ await sendEndSiteRender(reports);
93
93
  } else {
94
94
  // Legacy render
95
95
  const domains = await getInstanceDomains();
@@ -98,7 +98,7 @@ function getDomainRenderReport(domain: string) {
98
98
 
99
99
  infoLog(`Sending ending call to ${domain} sites`);
100
100
 
101
- sendEndSiteRender(reports);
101
+ await sendEndSiteRender(reports);
102
102
  }
103
103
  }
104
104
  })().catch((err) => {
@@ -18,7 +18,7 @@ async function startRender() {
18
18
  for (const domain of GRIDDO_RENDER_DOMAINS.split(",")) {
19
19
  await renderDomainsWithGatsbyAdapter(domain);
20
20
  }
21
- sendGriddoDefaultAlerts();
21
+ await sendGriddoDefaultAlerts();
22
22
  process.exit(0);
23
23
  }
24
24
 
@@ -34,7 +34,7 @@ async function startRender() {
34
34
 
35
35
  showExporterVersion();
36
36
  await renderDomainsWithGatsbyAdapter(domain);
37
- sendGriddoDefaultAlerts();
37
+ await sendGriddoDefaultAlerts();
38
38
 
39
39
  process.exit(0);
40
40
  } else {
@@ -46,7 +46,7 @@ async function startRender() {
46
46
 
47
47
  for (const domain of domains) {
48
48
  await renderDomainsWithGatsbyAdapter(domain);
49
- sendGriddoDefaultAlerts();
49
+ await sendGriddoDefaultAlerts();
50
50
  }
51
51
  process.exit(0);
52
52
  }
@@ -39,7 +39,7 @@ function isValidRender() {
39
39
  /**
40
40
  * Send the default registers through Griddo alerts.
41
41
  */
42
- function sendGriddoDefaultAlerts() {
42
+ async function sendGriddoDefaultAlerts() {
43
43
  if (envs.GRIDDO_ALERT_FEATURE) {
44
44
  const registerContent = apiRegister.get("API_RESPONSE_TOO_BIG");
45
45
 
@@ -51,7 +51,7 @@ function sendGriddoDefaultAlerts() {
51
51
  debugLog(registerContent);
52
52
  debugLog();
53
53
 
54
- insertAlert({
54
+ await insertAlert({
55
55
  description: `API response size is too large (${envs.GRIDDO_API_MAX_RESPONSE_SIZE}KB).`,
56
56
  area: "Griddo",
57
57
  level: "W",
package/gatsby-node.ts CHANGED
@@ -95,7 +95,7 @@ const createPages: GatsbyNode["createPages"] = async ({ actions }) => {
95
95
  debugLog(registerContent);
96
96
  debugLog();
97
97
 
98
- insertAlert({
98
+ await insertAlert({
99
99
  description: "Render register report",
100
100
  area: "Griddo",
101
101
  level: "W",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@griddo/cx",
3
3
  "description": "Griddo SSG based on Gatsby",
4
- "version": "11.6.7",
4
+ "version": "11.6.8-rc.3",
5
5
  "authors": [
6
6
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
7
7
  "Diego M. Béjar <diego.bejar@secuoyas.com>",
@@ -65,7 +65,7 @@
65
65
  "@babel/preset-env": "7.26.0",
66
66
  "@babel/preset-react": "7.26.3",
67
67
  "@babel/preset-typescript": "7.26.0",
68
- "@griddo/core": "11.6.7",
68
+ "@griddo/core": "11.6.8-rc.3",
69
69
  "@svgr/webpack": "5.5.0",
70
70
  "axios": "1.7.9",
71
71
  "babel-loader": "9.2.1",
@@ -130,5 +130,5 @@
130
130
  "publishConfig": {
131
131
  "access": "public"
132
132
  },
133
- "gitHead": "87d62b8b155f1806993928f385909e944af81cfe"
133
+ "gitHead": "237257d2d0b4bb259aa8c9895e637a7f4953befb"
134
134
  }
@@ -1,34 +1,6 @@
1
1
  import type { GatsbyNode } from "gatsby";
2
2
 
3
- import {
4
- componentLibraryPathAlias,
5
- isComponentLibrary,
6
- resolveComponentsPath,
7
- } from "@griddo/cx";
8
- import fs from "fs-extra";
9
-
10
- /**
11
- * Copy the instance's `/static` dir into the Gatsby's to include it in the render assets.
12
- */
13
- function prepareStaticDir() {
14
- const src = resolveComponentsPath("static");
15
- const dest = "./static";
16
-
17
- const files = fs.readdirSync(src);
18
-
19
- try {
20
- files.map(async (file) => {
21
- const fileSrc = `${src}/${file}`;
22
- const fileDest = `${dest}/${file}`;
23
- fs.copySync(fileSrc, fileDest);
24
- });
25
-
26
- console.info("Components `static` dir copied");
27
- } catch (error) {
28
- console.log(error);
29
- throw new Error("Error copying `static` dir");
30
- }
31
- }
3
+ import { componentLibraryPathAlias, isComponentLibrary } from "@griddo/cx";
32
4
 
33
5
  const onCreateWebpackConfig: GatsbyNode["onCreateWebpackConfig"] = ({
34
6
  actions,
@@ -71,4 +43,4 @@ const onCreateWebpackConfig: GatsbyNode["onCreateWebpackConfig"] = ({
71
43
  }
72
44
  };
73
45
 
74
- export { onCreateWebpackConfig, prepareStaticDir };
46
+ export { onCreateWebpackConfig };