@griddo/cx 1.75.193 → 1.75.196

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.
@@ -3,20 +3,20 @@
3
3
  /* eslint-disable @typescript-eslint/no-non-null-assertion */
4
4
  /* eslint-disable node/shebang */
5
5
 
6
- require("dotenv").config();
7
-
8
- // External libraries
9
- import chalk from "chalk";
10
6
  import { execSync } from "child_process";
11
7
  import fs from "fs";
12
8
  import path from "path";
9
+
10
+ import chalk from "chalk";
11
+ import dotenv from "dotenv";
13
12
  import pkgDir from "pkg-dir";
14
13
 
15
- // Utils
16
14
  import { initCache } from "../src/utils/cache";
17
15
  import { findDomains } from "../src/utils/domains";
18
16
  import { exporterLogo as splash, measureFunctions } from "../src/utils/shared";
19
17
 
18
+ dotenv.config();
19
+
20
20
  // Envs
21
21
  const artifactsArchivable = ["dist", "assets", "apiCache", ".cache"];
22
22
  const artifactsDisposable = ["public", ".store"];
@@ -39,24 +39,24 @@ type Env = Record<string, unknown>;
39
39
  const getEnvRunner = (env: Env) => (command: string) => runner(command, env);
40
40
 
41
41
  const runner = (command: string, env: Env = {}) =>
42
- // TODO: Cuando esto falle, ejecutar `cleanAfterFail`
43
- execSync(command, {
44
- cwd: workingPath,
45
- stdio: "inherit",
46
- env: {
47
- ...process.env,
48
- ...env,
49
- GRIDDO_EXPORTER: "true",
50
- },
51
- });
42
+ // TODO: Cuando esto falle, ejecutar `cleanAfterFail`
43
+ execSync(command, {
44
+ cwd: workingPath,
45
+ stdio: "inherit",
46
+ env: {
47
+ ...process.env,
48
+ ...env,
49
+ GRIDDO_EXPORTER: "true",
50
+ },
51
+ });
52
52
 
53
53
  const getAssetPrefix = (domain: string) => {
54
- // TODO: Usar asset_prefix del dominio
55
- if (!process.env.GRIDDO_ASSET_PREFIX || !domain) return "";
54
+ // TODO: Usar asset_prefix del dominio
55
+ if (!process.env.GRIDDO_ASSET_PREFIX || !domain) return "";
56
56
 
57
- if (!domain.startsWith("pro-")) return "";
57
+ if (!domain.startsWith("pro-")) return "";
58
58
 
59
- return `${process.env.GRIDDO_ASSET_PREFIX}/${domain}`;
59
+ return `${process.env.GRIDDO_ASSET_PREFIX}/${domain}`;
60
60
  };
61
61
 
62
62
  // -----------------------------------------------------------------------------
@@ -71,240 +71,241 @@ const logWarning = (...message: Array<any>) => console.log(...message);
71
71
  // Main Stuff
72
72
  // -----------------------------------------------------------------------------
73
73
  const domainExport = async (domain: string) => {
74
- const runner = getDomainRunner(domain);
75
- // onPreExporter
76
- const endRestore = measureFunctions(runner.init, runner.restoreArtifacts);
77
- logInfo(`\n⌛️ Domain ${domain} restaured: ${endRestore}s`);
74
+ const runner = getDomainRunner(domain);
75
+ // onPreExporter
76
+ const endRestore = measureFunctions(runner.init, runner.restoreArtifacts);
77
+ logInfo(`\n⌛️ Domain ${domain} restaured: ${endRestore}s`);
78
78
 
79
- // Gatsby
80
- runner.runExporter();
79
+ // Gatsby
80
+ runner.runExporter();
81
81
 
82
- // onPostExporter
83
- const endArchive = measureFunctions(runner.archiveArtifacts);
84
- logInfo(`\n⌛️ Domain ${domain} archived: ${endArchive}s`);
82
+ // onPostExporter
83
+ const endArchive = measureFunctions(runner.archiveArtifacts);
84
+ logInfo(`\n⌛️ Domain ${domain} archived: ${endArchive}s`);
85
85
  };
86
86
 
