@micropue/drop-cli 0.0.0-stage → 0.1.0

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.
@@ -0,0 +1,329 @@
1
+ import { lstat, readdir, readFile } from "node:fs/promises";
2
+ import path from "node:path";
3
+
4
+ import {
5
+ DROP_DIR_NAME,
6
+ IGNORE_FILE_NAME,
7
+ LIMITS,
8
+ NO_SOURCE_FILES_CODE,
9
+ SUPPORTED_EXTENSIONS,
10
+ } from "./constants.js";
11
+ import { DropConfigError } from "./errors.js";
12
+ import { loadIgnoreMatcher } from "./ignore.js";
13
+ import {
14
+ foldersFromFiles,
15
+ hasWrongCaseSupportedExtension,
16
+ isInside,
17
+ sha256,
18
+ snapshotHash,
19
+ toPosixPath,
20
+ validateRelativeFilePath,
21
+ } from "./utils.js";
22
+
23
+ const decoder = new TextDecoder("utf-8", { fatal: true });
24
+
25
+ function defaultExcluded(relativePath, isDirectory) {
26
+ const segments = relativePath.split("/");
27
+ if (segments[0] === DROP_DIR_NAME) {
28
+ return true;
29
+ }
30
+ if (segments.some((segment) => segment === "node_modules" || segment === ".git")) {
31
+ return true;
32
+ }
33
+ return segments.some((segment) => segment.startsWith(".")) && !isDirectory;
34
+ }
35
+
36
+ function hiddenPath(relativePath) {
37
+ return relativePath.split("/").some((segment) => segment.startsWith("."));
38
+ }
39
+
40
+ async function readSiteFile(absolutePath, relativePath) {
41
+ const buffer = await readFile(absolutePath);
42
+ if (buffer.length > LIMITS.fileBytes) {
43
+ throw new DropConfigError(
44
+ `File exceeds the ${LIMITS.fileBytes} byte limit: ${relativePath}`,
45
+ {
46
+ hint: `The current size is ${buffer.length} bytes.`,
47
+ },
48
+ );
49
+ }
50
+
51
+ let content;
52
+ try {
53
+ content = decoder.decode(buffer);
54
+ } catch {
55
+ throw new DropConfigError(`File is not valid UTF-8: ${relativePath}`);
56
+ }
57
+
58
+ return {
59
+ path: relativePath,
60
+ content,
61
+ bytes: buffer.length,
62
+ sha256: null,
63
+ };
64
+ }
65
+
66
+ async function walkFiles(root, relativeDir, matcher, state) {
67
+ const absoluteDir = relativeDir ? path.join(root, relativeDir) : root;
68
+ let entries;
69
+ try {
70
+ entries = await readdir(absoluteDir, { withFileTypes: true });
71
+ } catch (error) {
72
+ if (error.code === "ENOENT") {
73
+ return;
74
+ }
75
+ throw error;
76
+ }
77
+
78
+ entries.sort((left, right) => left.name.localeCompare(right.name));
79
+
80
+ for (const entry of entries) {
81
+ const relativePath = relativeDir
82
+ ? `${relativeDir}/${entry.name}`
83
+ : entry.name;
84
+ const absolutePath = path.join(root, relativePath);
85
+
86
+ if (!isInside(root, absolutePath) || absolutePath === root) {
87
+ continue;
88
+ }
89
+
90
+ if (entry.name === IGNORE_FILE_NAME) {
91
+ continue;
92
+ }
93
+
94
+ if (entry.isSymbolicLink()) {
95
+ if (!hiddenPath(relativePath) && state.warnings.length < 10) {
96
+ state.warnings.push(`Skipped symbolic link: ${relativePath}`);
97
+ }
98
+ continue;
99
+ }
100
+
101
+ if (entry.isDirectory()) {
102
+ if (defaultExcluded(relativePath, true) || hiddenPath(relativePath)) {
103
+ continue;
104
+ }
105
+ if (matcher?.isIgnored(relativePath, true)) {
106
+ continue;
107
+ }
108
+ state.folders.add(relativePath);
109
+ if (state.folders.size > LIMITS.folders) {
110
+ throw new DropConfigError(
111
+ `Project contains more than ${LIMITS.folders} folders.`,
112
+ { hint: "Simplify the directory tree or exclude folders in .drop-ignore." },
113
+ );
114
+ }
115
+ await walkFiles(root, relativePath, matcher, state);
116
+ continue;
117
+ }
118
+
119
+ if (!entry.isFile()) {
120
+ continue;
121
+ }
122
+
123
+ if (defaultExcluded(relativePath, false) || hiddenPath(relativePath)) {
124
+ continue;
125
+ }
126
+
127
+ if (matcher?.isIgnored(relativePath, false)) {
128
+ state.ignoredCount += 1;
129
+ continue;
130
+ }
131
+
132
+ if (hasWrongCaseSupportedExtension(relativePath)) {
133
+ throw new DropConfigError(
134
+ `File extensions must be lowercase: ${relativePath}`,
135
+ { hint: "Rename .HTML, .CSS or .JS files before publishing." },
136
+ );
137
+ }
138
+
139
+ if (!SUPPORTED_EXTENSIONS.has(path.extname(entry.name))) {
140
+ state.unsupportedCount += 1;
141
+ continue;
142
+ }
143
+
144
+ const pathError = validateRelativeFilePath(relativePath);
145
+ if (pathError) {
146
+ throw new DropConfigError(pathError);
147
+ }
148
+
149
+ const file = await readSiteFile(absolutePath, relativePath);
150
+ state.files.push(file);
151
+ if (state.files.length > LIMITS.files) {
152
+ throw new DropConfigError(
153
+ `Project contains more than ${LIMITS.files} publishable files.`,
154
+ { hint: "DROP only accepts 20 .html, .css or .js files per project." },
155
+ );
156
+ }
157
+ }
158
+ }
159
+
160
+ function validateTotalSize(files) {
161
+ const totalBytes = files.reduce((total, file) => total + file.bytes, 0);
162
+ if (totalBytes > LIMITS.projectBytes) {
163
+ throw new DropConfigError(
164
+ `Project size exceeds the ${LIMITS.projectBytes} byte limit.`,
165
+ {
166
+ hint: `The current total is ${totalBytes} bytes.`,
167
+ },
168
+ );
169
+ }
170
+ return totalBytes;
171
+ }
172
+
173
+ function finalizeSnapshot(files, folders, warnings, unsupportedCount, ignoredCount) {
174
+ files.sort((left, right) => left.path.localeCompare(right.path));
175
+ const cleanFiles = files.map((file) => ({
176
+ ...file,
177
+ sha256: file.sha256 ?? sha256(file.content),
178
+ }));
179
+ const totalBytes = validateTotalSize(cleanFiles);
180
+ const folderList = [...new Set([...folders, ...foldersFromFiles(cleanFiles)])].sort();
181
+ if (folderList.length > LIMITS.folders) {
182
+ throw new DropConfigError(
183
+ `Project contains more than ${LIMITS.folders} folders.`,
184
+ );
185
+ }
186
+ return {
187
+ files: cleanFiles,
188
+ folders: folderList,
189
+ totalBytes,
190
+ hash: snapshotHash(cleanFiles, folderList),
191
+ warnings,
192
+ unsupportedCount,
193
+ ignoredCount,
194
+ };
195
+ }
196
+
197
+ export async function scanSource(root, { matcher } = {}) {
198
+ const ignoreMatcher = matcher ?? (await loadIgnoreMatcher(root));
199
+ const state = {
200
+ files: [],
201
+ folders: new Set(),
202
+ warnings: [],
203
+ unsupportedCount: 0,
204
+ ignoredCount: 0,
205
+ };
206
+ await walkFiles(root, "", ignoreMatcher, state);
207
+ if (state.files.length === 0) {
208
+ throw new DropConfigError(
209
+ "No .html, .css or .js files found to publish.",
210
+ {
211
+ code: NO_SOURCE_FILES_CODE,
212
+ hint: "Run this command from the site root or check .drop-ignore.",
213
+ },
214
+ );
215
+ }
216
+ return finalizeSnapshot(
217
+ state.files,
218
+ state.folders,
219
+ state.warnings,
220
+ state.unsupportedCount,
221
+ state.ignoredCount,
222
+ );
223
+ }
224
+
225
+ export async function scanDropBundle(root) {
226
+ const dropRoot = path.join(root, DROP_DIR_NAME);
227
+ let configStat;
228
+ try {
229
+ configStat = await lstat(path.join(dropRoot, "drop.json"));
230
+ } catch (error) {
231
+ if (error.code === "ENOENT") {
232
+ return null;
233
+ }
234
+ throw error;
235
+ }
236
+ if (!configStat.isFile()) {
237
+ return null;
238
+ }
239
+
240
+ const state = {
241
+ files: [],
242
+ folders: new Set(),
243
+ warnings: [],
244
+ unsupportedCount: 0,
245
+ ignoredCount: 0,
246
+ };
247
+
248
+ async function walk(relativeDir) {
249
+ const absoluteDir = relativeDir
250
+ ? path.join(dropRoot, relativeDir)
251
+ : dropRoot;
252
+ const entries = await readdir(absoluteDir, { withFileTypes: true });
253
+ entries.sort((left, right) => left.name.localeCompare(right.name));
254
+ for (const entry of entries) {
255
+ const relativePath = relativeDir
256
+ ? `${relativeDir}/${entry.name}`
257
+ : entry.name;
258
+ if (relativePath === "drop.json") {
259
+ continue;
260
+ }
261
+ if (entry.isSymbolicLink()) {
262
+ continue;
263
+ }
264
+ const absolutePath = path.join(dropRoot, relativePath);
265
+ if (entry.isDirectory()) {
266
+ if (hiddenPath(relativePath)) {
267
+ continue;
268
+ }
269
+ state.folders.add(relativePath);
270
+ await walk(relativePath);
271
+ continue;
272
+ }
273
+ if (!entry.isFile()) {
274
+ continue;
275
+ }
276
+ if (hiddenPath(relativePath)) {
277
+ state.unsupportedCount += 1;
278
+ continue;
279
+ }
280
+ if (hasWrongCaseSupportedExtension(relativePath)) {
281
+ throw new DropConfigError(
282
+ `File extensions must be lowercase: ${relativePath}`,
283
+ { hint: "Rename .HTML, .CSS or .JS files before publishing." },
284
+ );
285
+ }
286
+ if (!SUPPORTED_EXTENSIONS.has(path.extname(relativePath))) {
287
+ state.unsupportedCount += 1;
288
+ continue;
289
+ }
290
+ const pathError = validateRelativeFilePath(relativePath);
291
+ if (pathError) {
292
+ throw new DropConfigError(pathError);
293
+ }
294
+ state.files.push(await readSiteFile(absolutePath, relativePath));
295
+ }
296
+ }
297
+
298
+ await walk("");
299
+ if (state.files.length === 0) {
300
+ return null;
301
+ }
302
+ return finalizeSnapshot(
303
+ state.files,
304
+ state.folders,
305
+ state.warnings,
306
+ state.unsupportedCount,
307
+ state.ignoredCount,
308
+ );
309
+ }
310
+
311
+ export function stripFileContent(snapshot) {
312
+ return {
313
+ ...snapshot,
314
+ files: snapshot.files.map(({ path: filePath, bytes, sha256 }) => ({
315
+ path: filePath,
316
+ bytes,
317
+ sha256,
318
+ })),
319
+ };
320
+ }
321
+
322
+ export function remoteFiles(snapshot) {
323
+ return snapshot.files.map((file) => ({
324
+ path: file.path,
325
+ content: file.content,
326
+ }));
327
+ }
328
+
329
+ export { toPosixPath };
@@ -0,0 +1,59 @@
1
+ export class DropError extends Error {
2
+ constructor(message, options = {}) {
3
+ super(message, options);
4
+ this.name = "DropError";
5
+ this.code = options.code;
6
+ this.hint = options.hint;
7
+ this.exitCode = options.exitCode ?? 1;
8
+ }
9
+ }
10
+
11
+ export class DropApiError extends DropError {
12
+ constructor(message, options = {}) {
13
+ super(message, options);
14
+ this.name = "DropApiError";
15
+ this.status = options.status;
16
+ this.requestId = options.requestId;
17
+ this.retryAfter = options.retryAfter;
18
+ this.issues = options.issues ?? [];
19
+ }
20
+ }
21
+
22
+ export class DropConfigError extends DropError {
23
+ constructor(message, options = {}) {
24
+ super(message, options);
25
+ this.name = "DropConfigError";
26
+ }
27
+ }
28
+
29
+ export function isAbortError(error) {
30
+ return (
31
+ error?.name === "AbortError" ||
32
+ error?.code === "ABORT_ERR" ||
33
+ error?.cause?.name === "AbortError"
34
+ );
35
+ }
36
+
37
+ export function formatError(error) {
38
+ if (error instanceof DropApiError) {
39
+ const status = error.status ? ` (HTTP ${error.status})` : "";
40
+ const code = error.code ? ` [${error.code}]` : "";
41
+ const lines = [`${error.message}${status}${code}`];
42
+ if (error.requestId) {
43
+ lines.push(`requestId: ${error.requestId}`);
44
+ }
45
+ for (const issue of error.issues) {
46
+ lines.push(`- ${issue.path ? `${issue.path}: ` : ""}${issue.message}`);
47
+ }
48
+ if (error.hint) {
49
+ lines.push(error.hint);
50
+ }
51
+ return lines.join("\n");
52
+ }
53
+
54
+ if (error instanceof DropError) {
55
+ return error.hint ? `${error.message}\n${error.hint}` : error.message;
56
+ }
57
+
58
+ return error?.message || String(error);
59
+ }
@@ -0,0 +1,48 @@
1
+ import { readFile } from "node:fs/promises";
2
+ import path from "node:path";
3
+
4
+ import ignore from "ignore";
5
+
6
+ import { IGNORE_FILE_NAME } from "./constants.js";
7
+ import { DropConfigError } from "./errors.js";
8
+ import { toPosixPath } from "./utils.js";
9
+
10
+ export async function loadIgnoreMatcher(root) {
11
+ const ignoreFile = path.join(root, IGNORE_FILE_NAME);
12
+ let contents = "";
13
+
14
+ try {
15
+ contents = await readFile(ignoreFile, "utf8");
16
+ } catch (error) {
17
+ if (error.code !== "ENOENT") {
18
+ throw new DropConfigError(`Could not read ${IGNORE_FILE_NAME}`, {
19
+ cause: error,
20
+ });
21
+ }
22
+ }
23
+
24
+ const matcher = ignore();
25
+ try {
26
+ matcher.add(contents);
27
+ } catch (error) {
28
+ throw new DropConfigError(`Invalid ${IGNORE_FILE_NAME}`, {
29
+ cause: error,
30
+ hint: "Use gitignore-style patterns, one per line.",
31
+ });
32
+ }
33
+
34
+ return {
35
+ source: contents,
36
+ isIgnored(relativePath, isDirectory = false) {
37
+ if (!relativePath) {
38
+ return false;
39
+ }
40
+ const normalized = toPosixPath(relativePath);
41
+ try {
42
+ return matcher.ignores(isDirectory ? `${normalized}/` : normalized);
43
+ } catch {
44
+ return false;
45
+ }
46
+ },
47
+ };
48
+ }
@@ -0,0 +1,58 @@
1
+ import readline from "node:readline";
2
+
3
+ import { DropConfigError } from "./errors.js";
4
+
5
+ export function promptHidden(label) {
6
+ if (!process.stdin.isTTY || !process.stdout.isTTY) {
7
+ throw new DropConfigError(`${label} requires an interactive terminal.`);
8
+ }
9
+
10
+ return new Promise((resolve, reject) => {
11
+ const stdin = process.stdin;
12
+ let value = "";
13
+ process.stdout.write(`${label}: `);
14
+ readline.emitKeypressEvents(stdin);
15
+ stdin.setRawMode(true);
16
+ stdin.resume();
17
+
18
+ const cleanup = () => {
19
+ stdin.off("keypress", onKeypress);
20
+ stdin.setRawMode(false);
21
+ stdin.pause();
22
+ };
23
+
24
+ const finish = (error, result) => {
25
+ cleanup();
26
+ process.stdout.write("\n");
27
+ if (error) {
28
+ reject(error);
29
+ } else {
30
+ resolve(result);
31
+ }
32
+ };
33
+
34
+ const onKeypress = (character, key) => {
35
+ if (key?.ctrl && key.name === "c") {
36
+ finish(new DropConfigError("Cancelled."));
37
+ return;
38
+ }
39
+ if (key?.name === "return" || key?.name === "enter") {
40
+ finish(null, value);
41
+ return;
42
+ }
43
+ if (key?.name === "backspace") {
44
+ if (value.length > 0) {
45
+ value = value.slice(0, -1);
46
+ process.stdout.write("\b \b");
47
+ }
48
+ return;
49
+ }
50
+ if (character && !key?.ctrl && !key?.meta) {
51
+ value += character;
52
+ process.stdout.write("*");
53
+ }
54
+ };
55
+
56
+ stdin.on("keypress", onKeypress);
57
+ });
58
+ }
@@ -0,0 +1,130 @@
1
+ import { readFile, stat } from "node:fs/promises";
2
+ import path from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+
5
+ import {
6
+ DEFAULT_API_BASE,
7
+ DEFAULT_INTERVAL_MS,
8
+ MIN_INTERVAL_MS,
9
+ } from "./constants.js";
10
+ import { DropConfigError } from "./errors.js";
11
+ import {
12
+ deriveSlug,
13
+ isValidSlug,
14
+ normalizeSlug,
15
+ normalizeVisibility,
16
+ parsePositiveInteger,
17
+ } from "./utils.js";
18
+
19
+ const packageJsonPath = fileURLToPath(
20
+ new URL("../../package.json", import.meta.url),
21
+ );
22
+
23
+ export async function packageVersion() {
24
+ const packageJson = JSON.parse(
25
+ await readFile(packageJsonPath, "utf8"),
26
+ );
27
+ return packageJson.version;
28
+ }
29
+
30
+ export async function resolveDirectory(input = ".") {
31
+ const root = path.resolve(process.cwd(), input || ".");
32
+ let info;
33
+ try {
34
+ info = await stat(root);
35
+ } catch (error) {
36
+ if (error.code === "ENOENT") {
37
+ throw new DropConfigError(`Directory does not exist: ${root}`);
38
+ }
39
+ throw error;
40
+ }
41
+ if (!info.isDirectory()) {
42
+ throw new DropConfigError(`Not a directory: ${root}`);
43
+ }
44
+ return root;
45
+ }
46
+
47
+ export function resolveSettings(root, options = {}, config = null) {
48
+ const requestedVisibility =
49
+ options.private === true
50
+ ? "password"
51
+ : options.visibility ?? config?.visibility ?? "public";
52
+
53
+ if (
54
+ options.visibility &&
55
+ normalizeVisibility(options.visibility) === null
56
+ ) {
57
+ throw new DropConfigError(
58
+ `Unknown visibility: ${options.visibility}. Use public or password (or private).`,
59
+ );
60
+ }
61
+
62
+ const visibility = normalizeVisibility(requestedVisibility);
63
+ if (!visibility) {
64
+ throw new DropConfigError(`Invalid visibility: ${requestedVisibility}`);
65
+ }
66
+
67
+ const rawSlug = options.slug ?? config?.slug ?? deriveSlug(root);
68
+ const slug = normalizeSlug(rawSlug);
69
+ if (!isValidSlug(slug)) {
70
+ throw new DropConfigError(`Invalid slug: ${rawSlug}`, {
71
+ hint: "Slugs must be 1-40 lowercase letters, numbers or hyphens.",
72
+ });
73
+ }
74
+
75
+ const name = String(options.name ?? config?.name ?? path.basename(root)).trim();
76
+ if (!name || name.length > 80) {
77
+ throw new DropConfigError("Project name must contain 1-80 characters.");
78
+ }
79
+
80
+ const apiBase =
81
+ options.apiUrl ??
82
+ process.env.DROP_API_BASE ??
83
+ config?.apiBase ??
84
+ DEFAULT_API_BASE;
85
+ try {
86
+ const parsed = new URL(apiBase);
87
+ if (!["http:", "https:"].includes(parsed.protocol)) {
88
+ throw new Error();
89
+ }
90
+ } catch {
91
+ throw new DropConfigError(`Invalid DROP API URL: ${apiBase}`);
92
+ }
93
+
94
+ const intervalMs = parsePositiveInteger(
95
+ options.interval ?? DEFAULT_INTERVAL_MS,
96
+ "--interval",
97
+ { min: MIN_INTERVAL_MS },
98
+ );
99
+
100
+ const message =
101
+ options.message === undefined ? undefined : String(options.message).trim();
102
+ if (message !== undefined && message.length > 200) {
103
+ throw new DropConfigError("--message must not exceed 200 characters.");
104
+ }
105
+
106
+ return {
107
+ slug,
108
+ name,
109
+ visibility,
110
+ apiBase: apiBase.replace(/\/+$/g, ""),
111
+ intervalMs,
112
+ password: options.password,
113
+ explicitPassword: options.password !== undefined,
114
+ message,
115
+ force: options.force === true,
116
+ poll: options.poll === true,
117
+ };
118
+ }
119
+
120
+ export function metadataChanged(config, settings) {
121
+ if (!config?.projectId) {
122
+ return false;
123
+ }
124
+ return (
125
+ config.slug !== settings.slug ||
126
+ config.name !== settings.name ||
127
+ config.visibility !== settings.visibility ||
128
+ (settings.explicitPassword && settings.visibility === "password")
129
+ );
130
+ }
@@ -0,0 +1,38 @@
1
+ import { NO_SOURCE_FILES_CODE } from "./constants.js";
2
+ import { readConfig } from "./config.js";
3
+ import { scanDropBundle, scanSource } from "./discovery.js";
4
+ import { DropConfigError } from "./errors.js";
5
+ import { loadIgnoreMatcher } from "./ignore.js";
6
+
7
+ export async function loadSnapshot(root, { allowBundleFallback = true } = {}) {
8
+ const matcher = await loadIgnoreMatcher(root);
9
+ let sourceError;
10
+ try {
11
+ return await scanSource(root, { matcher });
12
+ } catch (error) {
13
+ if (error?.code !== NO_SOURCE_FILES_CODE) {
14
+ throw error;
15
+ }
16
+ sourceError = error;
17
+ }
18
+
19
+ if (allowBundleFallback) {
20
+ const bundle = await scanDropBundle(root);
21
+ if (bundle) {
22
+ return bundle;
23
+ }
24
+ }
25
+
26
+ throw sourceError ?? new DropConfigError("No publishable files found.");
27
+ }
28
+
29
+ export async function loadWatchSnapshot(root, { initial = false } = {}) {
30
+ if (initial) {
31
+ return loadSnapshot(root, { allowBundleFallback: true });
32
+ }
33
+ return loadSnapshot(root, { allowBundleFallback: false });
34
+ }
35
+
36
+ export async function currentConfig(root) {
37
+ return readConfig(root);
38
+ }
@@ -0,0 +1,45 @@
1
+ const useColor =
2
+ process.stdout.isTTY &&
3
+ process.env.NO_COLOR === undefined &&
4
+ process.env.TERM !== "dumb";
5
+
6
+ function style(open, close, text) {
7
+ return useColor ? `\u001b[${open}m${text}\u001b[${close}m` : String(text);
8
+ }
9
+
10
+ export const color = {
11
+ bold: (text) => style("1", "22", text),
12
+ dim: (text) => style("2", "22", text),
13
+ cyan: (text) => style("36", "39", text),
14
+ green: (text) => style("32", "39", text),
15
+ yellow: (text) => style("33", "39", text),
16
+ red: (text) => style("31", "39", text),
17
+ };
18
+
19
+ export function printDropBanner() {
20
+ process.stdout.write(`${color.bold("DROP")} ${color.dim("· local site publisher")}\n`);
21
+ }
22
+
23
+ export function printInfo(message) {
24
+ process.stdout.write(`${color.dim("│")} ${message}\n`);
25
+ }
26
+
27
+ export function printSuccess(message) {
28
+ process.stdout.write(`${color.green("✓")} ${message}\n`);
29
+ }
30
+
31
+ export function printProgress(message) {
32
+ process.stdout.write(`${color.cyan("›")} ${message}\n`);
33
+ }
34
+
35
+ export function printWarning(message) {
36
+ process.stderr.write(`${color.yellow("!")} ${message}\n`);
37
+ }
38
+
39
+ export function printError(message) {
40
+ process.stderr.write(`${color.red("✗")} ${message}\n`);
41
+ }
42
+
43
+ export function printUrl(url, label = "Live") {
44
+ process.stdout.write(`${color.green("✓")} ${label} ${color.cyan(url)}\n`);
45
+ }