@salesforce/plugin-devops-center 1.0.0-beta.1 → 1.0.0-beta.2
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 +3 -1
- package/lib/commands/project/deploy/pipeline/quick.d.ts +23 -0
- package/lib/commands/project/deploy/pipeline/quick.js +45 -0
- package/lib/commands/project/deploy/pipeline/quick.js.map +1 -0
- package/lib/commands/project/deploy/pipeline/resume.d.ts +3 -2
- package/lib/commands/project/deploy/pipeline/resume.js +1 -0
- package/lib/commands/project/deploy/pipeline/resume.js.map +1 -1
- package/lib/commands/project/deploy/pipeline/start.d.ts +4 -2
- package/lib/commands/project/deploy/pipeline/start.js +1 -0
- package/lib/commands/project/deploy/pipeline/start.js.map +1 -1
- package/lib/commands/project/deploy/pipeline/validate.d.ts +19 -0
- package/lib/commands/project/deploy/pipeline/validate.js +37 -0
- package/lib/commands/project/deploy/pipeline/validate.js.map +1 -0
- package/lib/common/base/abstractAsyncOperation.d.ts +42 -0
- package/lib/common/base/abstractAsyncOperation.js +94 -0
- package/lib/common/base/abstractAsyncOperation.js.map +1 -0
- package/lib/common/base/abstractPromote.d.ts +8 -16
- package/lib/common/base/abstractPromote.js +19 -69
- package/lib/common/base/abstractPromote.js.map +1 -1
- package/lib/common/base/abstractQuick.d.ts +59 -0
- package/lib/common/base/abstractQuick.js +111 -0
- package/lib/common/base/abstractQuick.js.map +1 -0
- package/lib/common/base/abstractResume.d.ts +7 -12
- package/lib/common/base/abstractResume.js +9 -35
- package/lib/common/base/abstractResume.js.map +1 -1
- package/lib/common/constants.d.ts +2 -1
- package/lib/common/constants.js +1 -0
- package/lib/common/constants.js.map +1 -1
- package/lib/common/index.d.ts +1 -1
- package/lib/common/index.js.map +1 -1
- package/lib/common/outputColumns.d.ts +1 -0
- package/lib/common/outputColumns.js +1 -0
- package/lib/common/outputColumns.js.map +1 -1
- package/lib/common/outputService/aorOutputService.js +12 -6
- package/lib/common/outputService/aorOutputService.js.map +1 -1
- package/lib/common/outputService/deployCommandOutputService.d.ts +1 -1
- package/lib/common/outputService/deployCommandOutputService.js +2 -2
- package/lib/common/outputService/deployCommandOutputService.js.map +1 -1
- package/lib/common/outputService/deploySummaryBuilder.d.ts +12 -0
- package/lib/common/outputService/deploySummaryBuilder.js +59 -5
- package/lib/common/outputService/deploySummaryBuilder.js.map +1 -1
- package/lib/common/outputService/outputServiceFactory.d.ts +11 -5
- package/lib/common/outputService/outputServiceFactory.js +8 -2
- package/lib/common/outputService/outputServiceFactory.js.map +1 -1
- package/lib/common/outputService/promoteOutputService.d.ts +0 -6
- package/lib/common/outputService/promoteOutputService.js +0 -11
- package/lib/common/outputService/promoteOutputService.js.map +1 -1
- package/lib/common/outputService/resumeCommandOutputService.d.ts +7 -4
- package/lib/common/outputService/resumeCommandOutputService.js +8 -4
- package/lib/common/outputService/resumeCommandOutputService.js.map +1 -1
- package/lib/common/outputService/resumeOutputService.d.ts +7 -0
- package/lib/common/outputService/resumeOutputService.js +14 -0
- package/lib/common/outputService/resumeOutputService.js.map +1 -1
- package/lib/common/selectors/deployComponentsSelector.d.ts +1 -0
- package/lib/common/selectors/deployComponentsSelector.js +9 -1
- package/lib/common/selectors/deployComponentsSelector.js.map +1 -1
- package/lib/common/selectors/deploymentResultsSelector.d.ts +19 -1
- package/lib/common/selectors/deploymentResultsSelector.js +29 -1
- package/lib/common/selectors/deploymentResultsSelector.js.map +1 -1
- package/lib/common/selectors/pipelineStageSelector.d.ts +5 -0
- package/lib/common/selectors/pipelineStageSelector.js +13 -1
- package/lib/common/selectors/pipelineStageSelector.js.map +1 -1
- package/lib/common/selectors/validateDeploySelector.d.ts +6 -0
- package/lib/common/selectors/validateDeploySelector.js +22 -0
- package/lib/common/selectors/validateDeploySelector.js.map +1 -0
- package/lib/common/types.d.ts +10 -5
- package/lib/common/types.js +0 -6
- package/lib/common/types.js.map +1 -1
- package/lib/common/utils.d.ts +7 -1
- package/lib/common/utils.js +16 -3
- package/lib/common/utils.js.map +1 -1
- package/lib/streamer/processors/asyncOpStream.js +2 -1
- package/lib/streamer/processors/asyncOpStream.js.map +1 -1
- package/messages/commonFlags.md +2 -2
- package/messages/config.md +1 -1
- package/messages/deploy.output.md +18 -2
- package/messages/project.deploy.pipeline.quick.md +45 -0
- package/messages/project.deploy.pipeline.report.md +3 -3
- package/messages/project.deploy.pipeline.resume.md +1 -1
- package/messages/project.deploy.pipeline.start.md +5 -1
- package/messages/project.deploy.pipeline.validate.md +17 -0
- package/messages/promoteFlags.md +3 -3
- package/oclif.manifest.json +238 -9
- package/package.json +221 -115
- package/schemas/project-deploy-pipeline-quick.json +25 -0
- package/schemas/project-deploy-pipeline-resume.json +3 -3
- package/schemas/project-deploy-pipeline-start.json +3 -3
- package/schemas/project-deploy-pipeline-validate.json +25 -0
|
@@ -22,11 +22,17 @@ class OutputServiceFactory {
|
|
|
22
22
|
forDeployment(flags, con) {
|
|
23
23
|
return new deployCommandOutputService_1.DeployCommandOutputService(flags, con);
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Create a service to print the quick deployment info.
|
|
27
|
+
*/
|
|
28
|
+
forQuickDeployment(flags, con, branchName) {
|
|
29
|
+
return new deployCommandOutputService_1.DeployCommandOutputService(flags, con, branchName);
|
|
30
|
+
}
|
|
25
31
|
/**
|
|
26
32
|
* Create a service to print the resume info.
|
|
27
33
|
*/
|
|
28
|
-
forResume(operationType) {
|
|
29
|
-
return new resumeCommandOutputService_1.ResumeCommandOutputService(operationType);
|
|
34
|
+
forResume(flags, operationType, con) {
|
|
35
|
+
return new resumeCommandOutputService_1.ResumeCommandOutputService(flags, operationType, con);
|
|
30
36
|
}
|
|
31
37
|
/**
|
|
32
38
|
* Create a service to print the report info.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outputServiceFactory.js","sourceRoot":"","sources":["../../../src/common/outputService/outputServiceFactory.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;
|
|
1
|
+
{"version":3,"file":"outputServiceFactory.js","sourceRoot":"","sources":["../../../src/common/outputService/outputServiceFactory.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAWH,6EAA0E;AAC1E,+DAAmE;AACnE,6EAA0E;AAE1E;;;;GAIG;AACH,MAAa,oBAAoB;IAC/B;;OAEG;IACI,aAAa,CAAC,KAA8C,EAAE,GAAe;QAClF,OAAO,IAAI,uDAA0B,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACpD,CAAC;IAED;;OAEG;IACI,kBAAkB,CACvB,KAAmD,EACnD,GAAe,EACf,UAAkB;QAElB,OAAO,IAAI,uDAA0B,CAAC,KAAK,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC;IAChE,CAAC;IAED;;OAEG;IACI,SAAS,CACd,KAAoC,EACpC,aAAqB,EACrB,GAAe;QAEf,OAAO,IAAI,uDAA0B,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,CAAC,CAAC;IACnE,CAAC;IAED;;OAEG;IACI,kBAAkB,CACvB,KAAoC,EACpC,eAAiC,EACjC,aAAqB;QAErB,OAAO,IAAI,gDAA0B,CAAC,KAAK,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;IAC/E,CAAC;CACF;AAxCD,oDAwCC"}
|
|
@@ -11,7 +11,6 @@ export type PromoteOutputFlags = {
|
|
|
11
11
|
* @author JuanStenghele-sf
|
|
12
12
|
*/
|
|
13
13
|
export interface PromoteOutputService extends ResumeOutputService {
|
|
14
|
-
displayEndResults(): Promise<void>;
|
|
15
14
|
}
|
|
16
15
|
/**
|
|
17
16
|
* Abstract class that implements PromoteOutputService interface
|
|
@@ -20,11 +19,6 @@ export interface PromoteOutputService extends ResumeOutputService {
|
|
|
20
19
|
*/
|
|
21
20
|
export declare abstract class AbstractPromoteOutputService extends AbstractResumeOutputService<PromoteOutputFlags> implements PromoteOutputService {
|
|
22
21
|
private summaryBuilder;
|
|
23
|
-
private con;
|
|
24
22
|
constructor(flags: PromoteOutputFlags, summaryBuilder: DeploySummaryBuilder, con: Connection);
|
|
25
23
|
printOpSummary(): Promise<void>;
|
|
26
|
-
/**
|
|
27
|
-
* This method will print a table of the deployed components for the current AOR
|
|
28
|
-
*/
|
|
29
|
-
displayEndResults(): Promise<void>;
|
|
30
24
|
}
|
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.AbstractPromoteOutputService = void 0;
|
|
10
10
|
const core_1 = require("@salesforce/core");
|
|
11
|
-
const outputColumns_1 = require("../outputColumns");
|
|
12
|
-
const utils_1 = require("../utils");
|
|
13
11
|
const resumeOutputService_1 = require("./resumeOutputService");
|
|
14
12
|
/* eslint-disable @typescript-eslint/no-empty-interface, no-console */
|
|
15
13
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
@@ -41,15 +39,6 @@ class AbstractPromoteOutputService extends resumeOutputService_1.AbstractResumeO
|
|
|
41
39
|
await deploySummaryOutputService.printOpSummary();
|
|
42
40
|
}
|
|
43
41
|
}
|
|
44
|
-
/**
|
|
45
|
-
* This method will print a table of the deployed components for the current AOR
|
|
46
|
-
*/
|
|
47
|
-
async displayEndResults() {
|
|
48
|
-
if (this.flags.verbose) {
|
|
49
|
-
const components = await (0, utils_1.getFormattedDeployComponentsByAyncOpId)(this.con, this.aorId);
|
|
50
|
-
this.displayTable(components, outputColumns_1.DeployComponentsTable.title, outputColumns_1.DeployComponentsTable.columns);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
42
|
}
|
|
54
43
|
exports.AbstractPromoteOutputService = AbstractPromoteOutputService;
|
|
55
44
|
//# sourceMappingURL=promoteOutputService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promoteOutputService.js","sourceRoot":"","sources":["../../../src/common/outputService/promoteOutputService.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,2CAAwD;
|
|
1
|
+
{"version":3,"file":"promoteOutputService.js","sourceRoot":"","sources":["../../../src/common/outputService/promoteOutputService.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,2CAAwD;AAIxD,+DAAyF;AAEzF,sEAAsE;AAEtE,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,MAAM,GAAG,eAAQ,CAAC,YAAY,CAAC,kCAAkC,EAAE,eAAe,CAAC,CAAC;AAa1F;;;;GAIG;AACH,MAAsB,4BACpB,SAAQ,iDAA+C;IAKvD,YAAmB,KAAyB,EAAE,cAAoC,EAAE,GAAe;QACjG,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACjB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAEM,KAAK,CAAC,cAAc;QACzB,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;YACpB,yDAAyD;YACzD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,uBAAuB,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SACnF;aAAM;YACL,oCAAoC;YACpC,MAAM,0BAA0B,GAA8B,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,CAC3F,IAAI,CAAC,KAAK,CAAC,MAAM,EACjB,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,KAAK,CACX,CAAC;YACF,IAAI,0BAA0B,KAAK,SAAS,EAAE;gBAC5C,OAAO;aACR;YAED,uBAAuB;YACvB,6DAA6D;YAC7D,MAAM,0BAA0B,CAAC,cAAc,EAAE,CAAC;SACnD;IACH,CAAC;CACF;AAhCD,oEAgCC"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Connection } from '@salesforce/core';
|
|
2
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
3
|
+
import { Flags } from '../base/abstractResume';
|
|
4
|
+
import { AorOutputFlags } from './aorOutputService';
|
|
5
|
+
import { AbstractResumeOutputService } from './resumeOutputService';
|
|
3
6
|
/**
|
|
4
7
|
* Service class to print the resume output
|
|
5
8
|
*
|
|
6
9
|
* @author JuanStenghele-sf
|
|
7
10
|
*/
|
|
8
|
-
export declare class ResumeCommandOutputService extends
|
|
11
|
+
export declare class ResumeCommandOutputService extends AbstractResumeOutputService<AorOutputFlags> {
|
|
9
12
|
private operationType;
|
|
10
|
-
constructor(operationType: string);
|
|
13
|
+
constructor(flags: Flags<typeof SfCommand>, operationType: string, con: Connection);
|
|
11
14
|
printOpSummary(): void;
|
|
12
15
|
}
|
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.ResumeCommandOutputService = void 0;
|
|
10
10
|
/* eslint-disable no-console, @typescript-eslint/require-await */
|
|
11
11
|
const core_1 = require("@salesforce/core");
|
|
12
|
-
const
|
|
12
|
+
const resumeOutputService_1 = require("./resumeOutputService");
|
|
13
13
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
14
14
|
const output = core_1.Messages.loadMessages('@salesforce/plugin-devops-center', 'resume.output');
|
|
15
15
|
/**
|
|
@@ -17,9 +17,13 @@ const output = core_1.Messages.loadMessages('@salesforce/plugin-devops-center',
|
|
|
17
17
|
*
|
|
18
18
|
* @author JuanStenghele-sf
|
|
19
19
|
*/
|
|
20
|
-
class ResumeCommandOutputService extends
|
|
21
|
-
constructor(operationType) {
|
|
22
|
-
super({
|
|
20
|
+
class ResumeCommandOutputService extends resumeOutputService_1.AbstractResumeOutputService {
|
|
21
|
+
constructor(flags, operationType, con) {
|
|
22
|
+
super({
|
|
23
|
+
concise: flags['concise'],
|
|
24
|
+
verbose: flags['verbose'],
|
|
25
|
+
}, '');
|
|
26
|
+
this.con = con;
|
|
23
27
|
this.operationType = operationType;
|
|
24
28
|
}
|
|
25
29
|
printOpSummary() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resumeCommandOutputService.js","sourceRoot":"","sources":["../../../src/common/outputService/resumeCommandOutputService.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,iEAAiE;AAEjE,
|
|
1
|
+
{"version":3,"file":"resumeCommandOutputService.js","sourceRoot":"","sources":["../../../src/common/outputService/resumeCommandOutputService.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,iEAAiE;AAEjE,2CAAwD;AAIxD,+DAAoE;AAEpE,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,MAAM,GAAG,eAAQ,CAAC,YAAY,CAAC,kCAAkC,EAAE,eAAe,CAAC,CAAC;AAE1F;;;;GAIG;AACH,MAAa,0BAA2B,SAAQ,iDAA2C;IAGzF,YAAmB,KAA8B,EAAE,aAAqB,EAAE,GAAe;QACvF,KAAK,CACH;YACE,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;YACzB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;SAC1B,EACD,EAAE,CACH,CAAC;QACF,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAEM,cAAc;QACnB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IACzE,CAAC;CACF;AAlBD,gEAkBC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Connection } from '@salesforce/core';
|
|
1
2
|
import { AorOutputService, AorOutputFlags, AbstractAorOutputService } from './aorOutputService';
|
|
2
3
|
/**
|
|
3
4
|
* Interface for output methods for resume operations
|
|
@@ -5,6 +6,7 @@ import { AorOutputService, AorOutputFlags, AbstractAorOutputService } from './ao
|
|
|
5
6
|
* @author JuanStenghele-sf
|
|
6
7
|
*/
|
|
7
8
|
export interface ResumeOutputService extends AorOutputService {
|
|
9
|
+
displayEndResults(): void;
|
|
8
10
|
}
|
|
9
11
|
/**
|
|
10
12
|
* Abstract class that implements ResumeOutputService interface
|
|
@@ -12,4 +14,9 @@ export interface ResumeOutputService extends AorOutputService {
|
|
|
12
14
|
* @author JuanStenghele-sf
|
|
13
15
|
*/
|
|
14
16
|
export declare abstract class AbstractResumeOutputService<T extends AorOutputFlags> extends AbstractAorOutputService<T> implements ResumeOutputService {
|
|
17
|
+
protected con: Connection;
|
|
18
|
+
/**
|
|
19
|
+
* This method will print a table of the deployed components for the current AOR
|
|
20
|
+
*/
|
|
21
|
+
displayEndResults(): Promise<void>;
|
|
15
22
|
}
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.AbstractResumeOutputService = void 0;
|
|
10
|
+
const outputColumns_1 = require("../outputColumns");
|
|
11
|
+
const deploymentResultsSelector_1 = require("../selectors/deploymentResultsSelector");
|
|
12
|
+
const utils_1 = require("../utils");
|
|
10
13
|
const aorOutputService_1 = require("./aorOutputService");
|
|
11
14
|
/**
|
|
12
15
|
* Abstract class that implements ResumeOutputService interface
|
|
@@ -14,6 +17,17 @@ const aorOutputService_1 = require("./aorOutputService");
|
|
|
14
17
|
* @author JuanStenghele-sf
|
|
15
18
|
*/
|
|
16
19
|
class AbstractResumeOutputService extends aorOutputService_1.AbstractAorOutputService {
|
|
20
|
+
/**
|
|
21
|
+
* This method will print a table of the deployed components for the current AOR
|
|
22
|
+
*/
|
|
23
|
+
async displayEndResults() {
|
|
24
|
+
if (this.flags.verbose) {
|
|
25
|
+
const isValidateDeploy = await (0, deploymentResultsSelector_1.isCheckDeploy)(this.con, this.aorId);
|
|
26
|
+
const components = await (0, utils_1.getFormattedDeployComponentsByAyncOpId)(this.con, this.aorId, isValidateDeploy);
|
|
27
|
+
const title = isValidateDeploy ? outputColumns_1.DeployComponentsTable.validateDeployTitle : outputColumns_1.DeployComponentsTable.title;
|
|
28
|
+
this.displayTable(components, title, outputColumns_1.DeployComponentsTable.columns);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
17
31
|
}
|
|
18
32
|
exports.AbstractResumeOutputService = AbstractResumeOutputService;
|
|
19
33
|
//# sourceMappingURL=resumeOutputService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resumeOutputService.js","sourceRoot":"","sources":["../../../src/common/outputService/resumeOutputService.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;
|
|
1
|
+
{"version":3,"file":"resumeOutputService.js","sourceRoot":"","sources":["../../../src/common/outputService/resumeOutputService.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,oDAAyD;AACzD,sFAAuE;AAEvE,oCAAkE;AAClE,yDAAgG;AAahG;;;;GAIG;AACH,MAAsB,2BACpB,SAAQ,2CAA2B;IAKnC;;OAEG;IACI,KAAK,CAAC,iBAAiB;QAC5B,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;YACtB,MAAM,gBAAgB,GAAG,MAAM,IAAA,yCAAa,EAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;YACnE,MAAM,UAAU,GAAsB,MAAM,IAAA,8CAAsC,EAChF,IAAI,CAAC,GAAG,EACR,IAAI,CAAC,KAAK,EACV,gBAAgB,CACjB,CAAC;YACF,MAAM,KAAK,GAAG,gBAAgB,CAAC,CAAC,CAAC,qCAAqB,CAAC,mBAAmB,CAAC,CAAC,CAAC,qCAAqB,CAAC,KAAK,CAAC;YACzG,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,KAAK,EAAE,qCAAqB,CAAC,OAAO,CAAC,CAAC;SACrE;IACH,CAAC;CACF;AArBD,kEAqBC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { Connection } from '@salesforce/core';
|
|
2
2
|
import { DeployComponent } from '../types';
|
|
3
3
|
export declare function selectDeployComponentsByAsyncOpId(con: Connection, asyncOpId: string): Promise<DeployComponent[]>;
|
|
4
|
+
export declare function selectDeployComponentsForCheckDeployByAsynchOpId(con: Connection, asyncOpId: string): Promise<DeployComponent[]>;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.selectDeployComponentsByAsyncOpId = void 0;
|
|
9
|
+
exports.selectDeployComponentsForCheckDeployByAsynchOpId = exports.selectDeployComponentsByAsyncOpId = void 0;
|
|
10
10
|
const selectorUtils_1 = require("./selectorUtils");
|
|
11
11
|
async function selectDeployComponentsByAsyncOpId(con, asyncOpId) {
|
|
12
12
|
const queryStr = `SELECT sf_devops__Source_Component__c, sf_devops__Operation__c, sf_devops__File_Path__c
|
|
@@ -16,4 +16,12 @@ async function selectDeployComponentsByAsyncOpId(con, asyncOpId) {
|
|
|
16
16
|
return resp.records;
|
|
17
17
|
}
|
|
18
18
|
exports.selectDeployComponentsByAsyncOpId = selectDeployComponentsByAsyncOpId;
|
|
19
|
+
async function selectDeployComponentsForCheckDeployByAsynchOpId(con, asyncOpId) {
|
|
20
|
+
const queryStr = `SELECT sf_devops__Source_Component__c, sf_devops__Operation__c, sf_devops__File_Path__c
|
|
21
|
+
FROM sf_devops__Deploy_Component__c
|
|
22
|
+
WHERE sf_devops__Deployment_Result__r.sf_devops__Check_Deploy_Status__c = '${asyncOpId}'`;
|
|
23
|
+
const resp = await (0, selectorUtils_1.runSafeQuery)(con, queryStr);
|
|
24
|
+
return resp.records;
|
|
25
|
+
}
|
|
26
|
+
exports.selectDeployComponentsForCheckDeployByAsynchOpId = selectDeployComponentsForCheckDeployByAsynchOpId;
|
|
19
27
|
//# sourceMappingURL=deployComponentsSelector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployComponentsSelector.js","sourceRoot":"","sources":["../../../src/common/selectors/deployComponentsSelector.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAKH,mDAA+C;AAExC,KAAK,UAAU,iCAAiC,CACrD,GAAe,EACf,SAAiB;IAEjB,MAAM,QAAQ,GAAG;;oFAEiE,SAAS,GAAG,CAAC;IAE/F,MAAM,IAAI,GAAiC,MAAM,IAAA,4BAAY,EAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAC7E,OAAO,IAAI,CAAC,OAAO,CAAC;AACtB,CAAC;AAVD,8EAUC"}
|
|
1
|
+
{"version":3,"file":"deployComponentsSelector.js","sourceRoot":"","sources":["../../../src/common/selectors/deployComponentsSelector.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAKH,mDAA+C;AAExC,KAAK,UAAU,iCAAiC,CACrD,GAAe,EACf,SAAiB;IAEjB,MAAM,QAAQ,GAAG;;oFAEiE,SAAS,GAAG,CAAC;IAE/F,MAAM,IAAI,GAAiC,MAAM,IAAA,4BAAY,EAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAC7E,OAAO,IAAI,CAAC,OAAO,CAAC;AACtB,CAAC;AAVD,8EAUC;AAEM,KAAK,UAAU,gDAAgD,CACpE,GAAe,EACf,SAAiB;IAEjB,MAAM,QAAQ,GAAG;;iGAE8E,SAAS,GAAG,CAAC;IAE5G,MAAM,IAAI,GAAiC,MAAM,IAAA,4BAAY,EAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAC7E,OAAO,IAAI,CAAC,OAAO,CAAC;AACtB,CAAC;AAVD,4GAUC"}
|
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
import { Connection } from '@salesforce/core';
|
|
2
|
-
import {
|
|
2
|
+
import { QueryResult } from 'jsforce';
|
|
3
|
+
import { AsyncOperationResult, ChangeBundleInstall, DeploymentResult } from '../types';
|
|
4
|
+
export type DeploymentResultCheckDeploy = {
|
|
5
|
+
sf_devops__Check_Deploy__c: boolean | null;
|
|
6
|
+
};
|
|
7
|
+
export type CheckDeploymentResultWithChangeBundleInstalls = {
|
|
8
|
+
sf_devops__Change_Bundle_Installs__r: QueryResult<ChangeBundleInstall>;
|
|
9
|
+
sf_devops__Check_Deploy_Status__r: AsyncOperationResult;
|
|
10
|
+
} & DeploymentResult;
|
|
3
11
|
/**
|
|
4
12
|
*
|
|
5
13
|
* Returns deployment result record filtering by async job id.
|
|
6
14
|
*/
|
|
7
15
|
export declare function selectOneDeploymentResultByAsyncJobId(con: Connection, asyncJobId: string): Promise<DeploymentResult | null>;
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* Returns if a deployment result is from a Check-Deploy by async job id.
|
|
19
|
+
*/
|
|
20
|
+
export declare function isCheckDeploy(con: Connection, asyncJobId: string): Promise<boolean>;
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* Returns deployment result record with Change Bundle Installs filtering by check deploy job id.
|
|
24
|
+
*/
|
|
25
|
+
export declare function selectOneDeploymentResultWithChangeBundleInstallsByAsyncJobId(con: Connection, asyncJobId: string): Promise<CheckDeploymentResultWithChangeBundleInstalls | null>;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.selectOneDeploymentResultByAsyncJobId = void 0;
|
|
9
|
+
exports.selectOneDeploymentResultWithChangeBundleInstallsByAsyncJobId = exports.isCheckDeploy = exports.selectOneDeploymentResultByAsyncJobId = void 0;
|
|
10
10
|
const selectorUtils_1 = require("./selectorUtils");
|
|
11
11
|
/**
|
|
12
12
|
*
|
|
@@ -23,4 +23,32 @@ async function selectOneDeploymentResultByAsyncJobId(con, asyncJobId) {
|
|
|
23
23
|
return resp.totalSize > 0 ? resp.records[0] : null;
|
|
24
24
|
}
|
|
25
25
|
exports.selectOneDeploymentResultByAsyncJobId = selectOneDeploymentResultByAsyncJobId;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* Returns if a deployment result is from a Check-Deploy by async job id.
|
|
29
|
+
*/
|
|
30
|
+
async function isCheckDeploy(con, asyncJobId) {
|
|
31
|
+
const queryStr = `SELECT sf_devops__Check_Deploy__c,
|
|
32
|
+
sf_devops__Status__r.Id, sf_devops__Check_Deploy_Status__r.Id
|
|
33
|
+
FROM sf_devops__Deployment_Result__c
|
|
34
|
+
WHERE sf_devops__Status__r.Id = '${asyncJobId}'
|
|
35
|
+
OR sf_devops__Check_Deploy_Status__r.Id = '${asyncJobId}'`;
|
|
36
|
+
const resp = await (0, selectorUtils_1.runSafeQuery)(con, queryStr, true);
|
|
37
|
+
const result = resp.totalSize > 0 && !!resp.records[0].sf_devops__Check_Deploy__c;
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
exports.isCheckDeploy = isCheckDeploy;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* Returns deployment result record with Change Bundle Installs filtering by check deploy job id.
|
|
44
|
+
*/
|
|
45
|
+
async function selectOneDeploymentResultWithChangeBundleInstallsByAsyncJobId(con, asyncJobId) {
|
|
46
|
+
const queryStr = `SELECT sf_devops__Check_Deploy__c, sf_devops__Deployment_Id__c, sf_devops__Check_Deploy_Status__r.sf_devops__Status__c,
|
|
47
|
+
(SELECT sf_devops__Environment__c FROM sf_devops__Change_Bundle_Installs__r)
|
|
48
|
+
FROM sf_devops__Deployment_Result__c
|
|
49
|
+
WHERE sf_devops__Check_Deploy_Status__c = '${asyncJobId}' AND sf_devops__Check_Deploy__c = TRUE`;
|
|
50
|
+
const resp = await (0, selectorUtils_1.runSafeQuery)(con, queryStr, true);
|
|
51
|
+
return resp.totalSize > 0 ? resp.records[0] : null;
|
|
52
|
+
}
|
|
53
|
+
exports.selectOneDeploymentResultWithChangeBundleInstallsByAsyncJobId = selectOneDeploymentResultWithChangeBundleInstallsByAsyncJobId;
|
|
26
54
|
//# sourceMappingURL=deploymentResultsSelector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploymentResultsSelector.js","sourceRoot":"","sources":["../../../src/common/selectors/deploymentResultsSelector.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAKH,mDAA+C;
|
|
1
|
+
{"version":3,"file":"deploymentResultsSelector.js","sourceRoot":"","sources":["../../../src/common/selectors/deploymentResultsSelector.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAKH,mDAA+C;AAW/C;;;GAGG;AACI,KAAK,UAAU,qCAAqC,CACzD,GAAe,EACf,UAAkB;IAElB,MAAM,QAAQ,GAAG;;;;;uDAKoC,UAAU,GAAG,CAAC;IAEnE,MAAM,IAAI,GAAkC,MAAM,IAAA,4BAAY,EAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;IACpF,OAAO,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACrD,CAAC;AAbD,sFAaC;AAED;;;GAGG;AACI,KAAK,UAAU,aAAa,CAAC,GAAe,EAAE,UAAkB;IACrE,MAAM,QAAQ,GAAG;;;uDAGoC,UAAU;iEACA,UAAU,GAAG,CAAC;IAE7E,MAAM,IAAI,GAA6C,MAAM,IAAA,4BAAY,EAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC/F,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC;IAClF,OAAO,MAAM,CAAC;AAChB,CAAC;AAVD,sCAUC;AACD;;;GAGG;AACI,KAAK,UAAU,6DAA6D,CACjF,GAAe,EACf,UAAkB;IAElB,MAAM,QAAQ,GAAG;;;iEAG8C,UAAU,yCAAyC,CAAC;IAEnH,MAAM,IAAI,GAA+D,MAAM,IAAA,4BAAY,EAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;IACjH,OAAO,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACrD,CAAC;AAXD,sIAWC"}
|
|
@@ -5,3 +5,8 @@ import { PipelineStage } from '../types';
|
|
|
5
5
|
* Returns an array of a pipeline stages filtering by project name.
|
|
6
6
|
*/
|
|
7
7
|
export declare function selectPipelineStagesByProject(con: Connection, projectName: string): Promise<PipelineStage[]>;
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* Returns an array of a pipeline stages filtering by environment Id.
|
|
11
|
+
*/
|
|
12
|
+
export declare function selectOnePipelineStageByEnvironmentId(con: Connection, envId: string): Promise<PipelineStage | null>;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.selectPipelineStagesByProject = void 0;
|
|
9
|
+
exports.selectOnePipelineStageByEnvironmentId = exports.selectPipelineStagesByProject = void 0;
|
|
10
10
|
const selectorUtils_1 = require("./selectorUtils");
|
|
11
11
|
/**
|
|
12
12
|
*
|
|
@@ -20,4 +20,16 @@ async function selectPipelineStagesByProject(con, projectName) {
|
|
|
20
20
|
return resp.records;
|
|
21
21
|
}
|
|
22
22
|
exports.selectPipelineStagesByProject = selectPipelineStagesByProject;
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* Returns an array of a pipeline stages filtering by environment Id.
|
|
26
|
+
*/
|
|
27
|
+
async function selectOnePipelineStageByEnvironmentId(con, envId) {
|
|
28
|
+
const queryStr = `SELECT Id, sf_devops__Pipeline__r.sf_devops__Project__c, sf_devops__Branch__r.sf_devops__Name__c, (SELECT Id FROM sf_devops__Pipeline_Stages__r)
|
|
29
|
+
FROM sf_devops__Pipeline_Stage__c
|
|
30
|
+
WHERE sf_devops__Environment__c = '${envId}'`;
|
|
31
|
+
const resp = await (0, selectorUtils_1.runSafeQuery)(con, queryStr);
|
|
32
|
+
return resp.records[0];
|
|
33
|
+
}
|
|
34
|
+
exports.selectOnePipelineStageByEnvironmentId = selectOnePipelineStageByEnvironmentId;
|
|
23
35
|
//# sourceMappingURL=pipelineStageSelector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipelineStageSelector.js","sourceRoot":"","sources":["../../../src/common/selectors/pipelineStageSelector.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAKH,mDAA+C;AAE/C;;;GAGG;AACI,KAAK,UAAU,6BAA6B,CAAC,GAAe,EAAE,WAAmB;IACtF,MAAM,QAAQ,GAAG;;iFAE8D,WAAW,GAAG,CAAC;IAE9F,MAAM,IAAI,GAA+B,MAAM,IAAA,4BAAY,EAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAC3E,OAAO,IAAI,CAAC,OAAO,CAAC;AACtB,CAAC;AAPD,sEAOC"}
|
|
1
|
+
{"version":3,"file":"pipelineStageSelector.js","sourceRoot":"","sources":["../../../src/common/selectors/pipelineStageSelector.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAKH,mDAA+C;AAE/C;;;GAGG;AACI,KAAK,UAAU,6BAA6B,CAAC,GAAe,EAAE,WAAmB;IACtF,MAAM,QAAQ,GAAG;;iFAE8D,WAAW,GAAG,CAAC;IAE9F,MAAM,IAAI,GAA+B,MAAM,IAAA,4BAAY,EAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAC3E,OAAO,IAAI,CAAC,OAAO,CAAC;AACtB,CAAC;AAPD,sEAOC;AAED;;;GAGG;AACI,KAAK,UAAU,qCAAqC,CACzD,GAAe,EACf,KAAa;IAEb,MAAM,QAAQ,GAAG;;yDAEsC,KAAK,GAAG,CAAC;IAEhE,MAAM,IAAI,GAA+B,MAAM,IAAA,4BAAY,EAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAC3E,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACzB,CAAC;AAVD,sFAUC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Connection } from '@salesforce/core';
|
|
2
|
+
import { ChangeBundleInstall } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Returns the data necessary to create the deploy summary (or part of it).
|
|
5
|
+
*/
|
|
6
|
+
export declare function selectValidateDeployAORSummaryDataById(con: Connection, aorId: string): Promise<ChangeBundleInstall[]>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2023, salesforce.com, inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Licensed under the BSD 3-Clause license.
|
|
6
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.selectValidateDeployAORSummaryDataById = void 0;
|
|
10
|
+
const selectorUtils_1 = require("./selectorUtils");
|
|
11
|
+
/**
|
|
12
|
+
* Returns the data necessary to create the deploy summary (or part of it).
|
|
13
|
+
*/
|
|
14
|
+
async function selectValidateDeployAORSummaryDataById(con, aorId) {
|
|
15
|
+
const queryStr = `SELECT sf_devops__Change_Bundle__r.Id, sf_devops__Change_Bundle__r.sf_devops__Version_Name__c, sf_devops__Environment__r.Id
|
|
16
|
+
FROM sf_devops__Change_Bundle_Install__c
|
|
17
|
+
WHERE sf_devops__Deployment_Result__r.sf_devops__Check_Deploy_Status__c = '${aorId}'`;
|
|
18
|
+
const resp = await (0, selectorUtils_1.runSafeQuery)(con, queryStr);
|
|
19
|
+
return resp.records;
|
|
20
|
+
}
|
|
21
|
+
exports.selectValidateDeployAORSummaryDataById = selectValidateDeployAORSummaryDataById;
|
|
22
|
+
//# sourceMappingURL=validateDeploySelector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateDeploySelector.js","sourceRoot":"","sources":["../../../src/common/selectors/validateDeploySelector.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAKH,mDAA+C;AAE/C;;GAEG;AACI,KAAK,UAAU,sCAAsC,CAC1D,GAAe,EACf,KAAa;IAEb,MAAM,QAAQ,GAAG;;iGAE8E,KAAK,GAAG,CAAC;IAExG,MAAM,IAAI,GAAqC,MAAM,IAAA,4BAAY,EAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IACjF,OAAO,IAAI,CAAC,OAAO,CAAC;AACtB,CAAC;AAVD,wFAUC"}
|
package/lib/common/types.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type AsyncOperationResultJson = {
|
|
2
2
|
jobId: string;
|
|
3
|
-
status
|
|
4
|
-
message
|
|
5
|
-
errorDetails
|
|
3
|
+
status: string;
|
|
4
|
+
message: string;
|
|
5
|
+
errorDetails: string;
|
|
6
6
|
};
|
|
7
|
+
export type PromotePipelineResult = Partial<AsyncOperationResultJson> & Pick<AsyncOperationResultJson, 'jobId'>;
|
|
7
8
|
export type Pipeline = {
|
|
8
9
|
sf_devops__Project__c: string;
|
|
9
10
|
};
|
|
@@ -29,7 +30,9 @@ export declare enum TestLevel {
|
|
|
29
30
|
}
|
|
30
31
|
export interface ApiError extends Error {
|
|
31
32
|
errorCode: string;
|
|
32
|
-
|
|
33
|
+
}
|
|
34
|
+
export interface ApiPromoteResponse {
|
|
35
|
+
jobId: string;
|
|
33
36
|
}
|
|
34
37
|
export type WorkItem = {
|
|
35
38
|
Name: string;
|
|
@@ -44,6 +47,7 @@ export type Environment = {
|
|
|
44
47
|
sf_devops__Named_Credential__c: string;
|
|
45
48
|
};
|
|
46
49
|
export type ChangeBundleInstall = {
|
|
50
|
+
sf_devops__Environment__c: string;
|
|
47
51
|
sf_devops__Environment__r: Environment;
|
|
48
52
|
sf_devops__Change_Bundle__r: ChangeBundle;
|
|
49
53
|
};
|
|
@@ -63,6 +67,7 @@ export type DeploymentResult = {
|
|
|
63
67
|
sf_devops__Full_Deploy__c: boolean;
|
|
64
68
|
sf_devops__Check_Deploy__c: boolean;
|
|
65
69
|
sf_devops__Completion_Date__c: string;
|
|
70
|
+
sf_devops__Deployment_Id__c: string;
|
|
66
71
|
sf_devops__Test_Level__c: string;
|
|
67
72
|
sf_devops__Run_Tests__c: string;
|
|
68
73
|
sf_devops__Status__r: AsyncOperationResult;
|
package/lib/common/types.js
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2022, salesforce.com, inc.
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Licensed under the BSD 3-Clause license.
|
|
6
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
-
*/
|
|
8
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
3
|
exports.AsyncOperationStatus = exports.TestLevel = void 0;
|
|
10
4
|
var TestLevel;
|
package/lib/common/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/common/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/common/types.ts"],"names":[],"mappings":";;;AAoCA,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,oCAAuB,CAAA;IACvB,oDAAuC,CAAA;IACvC,4CAA+B,CAAA;IAC/B,kDAAqC,CAAA;AACvC,CAAC,EALW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAKpB;AAuED,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,uCAAe,CAAA;IACf,+CAAuB,CAAA;IACvB,2CAAmB,CAAA;IACnB,kDAA0B,CAAA;AAC5B,CAAC,EALW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAK/B"}
|
package/lib/common/utils.d.ts
CHANGED
|
@@ -72,4 +72,10 @@ export declare function formatFieldName(fieldName: string): string;
|
|
|
72
72
|
* @param asyncOpId The Id of the AsyncOperation
|
|
73
73
|
* @returns A list of DeployComponent
|
|
74
74
|
*/
|
|
75
|
-
export declare function getFormattedDeployComponentsByAyncOpId(con: Connection, asyncOpId: string): Promise<DeployComponent[]>;
|
|
75
|
+
export declare function getFormattedDeployComponentsByAyncOpId(con: Connection, asyncOpId: string, isValidateDeploy: boolean): Promise<DeployComponent[]>;
|
|
76
|
+
/**
|
|
77
|
+
* Helper to sleep thread for ms amount of time
|
|
78
|
+
*
|
|
79
|
+
* @param ms Number of miliseconds to sleep thread
|
|
80
|
+
*/
|
|
81
|
+
export declare function sleep(ms: number): Promise<void>;
|
package/lib/common/utils.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.getFormattedDeployComponentsByAyncOpId = exports.formatFieldName = exports.sObjectToArrayOfKeyValue = exports.matchesSfId = exports.containsSfId = exports.getAsyncOperationStreamer = exports.fetchAsyncOperationResult = exports.fetchAndValidatePipelineStage = exports.validateTestFlags = void 0;
|
|
9
|
+
exports.sleep = exports.getFormattedDeployComponentsByAyncOpId = exports.formatFieldName = exports.sObjectToArrayOfKeyValue = exports.matchesSfId = exports.containsSfId = exports.getAsyncOperationStreamer = exports.fetchAsyncOperationResult = exports.fetchAndValidatePipelineStage = exports.validateTestFlags = void 0;
|
|
10
10
|
const core_1 = require("@salesforce/core");
|
|
11
11
|
const common_1 = require("../common");
|
|
12
12
|
const pipelineStageSelector_1 = require("../common/selectors/pipelineStageSelector");
|
|
@@ -163,8 +163,10 @@ exports.formatFieldName = formatFieldName;
|
|
|
163
163
|
* @param asyncOpId The Id of the AsyncOperation
|
|
164
164
|
* @returns A list of DeployComponent
|
|
165
165
|
*/
|
|
166
|
-
async function getFormattedDeployComponentsByAyncOpId(con, asyncOpId) {
|
|
167
|
-
const components =
|
|
166
|
+
async function getFormattedDeployComponentsByAyncOpId(con, asyncOpId, isValidateDeploy) {
|
|
167
|
+
const components = isValidateDeploy
|
|
168
|
+
? await (0, deployComponentsSelector_1.selectDeployComponentsForCheckDeployByAsynchOpId)(con, asyncOpId)
|
|
169
|
+
: await (0, deployComponentsSelector_1.selectDeployComponentsByAsyncOpId)(con, asyncOpId);
|
|
168
170
|
components.forEach((component) => {
|
|
169
171
|
component.Type = component.sf_devops__Source_Component__c.split(':')[0];
|
|
170
172
|
component.Name = component.sf_devops__Source_Component__c.split(':')[1];
|
|
@@ -172,4 +174,15 @@ async function getFormattedDeployComponentsByAyncOpId(con, asyncOpId) {
|
|
|
172
174
|
return components;
|
|
173
175
|
}
|
|
174
176
|
exports.getFormattedDeployComponentsByAyncOpId = getFormattedDeployComponentsByAyncOpId;
|
|
177
|
+
/**
|
|
178
|
+
* Helper to sleep thread for ms amount of time
|
|
179
|
+
*
|
|
180
|
+
* @param ms Number of miliseconds to sleep thread
|
|
181
|
+
*/
|
|
182
|
+
async function sleep(ms) {
|
|
183
|
+
return new Promise((resolve) => {
|
|
184
|
+
setTimeout(resolve, ms);
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
exports.sleep = sleep;
|
|
175
188
|
//# sourceMappingURL=utils.js.map
|
package/lib/common/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/common/utils.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,2CAA6D;AAG7D,sCAAqD;AACrD,qFAA0F;AAC1F,wEAAoE;AACpE,6DAA0D;AAE1D,6FAA2F;AAE3F,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/common/utils.ts"],"names":[],"mappings":";AAAA;;;;;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,CAAC,SAAiB;IAC/C,OAAO,SAAS,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;AAClF,CAAC;AAFD,0CAEC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,sCAAsC,CAC1D,GAAe,EACf,SAAiB,EACjB,gBAAyB;IAEzB,MAAM,UAAU,GAAsB,gBAAgB;QACpD,CAAC,CAAC,MAAM,IAAA,2EAAgD,EAAC,GAAG,EAAE,SAAS,CAAC;QACxE,CAAC,CAAC,MAAM,IAAA,4DAAiC,EAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAE5D,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;QAC/B,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,8BAA8B,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACxE,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,8BAA8B,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1E,CAAC,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACpB,CAAC;AAfD,wFAeC;AAED;;;;GAIG;AACI,KAAK,UAAU,KAAK,CAAC,EAAU;IACpC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,sBAIC"}
|
|
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
const ts_types_1 = require("@salesforce/ts-types");
|
|
10
10
|
const sObjectStream_1 = require("../sObjectStream");
|
|
11
11
|
const constants_1 = require("../../common/constants");
|
|
12
|
+
const types_1 = require("../../common/types");
|
|
12
13
|
class AsyncOpStreaming extends sObjectStream_1.default {
|
|
13
14
|
constructor(org, wait, idToInspect, outputService) {
|
|
14
15
|
super(org, wait, new Array(idToInspect), constants_1.ASYNC_OPERATION_CDC);
|
|
@@ -35,7 +36,7 @@ class AsyncOpStreaming extends sObjectStream_1.default {
|
|
|
35
36
|
// Print the aor status
|
|
36
37
|
this.outputService.printAorStatus(asyncOpResult);
|
|
37
38
|
// In a future we want to test !Is_Completed__c instead of Status != In Progress
|
|
38
|
-
if (asyncOpResult.sf_devops__Status__c && asyncOpResult.sf_devops__Status__c !==
|
|
39
|
+
if (asyncOpResult.sf_devops__Status__c && asyncOpResult.sf_devops__Status__c !== types_1.AsyncOperationStatus.InProgress) {
|
|
39
40
|
return {
|
|
40
41
|
completed: true,
|
|
41
42
|
payload: jsonPayload,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asyncOpStream.js","sourceRoot":"","sources":["../../../src/streamer/processors/asyncOpStream.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAMH,mDAAuE;AACvE,oDAAgD;AAChD,sDAA6D;
|
|
1
|
+
{"version":3,"file":"asyncOpStream.js","sourceRoot":"","sources":["../../../src/streamer/processors/asyncOpStream.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAMH,mDAAuE;AACvE,oDAAgD;AAChD,sDAA6D;AAC7D,8CAAgF;AAGhF,MAAqB,gBAAiB,SAAQ,uBAAgB;IAG5D,YAAmB,GAAQ,EAAE,IAAc,EAAE,WAAmB,EAAE,aAA+B;QAC/F,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,KAAK,CAAC,WAAW,CAAC,EAAE,+BAAmB,CAAC,CAAC;QAC9D,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,OAAO;QAClB,iEAAiE;QACjE,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACtE,CAAC;IAED;;;;;OAKG;IACH,kDAAkD;IACxC,sBAAsB,CAAC,OAAgB;QAC/C,MAAM,WAAW,GAAG,IAAA,wBAAa,EAAC,OAAO,CAAC,CAAC;QAE3C,oCAAoC;QACpC,MAAM,aAAa,GAAyB,WAAmC,CAAC;QAEhF,uBAAuB;QACvB,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;QAEjD,gFAAgF;QAChF,IAAI,aAAa,CAAC,oBAAoB,IAAI,aAAa,CAAC,oBAAoB,KAAK,4BAAoB,CAAC,UAAU,EAAE;YAChH,OAAO;gBACL,SAAS,EAAE,IAAI;gBACf,OAAO,EAAE,WAAW;aACrB,CAAC;SACH;QACD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IAC9B,CAAC;CACF;AAzCD,mCAyCC"}
|
package/messages/commonFlags.md
CHANGED
|
@@ -4,7 +4,7 @@ Name of the DevOps Center project.
|
|
|
4
4
|
|
|
5
5
|
# flags.devops-center-username.summary
|
|
6
6
|
|
|
7
|
-
Username or alias for the DevOps Center
|
|
7
|
+
Username or alias for the org where DevOps Center is installed.
|
|
8
8
|
|
|
9
9
|
# flags.wait.description
|
|
10
10
|
|
|
@@ -50,4 +50,4 @@ Show concise output of the command result.
|
|
|
50
50
|
|
|
51
51
|
# errors.NoDefaultDoceEnv
|
|
52
52
|
|
|
53
|
-
You must specify the DevOps Center org username by indicating the -
|
|
53
|
+
You must specify the DevOps Center org username by indicating the --devops-center-username flag on the command line or by setting the target-devops-center configuration variable.
|
package/messages/config.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# output.async-run-info
|
|
2
2
|
|
|
3
3
|
Deploy has been queued.
|
|
4
|
-
Run "sf project deploy pipeline resume --job-id %s to resume watching the deploy.
|
|
5
|
-
Run "sf project deploy pipeline report --job-id %s to get the latest status.
|
|
4
|
+
Run "sf project deploy pipeline resume --job-id %s" to resume watching the deploy.
|
|
5
|
+
Run "sf project deploy pipeline report --job-id %s" to get the latest status.
|
|
6
6
|
|
|
7
7
|
# output.item
|
|
8
8
|
|
|
@@ -29,3 +29,19 @@ Deploying metadata from %s branch to target org %s.
|
|
|
29
29
|
# output.concise.summary
|
|
30
30
|
|
|
31
31
|
DevOps Center pipeline stage %s being updated. Deploying metadata from %s branch to target org %s.
|
|
32
|
+
|
|
33
|
+
# output.validate-deploy-summary
|
|
34
|
+
|
|
35
|
+
Performing a validate-only deployment for work item %s %s to %s.
|
|
36
|
+
|
|
37
|
+
# output.bundle
|
|
38
|
+
|
|
39
|
+
bundle
|
|
40
|
+
|
|
41
|
+
# output.bundles
|
|
42
|
+
|
|
43
|
+
bundles
|
|
44
|
+
|
|
45
|
+
# output.concise.validate-deploy-summary
|
|
46
|
+
|
|
47
|
+
Performing validate-only deployment from %s branch to target org %s.
|