87
87
  const launchExports = async () => {
88
- splash();
89
- initCache();
88
+ splash();
89
+ initCache();
90
90
 
91
- const domains = await findDomains();
91
+ const domains = await findDomains();
92
92
 
93
- for (const domain of domains) {
94
- logInfo(`️🚢 Exporting domain ${chalk.underline(domain)}`);
95
- await domainExport(domain);
96
- }
93
+ for (const domain of domains) {
94
+ logInfo(`️🚢 Exporting domain ${chalk.underline(domain)}`);
95
+ await domainExport(domain);
96
+ }
97
97
  };
98
98
 
99
99
  const getDomainRunner = (domain: string) => {
100
- const assetPrefix = getAssetPrefix(domain);
101
-
102
- const run = getEnvRunner({
103
- DOMAIN: domain,
104
- GRIDDO_ASSET_PREFIX: assetPrefix,
105
- HAS_ASSET_DOMAIN: assetPrefix && assetPrefix !== "",
106
- RENDERID: new Date().valueOf(),
107
- });
108
-
109
- const init = () => {
110
- logInfo(`🚀 Initializing ${chalk.underline(domain)} exporter`);
111
-
112
- cleanDirtyArtifactPaths();
113
- createBaseExportPaths();
114
- };
115
-
116
- const getArtifactPaths = (artifact = "") => {
117
- const domainExportArchiveBasePath = path.resolve(
118
- exportArchiveBasePath,
119
- domain
120
- );
121
- const currentExportArchivePath = path.resolve(
122
- domainExportArchiveBasePath,
123
- artifact
124
- );
125
- const currentExportBackupPath = `${currentExportArchivePath}-BACKUP`;
126
- const currentExportWorkingPath = path.resolve(workingPath, artifact);
127
-
128
- return {
129
- domainExportArchiveBasePath,
130
- currentExportArchivePath,
131
- currentExportBackupPath,
132
- currentExportWorkingPath,
133
- };
134
- };
135
-
136
- const cleanDirtyArtifactPaths = () => {
137
- for (const artifact of [...artifactsArchivable, ...artifactsDisposable]) {
138
- const { currentExportWorkingPath } = getArtifactPaths(artifact);
139
-
140
- if (fs.existsSync(currentExportWorkingPath)) {
141
- logWarning(`🧹 Cleanup dirty ${chalk.gray(currentExportWorkingPath)}`);
142
- run(`rm -rf ${currentExportWorkingPath}`);
143
- }
144
- }
145
- };
146
-
147
- const createBaseExportPaths = () => {
148
- const { domainExportArchiveBasePath } = getArtifactPaths();
149
-
150
- if (!fs.existsSync(domainExportArchiveBasePath)) {
151
- logInfo(`✨ Creating ${domainExportArchiveBasePath}`);
152
- run(`mkdir -p ${domainExportArchiveBasePath}`);
153
- }
154
- };
155
-
156
- const archiveExportArtifact = (artifact: string) => {
157
- const { currentExportArchivePath, currentExportWorkingPath } =
158
- getArtifactPaths(artifact);
159
-
160
- logInfo(
161
- `🚚 Moving files from ${chalk.gray(
162
- currentExportWorkingPath
163
- )} to ${chalk.gray(currentExportArchivePath)}`
164
- );
165
- run(`mv ${currentExportWorkingPath} ${currentExportArchivePath}`);
166
- };
167
-
168
- const archiveArtifacts = () => {
169
- for (const artifact of artifactsArchivable) {
170
- const { currentExportWorkingPath, currentExportArchivePath } =
171
- getArtifactPaths(artifact);
172
-
173
- if (!fs.existsSync(currentExportWorkingPath)) {
174
- logError(
175
- "📁 Source directory has not been created:",
176
- currentExportWorkingPath
177
- );
178
- continue;
179
- }
180
-
181
- try {
182
- createArtifactBackup(artifact);
183
- archiveExportArtifact(artifact);
184
- deleteArtifactBackup(artifact);
185
- } catch (error) {
186
- logError(
187
- `🚚 Error moving files to ${currentExportArchivePath}`,
188
- error.message
189
- );
190
- restoreArtifactBackup(artifact);
191
- continue;
192
- }
193
- }
194
- };
195
-
196
- const restoreArtifacts = () => {
197
- for (const artifact of artifactsArchivable) {
198
- const { currentExportArchivePath, currentExportWorkingPath } =
199
- getArtifactPaths(artifact);
200
-
201
- if (fs.existsSync(currentExportArchivePath)) {
202
- logWarning(`️♻️ Restoring ${chalk.gray(currentExportArchivePath)}`);
203
- run(`cp -R ${currentExportArchivePath} ${currentExportWorkingPath}`);
204
- }
205
- }
206
-
207
- moveDistToPublic();
208
- };
209
-
210
- const createArtifactBackup = (artifact: string) => {
211
- const { currentExportArchivePath, currentExportBackupPath } =
212
- getArtifactPaths(artifact);
213
-
214
- if (fs.existsSync(currentExportArchivePath)) {
215
- logInfo(`💿 Creating backup of ${chalk.gray(currentExportArchivePath)}`);
216
- run(`mv ${currentExportArchivePath} ${currentExportBackupPath}`);
217
- }
218
- };
219
-
220
- const restoreArtifactBackup = (artifact: string) => {
221
- const { currentExportArchivePath, currentExportBackupPath } =
222
- getArtifactPaths(artifact);
223
-
224
- if (fs.existsSync(currentExportBackupPath)) {
225
- logWarning(
226
- `️♻️ Restoring backup ${chalk.gray(currentExportArchivePath)}`
227
- );
228
- run(`mv ${currentExportBackupPath} ${currentExportArchivePath}`);
229
- }
230
- };
231
-
232
- const deleteArtifactBackup = (artifact: string) => {
233
- const { currentExportArchivePath, currentExportBackupPath } =
234
- getArtifactPaths(artifact);
235
-
236
- logWarning(`️❌ Removing backup ${chalk.gray(currentExportArchivePath)}`);
237
- run(`rm -rf ${currentExportBackupPath}`);
238
- };
239
-
240
- const runExporter = () => {
241
- console.log(`\n${chalk.black(chalk.bgGreen(" Gatsby (start) "))}\n`);
242
-
243
- run("yarn export");
244
- logSuccess("Your sites have been exported correctly");
245
-
246
- console.log(`\n${chalk.black(chalk.bgGreen(" Gatsby (end) "))}\n`);
247
-
248
- removeDisposableArtifacts();
249
- };
250
-
251
- // TODO: Hacer que infra tire de `public` en vez de `dist` y quitar esto
252
- const moveDistToPublic = () => {
253
- const { currentExportWorkingPath: distPath } = getArtifactPaths("dist");
254
- const { currentExportWorkingPath: publicPath } = getArtifactPaths("public");
255
-
256
- if (fs.existsSync(distPath)) {
257
- logWarning(
258
- `🚚 Moving ${chalk.gray(distPath)} to ${chalk.gray(publicPath)}`
259
- );
260
- run(`mv ${distPath} ${publicPath}`);
261
- }
262
- };
263
-
264
- // TODO: Esto no debería hacerse desde infra
265
- const movePublicToDist = () => {
266
- const { currentExportWorkingPath: publicPath } = getArtifactPaths("public");
267
- const { currentExportWorkingPath: distPath } = getArtifactPaths("dist");
268
-
269
- if (fs.existsSync(publicPath)) {
270
- logWarning(`🚚 Moving ${publicPath} to ${distPath}`);
271
- run(`mv ${publicPath} ${distPath}`);
272
- }
273
- };
274
-
275
- const removeDisposableArtifacts = () => {
276
- for (const artifact of artifactsDisposable) {
277
- const { currentExportWorkingPath: artifactPath } =
278
- getArtifactPaths(artifact);
279
-
280
- if (fs.existsSync(artifactPath)) {
281
- logWarning(`❌ Removing ${chalk.gray(artifactPath)}`);
282
- run(`rm -rf ${artifactPath}`);
283
- }
284
- }
285
- };
286
-
287
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
288
- const cleanAfterFail = () => {
289
- cleanDirtyArtifactPaths();
290
- };
291
-
292
- return {
293
- init,
294
- getArtifactPaths,
295
- archiveExportArtifact,
296
- archiveArtifacts,
297
- restoreArtifacts,
298
- createArtifactBackup,
299
- restoreArtifactBackup,
300
- deleteArtifactBackup,
301
- runExporter,
302
- };
100
+ const assetPrefix = getAssetPrefix(domain);
101
+
102
+ const run = getEnvRunner({
103
+ DOMAIN: domain,
104
+ GRIDDO_ASSET_PREFIX: assetPrefix,
105
+ HAS_ASSET_DOMAIN: assetPrefix && assetPrefix !== "",
106
+ RENDERID: new Date().valueOf(),
107
+ });
108
+
109
+ const init = () => {
110
+ logInfo(`🚀 Initializing ${chalk.underline(domain)} exporter`);
111
+
112
+ cleanDirtyArtifactPaths();
113
+ createBaseExportPaths();
114
+ };
115
+
116
+ const getArtifactPaths = (artifact = "") => {
117
+ const domainExportArchiveBasePath = path.resolve(
118
+ exportArchiveBasePath,
119
+ domain
120
+ );
121
+ const currentExportArchivePath = path.resolve(
122
+ domainExportArchiveBasePath,
123
+ artifact
124
+ );
125
+ const currentExportBackupPath = `${currentExportArchivePath}-BACKUP`;
126
+ const currentExportWorkingPath = path.resolve(workingPath, artifact);
127
+
128
+ return {
129
+ domainExportArchiveBasePath,
130
+ currentExportArchivePath,
131
+ currentExportBackupPath,
132
+ currentExportWorkingPath,
133
+ };
134
+ };
135
+
136
+ const cleanDirtyArtifactPaths = () => {
137
+ for (const artifact of [...artifactsArchivable, ...artifactsDisposable]) {
138
+ const { currentExportWorkingPath } = getArtifactPaths(artifact);
139
+
140
+ if (fs.existsSync(currentExportWorkingPath)) {
141
+ logWarning(`🧹 Cleanup dirty ${chalk.gray(currentExportWorkingPath)}`);
142
+ run(`rm -rf ${currentExportWorkingPath}`);
143
+ }
144
+ }
145
+ };
146
+
147
+ const createBaseExportPaths = () => {
148
+ const { domainExportArchiveBasePath } = getArtifactPaths();
149
+
150
+ if (!fs.existsSync(domainExportArchiveBasePath)) {
151
+ logInfo(`✨ Creating ${domainExportArchiveBasePath}`);
152
+ run(`mkdir -p ${domainExportArchiveBasePath}`);
153
+ }
154
+ };
155
+
156
+ const archiveExportArtifact = (artifact: string) => {
157
+ const { currentExportArchivePath, currentExportWorkingPath } =
158
+ getArtifactPaths(artifact);
159
+
160
+ logInfo(
161
+ `🚚 Moving files from ${chalk.gray(
162
+ currentExportWorkingPath
163
+ )} to ${chalk.gray(currentExportArchivePath)}`
164
+ );
165
+ run(`mv ${currentExportWorkingPath} ${currentExportArchivePath}`);
166
+ };
167
+
168
+ const archiveArtifacts = () => {
169
+ for (const artifact of artifactsArchivable) {
170
+ const { currentExportWorkingPath, currentExportArchivePath } =
171
+ getArtifactPaths(artifact);
172
+
173
+ if (!fs.existsSync(currentExportWorkingPath)) {
174
+ logError(
175
+ "📁 Source directory has not been created:",
176
+ currentExportWorkingPath
177
+ );
178
+ continue;
179
+ }
180
+
181
+ try {
182
+ createArtifactBackup(artifact);
183
+ archiveExportArtifact(artifact);
184
+ deleteArtifactBackup(artifact);
185
+ } catch (error) {
186
+ logError(
187
+ `🚚 Error moving files to ${currentExportArchivePath}`,
188
+ error.message
189
+ );
190
+ restoreArtifactBackup(artifact);
191
+ continue;
192
+ }
193
+ }
194
+ };
195
+
196
+ const restoreArtifacts = () => {
197
+ for (const artifact of artifactsArchivable) {
198
+ const { currentExportArchivePath, currentExportWorkingPath } =
199
+ getArtifactPaths(artifact);
200
+
201
+ if (fs.existsSync(currentExportArchivePath)) {
202
+ logWarning(`️♻️ Restoring ${chalk.gray(currentExportArchivePath)}`);
203
+ run(`cp -R ${currentExportArchivePath} ${currentExportWorkingPath}`);
204
+ }
205
+ }
206
+
207
+ moveDistToPublic();
208
+ };
209
+
210
+ const createArtifactBackup = (artifact: string) => {
211
+ const { currentExportArchivePath, currentExportBackupPath } =
212
+ getArtifactPaths(artifact);
213
+
214
+ if (fs.existsSync(currentExportArchivePath)) {
215
+ logInfo(`💿 Creating backup of ${chalk.gray(currentExportArchivePath)}`);
216
+ run(`mv ${currentExportArchivePath} ${currentExportBackupPath}`);
217
+ }
218
+ };
219
+
220
+ const restoreArtifactBackup = (artifact: string) => {
221
+ const { currentExportArchivePath, currentExportBackupPath } =
222
+ getArtifactPaths(artifact);
223
+
224
+ if (fs.existsSync(currentExportBackupPath)) {
225
+ logWarning(
226
+ `️♻️ Restoring backup ${chalk.gray(currentExportArchivePath)}`
227
+ );
228
+ run(`mv ${currentExportBackupPath} ${currentExportArchivePath}`);
229
+ }
230
+ };
231
+
232
+ const deleteArtifactBackup = (artifact: string) => {
233
+ const { currentExportArchivePath, currentExportBackupPath } =
234
+ getArtifactPaths(artifact);
235
+
236
+ logWarning(`️🗑️ Removing backup ${chalk.gray(currentExportArchivePath)}`);
237
+ run(`rm -rf ${currentExportBackupPath}`);
238
+ };
239
+
240
+ const runExporter = () => {
241
+ console.log(`\n${chalk.black(chalk.bgGreen(" Gatsby (start) "))}\n`);
242
+
243
+ run("yarn export");
244
+ // run("cp build-report.json build-report-${domain}.json")
245
+ logSuccess("Your sites have been exported correctly");
246
+
247
+ console.log(`\n${chalk.black(chalk.bgGreen(" Gatsby (end) "))}\n`);
248
+
249
+ removeDisposableArtifacts();
250
+ };
251
+
252
+ // TODO: Hacer que infra tire de `public` en vez de `dist` y quitar esto
253
+ const moveDistToPublic = () => {
254
+ const { currentExportWorkingPath: distPath } = getArtifactPaths("dist");
255
+ const { currentExportWorkingPath: publicPath } = getArtifactPaths("public");
256
+
257
+ if (fs.existsSync(distPath)) {
258
+ logWarning(
259
+ `🚚 Moving ${chalk.gray(distPath)} to ${chalk.gray(publicPath)}`
260
+ );
261
+ run(`mv ${distPath} ${publicPath}`);
262
+ }
263
+ };
264
+
265
+ // TODO: Esto no debería hacerse desde infra
266
+ const movePublicToDist = () => {
267
+ const { currentExportWorkingPath: publicPath } = getArtifactPaths("public");
268
+ const { currentExportWorkingPath: distPath } = getArtifactPaths("dist");
269
+
270
+ if (fs.existsSync(publicPath)) {
271
+ logWarning(`🚚 Moving ${publicPath} to ${distPath}`);
272
+ run(`mv ${publicPath} ${distPath}`);
273
+ }
274
+ };
275
+
276
+ const removeDisposableArtifacts = () => {
277
+ for (const artifact of artifactsDisposable) {
278
+ const { currentExportWorkingPath: artifactPath } =
279
+ getArtifactPaths(artifact);
280
+
281
+ if (fs.existsSync(artifactPath)) {
282
+ logWarning(`🗑️ Removing ${chalk.gray(artifactPath)}`);
283
+ run(`rm -rf ${artifactPath}`);
284
+ }
285
+ }
286
+ };
287
+
288
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
289
+ const cleanAfterFail = () => {
290
+ cleanDirtyArtifactPaths();
291
+ };
292
+
293
+ return {
294
+ init,
295
+ getArtifactPaths,
296
+ archiveExportArtifact,
297
+ archiveArtifacts,
298
+ restoreArtifacts,
299
+ createArtifactBackup,
300
+ restoreArtifactBackup,
301
+ deleteArtifactBackup,
302
+ runExporter,
303
+ };
303
304
  };
