@objectstack/driver-memory 1.0.4 → 1.0.5

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.
@@ -0,0 +1,22 @@
1
+
2
+ > @objectstack/driver-memory@1.0.5 build /home/runner/work/spec/spec/packages/plugins/driver-memory
3
+ > tsup --config ../../../tsup.config.ts
4
+
5
+ CLI Building entry: src/index.ts
6
+ CLI Using tsconfig: tsconfig.json
7
+ CLI tsup v8.5.1
8
+ CLI Using tsup config: /home/runner/work/spec/spec/tsup.config.ts
9
+ CLI Target: es2020
10
+ CLI Cleaning output folder
11
+ ESM Build start
12
+ CJS Build start
13
+ CJS dist/index.js 17.62 KB
14
+ CJS dist/index.js.map 35.18 KB
15
+ CJS ⚡️ Build success in 65ms
16
+ ESM dist/index.mjs 16.59 KB
17
+ ESM dist/index.mjs.map 35.13 KB
18
+ ESM ⚡️ Build success in 65ms
19
+ DTS Build start
20
+ DTS ⚡️ Build success in 9025ms
21
+ DTS dist/index.d.mts 3.22 KB
22
+ DTS dist/index.d.ts 3.22 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @objectstack/driver-memory
2
2
 
3
+ ## 1.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - b1d24bd: refactor: migrate build system from tsc to tsup for faster builds
8
+ - Replaced `tsc` with `tsup` (using esbuild) across all packages
9
+ - Added shared `tsup.config.ts` in workspace root
10
+ - Added `tsup` as workspace dev dependency
11
+ - significantly improved build performance
12
+ - Updated dependencies [b1d24bd]
13
+ - @objectstack/core@1.0.5
14
+ - @objectstack/spec@1.0.5
15
+
3
16
  ## 1.0.4
4
17
 
5
18
  ### Patch Changes
@@ -1,13 +1,13 @@
1
- import { QueryInput } from '@objectstack/spec/data';
2
- import { DriverOptions } from '@objectstack/spec/data';
1
+ import { QueryInput, DriverOptions } from '@objectstack/spec/data';
3
2
  import { DriverInterface } from '@objectstack/core';
3
+
4
4
  /**
5
5
  * Example: In-Memory Driver
6
6
  *
7
7
  * A minimal reference implementation of the ObjectStack Driver Protocol.
8
8
  * This driver stores data in a simple JavaScript object (Heap).
9
9
  */
10
- export declare class InMemoryDriver implements DriverInterface {
10
+ declare class InMemoryDriver implements DriverInterface {
11
11
  name: string;
12
12
  version: string;
13
13
  private config;
@@ -76,4 +76,11 @@ export declare class InMemoryDriver implements DriverInterface {
76
76
  private getTable;
77
77
  private generateId;
78
78
  }
79
- //# sourceMappingURL=memory-driver.d.ts.map
79
+
80
+ declare const _default: {
81
+ id: string;
82
+ version: string;
83
+ onEnable: (context: any) => Promise<void>;
84
+ };
85
+
86
+ export { InMemoryDriver, _default as default };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,86 @@
1
- import { InMemoryDriver } from './memory-driver.js';
2
- export { InMemoryDriver };
1
+ import { QueryInput, DriverOptions } from '@objectstack/spec/data';
2
+ import { DriverInterface } from '@objectstack/core';
3
+
4
+ /**
5
+ * Example: In-Memory Driver
6
+ *
7
+ * A minimal reference implementation of the ObjectStack Driver Protocol.
8
+ * This driver stores data in a simple JavaScript object (Heap).
9
+ */
10
+ declare class InMemoryDriver implements DriverInterface {
11
+ name: string;
12
+ version: string;
13
+ private config;
14
+ private logger;
15
+ constructor(config?: any);
16
+ install(ctx: any): void;
17
+ supports: {
18
+ transactions: boolean;
19
+ queryFilters: boolean;
20
+ queryAggregations: boolean;
21
+ querySorting: boolean;
22
+ queryPagination: boolean;
23
+ queryWindowFunctions: boolean;
24
+ querySubqueries: boolean;
25
+ joins: boolean;
26
+ fullTextSearch: boolean;
27
+ vectorSearch: boolean;
28
+ geoSpatial: boolean;
29
+ jsonFields: boolean;
30
+ arrayFields: boolean;
31
+ };
32
+ /**
33
+ * The "Database": A map of TableName -> Array of Records
34
+ */
35
+ private db;
36
+ connect(): Promise<void>;
37
+ disconnect(): Promise<void>;
38
+ checkHealth(): Promise<boolean>;
39
+ execute(command: any, params?: any[]): Promise<null>;
40
+ find(object: string, query: QueryInput, options?: DriverOptions): Promise<any[]>;
41
+ findStream(object: string, query: QueryInput, options?: DriverOptions): AsyncGenerator<any, void, unknown>;
42
+ findOne(object: string, query: QueryInput, options?: DriverOptions): Promise<any>;
43
+ create(object: string, data: Record<string, any>, options?: DriverOptions): Promise<{
44
+ created_at: any;
45
+ updated_at: any;
46
+ id: any;
47
+ }>;
48
+ update(object: string, id: string | number, data: Record<string, any>, options?: DriverOptions): Promise<any>;
49
+ upsert(object: string, data: Record<string, any>, conflictKeys?: string[], options?: DriverOptions): Promise<any>;
50
+ delete(object: string, id: string | number, options?: DriverOptions): Promise<boolean>;
51
+ count(object: string, query?: QueryInput, options?: DriverOptions): Promise<number>;
52
+ bulkCreate(object: string, dataArray: Record<string, any>[], options?: DriverOptions): Promise<{
53
+ created_at: any;
54
+ updated_at: any;
55
+ id: any;
56
+ }[]>;
57
+ updateMany(object: string, query: QueryInput, data: Record<string, any>, options?: DriverOptions): Promise<{
58
+ count: number;
59
+ }>;
60
+ deleteMany(object: string, query: QueryInput, options?: DriverOptions): Promise<{
61
+ count: number;
62
+ }>;
63
+ bulkUpdate(object: string, updates: {
64
+ id: string | number;
65
+ data: Record<string, any>;
66
+ }[], options?: DriverOptions): Promise<any[]>;
67
+ bulkDelete(object: string, ids: (string | number)[], options?: DriverOptions): Promise<void>;
68
+ syncSchema(object: string, schema: any, options?: DriverOptions): Promise<void>;
69
+ dropTable(object: string, options?: DriverOptions): Promise<void>;
70
+ beginTransaction(): Promise<void>;
71
+ commit(): Promise<void>;
72
+ rollback(): Promise<void>;
73
+ private performAggregation;
74
+ private computeAggregate;
75
+ private setValueByPath;
76
+ private getTable;
77
+ private generateId;
78
+ }
79
+
3
80
  declare const _default: {
4
81
  id: string;
5
82
  version: string;
6
83
  onEnable: (context: any) => Promise<void>;
7
84
  };
8
- export default _default;
9
- //# sourceMappingURL=index.d.ts.map
85
+
86
+ export { InMemoryDriver, _default as default };