@cldmv/slothlet 1.0.0 → 1.0.1

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/package.json +1 -1
  2. package/slothlet.mjs +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cldmv/slothlet",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Slothlet: Lazy Modular API Loader for Node.js. Dynamically loads API modules and submodules only when accessed, supporting both lazy and eager loading.",
5
5
  "main": "slothlet.mjs",
6
6
  "exports": {
package/slothlet.mjs CHANGED
@@ -14,7 +14,6 @@
14
14
  import fs from "fs/promises";
15
15
  import path from "path";
16
16
  import { fileURLToPath, pathToFileURL } from "url";
17
- import { createEngine, setShutdown } from "./src/lib/slothlet_engine.mjs";
18
17
 
19
18
  const __filename = fileURLToPath(import.meta.url);
20
19
  const __dirname = path.dirname(__filename);
@@ -95,6 +94,7 @@ export const slothlet = {
95
94
  // process.exit(0);
96
95
  return this.boundapi;
97
96
  } else {
97
+ const { createEngine } = await import("./src/lib/slothlet_engine.mjs");
98
98
  ({ api, dispose } = await createEngine({ entry, ...options }));
99
99
  // setShutdown(dispose); // stash the disposer so shutdown() can call it
100
100
  // Attach __dispose__ as a non-enumerable property to the API object