@atlantjs/arch 2.6.4 → 3.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/@tool-box/tests/builders/failures/dummies/failure.dummy.d.ts +3 -0
- package/@tool-box/tests/builders/failures/dummies/failure.dummy.js +7 -0
- package/{tests/builders/errors → @tool-box/tests/builders/failures}/failure.builder.js +2 -2
- package/@tool-box/tests/builders/generic/dummies/uuid.dummy.d.ts +3 -0
- package/{tests → @tool-box/tests}/builders/generic/dummies/uuid.dummy.js +1 -1
- package/{tests → @tool-box/tests}/create-fake-usecase.d.ts +1 -1
- package/{tests → @tool-box/tests}/create-fake-usecase.js +3 -3
- package/@tool-box/tests/faker/faker.d.ts +0 -0
- package/@tool-box/tests/faker/faker.js +1 -0
- package/@tool-box/utils/datatypes/boolean-utils.d.ts +8 -0
- package/@tool-box/utils/datatypes/boolean-utils.js +19 -0
- package/{utils → @tool-box/utils}/ducts/common.d.ts +2 -2
- package/{utils → @tool-box/utils}/ducts/common.js +3 -3
- package/{utils → @tool-box/utils}/ducts/optional-type.d.ts +5 -5
- package/{utils → @tool-box/utils}/ducts/optional-type.js +11 -11
- package/{utils → @tool-box/utils}/ducts/return-type.d.ts +3 -3
- package/{utils → @tool-box/utils}/ducts/return-type.js +14 -14
- package/{utils → @tool-box/utils}/http-client/http-client-response.d.ts +2 -2
- package/{utils → @tool-box/utils}/http-client/http-client-response.get-header.failure.d.ts +1 -1
- package/{utils → @tool-box/utils}/http-client/http-client-response.get-header.failure.js +1 -1
- package/{utils → @tool-box/utils}/http-client/http-client-response.js +2 -2
- package/@tool-box/utils/randoms/random-value.d.ts +5 -0
- package/@tool-box/utils/randoms/random-value.js +25 -0
- package/arch/modules/application/databases/database.factory.abstract.d.ts +3 -0
- package/arch/modules/application/databases/database.helper.abstract.d.ts +4 -0
- package/arch/modules/application/databases/database.helper.abstract.js +6 -0
- package/{objects/arch/application/errors → arch/modules/application/failures}/failure.abstract.d.ts +1 -1
- package/{objects/arch/application/errors → arch/modules/application/failures}/failure.abstract.js +3 -3
- package/arch/modules/application/failures/unknown-failure.d.ts +15 -0
- package/{objects/arch/application/errors/unknown-application-error.js → arch/modules/application/failures/unknown-failure.js} +3 -3
- package/arch/modules/application/injections.abstract.d.ts +11 -0
- package/arch/modules/application/injections.abstract.js +45 -0
- package/arch/modules/application/injections.abstract.type.d.ts +17 -0
- package/arch/modules/domain/entities/$array.abstract.d.ts +2 -0
- package/arch/modules/domain/entities/$array.abstract.js +6 -0
- package/arch/modules/domain/entities/$date.abstract.d.ts +2 -0
- package/{tests/faker/faker.js → arch/modules/domain/entities/$date.abstract.js} +3 -3
- package/{objects/datatypes → arch/modules/domain}/entities/$number.abstract.js +1 -1
- package/arch/modules/domain/entities/$object.abstract.d.ts +2 -0
- package/arch/modules/domain/entities/$object.abstract.js +6 -0
- package/arch/modules/domain/entities/solid.abstract.d.ts +4 -0
- package/arch/modules/domain/entities/solid.abstract.js +2 -0
- package/{objects/arch/domain/middleware-handler.absctract.d.ts → arch/modules/domain/middlewares/middleware.handler.abstract.d.ts} +1 -1
- package/arch/modules/domain/providers/provider.abstract.d.ts +2 -0
- package/arch/modules/domain/providers/provider.abstract.js +6 -0
- package/arch/modules/domain/solid.abstract.d.ts +4 -0
- package/arch/modules/domain/solid.abstract.js +2 -0
- package/{objects/arch/domain → arch/modules/domain/usecases}/usecase.abstract.d.ts +1 -1
- package/{objects/arch/infrastructure → arch/modules/infrastructure/controllers}/controller.abstract.d.ts +3 -3
- package/{objects/arch/infrastructure → arch/modules/infrastructure/controllers}/controller.abstract.js +2 -2
- package/arch/modules/infrastructure/controllers/payloads/payload.abstract.d.ts +2 -0
- package/arch/modules/infrastructure/controllers/payloads/payload.abstract.js +6 -0
- package/arch/modules/infrastructure/controllers/payloads/validators/validator.abstract.d.ts +2 -0
- package/arch/modules/infrastructure/controllers/payloads/validators/validator.abstract.js +6 -0
- package/arch/modules/infrastructure/controllers/responses/response.abstract.d.ts +4 -0
- package/{objects/arch/infrastructure → arch/modules/infrastructure/repositories/entities}/entity.abstract.d.ts +1 -1
- package/index.d.ts +42 -32
- package/index.js +72 -49
- package/package.json +6 -1
- package/setup/dependency-injections/container.d.ts +11 -0
- package/setup/dependency-injections/container.js +14 -0
- package/setup/dependency-injections/default-container.d.ts +4 -0
- package/setup/dependency-injections/default-container.js +20 -0
- package/setup/dependency-injections/di-container.abstract.d.ts +30 -0
- package/setup/dependency-injections/di-container.abstract.js +45 -0
- package/setup/dependency-injections/di-container.d.ts +3 -0
- package/setup/dependency-injections/di-container.js +6 -0
- package/setup/dependency-injections/index.d.ts +3 -0
- package/setup/dependency-injections/index.js +15 -0
- package/setup/env/env-vars.d.ts +7 -0
- package/setup/env/env-vars.js +28 -0
- package/setup/env/load-envs.d.ts +1 -0
- package/setup/env/load-envs.js +30 -0
- package/setup/index.d.ts +5 -0
- package/setup/index.js +37 -0
- package/setup/server/body-parser-middleware.d.ts +9 -0
- package/setup/server/body-parser-middleware.js +31 -0
- package/setup/server/cors-middleware.d.ts +10 -0
- package/setup/server/cors-middleware.js +38 -0
- package/setup/server/default-error-handler-middleware.d.ts +8 -0
- package/setup/server/default-error-handler-middleware.js +45 -0
- package/setup/server/server.d.ts +6 -0
- package/setup/server/server.js +61 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/configs/env/env-vars.d.ts +0 -3
- package/configs/env/env-vars.js +0 -20
- package/external-files/biome.json +0 -47
- package/external-files/typescript/tsconfig-backend.json +0 -3
- package/external-files/typescript/tsconfig-default.json +0 -45
- package/external-files/typescript/tsconfig-frontend.json +0 -3
- package/external-files/typescript/tsconfig-lib.json +0 -6
- package/external-files/typescript/tsconfig-mobile.json +0 -3
- package/objects/arch/application/errors/unknown-application-error.d.ts +0 -15
- package/objects/arch/application/injections.abstract.d.ts +0 -4
- package/objects/arch/application/injections.abstract.js +0 -6
- package/objects/arch/application/injections.abstract.type.d.ts +0 -24
- package/objects/arch/domain/solid.abstract.d.ts +0 -4
- package/objects/arch/infrastructure/response.abstract.d.ts +0 -4
- package/tests/builders/errors/dummies/failure.dummy.d.ts +0 -3
- package/tests/builders/errors/dummies/failure.dummy.js +0 -7
- package/tests/builders/generic/dummies/uuid.dummy.d.ts +0 -3
- package/tests/faker/faker.d.ts +0 -2
- package/utils/randoms/random-enum-value.d.ts +0 -2
- package/utils/randoms/random-enum-value.js +0 -20
- package/utils/randoms/random-number.d.ts +0 -6
- package/utils/randoms/random-number.js +0 -6
- /package/{tests/builders/errors → @tool-box/tests/builders/failures}/failure.builder.d.ts +0 -0
- /package/{tests → @tool-box/tests}/builders/generic/uuid.builder.d.ts +0 -0
- /package/{tests → @tool-box/tests}/builders/generic/uuid.builder.js +0 -0
- /package/{tests → @tool-box/tests}/entity-builder.util.d.ts +0 -0
- /package/{tests → @tool-box/tests}/entity-builder.util.js +0 -0
- /package/{utils → @tool-box/utils}/arrays/extended-map.d.ts +0 -0
- /package/{utils → @tool-box/utils}/arrays/extended-map.js +0 -0
- /package/{utils → @tool-box/utils}/datatypes/generic-types.d.ts +0 -0
- /package/{utils → @tool-box/utils}/datatypes/generic-types.js +0 -0
- /package/{utils → @tool-box/utils}/datatypes/string-utils.d.ts +0 -0
- /package/{utils → @tool-box/utils}/datatypes/string-utils.js +0 -0
- /package/{utils → @tool-box/utils}/http-client/http-client-exception.d.ts +0 -0
- /package/{utils → @tool-box/utils}/http-client/http-client-exception.js +0 -0
- /package/{utils → @tool-box/utils}/http-client/http-client-request.d.ts +0 -0
- /package/{utils → @tool-box/utils}/http-client/http-client-request.js +0 -0
- /package/{utils → @tool-box/utils}/http-client/http-client.d.ts +0 -0
- /package/{utils → @tool-box/utils}/http-client/http-client.js +0 -0
- /package/{utils → @tool-box/utils}/type-guard/guardian-exception.d.ts +0 -0
- /package/{utils → @tool-box/utils}/type-guard/guardian-exception.js +0 -0
- /package/{utils → @tool-box/utils}/type-guard/guardian.d.ts +0 -0
- /package/{utils → @tool-box/utils}/type-guard/guardian.js +0 -0
- /package/{utils → @tool-box/utils}/type-guard/guardian.type.d.ts +0 -0
- /package/{utils → @tool-box/utils}/type-guard/guardian.type.js +0 -0
- /package/{objects/arch/application/errors/failure.abstract.type.js → arch/modules/application/databases/database.factory.abstract.js} +0 -0
- /package/{objects/arch/application/errors → arch/modules/application/failures}/failure.abstract.type.d.ts +0 -0
- /package/{objects/arch/application/injections.abstract.type.js → arch/modules/application/failures/failure.abstract.type.js} +0 -0
- /package/{objects/arch/domain/solid.abstract.js → arch/modules/application/injections.abstract.type.js} +0 -0
- /package/{objects/datatypes → arch/modules/domain}/entities/$boolean.abstract.d.ts +0 -0
- /package/{objects/datatypes → arch/modules/domain}/entities/$boolean.abstract.js +0 -0
- /package/{objects/datatypes → arch/modules/domain}/entities/$number.abstract.d.ts +0 -0
- /package/{objects/datatypes → arch/modules/domain}/entities/$string.abstract.d.ts +0 -0
- /package/{objects/datatypes → arch/modules/domain}/entities/$string.abstract.js +0 -0
- /package/{objects/datatypes → arch/modules/domain}/entities/uuid.abstract.d.ts +0 -0
- /package/{objects/datatypes → arch/modules/domain}/entities/uuid.abstract.js +0 -0
- /package/{objects/arch/infrastructure → arch/modules/domain/enums}/http-status-codes.enum.d.ts +0 -0
- /package/{objects/arch/infrastructure → arch/modules/domain/enums}/http-status-codes.enum.js +0 -0
- /package/{objects/configs → arch/modules/domain}/enums/node-envs.enum.d.ts +0 -0
- /package/{objects/configs → arch/modules/domain}/enums/node-envs.enum.js +0 -0
- /package/{objects/arch/domain/middleware-handler.absctract.js → arch/modules/domain/middlewares/middleware.handler.abstract.js} +0 -0
- /package/{objects/arch/domain → arch/modules/domain/repositories}/repository.abstract.d.ts +0 -0
- /package/{objects/arch/domain → arch/modules/domain/repositories}/repository.abstract.js +0 -0
- /package/{objects/arch/domain → arch/modules/domain/services}/service.abstract.d.ts +0 -0
- /package/{objects/arch/domain → arch/modules/domain/services}/service.abstract.js +0 -0
- /package/{objects/arch/domain → arch/modules/domain/usecases}/usecase.abstract.js +0 -0
- /package/{objects/arch/infrastructure → arch/modules/infrastructure/controllers/responses}/response.abstract.js +0 -0
- /package/{objects/arch/infrastructure → arch/modules/infrastructure/repositories/entities}/entity.abstract.js +0 -0
package/configs/env/env-vars.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.IAM_MOVINGAPP_REALM_PUBLIC_KEY_RS256 = exports.ENVIRONMENT = void 0;
|
|
7
|
-
const env_var_1 = __importDefault(require("env-var"));
|
|
8
|
-
const node_envs_enum_1 = require("../../objects/configs/enums/node-envs.enum");
|
|
9
|
-
exports.ENVIRONMENT = env_var_1.default
|
|
10
|
-
.get("ENVIRONMENT")
|
|
11
|
-
.required()
|
|
12
|
-
.asEnum([
|
|
13
|
-
node_envs_enum_1.NodeEnvs.test,
|
|
14
|
-
node_envs_enum_1.NodeEnvs.development,
|
|
15
|
-
node_envs_enum_1.NodeEnvs.production,
|
|
16
|
-
node_envs_enum_1.NodeEnvs.homolog,
|
|
17
|
-
]);
|
|
18
|
-
exports.IAM_MOVINGAPP_REALM_PUBLIC_KEY_RS256 = env_var_1.default
|
|
19
|
-
.get("KEYCLOAK_MOVINGAPP_REALM_PUBLIC_KEY_RS256")
|
|
20
|
-
.asString();
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
|
|
3
|
-
"organizeImports": {
|
|
4
|
-
"enabled": true
|
|
5
|
-
},
|
|
6
|
-
"formatter": {
|
|
7
|
-
"lineEnding": "cr"
|
|
8
|
-
},
|
|
9
|
-
"files": {
|
|
10
|
-
"ignore": [".dev", "dist"]
|
|
11
|
-
},
|
|
12
|
-
"javascript": {
|
|
13
|
-
"parser": {
|
|
14
|
-
"unsafeParameterDecoratorsEnabled": true
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"linter": {
|
|
18
|
-
"enabled": true,
|
|
19
|
-
"rules": {
|
|
20
|
-
"style": {
|
|
21
|
-
"useImportType": {
|
|
22
|
-
"level": "off"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"recommended": true,
|
|
26
|
-
"complexity": {
|
|
27
|
-
"noForEach": {
|
|
28
|
-
"level": "off"
|
|
29
|
-
},
|
|
30
|
-
"noStaticOnlyClass": {
|
|
31
|
-
"level": "off"
|
|
32
|
-
},
|
|
33
|
-
"noBannedTypes": {
|
|
34
|
-
"level": "off"
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
"suspicious": {
|
|
38
|
-
"noExplicitAny": {
|
|
39
|
-
"level": "off"
|
|
40
|
-
},
|
|
41
|
-
"noMisleadingInstantiator": {
|
|
42
|
-
"level": "off"
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
-
"ts-node": {
|
|
4
|
-
"require": [
|
|
5
|
-
"tsconfig-paths/register"
|
|
6
|
-
]
|
|
7
|
-
},
|
|
8
|
-
"compilerOptions": {
|
|
9
|
-
"strictPropertyInitialization": true,
|
|
10
|
-
"incremental": true,
|
|
11
|
-
"baseUrl": "../../../../../",
|
|
12
|
-
"strict": true,
|
|
13
|
-
"moduleResolution": "node",
|
|
14
|
-
"resolveJsonModule": true,
|
|
15
|
-
"rootDirs": [
|
|
16
|
-
"../../../../../src",
|
|
17
|
-
"../../../../../tests"
|
|
18
|
-
],
|
|
19
|
-
"paths": {
|
|
20
|
-
"#/*": [
|
|
21
|
-
"../../../../../src/*"
|
|
22
|
-
],
|
|
23
|
-
"!tests/*": [
|
|
24
|
-
"../../../../../tests/*"
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
|
-
"esModuleInterop": true,
|
|
28
|
-
"experimentalDecorators": true,
|
|
29
|
-
"emitDecoratorMetadata": true,
|
|
30
|
-
"allowJs": true,
|
|
31
|
-
"target": "es2021",
|
|
32
|
-
"module": "commonjs",
|
|
33
|
-
"skipLibCheck": true,
|
|
34
|
-
"declaration": true,
|
|
35
|
-
"forceConsistentCasingInFileNames": true,
|
|
36
|
-
"outDir": "../../../../../dist"
|
|
37
|
-
},
|
|
38
|
-
"include": [
|
|
39
|
-
"../../../../../src/**/*"
|
|
40
|
-
],
|
|
41
|
-
"exclude": [
|
|
42
|
-
"../../../../../node_modules",
|
|
43
|
-
"../../../../../dist"
|
|
44
|
-
]
|
|
45
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
interface UnknownApplicationFailurePrimitive {
|
|
2
|
-
code: string;
|
|
3
|
-
message: string;
|
|
4
|
-
}
|
|
5
|
-
interface UnknownApplicationFailureProps {
|
|
6
|
-
className: string;
|
|
7
|
-
failure: UnknownApplicationFailurePrimitive;
|
|
8
|
-
}
|
|
9
|
-
export declare class UnknownApplicationFailure {
|
|
10
|
-
protected readonly unknownCode: string;
|
|
11
|
-
protected readonly unknownMessage: string;
|
|
12
|
-
constructor({ className, failure }: UnknownApplicationFailureProps);
|
|
13
|
-
toPlain(): UnknownApplicationFailurePrimitive;
|
|
14
|
-
}
|
|
15
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { RepositoryAbstract } from "../domain/repository.abstract";
|
|
2
|
-
import { ServiceAbstract } from "../domain/service.abstract";
|
|
3
|
-
import { UsecaseAbstract } from "../domain/usecase.abstract";
|
|
4
|
-
export interface Injections {
|
|
5
|
-
controllers?: [];
|
|
6
|
-
usecases?: [
|
|
7
|
-
{
|
|
8
|
-
ref: Symbol;
|
|
9
|
-
target: UsecaseAbstract;
|
|
10
|
-
}
|
|
11
|
-
];
|
|
12
|
-
services?: [
|
|
13
|
-
{
|
|
14
|
-
ref: Symbol;
|
|
15
|
-
target: ServiceAbstract;
|
|
16
|
-
}
|
|
17
|
-
];
|
|
18
|
-
repositories?: [
|
|
19
|
-
{
|
|
20
|
-
ref: Symbol;
|
|
21
|
-
target: RepositoryAbstract;
|
|
22
|
-
}
|
|
23
|
-
];
|
|
24
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ApplicationFailureDummy = void 0;
|
|
4
|
-
const failure_abstract_1 = require("../../../../objects/arch/application/errors/failure.abstract");
|
|
5
|
-
class ApplicationFailureDummy extends failure_abstract_1.FailureAbstract {
|
|
6
|
-
}
|
|
7
|
-
exports.ApplicationFailureDummy = ApplicationFailureDummy;
|
package/tests/faker/faker.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.randomEnumValue = randomEnumValue;
|
|
4
|
-
exports.randomEnumValueExcept = randomEnumValueExcept;
|
|
5
|
-
function randomEnumValue(anEnum) {
|
|
6
|
-
const keys = Object.keys(anEnum).filter((x) => Number.isNaN(Number(x)));
|
|
7
|
-
const randomKeyIndex = Math.floor(Math.random() * keys.length);
|
|
8
|
-
const randomKey = keys[randomKeyIndex];
|
|
9
|
-
return anEnum[randomKey];
|
|
10
|
-
}
|
|
11
|
-
function randomEnumValueExcept(anEnum, excepts) {
|
|
12
|
-
const exceptKeys = excepts.map((value) => Object.keys(anEnum).find((key) => anEnum[key] === value));
|
|
13
|
-
const validKeys = Object.keys(anEnum).filter((key) => Number.isNaN(Number(key)) && !exceptKeys.includes(key));
|
|
14
|
-
if (validKeys.length === 0) {
|
|
15
|
-
throw new Error("No valid enum keys available after excluding 'excepts'.");
|
|
16
|
-
}
|
|
17
|
-
const randomKeyIndex = Math.floor(Math.random() * validKeys.length);
|
|
18
|
-
const randomKey = validKeys[randomKeyIndex];
|
|
19
|
-
return anEnum[randomKey];
|
|
20
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{objects/arch/infrastructure → arch/modules/domain/enums}/http-status-codes.enum.d.ts
RENAMED
|
File without changes
|
/package/{objects/arch/infrastructure → arch/modules/domain/enums}/http-status-codes.enum.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|