akeyless-client-commons 1.0.209 → 1.0.210

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.
@@ -42,7 +42,9 @@ interface SnapshotResult {
42
42
  promise: Promise<void>;
43
43
  unsubscribe: Unsubscribe;
44
44
  }
45
- type Snapshot = (config: OnSnapshotConfig, snapshotsFirstTime: string[]) => SnapshotResult;
45
+ type Snapshot = (config: OnSnapshotConfig, snapshotsFirstTime: string[], settings?: {
46
+ disableLogs?: boolean;
47
+ }) => SnapshotResult;
46
48
  type SnapshotDocument = (config: OnSnapshotConfigDocument, snapshotsFirstTime: string[]) => SnapshotResult;
47
49
 
48
50
  declare const db: Firestore;
@@ -42,7 +42,9 @@ interface SnapshotResult {
42
42
  promise: Promise<void>;
43
43
  unsubscribe: Unsubscribe;
44
44
  }
45
- type Snapshot = (config: OnSnapshotConfig, snapshotsFirstTime: string[]) => SnapshotResult;
45
+ type Snapshot = (config: OnSnapshotConfig, snapshotsFirstTime: string[], settings?: {
46
+ disableLogs?: boolean;
47
+ }) => SnapshotResult;
46
48
  type SnapshotDocument = (config: OnSnapshotConfigDocument, snapshotsFirstTime: string[]) => SnapshotResult;
47
49
 
48
50
  declare const db: Firestore;
@@ -1364,11 +1364,13 @@ var query_document_by_conditions = /*#__PURE__*/ function() {
1364
1364
  return _ref.apply(this, arguments);
1365
1365
  };
1366
1366
  }();
