@vdhewei/xlsx-template-lib 1.6.2 → 1.6.4
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/bin.js +9 -10
- package/dist/bin.js.map +1 -1
- package/dist/bin.mjs +10 -10
- package/dist/bin.mjs.map +1 -1
- package/package.json +3 -2
package/dist/bin.js
CHANGED
|
@@ -4476,7 +4476,7 @@ async function main() {
|
|
|
4476
4476
|
if ((0, import_node_fs2.existsSync)(envPath)) {
|
|
4477
4477
|
try {
|
|
4478
4478
|
const dotenv = (await Promise.resolve().then(() => __toESM(require_main()))).default;
|
|
4479
|
-
dotenv.config({ debug: false, path: envPath });
|
|
4479
|
+
dotenv.config({ quiet: true, debug: false, path: envPath });
|
|
4480
4480
|
} catch (e) {
|
|
4481
4481
|
}
|
|
4482
4482
|
}
|
|
@@ -4494,10 +4494,10 @@ async function main() {
|
|
|
4494
4494
|
console.log(import_chalk2.default.gray(`Target sheet: ${sheetName}`));
|
|
4495
4495
|
const ruleSheetName = options.sheetName || compileRuleSheetName;
|
|
4496
4496
|
console.log(import_chalk2.default.gray("Compiling rules..."));
|
|
4497
|
-
const
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4497
|
+
const opts = new RuleMapOptions();
|
|
4498
|
+
opts.sheetName = ruleSheetName;
|
|
4499
|
+
opts.remove = options.remove || false;
|
|
4500
|
+
const compiledBuffer = await compileAll(buffer, opts);
|
|
4501
4501
|
console.log(import_chalk2.default.green("\u2713 Compilation completed"));
|
|
4502
4502
|
const outputFile = options.save || path3.join(process.cwd(), generateOutputFilename(xlsxFile));
|
|
4503
4503
|
console.log(import_chalk2.default.gray(`Saving to: ${outputFile}`));
|
|
@@ -4529,11 +4529,10 @@ async function main() {
|
|
|
4529
4529
|
if (options.compile) {
|
|
4530
4530
|
console.log(import_chalk2.default.gray("Auto-compiling rules..."));
|
|
4531
4531
|
const ruleSheetName = options.sheetName || compileRuleSheetName;
|
|
4532
|
-
const
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
});
|
|
4532
|
+
const opts = new RuleMapOptions();
|
|
4533
|
+
opts.sheetName = ruleSheetName;
|
|
4534
|
+
opts.remove = false;
|
|
4535
|
+
const compiledResult = await compileAll(buffer, opts);
|
|
4537
4536
|
buffer = Buffer.from(compiledResult);
|
|
4538
4537
|
xlsx = await XlsxRender.create(buffer);
|
|
4539
4538
|
console.log(import_chalk2.default.green("\u2713 Auto-compilation completed"));
|