@atlantjs/arch 3.2.22 → 4.0.0
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/utils/secret-manager/cache.d.ts +8 -0
- package/@tool-box/utils/secret-manager/cache.js +29 -0
- package/@tool-box/utils/secret-manager/clients/aws-client.d.ts +10 -0
- package/@tool-box/utils/secret-manager/clients/aws-client.js +52 -0
- package/@tool-box/utils/secret-manager/clients/client.d.ts +4 -0
- package/@tool-box/utils/secret-manager/clients/null-client.d.ts +5 -0
- package/@tool-box/utils/secret-manager/clients/null-client.js +12 -0
- package/@tool-box/utils/secret-manager/secret-manager-options.d.ts +3 -0
- package/@tool-box/utils/secret-manager/secret-manager-options.js +2 -0
- package/@tool-box/utils/secret-manager/secret-manager.d.ts +11 -0
- package/@tool-box/utils/secret-manager/secret-manager.js +34 -0
- package/arch/modules/application/env/env-vars.d.ts +3 -0
- package/{setup → arch/modules/application}/env/env-vars.js +2 -11
- package/{setup → arch/modules/application}/env/load-envs.js +2 -2
- package/arch/modules/application/failures/failure.abstract.js +1 -1
- package/index.d.ts +1 -19
- package/index.js +3 -44
- package/package.json +11 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/arch/modules/application/databases/database.config.d.ts +0 -23
- package/arch/modules/application/databases/database.config.js +0 -43
- package/arch/modules/application/databases/database.helper.abstract.commit.failure.d.ts +0 -4
- package/arch/modules/application/databases/database.helper.abstract.commit.failure.js +0 -14
- package/arch/modules/application/databases/database.helper.abstract.d.ts +0 -25
- package/arch/modules/application/databases/database.helper.abstract.get-manager.failure.d.ts +0 -4
- package/arch/modules/application/databases/database.helper.abstract.get-manager.failure.js +0 -14
- package/arch/modules/application/databases/database.helper.abstract.js +0 -106
- package/arch/modules/application/databases/database.helper.abstract.rollback.failure.d.ts +0 -4
- package/arch/modules/application/databases/database.helper.abstract.rollback.failure.js +0 -14
- package/arch/modules/application/injections.abstract.d.ts +0 -11
- package/arch/modules/application/injections.abstract.js +0 -45
- package/arch/modules/application/injections.abstract.type.d.ts +0 -21
- package/arch/modules/domain/entities/entity-backend.abstract.d.ts +0 -9
- package/arch/modules/domain/entities/entity-backend.abstract.js +0 -11
- package/arch/modules/domain/middlewares/middleware.handler.abstract.d.ts +0 -4
- package/arch/modules/domain/middlewares/middleware.handler.abstract.js +0 -6
- package/arch/modules/domain/providers/provider.abstract.d.ts +0 -2
- package/arch/modules/domain/providers/provider.abstract.js +0 -6
- package/arch/modules/domain/repositories/repository.abstract.d.ts +0 -2
- package/arch/modules/domain/repositories/repository.abstract.js +0 -6
- package/arch/modules/domain/services/service.abstract.d.ts +0 -2
- package/arch/modules/domain/services/service.abstract.js +0 -6
- package/arch/modules/domain/usecases/usecase.abstract.d.ts +0 -4
- package/arch/modules/domain/usecases/usecase.abstract.js +0 -6
- package/arch/modules/infrastructure/controllers/controller.abstract.d.ts +0 -9
- package/arch/modules/infrastructure/controllers/controller.abstract.js +0 -13
- package/arch/modules/infrastructure/controllers/payloads/payload.abstract.d.ts +0 -2
- package/arch/modules/infrastructure/controllers/payloads/payload.abstract.js +0 -6
- package/arch/modules/infrastructure/controllers/payloads/validators/validator.abstract.d.ts +0 -2
- package/arch/modules/infrastructure/controllers/payloads/validators/validator.abstract.js +0 -6
- package/arch/modules/infrastructure/controllers/responses/response.abstract.d.ts +0 -4
- package/arch/modules/infrastructure/controllers/responses/response.abstract.js +0 -6
- package/arch/modules/infrastructure/repositories/schemas/schema.abstract.d.ts +0 -7
- package/arch/modules/infrastructure/repositories/schemas/schema.abstract.js +0 -43
- package/arch/modules/infrastructure/services/http-client.abstract.d.ts +0 -0
- package/arch/modules/infrastructure/services/http-client.abstract.js +0 -1
- package/arch/modules/infrastructure/services/payloads/service.payload.abstract.d.ts +0 -0
- package/arch/modules/infrastructure/services/payloads/service.payload.abstract.js +0 -1
- package/arch/modules/infrastructure/services/responses/service.response.abstract.d.ts +0 -0
- package/arch/modules/infrastructure/services/responses/service.response.abstract.js +0 -1
- package/setup/dependency-injections/container.d.ts +0 -11
- package/setup/dependency-injections/container.js +0 -14
- package/setup/dependency-injections/default-container.d.ts +0 -4
- package/setup/dependency-injections/default-container.js +0 -20
- package/setup/dependency-injections/di-container.abstract.d.ts +0 -30
- package/setup/dependency-injections/di-container.abstract.js +0 -45
- package/setup/dependency-injections/di-container.d.ts +0 -3
- package/setup/dependency-injections/di-container.js +0 -6
- package/setup/dependency-injections/index.d.ts +0 -3
- package/setup/dependency-injections/index.js +0 -15
- package/setup/env/env-vars.d.ts +0 -7
- package/setup/index.d.ts +0 -18
- package/setup/index.js +0 -48
- package/setup/server/body-parser-middleware.d.ts +0 -9
- package/setup/server/body-parser-middleware.js +0 -31
- package/setup/server/cors-middleware.d.ts +0 -10
- package/setup/server/cors-middleware.js +0 -38
- package/setup/server/default-error-handler-middleware.d.ts +0 -8
- package/setup/server/default-error-handler-middleware.js +0 -45
- package/setup/server/server.d.ts +0 -6
- package/setup/server/server.js +0 -61
- /package/{arch/modules/application/injections.abstract.type.js → @tool-box/utils/secret-manager/clients/client.js} +0 -0
- /package/{setup → arch/modules/application}/env/load-envs.d.ts +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
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.Cache = void 0;
|
|
7
|
+
const node_cache_1 = __importDefault(require("node-cache"));
|
|
8
|
+
const guardian_1 = require("./../type-guard/guardian");
|
|
9
|
+
class Cache {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.cache = new node_cache_1.default({
|
|
12
|
+
useClones: false,
|
|
13
|
+
deleteOnExpire: true,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
static getInstance() {
|
|
17
|
+
if (guardian_1.Guardian.isUndefined(Cache.instance)) {
|
|
18
|
+
Cache.instance = new Cache();
|
|
19
|
+
}
|
|
20
|
+
return Cache.instance;
|
|
21
|
+
}
|
|
22
|
+
get(key) {
|
|
23
|
+
return this.cache.get(key);
|
|
24
|
+
}
|
|
25
|
+
set(key, value, cacheTTLInSeconds) {
|
|
26
|
+
this.cache.set(key, value, cacheTTLInSeconds);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.Cache = Cache;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import AWS from "aws-sdk";
|
|
2
|
+
import { Client } from "./client";
|
|
3
|
+
export declare class AWSClient implements Client {
|
|
4
|
+
private readonly secretsManager;
|
|
5
|
+
constructor(secretsManager?: AWS.SecretsManager);
|
|
6
|
+
getSecret(secretName: string): Promise<string | undefined>;
|
|
7
|
+
deserializeSecretValue(secretValue: string, key: string): Promise<string | undefined>;
|
|
8
|
+
private parseValueToString;
|
|
9
|
+
private isPrimitiveValue;
|
|
10
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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.AWSClient = void 0;
|
|
7
|
+
const aws_sdk_1 = __importDefault(require("aws-sdk"));
|
|
8
|
+
const debug_1 = __importDefault(require("debug"));
|
|
9
|
+
const d = (0, debug_1.default)("@atlantjs/arch");
|
|
10
|
+
class AWSClient {
|
|
11
|
+
constructor(secretsManager) {
|
|
12
|
+
this.secretsManager = secretsManager ?? new aws_sdk_1.default.SecretsManager();
|
|
13
|
+
}
|
|
14
|
+
async getSecret(secretName) {
|
|
15
|
+
try {
|
|
16
|
+
const response = await this.secretsManager
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
18
|
+
.getSecretValue({ SecretId: secretName })
|
|
19
|
+
.promise();
|
|
20
|
+
return response.SecretString;
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
d("Error getting secret", error, secretName);
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
async deserializeSecretValue(secretValue, key) {
|
|
28
|
+
try {
|
|
29
|
+
const json = JSON.parse(secretValue);
|
|
30
|
+
const value = json[key];
|
|
31
|
+
return this.parseValueToString(value);
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
d("Error deserializing secret", error, key);
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
parseValueToString(value) {
|
|
39
|
+
if (typeof value === "string") {
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
if (this.isPrimitiveValue(value)) {
|
|
43
|
+
return JSON.stringify(value);
|
|
44
|
+
}
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
isPrimitiveValue(value) {
|
|
48
|
+
const primitives = ["string", "number", "boolean"];
|
|
49
|
+
return primitives.includes(typeof value);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.AWSClient = AWSClient;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NullClient = void 0;
|
|
4
|
+
class NullClient {
|
|
5
|
+
async getSecret(_secretName) {
|
|
6
|
+
return undefined;
|
|
7
|
+
}
|
|
8
|
+
async deserializeSecretValue(_secretValue, _key) {
|
|
9
|
+
return undefined;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.NullClient = NullClient;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Client } from "./clients/client";
|
|
2
|
+
import { SecretManagerOptions } from "./secret-manager-options";
|
|
3
|
+
export declare class SecretManager {
|
|
4
|
+
private static client;
|
|
5
|
+
private readonly cache;
|
|
6
|
+
private readonly expirationTimeInSeconds;
|
|
7
|
+
constructor(options?: SecretManagerOptions);
|
|
8
|
+
static useClient(client: Client): void;
|
|
9
|
+
get(secretName: string, key: string): Promise<string | undefined>;
|
|
10
|
+
getOrDefault(secretName: string, key: string, defaultFn: () => Promise<string> | string): Promise<string>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SecretManager = void 0;
|
|
4
|
+
const cache_1 = require("./cache");
|
|
5
|
+
const null_client_1 = require("./clients/null-client");
|
|
6
|
+
const guardian_1 = require("../type-guard/guardian");
|
|
7
|
+
class SecretManager {
|
|
8
|
+
constructor(options = {}) {
|
|
9
|
+
this.cache = cache_1.Cache.getInstance();
|
|
10
|
+
this.expirationTimeInSeconds = 3600;
|
|
11
|
+
if (guardian_1.Guardian.isNotUndefined(options.expirationTimeInSeconds)) {
|
|
12
|
+
this.expirationTimeInSeconds = options.expirationTimeInSeconds;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
static useClient(client) {
|
|
16
|
+
SecretManager.client = client;
|
|
17
|
+
}
|
|
18
|
+
async get(secretName, key) {
|
|
19
|
+
let secret = this.cache.get(secretName);
|
|
20
|
+
if (guardian_1.Guardian.isUndefined(secret)) {
|
|
21
|
+
secret = await SecretManager.client.getSecret(secretName);
|
|
22
|
+
if (guardian_1.Guardian.isUndefined(secret)) {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
this.cache.set(secretName, secret, this.expirationTimeInSeconds);
|
|
26
|
+
}
|
|
27
|
+
return SecretManager.client.deserializeSecretValue(secret, key);
|
|
28
|
+
}
|
|
29
|
+
async getOrDefault(secretName, key, defaultFn) {
|
|
30
|
+
return (await this.get(secretName, key)) ?? (await defaultFn());
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.SecretManager = SecretManager;
|
|
34
|
+
SecretManager.client = new null_client_1.NullClient();
|
|
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.isProdOrHomolog = exports.
|
|
7
|
-
const node_envs_enum_1 = require("../../
|
|
6
|
+
exports.isProdOrHomolog = exports.ENVIRONMENT = void 0;
|
|
7
|
+
const node_envs_enum_1 = require("../../domain/enums/node-envs.enum");
|
|
8
8
|
const env_var_1 = __importDefault(require("env-var"));
|
|
9
9
|
exports.ENVIRONMENT = env_var_1.default
|
|
10
10
|
.get("ENVIRONMENT")
|
|
@@ -15,14 +15,5 @@ exports.ENVIRONMENT = env_var_1.default
|
|
|
15
15
|
node_envs_enum_1.NodeEnvs.production,
|
|
16
16
|
node_envs_enum_1.NodeEnvs.homolog,
|
|
17
17
|
]);
|
|
18
|
-
exports.IAM_MOVINGAPP_REALM_PUBLIC_KEY_RS256 = env_var_1.default
|
|
19
|
-
.get("KEYCLOAK_MOVINGAPP_REALM_PUBLIC_KEY_RS256")
|
|
20
|
-
.asString();
|
|
21
|
-
exports.APP_PORT = env_var_1.default.get("APP_PORT").required().asPortNumber();
|
|
22
|
-
exports.LOAD_MODULES = env_var_1.default.get("LOAD_MODULES").required().asArray(",");
|
|
23
|
-
exports.CORS_ALLOWED_ORIGINS = env_var_1.default
|
|
24
|
-
.get("CORS_ALLOWED_ORIGINS")
|
|
25
|
-
.default("*")
|
|
26
|
-
.asString();
|
|
27
18
|
const isProdOrHomolog = () => [node_envs_enum_1.NodeEnvs.homolog, node_envs_enum_1.NodeEnvs.production].includes(exports.ENVIRONMENT);
|
|
28
19
|
exports.isProdOrHomolog = isProdOrHomolog;
|
|
@@ -5,9 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
7
7
|
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
-
const guardian_1 = require("@atlantjs/guardian");
|
|
9
8
|
const dotenv_1 = __importDefault(require("dotenv"));
|
|
10
|
-
const
|
|
9
|
+
const guardian_1 = require("../../../../@tool-box/utils/type-guard/guardian");
|
|
10
|
+
const node_envs_enum_1 = require("../../domain/enums/node-envs.enum");
|
|
11
11
|
if (guardian_1.Guardian.isEqual(process.env.ENVIRONMENT, node_envs_enum_1.NodeEnvs.test) &&
|
|
12
12
|
!node_fs_1.default.existsSync(node_path_1.default.join(__dirname, "..", "..", "..", ".env.test"))) {
|
|
13
13
|
console.error("The .env.test file is missing with the variables and their values");
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FailureAbstract = void 0;
|
|
4
4
|
const guardian_1 = require("../../../../@tool-box/utils/type-guard/guardian");
|
|
5
|
+
const env_vars_1 = require("../env/env-vars");
|
|
5
6
|
const node_envs_enum_1 = require("../../domain/enums/node-envs.enum");
|
|
6
|
-
const env_vars_1 = require("../../../../setup/env/env-vars");
|
|
7
7
|
class FailureAbstract {
|
|
8
8
|
constructor(props) {
|
|
9
9
|
this.props = props;
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./@tool-box/utils/datatypes/string-utils";
|
|
2
2
|
import "./@tool-box/utils/datatypes/boolean-utils";
|
|
3
|
-
export {
|
|
3
|
+
export { SecretManager } from "./@tool-box/utils/secret-manager/secret-manager";
|
|
4
4
|
export { ValueObjectAbstract } from "./arch/modules/domain/entities/value-object.abstract";
|
|
5
5
|
export { FailureBuilder } from "./@tool-box/tests/builders/failures/failure.builder";
|
|
6
6
|
export { UuidBuilder } from "./@tool-box/tests/builders/generic/uuid.builder";
|
|
@@ -13,13 +13,10 @@ export { Success, Failure, Return } from "./@tool-box/utils/ducts/return-type";
|
|
|
13
13
|
export { HttpClient } from "./@tool-box/utils/http-client/http-client";
|
|
14
14
|
export { RandomValue } from "./@tool-box/utils/randoms/random-value";
|
|
15
15
|
export { Guardian } from "./@tool-box/utils/type-guard/guardian";
|
|
16
|
-
export { DatabaseHelperAbstract } from "./arch/modules/application/databases/database.helper.abstract";
|
|
17
16
|
export { FailureAbstract } from "./arch/modules/application/failures/failure.abstract";
|
|
18
17
|
export { UnknownFailure } from "./arch/modules/application/failures/unknown-failure";
|
|
19
|
-
export { InjectionsAbstract } from "./arch/modules/application/injections.abstract";
|
|
20
18
|
export { $array } from "./arch/modules/domain/entities/$array.abstract";
|
|
21
19
|
export { $boolean } from "./arch/modules/domain/entities/$boolean.abstract";
|
|
22
|
-
export { Injections } from "./arch/modules/application/injections.abstract.type";
|
|
23
20
|
export { $date } from "./arch/modules/domain/entities/$date.abstract";
|
|
24
21
|
export { $number } from "./arch/modules/domain/entities/$number.abstract";
|
|
25
22
|
export { $object } from "./arch/modules/domain/entities/$object.abstract";
|
|
@@ -28,18 +25,3 @@ export { UuidAbstract } from "./arch/modules/domain/entities/uuid.abstract";
|
|
|
28
25
|
export { UrlAbstract } from "./arch/modules/domain/entities/url.abstract";
|
|
29
26
|
export { HttpStatusCodes } from "./arch/modules/domain/enums/http-status-codes.enum";
|
|
30
27
|
export { NodeEnvs } from "./arch/modules/domain/enums/node-envs.enum";
|
|
31
|
-
export { MiddlewareHandlerAbstract } from "./arch/modules/domain/middlewares/middleware.handler.abstract";
|
|
32
|
-
export { ProviderAbstract } from "./arch/modules/domain/providers/provider.abstract";
|
|
33
|
-
export { RepositoryAbstract } from "./arch/modules/domain/repositories/repository.abstract";
|
|
34
|
-
export { ServiceAbstract } from "./arch/modules/domain/services/service.abstract";
|
|
35
|
-
export { UsecaseAbstract } from "./arch/modules/domain/usecases/usecase.abstract";
|
|
36
|
-
export { ControllerAbstract } from "./arch/modules/infrastructure/controllers/controller.abstract";
|
|
37
|
-
export { PayloadAbstract } from "./arch/modules/infrastructure/controllers/payloads/payload.abstract";
|
|
38
|
-
export { ValidatorAbstract } from "./arch/modules/infrastructure/controllers/payloads/validators/validator.abstract";
|
|
39
|
-
export { ResponseAbstract } from "./arch/modules/infrastructure/controllers/responses/response.abstract";
|
|
40
|
-
export { EntityBackendAbstract } from "./arch/modules/domain/entities/entity-backend.abstract";
|
|
41
|
-
export { EntityFrontendAbstract } from "./arch/modules/domain/entities/entity-frontend.abstract";
|
|
42
|
-
export { SchemaAbstract } from "./arch/modules/infrastructure/repositories/schemas/schema.abstract";
|
|
43
|
-
export { ENVIRONMENT, IAM_MOVINGAPP_REALM_PUBLIC_KEY_RS256, APP_PORT, LOAD_MODULES, CORS_ALLOWED_ORIGINS, isProdOrHomolog, } from "./setup/env/env-vars";
|
|
44
|
-
export { initializeApi, synthesizePaths } from "./setup";
|
|
45
|
-
export { diContainer } from "./setup/dependency-injections";
|
package/index.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.diContainer = void 0;
|
|
3
|
+
exports.NodeEnvs = exports.HttpStatusCodes = exports.UrlAbstract = exports.UuidAbstract = exports.$string = exports.$object = exports.$number = exports.$date = exports.$boolean = exports.$array = exports.UnknownFailure = exports.FailureAbstract = exports.Guardian = exports.RandomValue = exports.HttpClient = exports.Return = exports.Failure = exports.Success = exports.Optional = exports.Nothing = exports.Something = exports.ExtendedMap = exports.EntityBuilder = exports.CreateFakeUsecase = exports.UuidBuilder = exports.FailureBuilder = exports.ValueObjectAbstract = exports.SecretManager = void 0;
|
|
5
4
|
require("./@tool-box/utils/datatypes/string-utils");
|
|
6
5
|
require("./@tool-box/utils/datatypes/boolean-utils");
|
|
7
|
-
var
|
|
8
|
-
Object.defineProperty(exports, "
|
|
6
|
+
var secret_manager_1 = require("./@tool-box/utils/secret-manager/secret-manager");
|
|
7
|
+
Object.defineProperty(exports, "SecretManager", { enumerable: true, get: function () { return secret_manager_1.SecretManager; } });
|
|
9
8
|
var value_object_abstract_1 = require("./arch/modules/domain/entities/value-object.abstract");
|
|
10
9
|
Object.defineProperty(exports, "ValueObjectAbstract", { enumerable: true, get: function () { return value_object_abstract_1.ValueObjectAbstract; } });
|
|
11
10
|
var failure_builder_1 = require("./@tool-box/tests/builders/failures/failure.builder");
|
|
@@ -32,14 +31,10 @@ var random_value_1 = require("./@tool-box/utils/randoms/random-value");
|
|
|
32
31
|
Object.defineProperty(exports, "RandomValue", { enumerable: true, get: function () { return random_value_1.RandomValue; } });
|
|
33
32
|
var guardian_1 = require("./@tool-box/utils/type-guard/guardian");
|
|
34
33
|
Object.defineProperty(exports, "Guardian", { enumerable: true, get: function () { return guardian_1.Guardian; } });
|
|
35
|
-
var database_helper_abstract_1 = require("./arch/modules/application/databases/database.helper.abstract");
|
|
36
|
-
Object.defineProperty(exports, "DatabaseHelperAbstract", { enumerable: true, get: function () { return database_helper_abstract_1.DatabaseHelperAbstract; } });
|
|
37
34
|
var failure_abstract_1 = require("./arch/modules/application/failures/failure.abstract");
|
|
38
35
|
Object.defineProperty(exports, "FailureAbstract", { enumerable: true, get: function () { return failure_abstract_1.FailureAbstract; } });
|
|
39
36
|
var unknown_failure_1 = require("./arch/modules/application/failures/unknown-failure");
|
|
40
37
|
Object.defineProperty(exports, "UnknownFailure", { enumerable: true, get: function () { return unknown_failure_1.UnknownFailure; } });
|
|
41
|
-
var injections_abstract_1 = require("./arch/modules/application/injections.abstract");
|
|
42
|
-
Object.defineProperty(exports, "InjectionsAbstract", { enumerable: true, get: function () { return injections_abstract_1.InjectionsAbstract; } });
|
|
43
38
|
var _array_abstract_1 = require("./arch/modules/domain/entities/$array.abstract");
|
|
44
39
|
Object.defineProperty(exports, "$array", { enumerable: true, get: function () { return _array_abstract_1.$array; } });
|
|
45
40
|
var _boolean_abstract_1 = require("./arch/modules/domain/entities/$boolean.abstract");
|
|
@@ -60,39 +55,3 @@ var http_status_codes_enum_1 = require("./arch/modules/domain/enums/http-status-
|
|
|
60
55
|
Object.defineProperty(exports, "HttpStatusCodes", { enumerable: true, get: function () { return http_status_codes_enum_1.HttpStatusCodes; } });
|
|
61
56
|
var node_envs_enum_1 = require("./arch/modules/domain/enums/node-envs.enum");
|
|
62
57
|
Object.defineProperty(exports, "NodeEnvs", { enumerable: true, get: function () { return node_envs_enum_1.NodeEnvs; } });
|
|
63
|
-
var middleware_handler_abstract_1 = require("./arch/modules/domain/middlewares/middleware.handler.abstract");
|
|
64
|
-
Object.defineProperty(exports, "MiddlewareHandlerAbstract", { enumerable: true, get: function () { return middleware_handler_abstract_1.MiddlewareHandlerAbstract; } });
|
|
65
|
-
var provider_abstract_1 = require("./arch/modules/domain/providers/provider.abstract");
|
|
66
|
-
Object.defineProperty(exports, "ProviderAbstract", { enumerable: true, get: function () { return provider_abstract_1.ProviderAbstract; } });
|
|
67
|
-
var repository_abstract_1 = require("./arch/modules/domain/repositories/repository.abstract");
|
|
68
|
-
Object.defineProperty(exports, "RepositoryAbstract", { enumerable: true, get: function () { return repository_abstract_1.RepositoryAbstract; } });
|
|
69
|
-
var service_abstract_1 = require("./arch/modules/domain/services/service.abstract");
|
|
70
|
-
Object.defineProperty(exports, "ServiceAbstract", { enumerable: true, get: function () { return service_abstract_1.ServiceAbstract; } });
|
|
71
|
-
var usecase_abstract_1 = require("./arch/modules/domain/usecases/usecase.abstract");
|
|
72
|
-
Object.defineProperty(exports, "UsecaseAbstract", { enumerable: true, get: function () { return usecase_abstract_1.UsecaseAbstract; } });
|
|
73
|
-
var controller_abstract_1 = require("./arch/modules/infrastructure/controllers/controller.abstract");
|
|
74
|
-
Object.defineProperty(exports, "ControllerAbstract", { enumerable: true, get: function () { return controller_abstract_1.ControllerAbstract; } });
|
|
75
|
-
var payload_abstract_1 = require("./arch/modules/infrastructure/controllers/payloads/payload.abstract");
|
|
76
|
-
Object.defineProperty(exports, "PayloadAbstract", { enumerable: true, get: function () { return payload_abstract_1.PayloadAbstract; } });
|
|
77
|
-
var validator_abstract_1 = require("./arch/modules/infrastructure/controllers/payloads/validators/validator.abstract");
|
|
78
|
-
Object.defineProperty(exports, "ValidatorAbstract", { enumerable: true, get: function () { return validator_abstract_1.ValidatorAbstract; } });
|
|
79
|
-
var response_abstract_1 = require("./arch/modules/infrastructure/controllers/responses/response.abstract");
|
|
80
|
-
Object.defineProperty(exports, "ResponseAbstract", { enumerable: true, get: function () { return response_abstract_1.ResponseAbstract; } });
|
|
81
|
-
var entity_backend_abstract_1 = require("./arch/modules/domain/entities/entity-backend.abstract");
|
|
82
|
-
Object.defineProperty(exports, "EntityBackendAbstract", { enumerable: true, get: function () { return entity_backend_abstract_1.EntityBackendAbstract; } });
|
|
83
|
-
var entity_frontend_abstract_1 = require("./arch/modules/domain/entities/entity-frontend.abstract");
|
|
84
|
-
Object.defineProperty(exports, "EntityFrontendAbstract", { enumerable: true, get: function () { return entity_frontend_abstract_1.EntityFrontendAbstract; } });
|
|
85
|
-
var schema_abstract_1 = require("./arch/modules/infrastructure/repositories/schemas/schema.abstract");
|
|
86
|
-
Object.defineProperty(exports, "SchemaAbstract", { enumerable: true, get: function () { return schema_abstract_1.SchemaAbstract; } });
|
|
87
|
-
var env_vars_1 = require("./setup/env/env-vars");
|
|
88
|
-
Object.defineProperty(exports, "ENVIRONMENT", { enumerable: true, get: function () { return env_vars_1.ENVIRONMENT; } });
|
|
89
|
-
Object.defineProperty(exports, "IAM_MOVINGAPP_REALM_PUBLIC_KEY_RS256", { enumerable: true, get: function () { return env_vars_1.IAM_MOVINGAPP_REALM_PUBLIC_KEY_RS256; } });
|
|
90
|
-
Object.defineProperty(exports, "APP_PORT", { enumerable: true, get: function () { return env_vars_1.APP_PORT; } });
|
|
91
|
-
Object.defineProperty(exports, "LOAD_MODULES", { enumerable: true, get: function () { return env_vars_1.LOAD_MODULES; } });
|
|
92
|
-
Object.defineProperty(exports, "CORS_ALLOWED_ORIGINS", { enumerable: true, get: function () { return env_vars_1.CORS_ALLOWED_ORIGINS; } });
|
|
93
|
-
Object.defineProperty(exports, "isProdOrHomolog", { enumerable: true, get: function () { return env_vars_1.isProdOrHomolog; } });
|
|
94
|
-
var setup_1 = require("./setup");
|
|
95
|
-
Object.defineProperty(exports, "initializeApi", { enumerable: true, get: function () { return setup_1.initializeApi; } });
|
|
96
|
-
Object.defineProperty(exports, "synthesizePaths", { enumerable: true, get: function () { return setup_1.synthesizePaths; } });
|
|
97
|
-
var dependency_injections_1 = require("./setup/dependency-injections");
|
|
98
|
-
Object.defineProperty(exports, "diContainer", { enumerable: true, get: function () { return dependency_injections_1.diContainer; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlantjs/arch",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"publishConfig": {
|
|
@@ -34,34 +34,43 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlantjs/auth": "^1.0.0",
|
|
36
36
|
"@faker-js/faker": "^9.0.3",
|
|
37
|
+
"aws-sdk": "^2.1691.0",
|
|
37
38
|
"axios": "^1.7.7",
|
|
38
39
|
"class-transformer": "^0.5.1",
|
|
39
40
|
"class-validator": "^0.14.1",
|
|
40
41
|
"cookie-parser": "^1.4.7",
|
|
41
42
|
"cors": "^2.8.5",
|
|
43
|
+
"debug": "^4.3.7",
|
|
42
44
|
"dotenv": "^16.4.5",
|
|
43
45
|
"env-var": "^7.5.0",
|
|
44
46
|
"express": "^4.21.1",
|
|
45
47
|
"helmet": "^8.0.0",
|
|
46
48
|
"jsonwebtoken": "^9.0.2",
|
|
47
49
|
"jwk-to-pem": "^2.0.6",
|
|
50
|
+
"lodash": "^4.17.21",
|
|
48
51
|
"module-alias": "^2.2.3",
|
|
52
|
+
"node-cache": "^5.1.2",
|
|
49
53
|
"reflect-metadata": "^0.2.2",
|
|
50
54
|
"routing-controllers": "^0.10.4",
|
|
51
55
|
"routing-controllers-openapi": "^4.0.0",
|
|
52
56
|
"typeorm": "^0.3.20",
|
|
53
|
-
"uuid": "^10.0.0"
|
|
57
|
+
"uuid": "^10.0.0",
|
|
58
|
+
"winston": "^3.15.0",
|
|
59
|
+
"winston-console-format": "^1.0.8",
|
|
60
|
+
"winston-daily-rotate-file": "^5.0.0"
|
|
54
61
|
},
|
|
55
62
|
"devDependencies": {
|
|
56
63
|
"@biomejs/biome": "1.8.3",
|
|
57
64
|
"@types/axios": "^0.14.4",
|
|
58
65
|
"@types/cookie-parser": "^1.4.7",
|
|
59
66
|
"@types/cors": "^2.8.17",
|
|
67
|
+
"@types/debug": "^4.1.12",
|
|
60
68
|
"@types/dotenv": "^8.2.3",
|
|
61
69
|
"@types/express": "^5.0.0",
|
|
62
70
|
"@types/jest": "^29.5.12",
|
|
63
71
|
"@types/jsonwebtoken": "^9.0.7",
|
|
64
72
|
"@types/jwk-to-pem": "^2.0.3",
|
|
73
|
+
"@types/lodash": "^4.17.12",
|
|
65
74
|
"@types/node": "^22.8.0",
|
|
66
75
|
"@types/uuid": "^10.0.0",
|
|
67
76
|
"copyfiles": "^2.4.1",
|