@objectstack/driver-memory 0.2.0 → 0.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @objectstack/driver-memory
2
2
 
3
+ ## 0.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - @objectstack/spec@0.3.1
8
+
9
+ ## 0.3.0
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+ - @objectstack/spec@1.0.0
15
+
3
16
  ## 0.2.0
4
17
 
5
18
  ### Minor Changes
@@ -1,3 +1,3 @@
1
- import { ObjectStackManifest } from '@objectstack/spec';
1
+ import { ObjectStackManifest } from '@objectstack/spec/system';
2
2
  declare const MemoryDriverPlugin: ObjectStackManifest;
3
3
  export default MemoryDriverPlugin;
@@ -1,5 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
1
  const MemoryDriverPlugin = {
4
2
  id: 'com.objectstack.driver.memory',
5
3
  name: 'In-Memory Driver',
@@ -21,4 +19,4 @@ const MemoryDriverPlugin = {
21
19
  // For now, we register via code (src/index.ts)
22
20
  }
23
21
  };
24
- exports.default = MemoryDriverPlugin;
22
+ export default MemoryDriverPlugin;
package/dist/src/index.js CHANGED
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InMemoryDriver = void 0;
4
- const memory_driver_1 = require("./memory-driver");
5
- Object.defineProperty(exports, "InMemoryDriver", { enumerable: true, get: function () { return memory_driver_1.InMemoryDriver; } });
1
+ import { InMemoryDriver } from './memory-driver';
2
+ export { InMemoryDriver }; // Export class for direct usage
6
3
  // Note: In a real environment, you would import these from @objectstack/spec
7
4
  // But distinct PluginDefinition interface might not be strictly defined in schema yet,
8
5
  // usually it mimics the Manifest structure + runtime hooks.
@@ -10,7 +7,7 @@ Object.defineProperty(exports, "InMemoryDriver", { enumerable: true, get: functi
10
7
  // In plugin-bi it imported: import { PluginDefinition, PluginContextData } from '@objectstack/spec';
11
8
  // Let's rely on the environment being set up like plugin-bi.
12
9
  // If types are missing, this is just an example file.
13
- exports.default = {
10
+ export default {
14
11
  id: 'com.objectstack.driver.memory',
15
12
  version: '1.0.0',
16
13
  onEnable: async (context) => {
@@ -19,7 +16,7 @@ exports.default = {
19
16
  // Simulate driver registration
20
17
  // This assumes the runtime exposes a 'drivers' registry
21
18
  if (context.drivers) {
22
- const driver = new memory_driver_1.InMemoryDriver();
19
+ const driver = new InMemoryDriver();
23
20
  context.drivers.register(driver);
24
21
  logger.info(`[Memory Driver] Registered driver: ${driver.name}`);
25
22
  }
@@ -1,4 +1,5 @@
1
- import { DriverInterface, DriverOptions, QueryInput } from '@objectstack/spec';
1
+ import { QueryInput } from '@objectstack/spec/data';
2
+ import { DriverInterface, DriverOptions } from '@objectstack/spec/system';
2
3
  /**
3
4
  * Example: In-Memory Driver
4
5
  *
@@ -1,13 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InMemoryDriver = void 0;
4
1
  /**
5
2
  * Example: In-Memory Driver
6
3
  *
7
4
  * A minimal reference implementation of the ObjectStack Driver Protocol.
8
5
  * This driver stores data in a simple JavaScript object (Heap).
9
6
  */
10
- class InMemoryDriver {
7
+ export class InMemoryDriver {
11
8
  constructor() {
12
9
  this.name = 'in-memory-driver';
13
10
  this.version = '0.0.1';
@@ -156,4 +153,3 @@ class InMemoryDriver {
156
153
  return Math.random().toString(36).substring(2, 15);
157
154
  }
158
155
  }
159
- exports.InMemoryDriver = InMemoryDriver;
@@ -1,4 +1,4 @@
1
- import { ObjectStackManifest } from '@objectstack/spec';
1
+ import { ObjectStackManifest } from '@objectstack/spec/system';
2
2
 
3
3
  const MemoryDriverPlugin: ObjectStackManifest = {
4
4
  id: 'com.objectstack.driver.memory',
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@objectstack/driver-memory",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "description": "In-Memory Driver for ObjectStack (Reference Implementation)",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
7
7
  "dependencies": {
8
- "@objectstack/spec": "0.2.0"
8
+ "@objectstack/spec": "0.3.1"
9
9
  },
10
10
  "devDependencies": {
11
11
  "typescript": "^5.0.0"
@@ -1,9 +1,5 @@
1
- import {
2
- DriverInterface,
3
- DriverOptions,
4
- QueryAST,
5
- QueryInput
6
- } from '@objectstack/spec';
1
+ import { QueryAST, QueryInput } from '@objectstack/spec/data';
2
+ import { DriverInterface, DriverOptions } from '@objectstack/spec/system';
7
3
 
8
4
  /**
9
5
  * Example: In-Memory Driver
package/tsconfig.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "target": "ES2020",
4
- "module": "commonjs",
4
+ "module": "ES2020",
5
+ "moduleResolution": "bundler",
5
6
  "declaration": true,
6
7
  "outDir": "./dist",
7
8
  "strict": true,