@coasys/ad4m 0.10.0-rc6.fix1 → 0.10.0-rc6.fix3

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/lib/index.cjs CHANGED
@@ -4963,7 +4963,7 @@ class PerspectiveProxy {
4963
4963
  buildQueryFromTemplate(obj) {
4964
4964
  let result;
4965
4965
  // We need to avoid strict mode for the following intropsective code
4966
- (function () {
4966
+ (function (obj) {
4967
4967
  // Collect all string properties of the object in a list
4968
4968
  let properties = [];
4969
4969
  // Collect all collections of the object in a list
@@ -4985,15 +4985,24 @@ class PerspectiveProxy {
4985
4985
  // Collect all set functions of the object in a list
4986
4986
  let setFunctions = Object.getOwnPropertyNames(obj).filter(key => (typeof obj[key] === "function") && key.startsWith("set") && !key.startsWith("setCollection"));
4987
4987
  // Add all set functions of the object's prototype to that list
4988
- setFunctions = setFunctions.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).filter(key => (typeof Object.getPrototypeOf(obj)[key] === "function") && key.startsWith("set") && !key.startsWith("setCollection")));
4988
+ setFunctions = setFunctions.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).filter(key => {
4989
+ const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(obj), key);
4990
+ return descriptor && typeof descriptor.value === "function" && key.startsWith("set") && !key.startsWith("setCollection");
4991
+ }));
4989
4992
  // Collect all add functions of the object in a list
4990
4993
  let addFunctions = Object.getOwnPropertyNames(obj).filter(key => (Object.prototype.hasOwnProperty.call(obj, key) && typeof obj[key] === "function") && key.startsWith("add"));
4991
4994
  // Add all add functions of the object's prototype to that list
4992
- addFunctions = addFunctions.concat(Object.keys(Object.getPrototypeOf(obj)).filter(key => (Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(obj), key) && typeof Object.getPrototypeOf(obj)[key] === "function") && key.startsWith("add")));
4995
+ addFunctions = addFunctions.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).filter(key => {
4996
+ const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(obj), key);
4997
+ return descriptor && typeof descriptor.value === "function" && key.startsWith("add");
4998
+ }));
4993
4999
  // Collect all remove functions of the object in a list
4994
5000
  let removeFunctions = Object.getOwnPropertyNames(obj).filter(key => (Object.prototype.hasOwnProperty.call(obj, key) && typeof obj[key] === "function") && key.startsWith("remove"));
4995
5001
  // Add all remove functions of the object's prototype to that list
4996
- removeFunctions = removeFunctions.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).filter(key => (Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(obj), key) && typeof Object.getPrototypeOf(obj)[key] === "function") && key.startsWith("remove")));
5002
+ removeFunctions = removeFunctions.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).filter(key => {
5003
+ const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(obj), key);
5004
+ return descriptor && typeof descriptor.value === "function" && key.startsWith("remove");
5005
+ }));
4997
5006
  // Collect all add functions of the object in a list
4998
5007
  let setCollectionFunctions = Object.getOwnPropertyNames(obj).filter(key => (Object.prototype.hasOwnProperty.call(obj, key) && typeof obj[key] === "function") && key.startsWith("setCollection"));
4999
5008
  // Add all add functions of the object's prototype to that list
@@ -5023,7 +5032,7 @@ class PerspectiveProxy {
5023
5032
  }
5024
5033
  query += ".";
5025
5034
  result = query;
5026
- }());
5035
+ }(obj));
5027
5036
  return result;
5028
5037
  }
