@vsaas/loopback-datasource-juggler 12.0.0 → 12.1.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.
|
@@ -2372,6 +2372,8 @@ var require_relation_definition = /* @__PURE__ */ require_runtime.__commonJSMin(
|
|
|
2372
2372
|
modelFrom.prototype["__destroyById__" + relationName] = destroyByIdFunc;
|
|
2373
2373
|
const updateByIdFunc = scopeMethods.updateById;
|
|
2374
2374
|
modelFrom.prototype["__updateById__" + relationName] = updateByIdFunc;
|
|
2375
|
+
const existsFunc = scopeMethods.exists;
|
|
2376
|
+
modelFrom.prototype["__exists__" + relationName] = existsFunc;
|
|
2375
2377
|
const addFunc = scopeMethods.add;
|
|
2376
2378
|
modelFrom.prototype["__link__" + relationName] = addFunc;
|
|
2377
2379
|
const removeFunc = scopeMethods.remove;
|
package/dist/package.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var require_package = /* @__PURE__ */ require("./_virtual/_rolldown/runtime.js").__commonJSMin(((exports, module) => {
|
|
3
3
|
module.exports = {
|
|
4
4
|
"name": "@vsaas/loopback-datasource-juggler",
|
|
5
|
-
"version": "12.
|
|
5
|
+
"version": "12.1.1",
|
|
6
6
|
"description": "Fork of loopback-datasource-juggler for LoopBack 3 style applications",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"Connector",
|
package/package.json
CHANGED
package/types/model.d.ts
CHANGED
|
@@ -314,9 +314,7 @@ export declare class ModelBase {
|
|
|
314
314
|
static removeObserver<T extends typeof ModelBase>(
|
|
315
315
|
this: T,
|
|
316
316
|
operation: string,
|
|
317
|
-
listener:
|
|
318
|
-
| Listener<OperationHookContext<T>>
|
|
319
|
-
| SyncListener<OperationHookContext<T>>,
|
|
317
|
+
listener: Listener<OperationHookContext<T>> | SyncListener<OperationHookContext<T>>,
|
|
320
318
|
): Listener<OperationHookContext<T>> | SyncListener<OperationHookContext<T>> | undefined;
|
|
321
319
|
|
|
322
320
|
/**
|
|
@@ -98,9 +98,7 @@ export interface ObserverMixin {
|
|
|
98
98
|
removeObserver<T extends typeof ModelBase>(
|
|
99
99
|
this: T,
|
|
100
100
|
operation: string,
|
|
101
|
-
listener:
|
|
102
|
-
| Listener<OperationHookContext<T>>
|
|
103
|
-
| SyncListener<OperationHookContext<T>>,
|
|
101
|
+
listener: Listener<OperationHookContext<T>> | SyncListener<OperationHookContext<T>>,
|
|
104
102
|
): Listener<OperationHookContext<T>> | SyncListener<OperationHookContext<T>> | undefined;
|
|
105
103
|
|
|
106
104
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
|
-
import { Callback, Options, PromiseOrVoid } from
|
|
6
|
+
import { Callback, Options, PromiseOrVoid } from './common';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* This class provides methods that add validation cababilities to models.
|
|
@@ -196,11 +196,7 @@ export interface Validatable {
|
|
|
196
196
|
* @property {String} message Optional error message if property is not valid. Default error message: " is invalid".
|
|
197
197
|
* @property {Boolean} allowNull Whether null values are allowed.
|
|
198
198
|
*/
|
|
199
|
-
validate(
|
|
200
|
-
propertyName: string,
|
|
201
|
-
validatorFn: Function,
|
|
202
|
-
options?: Options,
|
|
203
|
-
): void;
|
|
199
|
+
validate(propertyName: string, validatorFn: Function, options?: Options): void;
|
|
204
200
|
|
|
205
201
|
/**
|
|
206
202
|
* Validate using custom asynchronous validation function.
|
|
@@ -235,11 +231,7 @@ export interface Validatable {
|
|
|
235
231
|
* @property {String} message Optional error message if property is not valid. Default error message: " is invalid".
|
|
236
232
|
* @property {Boolean} allowNull Whether null values are allowed.
|
|
237
233
|
*/
|
|
238
|
-
validateAsync(
|
|
239
|
-
propertyName: string,
|
|
240
|
-
validatorFn: Function,
|
|
241
|
-
options?: Options,
|
|
242
|
-
): void;
|
|
234
|
+
validateAsync(propertyName: string, validatorFn: Function, options?: Options): void;
|
|
243
235
|
|
|
244
236
|
/**
|
|
245
237
|
* Validate using a custom promise-based validation function.
|
|
@@ -271,11 +263,7 @@ export interface Validatable {
|
|
|
271
263
|
* @property {String} message Optional error message if property is not valid. Default error message: " is invalid".
|
|
272
264
|
* @property {Boolean} allowNull Whether null values are allowed.
|
|
273
265
|
*/
|
|
274
|
-
validatePromise(
|
|
275
|
-
propertyName: string,
|
|
276
|
-
validatorFn: Function,
|
|
277
|
-
options?: Options,
|
|
278
|
-
): void;
|
|
266
|
+
validatePromise(propertyName: string, validatorFn: Function, options?: Options): void;
|
|
279
267
|
|
|
280
268
|
/**
|
|
281
269
|
* Validate uniqueness of the value for a property in the collection of models.
|
|
@@ -304,11 +292,7 @@ export interface Validatable {
|
|
|
304
292
|
* @property {String} if Validate only if `if` exists.
|
|
305
293
|
* @property {String} unless Validate only if `unless` exists.
|
|
306
294
|
*/
|
|
307
|
-
validatesUniquenessOf(
|
|
308
|
-
propertyName: string,
|
|
309
|
-
validatorFn: Function,
|
|
310
|
-
options?: Options,
|
|
311
|
-
): void;
|
|
295
|
+
validatesUniquenessOf(propertyName: string, validatorFn: Function, options?: Options): void;
|
|
312
296
|
|
|
313
297
|
/**
|
|
314
298
|
* Validate if a value for a property is a Date.
|
|
@@ -322,11 +306,7 @@ export interface Validatable {
|
|
|
322
306
|
* @options {Object} options Configuration parameters; see below.
|
|
323
307
|
* @property {String} message Error message to use instead of default.
|
|
324
308
|
*/
|
|
325
|
-
validatesDateOf(
|
|
326
|
-
propertyName: string,
|
|
327
|
-
validatorFn: Function,
|
|
328
|
-
options?: Options,
|
|
329
|
-
): void;
|
|
309
|
+
validatesDateOf(propertyName: string, validatorFn: Function, options?: Options): void;
|
|
330
310
|
}
|
|
331
311
|
|
|
332
312
|
/**
|