@roastery/terroir 0.0.1 → 0.0.3
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/LICENSE +21 -0
- package/README.md +226 -0
- package/dist/application-exception-Ck-CRA9W.d.cts +9 -0
- package/dist/application-exception-mi3iXk8r.d.ts +9 -0
- package/dist/chunk-EBPUXUYY.js +28 -0
- package/dist/chunk-N6MCTGZD.js +6 -0
- package/dist/chunk-UEZ4EF5Z.js +7 -0
- package/dist/chunk-WY3PDSMZ.js +27 -0
- package/dist/chunk-YBMFDZEW.js +53 -0
- package/dist/domain-exception-2mxDRlhr.d.ts +9 -0
- package/dist/domain-exception-BJknDTC7.d.cts +9 -0
- package/dist/exceptions/application/index.cjs +133 -0
- package/dist/exceptions/application/index.d.cts +6 -0
- package/dist/exceptions/application/index.d.ts +6 -0
- package/dist/exceptions/application/index.js +68 -0
- package/dist/exceptions/application/jwt/index.cjs +73 -0
- package/dist/exceptions/application/jwt/index.d.cts +20 -0
- package/dist/exceptions/application/jwt/index.d.ts +20 -0
- package/dist/exceptions/application/jwt/index.js +11 -0
- package/dist/{index.cjs → exceptions/core/index.cjs} +9 -8
- package/dist/exceptions/core/index.d.cts +11 -0
- package/dist/exceptions/core/index.d.ts +11 -0
- package/dist/exceptions/core/index.js +7 -0
- package/dist/exceptions/core/types/index.cjs +18 -0
- package/dist/exceptions/core/types/index.d.cts +3 -0
- package/dist/exceptions/core/types/index.d.ts +3 -0
- package/dist/exceptions/core/types/index.js +0 -0
- package/dist/exceptions/domain/index.cjs +86 -0
- package/dist/exceptions/domain/index.d.cts +5 -0
- package/dist/exceptions/domain/index.d.ts +5 -0
- package/dist/exceptions/domain/index.js +41 -0
- package/dist/exceptions/index.cjs +74 -0
- package/dist/exceptions/index.d.cts +4 -0
- package/dist/exceptions/index.d.ts +4 -0
- package/dist/exceptions/index.js +45 -0
- package/dist/exceptions/infra/index.cjs +158 -0
- package/dist/exceptions/infra/index.d.cts +5 -0
- package/dist/exceptions/infra/index.d.ts +5 -0
- package/dist/exceptions/infra/index.js +107 -0
- package/dist/exceptions/models/index.cjs +55 -0
- package/dist/exceptions/models/index.d.cts +6 -0
- package/dist/exceptions/models/index.d.ts +6 -0
- package/dist/exceptions/models/index.js +12 -0
- package/dist/exceptions/symbols/index.cjs +32 -0
- package/dist/exceptions/symbols/index.d.cts +3 -0
- package/dist/exceptions/symbols/index.d.ts +3 -0
- package/dist/exceptions/symbols/index.js +6 -0
- package/dist/exceptions/types/index.cjs +18 -0
- package/dist/exceptions/types/index.d.cts +30 -0
- package/dist/exceptions/types/index.d.ts +30 -0
- package/dist/exceptions/types/index.js +0 -0
- package/dist/index-0ZqtQ0BA.d.ts +89 -0
- package/dist/index-B_h1N1CO.d.cts +55 -0
- package/dist/index-C4-MCapS.d.ts +40 -0
- package/dist/index-CNApJ5kV.d.ts +35 -0
- package/dist/index-DaS_UsEv.d.cts +89 -0
- package/dist/index-E6KvVxtW.d.ts +55 -0
- package/dist/index-YFuBgYBS.d.cts +35 -0
- package/dist/index-g4_PChJX.d.cts +40 -0
- package/dist/infra-exception-1PUIDeP4.d.ts +9 -0
- package/dist/infra-exception-Dm1D9yrN.d.cts +9 -0
- package/dist/schema/formats/index.cjs +55 -0
- package/dist/schema/formats/index.d.cts +2 -0
- package/dist/schema/formats/index.d.ts +2 -0
- package/dist/schema/formats/index.js +1 -0
- package/dist/schema/index.cjs +193 -0
- package/dist/schema/index.d.cts +19 -0
- package/dist/schema/index.d.ts +19 -0
- package/dist/schema/index.js +113 -0
- package/package.json +61 -57
- package/dist/index.d.cts +0 -3
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -5
|
@@ -0,0 +1,73 @@
|
|
|
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/application/jwt/index.ts
|
|
21
|
+
var jwt_exports = {};
|
|
22
|
+
__export(jwt_exports, {
|
|
23
|
+
InvalidJWTException: () => InvalidJWTException,
|
|
24
|
+
UnableToSignPayloadException: () => UnableToSignPayloadException
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(jwt_exports);
|
|
27
|
+
|
|
28
|
+
// src/exceptions/symbols/exception-layer.ts
|
|
29
|
+
var ExceptionLayer = /* @__PURE__ */ Symbol("exception:layer");
|
|
30
|
+
|
|
31
|
+
// src/exceptions/core/core-exception.ts
|
|
32
|
+
var CoreException = class extends Error {
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// src/exceptions/models/domain-exception.ts
|
|
36
|
+
var DomainException = class extends CoreException {
|
|
37
|
+
[ExceptionLayer] = "domain";
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// src/exceptions/models/infra-exception.ts
|
|
41
|
+
var InfraException = class extends CoreException {
|
|
42
|
+
[ExceptionLayer] = "infra";
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// src/exceptions/models/application-exception.ts
|
|
46
|
+
var ApplicationException = class extends CoreException {
|
|
47
|
+
[ExceptionLayer] = "application";
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// src/exceptions/application/jwt/invalid-jwt.exception.ts
|
|
51
|
+
var InvalidJWTException = class extends ApplicationException {
|
|
52
|
+
constructor(source, message = `Invalid JWT for the ${source} application.`) {
|
|
53
|
+
super(message);
|
|
54
|
+
this.source = source;
|
|
55
|
+
this.message = message;
|
|
56
|
+
}
|
|
57
|
+
name = "Invalid JWT";
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// src/exceptions/application/jwt/unable-to-sign-payload.exception.ts
|
|
61
|
+
var UnableToSignPayloadException = class extends ApplicationException {
|
|
62
|
+
constructor(source, message = `Unable to sign payload for the ${source} application.`) {
|
|
63
|
+
super(message);
|
|
64
|
+
this.source = source;
|
|
65
|
+
this.message = message;
|
|
66
|
+
}
|
|
67
|
+
name = "Unable to Sign Payload";
|
|
68
|
+
};
|
|
69
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
70
|
+
0 && (module.exports = {
|
|
71
|
+
InvalidJWTException,
|
|
72
|
+
UnableToSignPayloadException
|
|
73
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { A as ApplicationException } from '../../../application-exception-Ck-CRA9W.cjs';
|
|
2
|
+
import '../../symbols/index.cjs';
|
|
3
|
+
import '../../core/index.cjs';
|
|
4
|
+
import '../../core/types/index.cjs';
|
|
5
|
+
|
|
6
|
+
declare class InvalidJWTException extends ApplicationException {
|
|
7
|
+
source: string;
|
|
8
|
+
message: string;
|
|
9
|
+
readonly name = "Invalid JWT";
|
|
10
|
+
constructor(source: string, message?: string);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare class UnableToSignPayloadException extends ApplicationException {
|
|
14
|
+
source: string;
|
|
15
|
+
message: string;
|
|
16
|
+
readonly name = "Unable to Sign Payload";
|
|
17
|
+
constructor(source: string, message?: string);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { InvalidJWTException, UnableToSignPayloadException };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { A as ApplicationException } from '../../../application-exception-mi3iXk8r.js';
|
|
2
|
+
import '../../symbols/index.js';
|
|
3
|
+
import '../../core/index.js';
|
|
4
|
+
import '../../core/types/index.js';
|
|
5
|
+
|
|
6
|
+
declare class InvalidJWTException extends ApplicationException {
|
|
7
|
+
source: string;
|
|
8
|
+
message: string;
|
|
9
|
+
readonly name = "Invalid JWT";
|
|
10
|
+
constructor(source: string, message?: string);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare class UnableToSignPayloadException extends ApplicationException {
|
|
14
|
+
source: string;
|
|
15
|
+
message: string;
|
|
16
|
+
readonly name = "Unable to Sign Payload";
|
|
17
|
+
constructor(source: string, message?: string);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { InvalidJWTException, UnableToSignPayloadException };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
InvalidJWTException,
|
|
3
|
+
UnableToSignPayloadException
|
|
4
|
+
} from "../../../chunk-EBPUXUYY.js";
|
|
5
|
+
import "../../../chunk-WY3PDSMZ.js";
|
|
6
|
+
import "../../../chunk-UEZ4EF5Z.js";
|
|
7
|
+
import "../../../chunk-N6MCTGZD.js";
|
|
8
|
+
export {
|
|
9
|
+
InvalidJWTException,
|
|
10
|
+
UnableToSignPayloadException
|
|
11
|
+
};
|
|
@@ -17,16 +17,17 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
|
-
// src/index.ts
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
23
|
-
|
|
20
|
+
// src/exceptions/core/index.ts
|
|
21
|
+
var core_exports = {};
|
|
22
|
+
__export(core_exports, {
|
|
23
|
+
CoreException: () => CoreException
|
|
24
24
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
25
|
+
module.exports = __toCommonJS(core_exports);
|
|
26
26
|
|
|
27
|
-
// src/
|
|
28
|
-
var
|
|
27
|
+
// src/exceptions/core/core-exception.ts
|
|
28
|
+
var CoreException = class extends Error {
|
|
29
|
+
};
|
|
29
30
|
// Annotate the CommonJS export names for ESM import in node:
|
|
30
31
|
0 && (module.exports = {
|
|
31
|
-
|
|
32
|
+
CoreException
|
|
32
33
|
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ExceptionLayer } from '../symbols/index.cjs';
|
|
2
|
+
import { CoreExceptionType } from './types/index.cjs';
|
|
3
|
+
|
|
4
|
+
declare abstract class CoreException extends Error {
|
|
5
|
+
abstract readonly [ExceptionLayer]: CoreExceptionType;
|
|
6
|
+
abstract readonly name: string;
|
|
7
|
+
abstract readonly message: string;
|
|
8
|
+
abstract readonly source: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { CoreException, CoreExceptionType };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ExceptionLayer } from '../symbols/index.js';
|
|
2
|
+
import { CoreExceptionType } from './types/index.js';
|
|
3
|
+
|
|
4
|
+
declare abstract class CoreException extends Error {
|
|
5
|
+
abstract readonly [ExceptionLayer]: CoreExceptionType;
|
|
6
|
+
abstract readonly name: string;
|
|
7
|
+
abstract readonly message: string;
|
|
8
|
+
abstract readonly source: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { CoreException, CoreExceptionType };
|
|
@@ -0,0 +1,18 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/exceptions/core/types/index.ts
|
|
17
|
+
var types_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(types_exports);
|
|
File without changes
|
|
@@ -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,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';
|