autoforce 0.1.9 → 0.1.11

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.
Files changed (55) hide show
  1. package/CHANGELOG.md +20 -3
  2. package/README.md +6 -3
  3. package/commands/modelA/tasks/start.json +2 -2
  4. package/commands/modelC/new/issue.json +41 -0
  5. package/commands/modelC/subtasks/checkout-branch.json +60 -0
  6. package/commands/modelC/subtasks/create-pull.json +20 -0
  7. package/commands/modelC/subtasks/pack.json +29 -0
  8. package/commands/modelC/subtasks/publish-branch.json +20 -0
  9. package/commands/modelC/tasks/cancel.json +6 -0
  10. package/commands/modelC/tasks/finish.json +41 -0
  11. package/commands/modelC/tasks/list.json +11 -0
  12. package/commands/modelC/tasks/publish.json +13 -0
  13. package/commands/modelC/tasks/start.json +51 -0
  14. package/commands/modelC/tasks/stop.json +32 -0
  15. package/commands/modelC/tasks/switch.json +53 -0
  16. package/commands/modelC/tasks/view.json +13 -0
  17. package/commands/models.json +18 -0
  18. package/lib/auto.js +2 -1
  19. package/lib/helpers/class.js +4 -3
  20. package/lib/helpers/context.d.ts +4 -1
  21. package/lib/helpers/context.js +48 -27
  22. package/lib/helpers/github-graphql.d.ts +1 -1
  23. package/lib/helpers/github-graphql.js +1 -1
  24. package/lib/helpers/github-project-graphql.d.ts +9 -1
  25. package/lib/helpers/github-project-graphql.js +22 -12
  26. package/lib/helpers/gitlab-graphql.d.ts +2 -1
  27. package/lib/helpers/gitlab-graphql.js +7 -2
  28. package/lib/helpers/lwc.js +4 -3
  29. package/lib/helpers/metadata.js +2 -2
  30. package/lib/helpers/object.js +4 -3
  31. package/lib/helpers/openai.js +1 -1
  32. package/lib/helpers/taskFunctions.js +29 -8
  33. package/lib/helpers/tasks.js +7 -7
  34. package/lib/helpers/template.d.ts +3 -3
  35. package/lib/helpers/template.js +5 -4
  36. package/lib/helpers/util.d.ts +8 -1
  37. package/lib/helpers/util.js +86 -20
  38. package/package.json +1 -1
  39. package/templates/modelB/changelog.md +4 -0
  40. package/templates/modelB/openIssues.md +0 -0
  41. package/templates/models.json +12 -0
  42. package/templates/story.md +0 -32
  43. package/templates/usecase.md +0 -52
  44. /package/templates/{dictionary → modelA/dictionary}/class-all.md +0 -0
  45. /package/templates/{dictionary → modelA/dictionary}/class-diagrama.md +0 -0
  46. /package/templates/{dictionary → modelA/dictionary}/class-inner.md +0 -0
  47. /package/templates/{dictionary → modelA/dictionary}/class-metodos.md +0 -0
  48. /package/templates/{dictionary → modelA/dictionary}/class-public.md +0 -0
  49. /package/templates/{dictionary → modelA/dictionary}/class-referencias.md +0 -0
  50. /package/templates/{dictionary → modelA/dictionary}/class.md +0 -0
  51. /package/templates/{dictionary → modelA/dictionary}/classes.md +0 -0
  52. /package/templates/{dictionary → modelA/dictionary}/object.md +0 -0
  53. /package/templates/{dictionary → modelA/dictionary}/objects.md +0 -0
  54. /package/templates/{intro.md → modelA/intro.md} +0 -0
  55. /package/templates/{process.md → modelA/process.md} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,4 +1,21 @@
1
+ # Versiones
1
2
 
