@meridianjs/framework 0.1.2 → 0.1.3

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.
Files changed (2) hide show
  1. package/dist/index.js +6 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -447,7 +447,11 @@ async function loadPlugins(container, plugins, rootDir) {
447
447
  }
448
448
  }
449
449
  async function autoScanPlugin(scanRoot, container, logger) {
450
- const server = container.resolve("server");
450
+ let server = null;
451
+ try {
452
+ server = container.resolve("server");
453
+ } catch {
454
+ }
451
455
  const candidates = [
452
456
  scanRoot,
453
457
  // pluginRoot already points to compiled dir
@@ -461,7 +465,7 @@ async function autoScanPlugin(scanRoot, container, logger) {
461
465
  try {
462
466
  await fs5.access(apiDir);
463
467
  await Promise.all([
464
- loadRoutes(server, container, apiDir),
468
+ server ? loadRoutes(server, container, apiDir) : Promise.resolve(),
465
469
  loadSubscribers(container, path7.join(candidate, "subscribers")),
466
470
  loadJobs(container, path7.join(candidate, "jobs")),
467
471
  loadLinks(container, path7.join(candidate, "links"))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meridianjs/framework",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Core Meridian framework: bootstrap, DI container, module/route/subscriber/job loaders",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",