qcobjects-cli 2.5.132-beta → 2.5.134-beta

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/VERSION CHANGED
@@ -1 +1 @@
1
- 2.5.132-beta
1
+ 2.5.134-beta
package/build-esbuild.js CHANGED
@@ -101,14 +101,24 @@ const copyDir = async (source, dest, exclude) => {
101
101
  const ignorePlugin = {
102
102
  name: 'ignore-packages',
103
103
  setup(build) {
104
- // Handle both static and dynamic imports of these packages
104
+ // Handle known external packages (qcobjects)
105
105
  build.onResolve({ filter: /^(qcobjects-sdk|qcobjects)$/ }, args => {
106
106
  return {
107
107
  external: true,
108
- // Preserve the path for dynamic imports
109
108
  path: args.path
110
109
  }
111
- })
110
+ });
111
+
112
+ // Handle all dynamic imports (handlers, commands, dev commands, libs)
113
+ build.onResolve({ filter: /.*/, namespace: 'file' }, args => {
114
+ if (args.kind === 'dynamic-import') {
115
+ return {
116
+ external: true,
117
+ path: args.path
118
+ }
119
+ }
120
+ return null;
121
+ });
112
122
  }
113
123
  }
114
124
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qcobjects-cli",
3
- "version": "2.5.132-beta",
3
+ "version": "2.5.134-beta",
4
4
  "description": "qcobjects cli command line tool",
5
5
  "main": "public/cjs/index.cjs",
6
6
  "module": "public/esm/index.mjs",
@@ -301,7 +301,9 @@ const __load_default_settings__ = () => {
301
301
  setBackendValue("libs", libs);
302
302
  if (libs.length > 0) {
303
303
  logger.debug(`Plugin Libs found: ${libs.join(",")}`);
304
- _ret_ = Promise.all(libs.map(async (p) => { return await import(findPath(p)); })).then(() => logger.info("Libs loaded"));
304
+ _ret_ = Promise.all(libs.map(async (p) => {
305
+ return await import(findPath(p));
306
+ })).then(() => logger.info("Libs loaded"));
305
307
  } else {
306
308
  logger.debug("No Plugin Libs found.");
307
309
  _ret_ = Promise.resolve();
@@ -319,7 +321,9 @@ const __load_default_settings__ = () => {
319
321
  setBackendValue("handlers", handlers);
320
322
  if (handlers.length > 0) {
321
323
  logger.debug(`Plugin Handlers found: ${handlers.join(",")}`);
322
- _ret_ = Promise.all(handlers.map(async (p) => { return await import(findPath(p)); })).then(() => logger.info("Handlers loaded"));
324
+ _ret_ = Promise.all(handlers.map(async (p) => {
325
+ return await import(findPath(p));
326
+ })).then(() => logger.info("Handlers loaded"));
323
327
  } else {
324
328
  logger.debug("No Plugin Handlers found.");
325
329
  _ret_ = Promise.resolve();
@@ -338,7 +342,20 @@ const __load_default_settings__ = () => {
338
342
  setBackendValue("commands", commands);
339
343
  if (commands.length > 0) {
340
344
  logger.debug(`Plugin Commands found: ${commands.join(",")}`);
341
- _ret_ = Promise.all(commands.map(async (p) => { return await import(findPath(p)); })).then(() => logger.info("Commands loaded"));
345
+ _ret_ = Promise.all(
346
+ commands.map(async (p) => {
347
+ try {
348
+ return await import(findPath(p));
349
+ } catch (error: any) {
350
+ logger.error(`Failed to load command ${p}: ${error}`);
351
+ throw error;
352
+ }
353
+ })
354
+ ).then(() => logger.info("Commands loaded"))
355
+ .catch(error => {
356
+ logger.error("Failed to load commands:", error);
357
+ throw error;
358
+ });
342
359
  } else {
343
360
  logger.debug("No Plugin Commands found.");
344
361
  _ret_ = Promise.resolve();
@@ -357,7 +374,9 @@ const __load_default_settings__ = () => {
357
374
  setBackendValue("devCommands", commands);
358
375
  if (commands.length > 0) {
359
376
  logger.debug(`Dev Plugin Commands found: ${commands.join(",")}`);
360
- _ret_ = Promise.all(commands.map(async (p) => { return await import(findPath(p)); })).then(() => logger.info("Commands loaded"));
377
+ _ret_ = Promise.all(commands.map(async (p) => {
378
+ return await import(findPath(p));
379
+ })).then(() => logger.info("Commands loaded"));
361
380
  } else {
362
381
  logger.debug("No Plugin Commands found in dev dependencies.");
363
382
  _ret_ = Promise.resolve();