@danielx/civet 0.6.67 → 0.6.69
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/dist/browser.js +889 -666
- package/dist/civet +1 -1
- package/dist/config.js +4 -4
- package/dist/esbuild-plugin.js +0 -2
- package/dist/main.js +1610 -1387
- package/dist/main.mjs +888 -665
- package/package.json +3 -3
package/dist/civet
CHANGED
|
@@ -310,7 +310,7 @@ cli = async function() {
|
|
|
310
310
|
argv = process.argv;
|
|
311
311
|
({ filenames, scriptArgs, options } = parseArgs(argv.slice(2)));
|
|
312
312
|
if (options.config !== false) {
|
|
313
|
-
options.config
|
|
313
|
+
options.config ??= await (0, import_config.findConfig)(process.cwd());
|
|
314
314
|
}
|
|
315
315
|
if (options.config) {
|
|
316
316
|
options = {
|
package/dist/config.js
CHANGED
|
@@ -82,16 +82,16 @@ async function loadConfig(path2) {
|
|
|
82
82
|
return JSON.parse(config);
|
|
83
83
|
} else {
|
|
84
84
|
const js = (0, import_main.compile)(config, { js: true });
|
|
85
|
-
let
|
|
85
|
+
let exports2;
|
|
86
86
|
try {
|
|
87
|
-
|
|
87
|
+
exports2 = await import(`data:text/javascript,${encodeURIComponent(js)}`);
|
|
88
88
|
} catch (e) {
|
|
89
89
|
console.error("Error loading config file", path2, e);
|
|
90
90
|
}
|
|
91
|
-
if (typeof
|
|
91
|
+
if (typeof exports2.default !== "object" || exports2.default === null) {
|
|
92
92
|
throw new Error("civet config file must export an object");
|
|
93
93
|
}
|
|
94
|
-
return
|
|
94
|
+
return exports2.default;
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/esbuild-plugin.js
CHANGED
|
@@ -128,6 +128,4 @@ function civet(options = {}) {
|
|
|
128
128
|
var defaultPlugin = civet();
|
|
129
129
|
civet.setup = defaultPlugin.setup;
|
|
130
130
|
var esbuild_plugin_default = civet;
|
|
131
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
132
|
-
0 && (module.exports = {});
|
|
133
131
|
module.exports = module.exports.default;
|