awc-zns-mtd 2.9.0 → 2.10.3
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/.github/workflows/ci.yml +148 -0
- package/.husky/pre-commit +2 -0
- package/.prettierignore +31 -0
- package/.prettierrc +13 -0
- package/IMPLEMENTATION_SUMMARY.md +410 -0
- package/PHASE_2_SUMMARY.md +289 -0
- package/README.md +114 -47
- package/SECURITY.md +58 -0
- package/eslint.config.js +70 -0
- package/jest.config.js +49 -0
- package/package.json +40 -14
- package/src/modules/custom-agents/cli/awc-agent.js +505 -372
- package/test/integration/cli/cli-commands.integration.test.js +105 -0
- package/test/setup.js +22 -0
- package/test/unit/commands/version.test.js +39 -0
- package/test/unit/config/config-manager.test.js +147 -0
- package/test/unit/utils/file-utils.test.js +177 -0
- package/test/unit/utils/validators.test.js +57 -0
- package/tools/cli/commands/init.js +556 -513
- package/tools/cli/commands/new-project.js +680 -659
- package/tools/cli/commands/validate.js +13 -13
- package/tools/cli/commands/version.js +5 -3
- package/tools/cli/utils/console-logger.js +39 -15
- package/tools/cli/utils/logger.js +176 -0
- package/tools/cli/utils/project-analyzer.js +33 -16
- package/tools/cli/utils/validators.js +144 -0
- package/tools/cli/utils/version.js +6 -2
- package/tools/config/config-manager.js +243 -0
- package/tools/version/changelog-manager.js +301 -288
- package/tools/version/update-checker.js +32 -32
- package/tools/version/version-bump.js +89 -90
- package/tools/version/version-manager.js +17 -7
- package/tsconfig.json +47 -0
- package/types/index.d.ts +206 -0
- package/tools/cli/commands/init-old.js +0 -147
- package/tools/cli/commands/new-project-broken.js +0 -1302
- package/tools/cli/commands/new-project-old.js +0 -1302
- package/tools/cli/commands/new-project.js.backup +0 -1302
package/SECURITY.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# AWC ZNS-MTD Security Policy
|
|
2
|
+
|
|
3
|
+
## Versiones Soportadas
|
|
4
|
+
|
|
5
|
+
| Versión | Soportado |
|
|
6
|
+
| ------- | ------------------ |
|
|
7
|
+
| 2.9.x | :white_check_mark: |
|
|
8
|
+
| 2.8.x | :x: |
|
|
9
|
+
| < 2.8 | :x: |
|
|
10
|
+
|
|
11
|
+
## Reportar Vulnerabilidades
|
|
12
|
+
|
|
13
|
+
Si descubres una vulnerabilidad de seguridad en AWC ZNS-MTD, por favor:
|
|
14
|
+
|
|
15
|
+
1. **NO** abras un issue público
|
|
16
|
+
2. Envía un correo a: security@awc-team.com
|
|
17
|
+
3. Incluye:
|
|
18
|
+
- Descripción detallada de la vulnerabilidad
|
|
19
|
+
- Pasos para reproducir
|
|
20
|
+
- Impacto potencial
|
|
21
|
+
- Versión afectada
|
|
22
|
+
|
|
23
|
+
## Proceso de Respuesta
|
|
24
|
+
|
|
25
|
+
1. Confirmación de recepción: 48 horas
|
|
26
|
+
2. Evaluación inicial: 1 semana
|
|
27
|
+
3. Fix y testing: 2-4 semanas
|
|
28
|
+
4. Release de parche: Según severidad
|
|
29
|
+
|
|
30
|
+
## Mejores Prácticas
|
|
31
|
+
|
|
32
|
+
### Para Usuarios
|
|
33
|
+
|
|
34
|
+
- Mantén siempre la última versión
|
|
35
|
+
- Ejecuta `npm audit` regularmente
|
|
36
|
+
- No expongas credenciales en archivos de configuración
|
|
37
|
+
- Usa variables de entorno para datos sensibles
|
|
38
|
+
|
|
39
|
+
### Para Contribuidores
|
|
40
|
+
|
|
41
|
+
- Nunca commitees secrets, tokens, o credenciales
|
|
42
|
+
- Valida todos los inputs del usuario
|
|
43
|
+
- Sanitiza paths antes de operaciones de filesystem
|
|
44
|
+
- Implementa rate limiting donde sea apropiado
|
|
45
|
+
|
|
46
|
+
## Dependencias de Seguridad
|
|
47
|
+
|
|
48
|
+
Monitoreamos activamente:
|
|
49
|
+
|
|
50
|
+
- GitHub Security Advisories
|
|
51
|
+
- NPM Security Advisories
|
|
52
|
+
- OWASP Top 10
|
|
53
|
+
|
|
54
|
+
## Auditorías
|
|
55
|
+
|
|
56
|
+
- Auditoría de código: Trimestral
|
|
57
|
+
- Auditoría de dependencias: Mensual
|
|
58
|
+
- Penetration testing: Anual
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ESLint Configuration (v9+)
|
|
3
|
+
* Configuración de linting para AWC ZNS-MTD
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const js = require('@eslint/js');
|
|
7
|
+
const globals = require('globals');
|
|
8
|
+
|
|
9
|
+
module.exports = [
|
|
10
|
+
// Ignorar directorios
|
|
11
|
+
{
|
|
12
|
+
ignores: ['node_modules/**', 'coverage/**', 'dist/**', 'build/**', '*.min.js', '.awc/**']
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
// Configuración base
|
|
16
|
+
js.configs.recommended,
|
|
17
|
+
|
|
18
|
+
// Archivos JavaScript
|
|
19
|
+
{
|
|
20
|
+
files: ['**/*.js'],
|
|
21
|
+
languageOptions: {
|
|
22
|
+
ecmaVersion: 'latest',
|
|
23
|
+
sourceType: 'commonjs',
|
|
24
|
+
globals: {
|
|
25
|
+
...globals.node,
|
|
26
|
+
...globals.es2021
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
rules: {
|
|
30
|
+
// Errores
|
|
31
|
+
'no-console': 'off',
|
|
32
|
+
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
|
33
|
+
'no-throw-literal': 'error',
|
|
34
|
+
'no-return-await': 'error',
|
|
35
|
+
|
|
36
|
+
// Warnings
|
|
37
|
+
'prefer-const': 'warn',
|
|
38
|
+
'no-var': 'warn',
|
|
39
|
+
'object-shorthand': 'warn',
|
|
40
|
+
'prefer-template': 'warn',
|
|
41
|
+
|
|
42
|
+
// Style
|
|
43
|
+
semi: ['error', 'always'],
|
|
44
|
+
quotes: ['error', 'single', { avoidEscape: true }],
|
|
45
|
+
'comma-dangle': ['error', 'never'],
|
|
46
|
+
indent: ['error', 2, { SwitchCase: 1 }],
|
|
47
|
+
|
|
48
|
+
// Mejores prácticas
|
|
49
|
+
eqeqeq: ['error', 'always'],
|
|
50
|
+
curly: ['error', 'all'],
|
|
51
|
+
'no-eval': 'error',
|
|
52
|
+
'no-implied-eval': 'error',
|
|
53
|
+
'no-with': 'error',
|
|
54
|
+
'no-new-func': 'error'
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
// Archivos de test
|
|
59
|
+
{
|
|
60
|
+
files: ['test/**/*.js', '**/*.test.js', '**/*.spec.js'],
|
|
61
|
+
languageOptions: {
|
|
62
|
+
globals: {
|
|
63
|
+
...globals.jest
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
rules: {
|
|
67
|
+
'no-unused-expressions': 'off'
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
];
|
package/jest.config.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Jest Configuration
|
|
3
|
+
* Testing framework para AWC ZNS-MTD
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
module.exports = {
|
|
7
|
+
// Directorio raíz de tests
|
|
8
|
+
testEnvironment: 'node',
|
|
9
|
+
|
|
10
|
+
// Paths de tests
|
|
11
|
+
testMatch: ['**/test/unit/**/*.test.js', '**/test/integration/**/*.test.js'],
|
|
12
|
+
|
|
13
|
+
// Coverage
|
|
14
|
+
collectCoverageFrom: [
|
|
15
|
+
'tools/**/*.js',
|
|
16
|
+
'src/**/*.js',
|
|
17
|
+
'!**/node_modules/**',
|
|
18
|
+
'!**/test/**',
|
|
19
|
+
'!**/coverage/**'
|
|
20
|
+
],
|
|
21
|
+
|
|
22
|
+
coverageThreshold: {
|
|
23
|
+
global: {
|
|
24
|
+
branches: 5,
|
|
25
|
+
functions: 10,
|
|
26
|
+
lines: 5,
|
|
27
|
+
statements: 5
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
// Directorio de coverage
|
|
32
|
+
coverageDirectory: 'coverage',
|
|
33
|
+
|
|
34
|
+
// Reporters
|
|
35
|
+
coverageReporters: ['text', 'lcov', 'html'],
|
|
36
|
+
|
|
37
|
+
// Timeout para tests
|
|
38
|
+
testTimeout: 10000,
|
|
39
|
+
|
|
40
|
+
// Setup files
|
|
41
|
+
setupFilesAfterEnv: ['<rootDir>/test/setup.js'],
|
|
42
|
+
|
|
43
|
+
// Verbose
|
|
44
|
+
verbose: true,
|
|
45
|
+
|
|
46
|
+
// Clear mocks entre tests
|
|
47
|
+
clearMocks: true,
|
|
48
|
+
restoreMocks: true
|
|
49
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "awc-zns-mtd",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.10.3",
|
|
5
5
|
"description": "AWC ZNS-MTD Method - Metodología de Transformación Digital basada en Minimalismo Estratégico",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"awc",
|
|
@@ -36,27 +36,53 @@
|
|
|
36
36
|
"version:bump:minor": "node tools/version/version-bump.js minor",
|
|
37
37
|
"version:bump:patch": "node tools/version/version-bump.js patch",
|
|
38
38
|
"version:check": "node tools/cli/awc-cli.js version",
|
|
39
|
-
"test": "
|
|
39
|
+
"test": "jest --coverage",
|
|
40
|
+
"test:watch": "jest --watch",
|
|
41
|
+
"test:unit": "jest test/unit",
|
|
42
|
+
"test:integration": "jest test/integration",
|
|
40
43
|
"test:schemas": "node test/test-agent-schema.js",
|
|
41
44
|
"test:agents": "node test/test-agents.js",
|
|
42
45
|
"validate:schemas": "node tools/schema/validate-agent-schema.js",
|
|
43
|
-
"lint": "eslint . --
|
|
44
|
-
"lint:fix": "eslint . --
|
|
46
|
+
"lint": "eslint . --max-warnings=0",
|
|
47
|
+
"lint:fix": "eslint . --fix",
|
|
45
48
|
"format:check": "prettier --check \"**/*.{js,json,md,yaml}\"",
|
|
46
|
-
"format:fix": "prettier --write \"**/*.{js,json,md,yaml}\""
|
|
49
|
+
"format:fix": "prettier --write \"**/*.{js,json,md,yaml}\"",
|
|
50
|
+
"audit:security": "npm audit --audit-level=moderate",
|
|
51
|
+
"prepare": "husky"
|
|
47
52
|
},
|
|
48
53
|
"dependencies": {
|
|
49
|
-
"chalk": "
|
|
50
|
-
"commander": "
|
|
51
|
-
"fs-extra": "
|
|
52
|
-
"inquirer": "
|
|
53
|
-
"js-yaml": "
|
|
54
|
-
"ora": "
|
|
55
|
-
"semver": "
|
|
54
|
+
"chalk": "4.1.2",
|
|
55
|
+
"commander": "11.1.0",
|
|
56
|
+
"fs-extra": "11.2.0",
|
|
57
|
+
"inquirer": "8.2.7",
|
|
58
|
+
"js-yaml": "4.1.1",
|
|
59
|
+
"ora": "5.4.1",
|
|
60
|
+
"semver": "7.6.3",
|
|
61
|
+
"winston": "3.17.0"
|
|
56
62
|
},
|
|
57
63
|
"devDependencies": {
|
|
58
|
-
"
|
|
59
|
-
"
|
|
64
|
+
"@types/fs-extra": "11.0.4",
|
|
65
|
+
"@types/inquirer": "9.0.9",
|
|
66
|
+
"@types/jest": "29.5.14",
|
|
67
|
+
"@types/node": "25.0.3",
|
|
68
|
+
"eslint": "9.39.2",
|
|
69
|
+
"eslint-config-prettier": "9.1.0",
|
|
70
|
+
"eslint-plugin-jest": "28.9.0",
|
|
71
|
+
"globals": "17.0.0",
|
|
72
|
+
"husky": "9.1.7",
|
|
73
|
+
"jest": "29.7.0",
|
|
74
|
+
"lint-staged": "16.2.7",
|
|
75
|
+
"prettier": "3.4.2",
|
|
76
|
+
"typescript": "5.9.3"
|
|
77
|
+
},
|
|
78
|
+
"lint-staged": {
|
|
79
|
+
"*.js": [
|
|
80
|
+
"eslint --fix",
|
|
81
|
+
"prettier --write"
|
|
82
|
+
],
|
|
83
|
+
"*.{json,md,yaml}": [
|
|
84
|
+
"prettier --write"
|
|
85
|
+
]
|
|
60
86
|
},
|
|
61
87
|
"engines": {
|
|
62
88
|
"node": ">=18.0.0",
|