s3db.js 12.2.0 → 12.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "s3db.js",
3
- "version": "12.2.0",
3
+ "version": "12.2.1",
4
4
  "description": "Use AWS S3, the world's most reliable document storage, as a database with this ORM.",
5
5
  "main": "dist/s3db.cjs.js",
6
6
  "module": "dist/s3db.es.js",
@@ -33,7 +33,6 @@
33
33
  */
34
34
 
35
35
  import { Plugin } from '../plugin.class.js';
36
- import { ApiServer } from './server.js';
37
36
  import { requirePluginDependency } from '../concerns/plugin-dependencies.js';
38
37
  import tryFn from '../../concerns/try-fn.js';
39
38
 
@@ -458,6 +457,11 @@ export class ApiPlugin extends Plugin {
458
457
  console.log('[API Plugin] Starting server...');
459
458
  }
460
459
 
460
+ // Dynamic import with path manipulation to prevent Rollup from inlining
461
+ // This ensures hono is only loaded when ApiPlugin is actually used
462
+ const serverPath = './server' + '.js';
463
+ const { ApiServer } = await import(/* @vite-ignore */ serverPath);
464
+
461
465
  // Create server instance
462
466
  this.server = new ApiServer({
463
467
  port: this.config.port,
@@ -3,7 +3,8 @@ export * from './plugin.obj.js'
3
3
  export { default as Plugin } from './plugin.class.js'
4
4
 
5
5
  // plugins:
6
- export * from './api/index.js'
6
+ // ApiPlugin is exported separately to avoid bundling hono dependencies
7
+ export { ApiPlugin } from './api/index.js'
7
8
  export * from './audit.plugin.js'
8
9
  export * from './backup.plugin.js'
9
10
  export * from './cache.plugin.js'