@json-to-office/jto 0.33.1 → 0.33.2

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 CHANGED
@@ -2832,20 +2832,18 @@ function cleanupTypeBoxIds(schema) {
2832
2832
  });
2833
2833
  }
2834
2834
  async function ensurePluginsRegistered(format, pluginNames) {
2835
+ if (process.env.NODE_ENV === "production") return;
2835
2836
  const registry = PluginRegistry3.getInstance();
2836
2837
  const satisfied = pluginNames ? pluginNames.every((name) => registry.getPlugin(name)) : registry.hasPlugins();
2837
2838
  if (satisfied) return;
2838
- if (!pluginLoadInFlight) {
2839
- registry.setFormat(format);
2840
- pluginLoadInFlight = registry.discoverAndLoad().then(() => void 0).catch((error) => {
2841
- logger.warn("On-demand plugin load for schema generation failed", {
2842
- error: error?.message
2843
- });
2844
- }).finally(() => {
2845
- pluginLoadInFlight = null;
2839
+ registry.setFormat(format);
2840
+ try {
2841
+ await registry.discoverAndLoad();
2842
+ } catch (error) {
2843
+ logger.warn("On-demand plugin load for schema generation failed", {
2844
+ error: error?.message
2846
2845
  });
2847
2846
  }
2848
- await pluginLoadInFlight;
2849
2847
  }
2850
2848
  function getSelectedPlugins(pluginNames) {
2851
2849
  const registry = PluginRegistry3.getInstance();
@@ -2930,7 +2928,7 @@ async function generateThemeSchema(format) {
2930
2928
  description: `Theme definition for JSON to ${label} ${format === "docx" ? "documents" : "presentations"}`
2931
2929
  };
2932
2930
  }
2933
- var discoveryRouter, pluginLoadInFlight;
2931
+ var discoveryRouter;
2934
2932
  var init_discovery = __esm({
2935
2933
  "src/server/routes/discovery.ts"() {
2936
2934
  "use strict";
@@ -2938,7 +2936,6 @@ var init_discovery = __esm({
2938
2936
  init_logger();
2939
2937
  init_container();
2940
2938
  discoveryRouter = new Hono3();
2941
- pluginLoadInFlight = null;
2942
2939
  discoveryRouter.get("/all", async (c) => {
2943
2940
  try {
2944
2941
  const format = Container.getAdapter().name;
@@ -4476,7 +4473,7 @@ function createDevCommand(adapter) {
4476
4473
  }
4477
4474
 
4478
4475
  // src/cli.ts
4479
- var PACKAGE_VERSION = true ? "0.33.1" : "dev-mode";
4476
+ var PACKAGE_VERSION = true ? "0.33.2" : "dev-mode";
4480
4477
  var program = new Command2();
4481
4478
  program.name("jto").description("JSON to Office CLI - Generate .docx and .pptx from JSON").version(PACKAGE_VERSION);
4482
4479
  registerCoreCommands(program, {