304
305
 
305
306
  console.clear();
306
307
 
307
308
  launchExports().catch((err) => {
308
- console.error(" ERROR", err?.stdout?.toString() || err);
309
- process.exit(1);
309
+ console.error("⛔️ ERROR", err?.stdout?.toString() || err);
310
+ process.exit(1);
310
311
  });
@@ -1,17 +1,10 @@
1
- // Types
2
1
  import type { CustomHeadProps } from "./types";
3
2
 
4
- // Instance elements
5
- import {
6
- generateAutomaticDimensions,
7
- // @ts-ignore
8
- } from "components";
9
-
10
- // External libraries
3
+ // @ts-expect-error components is unknown
4
+ import { generateAutomaticDimensions } from "components";
11
5
  import parse from "html-react-parser";
12
6
  import * as React from "react";
13
7
 
14
- // Utils
15
8
  import { cleanCommaSeparated, composeAnalytics, formatImage } from "./utils";
16
9
 
17
10
  /**
@@ -1,20 +1,10 @@
1
- // Types
2
- import type { Core } from "@griddo/core";
3
1
  import type { TemplateProps } from "./types";
2
+ import type { Core } from "@griddo/core";
4
3
 
5
- // Components and functions
6
4
  import { Page as RenderGriddoPage } from "@griddo/core";
5
+ // @ts-expect-error components is unknown
6
+ import { components, SiteProvider, templates } from "components";
7
7
  import { Link, navigate } from "gatsby";
8
-
9
- // Instance elements
10
- import {
11
- components,
12
- SiteProvider,
13
- templates,
14
- // @ts-ignore
15
- } from "components";
16
-
17
- // External libraries
18
8
  import * as React from "react";
19
9
  import { Helmet } from "react-helmet";
20
10
 
@@ -1,7 +1,7 @@
1
- import type { Core } from "@griddo/core";
2
- import type { HeadProps } from "gatsby";
3
1
  import type { AllPagesResponse } from "../types/api";
4
2
  import type { GatsbyPageObject } from "../types/pages";
3
+ import type { Core } from "@griddo/core";
4
+ import type { HeadProps } from "gatsby";
5
5
 
6
6
  export interface CustomHeadProps extends HeadProps {
7
7
  pageContext: GatsbyPageObject["context"] & {
@@ -6,7 +6,6 @@
6
6
  //
7
7
  // Browserify doesn't work with the mixture of typescript + webpack 5 + SSR
8
8
 
9
- // Types
10
9
  import type { Fields } from "@griddo/core";
11
10
 
12
11
  /**
@@ -22,6 +21,7 @@ function cleanCommaSeparated(str: string) {
22
21
 
23
22
  /**
24
23
  * Format Cloudinary or DAM URL
24
+ *
25
25
  * @param image The image url
26
26
  * @param width With of the image
27
27
  * @param height Height of the image
@@ -59,7 +59,7 @@ function addGriddoDamParams(image: string, params: string) {
59
59
  }
60
60
 
61
61
  /**
62
- * Take a cloudinary url and add query params.
62
+ * Take a cloudinary url and add query params.
63
63
  */
