@domain-first/types 1.0.0 → 1.0.1
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/dist/errors/index.d.ts
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -30,7 +30,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30
30
|
__webpack_require__.d(__webpack_exports__, {
|
|
31
31
|
AsyncSchemaInSyncParsingError: ()=>AsyncSchemaInSyncParsingError,
|
|
32
32
|
InvalidDataParsingError: ()=>InvalidDataParsingError,
|
|
33
|
-
StructuredCloneNotFoundError: ()=>StructuredCloneNotFoundError,
|
|
34
33
|
defineValueObject: ()=>defineValueObject
|
|
35
34
|
});
|
|
36
35
|
const errors_namespaceObject = require("@domain-first/errors");
|
|
@@ -40,9 +39,6 @@ const AsyncSchemaInSyncParsingError = (0, errors_namespaceObject.defineErrorClas
|
|
|
40
39
|
const InvalidDataParsingError = (0, errors_namespaceObject.defineErrorClass)({
|
|
41
40
|
code: 'INVALID_DATA_PARSING'
|
|
42
41
|
});
|
|
43
|
-
const StructuredCloneNotFoundError = (0, errors_namespaceObject.defineErrorClass)({
|
|
44
|
-
code: 'STRUCTURED_CLONE_NOT_FOUND'
|
|
45
|
-
});
|
|
46
42
|
function parseSync(schema, value) {
|
|
47
43
|
const result = schema['~standard'].validate(value);
|
|
48
44
|
if (result instanceof Promise) throw new AsyncSchemaInSyncParsingError({
|
|
@@ -82,12 +78,10 @@ const defineValueObject = (schema)=>{
|
|
|
82
78
|
};
|
|
83
79
|
exports.AsyncSchemaInSyncParsingError = __webpack_exports__.AsyncSchemaInSyncParsingError;
|
|
84
80
|
exports.InvalidDataParsingError = __webpack_exports__.InvalidDataParsingError;
|
|
85
|
-
exports.StructuredCloneNotFoundError = __webpack_exports__.StructuredCloneNotFoundError;
|
|
86
81
|
exports.defineValueObject = __webpack_exports__.defineValueObject;
|
|
87
82
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
88
83
|
"AsyncSchemaInSyncParsingError",
|
|
89
84
|
"InvalidDataParsingError",
|
|
90
|
-
"StructuredCloneNotFoundError",
|
|
91
85
|
"defineValueObject"
|
|
92
86
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
93
87
|
Object.defineProperty(exports, '__esModule', {
|
package/dist/index.js
CHANGED
|
@@ -5,9 +5,6 @@ const AsyncSchemaInSyncParsingError = defineErrorClass({
|
|
|
5
5
|
const InvalidDataParsingError = defineErrorClass({
|
|
6
6
|
code: 'INVALID_DATA_PARSING'
|
|
7
7
|
});
|
|
8
|
-
const StructuredCloneNotFoundError = defineErrorClass({
|
|
9
|
-
code: 'STRUCTURED_CLONE_NOT_FOUND'
|
|
10
|
-
});
|
|
11
8
|
function parseSync(schema, value) {
|
|
12
9
|
const result = schema['~standard'].validate(value);
|
|
13
10
|
if (result instanceof Promise) throw new AsyncSchemaInSyncParsingError({
|
|
@@ -45,4 +42,4 @@ const defineValueObject = (schema)=>{
|
|
|
45
42
|
}
|
|
46
43
|
return ValueObject;
|
|
47
44
|
};
|
|
48
|
-
export { AsyncSchemaInSyncParsingError, InvalidDataParsingError,
|
|
45
|
+
export { AsyncSchemaInSyncParsingError, InvalidDataParsingError, defineValueObject };
|
package/package.json
CHANGED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export declare const StructuredCloneNotFoundError: {
|
|
2
|
-
new (details: Record<string, any>, options?: ErrorOptions): {
|
|
3
|
-
readonly metadata: import("@domain-first/errors").PlainPrimitivesObject & {
|
|
4
|
-
code: string;
|
|
5
|
-
};
|
|
6
|
-
readonly details: Record<string, any>;
|
|
7
|
-
readonly formattedDetails: import("@domain-first/errors").PlainPrimitivesObject;
|
|
8
|
-
readonly serialized: import("@domain-first/errors").TransportedError<import("@domain-first/errors").PlainPrimitivesObject & {
|
|
9
|
-
code: string;
|
|
10
|
-
}>;
|
|
11
|
-
readonly serializedWithNativeData: import("@domain-first/errors").TransportedErrorWithNativeData<import("@domain-first/errors").PlainPrimitivesObject & {
|
|
12
|
-
code: string;
|
|
13
|
-
}>;
|
|
14
|
-
readonly serializedFull: import("@domain-first/errors").FullTransportedError<Record<string, any>, import("@domain-first/errors").PlainPrimitivesObject & {
|
|
15
|
-
code: string;
|
|
16
|
-
}>;
|
|
17
|
-
name: string;
|
|
18
|
-
message: string;
|
|
19
|
-
stack?: string;
|
|
20
|
-
cause?: unknown;
|
|
21
|
-
};
|
|
22
|
-
matches: (target: unknown) => boolean | null;
|
|
23
|
-
is: (target: unknown) => target is {
|
|
24
|
-
readonly metadata: import("@domain-first/errors").PlainPrimitivesObject & {
|
|
25
|
-
code: string;
|
|
26
|
-
};
|
|
27
|
-
readonly details: Record<string, any>;
|
|
28
|
-
get formattedDetails(): import("@domain-first/errors").PlainPrimitivesObject;
|
|
29
|
-
get serialized(): import("@domain-first/errors").TransportedError<import("@domain-first/errors").PlainPrimitivesObject & {
|
|
30
|
-
code: string;
|
|
31
|
-
}>;
|
|
32
|
-
get serializedWithNativeData(): import("@domain-first/errors").TransportedErrorWithNativeData<import("@domain-first/errors").PlainPrimitivesObject & {
|
|
33
|
-
code: string;
|
|
34
|
-
}>;
|
|
35
|
-
get serializedFull(): import("@domain-first/errors").FullTransportedError<Record<string, any>, import("@domain-first/errors").PlainPrimitivesObject & {
|
|
36
|
-
code: string;
|
|
37
|
-
}>;
|
|
38
|
-
name: string;
|
|
39
|
-
message: string;
|
|
40
|
-
stack?: string;
|
|
41
|
-
cause?: unknown;
|
|
42
|
-
};
|
|
43
|
-
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
44
|
-
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
45
|
-
stackTraceLimit: number;
|
|
46
|
-
};
|