couchdb-web-node-plugin 1.0.765 → 1.0.766

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.765",
3
+ "version": "1.0.766",
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",
@@ -74,13 +74,13 @@
74
74
  "@types/express": "^5.0.1",
75
75
  "@types/node": "^22.15.17",
76
76
  "@types/pouchdb-node": "^6.1.7",
77
- "@typescript-eslint/eslint-plugin": "^8.32.0",
78
- "@typescript-eslint/parser": "^8.32.0",
77
+ "@typescript-eslint/eslint-plugin": "^8.32.1",
78
+ "@typescript-eslint/parser": "^8.32.1",
79
79
  "clientnode": "^3.0.1278",
80
80
  "documentation-website": "^1.0.358",
81
81
  "eslint": "^9.26.0",
82
82
  "eslint-config-google": "^0.14.0",
83
- "eslint-plugin-jsdoc": "^50.6.11",
83
+ "eslint-plugin-jsdoc": "^50.6.14",
84
84
  "express": "^5.1.0",
85
85
  "express-pouchdb": "^4.2.0",
86
86
  "jest": "^29.7.0",
@@ -88,7 +88,7 @@
88
88
  "mkdirp": "^3.0.1",
89
89
  "node-fetch": "^3.3.2",
90
90
  "rimraf": "^6.0.1",
91
- "typescript-eslint": "^8.32.0",
91
+ "typescript-eslint": "^8.32.1",
92
92
  "web-node": "^1.0.546",
93
93
  "weboptimizer": "^2.0.1579"
94
94
  },
@@ -298,6 +298,7 @@
298
298
  },
299
299
  "_expressionMapping": {
300
300
  "_additional": {
301
+ "updateStrategy": "replace",
301
302
  "constraintExecution": {
302
303
  "description": "`Given value \"${newValue}\" should be able to be compiled as template string: ${(() => { try { new Function(`return \\`${newValue}\\``) } catch (error) { return `${error}` } })()}`",
303
304
  "evaluation": "try { new Function(`return \\`${newValue}\\``) } catch (error) { return false }; return true"
@@ -352,6 +353,7 @@
352
353
  },
353
354
  "_stringMapping": {
354
355
  "_additional": {
356
+ "updateStrategy": "replace",
355
357
  "declaration": "Templatedata",
356
358
  "description": "String mapped values.",
357
359
  "emptyEqualsNull": false,
@@ -429,7 +431,7 @@
429
431
  "revision": "_rev",
430
432
  "revisions": "_revisions",
431
433
  "revisionsInformation": "_revs_info",
432
- "strategy": "_updateStrategy",
434
+ "updateStrategy": "_updateStrategy",
433
435
  "type": "-type",
434
436
  "update": {
435
437
  "execution": "_onUpdateExecution",
package/type.d.ts CHANGED
@@ -73,7 +73,7 @@ export interface SelectionMapping {
73
73
  export type Pattern = Array<RegExp | string> | RegExp | string;
74
74
  export interface BasePropertySpecification<Type, AdditionalSpecifications extends object> {
75
75
  allowedRoles?: AllowedRoles;
76
- ignoreFillUp?: boolean;
76
+ updateStrategy?: UpdateStrategy;
77
77
  arrayConstraintExecution?: Constraint;
78
78
  arrayConstraintExpression?: Constraint;
79
79
  conflictingConstraintExecution?: Constraint;
@@ -136,6 +136,7 @@ export interface BaseModel<AttachmentType extends Attachment = Attachment, Addit
136
136
  _onUpdateExpression?: string;
137
137
  _id: PropertySpecification<string, AdditionalSpecifications>;
138
138
  _rev: PropertySpecification<string, AdditionalSpecifications>;
139
+ _updateStrategy?: UpdateStrategy;
139
140
  }
140
141
  export type Model<Type extends object | undefined = object, AttachmentType extends Attachment = Attachment, AdditionalSpecifications extends object = object, AdditionalPropertiesType = unknown> = BaseModel<AttachmentType, AdditionalSpecifications, AdditionalPropertiesType> & {
141
142
  [Property in keyof Type]: PropertySpecification<Type[Property] extends Array<unknown> ? (Type[Property][number] extends object | undefined ? Array<Model<Type[Property][number], AttachmentType, AdditionalSpecifications, AdditionalPropertiesType>> : Type[Property]) : Type[Property] extends object | undefined ? (Type[Property] extends Date | undefined ? Type[Property] : Model<Type[Property], AttachmentType, AdditionalSpecifications, AdditionalPropertiesType>) : Type[Property], AdditionalSpecifications>;
@@ -166,7 +167,7 @@ export interface SpecialPropertyNames {
166
167
  revision: '_rev';
167
168
  revisions: '_revisions';
168
169
  revisionsInformation: '_revs_info';
169
- strategy: '_updateStrategy';
170
+ updateStrategy: '_updateStrategy';
170
171
  type: '-type';
171
172
  constraint: {
172
173
  execution: '_constraintExecutions';
@@ -420,7 +421,6 @@ export interface BasicScope<Type extends object, AttachmentType extends Attachme
420
421
  now: Date;
421
422
  nowUTCTimestamp: number;
422
423
  securitySettings: Partial<SecuritySettings>;
423
- updateStrategy: UpdateStrategy;
424
424
  userContext: Partial<UserContext>;
425
425
  }
426
426
  export interface CommonScope<ObjectType extends object, Type, AttachmentType extends Attachment, AdditionalSpecifications extends object, AdditionalPropertiesType> {
@@ -439,6 +439,7 @@ export interface PropertyScope<ObjectType extends object, Type, PropertyType, At
439
439
  oldValue?: Type;
440
440
  propertySpecification: PropertySpecification<Type, AdditionalSpecifications>;
441
441
  attachmentsTarget?: Mapping<AttachmentType | null>;
442
+ updateStrategy: UpdateStrategy;
442
443
  }
443
444
  export interface EvaluationResult<ObjectType extends object, Type, PropertyType, AttachmentType extends Attachment, AdditionalSpecifications extends object, AdditionalPropertiesType, Scope = (BasicScope<ObjectType, AttachmentType, AdditionalSpecifications, AdditionalPropertiesType> & CommonScope<ObjectType, PropertyType, AttachmentType, AdditionalSpecifications, AdditionalPropertiesType>)> {
444
445
  code: string;