@digitaldefiance/node-express-suite 3.18.3 → 4.0.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/README.md +230 -1
- package/package.json +1 -1
- package/src/__tests__/helpers/setup-test-env.d.ts +2 -1
- package/src/__tests__/helpers/setup-test-env.d.ts.map +1 -1
- package/src/__tests__/helpers/setup-test-env.js +55 -43
- package/src/__tests__/helpers/setup-test-env.js.map +1 -1
- package/src/application.d.ts +52 -11
- package/src/application.d.ts.map +1 -1
- package/src/application.js +131 -27
- package/src/application.js.map +1 -1
- package/src/{application-base.d.ts → base-application.d.ts} +4 -4
- package/src/{application-base.d.ts.map → base-application.d.ts.map} +1 -1
- package/src/{application-base.js → base-application.js} +4 -4
- package/src/{application-base.js.map → base-application.js.map} +1 -1
- package/src/builders/application-builder.d.ts +13 -8
- package/src/builders/application-builder.d.ts.map +1 -1
- package/src/builders/application-builder.js +18 -3
- package/src/builders/application-builder.js.map +1 -1
- package/src/index.d.ts +3 -3
- package/src/index.d.ts.map +1 -1
- package/src/index.js +5 -4
- package/src/index.js.map +1 -1
- package/src/interfaces/document-store.d.ts +3 -34
- package/src/interfaces/document-store.d.ts.map +1 -1
- package/src/interfaces/document-store.js +5 -3
- package/src/interfaces/document-store.js.map +1 -1
- package/src/interfaces/index.d.ts +1 -0
- package/src/interfaces/index.d.ts.map +1 -1
- package/src/interfaces/index.js +1 -0
- package/src/interfaces/index.js.map +1 -1
- package/src/interfaces/mongoose-document-store.d.ts +42 -0
- package/src/interfaces/mongoose-document-store.d.ts.map +1 -0
- package/src/interfaces/mongoose-document-store.js +10 -0
- package/src/interfaces/mongoose-document-store.js.map +1 -0
- package/src/{application-concrete.d.ts → mongo-application-concrete.d.ts} +12 -6
- package/src/mongo-application-concrete.d.ts.map +1 -0
- package/src/mongo-application-concrete.js +49 -0
- package/src/mongo-application-concrete.js.map +1 -0
- package/src/plugins/database-plugin.d.ts +66 -0
- package/src/plugins/database-plugin.d.ts.map +1 -0
- package/src/plugins/database-plugin.js +10 -0
- package/src/plugins/database-plugin.js.map +1 -0
- package/src/plugins/index.d.ts +2 -0
- package/src/plugins/index.d.ts.map +1 -1
- package/src/plugins/index.js +2 -0
- package/src/plugins/index.js.map +1 -1
- package/src/plugins/mongo-database-plugin.d.ts +115 -0
- package/src/plugins/mongo-database-plugin.d.ts.map +1 -0
- package/src/plugins/mongo-database-plugin.js +234 -0
- package/src/plugins/mongo-database-plugin.js.map +1 -0
- package/src/services/mongoose-document-store.d.ts +3 -3
- package/src/services/mongoose-document-store.d.ts.map +1 -1
- package/src/services/mongoose-document-store.js.map +1 -1
- package/src/utils/index.d.ts +2 -0
- package/src/utils/index.d.ts.map +1 -0
- package/src/utils/index.js +6 -0
- package/src/utils/index.js.map +1 -0
- package/src/utils/no-op-database.d.ts +8 -0
- package/src/utils/no-op-database.d.ts.map +1 -0
- package/src/utils/no-op-database.js +37 -0
- package/src/utils/no-op-database.js.map +1 -0
- package/src/application-concrete.d.ts.map +0 -1
- package/src/application-concrete.js +0 -34
- package/src/application-concrete.js.map +0 -1
- package/src/mongo-application-base.d.ts +0 -81
- package/src/mongo-application-base.d.ts.map +0 -1
- package/src/mongo-application-base.js +0 -216
- package/src/mongo-application-base.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-store.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/document-store.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"document-store.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/document-store.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,2BAA2B,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
2
4
|
/**
|
|
3
|
-
* @fileoverview
|
|
4
|
-
*
|
|
5
|
+
* @fileoverview Backward-compatible re-export of IDocumentStore.
|
|
6
|
+
* @deprecated Import from './mongoose-document-store' instead.
|
|
5
7
|
* @module interfaces/document-store
|
|
6
8
|
*/
|
|
7
|
-
|
|
9
|
+
tslib_1.__exportStar(require("./mongoose-document-store"), exports);
|
|
8
10
|
//# sourceMappingURL=document-store.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-store.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/document-store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"document-store.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/document-store.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,oEAA0C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAE1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,yCAAyC,CAAC;AACxD,cAAc,wBAAwB,CAAC;AACvC,cAAc,uCAAuC,CAAC;AACtD,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAE1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,yCAAyC,CAAC;AACxD,cAAc,wBAAwB,CAAC;AACvC,cAAc,uCAAuC,CAAC;AACtD,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC"}
|
package/src/interfaces/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./mongoose-document-store"), exports);
|
|
4
5
|
tslib_1.__exportStar(require("./document-store"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./storage"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./api-error-response"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,oDAA0B;AAE1B,+DAAqC;AACrC,kFAAwD;AACxD,iEAAuC;AACvC,gFAAsD;AACtD,0DAAgC;AAChC,wDAA8B;AAC9B,oEAA0C;AAC1C,8DAAoC;AACpC,4DAAkC;AAClC,4DAAkC;AAClC,4DAAkC;AAClC,sDAA4B;AAC5B,8DAAoC;AACpC,+DAAqC;AACrC,uDAA6B;AAC7B,2DAAiC;AACjC,2DAAiC;AACjC,sEAA4C;AAC5C,0DAAgC;AAChC,wDAA8B;AAC9B,8DAAoC;AACpC,4DAAkC;AAClC,uDAA6B;AAC7B,yDAA+B;AAC/B,qEAA2C;AAC3C,uDAA6B;AAC7B,8DAAoC;AACpC,gEAAsC;AACtC,mDAAyB;AACzB,yDAA+B;AAC/B,oDAA0B;AAC1B,oDAA0B;AAC1B,yDAA+B;AAC/B,iEAAuC;AACvC,mDAAyB;AACzB,+DAAqC;AACrC,iEAAuC;AACvC,yEAA+C;AAC/C,2DAAiC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/index.ts"],"names":[],"mappings":";;;AAAA,oEAA0C;AAC1C,2DAAiC;AACjC,oDAA0B;AAE1B,+DAAqC;AACrC,kFAAwD;AACxD,iEAAuC;AACvC,gFAAsD;AACtD,0DAAgC;AAChC,wDAA8B;AAC9B,oEAA0C;AAC1C,8DAAoC;AACpC,4DAAkC;AAClC,4DAAkC;AAClC,4DAAkC;AAClC,sDAA4B;AAC5B,8DAAoC;AACpC,+DAAqC;AACrC,uDAA6B;AAC7B,2DAAiC;AACjC,2DAAiC;AACjC,sEAA4C;AAC5C,0DAAgC;AAChC,wDAA8B;AAC9B,8DAAoC;AACpC,4DAAkC;AAClC,uDAA6B;AAC7B,yDAA+B;AAC/B,qEAA2C;AAC3C,uDAA6B;AAC7B,8DAAoC;AACpC,gEAAsC;AACtC,mDAAyB;AACzB,yDAA+B;AAC/B,oDAA0B;AAC1B,oDAA0B;AAC1B,yDAA+B;AAC/B,iEAAuC;AACvC,mDAAyB;AACzB,+DAAqC;AACrC,iEAAuC;AACvC,yEAA+C;AAC/C,2DAAiC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Mongoose-specific interface for document store operations.
|
|
3
|
+
* This interface depends on Mongoose types (Model, MongoMemoryReplSet).
|
|
4
|
+
* Non-Mongoose database plugins should implement IDatabasePlugin directly
|
|
5
|
+
* without depending on this interface.
|
|
6
|
+
* @module interfaces/mongoose-document-store
|
|
7
|
+
*/
|
|
8
|
+
import { Model } from '@digitaldefiance/mongoose-types';
|
|
9
|
+
import type { PlatformID } from '@digitaldefiance/node-ecies-lib';
|
|
10
|
+
import { MongoMemoryReplSet } from 'mongodb-memory-server';
|
|
11
|
+
import { IBaseDocument } from '../documents/base';
|
|
12
|
+
import { ISchema } from './schema';
|
|
13
|
+
import { IApplication } from './application';
|
|
14
|
+
/**
|
|
15
|
+
* Mongoose-specific interface for document store operations.
|
|
16
|
+
* This interface depends on Mongoose types (Model, MongoMemoryReplSet).
|
|
17
|
+
* Non-Mongoose database plugins should implement IDatabasePlugin directly
|
|
18
|
+
* without depending on this interface.
|
|
19
|
+
* @template TID - Platform-specific ID type extending PlatformID
|
|
20
|
+
* @template TModelDocs - Record mapping model names to their document types
|
|
21
|
+
*/
|
|
22
|
+
export interface IDocumentStore<TID extends PlatformID = Buffer, TModelDocs extends Record<string, IBaseDocument<any, TID>> = Record<string, IBaseDocument<any, TID>>> {
|
|
23
|
+
/** Connect to the backing store. URI may be ignored by non-network stores. */
|
|
24
|
+
connect(uri?: string): Promise<void>;
|
|
25
|
+
/** Disconnect from the backing store. */
|
|
26
|
+
disconnect(): Promise<void>;
|
|
27
|
+
/** Whether the store is currently connected and ready for operations. */
|
|
28
|
+
isConnected(): boolean;
|
|
29
|
+
/** Retrieve a Mongoose model by name. */
|
|
30
|
+
getModel<T extends IBaseDocument<any, TID>>(modelName: string): Model<T>;
|
|
31
|
+
/** The schema map, if available (populated after connect). */
|
|
32
|
+
readonly schemaMap?: {
|
|
33
|
+
[K in keyof TModelDocs]: ISchema<TID, TModelDocs[K]>;
|
|
34
|
+
};
|
|
35
|
+
/** The dev database instance (MongoMemoryReplSet), if any (for cleanup on stop). */
|
|
36
|
+
readonly devDatabase?: MongoMemoryReplSet;
|
|
37
|
+
/** Optional: provision a dev/test database, returning its connection URI. */
|
|
38
|
+
setupDevStore?(): Promise<string | void>;
|
|
39
|
+
/** Optional: seed the dev database with initial data. */
|
|
40
|
+
initializeDevStore?<TInitResults>(app: IApplication<TID>): Promise<TInitResults>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=mongoose-document-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mongoose-document-store.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/mongoose-document-store.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C;;;;;;;GAOG;AAEH,MAAM,WAAW,cAAc,CAC7B,GAAG,SAAS,UAAU,GAAG,MAAM,EAC/B,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,MAAM,CACjE,MAAM,EACN,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,CACxB;IAED,8EAA8E;IAC9E,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErC,yCAAyC;IACzC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5B,yEAAyE;IACzE,WAAW,IAAI,OAAO,CAAC;IAEvB,yCAAyC;IACzC,QAAQ,CAAC,CAAC,SAAS,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAEzE,8DAA8D;IAC9D,QAAQ,CAAC,SAAS,CAAC,EAAE;SAAG,CAAC,IAAI,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;KAAE,CAAC;IAE9E,oFAAoF;IACpF,QAAQ,CAAC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IAE1C,6EAA6E;IAC7E,aAAa,CAAC,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAEzC,yDAAyD;IACzD,kBAAkB,CAAC,CAAC,YAAY,EAC9B,GAAG,EAAE,YAAY,CAAC,GAAG,CAAC,GACrB,OAAO,CAAC,YAAY,CAAC,CAAC;CAC1B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Mongoose-specific interface for document store operations.
|
|
4
|
+
* This interface depends on Mongoose types (Model, MongoMemoryReplSet).
|
|
5
|
+
* Non-Mongoose database plugins should implement IDatabasePlugin directly
|
|
6
|
+
* without depending on this interface.
|
|
7
|
+
* @module interfaces/mongoose-document-store
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
//# sourceMappingURL=mongoose-document-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mongoose-document-store.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/interfaces/mongoose-document-store.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Concrete implementation of the Application class for testing and development.
|
|
3
|
-
*
|
|
3
|
+
* Uses the new plugin-based architecture with MongoDatabasePlugin.
|
|
4
|
+
* @module mongo-application-concrete
|
|
4
5
|
*/
|
|
5
6
|
import type { PlatformID } from '@digitaldefiance/node-ecies-lib';
|
|
6
7
|
import { Application } from './application';
|
|
7
8
|
import { Environment } from './environment';
|
|
8
|
-
import { IConstants
|
|
9
|
+
import { IConstants } from './interfaces';
|
|
9
10
|
import { AppRouter } from './routers';
|
|
10
|
-
import {
|
|
11
|
+
import { MongoDatabasePlugin } from './plugins/mongo-database-plugin';
|
|
11
12
|
/**
|
|
12
13
|
* Concrete implementation of the Application class for testing and development purposes.
|
|
13
|
-
* Provides a ready-to-use application instance with default configuration
|
|
14
|
+
* Provides a ready-to-use application instance with default configuration,
|
|
15
|
+
* MongoDatabasePlugin, and dummy email service.
|
|
14
16
|
*
|
|
15
17
|
* @template TID - Platform ID type (Buffer, ObjectId, etc.)
|
|
16
18
|
*/
|
|
17
|
-
export declare class
|
|
19
|
+
export declare class MongoApplicationConcrete<TID extends PlatformID = Buffer> extends Application<TID, Environment<TID>, IConstants, AppRouter<TID>> {
|
|
20
|
+
/**
|
|
21
|
+
* The Mongo database plugin for accessing Mongoose-specific features.
|
|
22
|
+
*/
|
|
23
|
+
readonly mongoPlugin: MongoDatabasePlugin<TID, any, any, IConstants>;
|
|
18
24
|
/**
|
|
19
25
|
* Creates a new concrete application instance.
|
|
20
26
|
*
|
|
@@ -23,4 +29,4 @@ export declare class ApplicationConcrete<TID extends PlatformID = Buffer> extend
|
|
|
23
29
|
*/
|
|
24
30
|
constructor(environment: Environment<TID>, constants?: IConstants);
|
|
25
31
|
}
|
|
26
|
-
//# sourceMappingURL=application-concrete.d.ts.map
|
|
32
|
+
//# sourceMappingURL=mongo-application-concrete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mongo-application-concrete.d.ts","sourceRoot":"","sources":["../../../../packages/digitaldefiance-node-express-suite/src/mongo-application-concrete.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAa,SAAS,EAAE,MAAM,WAAW,CAAC;AAIjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE;;;;;;GAMG;AACH,qBAAa,wBAAwB,CACnC,GAAG,SAAS,UAAU,GAAG,MAAM,CAC/B,SAAQ,WAAW,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,UAAU,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IACtE;;OAEG;IACH,SAAgB,WAAW,EAAE,mBAAmB,CAC9C,GAAG,EAEH,GAAG,EAEH,GAAG,EACH,UAAU,CACX,CAAC;IAEF;;;;;OAKG;gBAED,WAAW,EAAE,WAAW,CAAC,GAAG,CAAC,EAC7B,SAAS,GAAE,UAA+B;CA8B7C"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Concrete implementation of the Application class for testing and development.
|
|
4
|
+
* Uses the new plugin-based architecture with MongoDatabasePlugin.
|
|
5
|
+
* @module mongo-application-concrete
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.MongoApplicationConcrete = void 0;
|
|
9
|
+
const application_1 = require("./application");
|
|
10
|
+
const constants_1 = require("./constants");
|
|
11
|
+
const registry_1 = require("./registry");
|
|
12
|
+
const routers_1 = require("./routers");
|
|
13
|
+
const schemas_1 = require("./schemas");
|
|
14
|
+
const services_1 = require("./services");
|
|
15
|
+
const dummy_email_service_1 = require("./services/dummy-email-service");
|
|
16
|
+
const mongo_database_plugin_1 = require("./plugins/mongo-database-plugin");
|
|
17
|
+
/**
|
|
18
|
+
* Concrete implementation of the Application class for testing and development purposes.
|
|
19
|
+
* Provides a ready-to-use application instance with default configuration,
|
|
20
|
+
* MongoDatabasePlugin, and dummy email service.
|
|
21
|
+
*
|
|
22
|
+
* @template TID - Platform ID type (Buffer, ObjectId, etc.)
|
|
23
|
+
*/
|
|
24
|
+
class MongoApplicationConcrete extends application_1.Application {
|
|
25
|
+
/**
|
|
26
|
+
* The Mongo database plugin for accessing Mongoose-specific features.
|
|
27
|
+
*/
|
|
28
|
+
mongoPlugin;
|
|
29
|
+
/**
|
|
30
|
+
* Creates a new concrete application instance.
|
|
31
|
+
*
|
|
32
|
+
* @param environment - Application environment configuration
|
|
33
|
+
* @param constants - Application constants (defaults to LocalhostConstants)
|
|
34
|
+
*/
|
|
35
|
+
constructor(environment, constants = constants_1.LocalhostConstants) {
|
|
36
|
+
super(environment, (app) => new routers_1.ApiRouter(app), undefined, constants, (apiRouter) => new routers_1.AppRouter(apiRouter), undefined);
|
|
37
|
+
this.mongoPlugin = new mongo_database_plugin_1.MongoDatabasePlugin({
|
|
38
|
+
schemaMapFactory: schemas_1.getSchemaMap,
|
|
39
|
+
databaseInitFunction: services_1.DatabaseInitializationService.initUserDb.bind(services_1.DatabaseInitializationService),
|
|
40
|
+
initResultHashFunction: services_1.DatabaseInitializationService.serverInitResultHash.bind(services_1.DatabaseInitializationService),
|
|
41
|
+
environment,
|
|
42
|
+
constants,
|
|
43
|
+
});
|
|
44
|
+
this.useDatabasePlugin(this.mongoPlugin);
|
|
45
|
+
registry_1.emailServiceRegistry.setService(new dummy_email_service_1.DummyEmailService(this));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.MongoApplicationConcrete = MongoApplicationConcrete;
|
|
49
|
+
//# sourceMappingURL=mongo-application-concrete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mongo-application-concrete.js","sourceRoot":"","sources":["../../../../packages/digitaldefiance-node-express-suite/src/mongo-application-concrete.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,+CAA4C;AAC5C,2CAAiD;AAIjD,yCAAkD;AAClD,uCAAiD;AACjD,uCAAyC;AACzC,yCAA2D;AAC3D,wEAAmE;AACnE,2EAAsE;AAEtE;;;;;;GAMG;AACH,MAAa,wBAEX,SAAQ,yBAA8D;IACtE;;OAEG;IACa,WAAW,CAOzB;IAEF;;;;;OAKG;IACH,YACE,WAA6B,EAC7B,YAAwB,8BAAkB;QAE1C,KAAK,CACH,WAAW,EACX,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,mBAAS,CAAC,GAA6B,CAAC,EACrD,SAAS,EACT,SAAS,EACT,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,mBAAS,CAAC,SAAS,CAAmB,EACzD,SAAS,CACV,CAAC;QAEF,IAAI,CAAC,WAAW,GAAG,IAAI,2CAAmB,CAAC;YACzC,gBAAgB,EAAE,sBAAY;YAC9B,oBAAoB,EAAE,wCAA6B,CAAC,UAAU,CAAC,IAAI,CACjE,wCAA6B,CAC9B;YACD,sBAAsB,EACpB,wCAA6B,CAAC,oBAAoB,CAAC,IAAI,CACrD,wCAA6B,CAC9B;YACH,WAAW;YACX,SAAS;SACV,CAAC,CAAC;QAEH,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAEzC,+BAAoB,CAAC,UAAU,CAC7B,IAAI,uCAAiB,CAAmB,IAAI,CAAC,CAC9C,CAAC;IACJ,CAAC;CACF;AArDD,4DAqDC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Database plugin interface.
|
|
3
|
+
* Extends IApplicationPlugin with database-specific lifecycle hooks,
|
|
4
|
+
* allowing database backends to be plugged into an Application as plugins
|
|
5
|
+
* rather than baked into the class hierarchy.
|
|
6
|
+
* @module plugins/database-plugin
|
|
7
|
+
*/
|
|
8
|
+
import type { PlatformID } from '@digitaldefiance/node-ecies-lib';
|
|
9
|
+
import type { IDatabase } from '../interfaces/storage';
|
|
10
|
+
import type { IAuthenticationProvider } from '../interfaces/authentication-provider';
|
|
11
|
+
import type { IApplicationPlugin } from './plugin-interface';
|
|
12
|
+
/**
|
|
13
|
+
* Plugin interface for database backends.
|
|
14
|
+
*
|
|
15
|
+
* A database plugin owns the full database lifecycle: connection, disconnection,
|
|
16
|
+
* dev store provisioning, authentication provider wiring, and any
|
|
17
|
+
* backend-specific accessors (e.g. Mongoose models, schema maps).
|
|
18
|
+
*
|
|
19
|
+
* The plugin's `init()` is called during `Application.start()` (via PluginManager)
|
|
20
|
+
* after the base IDatabase has been connected. The plugin can use `init()` to
|
|
21
|
+
* wire up the auth provider, seed dev data, register models, etc.
|
|
22
|
+
*
|
|
23
|
+
* @template TID - Platform ID type (Buffer, ObjectId, etc.)
|
|
24
|
+
*/
|
|
25
|
+
export interface IDatabasePlugin<TID extends PlatformID = Buffer> extends IApplicationPlugin<TID> {
|
|
26
|
+
/**
|
|
27
|
+
* The IDatabase instance this plugin manages.
|
|
28
|
+
* The Application will use this as its primary database.
|
|
29
|
+
*/
|
|
30
|
+
readonly database: IDatabase;
|
|
31
|
+
/**
|
|
32
|
+
* Optional authentication provider supplied by this database backend.
|
|
33
|
+
* If provided, the Application will set this as its authProvider during start().
|
|
34
|
+
*/
|
|
35
|
+
readonly authenticationProvider?: IAuthenticationProvider<TID>;
|
|
36
|
+
/**
|
|
37
|
+
* Connect the database. Called by Application.start() before plugin init.
|
|
38
|
+
* @param uri - Optional connection URI (from environment or dev store).
|
|
39
|
+
*/
|
|
40
|
+
connect(uri?: string): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Disconnect the database. Called by Application.stop().
|
|
43
|
+
*/
|
|
44
|
+
disconnect(): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the database is currently connected.
|
|
47
|
+
*/
|
|
48
|
+
isConnected(): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Optional: provision an ephemeral dev/test database.
|
|
51
|
+
* Returns the connection URI for the provisioned store.
|
|
52
|
+
* Called before connect() when environment.devDatabase is truthy.
|
|
53
|
+
*/
|
|
54
|
+
setupDevStore?(): Promise<string>;
|
|
55
|
+
/**
|
|
56
|
+
* Optional: tear down the ephemeral dev/test database on shutdown.
|
|
57
|
+
*/
|
|
58
|
+
teardownDevStore?(): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Optional: seed the database after connection in dev mode.
|
|
61
|
+
* Called after connect() and init() when environment.devDatabase is truthy.
|
|
62
|
+
* May return initialization results (e.g. seeded user data).
|
|
63
|
+
*/
|
|
64
|
+
initializeDevStore?(): Promise<unknown>;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=database-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database-plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/plugins/database-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,eAAe,CAC9B,GAAG,SAAS,UAAU,GAAG,MAAM,CAC/B,SAAQ,kBAAkB,CAAC,GAAG,CAAC;IAC/B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAE7B;;;OAGG;IACH,QAAQ,CAAC,sBAAsB,CAAC,EAAE,uBAAuB,CAAC,GAAG,CAAC,CAAC;IAE/D;;;OAGG;IACH,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErC;;OAEG;IACH,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5B;;OAEG;IACH,WAAW,IAAI,OAAO,CAAC;IAEvB;;;;OAIG;IACH,aAAa,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAElC;;OAEG;IACH,gBAAgB,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnC;;;;OAIG;IACH,kBAAkB,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CACzC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Database plugin interface.
|
|
4
|
+
* Extends IApplicationPlugin with database-specific lifecycle hooks,
|
|
5
|
+
* allowing database backends to be plugged into an Application as plugins
|
|
6
|
+
* rather than baked into the class hierarchy.
|
|
7
|
+
* @module plugins/database-plugin
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
//# sourceMappingURL=database-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database-plugin.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/plugins/database-plugin.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
|
package/src/plugins/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/plugins/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/plugins/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,QAAQ,CAAC"}
|
package/src/plugins/index.js
CHANGED
|
@@ -3,5 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./plugin-interface"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./plugin-manager"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./database-plugin"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./mongo-database-plugin"), exports);
|
|
6
8
|
tslib_1.__exportStar(require("./upnp"), exports);
|
|
7
9
|
//# sourceMappingURL=index.js.map
|
package/src/plugins/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/plugins/index.ts"],"names":[],"mappings":";;;AAAA,6DAAmC;AACnC,2DAAiC;AACjC,iDAAuB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/plugins/index.ts"],"names":[],"mappings":";;;AAAA,6DAAmC;AACnC,2DAAiC;AACjC,4DAAkC;AAClC,kEAAwC;AACxC,iDAAuB"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Mongoose/MongoDB database plugin.
|
|
3
|
+
* Extracts all Mongo-specific database lifecycle
|
|
4
|
+
* into a plugin that can be registered on any Application instance.
|
|
5
|
+
* @module plugins/mongo-database-plugin
|
|
6
|
+
*/
|
|
7
|
+
import { Model } from '@digitaldefiance/mongoose-types';
|
|
8
|
+
import mongoose from '@digitaldefiance/mongoose-types';
|
|
9
|
+
import { MongoMemoryReplSet } from 'mongodb-memory-server';
|
|
10
|
+
import type { PlatformID } from '@digitaldefiance/node-ecies-lib';
|
|
11
|
+
import type { IDatabase } from '../interfaces/storage';
|
|
12
|
+
import type { IAuthenticationProvider } from '../interfaces/authentication-provider';
|
|
13
|
+
import type { IApplication } from '../interfaces/application';
|
|
14
|
+
import type { IBaseDocument } from '../documents/base';
|
|
15
|
+
import type { IDocumentStore } from '../interfaces/mongoose-document-store';
|
|
16
|
+
import type { IConstants } from '../interfaces/constants';
|
|
17
|
+
import type { IMongoApplication } from '../interfaces/mongo-application';
|
|
18
|
+
import type { IFailableResult } from '../interfaces/failable-result';
|
|
19
|
+
import type { SchemaMap } from '../types';
|
|
20
|
+
import type { IDatabasePlugin } from './database-plugin';
|
|
21
|
+
import { Environment } from '../environment';
|
|
22
|
+
/**
|
|
23
|
+
* Options for constructing a MongoDatabasePlugin.
|
|
24
|
+
*/
|
|
25
|
+
export interface MongoDatabasePluginOptions<TID extends PlatformID, TModelDocs extends Record<string, IBaseDocument<any, TID>>, TInitResults, TConstants extends IConstants = IConstants> {
|
|
26
|
+
schemaMapFactory: (connection: mongoose.Connection) => SchemaMap<TID, TModelDocs>;
|
|
27
|
+
databaseInitFunction: (application: IMongoApplication<TID>) => Promise<IFailableResult<TInitResults>>;
|
|
28
|
+
initResultHashFunction: (initResults: TInitResults) => string;
|
|
29
|
+
environment: Environment<TID>;
|
|
30
|
+
constants?: TConstants;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Mongoose/MongoDB database plugin.
|
|
34
|
+
*
|
|
35
|
+
* Wraps a MongooseDocumentStore and exposes Mongoose-specific accessors
|
|
36
|
+
* (db, getModel, schemaMap, devDatabase) while conforming to the
|
|
37
|
+
* IDatabasePlugin contract for pluggable database backends.
|
|
38
|
+
*
|
|
39
|
+
* @template TID - Platform ID type
|
|
40
|
+
* @template TModelDocs - Record mapping model names to document types
|
|
41
|
+
* @template TInitResults - Database initialization result type
|
|
42
|
+
* @template TConstants - Application constants type
|
|
43
|
+
*/
|
|
44
|
+
export declare class MongoDatabasePlugin<TID extends PlatformID, TModelDocs extends Record<string, IBaseDocument<any, TID>>, TInitResults, TConstants extends IConstants = IConstants> implements IDatabasePlugin<TID> {
|
|
45
|
+
readonly name = "mongo-database";
|
|
46
|
+
readonly version = "1.0.0";
|
|
47
|
+
private readonly _documentStore;
|
|
48
|
+
private readonly _environment;
|
|
49
|
+
private _authProvider;
|
|
50
|
+
private _application;
|
|
51
|
+
private _lastInitResult;
|
|
52
|
+
constructor(options: MongoDatabasePluginOptions<TID, TModelDocs, TInitResults, TConstants>);
|
|
53
|
+
/**
|
|
54
|
+
* Construct from an existing IDocumentStore instance.
|
|
55
|
+
*/
|
|
56
|
+
static fromDocumentStore<TID extends PlatformID, TModelDocs extends Record<string, IBaseDocument<any, TID>>, TInitResults, TConstants extends IConstants = IConstants>(documentStore: IDocumentStore<TID, TModelDocs>, environment: Environment<TID>): MongoDatabasePlugin<TID, TModelDocs, TInitResults, TConstants>;
|
|
57
|
+
/**
|
|
58
|
+
* The IDatabase instance. For Mongo, this is a no-op adapter since
|
|
59
|
+
* the document store manages its own connection lifecycle.
|
|
60
|
+
*/
|
|
61
|
+
get database(): IDatabase;
|
|
62
|
+
get authenticationProvider(): IAuthenticationProvider<TID> | undefined;
|
|
63
|
+
connect(uri?: string): Promise<void>;
|
|
64
|
+
disconnect(): Promise<void>;
|
|
65
|
+
isConnected(): boolean;
|
|
66
|
+
setupDevStore(): Promise<string>;
|
|
67
|
+
teardownDevStore(): Promise<void>;
|
|
68
|
+
initializeDevStore(): Promise<TInitResults | undefined>;
|
|
69
|
+
/**
|
|
70
|
+
* Get the result of the last initializeDevStore call.
|
|
71
|
+
* Available after start() completes in dev mode.
|
|
72
|
+
*/
|
|
73
|
+
get lastInitResult(): TInitResults | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Get the IMongoApplication adapter created during init().
|
|
76
|
+
* This adapter delegates Mongo-specific accessors (db, getModel) to the plugin
|
|
77
|
+
* and everything else to the real application. Use this when constructing
|
|
78
|
+
* services that need IMongoApplication (e.g. UserService, RoleService).
|
|
79
|
+
* Available after init() has been called.
|
|
80
|
+
*/
|
|
81
|
+
get mongoApplication(): IMongoApplication<TID> | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* Called by PluginManager during Application.start().
|
|
84
|
+
* Wires up the Mongoose-backed authentication provider.
|
|
85
|
+
*/
|
|
86
|
+
init(app: IApplication<TID>): Promise<void>;
|
|
87
|
+
stop(): Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* Get the Mongoose database instance.
|
|
90
|
+
*/
|
|
91
|
+
get db(): typeof mongoose;
|
|
92
|
+
/**
|
|
93
|
+
* Get the schema map for all models.
|
|
94
|
+
*/
|
|
95
|
+
get schemaMap(): SchemaMap<TID, TModelDocs>;
|
|
96
|
+
/**
|
|
97
|
+
* Get the in-memory MongoDB instance (if any).
|
|
98
|
+
*/
|
|
99
|
+
get devDatabase(): MongoMemoryReplSet | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* Get the underlying document store.
|
|
102
|
+
*/
|
|
103
|
+
get documentStore(): IDocumentStore<TID, TModelDocs>;
|
|
104
|
+
/**
|
|
105
|
+
* Get a Mongoose model by name.
|
|
106
|
+
*/
|
|
107
|
+
getModel<T extends IBaseDocument<any, TID>>(modelName: string): Model<T>;
|
|
108
|
+
/**
|
|
109
|
+
* Creates a lightweight adapter that satisfies IMongoApplication
|
|
110
|
+
* by delegating to the plugin for Mongo-specific accessors and
|
|
111
|
+
* to the real app for everything else.
|
|
112
|
+
*/
|
|
113
|
+
private createMongoAppAdapter;
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=mongo-database-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mongo-database-plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/plugins/mongo-database-plugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AACxD,OAAO,QAAQ,MAAM,iCAAiC,CAAC;AAMvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA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