@daiso-tech/core 0.37.3 → 0.39.0
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/README.md +5 -1
- package/dist/async/_module-exports.d.ts +1 -1
- package/dist/async/_module-exports.js +1 -1
- package/dist/async/_module-exports.js.map +1 -1
- package/dist/async/async.errors.d.ts +0 -20
- package/dist/async/async.errors.js +0 -16
- package/dist/async/async.errors.js.map +1 -1
- package/dist/async/backof-policies/constant-backoff-policy/constant-backoff-policy.d.ts +1 -1
- package/dist/async/backof-policies/exponential-backoff-policy/exponential-backoff-policy.d.ts +2 -2
- package/dist/async/backof-policies/linear-backoff-policy/linear-backoff-policy.d.ts +1 -1
- package/dist/async/backof-policies/polynomial-backoff-policy/polynomial-backoff-policy.d.ts +2 -2
- package/dist/async/middlewares/_module.d.ts +0 -1
- package/dist/async/middlewares/_module.js +0 -1
- package/dist/async/middlewares/_module.js.map +1 -1
- package/dist/async/middlewares/bulkhead/bulkhead.middleware.d.ts +2 -2
- package/dist/async/middlewares/bulkhead/bulkhead.middleware.js +1 -1
- package/dist/async/middlewares/bulkhead/bulkhead.middleware.js.map +1 -1
- package/dist/async/middlewares/fallback/_module.d.ts +1 -0
- package/dist/async/middlewares/fallback/_module.js +1 -0
- package/dist/async/middlewares/fallback/_module.js.map +1 -1
- package/dist/async/middlewares/fallback/fallback.middleware.d.ts +25 -49
- package/dist/async/middlewares/fallback/fallback.middleware.js +52 -14
- package/dist/async/middlewares/fallback/fallback.middleware.js.map +1 -1
- package/dist/async/middlewares/fallback/fallback.types.d.ts +42 -0
- package/dist/async/middlewares/fallback/fallback.types.js +6 -0
- package/dist/async/middlewares/fallback/fallback.types.js.map +1 -0
- package/dist/async/middlewares/hedging/_module.d.ts +2 -2
- package/dist/async/middlewares/hedging/_module.js +2 -2
- package/dist/async/middlewares/hedging/_module.js.map +1 -1
- package/dist/async/middlewares/hedging/{_shared.d.ts → hedging.types.d.ts} +37 -9
- package/dist/async/middlewares/hedging/hedging.types.js +6 -0
- package/dist/async/middlewares/hedging/hedging.types.js.map +1 -0
- package/dist/async/middlewares/hedging/{sequential-hedging/sequential-hedging.middleware.d.ts → sequential-hedging.middleware.d.ts} +3 -3
- package/dist/async/middlewares/hedging/sequential-hedging.middleware.js +133 -0
- package/dist/async/middlewares/hedging/sequential-hedging.middleware.js.map +1 -0
- package/dist/async/middlewares/observe/_module.d.ts +1 -0
- package/dist/async/middlewares/observe/_module.js +1 -0
- package/dist/async/middlewares/observe/_module.js.map +1 -1
- package/dist/async/middlewares/observe/observe.middleware.d.ts +37 -87
- package/dist/async/middlewares/observe/observe.middleware.js +53 -2
- package/dist/async/middlewares/observe/observe.middleware.js.map +1 -1
- package/dist/async/middlewares/observe/observe.types.d.ts +91 -0
- package/dist/async/middlewares/observe/observe.types.js +6 -0
- package/dist/async/middlewares/observe/observe.types.js.map +1 -0
- package/dist/async/middlewares/retry/_module.d.ts +1 -0
- package/dist/async/middlewares/retry/_module.js +1 -0
- package/dist/async/middlewares/retry/_module.js.map +1 -1
- package/dist/async/middlewares/retry/retry.middleware.d.ts +36 -86
- package/dist/async/middlewares/retry/retry.middleware.js +70 -22
- package/dist/async/middlewares/retry/retry.middleware.js.map +1 -1
- package/dist/async/middlewares/retry/retry.types.d.ts +77 -0
- package/dist/async/middlewares/retry/retry.types.js +7 -0
- package/dist/async/middlewares/retry/retry.types.js.map +1 -0
- package/dist/async/middlewares/timeout/_module.d.ts +1 -0
- package/dist/async/middlewares/timeout/_module.js +1 -0
- package/dist/async/middlewares/timeout/_module.js.map +1 -1
- package/dist/async/middlewares/timeout/timeout.middleware.d.ts +1 -47
- package/dist/async/middlewares/timeout/timeout.middleware.js +1 -1
- package/dist/async/middlewares/timeout/timeout.middleware.js.map +1 -1
- package/dist/async/middlewares/timeout/timeout.type.d.ts +51 -0
- package/dist/async/middlewares/timeout/timeout.type.js +6 -0
- package/dist/async/middlewares/timeout/timeout.type.js.map +1 -0
- package/dist/async/utilities/promise-queue/promise-queue.js +19 -8
- package/dist/async/utilities/promise-queue/promise-queue.js.map +1 -1
- package/dist/cache/contracts/cache.contract.d.ts +7 -7
- package/dist/cache/contracts/cache.errors.d.ts +3 -26
- package/dist/cache/contracts/cache.errors.js +0 -47
- package/dist/cache/contracts/cache.errors.js.map +1 -1
- package/dist/cache/implementations/adapters/kysely-cache-adapter/kysely-cache-adapter.d.ts +6 -5
- package/dist/cache/implementations/adapters/kysely-cache-adapter/kysely-cache-adapter.js +17 -13
- package/dist/cache/implementations/adapters/kysely-cache-adapter/kysely-cache-adapter.js.map +1 -1
- package/dist/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.d.ts +15 -3
- package/dist/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.js +25 -9
- package/dist/cache/implementations/adapters/mongodb-cache-adapter/mongodb-cache-adapter.js.map +1 -1
- package/dist/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.d.ts +1 -1
- package/dist/cache/implementations/adapters/redis-cache-adapter/redis-cache-adapter.js +1 -1
- package/dist/cache/implementations/adapters/redis-cache-adapter/utilities.js +2 -1
- package/dist/cache/implementations/adapters/redis-cache-adapter/utilities.js.map +1 -1
- package/dist/cache/implementations/derivables/cache/cache.d.ts +2 -2
- package/dist/cache/implementations/derivables/cache/cache.js +1 -1
- package/dist/cache/implementations/derivables/cache/cache.js.map +1 -1
- package/dist/collection/contracts/async-collection.contract.d.ts +0 -1
- package/dist/collection/contracts/async-collection.contract.js +3 -1
- package/dist/collection/contracts/async-collection.contract.js.map +1 -1
- package/dist/collection/contracts/collection.contract.d.ts +0 -1
- package/dist/collection/contracts/collection.contract.js +3 -1
- package/dist/collection/contracts/collection.contract.js.map +1 -1
- package/dist/collection/contracts/collection.errors.d.ts +1 -26
- package/dist/collection/contracts/collection.errors.js +0 -55
- package/dist/collection/contracts/collection.errors.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-split-iterable.js +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-split-iterable.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-zip-iterable.js +1 -1
- package/dist/collection/implementations/async-iterable-collection/_shared/async-zip-iterable.js.map +1 -1
- package/dist/collection/implementations/async-iterable-collection/async-iterable-collection.js +9 -6
- package/dist/collection/implementations/async-iterable-collection/async-iterable-collection.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/_shared/split-iterable.js +1 -1
- package/dist/collection/implementations/iterable-collection/_shared/split-iterable.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/_shared/zip-iterable.js +1 -1
- package/dist/collection/implementations/iterable-collection/_shared/zip-iterable.js.map +1 -1
- package/dist/collection/implementations/iterable-collection/iterable-collection.js +9 -6
- package/dist/collection/implementations/iterable-collection/iterable-collection.js.map +1 -1
- package/dist/collection/implementations/list-collection/list-collection.js +12 -9
- package/dist/collection/implementations/list-collection/list-collection.js.map +1 -1
- package/dist/event-bus/contracts/_module-exports.d.ts +0 -1
- package/dist/event-bus/contracts/_module-exports.js +0 -1
- package/dist/event-bus/contracts/_module-exports.js.map +1 -1
- package/dist/event-bus/contracts/event-bus.contract.d.ts +0 -6
- package/dist/event-bus/contracts/event-bus.contract.js +1 -7
- package/dist/event-bus/contracts/event-bus.contract.js.map +1 -1
- package/dist/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/redis-pub-sub-event-bus-adapter.d.ts +2 -2
- package/dist/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/redis-pub-sub-event-bus-adapter.js +3 -2
- package/dist/event-bus/implementations/adapters/redis-pub-sub-event-bus-adapter/redis-pub-sub-event-bus-adapter.js.map +1 -1
- package/dist/event-bus/implementations/derivables/event-bus/event-bus.d.ts +1 -1
- package/dist/event-bus/implementations/derivables/event-bus/event-bus.js +6 -11
- package/dist/event-bus/implementations/derivables/event-bus/event-bus.js.map +1 -1
- package/dist/lock/contracts/database-lock-adapter.contract.d.ts +7 -5
- package/dist/lock/contracts/lock-adapter.contract.d.ts +5 -3
- package/dist/lock/contracts/lock.contract.d.ts +25 -41
- package/dist/lock/contracts/lock.errors.d.ts +5 -56
- package/dist/lock/contracts/lock.errors.js +1 -123
- package/dist/lock/contracts/lock.errors.js.map +1 -1
- package/dist/lock/contracts/lock.events.d.ts +3 -3
- package/dist/lock/contracts/lock.events.js +1 -1
- package/dist/lock/contracts/lock.events.js.map +1 -1
- package/dist/lock/implementations/adapters/kysely-lock-adapter/kysely-lock-adapter.d.ts +16 -4
- package/dist/lock/implementations/adapters/kysely-lock-adapter/kysely-lock-adapter.js +11 -8
- package/dist/lock/implementations/adapters/kysely-lock-adapter/kysely-lock-adapter.js.map +1 -1
- package/dist/lock/implementations/adapters/mongodb-lock-adapter/mongodb-lock-adapter.d.ts +17 -6
- package/dist/lock/implementations/adapters/mongodb-lock-adapter/mongodb-lock-adapter.js +9 -16
- package/dist/lock/implementations/adapters/mongodb-lock-adapter/mongodb-lock-adapter.js.map +1 -1
- package/dist/lock/implementations/adapters/redis-lock-adapter/redis-lock-adapter.d.ts +1 -1
- package/dist/lock/implementations/adapters/redis-lock-adapter/redis-lock-adapter.js +3 -3
- package/dist/lock/implementations/adapters/redis-lock-adapter/redis-lock-adapter.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider/database-lock-adapter.d.ts +1 -1
- package/dist/lock/implementations/derivables/lock-provider/database-lock-adapter.js +3 -2
- package/dist/lock/implementations/derivables/lock-provider/database-lock-adapter.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider/lock-provider.d.ts +3 -3
- package/dist/lock/implementations/derivables/lock-provider/lock-provider.js +2 -3
- package/dist/lock/implementations/derivables/lock-provider/lock-provider.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider/lock-serde-transformer.js +4 -3
- package/dist/lock/implementations/derivables/lock-provider/lock-serde-transformer.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider/lock-state.d.ts +8 -11
- package/dist/lock/implementations/derivables/lock-provider/lock-state.js +9 -26
- package/dist/lock/implementations/derivables/lock-provider/lock-state.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider/lock.d.ts +11 -14
- package/dist/lock/implementations/derivables/lock-provider/lock.js +50 -26
- package/dist/lock/implementations/derivables/lock-provider/lock.js.map +1 -1
- package/dist/lock/implementations/derivables/lock-provider-factory/lock-provider-factory.d.ts +2 -2
- package/dist/lock/implementations/derivables/lock-provider-factory/lock-provider-factory.js.map +1 -1
- package/dist/lock/implementations/test-utilities/lock-provider.test-suite.js +43 -47
- package/dist/lock/implementations/test-utilities/lock-provider.test-suite.js.map +1 -1
- package/dist/serde/implementations/derivables/serde.d.ts +22 -22
- package/dist/utilities/_module-exports.d.ts +1 -1
- package/dist/utilities/_module-exports.js +1 -1
- package/dist/utilities/_module-exports.js.map +1 -1
- package/dist/utilities/classes/hooks/async-hooks.d.ts +6 -4
- package/dist/utilities/classes/hooks/async-hooks.js +3 -1
- package/dist/utilities/classes/hooks/async-hooks.js.map +1 -1
- package/dist/utilities/classes/hooks/hooks.d.ts +1 -1
- package/dist/utilities/classes/hooks/hooks.js +1 -1
- package/dist/utilities/classes/hooks/hooks.js.map +1 -1
- package/dist/utilities/classes/kysely-table-name-transformer-plugin/kysely-table-name-transformer-plugin.js +2 -1
- package/dist/utilities/classes/kysely-table-name-transformer-plugin/kysely-table-name-transformer-plugin.js.map +1 -1
- package/dist/utilities/classes/namespace/namespace.d.ts +5 -5
- package/dist/utilities/classes/namespace/namespace.js +2 -2
- package/dist/utilities/classes/namespace/namespace.js.map +1 -1
- package/dist/utilities/classes/time-span/time-span.d.ts +10 -2
- package/dist/utilities/classes/time-span/time-span.js +10 -2
- package/dist/utilities/classes/time-span/time-span.js.map +1 -1
- package/dist/utilities/errors.d.ts +8 -0
- package/dist/utilities/errors.js +11 -0
- package/dist/utilities/errors.js.map +1 -1
- package/dist/utilities/functions/{_module-exports.d.ts → _module.d.ts} +6 -1
- package/dist/utilities/functions/{_module-exports.js → _module.js} +7 -2
- package/dist/utilities/functions/_module.js.map +1 -0
- package/dist/utilities/functions/error-policy.d.ts +54 -0
- package/dist/utilities/functions/error-policy.js +63 -0
- package/dist/utilities/functions/error-policy.js.map +1 -0
- package/dist/utilities/functions/invokable.d.ts +57 -1
- package/dist/utilities/functions/invokable.js +3 -1
- package/dist/utilities/functions/invokable.js.map +1 -1
- package/dist/utilities/functions/is-class.d.ts +9 -0
- package/dist/utilities/functions/is-class.js +15 -0
- package/dist/utilities/functions/is-class.js.map +1 -0
- package/dist/utilities/functions/is-positive-nbr.d.ts +8 -0
- package/dist/utilities/functions/is-positive-nbr.js +19 -0
- package/dist/utilities/functions/is-positive-nbr.js.map +1 -0
- package/dist/utilities/functions/is-standard-schema.d.ts +2 -0
- package/dist/utilities/functions/is-standard-schema.js +5 -0
- package/dist/utilities/functions/is-standard-schema.js.map +1 -0
- package/dist/utilities/functions/lazy.d.ts +27 -1
- package/dist/utilities/functions/lazy.js.map +1 -1
- package/dist/utilities/functions/option.d.ts +32 -0
- package/dist/utilities/functions/option.js +25 -0
- package/dist/utilities/functions/option.js.map +1 -0
- package/dist/utilities/functions/resolve-one-or-more.d.ts +5 -1
- package/dist/utilities/functions/resolve-one-or-more.js.map +1 -1
- package/dist/utilities/functions/result.d.ts +81 -1
- package/dist/utilities/functions/result.js +46 -2
- package/dist/utilities/functions/result.js.map +1 -1
- package/dist/utilities/types/_module.d.ts +1 -7
- package/dist/utilities/types/_module.js +1 -7
- package/dist/utilities/types/_module.js.map +1 -1
- package/dist/utilities/types/any-class.type.d.ts +3 -0
- package/dist/utilities/types/any-class.type.js +2 -0
- package/dist/utilities/types/any-class.type.js.map +1 -0
- package/package.json +1 -1
- package/dist/async/middlewares/_shared.d.ts +0 -15
- package/dist/async/middlewares/_shared.js +0 -15
- package/dist/async/middlewares/_shared.js.map +0 -1
- package/dist/async/middlewares/hedging/_shared.js +0 -5
- package/dist/async/middlewares/hedging/_shared.js.map +0 -1
- package/dist/async/middlewares/hedging/concurrent-hedging/_module.d.ts +0 -1
- package/dist/async/middlewares/hedging/concurrent-hedging/_module.js +0 -2
- package/dist/async/middlewares/hedging/concurrent-hedging/_module.js.map +0 -1
- package/dist/async/middlewares/hedging/concurrent-hedging/concurrent-hedging.middleware.d.ts +0 -51
- package/dist/async/middlewares/hedging/concurrent-hedging/concurrent-hedging.middleware.js +0 -138
- package/dist/async/middlewares/hedging/concurrent-hedging/concurrent-hedging.middleware.js.map +0 -1
- package/dist/async/middlewares/hedging/sequential-hedging/_module.d.ts +0 -1
- package/dist/async/middlewares/hedging/sequential-hedging/_module.js +0 -2
- package/dist/async/middlewares/hedging/sequential-hedging/_module.js.map +0 -1
- package/dist/async/middlewares/hedging/sequential-hedging/sequential-hedging.middleware.js +0 -104
- package/dist/async/middlewares/hedging/sequential-hedging/sequential-hedging.middleware.js.map +0 -1
- package/dist/event-bus/contracts/event-bus.errors.d.ts +0 -72
- package/dist/event-bus/contracts/event-bus.errors.js +0 -110
- package/dist/event-bus/contracts/event-bus.errors.js.map +0 -1
- package/dist/utilities/functions/_module-exports.js.map +0 -1
- package/dist/utilities/types/at-least-one.type.d.ts +0 -8
- package/dist/utilities/types/at-least-one.type.js +0 -5
- package/dist/utilities/types/at-least-one.type.js.map +0 -1
- package/dist/utilities/types/factory.type.d.ts +0 -44
- package/dist/utilities/types/factory.type.js +0 -5
- package/dist/utilities/types/factory.type.js.map +0 -1
- package/dist/utilities/types/invokable.type.d.ts +0 -20
- package/dist/utilities/types/invokable.type.js +0 -5
- package/dist/utilities/types/invokable.type.js.map +0 -1
- package/dist/utilities/types/items.type.d.ts +0 -8
- package/dist/utilities/types/items.type.js +0 -5
- package/dist/utilities/types/items.type.js.map +0 -1
- package/dist/utilities/types/lazy.type.d.ts +0 -31
- package/dist/utilities/types/lazy.type.js +0 -5
- package/dist/utilities/types/lazy.type.js.map +0 -1
- package/dist/utilities/types/one-or-more.type.d.ts +0 -8
- package/dist/utilities/types/one-or-more.type.js +0 -5
- package/dist/utilities/types/one-or-more.type.js.map +0 -1
- package/dist/utilities/types/result.type.d.ts +0 -18
- package/dist/utilities/types/result.type.js +0 -5
- package/dist/utilities/types/result.type.js.map +0 -1
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module EventBus
|
|
3
|
-
*/
|
|
4
|
-
import { CORE, resolveOneOrMore, } from "../../utilities/_module-exports.js";
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
* IMPORT_PATH: `"@daiso-tech/core/event-bus/contracts"`
|
|
8
|
-
* @group Errors
|
|
9
|
-
*/
|
|
10
|
-
export class EventBusError extends Error {
|
|
11
|
-
static deserialize(deserializedValue) {
|
|
12
|
-
return new EventBusError(deserializedValue.message, deserializedValue.cause);
|
|
13
|
-
}
|
|
14
|
-
constructor(message, cause) {
|
|
15
|
-
super(message, { cause });
|
|
16
|
-
this.name = EventBusError.name;
|
|
17
|
-
}
|
|
18
|
-
serialize() {
|
|
19
|
-
return {
|
|
20
|
-
name: this.name,
|
|
21
|
-
message: this.message,
|
|
22
|
-
cause: this.cause,
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* IMPORT_PATH: `"@daiso-tech/core/event-bus/contracts"`
|
|
29
|
-
* @group Errors
|
|
30
|
-
*/
|
|
31
|
-
export class UnexpectedEventBusError extends EventBusError {
|
|
32
|
-
static deserialize(deserializedValue) {
|
|
33
|
-
return new UnexpectedEventBusError(deserializedValue.message, deserializedValue.cause);
|
|
34
|
-
}
|
|
35
|
-
constructor(message, cause) {
|
|
36
|
-
super(message, { cause });
|
|
37
|
-
this.name = UnexpectedEventBusError.name;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* The error is thrown when an unexpected error occurs while removing a listener.
|
|
42
|
-
*
|
|
43
|
-
* IMPORT_PATH: `"@daiso-tech/core/event-bus/contracts"`
|
|
44
|
-
* @group Errors
|
|
45
|
-
*/
|
|
46
|
-
export class UnableToRemoveListenerEventBusError extends UnexpectedEventBusError {
|
|
47
|
-
static deserialize(deserializedValue) {
|
|
48
|
-
return new UnableToRemoveListenerEventBusError(deserializedValue.message, deserializedValue.cause);
|
|
49
|
-
}
|
|
50
|
-
constructor(message, cause) {
|
|
51
|
-
super(message, { cause });
|
|
52
|
-
this.name = UnableToRemoveListenerEventBusError.name;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* The error is thrown when an unexpected error occurs while adding a listener.
|
|
57
|
-
*
|
|
58
|
-
* IMPORT_PATH: `"@daiso-tech/core/event-bus/contracts"`
|
|
59
|
-
* @group Errors
|
|
60
|
-
*/
|
|
61
|
-
export class UnableToAddListenerEventBusError extends UnexpectedEventBusError {
|
|
62
|
-
static deserialize(deserializedValue) {
|
|
63
|
-
return new UnableToAddListenerEventBusError(deserializedValue.message, deserializedValue.cause);
|
|
64
|
-
}
|
|
65
|
-
constructor(message, cause) {
|
|
66
|
-
super(message, { cause });
|
|
67
|
-
this.name = UnableToAddListenerEventBusError.name;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* The error is thrown when an unexpected error occurs while dispatching an event.
|
|
72
|
-
*
|
|
73
|
-
* IMPORT_PATH: `"@daiso-tech/core/event-bus/contracts"`
|
|
74
|
-
* @group Errors
|
|
75
|
-
*/
|
|
76
|
-
export class UnableToDispatchEventBusError extends UnexpectedEventBusError {
|
|
77
|
-
constructor(message, cause) {
|
|
78
|
-
super(message, { cause });
|
|
79
|
-
this.name = UnableToDispatchEventBusError.name;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
*
|
|
84
|
-
* IMPORT_PATH: `"@daiso-tech/core/event-bus/contracts"`
|
|
85
|
-
* @group Errors
|
|
86
|
-
*/
|
|
87
|
-
export const EVENT_BUS_ERRORS = {
|
|
88
|
-
Base: EventBusError,
|
|
89
|
-
Unexpected: UnexpectedEventBusError,
|
|
90
|
-
UnableToRemoveListener: UnableToRemoveListenerEventBusError,
|
|
91
|
-
UnableToAddListener: UnableToAddListenerEventBusError,
|
|
92
|
-
UnableToDispatch: UnableToDispatchEventBusError,
|
|
93
|
-
};
|
|
94
|
-
/**
|
|
95
|
-
* The `registerEventBusErrorsToSerde` function registers all {@link IEventBus | `IEventBus`} related errors with `ISerderRegister`, ensuring they will properly be serialized and deserialized.
|
|
96
|
-
*
|
|
97
|
-
* IMPORT_PATH: `"@daiso-tech/core/event-bus/contracts"`
|
|
98
|
-
* @group Errors
|
|
99
|
-
*/
|
|
100
|
-
export function registerEventBusErrorsToSerde(serde) {
|
|
101
|
-
for (const serde_ of resolveOneOrMore(serde)) {
|
|
102
|
-
serde_
|
|
103
|
-
.registerClass(EventBusError, CORE)
|
|
104
|
-
.registerClass(UnexpectedEventBusError, CORE)
|
|
105
|
-
.registerClass(UnableToRemoveListenerEventBusError, CORE)
|
|
106
|
-
.registerClass(UnableToAddListenerEventBusError, CORE)
|
|
107
|
-
.registerClass(UnableToDispatchEventBusError, CORE);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
//# sourceMappingURL=event-bus.errors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-bus.errors.js","sourceRoot":"","sources":["../../../src/event-bus/contracts/event-bus.errors.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_module-exports.js","sourceRoot":"","sources":["../../../src/utilities/functions/_module-exports.ts"],"names":[],"mappings":"AAAA,cAAc,+CAA+C,CAAC;AAC9D,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8CAA8C,CAAC;AAC7D,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"at-least-one.type.js","sourceRoot":"","sources":["../../../src/utilities/types/at-least-one.type.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module Utilities
|
|
3
|
-
*/
|
|
4
|
-
import type { NoneFunc } from "../../utilities/types/none-func.type.js";
|
|
5
|
-
import type { Promisable } from "../../utilities/types/promiseable.type.js";
|
|
6
|
-
import type { IInvokableObject, InvokableFn } from "../../utilities/types/invokable.type.js";
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* IMPORT_PATH: `"@daiso-tech/core/utilities"`
|
|
10
|
-
*/
|
|
11
|
-
export type FactoryFn<TInput, TOutput> = InvokableFn<[
|
|
12
|
-
value: TInput
|
|
13
|
-
], NoneFunc<TOutput>>;
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
* IMPORT_PATH: `"@daiso-tech/core/utilities"`
|
|
17
|
-
*/
|
|
18
|
-
export type IFactoryObject<TInput, TOutput> = IInvokableObject<[
|
|
19
|
-
value: TInput
|
|
20
|
-
], NoneFunc<TOutput>>;
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
* IMPORT_PATH: `"@daiso-tech/core/utilities"`
|
|
24
|
-
*/
|
|
25
|
-
export type Factory<TInput, TOutput> = FactoryFn<TInput, TOutput> | IFactoryObject<TInput, TOutput>;
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* IMPORT_PATH: `"@daiso-tech/core/utilities"`
|
|
29
|
-
*/
|
|
30
|
-
export type AsyncFactoryFn<TInput, TOutput> = InvokableFn<[
|
|
31
|
-
value: TInput
|
|
32
|
-
], Promisable<NoneFunc<TOutput>>>;
|
|
33
|
-
/**
|
|
34
|
-
*
|
|
35
|
-
* IMPORT_PATH: `"@daiso-tech/core/utilities"`
|
|
36
|
-
*/
|
|
37
|
-
export type IAsyncFactoryObject<TInput, TOutput> = IInvokableObject<[
|
|
38
|
-
value: TInput
|
|
39
|
-
], Promisable<NoneFunc<TOutput>>>;
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* IMPORT_PATH: `"@daiso-tech/core/utilities"`
|
|
43
|
-
*/
|
|
44
|
-
export type AsyncFactory<TInput, TOutput> = AsyncFactoryFn<TInput, TOutput> | IAsyncFactoryObject<TInput, TOutput>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"factory.type.js","sourceRoot":"","sources":["../../../src/utilities/types/factory.type.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module Utilities
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* IMPORT_PATH: `"@daiso-tech/core/utilities"`
|
|
7
|
-
*/
|
|
8
|
-
export type InvokableFn<TArgs extends unknown[] = unknown[], TReturn = unknown> = (...args: TArgs) => TReturn;
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* IMPORT_PATH: `"@daiso-tech/core/utilities"`
|
|
12
|
-
*/
|
|
13
|
-
export type IInvokableObject<TArgs extends unknown[] = unknown[], TReturn = unknown> = {
|
|
14
|
-
invoke(...args: TArgs): TReturn;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* IMPORT_PATH: `"@daiso-tech/core/utilities"`
|
|
19
|
-
*/
|
|
20
|
-
export type Invokable<TArgs extends unknown[] = unknown[], TReturn = unknown> = InvokableFn<TArgs, TReturn> | IInvokableObject<TArgs, TReturn>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"invokable.type.js","sourceRoot":"","sources":["../../../src/utilities/types/invokable.type.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"items.type.js","sourceRoot":"","sources":["../../../src/utilities/types/items.type.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module Utilities
|
|
3
|
-
*/
|
|
4
|
-
import type { LazyPromise } from "../../async/_module-exports.js";
|
|
5
|
-
import type { Promisable } from "../../utilities/types/promiseable.type.js";
|
|
6
|
-
import type { Invokable } from "../../utilities/types/invokable.type.js";
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* IMPORT_PATH: `"@daiso-tech/core/utilities"`
|
|
10
|
-
*/
|
|
11
|
-
export type Lazy<TValue> = Invokable<[], TValue>;
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* IMPORT_PATH: `"@daiso-tech/core/utilities"`
|
|
15
|
-
*/
|
|
16
|
-
export type Lazyable<TValue> = TValue | Lazy<TValue>;
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
* IMPORT_PATH: `"@daiso-tech/core/utilities"`
|
|
20
|
-
*/
|
|
21
|
-
export type AsyncLazy_<TValue> = Invokable<[], Promisable<TValue>>;
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* IMPORT_PATH: `"@daiso-tech/core/utilities"`
|
|
25
|
-
*/
|
|
26
|
-
export type AsyncLazy<TValue> = AsyncLazy_<TValue> | LazyPromise<TValue>;
|
|
27
|
-
/**
|
|
28
|
-
*
|
|
29
|
-
* IMPORT_PATH: `"@daiso-tech/core/utilities"`
|
|
30
|
-
*/
|
|
31
|
-
export type AsyncLazyable<TValue> = TValue | AsyncLazy<TValue>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lazy.type.js","sourceRoot":"","sources":["../../../src/utilities/types/lazy.type.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"one-or-more.type.js","sourceRoot":"","sources":["../../../src/utilities/types/one-or-more.type.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module Utilities
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* IMPORT_PATH: `"@daiso-tech/core/utilities"`
|
|
7
|
-
*/
|
|
8
|
-
export type ResultFailure<TError = unknown> = [value: null, errror: TError];
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* IMPORT_PATH: `"@daiso-tech/core/utilities"`
|
|
12
|
-
*/
|
|
13
|
-
export type ResultSuccess<TValue> = [value: TValue, error: null];
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
* IMPORT_PATH: `"@daiso-tech/core/utilities"`
|
|
17
|
-
*/
|
|
18
|
-
export type Result<TValue, TError = unknown> = ResultFailure<TError> | ResultSuccess<TValue>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"result.type.js","sourceRoot":"","sources":["../../../src/utilities/types/result.type.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|