couchdb-web-node-plugin 1.0.747 → 1.0.748

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": "couchdb-web-node-plugin",
3
- "version": "1.0.747",
3
+ "version": "1.0.748",
4
4
  "description": "A couchdb server, model instance conflict handler, rest api, authentication, session management, schema validator and model relation guarantee for webNode.",
5
5
  "keywords": [
6
6
  "api",
package/type.d.ts CHANGED
@@ -318,13 +318,13 @@ export interface CouchDB<Type extends object = Mapping<unknown>> {
318
318
  connection: Connection<Type>;
319
319
  connector: Connector;
320
320
  server: {
321
- express?: Express;
322
- expressPouchDB?: Express;
321
+ expressInstance?: Express;
322
+ expressPouchDBInstance?: Express;
323
323
  process?: ChildProcess | HTTPServer;
324
324
  reject: (value: Error | ProcessCloseReason) => void;
325
325
  resolve: (reason?: ProcessCloseReason) => void;
326
326
  restart: (state: State) => Promise<void>;
327
- start: (services: Services, configuration: Configuration) => Promise<void>;
327
+ start: (state: State) => Promise<void>;
328
328
  stop: (services: Services, configuration: Configuration) => Promise<void>;
329
329
  runner: BinaryRunner | InPlaceRunner;
330
330
  };
@@ -361,6 +361,16 @@ export interface PluginHandler extends BasePluginHandler {
361
361
  * @returns Promise resolving to nothing.
362
362
  */
363
363
  restartCouchdb?(state: State): Promise<void>;
364
+ /**
365
+ * Hook before registering pouchdb routes into the express server
366
+ * instance.
367
+ * @param state - Application state.
368
+ * @returns Promise resolving to nothing.
369
+ */
370
+ initializeExpressPouchDB?(state: State<{
371
+ expressInstance: Express;
372
+ expressPouchDBInstance: Express;
373
+ }>): Promise<void>;
364
374
  }
365
375
  export interface EmptyEvaluationErrorData {
366
376
  empty: string;