@atlantjs/arch 15.4.2 → 15.5.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/@tool-box/tests/builders/failures/dummies/failure.dummy.d.ts +1 -0
- package/@tool-box/tests/builders/failures/dummies/failure.dummy.js +6 -0
- package/@tool-box/tests/builders/failures/failure.builder.js +1 -5
- package/@tool-box/tests/builders/metadata/metadata-uv.builder.d.ts +6 -0
- package/@tool-box/tests/builders/metadata/metadata-uv.builder.js +18 -0
- package/biome.json +14 -5
- package/index.d.ts +57 -56
- package/index.js +144 -142
- package/package.json +2 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/@tool-box/tests/create-fake-command.d.ts +0 -9
- package/@tool-box/tests/create-fake-command.js +0 -26
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Return } from "../utils/ducts/return-type";
|
|
2
|
-
import { FailureAbstract } from "../../objects/failure/edges/failure.abstract";
|
|
3
|
-
export declare class CreateFakeCommand {
|
|
4
|
-
private _response;
|
|
5
|
-
static new<UsecaseStub>(): UsecaseStub & CreateFakeCommand;
|
|
6
|
-
protected execute(): Promise<Return<unknown, unknown>>;
|
|
7
|
-
withSuccess(response: unknown): this;
|
|
8
|
-
withFailure(response?: FailureAbstract): this;
|
|
9
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CreateFakeCommand = void 0;
|
|
4
|
-
const failure_dummy_1 = require("./builders/failures/dummies/failure.dummy");
|
|
5
|
-
const failure_builder_1 = require("./builders/failures/failure.builder");
|
|
6
|
-
const return_type_1 = require("../utils/ducts/return-type");
|
|
7
|
-
class CreateFakeCommand {
|
|
8
|
-
static new() {
|
|
9
|
-
const instance = new CreateFakeCommand();
|
|
10
|
-
return instance;
|
|
11
|
-
}
|
|
12
|
-
async execute() {
|
|
13
|
-
if (this._response.hasFailure())
|
|
14
|
-
return (0, return_type_1.Failure)(this._response.unwrapFail());
|
|
15
|
-
return (0, return_type_1.Success)(this._response.unwrap());
|
|
16
|
-
}
|
|
17
|
-
withSuccess(response) {
|
|
18
|
-
this._response = (0, return_type_1.Success)(response);
|
|
19
|
-
return this;
|
|
20
|
-
}
|
|
21
|
-
withFailure(response) {
|
|
22
|
-
this._response = (0, return_type_1.Failure)(response ?? new failure_builder_1.FailureBuilder(failure_dummy_1.FailureDummy).build());
|
|
23
|
-
return this;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.CreateFakeCommand = CreateFakeCommand;
|