@roastery/terroir 0.0.1 → 0.0.2

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.
Files changed (71) hide show
  1. package/dist/application-exception-Ck-CRA9W.d.cts +9 -0
  2. package/dist/application-exception-mi3iXk8r.d.ts +9 -0
  3. package/dist/chunk-EBPUXUYY.js +28 -0
  4. package/dist/chunk-N6MCTGZD.js +6 -0
  5. package/dist/chunk-UEZ4EF5Z.js +7 -0
  6. package/dist/chunk-WY3PDSMZ.js +27 -0
  7. package/dist/chunk-YBMFDZEW.js +53 -0
  8. package/dist/domain-exception-2mxDRlhr.d.ts +9 -0
  9. package/dist/domain-exception-BJknDTC7.d.cts +9 -0
  10. package/dist/exceptions/application/index.cjs +133 -0
  11. package/dist/exceptions/application/index.d.cts +6 -0
  12. package/dist/exceptions/application/index.d.ts +6 -0
  13. package/dist/exceptions/application/index.js +68 -0
  14. package/dist/exceptions/application/jwt/index.cjs +73 -0
  15. package/dist/exceptions/application/jwt/index.d.cts +20 -0
  16. package/dist/exceptions/application/jwt/index.d.ts +20 -0
  17. package/dist/exceptions/application/jwt/index.js +11 -0
  18. package/dist/{index.cjs → exceptions/core/index.cjs} +9 -8
  19. package/dist/exceptions/core/index.d.cts +11 -0
  20. package/dist/exceptions/core/index.d.ts +11 -0
  21. package/dist/exceptions/core/index.js +7 -0
  22. package/dist/exceptions/core/types/index.cjs +18 -0
  23. package/dist/exceptions/core/types/index.d.cts +3 -0
  24. package/dist/exceptions/core/types/index.d.ts +3 -0
  25. package/dist/exceptions/core/types/index.js +0 -0
  26. package/dist/exceptions/domain/index.cjs +86 -0
  27. package/dist/exceptions/domain/index.d.cts +5 -0
  28. package/dist/exceptions/domain/index.d.ts +5 -0
  29. package/dist/exceptions/domain/index.js +41 -0
  30. package/dist/exceptions/index.cjs +74 -0
  31. package/dist/exceptions/index.d.cts +4 -0
  32. package/dist/exceptions/index.d.ts +4 -0
  33. package/dist/exceptions/index.js +45 -0
  34. package/dist/exceptions/infra/index.cjs +158 -0
  35. package/dist/exceptions/infra/index.d.cts +5 -0
  36. package/dist/exceptions/infra/index.d.ts +5 -0
  37. package/dist/exceptions/infra/index.js +107 -0
  38. package/dist/exceptions/models/index.cjs +55 -0
  39. package/dist/exceptions/models/index.d.cts +6 -0
  40. package/dist/exceptions/models/index.d.ts +6 -0
  41. package/dist/exceptions/models/index.js +12 -0
  42. package/dist/exceptions/symbols/index.cjs +32 -0
  43. package/dist/exceptions/symbols/index.d.cts +3 -0
  44. package/dist/exceptions/symbols/index.d.ts +3 -0
  45. package/dist/exceptions/symbols/index.js +6 -0
  46. package/dist/exceptions/types/index.cjs +18 -0
  47. package/dist/exceptions/types/index.d.cts +30 -0
  48. package/dist/exceptions/types/index.d.ts +30 -0
  49. package/dist/exceptions/types/index.js +0 -0
  50. package/dist/index-0ZqtQ0BA.d.ts +89 -0
  51. package/dist/index-B_h1N1CO.d.cts +55 -0
  52. package/dist/index-C4-MCapS.d.ts +40 -0
  53. package/dist/index-CNApJ5kV.d.ts +35 -0
  54. package/dist/index-DaS_UsEv.d.cts +89 -0
  55. package/dist/index-E6KvVxtW.d.ts +55 -0
  56. package/dist/index-YFuBgYBS.d.cts +35 -0
  57. package/dist/index-g4_PChJX.d.cts +40 -0
  58. package/dist/infra-exception-1PUIDeP4.d.ts +9 -0
  59. package/dist/infra-exception-Dm1D9yrN.d.cts +9 -0
  60. package/dist/schema/formats/index.cjs +55 -0
  61. package/dist/schema/formats/index.d.cts +2 -0
  62. package/dist/schema/formats/index.d.ts +2 -0
  63. package/dist/schema/formats/index.js +1 -0
  64. package/dist/schema/index.cjs +195 -0
  65. package/dist/schema/index.d.cts +19 -0
  66. package/dist/schema/index.d.ts +19 -0
  67. package/dist/schema/index.js +115 -0
  68. package/package.json +7 -8
  69. package/dist/index.d.cts +0 -3
  70. package/dist/index.d.ts +0 -3
  71. package/dist/index.js +0 -5
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/exceptions/domain/index.ts
21
+ var domain_exports = {};
22
+ __export(domain_exports, {
23
+ InvalidDomainDataException: () => InvalidDomainDataException,
24
+ InvalidPropertyException: () => InvalidPropertyException,
25
+ OperationFailedException: () => OperationFailedException
26
+ });
27
+ module.exports = __toCommonJS(domain_exports);
28
+
29
+ // src/exceptions/symbols/exception-layer.ts
30
+ var ExceptionLayer = /* @__PURE__ */ Symbol("exception:layer");
31
+
32
+ // src/exceptions/core/core-exception.ts
33
+ var CoreException = class extends Error {
34
+ };
35
+
36
+ // src/exceptions/models/domain-exception.ts
37
+ var DomainException = class extends CoreException {
38
+ [ExceptionLayer] = "domain";
39
+ };
40
+
41
+ // src/exceptions/models/infra-exception.ts
42
+ var InfraException = class extends CoreException {
43
+ [ExceptionLayer] = "infra";
44
+ };
45
+
46
+ // src/exceptions/models/application-exception.ts
47
+ var ApplicationException = class extends CoreException {
48
+ [ExceptionLayer] = "application";
49
+ };
50
+
51
+ // src/exceptions/domain/invalid-domain-data.exception.ts
52
+ var InvalidDomainDataException = class extends DomainException {
53
+ constructor(source, message = `Invalid data provided for the ${source} domain.`) {
54
+ super(message);
55
+ this.source = source;
56
+ this.message = message;
57
+ }
58
+ name = "Invalid Domain Data";
59
+ };
60
+
61
+ // src/exceptions/domain/operation-failed.exception.ts
62
+ var OperationFailedException = class extends DomainException {
63
+ constructor(source, message = `Operation failed in the ${source} domain.`) {
64
+ super(message);
65
+ this.source = source;
66
+ this.message = message;
67
+ }
68
+ name = "Operation Failed";
69
+ };
70
+
71
+ // src/exceptions/domain/invalid-property.exception.ts
72
+ var InvalidPropertyException = class extends DomainException {
73
+ constructor(property, source, message = `The property '${property}' in ${source} is invalid.`) {
74
+ super(message);
75
+ this.property = property;
76
+ this.source = source;
77
+ this.message = message;
78
+ }
79
+ name = "Invalid Property";
80
+ };
81
+ // Annotate the CommonJS export names for ESM import in node:
82
+ 0 && (module.exports = {
83
+ InvalidDomainDataException,
84
+ InvalidPropertyException,
85
+ OperationFailedException
86
+ });
@@ -0,0 +1,5 @@
1
+ export { I as InvalidDomainDataException, a as InvalidPropertyException, O as OperationFailedException } from '../../index-YFuBgYBS.cjs';
2
+ import '../../domain-exception-BJknDTC7.cjs';
3
+ import '../symbols/index.cjs';
4
+ import '../core/index.cjs';
5
+ import '../core/types/index.cjs';
@@ -0,0 +1,5 @@
1
+ export { I as InvalidDomainDataException, a as InvalidPropertyException, O as OperationFailedException } from '../../index-CNApJ5kV.js';
2
+ import '../../domain-exception-2mxDRlhr.js';
3
+ import '../symbols/index.js';
4
+ import '../core/index.js';
5
+ import '../core/types/index.js';
@@ -0,0 +1,41 @@
1
+ import {
2
+ DomainException
3
+ } from "../../chunk-WY3PDSMZ.js";
4
+ import "../../chunk-UEZ4EF5Z.js";
5
+ import "../../chunk-N6MCTGZD.js";
6
+
7
+ // src/exceptions/domain/invalid-domain-data.exception.ts
8
+ var InvalidDomainDataException = class extends DomainException {
9
+ constructor(source, message = `Invalid data provided for the ${source} domain.`) {
10
+ super(message);
11
+ this.source = source;
12
+ this.message = message;
13
+ }
14
+ name = "Invalid Domain Data";
15
+ };
16
+
17
+ // src/exceptions/domain/operation-failed.exception.ts
18
+ var OperationFailedException = class extends DomainException {
19
+ constructor(source, message = `Operation failed in the ${source} domain.`) {
20
+ super(message);
21
+ this.source = source;
22
+ this.message = message;
23
+ }
24
+ name = "Operation Failed";
25
+ };
26
+
27
+ // src/exceptions/domain/invalid-property.exception.ts
28
+ var InvalidPropertyException = class extends DomainException {
29
+ constructor(property, source, message = `The property '${property}' in ${source} is invalid.`) {
30
+ super(message);
31
+ this.property = property;
32
+ this.source = source;
33
+ this.message = message;
34
+ }
35
+ name = "Invalid Property";
36
+ };
37
+ export {
38
+ InvalidDomainDataException,
39
+ InvalidPropertyException,
40
+ OperationFailedException
41
+ };
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/exceptions/index.ts
21
+ var exceptions_exports = {};
22
+ __export(exceptions_exports, {
23
+ InvalidEntityData: () => InvalidEntityData,
24
+ InvalidObjectValueException: () => InvalidObjectValueException,
25
+ UnknownException: () => UnknownException
26
+ });
27
+ module.exports = __toCommonJS(exceptions_exports);
28
+
29
+ // src/exceptions/symbols/exception-layer.ts
30
+ var ExceptionLayer = /* @__PURE__ */ Symbol("exception:layer");
31
+
32
+ // src/exceptions/core/core-exception.ts
33
+ var CoreException = class extends Error {
34
+ };
35
+
36
+ // src/exceptions/entity-validation.exception.ts
37
+ var InvalidEntityData = class extends CoreException {
38
+ constructor(message = "The entity validation failed.") {
39
+ super(message);
40
+ this.message = message;
41
+ }
42
+ [ExceptionLayer] = "internal";
43
+ name = "Invalid Entity Data";
44
+ source = "$internal";
45
+ };
46
+
47
+ // src/exceptions/invalid-object-value.exception.ts
48
+ var InvalidObjectValueException = class extends CoreException {
49
+ constructor(objectValueName, message = `Invalid value provided for the ${objectValueName} object value.`) {
50
+ super(message);
51
+ this.objectValueName = objectValueName;
52
+ this.message = message;
53
+ }
54
+ [ExceptionLayer] = "internal";
55
+ name = "Invalid Object Value";
56
+ source = "$internal";
57
+ };
58
+
59
+ // src/exceptions/unknown.exception.ts
60
+ var UnknownException = class extends CoreException {
61
+ constructor(message = "An unknown error has occurred.") {
62
+ super(message);
63
+ this.message = message;
64
+ }
65
+ [ExceptionLayer] = "internal";
66
+ name = "Unknown Error";
67
+ source = "$internal";
68
+ };
69
+ // Annotate the CommonJS export names for ESM import in node:
70
+ 0 && (module.exports = {
71
+ InvalidEntityData,
72
+ InvalidObjectValueException,
73
+ UnknownException
74
+ });
@@ -0,0 +1,4 @@
1
+ export { a as InvalidEntityData, b as InvalidObjectValueException, U as UnknownException } from '../index-g4_PChJX.cjs';
2
+ import './core/index.cjs';
3
+ import './symbols/index.cjs';
4
+ import './core/types/index.cjs';
@@ -0,0 +1,4 @@
1
+ export { a as InvalidEntityData, b as InvalidObjectValueException, U as UnknownException } from '../index-C4-MCapS.js';
2
+ import './core/index.js';
3
+ import './symbols/index.js';
4
+ import './core/types/index.js';
@@ -0,0 +1,45 @@
1
+ import {
2
+ CoreException
3
+ } from "../chunk-UEZ4EF5Z.js";
4
+ import {
5
+ ExceptionLayer
6
+ } from "../chunk-N6MCTGZD.js";
7
+
8
+ // src/exceptions/entity-validation.exception.ts
9
+ var InvalidEntityData = class extends CoreException {
10
+ constructor(message = "The entity validation failed.") {
11
+ super(message);
12
+ this.message = message;
13
+ }
14
+ [ExceptionLayer] = "internal";
15
+ name = "Invalid Entity Data";
16
+ source = "$internal";
17
+ };
18
+
19
+ // src/exceptions/invalid-object-value.exception.ts
20
+ var InvalidObjectValueException = class extends CoreException {
21
+ constructor(objectValueName, message = `Invalid value provided for the ${objectValueName} object value.`) {
22
+ super(message);
23
+ this.objectValueName = objectValueName;
24
+ this.message = message;
25
+ }
26
+ [ExceptionLayer] = "internal";
27
+ name = "Invalid Object Value";
28
+ source = "$internal";
29
+ };
30
+
31
+ // src/exceptions/unknown.exception.ts
32
+ var UnknownException = class extends CoreException {
33
+ constructor(message = "An unknown error has occurred.") {
34
+ super(message);
35
+ this.message = message;
36
+ }
37
+ [ExceptionLayer] = "internal";
38
+ name = "Unknown Error";
39
+ source = "$internal";
40
+ };
41
+ export {
42
+ InvalidEntityData,
43
+ InvalidObjectValueException,
44
+ UnknownException
45
+ };
@@ -0,0 +1,158 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/exceptions/infra/index.ts
21
+ var infra_exports = {};
22
+ __export(infra_exports, {
23
+ CacheUnavailableException: () => CacheUnavailableException,
24
+ ConflictException: () => ConflictException,
25
+ DatabaseUnavailableException: () => DatabaseUnavailableException,
26
+ ForeignDependencyConstraintException: () => ForeignDependencyConstraintException,
27
+ InvalidEnvironmentException: () => InvalidEnvironmentException,
28
+ MissingPluginDependencyException: () => MissingPluginDependencyException,
29
+ OperationNotAllowedException: () => OperationNotAllowedException,
30
+ ResourceNotFoundException: () => ResourceNotFoundException,
31
+ UnexpectedCacheValueException: () => UnexpectedCacheValueException
32
+ });
33
+ module.exports = __toCommonJS(infra_exports);
34
+
35
+ // src/exceptions/symbols/exception-layer.ts
36
+ var ExceptionLayer = /* @__PURE__ */ Symbol("exception:layer");
37
+
38
+ // src/exceptions/core/core-exception.ts
39
+ var CoreException = class extends Error {
40
+ };
41
+
42
+ // src/exceptions/models/domain-exception.ts
43
+ var DomainException = class extends CoreException {
44
+ [ExceptionLayer] = "domain";
45
+ };
46
+
47
+ // src/exceptions/models/infra-exception.ts
48
+ var InfraException = class extends CoreException {
49
+ [ExceptionLayer] = "infra";
50
+ };
51
+
52
+ // src/exceptions/models/application-exception.ts
53
+ var ApplicationException = class extends CoreException {
54
+ [ExceptionLayer] = "application";
55
+ };
56
+
57
+ // src/exceptions/infra/cache-unavailable.exception.ts
58
+ var CacheUnavailableException = class extends InfraException {
59
+ constructor(source, message = "The cache is currently unavailable.") {
60
+ super(message);
61
+ this.source = source;
62
+ this.message = message;
63
+ }
64
+ name = "Cache Unavailable Exception";
65
+ };
66
+
67
+ // src/exceptions/infra/conflict.exception.ts
68
+ var ConflictException = class extends InfraException {
69
+ constructor(source, message = "A conflict occurred in the database.") {
70
+ super(message);
71
+ this.source = source;
72
+ this.message = message;
73
+ }
74
+ name = "Conflict Exception";
75
+ };
76
+
77
+ // src/exceptions/infra/operation-not-allowed.exception.ts
78
+ var OperationNotAllowedException = class extends InfraException {
79
+ constructor(source, message = "The operation is not allowed.") {
80
+ super(message);
81
+ this.source = source;
82
+ this.message = message;
83
+ }
84
+ name = "Operation Not Allowed Exception";
85
+ };
86
+
87
+ // src/exceptions/infra/database-unavailable.exception.ts
88
+ var DatabaseUnavailableException = class extends InfraException {
89
+ constructor(source, message = "The database is currently unavailable.") {
90
+ super(message);
91
+ this.source = source;
92
+ this.message = message;
93
+ }
94
+ name = "Database Unavailable Exception";
95
+ };
96
+
97
+ // src/exceptions/infra/resource-not-found.exception.ts
98
+ var ResourceNotFoundException = class extends InfraException {
99
+ constructor(source, message = "The resource was not found.") {
100
+ super(message);
101
+ this.source = source;
102
+ this.message = message;
103
+ }
104
+ name = "Resource Not Found Exception";
105
+ };
106
+
107
+ // src/exceptions/infra/foreign-dependency-constraint.exception.ts
108
+ var ForeignDependencyConstraintException = class extends InfraException {
109
+ constructor(source, message = `It was not possible to remove the ${source} resource due to its usefulness in other domains.`) {
110
+ super(message);
111
+ this.source = source;
112
+ this.message = message;
113
+ }
114
+ name = "Foreign Dependency Constraint Exception";
115
+ };
116
+
117
+ // src/exceptions/infra/unexpected-cache-value.exception.ts
118
+ var UnexpectedCacheValueException = class extends InfraException {
119
+ constructor(key, source, message = `The value from cache for key '${key}' was unexpected.`) {
120
+ super(message);
121
+ this.key = key;
122
+ this.source = source;
123
+ this.message = message;
124
+ }
125
+ name = "Unexpected Cache Value Exception";
126
+ };
127
+
128
+ // src/exceptions/infra/missing-plugin-dependency.exception.ts
129
+ var MissingPluginDependencyException = class extends InfraException {
130
+ constructor(source, message = `The dependencies of the "${source}" plugin are not satisfied.`) {
131
+ super(message);
132
+ this.source = source;
133
+ this.message = message;
134
+ }
135
+ name = "Missing Plugin Dependency Exception";
136
+ };
137
+
138
+ // src/exceptions/infra/invalid-environment.exception.ts
139
+ var InvalidEnvironmentException = class extends InfraException {
140
+ constructor(source, message = "The required environment variables are invalid or missing.") {
141
+ super(message);
142
+ this.source = source;
143
+ this.message = message;
144
+ }
145
+ name = "Invalid Environment Exception";
146
+ };
147
+ // Annotate the CommonJS export names for ESM import in node:
148
+ 0 && (module.exports = {
149
+ CacheUnavailableException,
150
+ ConflictException,
151
+ DatabaseUnavailableException,
152
+ ForeignDependencyConstraintException,
153
+ InvalidEnvironmentException,
154
+ MissingPluginDependencyException,
155
+ OperationNotAllowedException,
156
+ ResourceNotFoundException,
157
+ UnexpectedCacheValueException
158
+ });
@@ -0,0 +1,5 @@
1
+ export { C as CacheUnavailableException, a as ConflictException, D as DatabaseUnavailableException, F as ForeignDependencyConstraintException, b as InvalidEnvironmentException, M as MissingPluginDependencyException, O as OperationNotAllowedException, R as ResourceNotFoundException, U as UnexpectedCacheValueException } from '../../index-DaS_UsEv.cjs';
2
+ import '../../infra-exception-Dm1D9yrN.cjs';
3
+ import '../symbols/index.cjs';
4
+ import '../core/index.cjs';
5
+ import '../core/types/index.cjs';
@@ -0,0 +1,5 @@
1
+ export { C as CacheUnavailableException, a as ConflictException, D as DatabaseUnavailableException, F as ForeignDependencyConstraintException, b as InvalidEnvironmentException, M as MissingPluginDependencyException, O as OperationNotAllowedException, R as ResourceNotFoundException, U as UnexpectedCacheValueException } from '../../index-0ZqtQ0BA.js';
2
+ import '../../infra-exception-1PUIDeP4.js';
3
+ import '../symbols/index.js';
4
+ import '../core/index.js';
5
+ import '../core/types/index.js';
@@ -0,0 +1,107 @@
1
+ import {
2
+ InfraException
3
+ } from "../../chunk-WY3PDSMZ.js";
4
+ import "../../chunk-UEZ4EF5Z.js";
5
+ import "../../chunk-N6MCTGZD.js";
6
+
7
+ // src/exceptions/infra/cache-unavailable.exception.ts
8
+ var CacheUnavailableException = class extends InfraException {
9
+ constructor(source, message = "The cache is currently unavailable.") {
10
+ super(message);
11
+ this.source = source;
12
+ this.message = message;
13
+ }
14
+ name = "Cache Unavailable Exception";
15
+ };
16
+
17
+ // src/exceptions/infra/conflict.exception.ts
18
+ var ConflictException = class extends InfraException {
19
+ constructor(source, message = "A conflict occurred in the database.") {
20
+ super(message);
21
+ this.source = source;
22
+ this.message = message;
23
+ }
24
+ name = "Conflict Exception";
25
+ };
26
+
27
+ // src/exceptions/infra/operation-not-allowed.exception.ts
28
+ var OperationNotAllowedException = class extends InfraException {
29
+ constructor(source, message = "The operation is not allowed.") {
30
+ super(message);
31
+ this.source = source;
32
+ this.message = message;
33
+ }
34
+ name = "Operation Not Allowed Exception";
35
+ };
36
+
37
+ // src/exceptions/infra/database-unavailable.exception.ts
38
+ var DatabaseUnavailableException = class extends InfraException {
39
+ constructor(source, message = "The database is currently unavailable.") {
40
+ super(message);
41
+ this.source = source;
42
+ this.message = message;
43
+ }
44
+ name = "Database Unavailable Exception";
45
+ };
46
+
47
+ // src/exceptions/infra/resource-not-found.exception.ts
48
+ var ResourceNotFoundException = class extends InfraException {
49
+ constructor(source, message = "The resource was not found.") {
50
+ super(message);
51
+ this.source = source;
52
+ this.message = message;
53
+ }
54
+ name = "Resource Not Found Exception";
55
+ };
56
+
57
+ // src/exceptions/infra/foreign-dependency-constraint.exception.ts
58
+ var ForeignDependencyConstraintException = class extends InfraException {
59
+ constructor(source, message = `It was not possible to remove the ${source} resource due to its usefulness in other domains.`) {
60
+ super(message);
61
+ this.source = source;
62
+ this.message = message;
63
+ }
64
+ name = "Foreign Dependency Constraint Exception";
65
+ };
66
+
67
+ // src/exceptions/infra/unexpected-cache-value.exception.ts
68
+ var UnexpectedCacheValueException = class extends InfraException {
69
+ constructor(key, source, message = `The value from cache for key '${key}' was unexpected.`) {
70
+ super(message);
71
+ this.key = key;
72
+ this.source = source;
73
+ this.message = message;
74
+ }
75
+ name = "Unexpected Cache Value Exception";
76
+ };
77
+
78
+ // src/exceptions/infra/missing-plugin-dependency.exception.ts
79
+ var MissingPluginDependencyException = class extends InfraException {
80
+ constructor(source, message = `The dependencies of the "${source}" plugin are not satisfied.`) {
81
+ super(message);
82
+ this.source = source;
83
+ this.message = message;
84
+ }
85
+ name = "Missing Plugin Dependency Exception";
86
+ };
87
+
88
+ // src/exceptions/infra/invalid-environment.exception.ts
89
+ var InvalidEnvironmentException = class extends InfraException {
90
+ constructor(source, message = "The required environment variables are invalid or missing.") {
91
+ super(message);
92
+ this.source = source;
93
+ this.message = message;
94
+ }
95
+ name = "Invalid Environment Exception";
96
+ };
97
+ export {
98
+ CacheUnavailableException,
99
+ ConflictException,
100
+ DatabaseUnavailableException,
101
+ ForeignDependencyConstraintException,
102
+ InvalidEnvironmentException,
103
+ MissingPluginDependencyException,
104
+ OperationNotAllowedException,
105
+ ResourceNotFoundException,
106
+ UnexpectedCacheValueException
107
+ };
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/exceptions/models/index.ts
21
+ var models_exports = {};
22
+ __export(models_exports, {
23
+ ApplicationException: () => ApplicationException,
24
+ DomainException: () => DomainException,
25
+ InfraException: () => InfraException
26
+ });
27
+ module.exports = __toCommonJS(models_exports);
28
+
29
+ // src/exceptions/symbols/exception-layer.ts
30
+ var ExceptionLayer = /* @__PURE__ */ Symbol("exception:layer");
31
+
32
+ // src/exceptions/core/core-exception.ts
33
+ var CoreException = class extends Error {
34
+ };
35
+
36
+ // src/exceptions/models/domain-exception.ts
37
+ var DomainException = class extends CoreException {
38
+ [ExceptionLayer] = "domain";
39
+ };
40
+
41
+ // src/exceptions/models/infra-exception.ts
42
+ var InfraException = class extends CoreException {
43
+ [ExceptionLayer] = "infra";
44
+ };
45
+
46
+ // src/exceptions/models/application-exception.ts
47
+ var ApplicationException = class extends CoreException {
48
+ [ExceptionLayer] = "application";
49
+ };
50
+ // Annotate the CommonJS export names for ESM import in node:
51
+ 0 && (module.exports = {
52
+ ApplicationException,
53
+ DomainException,
54
+ InfraException
55
+ });
@@ -0,0 +1,6 @@
1
+ export { D as DomainException } from '../../domain-exception-BJknDTC7.cjs';
2
+ export { I as InfraException } from '../../infra-exception-Dm1D9yrN.cjs';
3
+ export { A as ApplicationException } from '../../application-exception-Ck-CRA9W.cjs';
4
+ import '../symbols/index.cjs';
5
+ import '../core/index.cjs';
6
+ import '../core/types/index.cjs';
@@ -0,0 +1,6 @@
1
+ export { D as DomainException } from '../../domain-exception-2mxDRlhr.js';
2
+ export { I as InfraException } from '../../infra-exception-1PUIDeP4.js';
3
+ export { A as ApplicationException } from '../../application-exception-mi3iXk8r.js';
4
+ import '../symbols/index.js';
5
+ import '../core/index.js';
6
+ import '../core/types/index.js';
@@ -0,0 +1,12 @@
1
+ import {
2
+ ApplicationException,
3
+ DomainException,
4
+ InfraException
5
+ } from "../../chunk-WY3PDSMZ.js";
6
+ import "../../chunk-UEZ4EF5Z.js";
7
+ import "../../chunk-N6MCTGZD.js";
8
+ export {
9
+ ApplicationException,
10
+ DomainException,
11
+ InfraException
12
+ };
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/exceptions/symbols/index.ts
21
+ var symbols_exports = {};
22
+ __export(symbols_exports, {
23
+ ExceptionLayer: () => ExceptionLayer
24
+ });
25
+ module.exports = __toCommonJS(symbols_exports);
26
+
27
+ // src/exceptions/symbols/exception-layer.ts
28
+ var ExceptionLayer = /* @__PURE__ */ Symbol("exception:layer");
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ ExceptionLayer
32
+ });
@@ -0,0 +1,3 @@
1
+ declare const ExceptionLayer: unique symbol;
2
+
3
+ export { ExceptionLayer };