@json-to-office/jto 2.2.0 → 2.3.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.
- package/dist/cli.js +4 -2
- package/dist/cli.js.map +1 -1
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -651,7 +651,9 @@ var init_generator = __esm({
|
|
|
651
651
|
}
|
|
652
652
|
async validate(jsonDefinition, options = {}) {
|
|
653
653
|
const config2 = typeof jsonDefinition === "string" ? JSON.parse(jsonDefinition) : jsonDefinition;
|
|
654
|
-
const
|
|
654
|
+
const registry = PluginRegistry.getInstance();
|
|
655
|
+
const plugins = registry.hasPlugins() ? registry.getPlugins() : [];
|
|
656
|
+
const result = plugins.length > 0 && this.adapter.validateDocumentWithPlugins ? await this.adapter.validateDocumentWithPlugins(config2, plugins) : this.adapter.validateDocument(config2);
|
|
655
657
|
if (!result.valid) return result;
|
|
656
658
|
if (this.adapter.analyzeQuality) {
|
|
657
659
|
try {
|
|
@@ -4733,7 +4735,7 @@ function createDevCommand(adapter) {
|
|
|
4733
4735
|
}
|
|
4734
4736
|
|
|
4735
4737
|
// src/cli.ts
|
|
4736
|
-
var PACKAGE_VERSION = true ? "2.
|
|
4738
|
+
var PACKAGE_VERSION = true ? "2.3.0" : "dev-mode";
|
|
4737
4739
|
var program = new Command2();
|
|
4738
4740
|
program.name("jto").description("JSON to Office CLI - Generate .docx and .pptx from JSON").version(PACKAGE_VERSION);
|
|
4739
4741
|
registerCoreCommands(program, {
|