autoforce 0.1.4 → 0.1.5
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/README.md +42 -2
- package/lib/auto.js +1 -1
- package/lib/helpers/color.d.ts +1 -0
- package/lib/helpers/color.js +4 -1
- package/lib/helpers/context.d.ts +13 -1
- package/lib/helpers/context.js +46 -17
- package/lib/helpers/github-graphql.d.ts +76 -1
- package/lib/helpers/github-graphql.js +363 -331
- package/lib/helpers/util.d.ts +14 -3
- package/lib/helpers/util.js +65 -9
- package/package.json +8 -2
- /package/commands/{new → modelA/new}/issue.json +0 -0
- /package/commands/{new → modelA/new}/process.json +0 -0
- /package/commands/{subtasks → modelA/subtasks}/checkout-branch.json +0 -0
- /package/commands/{subtasks → modelA/subtasks}/create-pull.json +0 -0
- /package/commands/{subtasks → modelA/subtasks}/create-scratch.json +0 -0
- /package/commands/{subtasks → modelA/subtasks}/deploy-code.json +0 -0
- /package/commands/{subtasks → modelA/subtasks}/drop-scratch.json +0 -0
- /package/commands/{subtasks → modelA/subtasks}/package-code.json +0 -0
- /package/commands/{subtasks → modelA/subtasks}/publish-branch.json +0 -0
- /package/commands/{subtasks → modelA/subtasks}/update-documentation.json +0 -0
- /package/commands/{subtasks → modelA/subtasks}/validate-code.json +0 -0
- /package/commands/{subtasks → modelA/subtasks}/validate-scratch.json +0 -0
- /package/commands/{tasks → modelA/tasks}/cancel.json +0 -0
- /package/commands/{tasks → modelA/tasks}/deploy.json +0 -0
- /package/commands/{tasks → modelA/tasks}/finish.json +0 -0
- /package/commands/{tasks → modelA/tasks}/rollback.json +0 -0
- /package/commands/{tasks → modelA/tasks}/start.json +0 -0
- /package/commands/{tasks → modelA/tasks}/stop.json +0 -0
- /package/commands/{tasks → modelA/tasks}/switch.json +0 -0
- /package/commands/{tasks → modelA/tasks}/view.json +0 -0
package/README.md
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
# Autoforce
|
2
2
|
|
3
|
-
El proyecto esta en todavia
|
3
|
+
El proyecto esta en Beta todavia, recien fue migrado a Typescript y paso de ser unos scripts aislados a un modulo que se puede instalar y ejecutar directamente tipo CLI.
|
4
4
|
|
5
5
|
|
6
6
|
## Objetivo
|
7
7
|
|
8
|
-
La
|
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).
|
9
10
|
|
10
11
|
En este repo las tareas buscan automatizar o integrar el siguiente tipo gestiones:
|
11
12
|
|
@@ -17,6 +18,45 @@ En este repo las tareas buscan automatizar o integrar el siguiente tipo gestione
|
|
17
18
|
- Uso de IA ( OpenAI, )
|
18
19
|
|
19
20
|
|
21
|
+
## Roadmap Status
|
22
|
+
|
23
|
+
1. Modelos
|
24
|
+
- [Model A] "Procesos de Negocio en Clientes de Salesforce": 70%
|
25
|
+
Salesforce: Scratchs con Tracking y deploys usando sf cli
|
26
|
+
Documentacion: Markdowns de Procesos con Github pages
|
27
|
+
Gestion de Proyecto: Github Project
|
28
|
+
Source Control: Github
|
29
|
+
Branching Strategy: Github workflow
|
30
|
+
|
31
|
+
- [Model B] "Desarrollo de Producto": 0%
|
32
|
+
|
33
|
+
- [Custom] "Modelo configurado fuera de la herramienta"
|
34
|
+
|
35
|
+
2. Github Services
|
36
|
+
- Github: Listo
|
37
|
+
- Gitlab: 20%
|
38
|
+
- Bitbucket: 0%
|
39
|
+
|
40
|
+
3. Project Services
|
41
|
+
- Github: Listo
|
42
|
+
- Gitlab: 0%
|
43
|
+
- Jira: 0%
|
44
|
+
|
45
|
+
4. Documentation Services
|
46
|
+
- Object: 90%
|
47
|
+
- Classes: 80%
|
48
|
+
- LWC: 10%
|
49
|
+
|
50
|
+
5. IA
|
51
|
+
- Code creation: 0%
|
52
|
+
- Test classes: 0%
|
53
|
+
- Commit Messages: 0%
|
54
|
+
- Code Reviewer: 0%
|
55
|
+
- Documentation: 0%
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
|
20
60
|
## Instalación
|
21
61
|
|
22
62
|
```
|
package/lib/auto.js
CHANGED
package/lib/helpers/color.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
1
|
export declare function logError(message: string, tabs?: string): void;
|
2
|
+
export declare function logWarning(message: string, tabs?: string): void;
|
2
3
|
export declare function logStep(message: string, tabs?: string): void;
|
3
4
|
export declare function getColored(text: string, colorName: string): string;
|
package/lib/helpers/color.js
CHANGED
@@ -24,7 +24,10 @@ const FgGray = "\x1b[90m";
|
|
24
24
|
// const BgWhite = "\x1b[47m"
|
25
25
|
// const BgGray = "\x1b[100m"
|
26
26
|
export function logError(message, tabs = '') {
|
27
|
-
console.error(getColored(`[
|
27
|
+
console.error(getColored(`[Error] ${tabs}${message}`, "red"));
|
28
|
+
}
|
29
|
+
export function logWarning(message, tabs = '') {
|
30
|
+
console.error(getColored(`[Warning] ${tabs}${message}`, "yellow"));
|
28
31
|
}
|
29
32
|
export function logStep(message, tabs = '') {
|
30
33
|
console.info(getColored(`${tabs}${message}`, "green"));
|
package/lib/helpers/context.d.ts
CHANGED
@@ -1,8 +1,20 @@
|
|
1
1
|
import type { PromptChoices } from "../types/helpers/context.js";
|
2
2
|
import type { IProcessHeader, Processes, AnyValue, IProcessInfo, ObjectRecord, IObjectRecord } from "../types/auto.js";
|
3
3
|
import type { TaskArguments, TaskArgument, StepArguments } from "../types/helpers/tasks.js";
|
4
|
+
export declare enum GitServices {
|
5
|
+
GitHub = "github",
|
6
|
+
GitLab = "gitlab",
|
7
|
+
None = "none"
|
8
|
+
}
|
9
|
+
export declare enum GitProjects {
|
10
|
+
GitHub = "github",
|
11
|
+
GitLab = "gitlab",
|
12
|
+
Jira = "Jira",
|
13
|
+
None = "none"
|
14
|
+
}
|
4
15
|
declare class Context implements IObjectRecord {
|
5
16
|
[s: string]: AnyValue | undefined;
|
17
|
+
gitServices: GitServices;
|
6
18
|
isGitApi: boolean;
|
7
19
|
gitApi: IGitApi | undefined;
|
8
20
|
projectApi: IProjectApi | undefined;
|
@@ -31,7 +43,7 @@ declare class Context implements IObjectRecord {
|
|
31
43
|
repositoryType: string | undefined;
|
32
44
|
repositoryOwner: string | undefined;
|
33
45
|
repositoryRepo: string | undefined;
|
34
|
-
|
46
|
+
projectId: string | undefined;
|
35
47
|
loadGitApi(): void;
|
36
48
|
loadPackage(): void;
|
37
49
|
loadConfig(): void;
|
package/lib/helpers/context.js
CHANGED
@@ -9,16 +9,30 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
9
9
|
};
|
10
10
|
import { executeShell, getOrganizationObject, getCurrentOrganization, getBranchName, getTargetOrg } from "./taskFunctions.js";
|
11
11
|
import { convertNameToKey, convertKeyToName, getFiles, filterDirectory, addNewItems, CONFIG_FILE, createConfigurationFile } from "./util.js";
|
12
|
-
|
12
|
+
import { GitHubApi } from "./github-graphql.js";
|
13
13
|
import { GitLabApi } from "./gitlab-graphql.js";
|
14
14
|
import prompts from "prompts";
|
15
15
|
import matter from 'gray-matter';
|
16
16
|
import fs from "fs";
|
17
|
-
import { logError } from "./color.js";
|
17
|
+
import { logError, logWarning } from "./color.js";
|
18
|
+
export var GitServices;
|
19
|
+
(function (GitServices) {
|
20
|
+
GitServices["GitHub"] = "github";
|
21
|
+
GitServices["GitLab"] = "gitlab";
|
22
|
+
GitServices["None"] = "none";
|
23
|
+
})(GitServices = GitServices || (GitServices = {}));
|
24
|
+
export var GitProjects;
|
25
|
+
(function (GitProjects) {
|
26
|
+
GitProjects["GitHub"] = "github";
|
27
|
+
GitProjects["GitLab"] = "gitlab";
|
28
|
+
GitProjects["Jira"] = "Jira";
|
29
|
+
GitProjects["None"] = "none";
|
30
|
+
})(GitProjects = GitProjects || (GitProjects = {}));
|
18
31
|
const filterProcesses = (fullPath) => fullPath.endsWith(".md"); // && !fullPath.endsWith("intro.md")
|
19
32
|
const ISSUES_TYPES = [{ value: 'feature', title: 'feature' }, { value: 'bug', title: 'bug' }, { value: 'documentation', title: 'documentation' }, { value: 'automation', title: 'automation' }];
|
20
33
|
class Context {
|
21
34
|
constructor() {
|
35
|
+
this.gitServices = GitServices.None;
|
22
36
|
this.isGitApi = false;
|
23
37
|
this.sfInstalled = true;
|
24
38
|
this.sfToken = true;
|
@@ -30,20 +44,33 @@ class Context {
|
|
30
44
|
this.salida = '';
|
31
45
|
}
|
32
46
|
loadGitApi() {
|
33
|
-
if (!this.
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
+
if (!this.gitServices && this.repositoryUrl) {
|
48
|
+
if (this.repositoryUrl.indexOf('github') > 0) {
|
49
|
+
this.gitServices = GitServices.GitHub;
|
50
|
+
}
|
51
|
+
else if (this.repositoryUrl.indexOf('gitlab') > 0) {
|
52
|
+
this.gitServices = GitServices.GitLab;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
if (this.gitServices == GitServices.GitHub && process.env.GITHUB_TOKEN) {
|
56
|
+
if (this.repositoryOwner && this.repositoryRepo && this.projectId && Number.isInteger(this.projectId)) {
|
57
|
+
const token = process.env.GITHUB_TOKEN;
|
58
|
+
this.gitApi = new GitHubApi(token, this.repositoryOwner, this.repositoryRepo, Number.parseInt(this.projectId));
|
59
|
+
this.isGitApi = true;
|
60
|
+
}
|
61
|
+
else {
|
62
|
+
logWarning(`No se pudo inicializar el conector a GitHub, Verifique repositoryOwner: ${this.repositoryOwner} o repositoryRepo: ${this.repositoryRepo} o projectId: ${this.projectId}`);
|
63
|
+
}
|
64
|
+
}
|
65
|
+
if (this.gitServices == GitServices.GitLab && process.env.GITLAB_TOKEN) {
|
66
|
+
if (this.repositoryOwner && this.repositoryRepo && this.projectId && Number.isInteger(this.projectId)) {
|
67
|
+
const token = process.env.GITLAB_TOKEN;
|
68
|
+
this.gitApi = new GitLabApi(token, this.repositoryOwner, this.repositoryRepo, Number.parseInt(this.projectId));
|
69
|
+
this.isGitApi = true;
|
70
|
+
}
|
71
|
+
else {
|
72
|
+
logWarning(`No se pudo inicializar el conector a GitLab, Verifique repositoryOwner: ${this.repositoryOwner} o repositoryRepo: ${this.repositoryRepo} o projectId: ${this.projectId}`);
|
73
|
+
}
|
47
74
|
}
|
48
75
|
}
|
49
76
|
loadPackage() {
|
@@ -79,7 +106,9 @@ class Context {
|
|
79
106
|
}
|
80
107
|
loadConfig() {
|
81
108
|
if (!fs.existsSync(CONFIG_FILE)) {
|
82
|
-
|
109
|
+
logWarning('Bienvenido! Antes de usar la herramienta, tenemos que configurarla.');
|
110
|
+
logWarning('Lo puedes hacer mas tarde manualmente leyendo la documentacion y creando .autoforce.json en el root del proyecto');
|
111
|
+
logWarning('O bien ahora con el asistente, el mismo lo puedes llamar todas las veces que necesites corriendo npx autoforce config!');
|
83
112
|
createConfigurationFile();
|
84
113
|
return;
|
85
114
|
}
|
@@ -1 +1,76 @@
|
|
1
|
-
export {
|
1
|
+
export declare class GitHubApi implements IGitApi, IProjectApi {
|
2
|
+
repoVar: {
|
3
|
+
owner: string;
|
4
|
+
repo: string;
|
5
|
+
};
|
6
|
+
projectNumber: number | undefined;
|
7
|
+
graphqlAuth: import("@octokit/graphql/types").graphql;
|
8
|
+
constructor(token: string, owner: string, repo: string, projectNumber?: number);
|
9
|
+
getUser(): Promise<{
|
10
|
+
login: string;
|
11
|
+
id: number;
|
12
|
+
}>;
|
13
|
+
getRepository(label?: string): Promise<{
|
14
|
+
id: string;
|
15
|
+
label?: {
|
16
|
+
id: string;
|
17
|
+
} | undefined;
|
18
|
+
projectV2: {
|
19
|
+
id: string;
|
20
|
+
field: {
|
21
|
+
id: string;
|
22
|
+
name: string;
|
23
|
+
options: {
|
24
|
+
name: string;
|
25
|
+
id: string;
|
26
|
+
}[];
|
27
|
+
};
|
28
|
+
};
|
29
|
+
}>;
|
30
|
+
createPullRequest(branchName: string, title: string, body: string): Promise<boolean>;
|
31
|
+
getColumnValueMap(): Promise<Record<string, string>>;
|
32
|
+
createIssue(title: string, state?: string, label?: string, milestone?: string, body?: string): Promise<number>;
|
33
|
+
moveIssue(issueNumber: number, state: string): Promise<boolean>;
|
34
|
+
assignIssueToMe(issueNumber: number): Promise<boolean>;
|
35
|
+
getCommit(commitSha: string): Promise<{
|
36
|
+
id: string;
|
37
|
+
oid: string;
|
38
|
+
}>;
|
39
|
+
assignBranchToIssue(issueNumber: number, branchName: string, commitSha: string): Promise<boolean>;
|
40
|
+
getIssueState(issueNumber: number): Promise<string>;
|
41
|
+
getIssueName(title: string): string;
|
42
|
+
getIssueObject(issueNumber: number): Promise<IIssueObject>;
|
43
|
+
getIssue(issueNumber: number): Promise<{
|
44
|
+
id: string;
|
45
|
+
title: string;
|
46
|
+
labels: {
|
47
|
+
nodes: {
|
48
|
+
name: string;
|
49
|
+
color: string;
|
50
|
+
}[];
|
51
|
+
};
|
52
|
+
projectItems: {
|
53
|
+
nodes: {
|
54
|
+
id: string;
|
55
|
+
project: {
|
56
|
+
id: string;
|
57
|
+
};
|
58
|
+
fieldValueByName: {
|
59
|
+
name: string;
|
60
|
+
id: string;
|
61
|
+
field: {
|
62
|
+
id: string;
|
63
|
+
};
|
64
|
+
};
|
65
|
+
}[];
|
66
|
+
};
|
67
|
+
linkedBranches: {
|
68
|
+
nodes: {
|
69
|
+
ref: {
|
70
|
+
id: string;
|
71
|
+
name: string;
|
72
|
+
};
|
73
|
+
}[];
|
74
|
+
};
|
75
|
+
}>;
|
76
|
+
}
|
@@ -1,331 +1,363 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
+
});
|
9
|
+
};
|
10
|
+
import { graphql } from "@octokit/graphql";
|
11
|
+
export class GitHubApi {
|
12
|
+
constructor(token, owner, repo, projectNumber) {
|
13
|
+
this.repoVar = { owner, repo };
|
14
|
+
this.projectNumber = projectNumber;
|
15
|
+
this.graphqlAuth = graphql.defaults({
|
16
|
+
headers: {
|
17
|
+
authorization: `Bearer ${token}`,
|
18
|
+
"X-Github-Next-Global-ID": 1
|
19
|
+
},
|
20
|
+
});
|
21
|
+
}
|
22
|
+
getUser() {
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
24
|
+
const query = `{
|
25
|
+
viewer {
|
26
|
+
login
|
27
|
+
id
|
28
|
+
}
|
29
|
+
}`;
|
30
|
+
const { viewer } = yield this.graphqlAuth(query);
|
31
|
+
return viewer;
|
32
|
+
});
|
33
|
+
}
|
34
|
+
getRepository(label) {
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
36
|
+
const query = `
|
37
|
+
query getRepo($owner:String!, $repo: String!, $projectNumber: Int!, ${label ? '$label: String!' : ''} ) {
|
38
|
+
repository(owner: $owner, name: $repo) {
|
39
|
+
id
|
40
|
+
${label ?
|
41
|
+
`label(name: $label) {
|
42
|
+
id
|
43
|
+
}` : ''}
|
44
|
+
projectV2( number: $projectNumber ) {
|
45
|
+
id
|
46
|
+
field(name: "Status") {
|
47
|
+
... on ProjectV2SingleSelectField {
|
48
|
+
id
|
49
|
+
name
|
50
|
+
options {
|
51
|
+
name
|
52
|
+
id
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
`;
|
60
|
+
const { repository } = yield this.graphqlAuth(query, Object.assign({ label, projectNumber: this.projectNumber }, this.repoVar));
|
61
|
+
return repository;
|
62
|
+
});
|
63
|
+
}
|
64
|
+
createPullRequest(branchName, title, body) {
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
66
|
+
const repository = yield this.getRepository();
|
67
|
+
const repositoryId = repository.id;
|
68
|
+
const headRefName = 'main';
|
69
|
+
const baseRefName = branchName;
|
70
|
+
const mutationPullRequest = `
|
71
|
+
mutation createPullRequest( $baseRefName: String!, $headRefName: String!, $headRepositoryId: ID, $repositoryId: ID!, $title: String!, $body: String ) {
|
72
|
+
createPullRequest(
|
73
|
+
input: {
|
74
|
+
repositoryId: $repositoryId,
|
75
|
+
headRefName: $headRefName,
|
76
|
+
headRepositoryId: $headRepositoryId,
|
77
|
+
baseRefName: $baseRefName,
|
78
|
+
title: $title,
|
79
|
+
body: $body
|
80
|
+
}
|
81
|
+
) {
|
82
|
+
pullRequest {
|
83
|
+
id
|
84
|
+
}
|
85
|
+
}
|
86
|
+
}`;
|
87
|
+
try {
|
88
|
+
const { createPullRequest } = yield this.graphqlAuth(mutationPullRequest, { baseRefName, headRefName, headRepositoryId: repositoryId, repositoryId, title, body });
|
89
|
+
return createPullRequest.pullRequest ? true : false;
|
90
|
+
}
|
91
|
+
catch (error) {
|
92
|
+
console.log(error);
|
93
|
+
}
|
94
|
+
return false;
|
95
|
+
});
|
96
|
+
}
|
97
|
+
getColumnValueMap() {
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
99
|
+
const query = `
|
100
|
+
query getFieldOptions($owner:String!, $repo: String!, $projectNumber: Int!) {
|
101
|
+
repository(owner: $owner, name: $repo) {
|
102
|
+
projectV2(number: $projectNumber) {
|
103
|
+
field(name: "Status") {
|
104
|
+
... on ProjectV2SingleSelectField {
|
105
|
+
id
|
106
|
+
name
|
107
|
+
options {
|
108
|
+
name
|
109
|
+
id
|
110
|
+
}
|
111
|
+
}
|
112
|
+
}
|
113
|
+
}
|
114
|
+
}
|
115
|
+
}
|
116
|
+
`;
|
117
|
+
const { repository } = yield this.graphqlAuth(query, Object.assign({ projectNumber: this.projectNumber }, this.repoVar));
|
118
|
+
const mapValues = {};
|
119
|
+
for (const option of repository.projectV2.field.options) {
|
120
|
+
mapValues[option.name] = option.id;
|
121
|
+
}
|
122
|
+
return mapValues;
|
123
|
+
});
|
124
|
+
}
|
125
|
+
createIssue(title, state, label, milestone, body) {
|
126
|
+
var _a;
|
127
|
+
return __awaiter(this, void 0, void 0, function* () {
|
128
|
+
const user = yield this.getUser();
|
129
|
+
const repository = yield this.getRepository(label);
|
130
|
+
const repositoryId = repository.id;
|
131
|
+
const labelId = (_a = repository.label) === null || _a === void 0 ? void 0 : _a.id;
|
132
|
+
const projectId = repository.projectV2.id;
|
133
|
+
const mutationIssue = `
|
134
|
+
mutation createIssue($repositoryId: ID!, $assignId: ID!, $title: String!, $body: String, ${labelId ? '$labelId: ID!' : ''} , $milestoneId: ID ) {
|
135
|
+
createIssue(
|
136
|
+
input: {
|
137
|
+
repositoryId: $repositoryId,
|
138
|
+
assigneeIds: [$assignId],
|
139
|
+
${labelId ? 'labelIds: [$labelId],' : ''}
|
140
|
+
title: $title,
|
141
|
+
milestoneId: $milestoneId,
|
142
|
+
body: $body
|
143
|
+
}
|
144
|
+
) {
|
145
|
+
issue {
|
146
|
+
id
|
147
|
+
number
|
148
|
+
}
|
149
|
+
}
|
150
|
+
}`;
|
151
|
+
const { createIssue } = yield this.graphqlAuth(mutationIssue, { labelId, body, assignId: user.id, projectId, repositoryId, title, label: label ? [label] : null });
|
152
|
+
const issue = createIssue.issue;
|
153
|
+
if (!state || !issue.number) {
|
154
|
+
return issue.number;
|
155
|
+
}
|
156
|
+
const mutationItem = `
|
157
|
+
mutation addProjectV2ItemById($projectId: ID!, $contentId: ID! ) {
|
158
|
+
addProjectV2ItemById(
|
159
|
+
input: {
|
160
|
+
projectId: $projectId
|
161
|
+
contentId: $contentId
|
162
|
+
}
|
163
|
+
) {
|
164
|
+
clientMutationId,
|
165
|
+
item {
|
166
|
+
id
|
167
|
+
}
|
168
|
+
}
|
169
|
+
}`;
|
170
|
+
const { addProjectV2ItemById } = yield this.graphqlAuth(mutationItem, { projectId, contentId: issue.id });
|
171
|
+
const itemId = addProjectV2ItemById.item.id;
|
172
|
+
const fieldId = repository.projectV2.field.id;
|
173
|
+
const mapValues = yield this.getColumnValueMap();
|
174
|
+
const columnValue = mapValues[state];
|
175
|
+
const mutationColumn = `
|
176
|
+
mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $columnValue: String!) {
|
177
|
+
updateProjectV2ItemFieldValue(
|
178
|
+
input: {
|
179
|
+
projectId: $projectId,
|
180
|
+
itemId: $itemId,
|
181
|
+
fieldId: $fieldId,
|
182
|
+
value: {singleSelectOptionId: $columnValue}
|
183
|
+
}
|
184
|
+
) {
|
185
|
+
clientMutationId
|
186
|
+
}
|
187
|
+
}`;
|
188
|
+
const { updateProjectV2ItemFieldValue } = yield this.graphqlAuth(mutationColumn, { projectId, itemId, fieldId, columnValue });
|
189
|
+
if (!updateProjectV2ItemFieldValue.clientMutationId) {
|
190
|
+
return 0;
|
191
|
+
}
|
192
|
+
return issue.number;
|
193
|
+
});
|
194
|
+
}
|
195
|
+
moveIssue(issueNumber, state) {
|
196
|
+
return __awaiter(this, void 0, void 0, function* () {
|
197
|
+
const issue = yield this.getIssue(issueNumber);
|
198
|
+
const itemId = issue.projectItems.nodes[0].id;
|
199
|
+
const projectId = issue.projectItems.nodes[0].project.id;
|
200
|
+
const fieldId = issue.projectItems.nodes[0].fieldValueByName.field.id;
|
201
|
+
const mapValues = yield this.getColumnValueMap();
|
202
|
+
const columnValue = mapValues[state];
|
203
|
+
const mutation = `
|
204
|
+
mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $columnValue: String!) {
|
205
|
+
updateProjectV2ItemFieldValue(
|
206
|
+
input: {
|
207
|
+
projectId: $projectId,
|
208
|
+
itemId: $itemId,
|
209
|
+
fieldId: $fieldId,
|
210
|
+
value: {singleSelectOptionId: $columnValue}
|
211
|
+
}
|
212
|
+
) {
|
213
|
+
projectV2Item {
|
214
|
+
id
|
215
|
+
}
|
216
|
+
}
|
217
|
+
}`;
|
218
|
+
const { updateProjectV2ItemFieldValue } = yield this.graphqlAuth(mutation, { projectId, itemId, fieldId, columnValue });
|
219
|
+
return (updateProjectV2ItemFieldValue === null || updateProjectV2ItemFieldValue === void 0 ? void 0 : updateProjectV2ItemFieldValue.projectV2Item) ? true : false;
|
220
|
+
});
|
221
|
+
}
|
222
|
+
assignIssueToMe(issueNumber) {
|
223
|
+
return __awaiter(this, void 0, void 0, function* () {
|
224
|
+
const user = yield this.getUser();
|
225
|
+
const issue = yield this.getIssue(issueNumber);
|
226
|
+
const mutation = `
|
227
|
+
mutation assignUser( $issueId: ID!, $userId: ID!) {
|
228
|
+
addAssigneesToAssignable(input: {
|
229
|
+
assignableId: $issueId
|
230
|
+
assigneeIds: [ $userId ]
|
231
|
+
}) {
|
232
|
+
assignable {
|
233
|
+
assignees {
|
234
|
+
totalCount
|
235
|
+
}
|
236
|
+
}
|
237
|
+
}
|
238
|
+
}
|
239
|
+
`;
|
240
|
+
const { addAssigneesToAssignable } = yield this.graphqlAuth(mutation, { issueId: issue.id, userId: user.id });
|
241
|
+
return addAssigneesToAssignable.assignable.assignees.totalCount > 0;
|
242
|
+
});
|
243
|
+
}
|
244
|
+
getCommit(commitSha) {
|
245
|
+
return __awaiter(this, void 0, void 0, function* () {
|
246
|
+
const query = `
|
247
|
+
query getCommit($owner:String!, $repo: String!, $commitSha: String!) {
|
248
|
+
repository(owner: $owner, name: $repo) {
|
249
|
+
object(expression: $commitSha) {
|
250
|
+
... on Commit {
|
251
|
+
id
|
252
|
+
oid
|
253
|
+
}
|
254
|
+
}
|
255
|
+
}
|
256
|
+
} `;
|
257
|
+
const { repository } = yield this.graphqlAuth(query, Object.assign({ commitSha }, this.repoVar));
|
258
|
+
return repository.object;
|
259
|
+
});
|
260
|
+
}
|
261
|
+
assignBranchToIssue(issueNumber, branchName, commitSha) {
|
262
|
+
var _a;
|
263
|
+
return __awaiter(this, void 0, void 0, function* () {
|
264
|
+
const issue = yield this.getIssue(issueNumber);
|
265
|
+
const commit = yield this.getCommit(commitSha);
|
266
|
+
const mutation = `
|
267
|
+
mutation createLinkedBranch( $issueId: ID!, $oid: GitObjectID!, $branchName: String!) {
|
268
|
+
createLinkedBranch(input: {
|
269
|
+
issueId: $issueId
|
270
|
+
oid: $oid
|
271
|
+
name: $branchName
|
272
|
+
})
|
273
|
+
{
|
274
|
+
issue {
|
275
|
+
id
|
276
|
+
}
|
277
|
+
}
|
278
|
+
}`;
|
279
|
+
const { createLinkedBranch } = yield this.graphqlAuth(mutation, { issueId: issue.id, oid: commit.oid, branchName });
|
280
|
+
console.log(createLinkedBranch);
|
281
|
+
return ((_a = createLinkedBranch === null || createLinkedBranch === void 0 ? void 0 : createLinkedBranch.issue) === null || _a === void 0 ? void 0 : _a.id) ? true : false;
|
282
|
+
});
|
283
|
+
}
|
284
|
+
getIssueState(issueNumber) {
|
285
|
+
var _a, _b, _c;
|
286
|
+
return __awaiter(this, void 0, void 0, function* () {
|
287
|
+
const issue = yield this.getIssue(issueNumber);
|
288
|
+
return (_c = (_b = (_a = issue.projectItems) === null || _a === void 0 ? void 0 : _a.nodes[0]) === null || _b === void 0 ? void 0 : _b.fieldValueByName) === null || _c === void 0 ? void 0 : _c.name;
|
289
|
+
});
|
290
|
+
}
|
291
|
+
getIssueName(title) {
|
292
|
+
return title.toLowerCase().replaceAll(' ', '-');
|
293
|
+
}
|
294
|
+
getIssueObject(issueNumber) {
|
295
|
+
return __awaiter(this, void 0, void 0, function* () {
|
296
|
+
const issue = yield this.getIssue(issueNumber);
|
297
|
+
const issueObject = { title: issue.title };
|
298
|
+
issueObject.name = this.getIssueName(issue.title);
|
299
|
+
if (issue.linkedBranches.nodes.length > 0) {
|
300
|
+
issueObject.branch = issue.linkedBranches.nodes[0].ref.name;
|
301
|
+
}
|
302
|
+
if (issue.projectItems.nodes.length > 0) {
|
303
|
+
issueObject.state = issue.projectItems.nodes[0].fieldValueByName.name;
|
304
|
+
}
|
305
|
+
if (issue.labels.nodes.length > 0) {
|
306
|
+
issueObject.labels = [];
|
307
|
+
for (const node of issue.labels.nodes) {
|
308
|
+
issueObject.labels.push(node.name);
|
309
|
+
}
|
310
|
+
}
|
311
|
+
return issueObject;
|
312
|
+
});
|
313
|
+
}
|
314
|
+
getIssue(issueNumber) {
|
315
|
+
return __awaiter(this, void 0, void 0, function* () {
|
316
|
+
const query = `
|
317
|
+
query getIssue($owner:String!, $repo: String!, $issueNumber: Int!) {
|
318
|
+
repository(owner: $owner, name: $repo) {
|
319
|
+
issue(number: $issueNumber) {
|
320
|
+
title
|
321
|
+
id
|
322
|
+
labels(first:3, orderBy: { field: CREATED_AT, direction: DESC}) {
|
323
|
+
nodes {
|
324
|
+
color
|
325
|
+
name
|
326
|
+
}
|
327
|
+
}
|
328
|
+
projectItems(last: 1) {
|
329
|
+
nodes{
|
330
|
+
id,
|
331
|
+
project {
|
332
|
+
id
|
333
|
+
}
|
334
|
+
fieldValueByName(name: "Status"){
|
335
|
+
... on ProjectV2ItemFieldSingleSelectValue {
|
336
|
+
name
|
337
|
+
id
|
338
|
+
field {
|
339
|
+
... on ProjectV2SingleSelectField {
|
340
|
+
id
|
341
|
+
}
|
342
|
+
}
|
343
|
+
}
|
344
|
+
}
|
345
|
+
}
|
346
|
+
}
|
347
|
+
linkedBranches(last:1){
|
348
|
+
nodes {
|
349
|
+
ref {
|
350
|
+
id
|
351
|
+
name
|
352
|
+
}
|
353
|
+
}
|
354
|
+
}
|
355
|
+
}
|
356
|
+
}
|
357
|
+
}
|
358
|
+
`;
|
359
|
+
const { repository } = yield this.graphqlAuth(query, Object.assign({ issueNumber }, this.repoVar));
|
360
|
+
return repository.issue;
|
361
|
+
});
|
362
|
+
}
|
363
|
+
}
|
package/lib/helpers/util.d.ts
CHANGED
@@ -2,6 +2,20 @@ export declare const TEMPLATES_FOLDER: string;
|
|
2
2
|
export declare const DICTIONARY_FOLDER: string;
|
3
3
|
export declare const WORKING_FOLDER: string;
|
4
4
|
export declare const CONFIG_FILE: string;
|
5
|
+
export declare const filterJson: (fullPath: string) => boolean;
|
6
|
+
export declare const filterDirectory: (fullPath: string) => boolean;
|
7
|
+
export declare const filterFiles: (fullPath: string) => boolean;
|
8
|
+
export declare const camelToText: (s: string) => string;
|
9
|
+
export declare const kebabToText: (s: string) => string;
|
10
|
+
export declare const snakeToText: (s: string) => string;
|
11
|
+
export declare function valuesToChoices(list: string[], valueToTitle?: (value: string) => string): {
|
12
|
+
value: string;
|
13
|
+
title: string;
|
14
|
+
}[];
|
15
|
+
export declare function titlesToChoices(list: string[], titleToValue?: (title: string) => string): {
|
16
|
+
title: string;
|
17
|
+
value: string;
|
18
|
+
}[];
|
5
19
|
export declare function createConfigurationFile(): Promise<boolean>;
|
6
20
|
export declare function sortByName(objA: {
|
7
21
|
Name: string;
|
@@ -19,9 +33,6 @@ export declare function splitFilename(fullname: string, defaultFolder?: string):
|
|
19
33
|
filename: string;
|
20
34
|
folder: string;
|
21
35
|
};
|
22
|
-
export declare const filterJson: (fullPath: string) => boolean;
|
23
|
-
export declare const filterDirectory: (fullPath: string) => boolean;
|
24
|
-
export declare const filterFiles: (fullPath: string) => boolean;
|
25
36
|
/**
|
26
37
|
* Agrega los elementos de newArray a baseArray, si no existen previamente en baseArray.
|
27
38
|
* @param {string[]} baseArray El array donde se agregan los elementos
|
package/lib/helpers/util.js
CHANGED
@@ -9,18 +9,77 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
9
9
|
};
|
10
10
|
import fs from "fs";
|
11
11
|
import { fileURLToPath } from 'url';
|
12
|
+
import prompts from "prompts";
|
13
|
+
import { GitProjects, GitServices } from "./context.js";
|
14
|
+
import { logWarning } from "./color.js";
|
15
|
+
const COMMAND_FOLDER = searchInFolderHierarchy('commands', fileURLToPath(import.meta.url));
|
12
16
|
export const TEMPLATES_FOLDER = searchInFolderHierarchy('templates', fileURLToPath(import.meta.url));
|
13
17
|
export const DICTIONARY_FOLDER = TEMPLATES_FOLDER + "/diccionarios";
|
14
18
|
export const WORKING_FOLDER = process.env.INIT_CWD || ".";
|
15
19
|
export const CONFIG_FILE = process.cwd() + '/.autoforce.json';
|
20
|
+
export const filterJson = (fullPath) => fullPath.endsWith(".json");
|
21
|
+
export const filterDirectory = (fullPath) => fs.lstatSync(fullPath).isDirectory();
|
22
|
+
export const filterFiles = (fullPath) => !fs.lstatSync(fullPath).isDirectory();
|
23
|
+
export const camelToText = (s) => s.replace(/[A-Z]/g, x => ' ' + x);
|
24
|
+
export const kebabToText = (s) => s.replace(/-./g, x => ' ' + x[1].toUpperCase());
|
25
|
+
export const snakeToText = (s) => s.replace(/_./g, x => ' ' + x[1].toUpperCase());
|
26
|
+
export function valuesToChoices(list, valueToTitle = (value) => value) {
|
27
|
+
return list.map(value => { return { value, title: valueToTitle(value) }; });
|
28
|
+
}
|
29
|
+
export function titlesToChoices(list, titleToValue = (title) => title) {
|
30
|
+
return list.map(title => { return { title, value: titleToValue(title) }; });
|
31
|
+
}
|
16
32
|
export function createConfigurationFile() {
|
17
33
|
return __awaiter(this, void 0, void 0, function* () {
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
34
|
+
const models = valuesToChoices(getFiles(COMMAND_FOLDER, filterDirectory));
|
35
|
+
const automationModel = yield prompts([{
|
36
|
+
type: "select",
|
37
|
+
name: "model",
|
38
|
+
message: "Elija un modelo de automatizacion",
|
39
|
+
choices: [
|
40
|
+
{ title: 'Orgs con Procesos de Negocio usando scratchs', value: 'modelA' },
|
41
|
+
{ title: 'Custom', value: 'custom', description: 'En este caso los comandos son configurados fuera de la herramienta y los lee de la carpeta commands en el root del repo' }
|
42
|
+
]
|
43
|
+
}]);
|
44
|
+
// Si es custom pregunta si quiere tomar de base alguno existente
|
45
|
+
if (automationModel.model === 'custom') {
|
46
|
+
const baseModel = yield prompts([{
|
47
|
+
type: "select",
|
48
|
+
name: "model",
|
49
|
+
message: "Quiere tomar algun modelo existente de base ? Este se copiara a la carpeta ",
|
50
|
+
choices: [
|
51
|
+
{ title: 'Orgs con Procesos de Negocio usando scratchs', value: 'modelA' },
|
52
|
+
{ title: 'Custom', value: 'custom' }
|
53
|
+
]
|
54
|
+
}]);
|
55
|
+
}
|
56
|
+
// Preguntar por GitHub o GitLab
|
57
|
+
const gitServices = yield prompts([{
|
58
|
+
type: "select",
|
59
|
+
name: "git",
|
60
|
+
message: "Elija un servicio de Git",
|
61
|
+
choices: [{ title: 'Github', value: GitServices.GitHub }, { title: 'Gitlab', value: GitServices.GitLab }]
|
62
|
+
}]);
|
63
|
+
// Chequear las variables de entorno
|
64
|
+
if (gitServices.git === GitServices.GitHub && !process.env.GITHUB_TOKEN) {
|
65
|
+
logWarning('Debe configurar una variable de entorno GITHUB_TOKEN');
|
66
|
+
}
|
67
|
+
if (gitServices.git === GitServices.GitLab && !process.env.GITLAB_TOKEN) {
|
68
|
+
logWarning('Debe configurar una variable de entorno GITLAB_TOKEN');
|
69
|
+
}
|
70
|
+
const projectServices = yield prompts([{
|
71
|
+
type: "select",
|
72
|
+
name: "project",
|
73
|
+
message: "Gestion de proyecto",
|
74
|
+
choices: [{ title: 'Github Projects', value: GitProjects.GitHub }, { title: 'GitLab Projects', value: GitProjects.GitLab }, { title: 'Jira', value: GitProjects.Jira }, { title: 'None', value: GitProjects.None }]
|
75
|
+
}]);
|
76
|
+
const projectId = yield prompts([{
|
77
|
+
type: "text",
|
78
|
+
name: "projectId",
|
79
|
+
message: "Id del proyecto"
|
80
|
+
}]);
|
81
|
+
// console.log('Genera documentacion');
|
82
|
+
const config = { model: automationModel.model, gitServices: gitServices.git, projectServices: projectServices.project, projectId: projectId.projectId };
|
24
83
|
try {
|
25
84
|
fs.writeFileSync(CONFIG_FILE, JSON.stringify(config, null, 2));
|
26
85
|
}
|
@@ -71,9 +130,6 @@ export function splitFilename(fullname, defaultFolder = '') {
|
|
71
130
|
}
|
72
131
|
return { filename, folder };
|
73
132
|
}
|
74
|
-
export const filterJson = (fullPath) => fullPath.endsWith(".json");
|
75
|
-
export const filterDirectory = (fullPath) => fs.lstatSync(fullPath).isDirectory();
|
76
|
-
export const filterFiles = (fullPath) => !fs.lstatSync(fullPath).isDirectory();
|
77
133
|
/**
|
78
134
|
* Agrega los elementos de newArray a baseArray, si no existen previamente en baseArray.
|
79
135
|
* @param {string[]} baseArray El array donde se agregan los elementos
|
package/package.json
CHANGED
@@ -2,7 +2,12 @@
|
|
2
2
|
"name": "autoforce",
|
3
3
|
"homepage": "https://sebastianclaros.github.io/autoforce",
|
4
4
|
"private": false,
|
5
|
-
"version": "0.1.
|
5
|
+
"version": "0.1.5",
|
6
|
+
"keywords": [
|
7
|
+
"Salesforce",
|
8
|
+
"Automation",
|
9
|
+
"Git"
|
10
|
+
],
|
6
11
|
"description": "Developer Automation tool for Github / Gitlab and Salesforce projects.",
|
7
12
|
"repository": {
|
8
13
|
"type": "git",
|
@@ -24,11 +29,12 @@
|
|
24
29
|
"build": "tsc --project tsconfig.build.json",
|
25
30
|
"prettier": "prettier --write \"**/*.{css,html,js,json,ts,md,xml,yaml,yml}\"",
|
26
31
|
"test:build": "yarn build && npm publish --dry-run && node ./bin/index.js",
|
27
|
-
"test": "jest --config jest.config.
|
32
|
+
"test": "ts-jest --config jest.config.ts"
|
28
33
|
},
|
29
34
|
"devDependencies": {
|
30
35
|
"@eslint/js": "^9.9.1",
|
31
36
|
"@types/jest": "29.4.0",
|
37
|
+
"@types/node": "^22.8.1",
|
32
38
|
"@typescript-eslint/eslint-plugin": "5.54.0",
|
33
39
|
"@typescript-eslint/parser": "5.52.0",
|
34
40
|
"eslint": "^9.9.1",
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|