couchdb-web-node-plugin 1.0.803 → 1.0.804

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.803",
3
+ "version": "1.0.804",
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",
@@ -73,10 +73,10 @@
73
73
  "@babel/eslint-parser": "^7.28.6",
74
74
  "@babel/runtime": "^7.28.6",
75
75
  "@eslint/js": "^10.0.1",
76
- "@stylistic/eslint-plugin": "^5.8.0",
76
+ "@stylistic/eslint-plugin": "^5.9.0",
77
77
  "@types/ejs": "^3.1.5",
78
78
  "@types/express": "^5.0.6",
79
- "@types/node": "^25.2.3",
79
+ "@types/node": "^25.3.0",
80
80
  "@types/pouchdb-adapter-memory": "^6.1.6",
81
81
  "@types/pouchdb-node": "^6.1.7",
82
82
  "@typescript-eslint/eslint-plugin": "^8.56.0",
@@ -85,7 +85,7 @@
85
85
  "documentation-website": "^1.0.398",
86
86
  "eslint": "^10.0.0",
87
87
  "eslint-config-google": "^0.14.0",
88
- "eslint-plugin-jsdoc": "^62.5.5",
88
+ "eslint-plugin-jsdoc": "^62.6.1",
89
89
  "express": "^5.2.1",
90
90
  "express-pouchdb": "patch:express-pouchdb@npm%3A4.2.0#~/.yarn/patches/express-pouchdb-npm-4.2.0-969036264e.patch",
91
91
  "jest": "^30.2.0",
@@ -240,7 +240,7 @@
240
240
  "prefix": {
241
241
  "__evaluate__": "path.resolve(self.couchdb.path) + '/'"
242
242
  },
243
- "skip_setup": true
243
+ "skip_setup": false
244
244
  },
245
245
  "packages": [
246
246
  "express",
@@ -284,7 +284,7 @@
284
284
  "exponentialBackoff": true,
285
285
  "maximumRetryIntervallInSeconds": 30
286
286
  },
287
- "skip_setup": true
287
+ "skip_setup": false
288
288
  },
289
289
  "createGenericFlatIndex": true,
290
290
  "databaseName": "main",
@@ -398,15 +398,16 @@
398
398
  "type": "DateTime"
399
399
  },
400
400
  "updateDateTime": {
401
+ "minimum": 0,
402
+ "nullable": false,
403
+ "type": "DateTime",
404
+ "onUpdateExpression": "modelConfiguration.updateStrategy === 'migrate' && oldDocument ? oldDocument[name] : nowUTCTimestamp",
405
+ "runUpdateHookAlways": true,
401
406
  "constraintExpression": {
402
407
  "evaluate": {
403
408
  "__evaluate__": "`modelConfiguration.updateStrategy === 'migrate' && oldDocument ? true : newValue > ${nowUTCTimestamp}`"
404
409
  }
405
- },
406
- "minimum": 0,
407
- "nullable": false,
408
- "onUpdateExpression": "modelConfiguration.updateStrategy === 'migrate' && oldDocument ? oldDocument[name] : nowUTCTimestamp",
409
- "type": "DateTime"
410
+ }
410
411
  }
411
412
  },
412
413
  "_userTrackable": {
@@ -414,7 +415,8 @@
414
415
  "nullable": false,
415
416
  "onUpdateExpression": {
416
417
  "__evaluate__": "`userContext.name || '${self.couchdb.admin.name}'`"
417
- }
418
+ },
419
+ "runUpdateHookAlways": true
418
420
  }
419
421
  }
420
422
  },
package/type.d.ts CHANGED
@@ -96,6 +96,7 @@ export interface BasePropertySpecification<Type, AdditionalSpecifications extend
96
96
  onCreateExpression?: string;
97
97
  onUpdateExecution?: string;
98
98
  onUpdateExpression?: string;
99
+ runUpdateHookAlways?: boolean;
99
100
  pattern?: Pattern;
100
101
  invertedPattern?: Pattern;
101
102
  contentTypePattern?: Pattern;
@@ -476,6 +477,15 @@ export interface CheckedPropertyResult<Type> extends CheckedResult {
476
477
  export interface CheckedDocumentResult<ObjectType extends object, AdditionalPropertiesType> extends CheckedResult {
477
478
  newDocument: PartialFullDocument<ObjectType, AdditionalPropertiesType>;
478
479
  }
480
+ export type AbortControllerStack = Array<{
481
+ name: string;
482
+ id: string;
483
+ controller: AbortController;
484
+ }>;
485
+ export interface InitializeExpressPouchDBStateData {
486
+ expressInstance: Express;
487
+ expressPouchDBInstance: Express;
488
+ }
479
489
  export type Migrator<Type extends object = object, AttachmentType extends Attachment = Attachment, AdditionalSpecifications extends object = object, AdditionalPropertiesType = unknown> = (document: Document, scope: (typeof UTILITY_SCOPE & {
480
490
  configuration: Configuration;
481
491
  databaseHelper: Mapping<unknown>;