s3db.js 12.2.0 → 12.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "s3db.js",
3
- "version": "12.2.0",
3
+ "version": "12.2.2",
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,
@@ -73,7 +73,7 @@ import tryFn from "../concerns/try-fn.js";
73
73
  *
74
74
  * resource.getDistance(id1, id2) // Returns distance in km
75
75
  */
76
- class GeoPlugin extends Plugin {
76
+ export class GeoPlugin extends Plugin {
77
77
  constructor(config = {}) {
78
78
  super(config);
79
79
 
@@ -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'
@@ -276,7 +276,7 @@ import {
276
276
  * });
277
277
  * ```
278
278
  */
279
- class RelationPlugin extends Plugin {
279
+ export class RelationPlugin extends Plugin {
280
280
  constructor(config = {}) {
281
281
  super(config);
282
282
 
@@ -1374,5 +1374,4 @@ class RelationPlugin extends Plugin {
1374
1374
  }
1375
1375
  }
1376
1376
 
1377
- export { RelationPlugin };
1378
1377
  export default RelationPlugin;
@@ -128,7 +128,7 @@ function getExpiredCohorts(granularity, count) {
128
128
  return cohorts;
129
129
  }
130
130
 
131
- class TTLPlugin extends Plugin {
131
+ export class TTLPlugin extends Plugin {
132
132
  constructor(config = {}) {
133
133
  super(config);
134
134