autoforce 0.1.27 → 0.1.29
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/.autoforce.json +1 -1
- package/CHANGELOG.md +7 -0
- package/README.md +4 -4
- package/lib/helpers/context.d.ts +1 -2
- package/lib/helpers/context.js +4 -6
- package/models/dev/npm/subtasks/postpack.json +11 -0
- package/models/dev/npm/subtasks/postpublish.json +12 -0
- package/models/dev/npm/subtasks/{pack.json → prepack.json} +7 -12
- package/models/dev/scratchs/subtasks/create-scratch.json +1 -0
- package/models/doc/processes/new/process.json +1 -1
- package/package.json +4 -3
- package/models/dev/npm/tasks/publish.json +0 -14
package/.autoforce.json
CHANGED
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
@@ -126,14 +126,14 @@ La guia del readme sirve de ejemplo.
|
|
126
126
|
|
127
127
|
## Testear una version en forma local
|
128
128
|
|
129
|
-
Para hacer un testeo local se puede generar una version nueva
|
129
|
+
Para hacer un testeo local se puede generar una version nueva. Esto pide un nro de version arma el package en root como autoforce-latest.tgz
|
130
130
|
|
131
131
|
```
|
132
|
-
yarn
|
132
|
+
yarn pack
|
133
133
|
```
|
134
134
|
|
135
|
-
|
135
|
+
Despues en el repositorio local autoforce-test, hay un script que lo instala.
|
136
136
|
|
137
137
|
```
|
138
|
-
|
138
|
+
./scripts/test/upgrade-local.sh
|
139
139
|
```
|
package/lib/helpers/context.d.ts
CHANGED
@@ -85,8 +85,7 @@ declare class Context implements IObjectRecord {
|
|
85
85
|
get dictionaryFolder(): string;
|
86
86
|
get processesHeader(): Record<string, IProcessHeader>;
|
87
87
|
getProcessMetadata(): IProcessInfo[];
|
88
|
-
|
89
|
-
modules(): PromptChoices;
|
88
|
+
modulesFolders(): PromptChoices;
|
90
89
|
get existScratch(): boolean;
|
91
90
|
get scratch(): OrganizationInfo;
|
92
91
|
validate(guards: string[]): Promise<void>;
|
package/lib/helpers/context.js
CHANGED
@@ -370,11 +370,9 @@ class Context {
|
|
370
370
|
}
|
371
371
|
return retArray;
|
372
372
|
}
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
modules() {
|
377
|
-
return this.getModules().map(module => { return { value: module, title: module }; });
|
373
|
+
modulesFolders() {
|
374
|
+
const folders = getFiles(this.dictionaryFolder, filterDirectory, true, ['diccionarios', 'src', '.docusaurus', 'node_modules']).sort();
|
375
|
+
return folders.map(module => { return { value: this.dictionaryFolder + '/' + module, title: module.replaceAll('/', ' > ') }; });
|
378
376
|
}
|
379
377
|
get existScratch() {
|
380
378
|
return typeof this.scratch !== 'undefined';
|
@@ -466,7 +464,7 @@ class Context {
|
|
466
464
|
async askFornewIssueNumber() {
|
467
465
|
if (this.options.issue && this.projectApi) {
|
468
466
|
const issues = await this.projectApi.searchIssues(this.options.issue);
|
469
|
-
if (issues.length
|
467
|
+
if (issues.length > 0) {
|
470
468
|
return `${issues[0].number}`;
|
471
469
|
}
|
472
470
|
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
{
|
2
|
+
"name": "publish",
|
3
|
+
"guards": ["$NPM_TOKEN"],
|
4
|
+
"arguments": {
|
5
|
+
"newVersion": { "required": true , "default": "${version}" }
|
6
|
+
},
|
7
|
+
"description": "Comando para publicar un requerimiento al ambiente",
|
8
|
+
"steps": [
|
9
|
+
{ "name": "Salida para el Changelog.md", "task": "list", "arguments": {"filter": "milestone", "template": "changelog", "milestone": "v${newVersion}"} },
|
10
|
+
{ "name": "Actualiza el milestone", "function": "updateMilestone", "arguments": ["v${newVersion}", "closed"] }
|
11
|
+
]
|
12
|
+
}
|
@@ -1,10 +1,14 @@
|
|
1
1
|
{
|
2
|
-
"name": "
|
3
|
-
"
|
2
|
+
"name": "prepack",
|
3
|
+
"arguments": {
|
4
|
+
"newVersion": { "required": true, "default": "${version}" }
|
5
|
+
},
|
6
|
+
"description": "Comando para previo al pack",
|
4
7
|
"steps": [
|
8
|
+
{ "name": "Actualiza la version", "function": "storeConfig", "arguments": ["version", "${newVersion}"] },
|
5
9
|
{
|
6
10
|
"name": "Borra el paquete",
|
7
|
-
"command": "rm autoforce*.tgz",
|
11
|
+
"command": "rm -f autoforce*.tgz",
|
8
12
|
"onError": "skip"
|
9
13
|
},
|
10
14
|
{
|
@@ -15,15 +19,6 @@
|
|
15
19
|
{
|
16
20
|
"name": "Compila el typescript",
|
17
21
|
"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
22
|
}
|
27
23
|
]
|
28
24
|
}
|
29
|
-
|
@@ -18,6 +18,7 @@
|
|
18
18
|
"--definition-file": "${projectPath}/config/project-scratch-def.json",
|
19
19
|
"--alias": "${scratchName}",
|
20
20
|
"--name": "${scratchName}",
|
21
|
+
"--wait": "120",
|
21
22
|
"--duration-days": "${dias}"
|
22
23
|
},
|
23
24
|
"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}"
|
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.
|
5
|
+
"version": "0.1.29",
|
6
6
|
"keywords": [
|
7
7
|
"Salesforce",
|
8
8
|
"Automation",
|
@@ -27,9 +27,10 @@
|
|
27
27
|
"scripts": {
|
28
28
|
"prebuild": "rm -rf ./lib/",
|
29
29
|
"build": "tsc --project tsconfig.build.json",
|
30
|
+
"prepack": "npx autoforce subtask prepack",
|
31
|
+
"postpack": "npx autoforce subtask postpack",
|
30
32
|
"prettier": "prettier --write \"**/*.{css,html,js,json,ts,md,xml,yaml,yml}\"",
|
31
|
-
"test:build": "yarn build &&
|
32
|
-
"test:package": "yarn build && npm publish --dry-run && node ./bin/index.js",
|
33
|
+
"test:build": "yarn build && node ./bin/index.js",
|
33
34
|
"test": "vitest"
|
34
35
|
},
|
35
36
|
"devDependencies": {
|
@@ -1,14 +0,0 @@
|
|
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": "Actualiza la version", "function": "storeConfig", "arguments": ["version", "${newVersion}"] },
|
10
|
-
{ "name": "Paquetiza", "subtask": "pack" },
|
11
|
-
{ "name": "Publica", "command": "yarn publish ", "arguments": {"--new-version": "${newVersion}"} },
|
12
|
-
{ "name": "Actualiza el milestone", "function": "updateMilestone", "arguments": ["v${newVersion}", "closed"] }
|
13
|
-
]
|
14
|
-
}
|