5029
5038
  /** Returns all subject classes that match the given template object.
package/lib/index.js CHANGED
@@ -4959,7 +4959,7 @@ class PerspectiveProxy {
4959
4959
  buildQueryFromTemplate(obj) {
4960
4960
  let result;
4961
4961
  // We need to avoid strict mode for the following intropsective code
4962
- (function () {
4962
+ (function (obj) {
4963
4963
  // Collect all string properties of the object in a list
4964
4964
  let properties = [];
4965
4965
  // Collect all collections of the object in a list
@@ -4981,15 +4981,24 @@ class PerspectiveProxy {
4981
4981
  // Collect all set functions of the object in a list
4982
4982
  let setFunctions = Object.getOwnPropertyNames(obj).filter(key => (typeof obj[key] === "function") && key.startsWith("set") && !key.startsWith("setCollection"));
4983
4983
  // Add all set functions of the object's prototype to that list
4984
- setFunctions = setFunctions.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).filter(key => (typeof Object.getPrototypeOf(obj)[key] === "function") && key.startsWith("set") && !key.startsWith("setCollection")));
4984
+ setFunctions = setFunctions.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).filter(key => {
4985
+ const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(obj), key);
4986
+ return descriptor && typeof descriptor.value === "function" && key.startsWith("set") && !key.startsWith("setCollection");
4987
+ }));
4985
4988
  // Collect all add functions of the object in a list
4986
4989
  let addFunctions = Object.getOwnPropertyNames(obj).filter(key => (Object.prototype.hasOwnProperty.call(obj, key) && typeof obj[key] === "function") && key.startsWith("add"));
4987
4990
  // Add all add functions of the object's prototype to that list
4988
- addFunctions = addFunctions.concat(Object.keys(Object.getPrototypeOf(obj)).filter(key => (Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(obj), key) && typeof Object.getPrototypeOf(obj)[key] === "function") && key.startsWith("add")));
4991
+ addFunctions = addFunctions.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).filter(key => {
4992
+ const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(obj), key);
4993
+ return descriptor && typeof descriptor.value === "function" && key.startsWith("add");
4994
+ }));
4989
4995
  // Collect all remove functions of the object in a list
4990
4996
  let removeFunctions = Object.getOwnPropertyNames(obj).filter(key => (Object.prototype.hasOwnProperty.call(obj, key) && typeof obj[key] === "function") && key.startsWith("remove"));
4991
4997
  // Add all remove functions of the object's prototype to that list
4992
- removeFunctions = removeFunctions.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).filter(key => (Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(obj), key) && typeof Object.getPrototypeOf(obj)[key] === "function") && key.startsWith("remove")));
4998
+ removeFunctions = removeFunctions.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).filter(key => {
4999
+ const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(obj), key);
5000
+ return descriptor && typeof descriptor.value === "function" && key.startsWith("remove");
5001
+ }));
4993
5002
  // Collect all add functions of the object in a list
4994
5003
  let setCollectionFunctions = Object.getOwnPropertyNames(obj).filter(key => (Object.prototype.hasOwnProperty.call(obj, key) && typeof obj[key] === "function") && key.startsWith("setCollection"));
4995
5004
  // Add all add functions of the object's prototype to that list
@@ -5019,7 +5028,7 @@ class PerspectiveProxy {
5019
5028
  }
5020
5029
  query += ".";
5021
5030
  result = query;
5022
- }());
5031
+ }(obj));
5023
5032
  return result;
5024
5033
  }
5025
5034
  /** Returns all subject classes that match the given template object.
@@ -370,7 +370,7 @@ export class PerspectiveProxy {
370
370
  buildQueryFromTemplate(obj) {
371
371
  let result;
372
372
  // We need to avoid strict mode for the following intropsective code
373
- (function () {
373
+ (function (obj) {
374
374
  // Collect all string properties of the object in a list
375
375
  let properties = [];
376
376
  // Collect all collections of the object in a list
@@ -392,15 +392,24 @@ export class PerspectiveProxy {
392
392
  // Collect all set functions of the object in a list
393
393
  let setFunctions = Object.getOwnPropertyNames(obj).filter(key => (typeof obj[key] === "function") && key.startsWith("set") && !key.startsWith("setCollection"));
394
394
  // Add all set functions of the object's prototype to that list
395
- setFunctions = setFunctions.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).filter(key => (typeof Object.getPrototypeOf(obj)[key] === "function") && key.startsWith("set") && !key.startsWith("setCollection")));
395
+ setFunctions = setFunctions.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).filter(key => {
396
+ const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(obj), key);
397
+ return descriptor && typeof descriptor.value === "function" && key.startsWith("set") && !key.startsWith("setCollection");
398
+ }));
396
399
  // Collect all add functions of the object in a list
397
400
  let addFunctions = Object.getOwnPropertyNames(obj).filter(key => (Object.prototype.hasOwnProperty.call(obj, key) && typeof obj[key] === "function") && key.startsWith("add"));
398
401
  // Add all add functions of the object's prototype to that list
399
- addFunctions = addFunctions.concat(Object.keys(Object.getPrototypeOf(obj)).filter(key => (Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(obj), key) && typeof Object.getPrototypeOf(obj)[key] === "function") && key.startsWith("add")));
402
+ addFunctions = addFunctions.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).filter(key => {
403
+ const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(obj), key);
404
+ return descriptor && typeof descriptor.value === "function" && key.startsWith("add");
405
+ }));
400
406
  // Collect all remove functions of the object in a list
401
407
  let removeFunctions = Object.getOwnPropertyNames(obj).filter(key => (Object.prototype.hasOwnProperty.call(obj, key) && typeof obj[key] === "function") && key.startsWith("remove"));
402
408
  // Add all remove functions of the object's prototype to that list
403
- removeFunctions = removeFunctions.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).filter(key => (Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(obj), key) && typeof Object.getPrototypeOf(obj)[key] === "function") && key.startsWith("remove")));
409
+ removeFunctions = removeFunctions.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).filter(key => {
410
+ const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(obj), key);
411
+ return descriptor && typeof descriptor.value === "function" && key.startsWith("remove");
412
+ }));
404
413
  // Collect all add functions of the object in a list
405
414
  let setCollectionFunctions = Object.getOwnPropertyNames(obj).filter(key => (Object.prototype.hasOwnProperty.call(obj, key) && typeof obj[key] === "function") && key.startsWith("setCollection"));
406
415
  // Add all add functions of the object's prototype to that list
@@ -430,7 +439,7 @@ export class PerspectiveProxy {
430
439
  }
431
440
  query += ".";
432
441
  result = query;
433
- }());
442
+ }(obj));
434
443
  return result;
435
444
  }
436
445
  /** Returns all subject classes that match the given template object.
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "module": "lib/index.js",
6
6
  "types": "lib/src/index.d.ts",
7
7
  "type": "module",
8
-
8
+
9
9
  "scripts": {
10
10
  "build": "patch-package && tsc && pnpm run buildSchema && pnpm run bundle",
11
11
  "buildSchema": "node --es-module-specifier-resolution=node lib/src/buildSchema.js",
@@ -60,7 +60,7 @@
60
60
  "@types/yargs": "*"
61
61
  },
62
62
  "patchedDependencies": {},
63
- "version": "0.10.0-rc6.fix1",
63
+ "version": "0.10.0-rc6.fix3",
64
64
  "pnpm": {
65
65
  "patchedDependencies": {
66
66
  "graphql@15.7.2": "patches/graphql@15.7.2.patch"
@@ -434,7 +434,7 @@ export class PerspectiveProxy {
434
434
  private buildQueryFromTemplate(obj: object): string {
435
435
  let result
436
436
  // We need to avoid strict mode for the following intropsective code
437
- (function() {
437
+ (function(obj) {
438
438
  // Collect all string properties of the object in a list
439
439
  let properties = []
440
440
 
@@ -458,17 +458,26 @@ export class PerspectiveProxy {
458
458
  // Collect all set functions of the object in a list
459
459
  let setFunctions = Object.getOwnPropertyNames(obj).filter(key => (typeof obj[key] === "function") && key.startsWith("set") && !key.startsWith("setCollection"))
460
460
  // Add all set functions of the object's prototype to that list
461
- setFunctions = setFunctions.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).filter(key => (typeof Object.getPrototypeOf(obj)[key] === "function") && key.startsWith("set") && !key.startsWith("setCollection")))
461
+ setFunctions = setFunctions.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).filter(key => {
462
+ const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(obj), key);
463
+ return descriptor && typeof descriptor.value === "function" && key.startsWith("set") && !key.startsWith("setCollection");
464
+ }));
462
465
 
463
466
  // Collect all add functions of the object in a list
464
467
  let addFunctions = Object.getOwnPropertyNames(obj).filter(key => (Object.prototype.hasOwnProperty.call(obj, key) && typeof obj[key] === "function") && key.startsWith("add"))
465
468
  // Add all add functions of the object's prototype to that list
466
- addFunctions = addFunctions.concat(Object.keys(Object.getPrototypeOf(obj)).filter(key => (Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(obj), key) && typeof Object.getPrototypeOf(obj)[key] === "function") && key.startsWith("add")))
469
+ addFunctions = addFunctions.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).filter(key => {
470
+ const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(obj), key);
471
+ return descriptor && typeof descriptor.value === "function" && key.startsWith("add");
472
+ }));
467
473
 
468
474
  // Collect all remove functions of the object in a list
469
475
  let removeFunctions = Object.getOwnPropertyNames(obj).filter(key => (Object.prototype.hasOwnProperty.call(obj, key) && typeof obj[key] === "function") && key.startsWith("remove"))
470
476
  // Add all remove functions of the object's prototype to that list
471
- removeFunctions = removeFunctions.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).filter(key => (Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(obj), key) && typeof Object.getPrototypeOf(obj)[key] === "function") && key.startsWith("remove")))
477
+ removeFunctions = removeFunctions.concat(Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).filter(key => {
478
+ const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(obj), key);
479
+ return descriptor && typeof descriptor.value === "function" && key.startsWith("remove");
480
+ }));
472
481
 
473
482
  // Collect all add functions of the object in a list
474
483
  let setCollectionFunctions = Object.getOwnPropertyNames(obj).filter(key => (Object.prototype.hasOwnProperty.call(obj, key) && typeof obj[key] === "function") && key.startsWith("setCollection"))
@@ -505,7 +514,7 @@ export class PerspectiveProxy {
505
514
 
506
515
  query += "."
507
516
  result = query
508
- }())
517
+ }(obj))
509
518
  return result
510
519
  }
511
520