@objectstack/objectql 0.6.0 → 0.7.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/dist/engine.js ADDED
@@ -0,0 +1,423 @@
1
+ import { createLogger } from '@objectstack/core';
2
+ import { SchemaRegistry } from './registry';
3
+ /**
4
+ * ObjectQL Engine
5
+ *
6
+ * Implements the IDataEngine interface for data persistence.
7
+ */
8
+ export class ObjectQL {
9
+ constructor(hostContext = {}) {
10
+ this.drivers = new Map();
11
+ this.defaultDriver = null;
12
+ // Hooks Registry
13
+ this.hooks = {
14
+ 'beforeFind': [], 'afterFind': [],
15
+ 'beforeInsert': [], 'afterInsert': [],
16
+ 'beforeUpdate': [], 'afterUpdate': [],
17
+ 'beforeDelete': [], 'afterDelete': [],
18
+ };
19
+ // Host provided context additions (e.g. Server router)
20
+ this.hostContext = {};
21
+ this.hostContext = hostContext;
22
+ // Use provided logger or create a new one
23
+ this.logger = hostContext.logger || createLogger({ level: 'info', format: 'pretty' });
24
+ this.logger.info('ObjectQL Engine Instance Created');
25
+ }
26
+ /**
27
+ * Load and Register a Plugin
28
+ */
29
+ async use(manifestPart, runtimePart) {
30
+ this.logger.debug('Loading plugin', {
31
+ hasManifest: !!manifestPart,
32
+ hasRuntime: !!runtimePart
33
+ });
34
+ // 1. Validate / Register Manifest
35
+ if (manifestPart) {
36
+ this.registerApp(manifestPart);
37
+ }
38
+ // 2. Execute Runtime
39
+ if (runtimePart) {
40
+ const pluginDef = runtimePart.default || runtimePart;
41
+ if (pluginDef.onEnable) {
42
+ this.logger.debug('Executing plugin runtime onEnable');
43
+ const context = {
44
+ ql: this,
45
+ logger: this.logger,
46
+ // Expose the driver registry helper explicitly if needed
47
+ drivers: {
48
+ register: (driver) => this.registerDriver(driver)
49
+ },
50
+ ...this.hostContext
51
+ };
52
+ await pluginDef.onEnable(context);
53
+ this.logger.debug('Plugin runtime onEnable completed');
54
+ }
55
+ }
56
+ }
57
+ /**
58
+ * Register a hook
59
+ * @param event The event name (e.g. 'beforeFind', 'afterInsert')
60
+ * @param handler The handler function
61
+ */
62
+ registerHook(event, handler) {
63
+ if (!this.hooks[event]) {
64
+ this.hooks[event] = [];
65
+ }
66
+ this.hooks[event].push(handler);
67
+ this.logger.debug('Registered hook', { event, totalHandlers: this.hooks[event].length });
68
+ }
69
+ async triggerHooks(event, context) {
70
+ const handlers = this.hooks[event] || [];
71
+ if (handlers.length === 0) {
72
+ this.logger.debug('No hooks registered for event', { event });
73
+ return;
74
+ }
75
+ this.logger.debug('Triggering hooks', { event, count: handlers.length });
76
+ for (const handler of handlers) {
77
+ await handler(context);
78
+ }
79
+ }
80
+ /**
81
+ * Register contribution (Manifest)
82
+ */
83
+ registerApp(manifest) {
84
+ const id = manifest.id;
85
+ this.logger.debug('Registering app manifest', { id });
86
+ // Register objects
87
+ if (manifest.objects) {
88
+ if (Array.isArray(manifest.objects)) {
89
+ this.logger.debug('Registering objects from manifest (Array)', { id, objectCount: manifest.objects.length });
90
+ for (const objDef of manifest.objects) {
91
+ SchemaRegistry.registerObject(objDef);
92
+ this.logger.debug('Registered Object', { object: objDef.name, from: id });
93
+ }
94
+ }
95
+ else {
96
+ this.logger.debug('Registering objects from manifest (Map)', { id, objectCount: Object.keys(manifest.objects).length });
97
+ for (const [name, objDef] of Object.entries(manifest.objects)) {
98
+ // Ensure name in definition matches key
99
+ objDef.name = name;
100
+ SchemaRegistry.registerObject(objDef);
101
+ this.logger.debug('Registered Object', { object: name, from: id });
102
+ }
103
+ }
104
+ }
105
+ // Register contributions
106
+ if (manifest.contributes?.kinds) {
107
+ this.logger.debug('Registering kinds from manifest', { id, kindCount: manifest.contributes.kinds.length });
108
+ for (const kind of manifest.contributes.kinds) {
109
+ SchemaRegistry.registerKind(kind);
110
+ this.logger.debug('Registered Kind', { kind: kind.name || kind.type, from: id });
111
+ }
112
+ }
113
+ }
114
+ /**
115
+ * Register a new storage driver
116
+ */
117
+ registerDriver(driver, isDefault = false) {
118
+ if (this.drivers.has(driver.name)) {
119
+ this.logger.warn('Driver already registered, skipping', { driverName: driver.name });
120
+ return;
121
+ }
122
+ this.drivers.set(driver.name, driver);
123
+ this.logger.info('Registered driver', {
124
+ driverName: driver.name,
125
+ version: driver.version
126
+ });
127
+ if (isDefault || this.drivers.size === 1) {
128
+ this.defaultDriver = driver.name;
129
+ this.logger.info('Set default driver', { driverName: driver.name });
130
+ }
131
+ }
132
+ /**
133
+ * Helper to get object definition
134
+ */
135
+ getSchema(objectName) {
136
+ return SchemaRegistry.getObject(objectName);
137
+ }
138
+ /**
139
+ * Helper to get the target driver
140
+ */
141
+ getDriver(objectName) {
142
+ const object = SchemaRegistry.getObject(objectName);
143
+ // 1. If object definition exists, check for explicit datasource
144
+ if (object) {
145
+ const datasourceName = object.datasource || 'default';
146
+ // If configured for 'default', try to find the default driver
147
+ if (datasourceName === 'default') {
148
+ if (this.defaultDriver && this.drivers.has(this.defaultDriver)) {
149
+ return this.drivers.get(this.defaultDriver);
150
+ }
151
+ }
152
+ else {
153
+ // Specific datasource requested
154
+ if (this.drivers.has(datasourceName)) {
155
+ return this.drivers.get(datasourceName);
156
+ }
157
+ throw new Error(`[ObjectQL] Datasource '${datasourceName}' configured for object '${objectName}' is not registered.`);
158
+ }
159
+ }
160
+ // 2. Fallback for ad-hoc objects or missing definitions
161
+ if (this.defaultDriver) {
162
+ return this.drivers.get(this.defaultDriver);
163
+ }
164
+ throw new Error(`[ObjectQL] No driver available for object '${objectName}'`);
165
+ }
166
+ /**
167
+ * Initialize the engine and all registered drivers
168
+ */
169
+ async init() {
170
+ this.logger.info('Initializing ObjectQL engine', {
171
+ driverCount: this.drivers.size,
172
+ drivers: Array.from(this.drivers.keys())
173
+ });
174
+ for (const [name, driver] of this.drivers) {
175
+ try {
176
+ await driver.connect();
177
+ this.logger.info('Driver connected successfully', { driverName: name });
178
+ }
179
+ catch (e) {
180
+ this.logger.error('Failed to connect driver', e, { driverName: name });
181
+ }
182
+ }
183
+ this.logger.info('ObjectQL engine initialization complete');
184
+ }
185
+ async destroy() {
186
+ this.logger.info('Destroying ObjectQL engine', { driverCount: this.drivers.size });
187
+ for (const [name, driver] of this.drivers.entries()) {
188
+ try {
189
+ await driver.disconnect();
190
+ }
191
+ catch (e) {
192
+ this.logger.error('Error disconnecting driver', e, { driverName: name });
193
+ }
194
+ }
195
+ this.logger.info('ObjectQL engine destroyed');
196
+ }
197
+ // ============================================
198
+ // Helper: Query Conversion
199
+ // ============================================
200
+ toQueryAST(object, options) {
201
+ const ast = { object };
202
+ if (!options)
203
+ return ast;
204
+ if (options.filter) {
205
+ ast.where = options.filter;
206
+ }
207
+ if (options.select) {
208
+ ast.fields = options.select;
209
+ }
210
+ if (options.sort) {
211
+ // Support DataEngineSortSchema variant
212
+ if (Array.isArray(options.sort)) {
213
+ // [{ field: 'a', order: 'asc' }]
214
+ ast.orderBy = options.sort;
215
+ }
216
+ else {
217
+ // Record<string, 'asc' | 'desc' | 1 | -1>
218
+ ast.orderBy = Object.entries(options.sort).map(([field, order]) => ({
219
+ field,
220
+ order: (order === -1 || order === 'desc') ? 'desc' : 'asc'
221
+ }));
222
+ }
223
+ }
224
+ if (options.top !== undefined)
225
+ ast.limit = options.top;
226
+ else if (options.limit !== undefined)
227
+ ast.limit = options.limit;
228
+ if (options.skip !== undefined)
229
+ ast.offset = options.skip;
230
+ // TODO: Handle populate/joins mapping if Driver supports it in QueryAST
231
+ return ast;
232
+ }
233
+ // ============================================
234
+ // Data Access Methods (IDataEngine Interface)
235
+ // ============================================
236
+ async find(object, query) {
237
+ this.logger.debug('Find operation starting', { object, query });
238
+ const driver = this.getDriver(object);
239
+ const ast = this.toQueryAST(object, query);
240
+ const hookContext = {
241
+ object,
242
+ event: 'beforeFind',
243
+ input: { ast, options: undefined }, // Should map options?
244
+ ql: this
245
+ };
246
+ await this.triggerHooks('beforeFind', hookContext);
247
+ try {
248
+ const result = await driver.find(object, hookContext.input.ast, hookContext.input.options);
249
+ hookContext.event = 'afterFind';
250
+ hookContext.result = result;
251
+ await this.triggerHooks('afterFind', hookContext);
252
+ return hookContext.result;
253
+ }
254
+ catch (e) {
255
+ this.logger.error('Find operation failed', e, { object });
256
+ throw e;
257
+ }
258
+ }
259
+ async findOne(objectName, query) {
260
+ this.logger.debug('FindOne operation', { objectName });
261
+ const driver = this.getDriver(objectName);
262
+ const ast = this.toQueryAST(objectName, query);
263
+ ast.limit = 1;
264
+ // Reuse find logic or call generic driver.findOne if available
265
+ // Assuming driver has findOne
266
+ return driver.findOne(objectName, ast);
267
+ }
268
+ async insert(object, data, options) {
269
+ this.logger.debug('Insert operation starting', { object, isBatch: Array.isArray(data) });
270
+ const driver = this.getDriver(object);
271
+ const hookContext = {
272
+ object,
273
+ event: 'beforeInsert',
274
+ input: { data, options },
275
+ ql: this
276
+ };
277
+ await this.triggerHooks('beforeInsert', hookContext);
278
+ try {
279
+ let result;
280
+ if (Array.isArray(hookContext.input.data)) {
281
+ // Bulk Create
282
+ if (driver.bulkCreate) {
283
+ result = await driver.bulkCreate(object, hookContext.input.data, hookContext.input.options);
284
+ }
285
+ else {
286
+ // Fallback loop
287
+ result = await Promise.all(hookContext.input.data.map((item) => driver.create(object, item, hookContext.input.options)));
288
+ }
289
+ }
290
+ else {
291
+ result = await driver.create(object, hookContext.input.data, hookContext.input.options);
292
+ }
293
+ hookContext.event = 'afterInsert';
294
+ hookContext.result = result;
295
+ await this.triggerHooks('afterInsert', hookContext);
296
+ return hookContext.result;
297
+ }
298
+ catch (e) {
299
+ this.logger.error('Insert operation failed', e, { object });
300
+ throw e;
301
+ }
302
+ }
303
+ async update(object, data, options) {
304
+ // NOTE: This signature is tricky because Driver expects (obj, id, data) usually.
305
+ // DataEngine protocol puts filter in options.
306
+ this.logger.debug('Update operation starting', { object });
307
+ const driver = this.getDriver(object);
308
+ // 1. Extract ID from data or filter if it's a single update by ID
309
+ // This is a simplification. Real implementation needs robust filter handling.
310
+ let id = data.id || data._id;
311
+ if (!id && options?.filter) {
312
+ // Optimization: If filter is simple ID check, extract it
313
+ if (typeof options.filter === 'string')
314
+ id = options.filter;
315
+ else if (options.filter._id)
316
+ id = options.filter._id;
317
+ else if (options.filter.id)
318
+ id = options.filter.id;
319
+ }
320
+ const hookContext = {
321
+ object,
322
+ event: 'beforeUpdate',
323
+ input: { id, data, options },
324
+ ql: this
325
+ };
326
+ await this.triggerHooks('beforeUpdate', hookContext);
327
+ try {
328
+ let result;
329
+ if (hookContext.input.id) {
330
+ // Single update by ID
331
+ result = await driver.update(object, hookContext.input.id, hookContext.input.data, hookContext.input.options);
332
+ }
333
+ else if (options?.multi && driver.updateMany) {
334
+ // Bulk update by Query
335
+ const ast = this.toQueryAST(object, { filter: options.filter });
336
+ result = await driver.updateMany(object, ast, hookContext.input.data, hookContext.input.options);
337
+ }
338
+ else {
339
+ throw new Error('Update requires an ID or options.multi=true');
340
+ }
341
+ hookContext.event = 'afterUpdate';
342
+ hookContext.result = result;
343
+ await this.triggerHooks('afterUpdate', hookContext);
344
+ return hookContext.result;
345
+ }
346
+ catch (e) {
347
+ this.logger.error('Update operation failed', e, { object });
348
+ throw e;
349
+ }
350
+ }
351
+ async delete(object, options) {
352
+ this.logger.debug('Delete operation starting', { object });
353
+ const driver = this.getDriver(object);
354
+ // Extract ID logic similar to update
355
+ let id = undefined;
356
+ if (options?.filter) {
357
+ if (typeof options.filter === 'string')
358
+ id = options.filter;
359
+ else if (options.filter._id)
360
+ id = options.filter._id;
361
+ else if (options.filter.id)
362
+ id = options.filter.id;
363
+ }
364
+ const hookContext = {
365
+ object,
366
+ event: 'beforeDelete',
367
+ input: { id, options },
368
+ ql: this
369
+ };
370
+ await this.triggerHooks('beforeDelete', hookContext);
371
+ try {
372
+ let result;
373
+ if (hookContext.input.id) {
374
+ result = await driver.delete(object, hookContext.input.id, hookContext.input.options);
375
+ }
376
+ else if (options?.multi && driver.deleteMany) {
377
+ const ast = this.toQueryAST(object, { filter: options.filter });
378
+ result = await driver.deleteMany(object, ast, hookContext.input.options);
379
+ }
380
+ else {
381
+ throw new Error('Delete requires an ID or options.multi=true');
382
+ }
383
+ hookContext.event = 'afterDelete';
384
+ hookContext.result = result;
385
+ await this.triggerHooks('afterDelete', hookContext);
386
+ return hookContext.result;
387
+ }
388
+ catch (e) {
389
+ this.logger.error('Delete operation failed', e, { object });
390
+ throw e;
391
+ }
392
+ }
393
+ async count(object, query) {
394
+ const driver = this.getDriver(object);
395
+ if (driver.count) {
396
+ const ast = this.toQueryAST(object, { filter: query?.filter });
397
+ return driver.count(object, ast);
398
+ }
399
+ // Fallback to find().length
400
+ const res = await this.find(object, { filter: query?.filter, select: ['_id'] });
401
+ return res.length;
402
+ }
403
+ async aggregate(object, query) {
404
+ const driver = this.getDriver(object);
405
+ this.logger.debug(`Aggregate on ${object} using ${driver.name}`, query);
406
+ // Driver needs support for raw aggregation or mapped aggregation
407
+ // For now, if driver supports 'execute', we might pass it down, or we need to add 'aggregate' to DriverInterface
408
+ // In this version, we'll assume driver might handle it via special 'find' or throw not implemented
409
+ throw new Error('Aggregate not yet fully implemented in ObjectQL->Driver mapping');
410
+ }
411
+ async execute(command, options) {
412
+ // Direct pass-through implies we know which driver to use?
413
+ // Usually execute is tied to a specific object context OR we need a way to select driver.
414
+ // If command has 'object', we use that.
415
+ if (options?.object) {
416
+ const driver = this.getDriver(options.object);
417
+ if (driver.execute) {
418
+ return driver.execute(command, undefined, options);
419
+ }
420
+ }
421
+ throw new Error('Execute requires options.object to select driver');
422
+ }
423
+ }
package/dist/index.d.ts CHANGED
@@ -1,199 +1,6 @@
1
- import { HookContext } from '@objectstack/spec/data';
2
- import { DriverOptions } from '@objectstack/spec/system';
3
- import { DriverInterface, IDataEngine, DataEngineQueryOptions } from '@objectstack/core';
4
1
  export { SchemaRegistry } from './registry';