1367
- var snapshot = function(config, snapshotsFirstTime) {
1367
+ var snapshot = function(config, snapshotsFirstTime, settings) {
1368
1368
  var resolvePromise;
1369
1369
  var isResolved = false;
1370
1370
  var promise = new Promise(function(resolve) {
1371
- console.log("==> ".concat(config.collectionName, " subscribed."));
1371
+ if (!(settings === null || settings === void 0 ? void 0 : settings.disableLogs)) {
1372
+ console.log("==> ".concat(config.collectionName, " subscribed."));
1373
+ }
1372
1374
  resolvePromise = function() {
1373
1375
  if (!isResolved) {
1374
1376
  isResolved = true;
@@ -1022,11 +1022,13 @@ var query_document_by_conditions = /*#__PURE__*/ function() {
1022
1022
  return _ref.apply(this, arguments);
1023
1023
  };
1024
1024
  }();
1025
- var snapshot = function(config, snapshotsFirstTime) {
1025
+ var snapshot = function(config, snapshotsFirstTime, settings) {
1026
1026
  var resolvePromise;
1027
1027
  var isResolved = false;
1028
1028
  var promise = new Promise(function(resolve) {
1029
- console.log("==> ".concat(config.collectionName, " subscribed."));
1029
+ if (!(settings === null || settings === void 0 ? void 0 : settings.disableLogs)) {
1030
+ console.log("==> ".concat(config.collectionName, " subscribed."));
1031
+ }
1030
1032
  resolvePromise = function() {
1031
1033
  if (!isResolved) {
1032
1034
  isResolved = true;
@@ -366,11 +366,13 @@ var simpleExtractData = function(doc2) {
366
366
  id: doc2.id
367
367
  });
368
368
  };
369
- var snapshot = function(config, snapshotsFirstTime) {
369
+ var snapshot = function(config, snapshotsFirstTime, settings) {
370
370
  var resolvePromise;
371
371
  var isResolved = false;
372
372
  var promise = new Promise(function(resolve) {
373
- console.log("==> ".concat(config.collectionName, " subscribed."));
373
+ if (!(settings === null || settings === void 0 ? void 0 : settings.disableLogs)) {
374
+ console.log("==> ".concat(config.collectionName, " subscribed."));
375
+ }
374
376
  resolvePromise = function() {
375
377
  if (!isResolved) {
376
378
  isResolved = true;
@@ -551,9 +553,11 @@ var useSnapshotBulk = function(configs, label, settings) {
551
553
  var unsubscribeFunctions = (0, import_react3.useRef)([]);
552
554
  useDeepCompareEffect(function() {
553
555
  var start = performance.now();
554
- console.log("==> ".concat(label || "Custom snapshots", " started... "));
556
+ if (!(settings === null || settings === void 0 ? void 0 : settings.disableLogs)) {
557
+ console.log("==> ".concat(label || "Custom snapshots", " started... "));
558
+ }
555
559
  var snapshotResults = configs.map(function(config) {
556
- return snapshot(config, snapshotsFirstTime.current);
560
+ return snapshot(config, snapshotsFirstTime.current, settings);
557
561
  });
558
562
  unsubscribeFunctions.current = snapshotResults.map(function(result) {
559
563
  return result.unsubscribe;
@@ -561,10 +565,9 @@ var useSnapshotBulk = function(configs, label, settings) {
561
565
  Promise.all(snapshotResults.map(function(result) {
562
566
  return result.promise;
563
567
  })).then(function() {
564
- if (settings === null || settings === void 0 ? void 0 : settings.disableLogs) {
565
- return;
568
+ if (!(settings === null || settings === void 0 ? void 0 : settings.disableLogs)) {
569
+ console.log("==> ".concat(label || "Custom snapshots", " ended. It took ").concat((performance.now() - start).toFixed(2), " ms"));
566
570
  }
567
- console.log("==> ".concat(label || "Custom snapshots", " ended. It took ").concat((performance.now() - start).toFixed(2), " ms"));
568
571
  });
569
572
  if (settings === null || settings === void 0 ? void 0 : settings.cleanupForConfigChange) {
570
573
  return function() {
@@ -573,16 +576,15 @@ var useSnapshotBulk = function(configs, label, settings) {
573
576
  unsubscribe();
574
577
  }
575
578
  });
576
- if (settings === null || settings === void 0 ? void 0 : settings.disableLogs) {
577
- return;
579
+ if (!(settings === null || settings === void 0 ? void 0 : settings.disableLogs)) {
580
+ console.log("==> ".concat(label || "Custom snapshots", " unsubscribed"));
578
581
  }
579
- console.log("==> ".concat(label || "Custom snapshots", " unsubscribed"));
580
582
  };
581
583
  }
582
584
  }, [
583
585
  configs,
584
586
  label,
585
- settings === null || settings === void 0 ? void 0 : settings.cleanupForConfigChange
587
+ settings
586
588
  ]);
587
589
  (0, import_react3.useEffect)(function() {
588
590
  return function() {
@@ -591,10 +593,9 @@ var useSnapshotBulk = function(configs, label, settings) {
591
593
  unsubscribe();
592
594
  }
593
595
  });
594
- if (settings === null || settings === void 0 ? void 0 : settings.disableLogs) {
595
- return;
596
+ if (!(settings === null || settings === void 0 ? void 0 : settings.disableLogs)) {
597
+ console.log("==> ".concat(label || "Custom snapshots", " unsubscribed"));
596
598
  }
597
- console.log("==> ".concat(label || "Custom snapshots", " unsubscribed"));
598
599
  };
599
600
  }, []);
600
601
  };
@@ -279,11 +279,13 @@ var simpleExtractData = function(doc2) {
279
279
  id: doc2.id
280
280
  });
281
281
  };
282
- var snapshot = function(config, snapshotsFirstTime) {
282
+ var snapshot = function(config, snapshotsFirstTime, settings) {
283
283
  var resolvePromise;
284
284
  var isResolved = false;
285
285
  var promise = new Promise(function(resolve) {
286
- console.log("==> ".concat(config.collectionName, " subscribed."));
286
+ if (!(settings === null || settings === void 0 ? void 0 : settings.disableLogs)) {
287
+ console.log("==> ".concat(config.collectionName, " subscribed."));
288
+ }
287
289
  resolvePromise = function() {
288
290
  if (!isResolved) {
289
291
  isResolved = true;
@@ -463,9 +465,11 @@ var useSnapshotBulk = function(configs, label, settings) {
463
465
  var unsubscribeFunctions = useRef2([]);
464
466
  useDeepCompareEffect(function() {
465
467
  var start = performance.now();
466
- console.log("==> ".concat(label || "Custom snapshots", " started... "));
468
+ if (!(settings === null || settings === void 0 ? void 0 : settings.disableLogs)) {
469
+ console.log("==> ".concat(label || "Custom snapshots", " started... "));
470
+ }
467
471
  var snapshotResults = configs.map(function(config) {
468
- return snapshot(config, snapshotsFirstTime.current);
472
+ return snapshot(config, snapshotsFirstTime.current, settings);
469
473
  });
470
474
  unsubscribeFunctions.current = snapshotResults.map(function(result) {
471
475
  return result.unsubscribe;
@@ -473,10 +477,9 @@ var useSnapshotBulk = function(configs, label, settings) {
473
477
  Promise.all(snapshotResults.map(function(result) {
474
478
  return result.promise;
475
479
  })).then(function() {
476
- if (settings === null || settings === void 0 ? void 0 : settings.disableLogs) {
477
- return;
480
+ if (!(settings === null || settings === void 0 ? void 0 : settings.disableLogs)) {
481
+ console.log("==> ".concat(label || "Custom snapshots", " ended. It took ").concat((performance.now() - start).toFixed(2), " ms"));
478
482
  }
479
- console.log("==> ".concat(label || "Custom snapshots", " ended. It took ").concat((performance.now() - start).toFixed(2), " ms"));
480
483
  });
481
484
  if (settings === null || settings === void 0 ? void 0 : settings.cleanupForConfigChange) {
482
485
  return function() {
@@ -485,16 +488,15 @@ var useSnapshotBulk = function(configs, label, settings) {
485
488
  unsubscribe();
486
489
  }
487
490
  });
488
- if (settings === null || settings === void 0 ? void 0 : settings.disableLogs) {
489
- return;
491
+ if (!(settings === null || settings === void 0 ? void 0 : settings.disableLogs)) {
492
+ console.log("==> ".concat(label || "Custom snapshots", " unsubscribed"));
490
493
  }
491
- console.log("==> ".concat(label || "Custom snapshots", " unsubscribed"));
492
494
  };
493
495
  }
494
496
  }, [
495
497
  configs,
496
498
  label,
497
- settings === null || settings === void 0 ? void 0 : settings.cleanupForConfigChange
499
+ settings
498
500
  ]);
499
501
  useEffect2(function() {
500
502
  return function() {
@@ -503,10 +505,9 @@ var useSnapshotBulk = function(configs, label, settings) {
503
505
  unsubscribe();
504
506
  }
505
507
  });
506
- if (settings === null || settings === void 0 ? void 0 : settings.disableLogs) {
507
- return;
508
+ if (!(settings === null || settings === void 0 ? void 0 : settings.disableLogs)) {
509
+ console.log("==> ".concat(label || "Custom snapshots", " unsubscribed"));
508
510
  }
509
- console.log("==> ".concat(label || "Custom snapshots", " unsubscribed"));
510
511
  };
511
512
  }, []);
512
513
  };
@@ -107,7 +107,9 @@ interface SnapshotResult {
107
107
  promise: Promise<void>;
108
108
  unsubscribe: Unsubscribe;
109
109
  }
110
- type Snapshot = (config: OnSnapshotConfig, snapshotsFirstTime: string[]) => SnapshotResult;
110
+ type Snapshot = (config: OnSnapshotConfig, snapshotsFirstTime: string[], settings?: {
111
+ disableLogs?: boolean;
112
+ }) => SnapshotResult;
111
113
  type SnapshotDocument = (config: OnSnapshotConfigDocument, snapshotsFirstTime: string[]) => SnapshotResult;
112
114
 
113
115
  type ValidationType = "text" | "numbers" | "numbersOnly" | "price" | "textNumbers" | "email" | "color" | "address" | "cars" | "charts" | (string & {});
@@ -107,7 +107,9 @@ interface SnapshotResult {
107
107
  promise: Promise<void>;
108
108
  unsubscribe: Unsubscribe;
109
109
  }
110
- type Snapshot = (config: OnSnapshotConfig, snapshotsFirstTime: string[]) => SnapshotResult;
110
+ type Snapshot = (config: OnSnapshotConfig, snapshotsFirstTime: string[], settings?: {
111
+ disableLogs?: boolean;
112
+ }) => SnapshotResult;
111
113
  type SnapshotDocument = (config: OnSnapshotConfigDocument, snapshotsFirstTime: string[]) => SnapshotResult;
112
114
 
113
115
  type ValidationType = "text" | "numbers" | "numbersOnly" | "price" | "textNumbers" | "email" | "color" | "address" | "cars" | "charts" | (string & {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akeyless-client-commons",
3
- "version": "1.0.209",
3
+ "version": "1.0.210",
4
4
  "scripts": {
5
5
  "build": "tsup",
6
6
  "deploy": "npm run build && npm version patch --no-git-tag-version && npm publish",