@privateaim/kit 0.8.13 → 0.8.15

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.8.15](https://github.com/PrivateAIM/hub/compare/v0.8.14...v0.8.15) (2025-07-30)
4
+
5
+
6
+ ### Features
7
+
8
+ * align analysis-logs & initital log render view ([5fd2365](https://github.com/PrivateAIM/hub/commit/5fd236552dd8489d7ab00bf6f59751824ce554fd))
9
+ * event (re-) modelling ([#1125](https://github.com/PrivateAIM/hub/issues/1125)) ([621f704](https://github.com/PrivateAIM/hub/commit/621f7041794d0bf6d530445a9c3e7c9b66a373ba))
10
+ * migrated to authup v1.0.0-beta.27 ([f96db78](https://github.com/PrivateAIM/hub/commit/f96db782a5b74e3aa8ab1ada270af770f3c92631))
11
+
12
+ ## [0.8.14](https://github.com/PrivateAIM/hub/compare/v0.8.13...v0.8.14) (2025-07-10)
13
+
14
+
15
+ ### Features
16
+
17
+ * remodel analysis-node-logs ([#1092](https://github.com/PrivateAIM/hub/issues/1092)) ([4fc553d](https://github.com/PrivateAIM/hub/commit/4fc553d62fa7496b464b39d78a3942e492046eac))
18
+
3
19
  ## [0.8.13](https://github.com/PrivateAIM/hub/compare/v0.8.12...v0.8.13) (2025-05-05)
4
20
 
5
21
  ## [0.8.12](https://github.com/PrivateAIM/hub/compare/v0.8.11...v0.8.12) (2025-04-25)
@@ -1,3 +1,4 @@
1
+ export * from './log';
1
2
  export * from './permission';
2
3
  export * from './realm';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/domains/index.ts"],"names":[],"mappings":"AAOA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/domains/index.ts"],"names":[],"mappings":"AAOA,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,43 @@
1
+ export declare enum LogLevel {
2
+ /**
3
+ * indicates that the system is unusable
4
+ * and requires immediate attention
5
+ */
6
+ EMERGENCE = "emerg",
7
+ /**
8
+ * indicates that immediate action is necessary
9
+ * to resolve a critical issue.
10
+ */
11
+ ALERT = "alert",
12
+ /**
13
+ * signifies critical conditions in the program that demand
14
+ * intervention to prevent system failure.
15
+ */
16
+ CRITICAL = "crit",
17
+ /**
18
+ * indicates error conditions that impair
19
+ * some operation but are less severe than critical situations.
20
+ */
21
+ ERROR = "error",
22
+ /**
23
+ * signifies potential issues that may lead to errors
24
+ * or unexpected behavior in the future if not addressed.
25
+ */
26
+ WARNING = "warn",
27
+ /**
28
+ * applies to normal but significant
29
+ * conditions that may require monitoring
30
+ */
31
+ NOTICE = "notice",
32
+ /**
33
+ * includes messages that provide a record
34
+ * of the normal operation of the system.
35
+ */
36
+ INFORMATIONAL = "info",
37
+ /**
38
+ * intended for logging detailed information about the system
39
+ * for debugging purposes.
40
+ */
41
+ DEBUG = "debug"
42
+ }
43
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/domains/log/constants.ts"],"names":[],"mappings":"AAOA,oBAAY,QAAQ;IAChB;;;OAGG;IACH,SAAS,UAAU;IAEnB;;;OAGG;IACH,KAAK,UAAU;IAEf;;;OAGG;IACH,QAAQ,SAAS;IAEjB;;;OAGG;IACH,KAAK,UAAU;IAEf;;;OAGG;IACH,OAAO,SAAS;IAEhB;;;OAGG;IACH,MAAM,WAAW;IAEjB;;;OAGG;IACH,aAAa,SAAS;IAEtB;;;OAGG;IACH,KAAK,UAAU;CAClB"}
@@ -0,0 +1,20 @@
1
+ import type { LogLevel } from './index';
2
+ export interface Log {
3
+ /**
4
+ * Time in micro seconds
5
+ */
6
+ time: string | bigint;
7
+ /**
8
+ * message
9
+ */
10
+ message: string;
11
+ /**
12
+ * level
13
+ */
14
+ level: `${LogLevel}`;
15
+ /**
16
+ * additional labels
17
+ */
18
+ labels: Record<string, string>;
19
+ }
20
+ //# sourceMappingURL=entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../../src/domains/log/entity.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,WAAW,GAAG;IAChB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAEtB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAErB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACjC"}
@@ -0,0 +1,4 @@
1
+ import type { Log } from './entity';
2
+ export declare function omitLogProperties<T extends Log>(input: T): Omit<T, keyof Log>;
3
+ export declare function pickLogProperties<T extends Log>(input: T): Log;
4
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/domains/log/helpers.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAEpC,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,GAAG,EAAE,KAAK,EAAE,CAAC,GAAI,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAO9E;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,GAAG,EAAE,KAAK,EAAE,CAAC,GAAI,GAAG,CAO/D"}
@@ -0,0 +1,4 @@
1
+ export * from './constants';
2
+ export * from './entity';
3
+ export * from './helpers';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domains/log/index.ts"],"names":[],"mappings":"AAOA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
@@ -1,4 +1,6 @@
1
1
  export declare enum PermissionName {
2
+ EVENT_READ = "event_read",
3
+ EVENT_DELETE = "event_delete",
2
4
  BUCKET_CREATE = "bucket_create",
3
5
  BUCKET_UPDATE = "bucket_update",
4
6
  BUCKET_DELETE = "bucket_delete",
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/domains/permission/constants.ts"],"names":[],"mappings":"AAOA,oBAAY,cAAc;IACtB,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAE/B,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IAEnC,eAAe,oBAAoB;IACnC,uBAAuB,4BAA4B;IAEnD,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAE3B,gBAAgB,qBAAqB;IACrC,eAAe,oBAAoB;IACnC,eAAe,oBAAoB;IACnC,wBAAwB,6BAA6B;IACrD,uBAAuB,4BAA4B;IACnD,eAAe,oBAAoB;IACnC,oBAAoB,yBAAyB,CAAE,2CAA2C;IAE1F,gCAAgC,qCAAqC;IACrE,yBAAyB,8BAA8B;IAEvD,mBAAmB,wBAAwB;IAC3C,yBAAyB,8BAA8B;IAEvD,cAAc,mBAAmB;CACpC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/domains/permission/constants.ts"],"names":[],"mappings":"AAOA,oBAAY,cAAc;IACtB,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAE7B,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAE/B,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IAEnC,eAAe,oBAAoB;IACnC,uBAAuB,4BAA4B;IAEnD,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAE3B,gBAAgB,qBAAqB;IACrC,eAAe,oBAAoB;IACnC,eAAe,oBAAoB;IACnC,wBAAwB,6BAA6B;IACrD,uBAAuB,4BAA4B;IACnD,eAAe,oBAAoB;IACnC,oBAAoB,yBAAyB,CAAE,2CAA2C;IAE1F,gCAAgC,qCAAqC;IACrE,yBAAyB,8BAA8B;IAEvD,mBAAmB,wBAAwB;IAC3C,yBAAyB,8BAA8B;IAEvD,cAAc,mBAAmB;CACpC"}
package/dist/index.cjs CHANGED
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ var kit = require('@authup/kit');
3
4
  var coreKit = require('@authup/core-kit');
4
5
  var nanoid = require('nanoid');
5
6
 
@@ -19,7 +20,7 @@ var nanoid = require('nanoid');
19
20
  * Author Peter Placzek (tada5hi)
20
21
  * For the full copyright and license information,
21
22
  * view the LICENSE file that was distributed with this source code.
22
- */ function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
23
+ */ function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
23
24
  try {
24
25
  var info = gen[key](arg);
25
26
  var value = info.value;
@@ -33,16 +34,16 @@ var nanoid = require('nanoid');
33
34
  Promise.resolve(value).then(_next, _throw);
34
35
  }
35
36
  }
36
- function _async_to_generator$2(fn) {
37
+ function _async_to_generator$3(fn) {
37
38
  return function() {
38
39
  var self = this, args = arguments;
39
40
  return new Promise(function(resolve, reject) {
40
41
  var gen = fn.apply(self, args);
41
42
  function _next(value) {
42
- asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "next", value);
43
+ asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "next", value);
43
44
  }
44
45
  function _throw(err) {
45
- asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "throw", err);
46
+ asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "throw", err);
46
47
  }
47
48
  _next(undefined);
48
49
  });
@@ -52,19 +53,19 @@ function arrayBufferToBase64(arrayBuffer) {
52
53
  return btoa(String.fromCharCode.apply(null, new Uint8Array(arrayBuffer)));
53
54
  }
54
55
  function exportAsymmetricPublicKey(key) {
55
- return _async_to_generator$2(function*() {
56
+ return _async_to_generator$3(function*() {
56
57
  const exported = yield crypto.subtle.exportKey('spki', key);
57
58
  return `-----BEGIN PUBLIC KEY-----\n${arrayBufferToBase64(exported)}\n-----END PUBLIC KEY-----`;
58
59
  })();
59
60
  }
60
61
  function exportAsymmetricPrivateKey(key) {
61
- return _async_to_generator$2(function*() {
62
+ return _async_to_generator$3(function*() {
62
63
  const exported = yield crypto.subtle.exportKey('pkcs8', key);
63
64
  return `-----BEGIN PRIVATE KEY-----\n${arrayBufferToBase64(exported)}\n-----END PRIVATE KEY-----`;
64
65
  })();
65
66
  }
66
67
  function importAsymmetricPublicKey(pem, params) {
67
- return _async_to_generator$2(function*() {
68
+ return _async_to_generator$3(function*() {
68
69
  const pemHeader = '-----BEGIN PUBLIC KEY-----';
69
70
  const pemFooter = '-----END PUBLIC KEY-----';
70
71
  const pemContents = pem.substring(pemHeader.length, pem.length - pemFooter.length);
@@ -85,7 +86,7 @@ function importAsymmetricPublicKey(pem, params) {
85
86
  * Author Peter Placzek (tada5hi)
86
87
  * For the full copyright and license information,
87
88
  * view the LICENSE file that was distributed with this source code.
88
- */ function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) {
89
+ */ function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
89
90
  try {
90
91
  var info = gen[key](arg);
91
92
  var value = info.value;
@@ -99,16 +100,16 @@ function importAsymmetricPublicKey(pem, params) {
99
100
  Promise.resolve(value).then(_next, _throw);
100
101
  }
101
102
  }
102
- function _async_to_generator$1(fn) {
103
+ function _async_to_generator$2(fn) {
103
104
  return function() {
104
105
  var self = this, args = arguments;
105
106
  return new Promise(function(resolve, reject) {
106
107
  var gen = fn.apply(self, args);
107
108
  function _next(value) {
108
- asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "next", value);
109
+ asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "next", value);
109
110
  }
110
111
  function _throw(err) {
111
- asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "throw", err);
112
+ asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "throw", err);
112
113
  }
113
114
  _next(undefined);
114
115
  });
@@ -179,7 +180,7 @@ class CryptoAsymmetricAlgorithm {
179
180
  throw new Error('Import params could not be created.');
180
181
  }
181
182
  generateKeyPair() {
182
- return _async_to_generator$1(function*() {
183
+ return _async_to_generator$2(function*() {
183
184
  if (this.algorithm.name === AsymmetricCryptoAlgorithmName.RSA_OAEP) {
184
185
  this.keyPair = yield crypto.subtle.generateKey(this.algorithm, true, [
185
186
  'encrypt',
@@ -197,7 +198,7 @@ class CryptoAsymmetricAlgorithm {
197
198
  }).call(this);
198
199
  }
199
200
  useKeyPair() {
200
- return _async_to_generator$1(function*() {
201
+ return _async_to_generator$2(function*() {
201
202
  if (typeof this.keyPair !== 'undefined') {
202
203
  return this.keyPair;
203
204
  }
@@ -205,19 +206,19 @@ class CryptoAsymmetricAlgorithm {
205
206
  }).call(this);
206
207
  }
207
208
  exportPublicKey() {
208
- return _async_to_generator$1(function*() {
209
+ return _async_to_generator$2(function*() {
209
210
  const keyPair = yield this.useKeyPair();
210
211
  return exportAsymmetricPublicKey(keyPair.publicKey);
211
212
  }).call(this);
212
213
  }
213
214
  exportPrivateKey() {
214
- return _async_to_generator$1(function*() {
215
+ return _async_to_generator$2(function*() {
215
216
  const keyPair = yield this.useKeyPair();
216
217
  return exportAsymmetricPrivateKey(keyPair.privateKey);
217
218
  }).call(this);
218
219
  }
219
220
  encrypt(data, remoteKey) {
220
- return _async_to_generator$1(function*() {
221
+ return _async_to_generator$2(function*() {
221
222
  const keyPair = yield this.useKeyPair();
222
223
  if (this.algorithm.name === AsymmetricCryptoAlgorithmName.RSA_OAEP) {
223
224
  return crypto.subtle.encrypt({
@@ -254,7 +255,7 @@ class CryptoAsymmetricAlgorithm {
254
255
  }).call(this);
255
256
  }
256
257
  decrypt(data, remoteKey) {
257
- return _async_to_generator$1(function*() {
258
+ return _async_to_generator$2(function*() {
258
259
  const keyPair = yield this.useKeyPair();
259
260
  if (this.algorithm.name === AsymmetricCryptoAlgorithmName.RSA_OAEP) {
260
261
  return crypto.subtle.decrypt({
@@ -305,7 +306,7 @@ class CryptoAsymmetricAlgorithm {
305
306
  * Author Peter Placzek (tada5hi)
306
307
  * For the full copyright and license information,
307
308
  * view the LICENSE file that was distributed with this source code.
308
- */ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
309
+ */ function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) {
309
310
  try {
310
311
  var info = gen[key](arg);
311
312
  var value = info.value;
@@ -319,16 +320,16 @@ class CryptoAsymmetricAlgorithm {
319
320
  Promise.resolve(value).then(_next, _throw);
320
321
  }
321
322
  }
322
- function _async_to_generator(fn) {
323
+ function _async_to_generator$1(fn) {
323
324
  return function() {
324
325
  var self = this, args = arguments;
325
326
  return new Promise(function(resolve, reject) {
326
327
  var gen = fn.apply(self, args);
327
328
  function _next(value) {
328
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
329
+ asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "next", value);
329
330
  }
330
331
  function _throw(err) {
331
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
332
+ asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "throw", err);
332
333
  }
333
334
  _next(undefined);
334
335
  });
@@ -349,7 +350,7 @@ function _define_property(obj, key, value) {
349
350
  }
350
351
  class CryptoSymmetricAlgorithm {
351
352
  generateKey() {
352
- return _async_to_generator(function*() {
353
+ return _async_to_generator$1(function*() {
353
354
  return crypto.subtle.generateKey({
354
355
  name: this.algorithm.name,
355
356
  length: 256
@@ -360,7 +361,7 @@ class CryptoSymmetricAlgorithm {
360
361
  }).call(this);
361
362
  }
362
363
  importKey(buffer) {
363
- return _async_to_generator(function*() {
364
+ return _async_to_generator$1(function*() {
364
365
  return crypto.subtle.importKey('raw', buffer, {
365
366
  name: this.algorithm.name,
366
367
  length: 256
@@ -371,7 +372,7 @@ class CryptoSymmetricAlgorithm {
371
372
  }).call(this);
372
373
  }
373
374
  encrypt(key, iv, data) {
374
- return _async_to_generator(function*() {
375
+ return _async_to_generator$1(function*() {
375
376
  const arrayBuffer = yield crypto.subtle.encrypt({
376
377
  name: this.algorithm.name,
377
378
  length: 256,
@@ -385,7 +386,7 @@ class CryptoSymmetricAlgorithm {
385
386
  }).call(this);
386
387
  }
387
388
  decrypt(key, data) {
388
- return _async_to_generator(function*() {
389
+ return _async_to_generator$1(function*() {
389
390
  const iv = data.slice(0, 16);
390
391
  const arrayBuffer = yield crypto.subtle.decrypt({
391
392
  name: this.algorithm.name,
@@ -401,12 +402,72 @@ class CryptoSymmetricAlgorithm {
401
402
  }
402
403
  }
403
404
 
405
+ /*
406
+ * Copyright (c) 2025.
407
+ * Author Peter Placzek (tada5hi)
408
+ * For the full copyright and license information,
409
+ * view the LICENSE file that was distributed with this source code.
410
+ */ var LogLevel = /*#__PURE__*/ function(LogLevel) {
411
+ /**
412
+ * indicates that the system is unusable
413
+ * and requires immediate attention
414
+ */ LogLevel["EMERGENCE"] = "emerg";
415
+ /**
416
+ * indicates that immediate action is necessary
417
+ * to resolve a critical issue.
418
+ */ LogLevel["ALERT"] = "alert";
419
+ /**
420
+ * signifies critical conditions in the program that demand
421
+ * intervention to prevent system failure.
422
+ */ LogLevel["CRITICAL"] = "crit";
423
+ /**
424
+ * indicates error conditions that impair
425
+ * some operation but are less severe than critical situations.
426
+ */ LogLevel["ERROR"] = "error";
427
+ /**
428
+ * signifies potential issues that may lead to errors
429
+ * or unexpected behavior in the future if not addressed.
430
+ */ LogLevel["WARNING"] = "warn";
431
+ /**
432
+ * applies to normal but significant
433
+ * conditions that may require monitoring
434
+ */ LogLevel["NOTICE"] = "notice";
435
+ /**
436
+ * includes messages that provide a record
437
+ * of the normal operation of the system.
438
+ */ LogLevel["INFORMATIONAL"] = "info";
439
+ /**
440
+ * intended for logging detailed information about the system
441
+ * for debugging purposes.
442
+ */ LogLevel["DEBUG"] = "debug";
443
+ return LogLevel;
444
+ }({});
445
+
446
+ function omitLogProperties(input) {
447
+ return kit.omitRecord(input, [
448
+ 'message',
449
+ 'time',
450
+ 'labels',
451
+ 'level'
452
+ ]);
453
+ }
454
+ function pickLogProperties(input) {
455
+ return kit.pickRecord(input, [
456
+ 'message',
457
+ 'time',
458
+ 'labels',
459
+ 'level'
460
+ ]);
461
+ }
462
+
404
463
  /*
405
464
  * Copyright (c) 2021-2024.
406
465
  * Author Peter Placzek (tada5hi)
407
466
  * For the full copyright and license information,
408
467
  * view the LICENSE file that was distributed with this source code.
409
468
  */ var PermissionName = /*#__PURE__*/ function(PermissionName) {
469
+ PermissionName["EVENT_READ"] = "event_read";
470
+ PermissionName["EVENT_DELETE"] = "event_delete";
410
471
  PermissionName["BUCKET_CREATE"] = "bucket_create";
411
472
  PermissionName["BUCKET_UPDATE"] = "bucket_update";
412
473
  PermissionName["BUCKET_DELETE"] = "bucket_delete";
@@ -591,6 +652,48 @@ function detectProxyConnectionConfig() {
591
652
  */ const alphaNumHyphenUnderscoreRegex = /^[a-z0-9-_]*$/;
592
653
  const registryRobotSecretRegex = /^(?=.*[A-Z])(?=.*[a-z])(?=.*\d).{8,}$/;
593
654
 
655
+ /*
656
+ * Copyright (c) 2025.
657
+ * Author Peter Placzek (tada5hi)
658
+ * For the full copyright and license information,
659
+ * view the LICENSE file that was distributed with this source code.
660
+ */ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
661
+ try {
662
+ var info = gen[key](arg);
663
+ var value = info.value;
664
+ } catch (error) {
665
+ reject(error);
666
+ return;
667
+ }
668
+ if (info.done) {
669
+ resolve(value);
670
+ } else {
671
+ Promise.resolve(value).then(_next, _throw);
672
+ }
673
+ }
674
+ function _async_to_generator(fn) {
675
+ return function() {
676
+ var self = this, args = arguments;
677
+ return new Promise(function(resolve, reject) {
678
+ var gen = fn.apply(self, args);
679
+ function _next(value) {
680
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
681
+ }
682
+ function _throw(err) {
683
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
684
+ }
685
+ _next(undefined);
686
+ });
687
+ };
688
+ }
689
+ function wait(ms) {
690
+ return _async_to_generator(function*() {
691
+ return new Promise((resolve)=>{
692
+ setTimeout(resolve, ms);
693
+ });
694
+ })();
695
+ }
696
+
594
697
  /**
595
698
  * Check if a realm resource is writable.
596
699
  *
@@ -665,6 +768,7 @@ exports.AsymmetricCryptoAlgorithmName = AsymmetricCryptoAlgorithmName;
665
768
  exports.CryptoAsymmetricAlgorithm = CryptoAsymmetricAlgorithm;
666
769
  exports.CryptoSymmetricAlgorithm = CryptoSymmetricAlgorithm;
667
770
  exports.EnvironmentName = EnvironmentName;
771
+ exports.LogLevel = LogLevel;
668
772
  exports.PermissionName = PermissionName;
669
773
  exports.alphaNumHyphenUnderscoreRegex = alphaNumHyphenUnderscoreRegex;
670
774
  exports.buildDomainEventFullName = buildDomainEventFullName;
@@ -687,6 +791,9 @@ exports.isPropertySet = isPropertySet;
687
791
  exports.isRealmResourceReadable = isRealmResourceReadable;
688
792
  exports.isRealmResourceWritable = isRealmResourceWritable;
689
793
  exports.nullifyEmptyObjectProperties = nullifyEmptyObjectProperties;
794
+ exports.omitLogProperties = omitLogProperties;
690
795
  exports.parseProxyConnectionString = parseProxyConnectionString;
796
+ exports.pickLogProperties = pickLogProperties;
691
797
  exports.registryRobotSecretRegex = registryRobotSecretRegex;
798
+ exports.wait = wait;
692
799
  //# sourceMappingURL=index.cjs.map