autoforce 0.1.1
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/LICENSE +21 -0
- package/README.md +30 -0
- package/lib/auto.d.ts +3 -0
- package/lib/auto.js +103 -0
- package/lib/helpers/class.d.ts +12 -0
- package/lib/helpers/class.js +233 -0
- package/lib/helpers/color.d.ts +3 -0
- package/lib/helpers/color.js +47 -0
- package/lib/helpers/connect.d.ts +16 -0
- package/lib/helpers/connect.js +261 -0
- package/lib/helpers/context.d.ts +80 -0
- package/lib/helpers/context.js +488 -0
- package/lib/helpers/github-graphql.d.ts +76 -0
- package/lib/helpers/github-graphql.js +363 -0
- package/lib/helpers/gitlab-graphql.d.ts +19 -0
- package/lib/helpers/gitlab-graphql.js +78 -0
- package/lib/helpers/lwc.d.ts +3 -0
- package/lib/helpers/lwc.js +69 -0
- package/lib/helpers/merge.d.ts +1 -0
- package/lib/helpers/merge.js +81 -0
- package/lib/helpers/metadata.d.ts +30 -0
- package/lib/helpers/metadata.js +119 -0
- package/lib/helpers/object.d.ts +3 -0
- package/lib/helpers/object.js +133 -0
- package/lib/helpers/openai.d.ts +1 -0
- package/lib/helpers/openai.js +53 -0
- package/lib/helpers/taskFunctions.d.ts +14 -0
- package/lib/helpers/taskFunctions.js +479 -0
- package/lib/helpers/tasks.d.ts +12 -0
- package/lib/helpers/tasks.js +241 -0
- package/lib/helpers/template.d.ts +14 -0
- package/lib/helpers/template.js +86 -0
- package/lib/helpers/util.d.ts +31 -0
- package/lib/helpers/util.js +85 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -0
- package/package.json +55 -0
@@ -0,0 +1,479 @@
|
|
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 { execSync } from "child_process";
|
11
|
+
import context from "./context.js";
|
12
|
+
import { logError } from "./color.js";
|
13
|
+
import metadata from './metadata.js';
|
14
|
+
import prompts from "prompts";
|
15
|
+
import templateGenerator from "./template.js";
|
16
|
+
import { getColored } from "./color.js";
|
17
|
+
function createTemplate(templateFolder, templateExtension, template, filename, folder, context) {
|
18
|
+
if (!template || !filename || !templateFolder || !templateExtension) {
|
19
|
+
return;
|
20
|
+
}
|
21
|
+
const templateEngine = templateGenerator(templateFolder, templateExtension);
|
22
|
+
const formulas = {
|
23
|
+
today: Date.now(),
|
24
|
+
filename
|
25
|
+
};
|
26
|
+
const view = Object.assign(Object.assign({}, formulas), context);
|
27
|
+
templateEngine.read(template);
|
28
|
+
templateEngine.render(view);
|
29
|
+
templateEngine.save(filename, folder);
|
30
|
+
}
|
31
|
+
function convertArgsToString(args) {
|
32
|
+
let argsString = '';
|
33
|
+
if (Array.isArray(args)) {
|
34
|
+
for (const argName of args) {
|
35
|
+
argsString += context.merge(argName) + ' ';
|
36
|
+
}
|
37
|
+
}
|
38
|
+
else if (typeof args === 'object') {
|
39
|
+
for (const argName in args) {
|
40
|
+
if (!args[argName]) {
|
41
|
+
argsString += argName + ' ';
|
42
|
+
}
|
43
|
+
else {
|
44
|
+
argsString += argName + '=' + context.merge(args[argName]) + ' ';
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
return argsString;
|
49
|
+
}
|
50
|
+
export function executeCommand(step) {
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
52
|
+
try {
|
53
|
+
context.set('command', step.command + ' ' + convertArgsToString(step.arguments));
|
54
|
+
execSync(step.command + ' ' + convertArgsToString(step.arguments), { stdio: 'inherit' });
|
55
|
+
return true;
|
56
|
+
}
|
57
|
+
catch (_a) {
|
58
|
+
return false;
|
59
|
+
}
|
60
|
+
});
|
61
|
+
}
|
62
|
+
export function validateCommand(step) {
|
63
|
+
if (step.command && typeof step.command == 'string') {
|
64
|
+
return true;
|
65
|
+
}
|
66
|
+
return false;
|
67
|
+
}
|
68
|
+
export function validateFunction(step) {
|
69
|
+
if (typeof taskFunctions[step.function] !== 'function') {
|
70
|
+
logError(`No se encontro la funcion ${step.function}`);
|
71
|
+
return false;
|
72
|
+
}
|
73
|
+
if (typeof step.arguments !== 'undefined') {
|
74
|
+
if (typeof step.arguments !== 'object') {
|
75
|
+
logError(`La funcion ${step.function} recibio un argumento de tipo ${typeof step.arguments} y solo soporta object`);
|
76
|
+
return false;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
return true;
|
80
|
+
}
|
81
|
+
function getParams(func) {
|
82
|
+
// String representation of the function code
|
83
|
+
let str = func.toString();
|
84
|
+
str = str.replace(/\/\*[\s\S]*?\*\//g, '')
|
85
|
+
.replace(/\/\/(.)*/g, '')
|
86
|
+
.replace(/{[\s\S]*}/, '')
|
87
|
+
.replace(/=>/g, '')
|
88
|
+
.trim();
|
89
|
+
// Start parameter names after first '('
|
90
|
+
const start = str.indexOf("(") + 1;
|
91
|
+
// End parameter names is just before last ')'
|
92
|
+
const end = str.length - 1;
|
93
|
+
const result = str.substring(start, end).split(", ");
|
94
|
+
const params = [];
|
95
|
+
result.forEach(element => {
|
96
|
+
element = element.replace(/=[\s\S]*/g, '').trim();
|
97
|
+
if (element.length > 0) {
|
98
|
+
params.push(element);
|
99
|
+
}
|
100
|
+
});
|
101
|
+
return params;
|
102
|
+
}
|
103
|
+
function createArray(fields, record) {
|
104
|
+
const fieldArray = [];
|
105
|
+
for (const field of fields) {
|
106
|
+
const value = record[field];
|
107
|
+
fieldArray.push(value);
|
108
|
+
}
|
109
|
+
return fieldArray;
|
110
|
+
}
|
111
|
+
function askForContinue(message) {
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
113
|
+
const answer = yield prompts([
|
114
|
+
{
|
115
|
+
type: "confirm",
|
116
|
+
name: "continue",
|
117
|
+
initial: true,
|
118
|
+
message
|
119
|
+
}
|
120
|
+
]);
|
121
|
+
return answer.continue;
|
122
|
+
});
|
123
|
+
}
|
124
|
+
function askForCommitMessage() {
|
125
|
+
return __awaiter(this, void 0, void 0, function* () {
|
126
|
+
const answer = yield prompts([
|
127
|
+
{
|
128
|
+
type: "text",
|
129
|
+
name: "message",
|
130
|
+
initial: "fix",
|
131
|
+
validate: value => value.length > 0 ? true : "El mensaje es requerido",
|
132
|
+
message: "Mensaje del commit"
|
133
|
+
}
|
134
|
+
]);
|
135
|
+
return answer.message;
|
136
|
+
});
|
137
|
+
}
|
138
|
+
export function getCurrentOrganization() {
|
139
|
+
const salidaConfig = executeShell('sf config get target-org --json');
|
140
|
+
const salidaConfigJson = JSON.parse(salidaConfig);
|
141
|
+
const targetOrg = salidaConfigJson.result[0];
|
142
|
+
const salidaOrgList = executeShell('sf org list --json');
|
143
|
+
const salidaOrgListJson = JSON.parse(salidaOrgList);
|
144
|
+
for (const orgType in salidaOrgListJson.result) {
|
145
|
+
for (const orgObject of salidaOrgListJson.result[orgType]) {
|
146
|
+
if (orgObject.alias === targetOrg.value) {
|
147
|
+
if ((orgObject === null || orgObject === void 0 ? void 0 : orgObject.isExpired) === true) {
|
148
|
+
throw new Error(`La scratch ${orgObject.alias} ha expirado!`);
|
149
|
+
}
|
150
|
+
return orgObject;
|
151
|
+
}
|
152
|
+
}
|
153
|
+
}
|
154
|
+
throw new Error(`No se encontro la organizacion ${targetOrg.value} verifique que este activa con: sf org list. `);
|
155
|
+
}
|
156
|
+
// type: 'scratchOrgs', 'sandboxes', others
|
157
|
+
export function getOrganizationObject(alias, type = 'scratchOrgs') {
|
158
|
+
const salida = executeShell('sf org list --json');
|
159
|
+
const salidaJson = JSON.parse(salida);
|
160
|
+
const orgObject = salidaJson.result[type].filter(scratch => scratch.alias === alias)[0];
|
161
|
+
if ((orgObject === null || orgObject === void 0 ? void 0 : orgObject.isExpired) === true) {
|
162
|
+
throw new Error(`La scratch ${orgObject.alias} ha expirado!`);
|
163
|
+
}
|
164
|
+
return orgObject;
|
165
|
+
}
|
166
|
+
export function getTargetOrg() {
|
167
|
+
const salida = executeShell('sf force config get target-org --json');
|
168
|
+
const salidaJson = JSON.parse(salida);
|
169
|
+
return salidaJson.result[0].value;
|
170
|
+
}
|
171
|
+
export function getBranchName() {
|
172
|
+
try {
|
173
|
+
return executeShell("git branch --show-current");
|
174
|
+
}
|
175
|
+
catch (error) {
|
176
|
+
console.log(error);
|
177
|
+
}
|
178
|
+
return '';
|
179
|
+
}
|
180
|
+
export function executeFunction(step) {
|
181
|
+
return __awaiter(this, void 0, void 0, function* () {
|
182
|
+
let returnValue = false;
|
183
|
+
const functionName = step.function;
|
184
|
+
if (typeof taskFunctions[functionName] === 'function') {
|
185
|
+
if (step.arguments && typeof step.arguments === 'object') {
|
186
|
+
let mergedArgs = context.mergeArgs(step.arguments);
|
187
|
+
if (!Array.isArray(mergedArgs)) {
|
188
|
+
const paramNames = getParams(taskFunctions[functionName]);
|
189
|
+
mergedArgs = createArray(paramNames, mergedArgs);
|
190
|
+
}
|
191
|
+
returnValue = yield taskFunctions[functionName](...mergedArgs);
|
192
|
+
}
|
193
|
+
else {
|
194
|
+
returnValue = yield taskFunctions[functionName]();
|
195
|
+
}
|
196
|
+
}
|
197
|
+
else {
|
198
|
+
throw new Error(`No se encontro la funcion ${functionName}`);
|
199
|
+
}
|
200
|
+
return returnValue;
|
201
|
+
});
|
202
|
+
}
|
203
|
+
export function executeShell(command) {
|
204
|
+
try {
|
205
|
+
const buffer = execSync(command);
|
206
|
+
const salida = buffer.toString().trim();
|
207
|
+
return (salida.endsWith("\n") ? salida.slice(0, -1) : salida);
|
208
|
+
}
|
209
|
+
catch (_a) {
|
210
|
+
return '';
|
211
|
+
}
|
212
|
+
}
|
213
|
+
function getFilesChanged() {
|
214
|
+
const files = [];
|
215
|
+
const salida = executeShell('git diff origin/main --raw');
|
216
|
+
for (const line of salida.split('\n')) {
|
217
|
+
files.push(line.split(/[ |\t]/)[5]);
|
218
|
+
}
|
219
|
+
return files;
|
220
|
+
}
|
221
|
+
export const taskFunctions = {
|
222
|
+
docProcess() {
|
223
|
+
return __awaiter(this, void 0, void 0, function* () {
|
224
|
+
if (!context.process) {
|
225
|
+
return false;
|
226
|
+
}
|
227
|
+
const files = getFilesChanged();
|
228
|
+
if (files.length > 0) {
|
229
|
+
for (const component in metadata) {
|
230
|
+
const helper = metadata[component];
|
231
|
+
const items = helper.getItems(files);
|
232
|
+
if (items.length > 0) {
|
233
|
+
context.addProcessMetadata(component, items);
|
234
|
+
helper.execute(items, context.process, context.module);
|
235
|
+
}
|
236
|
+
}
|
237
|
+
}
|
238
|
+
return true;
|
239
|
+
});
|
240
|
+
},
|
241
|
+
retrieveCode() {
|
242
|
+
return __awaiter(this, void 0, void 0, function* () {
|
243
|
+
const tryToRetrieve = yield askForContinue("Desea bajar los cambios?");
|
244
|
+
if (!tryToRetrieve) {
|
245
|
+
return false;
|
246
|
+
}
|
247
|
+
executeShell(`sf project retrieve start`);
|
248
|
+
return yield this.validateScratch();
|
249
|
+
});
|
250
|
+
},
|
251
|
+
validateScratch() {
|
252
|
+
return __awaiter(this, void 0, void 0, function* () {
|
253
|
+
const salida = executeShell("sf project retrieve preview");
|
254
|
+
context.salida = salida;
|
255
|
+
const noHayCambios = salida.indexOf('No files will be deleted') !== -1 && salida.indexOf('No files will be retrieved') !== -1 && salida.indexOf('No conflicts found') !== -1;
|
256
|
+
// Probar de bajarlos // sf project retrieve start
|
257
|
+
return noHayCambios;
|
258
|
+
});
|
259
|
+
},
|
260
|
+
commitChanges() {
|
261
|
+
return __awaiter(this, void 0, void 0, function* () {
|
262
|
+
const tryToCommit = yield askForContinue("Desea commitear los cambios?");
|
263
|
+
if (!tryToCommit) {
|
264
|
+
return false;
|
265
|
+
}
|
266
|
+
const message = yield askForCommitMessage();
|
267
|
+
executeShell(`git add --all`);
|
268
|
+
executeShell(`git commit -m ${message}`);
|
269
|
+
return yield this.checkCommitPending();
|
270
|
+
});
|
271
|
+
},
|
272
|
+
publishBranch() {
|
273
|
+
return __awaiter(this, void 0, void 0, function* () {
|
274
|
+
try {
|
275
|
+
const branchName = context.branchName;
|
276
|
+
const salida = executeShell(`git push origin ${branchName}`);
|
277
|
+
return salida ? false : true;
|
278
|
+
}
|
279
|
+
catch (error) {
|
280
|
+
console.log(error);
|
281
|
+
}
|
282
|
+
// mergeBranch
|
283
|
+
return false;
|
284
|
+
});
|
285
|
+
},
|
286
|
+
createPullRequest() {
|
287
|
+
return __awaiter(this, void 0, void 0, function* () {
|
288
|
+
if (context.gitApi === undefined || context.branchName === undefined || context.issueNumber === undefined) {
|
289
|
+
return false;
|
290
|
+
}
|
291
|
+
try {
|
292
|
+
context.issueFromBranch(context.branchName);
|
293
|
+
const result = yield context.gitApi.createPullRequest(context.branchName, `resolves #${context.issueNumber} `, 'AI not implemented yet');
|
294
|
+
return result;
|
295
|
+
}
|
296
|
+
catch (error) {
|
297
|
+
console.log(error);
|
298
|
+
}
|
299
|
+
// mergeBranch
|
300
|
+
return false;
|
301
|
+
});
|
302
|
+
},
|
303
|
+
cancelIssue() {
|
304
|
+
console.log('Not implemented');
|
305
|
+
return false;
|
306
|
+
},
|
307
|
+
deployIssue() {
|
308
|
+
console.log('Not implemented');
|
309
|
+
return false;
|
310
|
+
},
|
311
|
+
rollbackIssue() {
|
312
|
+
console.log('Not implemented');
|
313
|
+
return false;
|
314
|
+
},
|
315
|
+
createIssue(title, label) {
|
316
|
+
return __awaiter(this, void 0, void 0, function* () {
|
317
|
+
if (context.projectApi === undefined) {
|
318
|
+
return false;
|
319
|
+
}
|
320
|
+
const issueNumber = yield context.projectApi.createIssue(title, 'Backlog', label);
|
321
|
+
if (issueNumber) {
|
322
|
+
console.log(`Se creao el issue ${issueNumber}`);
|
323
|
+
return true;
|
324
|
+
}
|
325
|
+
return false;
|
326
|
+
});
|
327
|
+
},
|
328
|
+
createTemplate(template, folder, name, identifier) {
|
329
|
+
return __awaiter(this, void 0, void 0, function* () {
|
330
|
+
const filename = name.toLocaleLowerCase().replaceAll(' ', '-') + '.md';
|
331
|
+
createTemplate('.', 'md', template, filename, folder, { name, identifier });
|
332
|
+
return true;
|
333
|
+
});
|
334
|
+
},
|
335
|
+
validateIssue(issueNumber, states) {
|
336
|
+
return __awaiter(this, void 0, void 0, function* () {
|
337
|
+
if (context.projectApi === undefined) {
|
338
|
+
return false;
|
339
|
+
}
|
340
|
+
const issue = yield context.projectApi.getIssueObject(issueNumber);
|
341
|
+
if (!issue.state) {
|
342
|
+
return false;
|
343
|
+
}
|
344
|
+
const arrayStates = states.toLocaleLowerCase().replace(' ', '').split(',');
|
345
|
+
return arrayStates.includes(issue.state.toLocaleLowerCase().replace(' ', ''));
|
346
|
+
});
|
347
|
+
},
|
348
|
+
validaNoseaBranchActual(newBranchName) {
|
349
|
+
return __awaiter(this, void 0, void 0, function* () {
|
350
|
+
return this.getBranchName() !== newBranchName;
|
351
|
+
});
|
352
|
+
},
|
353
|
+
checkCommitPending() {
|
354
|
+
return __awaiter(this, void 0, void 0, function* () {
|
355
|
+
try {
|
356
|
+
const cambios = executeShell("git status --porcelain=v1");
|
357
|
+
context.salida = cambios;
|
358
|
+
return cambios == '';
|
359
|
+
}
|
360
|
+
catch (error) {
|
361
|
+
console.log(error);
|
362
|
+
}
|
363
|
+
return false;
|
364
|
+
});
|
365
|
+
},
|
366
|
+
createBranch() {
|
367
|
+
return __awaiter(this, void 0, void 0, function* () {
|
368
|
+
try {
|
369
|
+
const newBranchName = context.newBranchName;
|
370
|
+
executeShell(`git checkout -b ${newBranchName} origin/main`);
|
371
|
+
context.set('branchName', this.getBranchName());
|
372
|
+
return true;
|
373
|
+
}
|
374
|
+
catch (error) {
|
375
|
+
console.log(error);
|
376
|
+
}
|
377
|
+
// mergeBranch
|
378
|
+
return false;
|
379
|
+
});
|
380
|
+
},
|
381
|
+
mergeBranch() {
|
382
|
+
return __awaiter(this, void 0, void 0, function* () {
|
383
|
+
try {
|
384
|
+
executeShell(`git fetch`);
|
385
|
+
executeShell(`git merge origin/main`);
|
386
|
+
return true;
|
387
|
+
}
|
388
|
+
catch (error) {
|
389
|
+
console.log(error);
|
390
|
+
}
|
391
|
+
return false;
|
392
|
+
});
|
393
|
+
},
|
394
|
+
moveIssue(issueNumber, state) {
|
395
|
+
return __awaiter(this, void 0, void 0, function* () {
|
396
|
+
if (context.projectApi === undefined) {
|
397
|
+
return false;
|
398
|
+
}
|
399
|
+
const result = yield context.projectApi.moveIssue(issueNumber, state);
|
400
|
+
return result;
|
401
|
+
});
|
402
|
+
},
|
403
|
+
assignBranchToIssue(issueNumber, newBranchName) {
|
404
|
+
return __awaiter(this, void 0, void 0, function* () {
|
405
|
+
if (context.gitApi === undefined) {
|
406
|
+
return false;
|
407
|
+
}
|
408
|
+
const commitSha = executeShell(`git rev-parse --verify main`);
|
409
|
+
const result = yield context.gitApi.assignBranchToIssue(issueNumber, newBranchName, commitSha);
|
410
|
+
return result;
|
411
|
+
});
|
412
|
+
},
|
413
|
+
assignIssueToMe(issueNumber) {
|
414
|
+
return __awaiter(this, void 0, void 0, function* () {
|
415
|
+
if (!context.projectApi) {
|
416
|
+
return false;
|
417
|
+
}
|
418
|
+
const result = yield context.projectApi.assignIssueToMe(issueNumber);
|
419
|
+
return result;
|
420
|
+
});
|
421
|
+
},
|
422
|
+
viewIssue(issueNumber) {
|
423
|
+
return __awaiter(this, void 0, void 0, function* () {
|
424
|
+
if (!context.projectApi) {
|
425
|
+
return false;
|
426
|
+
}
|
427
|
+
const result = yield context.projectApi.getIssueObject(issueNumber);
|
428
|
+
// Branch
|
429
|
+
if (result.branch) {
|
430
|
+
console.log(result.branch);
|
431
|
+
}
|
432
|
+
else {
|
433
|
+
console.log('sin branch');
|
434
|
+
}
|
435
|
+
// Labels
|
436
|
+
if (result.labels) {
|
437
|
+
const labels = [];
|
438
|
+
for (const label of result.labels) {
|
439
|
+
labels.push(getColored(label, 'cyan'));
|
440
|
+
}
|
441
|
+
console.log(labels.join(' '));
|
442
|
+
}
|
443
|
+
// Body
|
444
|
+
if (result.body) {
|
445
|
+
console.log(result.body);
|
446
|
+
}
|
447
|
+
return true;
|
448
|
+
});
|
449
|
+
},
|
450
|
+
checkIssueType(issueNumber) {
|
451
|
+
var _a;
|
452
|
+
return __awaiter(this, void 0, void 0, function* () {
|
453
|
+
if (!context.projectApi) {
|
454
|
+
return false;
|
455
|
+
}
|
456
|
+
const issue = yield context.projectApi.getIssueObject(issueNumber);
|
457
|
+
// Setea el issueType segun el issue
|
458
|
+
try {
|
459
|
+
let newIssueType = 'feature';
|
460
|
+
if (issue.labels && ((_a = issue.labels) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
461
|
+
if (issue.labels.includes('documentation')) {
|
462
|
+
newIssueType = 'doc';
|
463
|
+
}
|
464
|
+
else if (issue.labels.includes('automation')) {
|
465
|
+
newIssueType = 'automation';
|
466
|
+
}
|
467
|
+
else if (issue.labels.includes('bug')) {
|
468
|
+
newIssueType = 'fix';
|
469
|
+
}
|
470
|
+
}
|
471
|
+
context.newIssueType = newIssueType;
|
472
|
+
}
|
473
|
+
catch (error) {
|
474
|
+
console.log(error);
|
475
|
+
}
|
476
|
+
return true;
|
477
|
+
});
|
478
|
+
}
|
479
|
+
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { ITask } from "../types/helpers/tasks.js";
|
2
|
+
import { AnyValue, CommandOptions, ObjectRecord } from "../types/auto.js";
|
3
|
+
export declare const TASKS_FOLDER: string;
|
4
|
+
export declare const SUBTASKS_FOLDER: string;
|
5
|
+
export declare const NEW_FOLDER: string;
|
6
|
+
export declare function getTaskFolder(command: string): string;
|
7
|
+
export declare function getTasks(folder?: string): Record<string, ITask>;
|
8
|
+
export declare function helpTask(task: ITask): Promise<boolean>;
|
9
|
+
export declare function validateTask(task: ITask): boolean;
|
10
|
+
export declare function runTask(task: ITask, taskContext: CommandOptions, tabs?: string): Promise<boolean>;
|
11
|
+
export declare function previewTask(task: ITask, tabs?: string): Promise<void>;
|
12
|
+
export declare function createObject(fields: ObjectRecord, values: AnyValue[]): ObjectRecord;
|