2
- Version 0.1.19
3
- * Comando de new issue para crear un issue nuevo en el backlog
4
- * Comando de list para ver issues en backlog o ver los detalles de uno
3
+ ## Version 0.1.10
4
+ - Fecha: 28/11/2024
5
+ - Cambios:
6
+ * [publish deberia pedir la version, y asignarla en el autoforce version](https://github.com/sebastianclaros/autoforce/issues/12)
7
+ * [Models en config que lea un json descriptivo](https://github.com/sebastianclaros/autoforce/issues/9)
8
+ * [comando list](https://github.com/sebastianclaros/autoforce/issues/1)
9
+ * [Guard para verificar existencia de Variables de Entorno por ejemplo NPM_TOKEN con un $NPM_TOKEN ?
10
+ (https://github.com/sebastianclaros/autoforce/issues/10)
11
+ ]
12
+ * [New issue con Body optativo](https://github.com/sebastianclaros/autoforce/issues/3)
13
+ * [Parametros adicionales tipo npx autoforce start XXX](https://github.com/sebastianclaros/autoforce/issues/5)
14
+ * [Modelos en los Templates](https://github.com/sebastianclaros/autoforce/issues/8)
15
+
16
+
17
+ ## Version 0.1.9
18
+
19
+ - Cambios:
20
+ * Comando de new issue para crear un issue nuevo en el backlog
21
+ * Comando de list para ver issues en backlog o ver los detalles de uno
package/README.md CHANGED
@@ -5,8 +5,11 @@ El proyecto esta en Beta todavia, recien fue migrado a Typescript y paso de ser
5
5
 
6
6
  ## Objetivo
7
7
 
8
- La motivacion de crear la herramienta fue facilitar y automatizar las tareas comunes que realizamos los desarrolladores, especialmente los que utilizacion Salesforce.
9
- A medida que pasa el tiempo tenemos cada vez mas herramientas diarias y especificas, pero las tareas en si son las mismas, queremos arrancar a desarrollar algo nuevo (start), terminar el desarrollo(finish), o bien dejarlo a un costado (stop), y posiblemente cancelar por completo alguno (cancel).
8
+ La motivacion de crear la herramienta fue facilitar y automatizar las tareas comunes que realizamos los desarrolladores, especialmente los que utilizamos Salesforce.
9
+
10
+ Me vi en la necesidad de tener una herramienta porque muchas veces me ganaba la ansiedad y queria hacer varios cambios juntos. Sentia que hacer varios stories, cada una con su branch, y todo el proceso era perder mucho tiempo. Pero cuando uno logra automatizar el repositorio queda mas prolijo y la trazabilidad tambien, y permite que otros desarrolladores puedan colaborar de forma mas simple.
11
+
12
+ En general cuando desarrollamos, repetimos mas o menos las mismas tareas. Arrancamos a desarrollar algo nuevo (start), terminamos ese desarrollo(finish), o bien dejarlo a un costado (stop), y posiblemente lo descartamos por completo (cancel). Dependiendo la tecnologia, el tipo de desarrollo, y que estrategia de branching, entre otras cosas mas, estas tareas podrian ser distintas.
10
13
 
11
14
  En este repo las tareas buscan automatizar o integrar el siguiente tipo gestiones:
12
15
 
@@ -30,7 +33,7 @@ En este repo las tareas buscan automatizar o integrar el siguiente tipo gestione
30
33
 
31
34
  - [Model B] "Desarrollo de Producto": 0%
32
35
 
33
- - [Custom] "Modelo configurado fuera de la herramienta"
36
+ - [Custom] "Modelo personalizado"
34
37
 
35
38
  2. Github Services
36
39
  - Github: Listo
@@ -29,7 +29,7 @@
29
29
  "function": "assignIssueToMe",
30
30
  "arguments": ["${newIssueNumber}"],
31
31
  "errorMessage": "No se pudo pudo asignar la branch (${newBranchName}) al issue. Por favor hagalo manualmente",
32
- "skipOnError": true
32
+ "onError": "skip"
33
33
  },
34
34
  {
35
35
  "name": "Pone la branch en el issue",
@@ -39,7 +39,7 @@
39
39
  "issueNumber": "${newIssueNumber}"
40
40
  },
41
41
  "errorMessage": "No se pudo asignar la branch ${newBranchName} al issue ${newIssueNumber}. Hagalo manualmente",
42
- "skipOnError": true
42
+ "onError": "skip"
43
43
  },
44
44
  {
45
45
  "name": "Asocia la branch con el remote",
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "issue",
3
+ "guards": ["isGitApi"],
4
+ "arguments": {
5
+ "title": { "required": true },
6
+ "label": {
7
+ "type": "select",
8
+ "choices": [
9
+ {
10
+ "title": "Automation",
11
+ "value": "automation",
12
+ "description": "Test cases de automatizacion o cualquier cambio dentro de la automatizacion del pipeline"
13
+ },
14
+ {
15
+ "title": "Bugfix",
16
+ "value": "bug",
17
+ "description": "Correxion de codigo, no hay incremento funcional"
18
+ },
19
+ {
20
+ "title": "Documentation",
21
+ "value": "documentation",
22
+ "description": "Cambios en la documentacion"
23
+ },
24
+ {
25
+ "title": "Feature",
26
+ "value": "feature",
27
+ "description": "Nuevas funcionalidades"
28
+ }
29
+ ]
30
+ },
31
+ "body": { "required": false }
32
+ },
33
+ "description": "Comando para crear un requerimiento nuevo",
34
+ "steps": [
35
+ {
36
+ "name": "Crear un issue nuevo",
37
+ "function": "createIssue",
38
+ "arguments": ["${title}", "${label}", "${body}"]
39
+ }
40
+ ]
41
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "checkout-branch",
3
+ "guards": ["isGitApi"],
4
+ "arguments": ["newBranchName"],
5
+ "description": "Comando para cambiar de branch y baja cualquier cambio que este en la remote branch o en main",
6
+ "steps": [
7
+ {
8
+ "name": "valida que no sea la branch actual",
9
+ "function": "validaNoseaBranchActual",
10
+ "arguments": ["${newBranchName}"],
11
+ "description": "Valida que no sea la branch actual",
12
+ "errorMessage": "Ya esta parado sobre la branch ${newBranchName}"
13
+ },
14
+ {
15
+ "name": "chequea si hay cambios sin commit",
16
+ "function": "checkCommitPending",
17
+ "description": "Chequea si hay algo sin commitear",
18
+ "errorMessage": "Tiene modificaciones pendientes:\n ${salida}",
19
+ "onError": "commitChanges"
20
+ },
21
+ {
22
+ "name": "baja cambios en remote y en main",
23
+ "command": "git",
24
+ "arguments": ["fetch"],
25
+ "description": "Baja de remote",
26
+ "errorMessage": "No se pudo actualizar la branch, intente manualmente con git fetch"
27
+ },
28
+ {
29
+ "criteria": { "field": "existNewBranch", "value": true },
30
+ "name": "cambia de branch",
31
+ "command": "git",
32
+ "arguments": ["checkout", "${newBranchName}"],
33
+ "description": "Cambia de branch",
34
+ "errorMessage": "No se pudo mover al branch ${newBranchName}. Hagalo manualmente ${command}"
35
+ },
36
+ {
37
+ "criteria": { "field": "existNewBranch", "value": true },
38
+ "name": "baja de la remote branch",
39
+ "command": "git",
40
+ "arguments": ["pull", "--set-upstream", "origin ${newBranchName}"],
41
+ "description": "Trae contenido de branch remota",
42
+ "errorMessage": "No se pudo traer de la remote branch ${newBranchName}. Hagalo manualmente ${command}"
43
+ },
44
+ {
45
+ "criteria": { "field": "existNewBranch", "value": true },
46
+ "name": "merge de main",
47
+ "command": "git",
48
+ "arguments": ["merge main"],
49
+ "description": "Trae cualquier cambio en main",
50
+ "errorMessage": "No se pudo actualizar la branch con main, intente manualmente con git merge main"
51
+ },
52
+ {
53
+ "criteria": { "field": "existNewBranch", "value": false },
54
+ "name": "crea de branch",
55
+ "function": "createBranch",
56
+ "description": "Crea la nueva branch ${newBranchName}",
57
+ "errorMessage": "No se pudo crear la branch ${newBranchName}. Hagalo manualmente ${command}"
58
+ }
59
+ ]
60
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "create-pull",
3
+ "guards": ["isGitApi"],
4
+ "description": "Comando para crear el pull request de la branch",
5
+ "steps": [
6
+ {
7
+ "name": "chequea si hay cambios sin commit",
8
+ "function": "checkCommitPending",
9
+ "description": "Chequea si hay algo sin commitear",
10
+ "errorMessage": "Tiene modificaciones pendientes:\n ${salida}",
11
+ "onError": "commitChanges"
12
+ },
13
+ {
14
+ "name": "publica la branch",
15
+ "function": "publishBranch",
16
+ "description": "Publicha la branch en Remote",
17
+ "errorMessage": "No se pudo publicar la branch"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "pack",
3
+ "description": "Comando para crear el package localmente",
4
+ "steps": [
5
+ {
6
+ "name": "Borra el paquete",
7
+ "command": "rm autoforce*.tgz",
8
+ "onError": "skip"
9
+ },
10
+ {
11
+ "name": "Borra los archivos en Lib",
12
+ "command": "rm -rf ./lib/",
13
+ "onError": "skip"
14
+ },
15
+ {
16
+ "name": "Compila el typescript",
17
+ "command": "tsc --project tsconfig.build.json"
18
+ },
19
+ {
20
+ "name": "Arma el paquete",
21
+ "command": "yarn pack"
22
+ },
23
+ {
24
+ "name": "Renombra paquete",
25
+ "command": "mv autoforce*.tgz autoforce.tgz"
26
+ }
27
+ ]
28
+ }
29
+
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "publish-branch",
3
+ "guards": ["isGitApi"],
4
+ "description": "Comando para publicar la branch en Remote",
5
+ "steps": [
6
+ {
7
+ "name": "chequea si hay cambios sin commit",
8
+ "function": "checkCommitPending",
9
+ "description": "Chequea si hay algo sin commitear",
10
+ "errorMessage": "Tiene modificaciones pendientes:\n ${salida}",
11
+ "onError": "commitChanges"
12
+ },
13
+ {
14
+ "name": "publica la branch",
15
+ "function": "publishBranch",
16
+ "description": "Publicha la branch en Remote",
17
+ "errorMessage": "No se pudo publicar la branch"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "cancel",
3
+ "guards": ["isGitApi"],
4
+ "description": "Comando para cancelar un requerimiento",
5
+ "steps": [{ "name": "Cancela el issue", "function": "cancelIssue" }]
6
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "finish",
3
+ "guards": ["isGitApi"],
4
+ "description": "Comando para teminar un requerimiento. Automatiza las acciones cuando se termino el desarrollo de un requerimiento",
5
+ "steps": [
6
+ {
7
+ "criteria": { "field": "isDevelopment", "value": true },
8
+ "subtask": "validate-scratch"
9
+ },
10
+ {
11
+ "name": "chequea si hay cambios sin commit",
12
+ "function": "checkCommitPending",
13
+ "description": "Chequea si hay algo sin commitear:\n ${salida}",
14
+ "errorMessage": "Tiene modificaciones pendientes",
15
+ "onError": "commitChanges"
16
+ },
17
+ {
18
+ "criteria": { "field": "isDevelopment", "value": true },
19
+ "subtask": "update-documentation"
20
+ },
21
+ {
22
+ "criteria": { "field": "isDevelopment", "value": true },
23
+ "subtask": "validate-code"
24
+ },
25
+ {
26
+ "name": "publica la branch",
27
+ "subtask": "publish-branch",
28
+ "description": "Publica la branch en Remote",
29
+ "errorMessage": "No se pudo publicar la branch"
30
+ },
31
+ {
32
+ "name": "crea el pull request",
33
+ "subtask": "create-pull",
34
+ "description": "Crea el pull request"
35
+ },
36
+ {
37
+ "criteria": { "field": "isDevelopment", "value": true },
38
+ "subtask": "drop-scratch"
39
+ }
40
+ ]
41
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "list",
3
+ "guards": ["isGitApi"],
4
+ "description": "Comando para ver en detalle el requerimiento",
5
+ "steps": [
6
+ {
7
+ "name": "Ver los issues del Backlog",
8
+ "function": "listIssues"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "publish",
3
+ "guards": ["$NPM_TOKEN"],
4
+ "arguments": {
5
+ "newVersion": { "required": true }
6
+ },
7
+ "description": "Comando para publicar un requerimiento al ambiente",
8
+ "steps": [
9
+ { "name": "Paquetiza", "subtask": "pack" },
10
+ { "name": "Actualiza la version", "function": "storeConfig", "arguments": ["version", "${newVersion}"] },
11
+ { "name": "Publica", "command": "yarn publish ", "arguments": {"--new-version": "${newVersion}"} }
12
+ ]
13
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "start",
3
+ "guards": ["isGitApi"],
4
+ "arguments": ["newIssueNumber"],
5
+ "description": "Comando para iniciar un requerimiento. Automatiza las acciones cuando se arranca un requerimiento nuevo",
6
+ "steps": [
7
+ {
8
+ "name": "validate issue",
9
+ "function": "validateIssue",
10
+ "arguments": ["${newIssueNumber}", "Ready,Backlog"],
11
+ "description": "Valida que Issue este en la Columna Ready o Backlog",
12
+ "errorMessage": "Por favor verifique que el issue ${newIssueNumber} este en la columna Ready o Backlog"
13
+ },
14
+ {
15
+ "name": "check Issue type based on Labels",
16
+ "function": "checkIssueType",
17
+ "arguments": ["${newIssueNumber}"],
18
+ "description": "Verifica si el issueType es de Desarrollo o No segun los labels (no desa son automation, documentation)"
19
+ },
20
+ { "subtask": "checkout-branch", "arguments": ["${newBranchName}"] },
21
+ {
22
+ "name": "Mueve el issue a In Progress",
23
+ "function": "moveIssue",
24
+ "arguments": ["${newIssueNumber}", "In Progress"],
25
+ "errorMessage": "No se pudo mover el issue a inprogress, hagalo manualmente"
26
+ },
27
+ {
28
+ "name": "Me Asigna el issue",
29
+ "function": "assignIssueToMe",
30
+ "arguments": ["${newIssueNumber}"],
31
+ "errorMessage": "No se pudo pudo asignar la branch (${newBranchName}) al issue. Por favor hagalo manualmente",
32
+ "onError": "skip"
33
+ },
34
+ {
35
+ "name": "Pone la branch en el issue",
36
+ "function": "assignBranchToIssue",
37
+ "arguments": {
38
+ "newBranchName": "${newBranchName}",
39
+ "issueNumber": "${newIssueNumber}"
40
+ },
41
+ "errorMessage": "No se pudo asignar la branch ${newBranchName} al issue ${newIssueNumber}. Hagalo manualmente",
42
+ "onError": "skip"
43
+ },
44
+ {
45
+ "name": "Asocia la branch con el remote",
46
+ "command": "git push -u origin",
47
+ "arguments": ["${newBranchName}"],
48
+ "errorMessage": "No se pudo asociar la branch ${newBranchNamed} al remote. verifique con git branch -vv "
49
+ }
50
+ ]
51
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "stop",
3
+ "guards": ["isGitApi"],
4
+ "description": "Comando para dejar a un lado un requerimiento",
5
+ "steps": [
6
+ {
7
+ "criteria": { "field": "isDevelopment", "value": true },
8
+ "subtask": "validate-scratch"
9
+ },
10
+ {
11
+ "criteria": { "field": "isDevelopment", "value": true },
12
+ "subtask": "update-documentation"
13
+ },
14
+ {
15
+ "name": "chequea si hay cambios sin commit",
16
+ "function": "checkCommitPending",
17
+ "description": "Chequea si hay algo sin commitear:\n ${salida}",
18
+ "errorMessage": "Tiene modificaciones pendientes",
19
+ "onError": "commitChanges"
20
+ },
21
+ {
22
+ "name": "publica la branch",
23
+ "subtask": "publish-branch",
24
+ "description": "Publica la branch en Remote",
25
+ "errorMessage": "No se pudo publicar la branch"
26
+ },
27
+ {
28
+ "criteria": { "field": "isDevelopment", "value": true },
29
+ "subtask": "drop-scratch"
30
+ }
31
+ ]
32
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "switch",
3
+ "guards": ["isGitApi"],
4
+ "arguments": ["newIssueNumber"],
5
+ "description": "Comando para cambiar el requerimiento a desarrollar",
6
+ "steps": [
7
+ {
8
+ "name": "validate issue",
9
+ "function": "validateIssue",
10
+ "arguments": ["${newIssueNumber}", "In Progress"],
11
+ "description": "Valida que Issue este en la Columna In Progress",
12
+ "errorMessage": "Por favor verifique que el issue ${newIssueNumber} este en la columna In Progress"
13
+ },
14
+ {
15
+ "name": "check Issue type based on Labels",
16
+ "function": "checkIssueType",
17
+ "arguments": ["${newIssueNumber}"],
18
+ "description": "Verifica si el issueType es de Desarrollo o No segun los labels (no desa son automation, documentation)"
19
+ },
20
+ {
21
+ "name": "Se fija que este parado en ${newBranchName}",
22
+ "function": "validaNoseaBranchActual",
23
+ "arguments": ["${newBranchName}"],
24
+ "description": "Valida que no sea la branch actual",
25
+ "errorMessage": "Ya esta parado sobre la branch ${newBranchName}"
26
+ },
27
+ {
28
+ "criteria": { "field": "isDevelopment", "value": true },
29
+ "subtask": "update-documentation"
30
+ },
31
+ {
32
+ "criteria": { "field": "isDevelopment", "value": true },
33
+ "subtask": "validate-scratch"
34
+ },
35
+ { "subtask": "checkout-branch", "arguments": ["${newBranchName}"] },
36
+ {
37
+ "criteria": { "field": "isNewDevelopment", "value": true },
38
+ "name": "switch scratch",
39
+ "command": "sf force config set target-org",
40
+ "arguments": { "--target-org": "${newBranchName}" },
41
+ "description": "Cambia la scratch",
42
+ "errorMessage": "No se pudo mover al scratch ${newBranchName}. Hagalo manualmente ${command}"
43
+ },
44
+ {
45
+ "criteria": { "field": "isNewDevelopment", "value": true },
46
+ "name": "deploy scratch localmente",
47
+ "command": "sf project deploy start",
48
+ "arguments": { "--target-org": "${newBranchName}" },
49
+ "description": "Deploy por si hubo cambios en main",
50
+ "errorMessage": "No se pudo mover al scratch ${newBranchName}. Hagalo manualmente ${command}"
51
+ }
52
+ ]
53
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "view",
3
+ "guards": ["isGitApi"],
4
+ "arguments": ["issueNumber"],
5
+ "description": "Comando para ver en detalle el requerimiento",
6
+ "steps": [
7
+ {
8
+ "name": "Ver datos del issue",
9
+ "function": "viewIssue",
10
+ "arguments": ["${issueNumber}"]
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,18 @@
1
+ [
2
+ {
3
+ "title": "Continious Delivery con Scratch Orgs",
4
+ "value": "modelA",
5
+ "description": "Github workflow pensado en soluciones para Clientes finales"
6
+ },
7
+ {
8
+ "title": "Second Generation Packages con Scratch Orgs",
9
+ "value": "modelB",
10
+ "description": "Gitflow workflow pensado para ISV"
11
+ },
12
+ {
13
+ "title": "Paquetes de NPM",
14
+ "value": "modelC",
15
+ "description": "Para herramientas complementarias como autoforce"
16
+ }
17
+ ]
18
+
package/lib/auto.js CHANGED
@@ -12,6 +12,7 @@ import { createObject, validateTask, getTasks, helpTask, runTask, getTaskFolder
12
12
  import { logError } from "./helpers/color.js";
13
13
  import prompts from "prompts";
14
14
  import { createConfigurationFile } from "./helpers/util.js";
15
+ import context from "./helpers/context.js";
15
16
  const proxyCommand = {
16
17
  'version': showVersion,
17
18
  'config': createConfigurationFile
@@ -24,7 +25,7 @@ const taskCommand = {
24
25
  };
25
26
  function showVersion() {
26
27
  return __awaiter(this, void 0, void 0, function* () {
27
- console.log('AutoForce v0.1.4');
28
+ console.log('AutoForce v' + context.version);
28
29
  return true;
29
30
  });
30
31
  }
@@ -9,8 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import sf from "./connect.js";
11
11
  import templateGenerator from "./template.js";
12
- const templateEngine = templateGenerator("dictionary", "md");
13
- import { sortByName, getNamesByExtension, verFecha, splitFilename, DICTIONARY_FOLDER, TEMPLATES_FOLDER } from "./util.js";
12
+ import { DICTIONARY_FOLDER, TEMPLATE_MODEL_FOLDER } from "./util.js";
13
+ const templateEngine = templateGenerator(`${TEMPLATE_MODEL_FOLDER}/dictionary`, "md");
14
+ import { sortByName, getNamesByExtension, verFecha, splitFilename } from "./util.js";
14
15
  function getMetadata(clases) {
15
16
  return __awaiter(this, void 0, void 0, function* () {
16
17
  try {
@@ -189,7 +190,7 @@ function executeClasses(items, filename, folder) {
189
190
  classLink
190
191
  }
191
192
  });
192
- templateEngine.save(filename, TEMPLATES_FOLDER + "/" + folder);
193
+ templateEngine.save(filename, +"/" + folder);
193
194
  });
194
195
  }
195
196
  const classModule = {
@@ -15,9 +15,11 @@ export declare enum ProjectServices {
15
15
  declare class Context implements IObjectRecord {
16
16
  [s: string]: AnyValue | undefined;
17
17
  model: string;
18
+ modelTemplates: string;
18
19
  gitServices: GitServices;
19
20
  isGitApi: boolean;
20
21
  gitApi: IGitApi | undefined;
22
+ version: string | undefined;
21
23
  projectServices: ProjectServices;
22
24
  isProjectApi: boolean;
23
25
  projectApi: IProjectApi | undefined;
@@ -47,10 +49,11 @@ declare class Context implements IObjectRecord {
47
49
  repositoryRepo: string | undefined;
48
50
  projectId: string | undefined;
49
51
  backlogColumn: string;
52
+ constructor();
50
53
  loadProjectApi(): void;
51
54
  loadGitApi(): void;
52
55
  loadPackage(): void;
53
- loadConfig(): void;
56
+ loadConfig(): Promise<boolean>;
54
57
  init(): void;
55
58
  get targetOrg(): string;
56
59
  get existBranchScratch(): boolean;