5
2
  export { ObjectStackProtocolImplementation } from './protocol';
6
- export type HookHandler = (context: HookContext) => Promise<void> | void;
7
- /**
8
- * Host Context provided to plugins
9
- */
10
- export interface PluginContext {
11
- ql: ObjectQL;
12
- logger: Console;
13
- [key: string]: any;
14
- }
15
- /**
16
- * ObjectQL Engine
17
- *
18
- * Implements the IDataEngine interface for data persistence.
19
- */
20
- export declare class ObjectQL implements IDataEngine {
21
- private drivers;
22
- private defaultDriver;
23
- private hooks;
24
- private hostContext;
25
- constructor(hostContext?: Record<string, any>);
26
- /**
27
- * Load and Register a Plugin
28
- */
29
- use(manifestPart: any, runtimePart?: any): Promise<void>;
30
- /**
31
- * Register a hook
32
- * @param event The event name (e.g. 'beforeFind', 'afterInsert')
33
- * @param handler The handler function
34
- */
35
- registerHook(event: string, handler: HookHandler): void;
36
- private triggerHooks;
37
- registerApp(manifestPart: any): void;
38
- /**
39
- * Register a new storage driver
40
- */
41
- registerDriver(driver: DriverInterface, isDefault?: boolean): void;
42
- /**
43
- * Helper to get object definition
44
- */
45
- getSchema(objectName: string): {
46
- fields: Record<string, {
47
- type: "number" | "boolean" | "code" | "date" | "text" | "textarea" | "email" | "url" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "datetime" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "file" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "location" | "address" | "json" | "color" | "rating" | "slider" | "signature" | "qrcode" | "progress" | "tags" | "vector";
48
- required: boolean;
49
- searchable: boolean;
50
- multiple: boolean;
51
- unique: boolean;
52
- deleteBehavior: "set_null" | "cascade" | "restrict";
53
- hidden: boolean;
54
- readonly: boolean;
55
- encryption: boolean;
56
- index: boolean;
57
- externalId: boolean;
58
- options?: {
59
- value: string;
60
- label: string;
61
- color?: string | undefined;
62
- default?: boolean | undefined;
63
- }[] | undefined;
64
- min?: number | undefined;
65
- max?: number | undefined;
66
- formula?: string | undefined;
67
- label?: string | undefined;
68
- precision?: number | undefined;
69
- name?: string | undefined;
70
- description?: string | undefined;
71
- format?: string | undefined;
72
- defaultValue?: any;
73
- maxLength?: number | undefined;
74
- minLength?: number | undefined;
75
- scale?: number | undefined;
76
- reference?: string | undefined;
77
- referenceFilters?: string[] | undefined;
78
- writeRequiresMasterRead?: boolean | undefined;
79
- expression?: string | undefined;
80
- summaryOperations?: {
81
- object: string;
82
- function: "count" | "sum" | "avg" | "min" | "max";
83
- field: string;
84
- } | undefined;
85
- language?: string | undefined;
86
- theme?: string | undefined;
87
- lineNumbers?: boolean | undefined;
88
- maxRating?: number | undefined;
89
- allowHalf?: boolean | undefined;
90
- displayMap?: boolean | undefined;
91
- allowGeocoding?: boolean | undefined;
92
- addressFormat?: "us" | "uk" | "international" | undefined;
93
- colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
94
- allowAlpha?: boolean | undefined;
95
- presetColors?: string[] | undefined;
96
- step?: number | undefined;
97
- showValue?: boolean | undefined;
98
- marks?: Record<string, string> | undefined;
99
- barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
100
- qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
101
- displayValue?: boolean | undefined;
102
- allowScanning?: boolean | undefined;
103
- currencyConfig?: {
104
- precision: number;
105
- currencyMode: "dynamic" | "fixed";
106
- defaultCurrency: string;
107
- } | undefined;
108
- vectorConfig?: {
109
- dimensions: number;
110
- distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
111
- normalized: boolean;
112
- indexed: boolean;
113
- indexType?: "flat" | "hnsw" | "ivfflat" | undefined;
114
- } | undefined;
115
- }>;
116
- name: string;
117
- active: boolean;
118
- isSystem: boolean;
119
- abstract: boolean;
120
- datasource: string;
121
- tags?: string[] | undefined;
122
- label?: string | undefined;
123
- description?: string | undefined;
124
- search?: {
125
- fields: string[];
126
- displayFields?: string[] | undefined;
127
- filters?: string[] | undefined;
128
- } | undefined;
129
- pluralLabel?: string | undefined;
130
- icon?: string | undefined;
131
- tableName?: string | undefined;
132
- indexes?: {
133
- fields: string[];
134
- type?: "hash" | "btree" | "gin" | "gist" | undefined;
135
- name?: string | undefined;
136
- unique?: boolean | undefined;
137
- }[] | undefined;
138
- validations?: any[] | undefined;
139
- titleFormat?: string | undefined;
140
- compactLayout?: string[] | undefined;
141
- enable?: {
142
- searchable: boolean;
143
- trackHistory: boolean;
144
- apiEnabled: boolean;
145
- files: boolean;
146
- feeds: boolean;
147
- activities: boolean;
148
- trash: boolean;
149
- mru: boolean;
150
- clone: boolean;
151
- apiMethods?: ("update" | "delete" | "get" | "list" | "create" | "upsert" | "bulk" | "aggregate" | "history" | "search" | "restore" | "purge" | "import" | "export")[] | undefined;
152
- } | undefined;
153
- } | undefined;
154
- /**
155
- * Helper to get the target driver
156
- */
157
- private getDriver;
158
- /**
159
- * Initialize the engine and all registered drivers
160
- */
161
- init(): Promise<void>;
162
- destroy(): Promise<void>;
163
- /**
164
- * Find records matching a query (IDataEngine interface)
165
- *
166
- * @param object - Object name
167
- * @param query - Query options (IDataEngine format)
168
- * @returns Promise resolving to array of records
169
- */
170
- find(object: string, query?: DataEngineQueryOptions): Promise<any[]>;
171
- findOne(object: string, idOrQuery: string | any, options?: DriverOptions): Promise<any>;
172
- /**
173
- * Insert a new record (IDataEngine interface)
174
- *
175
- * @param object - Object name
176
- * @param data - Data to insert
177
- * @returns Promise resolving to the created record
178
- */
179
- insert(object: string, data: any): Promise<any>;
180
- /**
181
- * Update a record by ID (IDataEngine interface)
182
- *
183
- * @param object - Object name
184
- * @param id - Record ID
185
- * @param data - Updated data
186
- * @returns Promise resolving to the updated record
187
- */
188
- update(object: string, id: any, data: any): Promise<any>;
189
- /**
190
- * Delete a record by ID (IDataEngine interface)
191
- *
192
- * @param object - Object name
193
- * @param id - Record ID
194
- * @returns Promise resolving to true if deleted, false otherwise
195
- */
196
- delete(object: string, id: any): Promise<boolean>;
197
- }
198
- export * from './plugin';
3
+ export { ObjectQL } from './engine';
4
+ export type { ObjectQLHostContext, HookHandler } from './engine';
5
+ export { ObjectQLPlugin } from './plugin';
199
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @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