@danielx/civet 0.6.25 → 0.6.27

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,16 +1,10 @@
1
- import {
2
- plugin
3
- } from "bun";
1
+ import { plugin } from "bun";
4
2
  await plugin({
5
3
  name: "Civet loader",
6
4
  setup: async function(builder) {
7
- var compile, readFileSync;
8
5
  ({ compile } = await import("./main.mjs"));
9
6
  ({ readFileSync } = await import("fs"));
10
- return builder.onLoad({
11
- filter: /\.civet$/
12
- }, function({ path }) {
13
- var contents, source;
7
+ return builder.onLoad({ filter: /\.civet$/ }, function({ path }) {
14
8
  source = readFileSync(path, "utf8");
15
9
  contents = compile(source);
16
10
  return {
package/dist/civet CHANGED
@@ -1,8 +1,19 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
- var import_main = require("./main");
4
- var import_config = require("./config");
5
- var cli, encoding, fs, parseArgs, path, prune, readFiles, repl, version, splice = [].splice;
3
+
4
+ // source/cli.civet
5
+ var import_main = require("./main.js");
6
+ var import_config = require("./config.js");
7
+ var prune;
8
+ var version;
9
+ var encoding;
10
+ var fs;
11
+ var path;
12
+ var parseArgs;
13
+ var readFiles;
14
+ var repl;
15
+ var cli;
16
+ var indexOf = [].indexOf;
6
17
  ({ prune } = import_main.generate);
7
18
  version = function() {
8
19
  return require("../package.json").version;
@@ -12,39 +23,39 @@ if (process.argv.includes("--version")) {
12
23
  process.exit(0);
13
24
  }
14
25
  if (process.argv.includes("--help")) {
15
- process.stderr.write(` \u2584\u2584\xB7 \u25AA \u258C \u2590\xB7\u2584\u2584\u2584 .\u2584\u2584\u2584\u2584\u2584
16
- \u2590\u2588 \u258C\u25AA\u2588\u2588 \u25AA\u2588\xB7\u2588\u258C\u2580\u2584.\u2580\xB7\u2022\u2588\u2588 _._ _,-'""\`-._
17
- \u2588\u2588 \u2584\u2584\u2590\u2588\xB7\u2590\u2588\u2590\u2588\u2022\u2590\u2580\u2580\u25AA\u2584 \u2590\u2588.\u25AA (,-.\`._,'( |\\\`-/|
18
- \u2590\u2588\u2588\u2588\u258C\u2590\u2588\u258C \u2588\u2588\u2588 \u2590\u2588\u2584\u2584\u258C \u2590\u2588\u258C\xB7 \`-.-' \\ )-\`( , o o)
19
- \xB7\u2580\u2580\u2580 \u2580\u2580\u2580. \u2580 \u2580\u2580\u2580 \u2580\u2580\u2580 \`- \\\`_\`"'-
26
+ process.stderr.write(`\u2584\u2584\xB7 \u25AA \u258C \u2590\xB7\u2584\u2584\u2584 .\u2584\u2584\u2584\u2584\u2584
27
+ \u2590\u2588 \u258C\u25AA\u2588\u2588 \u25AA\u2588\xB7\u2588\u258C\u2580\u2584.\u2580\xB7\u2022\u2588\u2588 _._ _,-'""\`-._
28
+ \u2588\u2588 \u2584\u2584\u2590\u2588\xB7\u2590\u2588\u2590\u2588\u2022\u2590\u2580\u2580\u25AA\u2584 \u2590\u2588.\u25AA (,-.\`._,'( |\\\`-/|
29
+ \u2590\u2588\u2588\u2588\u258C\u2590\u2588\u258C \u2588\u2588\u2588 \u2590\u2588\u2584\u2584\u258C \u2590\u2588\u258C\xB7 \`-.-' \\ )-\`( , o o)
30
+ \xB7\u2580\u2580\u2580 \u2580\u2580\u2580. \u2580 \u2580\u2580\u2580 \u2580\u2580\u2580 \`- \\\`_\`"'-
20
31
 
21
32
 
22
- Usage:
33
+ Usage:
23
34
 
24
- civet # REPL for executing code
25
- civet -c # REPL for transpiling code
26
- civet --ast # REPL for parsing code
27
- civet [options] input.civet # run input.civet
28
- civet [options] -c input.civet # -> input.civet.tsx
29
- civet [options] -c input.civet -o .ts # -> input.ts
30
- civet [options] -c input.civet -o dir # -> dir/input.civet.tsx
31
- civet [options] -c input.civet -o dir/.ts # -> dir/input.ts
32
- civet [options] -c input.civet -o output.ts # -> output.ts
33
- civet [options] < input.civet > output.ts # pipe form
35
+ civet # REPL for executing code
36
+ civet -c # REPL for transpiling code
37
+ civet --ast # REPL for parsing code
38
+ civet [options] input.civet # run input.civet
39
+ civet [options] -c input.civet # -> input.civet.tsx
40
+ civet [options] -c input.civet -o .ts # -> input.ts
41
+ civet [options] -c input.civet -o dir # -> dir/input.civet.tsx
42
+ civet [options] -c input.civet -o dir/.ts # -> dir/input.ts
43
+ civet [options] -c input.civet -o output.ts # -> output.ts
44
+ civet [options] < input.civet > output.ts # pipe form
34
45
 
35
- Options:
36
- --help Show this help message
37
- --version Show the version number
38
- -o / --output XX Specify output directory and/or extension, or filename
39
- -c / --compile Compile input files to TypeScript (or JavaScript)
40
- --config XX Specify a config file (default scans for a config.civet, civet.json, civetconfig.civet or civetconfig.json file, optionally in a .config directory, or starting with a .)
41
- --no-config Don't scan for a config file
42
- --js Strip out all type annotations; default to .jsx extension
43
- --ast Print the AST instead of the compiled code
44
- --inline-map Generate a sourcemap
45
- --no-cache Disable compiler caching (slow, for debugging)
46
+ Options:
47
+ --help Show this help message
48
+ --version Show the version number
49
+ -o / --output XX Specify output directory and/or extension, or filename
50
+ -c / --compile Compile input files to TypeScript (or JavaScript)
51
+ --config XX Specify a config file (default scans for a config.civet, civet.json, civetconfig.civet or civetconfig.json file, optionally in a .config directory, or starting with a .)
52
+ --no-config Don't scan for a config file
53
+ --js Strip out all type annotations; default to .jsx extension
54
+ --ast Print the AST instead of the compiled code
55
+ --inline-map Generate a sourcemap
56
+ --no-cache Disable compiler caching (slow, for debugging)
46
57
 
47
- You can use - to read from stdin or (prefixed by -o) write to stdout.
58
+ You can use - to read from stdin or (prefixed by -o) write to stdout.
48
59
 
49
60
  `);
50
61
  process.exit(0);
@@ -53,7 +64,7 @@ encoding = "utf8";
53
64
  fs = require("fs/promises");
54
65
  path = require("path");
55
66
  parseArgs = function(args) {
56
- var arg, char, endOfArgs, filenames, i, options, ref, scriptArgs;
67
+ var options, filenames, scriptArgs, i, endOfArgs, arg, char;
57
68
  options = {};
58
69
  Object.defineProperty(options, "run", {
59
70
  get: function() {
@@ -78,49 +89,57 @@ parseArgs = function(args) {
78
89
  while (i < args.length) {
79
90
  arg = args[i];
80
91
  if (/^-\w{2,}$/.test(arg)) {
81
- splice.apply(args, [i, i - i + 1].concat(ref = function() {
82
- var k, len, ref1, results;
83
- ref1 = arg.slice(1);
84
- results = [];
85
- for (k = 0, len = ref1.length; k < len; k++) {
86
- char = ref1[k];
92
+ args.splice(i, 1 + i - i, ...(() => {
93
+ const results = [];
94
+ for (let ref = arg.slice(1), i1 = 0, len = ref.length; i1 < len; i1++) {
95
+ char = ref[i1];
87
96
  results.push(`-${char}`);
88
97
  }
98
+ ;
89
99
  return results;
90
- }())), ref;
100
+ })());
91
101
  continue;
92
102
  }
93
103
  switch (arg) {
94
104
  case "-c":
95
- case "--compile":
105
+ case "--compile": {
96
106
  options.compile = true;
97
107
  break;
108
+ }
98
109
  case "-o":
99
- case "--output":
110
+ case "--output": {
100
111
  options.output = args[++i];
101
112
  break;
102
- case "--config":
113
+ }
114
+ case "--config": {
103
115
  options.config = args[++i];
104
116
  break;
105
- case "--no-config":
117
+ }
118
+ case "--no-config": {
106
119
  options.config = false;
107
120
  break;
108
- case "--ast":
121
+ }
122
+ case "--ast": {
109
123
  options.ast = true;
110
124
  break;
111
- case "--no-cache":
125
+ }
126
+ case "--no-cache": {
112
127
  options.noCache = true;
113
128
  break;
114
- case "--inline-map":
129
+ }
130
+ case "--inline-map": {
115
131
  options.inlineMap = true;
116
132
  break;
117
- case "--js":
133
+ }
134
+ case "--js": {
118
135
  options.js = true;
119
136
  break;
120
- case "--":
137
+ }
138
+ case "--": {
121
139
  endOfArgs(++i);
122
140
  break;
123
- default:
141
+ }
142
+ default: {
124
143
  if (arg.startsWith("-") && arg !== "-") {
125
144
  throw new Error(`Invalid command-line argument ${arg}`);
126
145
  }
@@ -129,16 +148,18 @@ parseArgs = function(args) {
129
148
  } else {
130
149
  filenames.push(arg);
131
150
  }
151
+ }
132
152
  }
133
153
  i++;
134
154
  }
155
+ ;
135
156
  return { filenames, scriptArgs, options };
136
157
  };
137
158
  readFiles = async function* (filenames, options) {
138
- var chunk, content, error, filename, k, len, lines, results, rl, stdin;
139
- results = [];
140
- for (k = 0, len = filenames.length; k < len; k++) {
141
- filename = filenames[k];
159
+ var filename, stdin, lines, rl, content, chunk;
160
+ const results1 = [];
161
+ for (let i2 = 0, len1 = filenames.length; i2 < len1; i2++) {
162
+ filename = filenames[i2];
142
163
  stdin = filename === "-";
143
164
  try {
144
165
  if (stdin) {
@@ -146,7 +167,7 @@ readFiles = async function* (filenames, options) {
146
167
  filename = "<stdin>";
147
168
  try {
148
169
  filename = await fs.realpath("/dev/stdin");
149
- } catch (error1) {
170
+ } catch (e) {
150
171
  }
151
172
  if (process.stdin.isTTY) {
152
173
  lines = [];
@@ -163,82 +184,84 @@ readFiles = async function* (filenames, options) {
163
184
  });
164
185
  });
165
186
  } else {
166
- content = (await async function() {
167
- var ref, results1;
168
- ref = process.stdin;
169
- results1 = [];
170
- for await (chunk of ref) {
171
- results1.push(chunk);
187
+ content = (await (async () => {
188
+ const results2 = [];
189
+ for await (chunk of process.stdin) {
190
+ results2.push(chunk);
172
191
  }
173
- return results1;
174
- }()).join("");
192
+ ;
193
+ return results2;
194
+ })()).join("");
175
195
  }
176
196
  } else {
177
197
  content = await fs.readFile(filename, { encoding });
178
198
  }
179
- results.push(yield { filename, content, stdin });
180
- } catch (error1) {
181
- error = error1;
182
- results.push(yield { filename, error, stdin });
199
+ results1.push(yield { filename, content, stdin });
200
+ } catch (error) {
201
+ results1.push(yield { filename, error, stdin });
183
202
  }
184
203
  }
185
- return results;
204
+ ;
205
+ return results1;
186
206
  };
187
207
  repl = function(options) {
188
- var nodeRepl, r, vm;
189
- console.log(`Civet ${version()} REPL. Enter a blank line to ${function() {
208
+ var nodeRepl, vm, r;
209
+ console.log(`Civet ${version()} REPL. Enter a blank line to ${(() => {
190
210
  switch (false) {
191
- case !options.ast:
211
+ case !options.ast: {
192
212
  return "parse";
193
- case !options.compile:
213
+ }
214
+ case !options.compile: {
194
215
  return "transpile";
195
- default:
216
+ }
217
+ default: {
196
218
  return "execute";
219
+ }
197
220
  }
198
- }()} code.`);
221
+ })()} code.`);
199
222
  global.quit = global.exit = function() {
200
223
  return process.exit(0);
201
224
  };
202
225
  nodeRepl = require("repl");
203
226
  vm = require("vm");
204
227
  return r = nodeRepl.start({
205
- prompt: function() {
228
+ prompt: (() => {
206
229
  switch (false) {
207
- case !options.ast:
230
+ case !options.ast: {
208
231
  return "\u{1F332}> ";
209
- case !options.compile:
232
+ }
233
+ case !options.compile: {
210
234
  return "\u{1F408}> ";
211
- default:
235
+ }
236
+ default: {
212
237
  return "\u{1F431}> ";
238
+ }
213
239
  }
214
- }(),
240
+ })(),
215
241
  writer: options.ast ? function(obj) {
216
- var e;
217
242
  try {
218
243
  return JSON.stringify(obj, null, 2);
219
- } catch (error1) {
220
- e = error1;
244
+ } catch (e) {
221
245
  console.log(`Failed to stringify: ${e}`);
222
246
  return obj;
223
247
  }
224
248
  } : options.compile ? function(obj) {
225
249
  if (typeof obj === "string") {
226
- return obj != null ? obj.replace(/\n*$/, "") : void 0;
250
+ return obj?.replace(/\n*$/, "");
227
251
  } else {
228
252
  return obj;
229
253
  }
230
254
  } : void 0,
231
255
  eval: function(input, context, filename, callback) {
232
- var error, output, result;
256
+ var output, result;
233
257
  if (input === "\n") {
234
258
  return callback(null);
235
- } else if (input === "quit\n" || input === "exit\n" || input === "quit()\n" || input === "exit()\n") {
259
+ } else if (indexOf.call(["quit\n", "exit\n", "quit()\n", "exit()\n"], input) >= 0) {
236
260
  return process.exit(0);
237
261
  } else if (input.endsWith("\n\n")) {
238
262
  try {
239
263
  output = (0, import_main.compile)(input, { ...options, filename });
240
- } catch (error1) {
241
- error = error1;
264
+ } catch (error) {
242
265
  console.error(error);
243
266
  return callback("");
244
267
  }
@@ -247,8 +270,7 @@ repl = function(options) {
247
270
  } else {
248
271
  try {
249
272
  result = vm.runInContext(output, context, { filename });
250
- } catch (error1) {
251
- error = error1;
273
+ } catch (error) {
252
274
  return callback(error);
253
275
  }
254
276
  return callback(null, result);
@@ -260,16 +282,17 @@ repl = function(options) {
260
282
  });
261
283
  };
262
284
  cli = async function() {
263
- var argv, child, content, e, error, esm, filename, filenames, options, optionsPath, output, outputFilename, outputPath, ref, results, scriptArgs, stat, stdin, x;
285
+ var argv, filenames, scriptArgs, options, filename, error, content, stdin, output, outputPath, outputFilename, optionsPath, stat, esm, child;
264
286
  argv = process.argv;
265
287
  ({ filenames, scriptArgs, options } = parseArgs(argv.slice(2)));
266
288
  if (options.config !== false) {
267
- if (options.config == null) {
268
- options.config = await (0, import_config.findConfig)(process.cwd());
269
- }
289
+ options.config ?? (options.config = await (0, import_config.findConfig)(process.cwd()));
270
290
  }
271
291
  if (options.config) {
272
- options = { ...await (0, import_config.loadConfig)(options.config), ...options };
292
+ options = {
293
+ ...await (0, import_config.loadConfig)(options.config),
294
+ ...options
295
+ };
273
296
  }
274
297
  if (!filenames.length) {
275
298
  if (process.stdin.isTTY) {
@@ -286,10 +309,8 @@ cli = async function() {
286
309
  if (options.repl) {
287
310
  return repl(options);
288
311
  }
289
- ref = readFiles(filenames, options);
290
- results = [];
291
- for await (x of ref) {
292
- ({ filename, error, content, stdin } = x);
312
+ const results3 = [];
313
+ for await ({ filename, error, content, stdin } of readFiles(filenames, options)) {
293
314
  if (error) {
294
315
  console.error(`${filename} failed to load:`);
295
316
  console.error(error);
@@ -297,16 +318,15 @@ cli = async function() {
297
318
  }
298
319
  try {
299
320
  output = (0, import_main.compile)(content, { ...options, filename });
300
- } catch (error1) {
301
- error = error1;
302
- console.error(error);
321
+ } catch (error2) {
322
+ console.error(error2);
303
323
  continue;
304
324
  }
305
325
  if (options.ast) {
306
- results.push(process.stdout.write(JSON.stringify(output, null, 2)));
326
+ results3.push(process.stdout.write(JSON.stringify(output, null, 2)));
307
327
  } else if (options.compile) {
308
328
  if (stdin && !options.output || options.output === "-") {
309
- results.push(process.stdout.write(output));
329
+ results3.push(process.stdout.write(output));
310
330
  } else {
311
331
  outputPath = path.parse(filename);
312
332
  delete outputPath.base;
@@ -319,10 +339,10 @@ cli = async function() {
319
339
  optionsPath = path.parse(options.output);
320
340
  try {
321
341
  stat = await fs.stat(options.output);
322
- } catch (error1) {
342
+ } catch {
323
343
  stat = null;
324
344
  }
325
- if ((stat != null ? stat.isDirectory() : void 0) || options.output.endsWith(path.sep) || options.output.endsWith("/")) {
345
+ if (stat?.isDirectory() || options.output.endsWith(path.sep) || options.output.endsWith("/")) {
326
346
  outputPath.dir = options.output;
327
347
  } else if (/^(\.[^.]+)+$/.test(optionsPath.base)) {
328
348
  outputPath.ext = optionsPath.base;
@@ -334,17 +354,14 @@ cli = async function() {
334
354
  }
335
355
  }
336
356
  if (outputPath.dir) {
337
- fs.mkdir(outputPath.dir, {
338
- recursive: true
339
- });
357
+ fs.mkdir(outputPath.dir, { recursive: true });
340
358
  }
341
359
  outputFilename = path.format(outputPath);
342
360
  try {
343
- results.push(await fs.writeFile(outputFilename, output));
344
- } catch (error1) {
345
- error = error1;
361
+ results3.push(await fs.writeFile(outputFilename, output));
362
+ } catch (error2) {
346
363
  console.error(`${outputFilename} failed to write:`);
347
- results.push(console.error(error));
364
+ results3.push(console.error(error2));
348
365
  }
349
366
  }
350
367
  } else {
@@ -354,41 +371,43 @@ cli = async function() {
354
371
  filename = `.stdin-${process.pid}.civet`;
355
372
  try {
356
373
  await fs.writeFile(filename, content, { encoding });
357
- } catch (error1) {
358
- e = error1;
374
+ } catch (e) {
359
375
  console.error(`Could not write ${filename} for Civet ESM mode:`);
360
376
  console.error(e);
361
377
  process.exit(1);
362
378
  }
363
379
  }
364
- child = require("child_process").spawnSync(argv[0], ["--loader", "@danielx/civet/esm", filename, ...scriptArgs], {
365
- stdio: "inherit"
366
- });
380
+ child = require("child_process").spawnSync(argv[0], [
381
+ "--loader",
382
+ "@danielx/civet/esm",
383
+ filename,
384
+ ...scriptArgs
385
+ ], { stdio: "inherit" });
367
386
  if (stdin) {
368
387
  await fs.unlink(filename);
369
388
  }
370
- results.push(process.exit(child.status));
389
+ results3.push(process.exit(child.status));
371
390
  } else {
372
391
  require("../register.js");
373
392
  try {
374
393
  module.filename = await fs.realpath(filename);
375
- } catch (error1) {
394
+ } catch {
376
395
  module.filename = filename;
377
396
  }
378
397
  process.argv = ["civet", module.filename, ...scriptArgs];
379
398
  module.paths = require("module")._nodeModulePaths(path.dirname(module.filename));
380
399
  try {
381
- results.push(module._compile(output, module.filename));
382
- } catch (error1) {
383
- error = error1;
400
+ results3.push(module._compile(output, module.filename));
401
+ } catch (error2) {
384
402
  console.error(`${filename} crashed while running in CJS mode:`);
385
- console.error(error);
386
- results.push(process.exit(1));
403
+ console.error(error2);
404
+ results3.push(process.exit(1));
387
405
  }
388
406
  }
389
407
  }
390
408
  }
391
- return results;
409
+ ;
410
+ return results3;
392
411
  };
393
412
  if (require.main === module) {
394
413
  cli();
package/dist/config.js CHANGED
@@ -22,6 +22,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
22
22
  mod
23
23
  ));
24
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+
26
+ // source/config.civet
25
27
  var config_exports = {};
26
28
  __export(config_exports, {
27
29
  findConfig: () => findConfig,
@@ -30,60 +32,64 @@ __export(config_exports, {
30
32
  module.exports = __toCommonJS(config_exports);
31
33
  var import_path = __toESM(require("path"));
32
34
  var import_promises = __toESM(require("fs/promises"));
33
- var import_main = require("./main");
34
- var import_url = require("url");
35
- var findInDir;
36
- findInDir = async function(dirPath) {
37
- var dir, entry, name;
38
- dir = await import_promises.default.opendir(dirPath);
39
- for await (entry of dir) {
35
+ var import_main = require("./main.js");
36
+ var configFileNames = /* @__PURE__ */ new Set([
37
+ "\u{1F408}.json",
38
+ "\u{1F408}.civet",
39
+ "civetconfig.json",
40
+ "civetconfig.civet"
41
+ ]);
42
+ async function findInDir(dirPath) {
43
+ const dir = await import_promises.default.opendir(dirPath);
44
+ for await (const entry of dir) {
40
45
  if (entry.isDirectory() && entry.name === ".config") {
41
- return findInDir(import_path.default.join(dirPath, entry.name));
46
+ const found = await findInDir(
47
+ import_path.default.join(dirPath, entry.name)
48
+ );
49
+ if (found) {
50
+ return found;
51
+ }
42
52
  }
43
53
  if (entry.isFile()) {
44
- name = entry.name.replace(/^\./, "");
45
- if (name === "config.civet" || name === "civet.json" || name === "civetconfig.civet" || name === "civetconfig.json") {
54
+ const name = entry.name.replace(/^\./, "");
55
+ if (configFileNames.has(name)) {
46
56
  return import_path.default.join(dirPath, entry.name);
47
57
  }
48
58
  }
49
59
  }
50
- return null;
51
- };
52
- var findConfig = async function(startDir) {
53
- var configPath, curr, parent;
54
- curr = startDir;
55
- parent = import_path.default.dirname(curr);
60
+ return;
61
+ }
62
+ async function findConfig(startDir) {
63
+ let curr = startDir;
64
+ let parent = import_path.default.dirname(curr);
56
65
  while (curr !== parent) {
57
- if (configPath = await findInDir(curr)) {
66
+ const configPath = await findInDir(curr);
67
+ if (configPath) {
58
68
  return configPath;
59
69
  }
60
70
  curr = parent;
61
71
  parent = import_path.default.dirname(curr);
62
72
  }
63
- return null;
64
- };
65
- var loadConfig = async function(path2) {
66
- var config, exports, js, tmpPath;
67
- config = await import_promises.default.readFile(path2, "utf8");
73
+ return;
74
+ }
75
+ async function loadConfig(path2) {
76
+ const config = await import_promises.default.readFile(path2, "utf8");
68
77
  if (path2.endsWith(".json")) {
69
78
  return JSON.parse(config);
70
79
  } else {
71
- js = (0, import_main.compile)(config, {
72
- js: true
73
- });
74
- tmpPath = path2 + `.civet-tmp-${Date.now()}.mjs`;
75
- await import_promises.default.writeFile(tmpPath, js);
80
+ const js = (0, import_main.compile)(config, { js: true });
81
+ let exports;
76
82
  try {
77
- exports = await import((0, import_url.pathToFileURL)(tmpPath));
78
- } finally {
79
- await import_promises.default.unlink(tmpPath);
83
+ exports = await import(`data:text/javascript,${js}`);
84
+ } catch (e) {
85
+ console.error("Error loading config file", path2, e);
80
86
  }
81
87
  if (typeof exports.default !== "object" || exports.default === null) {
82
88
  throw new Error("civet config file must export an object");
83
89
  }
84
90
  return exports.default;
85
91
  }
86
- };
92
+ }
87
93
  // Annotate the CommonJS export names for ESM import in node:
88
94
  0 && (module.exports = {
89
95
  findConfig,