64
64
  function addCloudinaryParams(image: string, params: string) {
65
65
  const plainUrl = image.replace("https://", "");
@@ -78,16 +78,13 @@ function composeAnalytics(
78
78
  siteScript: string;
79
79
  page: {
80
80
  dimensions: {
81
- // TODO: Type dimensions / remove any
82
- values: any;
81
+ values: Record<string, unknown>;
83
82
  };
84
83
  };
85
84
  };
86
85
  },
87
86
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
88
- generateAutomaticDimensions = (page: Record<string, unknown>) => {
89
- return null;
90
- }
87
+ generateAutomaticDimensions = (page: Record<string, unknown>) => null
91
88
  ) {
92
89
  const {
93
90
  pageContext: {
@@ -107,7 +104,8 @@ function composeAnalytics(
107
104
  const allDimensionsValues = {
108
105
  ...dimensionValues,
109
106
  ...automaticDimensionValues,
110
- };
107
+ // TODO: remove any
108
+ } as Record<string, any>;
111
109
 
112
110
  const allDimensions = [];
113
111
 
package/src/html.tsx CHANGED
@@ -1,6 +1,8 @@
1
- import * as React from "react";
2
1
  import type { HtmlProps } from "./components/types";
3
2
 
3
+ import * as React from "react";
4
+
5
+ // TODO: JSDoc
4
6
  export default function HTML(props: HtmlProps) {
5
7
  return (
6
8
  <html {...props.htmlAttributes}>
@@ -1,4 +1,3 @@
1
- // External libraries
2
1
  import axios from "axios";
3
2
  import chalk from "chalk";
4
3
 
@@ -43,6 +42,8 @@ class AuthService {
43
42
  };
44
43
  }
45
44
 
45
+ return this.headers;
46
+
46
47
  console.log("👋 Login\n");
47
48
  } catch (e) {
48
49
  console.error(