autoforce 0.1.25 → 0.1.26

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Versiones
2
2
 
3
+ 0.1.26
4
+ ## Version 0.1.26
5
+ - Fecha:
6
+ - Paquete: [Descargar](https://www.npmjs.com/package/autoforce/v/0.1.26)
7
+ - Cambios:
8
+ * Bugfixing de create-scracth para autoforce-test
9
+
3
10
 
4
11
  0.1.25
5
12
  ## Version 0.1.25
@@ -24,6 +24,7 @@ declare class Context implements IObjectRecord {
24
24
  gitModel: string | undefined;
25
25
  docModel: string | undefined;
26
26
  errorMessage: string;
27
+ projectPath: string;
27
28
  projectModel: string | undefined;
28
29
  gitServices: GitServices;
29
30
  isGitApi: boolean;
@@ -43,13 +43,16 @@ function searchInFolderHierarchy(element, parentFolder) {
43
43
  }
44
44
  return '';
45
45
  }
46
+ function getProjectPath() {
47
+ return searchInFolderHierarchy('package.json', process.cwd() || '.');
48
+ }
46
49
  function getDataFromPackage() {
47
50
  const data = {};
48
51
  try {
49
- const PROJECT_FOLDER = searchInFolderHierarchy('package.json', process.cwd() || '.');
50
- const filename = `${PROJECT_FOLDER}/package.json`;
52
+ const projectPath = getProjectPath();
53
+ const filename = `${projectPath}/package.json`;
51
54
  if (!fs.existsSync(filename)) {
52
- throw new Error("No se encontro el package.json en " + PROJECT_FOLDER);
55
+ throw new Error("No se encontro el package.json en " + projectPath);
53
56
  }
54
57
  const content = fs.readFileSync(filename, "utf8");
55
58
  const packageJson = JSON.parse(content);
@@ -91,6 +94,7 @@ class Context {
91
94
  gitModel;
92
95
  docModel;
93
96
  errorMessage = '';
97
+ projectPath = getProjectPath();
94
98
  projectModel;
95
99
  gitServices = GitServices.None;
96
100
  isGitApi = false;
@@ -57,7 +57,8 @@ export async function executeCommand(step) {
57
57
  execSync(step.command + ' ' + convertArgsToString(step.arguments), { stdio: 'inherit' });
58
58
  return true;
59
59
  }
60
- catch {
60
+ catch (e) {
61
+ context.errorMessage = `Se produjo un error al ejecutar el comando: ${e}`;
61
62
  return false;
62
63
  }
63
64
  }
@@ -20,7 +20,7 @@
20
20
  "--name": "${scratchName}",
21
21
  "--duration-days": "${dias}"
22
22
  },
23
- "errorMessage": "No se pudo crear la scracth org, verifique que no se haya pasado del limite scratchs (3 activas)* sf org list --clean\n* o bien si quedo en la mitad del proceso\n* sf org resume"
23
+ "errorMessage": "No se pudo crear la scracth org, verifique que no se haya pasado del limite scratchs (3 activas)* sf org list --clean\n* o bien si quedo en la mitad del proceso\n* sf org resume. Pruebe manualmente: ${command}"
24
24
  },
25
25
  {
26
26
  "criteria": { "field": "existBranchScratch", "value": true },
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "autoforce",
3
3
  "homepage": "https://sebastianclaros.github.io/autoforce",
4
4
  "private": false,
5
- "version": "0.1.25",
5
+ "version": "0.1.26",
6
6
  "keywords": [
7
7
  "Salesforce",
8
8
  "Automation",