beddel 0.1.0 → 0.2.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/CHANGELOG.md +58 -0
- package/LICENSE +21 -0
- package/README.md +446 -192
- package/dist/agents/agentRegistry.d.ts +26 -1
- package/dist/agents/agentRegistry.d.ts.map +1 -1
- package/dist/agents/agentRegistry.js +180 -1
- package/dist/agents/agentRegistry.js.map +1 -1
- package/dist/runtime/declarativeAgentRuntime.d.ts +4 -0
- package/dist/runtime/declarativeAgentRuntime.d.ts.map +1 -1
- package/dist/runtime/declarativeAgentRuntime.js +43 -0
- package/dist/runtime/declarativeAgentRuntime.js.map +1 -1
- package/dist/runtime/schemaCompiler.js +5 -4
- package/dist/runtime/schemaCompiler.js.map +1 -1
- package/package.json +6 -3
- package/src/agents/agentRegistry.ts +172 -2
- package/src/runtime/declarativeAgentRuntime.ts +71 -13
- package/src/runtime/schemaCompiler.ts +5 -5
- package/dist/agents/formatter-agent.d.ts +0 -10
- package/dist/agents/formatter-agent.d.ts.map +0 -1
- package/dist/agents/formatter-agent.js +0 -49
- package/dist/agents/formatter-agent.js.map +0 -1
- package/dist/agents/genkit-agent.d.ts +0 -12
- package/dist/agents/genkit-agent.d.ts.map +0 -1
- package/dist/agents/genkit-agent.js +0 -119
- package/dist/agents/genkit-agent.js.map +0 -1
- package/dist/agents/i18n-messages.d.ts +0 -17
- package/dist/agents/i18n-messages.d.ts.map +0 -1
- package/dist/agents/i18n-messages.js +0 -92
- package/dist/agents/i18n-messages.js.map +0 -1
- package/dist/agents/index.d.ts +0 -10
- package/dist/agents/index.d.ts.map +0 -1
- package/dist/agents/index.js +0 -26
- package/dist/agents/index.js.map +0 -1
- package/dist/agents/pipeline.d.ts +0 -15
- package/dist/agents/pipeline.d.ts.map +0 -1
- package/dist/agents/pipeline.js +0 -45
- package/dist/agents/pipeline.js.map +0 -1
- package/dist/agents/schema-factory.d.ts +0 -40
- package/dist/agents/schema-factory.d.ts.map +0 -1
- package/dist/agents/schema-factory.js +0 -121
- package/dist/agents/schema-factory.js.map +0 -1
- package/dist/agents/translation-validators.d.ts +0 -26
- package/dist/agents/translation-validators.d.ts.map +0 -1
- package/dist/agents/translation-validators.js +0 -77
- package/dist/agents/translation-validators.js.map +0 -1
- package/dist/agents/translator-agents.d.ts +0 -184
- package/dist/agents/translator-agents.d.ts.map +0 -1
- package/dist/agents/translator-agents.js +0 -613
- package/dist/agents/translator-agents.js.map +0 -1
- package/dist/agents/types/translation.types.d.ts +0 -100
- package/dist/agents/types/translation.types.d.ts.map +0 -1
- package/dist/agents/types/translation.types.js +0 -3
- package/dist/agents/types/translation.types.js.map +0 -1
- package/dist/agents/validator-agent.d.ts +0 -42
- package/dist/agents/validator-agent.d.ts.map +0 -1
- package/dist/agents/validator-agent.js +0 -122
- package/dist/agents/validator-agent.js.map +0 -1
- package/dist/security/test-security.d.ts +0 -22
- package/dist/security/test-security.d.ts.map +0 -1
- package/dist/security/test-security.js +0 -154
- package/dist/security/test-security.js.map +0 -1
- package/tools/seed.ts +0 -365
- package/tools/test-endpoints.ts +0 -174
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export interface TranslationRequest {
|
|
3
|
-
texto: string;
|
|
4
|
-
idioma_origem: string;
|
|
5
|
-
idioma_destino: string;
|
|
6
|
-
}
|
|
7
|
-
export interface TranslationResponse {
|
|
8
|
-
texto_traduzido: string;
|
|
9
|
-
metadados: {
|
|
10
|
-
modelo_utilizado: string;
|
|
11
|
-
tempo_processamento: number;
|
|
12
|
-
confianca: number;
|
|
13
|
-
idiomas_suportados?: string[];
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Erro de validação aprimorado com suporte a múltiplas falhas de validação
|
|
18
|
-
*/
|
|
19
|
-
export interface ValidationError {
|
|
20
|
-
campo: string;
|
|
21
|
-
mensagem: string;
|
|
22
|
-
codigo: string;
|
|
23
|
-
issues?: ValidationIssue[];
|
|
24
|
-
}
|
|
25
|
-
export interface ValidationIssue {
|
|
26
|
-
path: (string | number)[];
|
|
27
|
-
message: string;
|
|
28
|
-
type: string;
|
|
29
|
-
expected?: unknown;
|
|
30
|
-
received?: unknown;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Opções de configuração para comportamento de validação
|
|
34
|
-
*/
|
|
35
|
-
export interface ValidationOptions {
|
|
36
|
-
stripUnknown?: boolean;
|
|
37
|
-
abortEarly?: boolean;
|
|
38
|
-
allowExtraKeys?: boolean;
|
|
39
|
-
description?: string;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Resultado de validação aprimorado com suporte a múltiplas falhas de validação
|
|
43
|
-
*/
|
|
44
|
-
export interface ValidationResult<T> {
|
|
45
|
-
success: boolean;
|
|
46
|
-
data?: T;
|
|
47
|
-
error?: ValidationError;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Interface de configuração para agentes
|
|
51
|
-
*/
|
|
52
|
-
export interface AgentConfig {
|
|
53
|
-
resource?: string;
|
|
54
|
-
cacheTTL?: number;
|
|
55
|
-
fallbackModels?: string[];
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Tipos para cache de schemas
|
|
59
|
-
*/
|
|
60
|
-
export interface SchemaCacheItem {
|
|
61
|
-
schema: z.ZodSchema;
|
|
62
|
-
timestamp: number;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Limitações de tradução
|
|
66
|
-
*/
|
|
67
|
-
export interface TranslationLimits {
|
|
68
|
-
maxTextLength?: number;
|
|
69
|
-
minTextLength?: number;
|
|
70
|
-
supportedLanguages?: string[];
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Opções de schema dinâmico
|
|
74
|
-
*/
|
|
75
|
-
export interface TranslationSchemaOptions {
|
|
76
|
-
maxTextLength?: number;
|
|
77
|
-
supportedLanguages?: string[];
|
|
78
|
-
requireMetadata?: boolean;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Opções de schema de resposta
|
|
82
|
-
*/
|
|
83
|
-
export interface TranslationResponseSchemaOptions {
|
|
84
|
-
minConfidence?: number;
|
|
85
|
-
maxProcessingTime?: number;
|
|
86
|
-
includeLanguageSupport?: boolean;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Opções de configuração de tradução
|
|
90
|
-
*/
|
|
91
|
-
export interface TranslationConfigOptions {
|
|
92
|
-
sourceLanguage: "pt" | "en" | "es" | "fr";
|
|
93
|
-
targetLanguage: "pt" | "en" | "es" | "fr";
|
|
94
|
-
preserveFormatting?: boolean;
|
|
95
|
-
enableCache?: boolean;
|
|
96
|
-
cacheTTL?: number;
|
|
97
|
-
fallbackModel?: string;
|
|
98
|
-
confidenceThreshold?: number;
|
|
99
|
-
}
|
|
100
|
-
//# sourceMappingURL=translation.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"translation.types.d.ts","sourceRoot":"","sources":["../../../src/agents/types/translation.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE;QACT,gBAAgB,EAAE,MAAM,CAAC;QACzB,mBAAmB,EAAE,MAAM,CAAC;QAC5B,SAAS,EAAE,MAAM,CAAC;QAClB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;KAC/B,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,eAA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,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,cAAc,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1C,cAAc,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1C,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"translation.types.js","sourceRoot":"","sources":["../../../src/agents/types/translation.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { ValidationOptions, ValidationResult } from "./types/translation.types";
|
|
3
|
-
export declare const translatorSchema: z.ZodObject<{
|
|
4
|
-
texto: z.ZodString;
|
|
5
|
-
idioma_origem: z.ZodString;
|
|
6
|
-
idioma_destino: z.ZodString;
|
|
7
|
-
}, z.core.$strip>;
|
|
8
|
-
/**
|
|
9
|
-
* ValidatorAgent aprimorado com tratamento de erros abrangente
|
|
10
|
-
*/
|
|
11
|
-
export default class ValidatorAgent {
|
|
12
|
-
private static schemaCache;
|
|
13
|
-
private static readonly DEFAULT_OPTIONS;
|
|
14
|
-
/**
|
|
15
|
-
* Validação de entrada aprimorada com tratamento abrangente de erros e segurança de tipos
|
|
16
|
-
* @param schema - Schema Zod para validação
|
|
17
|
-
* @param data - Dados desconhecidos para validar
|
|
18
|
-
* @param options - Opções de comportamento de validação
|
|
19
|
-
* @returns Dados tipados validados
|
|
20
|
-
* @throws {ValidationError} com informações detalhadas do erro
|
|
21
|
-
*/
|
|
22
|
-
static validateInput<T>(schema: z.ZodSchema, data: unknown, options?: ValidationOptions): T;
|
|
23
|
-
/**
|
|
24
|
-
* Validação segura que retorna objeto de resultado ao invés de lançar erro
|
|
25
|
-
*/
|
|
26
|
-
static safeValidate<T>(schema: z.ZodSchema, data: unknown, options?: ValidationOptions): ValidationResult<T>;
|
|
27
|
-
/**
|
|
28
|
-
* Cria um validador de schema em cache para melhor performance
|
|
29
|
-
*/
|
|
30
|
-
static createCachedValidator(schema: z.ZodSchema, schemaId: string, options?: ValidationOptions): <T>(data: unknown) => T;
|
|
31
|
-
/**
|
|
32
|
-
* Cria um validador com schema pré-configurado
|
|
33
|
-
*/
|
|
34
|
-
static createValidator<T>(schema: z.ZodSchema, options?: ValidationOptions): (data: unknown) => T;
|
|
35
|
-
/**
|
|
36
|
-
* Constrói erro de validação abrangente a partir do ZodError
|
|
37
|
-
*/
|
|
38
|
-
private static buildValidationError;
|
|
39
|
-
static validateSchema(schema: z.ZodSchema): boolean;
|
|
40
|
-
}
|
|
41
|
-
export { ValidatorAgent };
|
|
42
|
-
//# sourceMappingURL=validator-agent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validator-agent.d.ts","sourceRoot":"","sources":["../../src/agents/validator-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAIL,iBAAiB,EACjB,gBAAgB,EAEjB,MAAM,2BAA2B,CAAC;AAGnC,eAAO,MAAM,gBAAgB;;;;iBAI3B,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,cAAc;IACjC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAkC;IAC5D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAIrC;IAEF;;;;;;;OAOG;IACH,MAAM,CAAC,aAAa,CAAC,CAAC,EACpB,MAAM,EAAE,CAAC,CAAC,SAAS,EACnB,IAAI,EAAE,OAAO,EACb,OAAO,CAAC,EAAE,iBAAiB,GAC1B,CAAC;IAoBJ;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,CAAC,EACnB,MAAM,EAAE,CAAC,CAAC,SAAS,EACnB,IAAI,EAAE,OAAO,EACb,OAAO,CAAC,EAAE,iBAAiB,GAC1B,gBAAgB,CAAC,CAAC,CAAC;IA8BtB;;OAEG;IACH,MAAM,CAAC,qBAAqB,CAC1B,MAAM,EAAE,CAAC,CAAC,SAAS,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,iBAAiB,IAQF,CAAC,EAAE,MAAM,OAAO,KAAG,CAAC;IAK/C;;OAEG;IACH,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,iBAAiB,IAC/C,MAAM,OAAO,KAAG,CAAC;IAK5C;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAwBnC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,SAAS;CAM1C;AAGD,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ValidatorAgent = exports.translatorSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
// Exportação específica do translatorSchema para uso direto
|
|
6
|
-
exports.translatorSchema = zod_1.z.object({
|
|
7
|
-
texto: zod_1.z.string().min(1).max(10000),
|
|
8
|
-
idioma_origem: zod_1.z.string().regex(/^[a-z]{2}$/),
|
|
9
|
-
idioma_destino: zod_1.z.string().regex(/^[a-z]{2}$/),
|
|
10
|
-
});
|
|
11
|
-
/**
|
|
12
|
-
* ValidatorAgent aprimorado com tratamento de erros abrangente
|
|
13
|
-
*/
|
|
14
|
-
class ValidatorAgent {
|
|
15
|
-
/**
|
|
16
|
-
* Validação de entrada aprimorada com tratamento abrangente de erros e segurança de tipos
|
|
17
|
-
* @param schema - Schema Zod para validação
|
|
18
|
-
* @param data - Dados desconhecidos para validar
|
|
19
|
-
* @param options - Opções de comportamento de validação
|
|
20
|
-
* @returns Dados tipados validados
|
|
21
|
-
* @throws {ValidationError} com informações detalhadas do erro
|
|
22
|
-
*/
|
|
23
|
-
static validateInput(schema, data, options) {
|
|
24
|
-
const mergeOptions = { ...this.DEFAULT_OPTIONS, ...options };
|
|
25
|
-
try {
|
|
26
|
-
// Tentativa de parse com opções configuradas
|
|
27
|
-
const result = schema.parse(data);
|
|
28
|
-
return result;
|
|
29
|
-
}
|
|
30
|
-
catch (error) {
|
|
31
|
-
if (error instanceof zod_1.z.ZodError) {
|
|
32
|
-
const validationError = this.buildValidationError(error, mergeOptions);
|
|
33
|
-
throw validationError;
|
|
34
|
-
}
|
|
35
|
-
// Tratar erros não-Zod
|
|
36
|
-
throw new Error(`Erro inesperado durante validação: ${error.message}`);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Validação segura que retorna objeto de resultado ao invés de lançar erro
|
|
41
|
-
*/
|
|
42
|
-
static safeValidate(schema, data, options) {
|
|
43
|
-
try {
|
|
44
|
-
const result = this.validateInput(schema, data, options);
|
|
45
|
-
return {
|
|
46
|
-
success: true,
|
|
47
|
-
data: result,
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
catch (error) {
|
|
51
|
-
return {
|
|
52
|
-
success: false,
|
|
53
|
-
error: error.campo !== undefined
|
|
54
|
-
? error
|
|
55
|
-
: this.buildValidationError(new zod_1.z.ZodError([
|
|
56
|
-
{
|
|
57
|
-
message: error instanceof Error
|
|
58
|
-
? error.message
|
|
59
|
-
: "Erro de validação desconhecido",
|
|
60
|
-
code: "custom",
|
|
61
|
-
path: [],
|
|
62
|
-
},
|
|
63
|
-
]), options),
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Cria um validador de schema em cache para melhor performance
|
|
69
|
-
*/
|
|
70
|
-
static createCachedValidator(schema, schemaId, options) {
|
|
71
|
-
let cachedSchema = this.schemaCache.get(schemaId);
|
|
72
|
-
if (!cachedSchema) {
|
|
73
|
-
cachedSchema = schema;
|
|
74
|
-
this.schemaCache.set(schemaId, cachedSchema);
|
|
75
|
-
}
|
|
76
|
-
return function validate(data) {
|
|
77
|
-
return ValidatorAgent.validateInput(cachedSchema, data, options);
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Cria um validador com schema pré-configurado
|
|
82
|
-
*/
|
|
83
|
-
static createValidator(schema, options) {
|
|
84
|
-
return function validate(data) {
|
|
85
|
-
return ValidatorAgent.validateInput(schema, data, options);
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Constrói erro de validação abrangente a partir do ZodError
|
|
90
|
-
*/
|
|
91
|
-
static buildValidationError(zodError, options) {
|
|
92
|
-
// Zod v4 tem API diferente - usar propriedade issues
|
|
93
|
-
const issues = zodError.issues?.map((issue) => ({
|
|
94
|
-
path: [...issue.path],
|
|
95
|
-
message: issue.message,
|
|
96
|
-
type: issue.code,
|
|
97
|
-
expected: issue.params?.expected,
|
|
98
|
-
received: issue.params?.received,
|
|
99
|
-
})) || [];
|
|
100
|
-
return {
|
|
101
|
-
campo: issues[0]?.path.join(".") || "root",
|
|
102
|
-
mensagem: `${issues.length} erro(s) de validação encontrado(s). ${issues[0]?.message || "Validação falhou"}`,
|
|
103
|
-
codigo: "VALIDATION_ERROR",
|
|
104
|
-
issues,
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
static validateSchema(schema) {
|
|
108
|
-
if (schema._def?.typeName) {
|
|
109
|
-
return true;
|
|
110
|
-
}
|
|
111
|
-
throw new Error("Schema Zod inválido fornecido");
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
exports.ValidatorAgent = ValidatorAgent;
|
|
115
|
-
ValidatorAgent.schemaCache = new Map();
|
|
116
|
-
ValidatorAgent.DEFAULT_OPTIONS = {
|
|
117
|
-
stripUnknown: false,
|
|
118
|
-
abortEarly: false,
|
|
119
|
-
allowExtraKeys: true,
|
|
120
|
-
};
|
|
121
|
-
exports.default = ValidatorAgent;
|
|
122
|
-
//# sourceMappingURL=validator-agent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validator-agent.js","sourceRoot":"","sources":["../../src/agents/validator-agent.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAUxB,4DAA4D;AAC/C,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC;IACnC,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC;IAC7C,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC;CAC/C,CAAC,CAAC;AAEH;;GAEG;AACH,MAAqB,cAAc;IAQjC;;;;;;;OAOG;IACH,MAAM,CAAC,aAAa,CAClB,MAAmB,EACnB,IAAa,EACb,OAA2B;QAE3B,MAAM,YAAY,GAAG,EAAE,GAAG,IAAI,CAAC,eAAe,EAAE,GAAG,OAAO,EAAE,CAAC;QAE7D,IAAI,CAAC;YACH,6CAA6C;YAC7C,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAClC,OAAO,MAAW,CAAC;QACrB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,OAAC,CAAC,QAAQ,EAAE,CAAC;gBAChC,MAAM,eAAe,GAAG,IAAI,CAAC,oBAAoB,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;gBACvE,MAAM,eAAe,CAAC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Ae,GAAsB;IAC3D,YAAY,EAAE,KAAK;IACnB,UAAU,EAAE,KAAK;IACjB,cAAc,EAAE,IAAI;CACrB,CAAC;kBANiB,cAAc"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Testes de segurança para validar a implementação
|
|
3
|
-
*/
|
|
4
|
-
export declare function runSimpleSecurityTest(): import("./score").SecurityScoreResult;
|
|
5
|
-
export declare function runScannerTest(): Promise<import("./scanner").ScanResult>;
|
|
6
|
-
export declare function runYamlValidationTest(): any;
|
|
7
|
-
export declare function runQuickValidation(): any;
|
|
8
|
-
export declare function runAllSecurityTests(): Promise<{
|
|
9
|
-
securityScore: import("./score").SecurityScoreResult;
|
|
10
|
-
scanner: import("./scanner").ScanResult;
|
|
11
|
-
yamlValidation: any;
|
|
12
|
-
quickValidation: any;
|
|
13
|
-
}>;
|
|
14
|
-
declare const _default: {
|
|
15
|
-
runAllSecurityTests: typeof runAllSecurityTests;
|
|
16
|
-
runSimpleSecurityTest: typeof runSimpleSecurityTest;
|
|
17
|
-
runScannerTest: typeof runScannerTest;
|
|
18
|
-
runYamlValidationTest: typeof runYamlValidationTest;
|
|
19
|
-
runQuickValidation: typeof runQuickValidation;
|
|
20
|
-
};
|
|
21
|
-
export default _default;
|
|
22
|
-
//# sourceMappingURL=test-security.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-security.d.ts","sourceRoot":"","sources":["../../src/security/test-security.ts"],"names":[],"mappings":"AAAA;;GAEG;AAqCH,wBAAgB,qBAAqB,0CA6BpC;AAGD,wBAAsB,cAAc,4CAoBnC;AAGD,wBAAgB,qBAAqB,QAgBpC;AAGD,wBAAgB,kBAAkB,QAgBjC;AAGD,wBAAsB,mBAAmB;;;;;GAqBxC;;;;;;;;AAYD,wBAME"}
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Testes de segurança para validar a implementação
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.runSimpleSecurityTest = runSimpleSecurityTest;
|
|
7
|
-
exports.runScannerTest = runScannerTest;
|
|
8
|
-
exports.runYamlValidationTest = runYamlValidationTest;
|
|
9
|
-
exports.runQuickValidation = runQuickValidation;
|
|
10
|
-
exports.runAllSecurityTests = runAllSecurityTests;
|
|
11
|
-
const scanner_1 = require("./scanner");
|
|
12
|
-
const score_1 = require("./score");
|
|
13
|
-
const index_1 = require("./index");
|
|
14
|
-
// Dados de teste - YAML malicioso simulado
|
|
15
|
-
const maliciousYaml = `
|
|
16
|
-
name: "John Doe"
|
|
17
|
-
description: "<script>alert('XSS')</script>"
|
|
18
|
-
api_key: "sk-1234567890abcdef"
|
|
19
|
-
nested:
|
|
20
|
-
deep:
|
|
21
|
-
more:
|
|
22
|
-
malicious: "javascript:const x = 'injection'"
|
|
23
|
-
`;
|
|
24
|
-
// Objeto malicioso direto
|
|
25
|
-
const maliciousObject = {
|
|
26
|
-
name: "John Doe",
|
|
27
|
-
xss_payload: "<script>alert('XSS')</script>",
|
|
28
|
-
api_key: "sk-1234567890abcdef",
|
|
29
|
-
injection: "javascript:var x = 'test'",
|
|
30
|
-
oversized: "x".repeat(1024 * 1024 * 50), // 50MB
|
|
31
|
-
deep: {}
|
|
32
|
-
};
|
|
33
|
-
// Criar objeto com profundidade maliciosa
|
|
34
|
-
let current = maliciousObject.deep;
|
|
35
|
-
for (let i = 0; i < 1500; i++) {
|
|
36
|
-
current.nested = {};
|
|
37
|
-
current = current.nested;
|
|
38
|
-
}
|
|
39
|
-
// Teste de Segurança Simples
|
|
40
|
-
function runSimpleSecurityTest() {
|
|
41
|
-
console.log("🔒 Rodando testes de segurança básicos...\n");
|
|
42
|
-
try {
|
|
43
|
-
const scoreCalculator = new score_1.SecurityScore();
|
|
44
|
-
const result = scoreCalculator.calculate(maliciousObject);
|
|
45
|
-
console.log("📊 Score de Segurança:", result.score);
|
|
46
|
-
console.log("🎯 Grau:", result.grade);
|
|
47
|
-
console.log("⚠️ Nível de Risco:", result.riskLevel);
|
|
48
|
-
console.log("🔴 Vulnerabilidades:", result.vulnerabilities.length);
|
|
49
|
-
console.log("✅ Features de Hardening:", result.hardeningApplied.length);
|
|
50
|
-
console.log("💡 Recomendações:", result.recommendations.length);
|
|
51
|
-
console.log("\n🔍 Detalhes de Vulnerabilidades:");
|
|
52
|
-
result.vulnerabilities.forEach((vuln, index) => {
|
|
53
|
-
console.log(` ${index + 1}. [${vuln.severity.toUpperCase()}] ${vuln.type}: ${vuln.description}`);
|
|
54
|
-
});
|
|
55
|
-
console.log("\n🔧 Features de Hardening Aplicadas:");
|
|
56
|
-
result.hardeningApplied.forEach((feature, index) => {
|
|
57
|
-
console.log(` ${index + 1}. ${feature.name} (${feature.status}): ${feature.description}`);
|
|
58
|
-
});
|
|
59
|
-
return result;
|
|
60
|
-
}
|
|
61
|
-
catch (error) {
|
|
62
|
-
console.error("❌ Falha no teste de segurança:", error);
|
|
63
|
-
throw error;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
// Teste de Scanner Completo
|
|
67
|
-
async function runScannerTest() {
|
|
68
|
-
console.log("\n🔍 Rodando teste de Scanner de Segurança...\n");
|
|
69
|
-
try {
|
|
70
|
-
const scanner = new scanner_1.SecurityScanner();
|
|
71
|
-
const result = await scanner.scan(maliciousObject);
|
|
72
|
-
console.log("📊 Scanner Result:");
|
|
73
|
-
console.log(" - Seguro:", result.secure);
|
|
74
|
-
console.log(" - Score:", result.score);
|
|
75
|
-
console.log(" - Grau:", result.grade);
|
|
76
|
-
console.log(" - Vulnerabilidades:", result.vulnerabilities.length);
|
|
77
|
-
console.log(" - Advertências:", result.warnings.length);
|
|
78
|
-
console.log(" - Recomendações:", result.recommendations.length);
|
|
79
|
-
return result;
|
|
80
|
-
}
|
|
81
|
-
catch (error) {
|
|
82
|
-
console.error("❌ Falha no teste do scanner:", error);
|
|
83
|
-
throw error;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
// Teste de Validação YAML
|
|
87
|
-
function runYamlValidationTest() {
|
|
88
|
-
console.log("\n📋 Rodando teste de validação YAML...\n");
|
|
89
|
-
try {
|
|
90
|
-
const result = (0, index_1.validateYamlSecurity)(maliciousYaml);
|
|
91
|
-
console.log("🔒 Resultado da Validação YAML:");
|
|
92
|
-
console.log(" - Seguro:", result.secure);
|
|
93
|
-
console.log(" - Problemas:", result.issues.join(", "));
|
|
94
|
-
console.log(" - Recomendações:", result.recommendations.length);
|
|
95
|
-
return result;
|
|
96
|
-
}
|
|
97
|
-
catch (error) {
|
|
98
|
-
console.error("❌ Falha no teste de validação YAML:", error);
|
|
99
|
-
throw error;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
// Teste de Validação Rápida
|
|
103
|
-
function runQuickValidation() {
|
|
104
|
-
console.log("\n⚡ Rodando teste de validação rápida...\n");
|
|
105
|
-
try {
|
|
106
|
-
const result = (0, index_1.quickSecurityValidation)(maliciousObject);
|
|
107
|
-
console.log("🚀 Validação Rápida:");
|
|
108
|
-
console.log(" - Válido:", result.isValid);
|
|
109
|
-
console.log(" - Score:", result.score);
|
|
110
|
-
console.log(" - Grau:", result.grade);
|
|
111
|
-
return result;
|
|
112
|
-
}
|
|
113
|
-
catch (error) {
|
|
114
|
-
console.error("❌ Falha no teste de validação rápida:", error);
|
|
115
|
-
throw error;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
// Função principal executando todos os testes
|
|
119
|
-
async function runAllSecurityTests() {
|
|
120
|
-
console.log("🛡️ INICIANDO BATERIA DE TESTES DE SEGURANÇA");
|
|
121
|
-
console.log("=".repeat(50));
|
|
122
|
-
const results = {
|
|
123
|
-
securityScore: runSimpleSecurityTest(),
|
|
124
|
-
scanner: await runScannerTest(),
|
|
125
|
-
yamlValidation: runYamlValidationTest(),
|
|
126
|
-
quickValidation: runQuickValidation()
|
|
127
|
-
};
|
|
128
|
-
console.log("\n".repeat(2));
|
|
129
|
-
console.log("🎉 🛡️ BATERIA DE TESTES COMPLETADA COM SUCESSO!");
|
|
130
|
-
console.log("📊 Resumo:", JSON.stringify({
|
|
131
|
-
securityScore: results.securityScore.score,
|
|
132
|
-
scannerSecure: results.scanner.secure,
|
|
133
|
-
yamlSecure: results.yamlValidation.secure,
|
|
134
|
-
quickValid: results.quickValidation.isValid && results.quickValidation.score >= 60
|
|
135
|
-
}, null, 2));
|
|
136
|
-
return results;
|
|
137
|
-
}
|
|
138
|
-
// Executar testes se este arquivo for chamado diretamente
|
|
139
|
-
if (require.main === module) {
|
|
140
|
-
runAllSecurityTests().then(() => {
|
|
141
|
-
console.log("✅ Testes finalizados");
|
|
142
|
-
}).catch((error) => {
|
|
143
|
-
console.error("🔥 Falha nos testes:", error);
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
// Exportação dos testes
|
|
147
|
-
exports.default = {
|
|
148
|
-
runAllSecurityTests,
|
|
149
|
-
runSimpleSecurityTest,
|
|
150
|
-
runScannerTest,
|
|
151
|
-
runYamlValidationTest,
|
|
152
|
-
runQuickValidation
|
|
153
|
-
};
|
|
154
|
-
//# sourceMappingURL=test-security.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-security.js","sourceRoot":"","sources":["../../src/security/test-security.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAqCH,sDA6BC;AAGD,wCAoBC;AAGD,sDAgBC;AAGD,gDAgBC;AAGD,kDAqBC;AArJD,uCAA4C;AAE5C,mCAAqF;AAErF,mCAAyF;AAEzF,2CAA2C;AAC3C,MAAM,aAAa,GAAG;;;;;;;;CAQrB,CAAC;AAEF,0BAA0B;AAC1B,MAAM,eAAe,GAAG;IACtB,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,+BAA+B;IAC5C,OAAO,EAAE,qBAAqB;IAC9B,SAAS,EAAE,2BAA2B;IACtC,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,GAA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