@salesforce/plugin-devops-center 0.1.0-beta.3 → 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.
Files changed (103) hide show
  1. package/README.md +25 -22
  2. package/lib/commands/project/deploy/pipeline/quick.d.ts +23 -0
  3. package/lib/commands/project/deploy/pipeline/quick.js +45 -0
  4. package/lib/commands/project/deploy/pipeline/quick.js.map +1 -0
  5. package/lib/commands/{deploy → project/deploy}/pipeline/report.d.ts +2 -2
  6. package/lib/commands/{deploy → project/deploy}/pipeline/report.js +2 -2
  7. package/lib/commands/project/deploy/pipeline/report.js.map +1 -0
  8. package/lib/commands/{deploy → project/deploy}/pipeline/resume.d.ts +3 -3
  9. package/lib/commands/{deploy → project/deploy}/pipeline/resume.js +3 -3
  10. package/lib/commands/project/deploy/pipeline/resume.js.map +1 -0
  11. package/lib/commands/{deploy/pipeline.d.ts → project/deploy/pipeline/start.d.ts} +6 -4
  12. package/lib/commands/{deploy/pipeline.js → project/deploy/pipeline/start.js} +6 -5
  13. package/lib/commands/project/deploy/pipeline/start.js.map +1 -0
  14. package/lib/commands/project/deploy/pipeline/validate.d.ts +19 -0
  15. package/lib/commands/project/deploy/pipeline/validate.js +37 -0
  16. package/lib/commands/project/deploy/pipeline/validate.js.map +1 -0
  17. package/lib/common/base/abstractAsyncOperation.d.ts +42 -0
  18. package/lib/common/base/abstractAsyncOperation.js +94 -0
  19. package/lib/common/base/abstractAsyncOperation.js.map +1 -0
  20. package/lib/common/base/abstractPromote.d.ts +8 -16
  21. package/lib/common/base/abstractPromote.js +19 -66
  22. package/lib/common/base/abstractPromote.js.map +1 -1
  23. package/lib/common/base/abstractQuick.d.ts +59 -0
  24. package/lib/common/base/abstractQuick.js +111 -0
  25. package/lib/common/base/abstractQuick.js.map +1 -0
  26. package/lib/common/base/abstractResume.d.ts +7 -13
  27. package/lib/common/base/abstractResume.js +9 -32
  28. package/lib/common/base/abstractResume.js.map +1 -1
  29. package/lib/common/constants.d.ts +2 -1
  30. package/lib/common/constants.js +1 -0
  31. package/lib/common/constants.js.map +1 -1
  32. package/lib/common/flags/flags.d.ts +5 -0
  33. package/lib/common/flags/flags.js +14 -6
  34. package/lib/common/flags/flags.js.map +1 -1
  35. package/lib/common/index.d.ts +1 -1
  36. package/lib/common/index.js.map +1 -1
  37. package/lib/common/outputColumns.d.ts +1 -0
  38. package/lib/common/outputColumns.js +2 -1
  39. package/lib/common/outputColumns.js.map +1 -1
  40. package/lib/common/outputService/aorOutputService.js +12 -6
  41. package/lib/common/outputService/aorOutputService.js.map +1 -1
  42. package/lib/common/outputService/deployCommandOutputService.d.ts +1 -1
  43. package/lib/common/outputService/deployCommandOutputService.js +2 -2
  44. package/lib/common/outputService/deployCommandOutputService.js.map +1 -1
  45. package/lib/common/outputService/deploySummaryBuilder.d.ts +13 -1
  46. package/lib/common/outputService/deploySummaryBuilder.js +64 -12
  47. package/lib/common/outputService/deploySummaryBuilder.js.map +1 -1
  48. package/lib/common/outputService/outputServiceFactory.d.ts +11 -5
  49. package/lib/common/outputService/outputServiceFactory.js +8 -2
  50. package/lib/common/outputService/outputServiceFactory.js.map +1 -1
  51. package/lib/common/outputService/promoteOutputService.d.ts +0 -6
  52. package/lib/common/outputService/promoteOutputService.js +0 -11
  53. package/lib/common/outputService/promoteOutputService.js.map +1 -1
  54. package/lib/common/outputService/reportOutputService.js +1 -1
  55. package/lib/common/outputService/reportOutputService.js.map +1 -1
  56. package/lib/common/outputService/resumeCommandOutputService.d.ts +7 -4
  57. package/lib/common/outputService/resumeCommandOutputService.js +8 -4
  58. package/lib/common/outputService/resumeCommandOutputService.js.map +1 -1
  59. package/lib/common/outputService/resumeOutputService.d.ts +7 -0
  60. package/lib/common/outputService/resumeOutputService.js +14 -0
  61. package/lib/common/outputService/resumeOutputService.js.map +1 -1
  62. package/lib/common/selectors/deployComponentsSelector.d.ts +1 -0
  63. package/lib/common/selectors/deployComponentsSelector.js +9 -1
  64. package/lib/common/selectors/deployComponentsSelector.js.map +1 -1
  65. package/lib/common/selectors/deployProgressSummarySelector.js +1 -1
  66. package/lib/common/selectors/deploymentResultsSelector.d.ts +19 -1
  67. package/lib/common/selectors/deploymentResultsSelector.js +29 -1
  68. package/lib/common/selectors/deploymentResultsSelector.js.map +1 -1
  69. package/lib/common/selectors/environmentSelector.d.ts +1 -1
  70. package/lib/common/selectors/environmentSelector.js +1 -1
  71. package/lib/common/selectors/pipelineStageSelector.d.ts +5 -0
  72. package/lib/common/selectors/pipelineStageSelector.js +13 -1
  73. package/lib/common/selectors/pipelineStageSelector.js.map +1 -1
  74. package/lib/common/selectors/validateDeploySelector.d.ts +6 -0
  75. package/lib/common/selectors/validateDeploySelector.js +22 -0
  76. package/lib/common/selectors/validateDeploySelector.js.map +1 -0
  77. package/lib/common/types.d.ts +11 -5
  78. package/lib/common/types.js +0 -6
  79. package/lib/common/types.js.map +1 -1
  80. package/lib/common/utils.d.ts +7 -1
  81. package/lib/common/utils.js +19 -6
  82. package/lib/common/utils.js.map +1 -1
  83. package/lib/streamer/processors/asyncOpStream.js +2 -1
  84. package/lib/streamer/processors/asyncOpStream.js.map +1 -1
  85. package/messages/commonFlags.md +6 -6
  86. package/messages/config.md +1 -1
  87. package/messages/deploy.output.md +18 -2
  88. package/messages/project.deploy.pipeline.quick.md +45 -0
  89. package/messages/{deploy.pipeline.report.md → project.deploy.pipeline.report.md} +3 -3
  90. package/messages/{deploy.pipeline.resume.md → project.deploy.pipeline.resume.md} +1 -5
  91. package/messages/{deploy.pipeline.md → project.deploy.pipeline.start.md} +5 -1
  92. package/messages/project.deploy.pipeline.validate.md +17 -0
  93. package/messages/promoteFlags.md +4 -4
  94. package/oclif.manifest.json +296 -67
  95. package/package.json +221 -110
  96. package/schemas/{deploy-pipeline-resume.json → project-deploy-pipeline-quick.json} +3 -3
  97. package/schemas/{deploy-pipeline.json → project-deploy-pipeline-resume.json} +3 -3
  98. package/schemas/project-deploy-pipeline-start.json +25 -0
  99. package/schemas/project-deploy-pipeline-validate.json +25 -0
  100. package/lib/commands/deploy/pipeline/report.js.map +0 -1
  101. package/lib/commands/deploy/pipeline/resume.js.map +0 -1
  102. package/lib/commands/deploy/pipeline.js.map +0 -1
  103. /package/schemas/{deploy-pipeline-report.json → project-deploy-pipeline-report.json} +0 -0
@@ -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;AAE/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"}
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"}
@@ -2,7 +2,7 @@ import { QueryResult } from 'jsforce';
2
2
  import { Connection } from '@salesforce/core';
3
3
  import { PipelineStage } from '../types';
4
4
  export type EnvQueryResult = {
5
- sf_devops__Named_Credential__c: string;
5
+ Name: string;
6
6
  sf_devops__Pipeline_Stages__r: QueryResult<PipelineStage>;
7
7
  };
8
8
  /**
@@ -12,7 +12,7 @@ const selectorUtils_1 = require("./selectorUtils");
12
12
  * Returns the named credential and pipeline stage name associated with the envId sent
13
13
  */
14
14
  async function selectPipelineStageByEnvironment(con, envId) {
15
- const queryStr = `SELECT sf_devops__Named_Credential__c,
15
+ const queryStr = `SELECT Name,
16
16
  (SELECT Name FROM sf_devops__Pipeline_Stages__r)
17
17
  FROM sf_devops__Environment__c
18
18
  WHERE Id = '${envId}'`;
@@ -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"}
@@ -1,9 +1,10 @@
1
- export type PromotePipelineResult = {
1
+ export type AsyncOperationResultJson = {
2
2
  jobId: string;
3
- status?: string;
4
- message?: string;
5
- errorDetails?: string;
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
- name: string;
33
+ }
34
+ export interface ApiPromoteResponse {
35
+ jobId: string;
33
36
  }
34
37
  export type WorkItem = {
35
38
  Name: string;
@@ -40,9 +43,11 @@ export type WorkItemPromote = {
40
43
  };
41
44
  export type Environment = {
42
45
  Id: string;
46
+ Name: string;
43
47
  sf_devops__Named_Credential__c: string;
44
48
  };
45
49
  export type ChangeBundleInstall = {
50
+ sf_devops__Environment__c: string;
46
51
  sf_devops__Environment__r: Environment;
47
52
  sf_devops__Change_Bundle__r: ChangeBundle;
48
53
  };
@@ -62,6 +67,7 @@ export type DeploymentResult = {
62
67
  sf_devops__Full_Deploy__c: boolean;
63
68
  sf_devops__Check_Deploy__c: boolean;
64
69
  sf_devops__Completion_Date__c: string;
70
+ sf_devops__Deployment_Id__c: string;
65
71
  sf_devops__Test_Level__c: string;
66
72
  sf_devops__Run_Tests__c: string;
67
73
  sf_devops__Status__r: AsyncOperationResult;
@@ -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;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/common/types.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AA8BH,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;AAiED,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"}
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"}
@@ -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>;
@@ -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");
@@ -54,11 +54,11 @@ async function fetchAndValidatePipelineStage(targetOrg, projectName, branchName)
54
54
  if (error.name === 'Query-failedError') {
55
55
  throw messages.createError('error.DevopsAppNotInstalled');
56
56
  }
57
+ else if (error.name === 'No-results-foundError') {
58
+ throw messages.createError('error.ProjectNotFound', [projectName]);
59
+ }
57
60
  throw err;
58
61
  }
59
- if (!stages.length) {
60
- throw messages.createError('error.ProjectNotFound', [projectName]);
61
- }
62
62
  // find stage by branch name
63
63
  const stage = stages.find((s) => s.sf_devops__Branch__r.sf_devops__Name__c.toUpperCase() === branchName.toUpperCase());
64
64
  if (!stage) {
@@ -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 = await (0, deployComponentsSelector_1.selectDeployComponentsByAsyncOpId)(con, asyncOpId);
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
@@ -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,mFAAyF;AAEzF,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,kCAAkC,EAAE,cAAc,CAAC,CAAC;AAE3F;;;;;;GAMG;AACH,SAAgB,iBAAiB,CAAC,SAA8B,EAAE,KAAyB;IACzF,IAAI,SAAS,KAAK,kBAAS,CAAC,iBAAiB,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;QAC3E,MAAM,QAAQ,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC;KACtD;SAAM,IAAI,SAAS,KAAK,kBAAS,CAAC,iBAAiB,IAAI,KAAK,EAAE;QAC7D,MAAM,QAAQ,CAAC,WAA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force/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 !== 'In Progress') {
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;AAI7D,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;Q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AAI,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"}
@@ -4,11 +4,11 @@ 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 org.
7
+ Username or alias for the org where DevOps Center is installed.
8
8
 
9
9
  # flags.wait.description
10
10
 
11
- If the command continues to run after the wait period, the CLI returns control of the terminal window to you and returns the job ID. To check the status of the operation, run "<%= config.bin %> <%= command.id %> report".
11
+ If the command continues to run after the wait period, the CLI returns control of the terminal window to you and returns the job ID. To check the status of the operation, run "<%= config.bin %> <%= command.id.split(' ').slice(0, -1).join(' ') %> report".
12
12
 
13
13
  # flags.wait.summary
14
14
 
@@ -26,9 +26,9 @@ Job ID of the pipeline deploy operation you want to resume.
26
26
 
27
27
  These commands return a job ID if they time out or you specified the --async flag:
28
28
 
29
- - sf deploy pipeline
30
- - sf deploy pipeline validate
31
- - sf deploy pipeline quick
29
+ - sf project deploy pipeline start
30
+ - sf project deploy pipeline validate
31
+ - sf project deploy pipeline quick
32
32
 
33
33
  The job ID is valid for 10 days from when you started the deploy operation.
34
34
 
@@ -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 -c flag on the command line or by setting the target-devops-center configuration variable.
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.
@@ -1,6 +1,6 @@
1
1
  # target-devops-center
2
2
 
3
- Username or alias of the DevOps Center org.
3
+ Username or alias for the org where DevOps Center is installed.
4
4
 
5
5
  # error.OrgNotAuthenticated
6
6
 
@@ -1,8 +1,8 @@
1
1
  # output.async-run-info
2
2
 
3
3
  Deploy has been queued.
4
- Run "sf deploy pipeline resume --job-id %s to resume watching the deploy.
5
- Run "sf 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.
@@ -0,0 +1,45 @@
1
+ # summary
2
+
3
+ Quickly deploy a validated deployment to an org.
4
+
5
+ # description
6
+
7
+ Before you run this command, first create a validated deployment with the "sf project deploy pipeline validate" command, which returns a job ID. Validated deployments haven't been deployed to the org yet; you deploy them with this command. Either pass the job ID to this command or use the --use-most-recent flag to use the job ID of the most recently validated deployment. For the quick deploy to succeed, the associated validated deployment must also have succeeded.
8
+
9
+ Executing this quick deploy command takes less time than a standard deploy because it skips running Apex tests. These tests were previously run as part of the validation. Validating first and then running a quick deploy is useful if the deployment to your production org take several hours and you don’t want to risk a failed deploy.
10
+
11
+ This command doesn't support source-tracking. The source you deploy overwrites the corresponding metadata in your org. This command doesn’t attempt to merge your source with the versions in your org.
12
+
13
+ # examples
14
+
15
+ - Run a quick deploy using your default Devops Center org and a job ID:
16
+
17
+ <%= config.bin %> <%= command.id %> --job-id 0Af0x000017yLUFCA2
18
+
19
+ - Asynchronously run a quick deploy of the most recently validated deployment using an org with alias "my-prod-org":
20
+
21
+ <%= config.bin %> <%= command.id %> --async --use-most-recent --devops-center-username my-prod-org
22
+
23
+ # flags.job-id.summary
24
+
25
+ Job ID of the validated deployment to quick deploy.
26
+
27
+ # flags.job-id.description
28
+
29
+ The job ID is valid for 10 days from when you started the validation.
30
+
31
+ # flags.use-most-recent.summary
32
+
33
+ Use the job ID of the most recently validated deployment.
34
+
35
+ # flags.use-most-recent.description
36
+
37
+ For performance reasons, this flag uses only job IDs that were validated in the past 3 days or less. If your most recent deployment validation was more than 3 days ago, this flag won't find the job ID.
38
+
39
+ # error.JobIsNotValidationDeployment
40
+
41
+ The job ID is invalid for the quick deployment. Verify that a deployment validation was run or hasn't expired, and that you specified the correct job ID. Then try again.
42
+
43
+ # error.JobIsNotValidated
44
+
45
+ We can't perform the quick deployment for the specified job ID because the validate-only deployment failed or is still running. If the validate-only deployment failed, fix the issue and re-run it. If the validate-only deployment was successful, try this command again later.
@@ -4,7 +4,7 @@ Check the status of a pipeline deploy operation.
4
4
 
5
5
  # description
6
6
 
7
- Run this command by either passing it a job ID or specifying the —use-most-recent flag to use the job ID of the most recent deploy operation.
7
+ Run this command by either indicating a job ID or specifying the —use-most-recent flag to use the job ID of the most recent deploy operation.
8
8
 
9
9
  # examples
10
10
 
@@ -18,7 +18,7 @@ Run this command by either passing it a job ID or specifying the —use-most-rec
18
18
 
19
19
  # flags.job-id.summary
20
20
 
21
- Job ID of the pipeline deployment you want to check the status of.
21
+ Job ID of the pipeline deployment to check the status of.
22
22
 
23
23
  # flags.job-id.description
24
24
 
@@ -30,7 +30,7 @@ Use the job ID of the most recent deploy operation.
30
30
 
31
31
  # flags.use-most-recent.description
32
32
 
33
- For performance reasons, this flag uses job IDs for deploy operations that started in the past 3 days or fewer. If your most recent operation was longer than 3 days ago, this flag won't find a job ID.
33
+ For performance reasons, this flag uses job IDs for deploy operations that started in the past 3 days or fewer. If your most recent operation was longer than 3 days ago, this flag won't find the job ID.
34
34
 
35
35
  # report.key.created-by-name
36
36
 
@@ -6,7 +6,7 @@ Resume watching a pipeline deploy operation.
6
6
 
7
7
  Use this command to resume watching a pipeline deploy operation if the original command times out or you specified the --async flag.
8
8
 
9
- Run this command by either passing it a job ID or specifying the --use-most-recent flag to use the job ID of the most recent deploy operation.
9
+ Run this command by either indicating a job ID or specifying the --use-most-recent flag to use the job ID of the most recent deploy operation.
10
10
 
11
11
  # examples
12
12
 
@@ -17,7 +17,3 @@ Run this command by either passing it a job ID or specifying the --use-most-rece
17
17
  - Resume watching the most recent deploy operation:
18
18
 
19
19
  <%= config.bin %> <%= command.id %> --use-most-recent
20
-
21
- # error.ClientTimeout
22
-
23
- The command has timed out, although it is still running. To check the status of the deploy operation, run "sf deploy pipeline report".
@@ -4,7 +4,7 @@ Deploy changes from a branch to the pipeline stage’s org.
4
4
 
5
5
  # description
6
6
 
7
- Before you run this command, changes in the branch must be merged in the source control repository.
7
+ Before you run this command, changes in the pipeline stage's branch must be merged in the source control repository.
8
8
 
9
9
  # examples
10
10
 
@@ -35,3 +35,7 @@ Path
35
35
  # deployComponent.table.title
36
36
 
37
37
  Deployed Source
38
+
39
+ # deployComponent.table.validateDeployTitle
40
+
41
+ Validate-only Deployed Source
@@ -0,0 +1,17 @@
1
+ # summary
2
+
3
+ Perform a validate-only deployment from a branch to the pipeline stage’s org.
4
+
5
+ # description
6
+
7
+ A validation runs Apex tests to verify whether a deployment will succeed without actually deploying the metadata to your environment, so you can then quickly deploy the changes later without re-running the tests.
8
+
9
+ # examples
10
+
11
+ - Perform a validate-only deployment from the Staging branch to the Staging environment (sandbox):
12
+
13
+ <%= config.bin %> <%= command.id %> --devops-center-project-name “Recruiting App” --branch-name staging --devops-center-username MyStagingSandbox
14
+
15
+ - Perform a validate-only deployment of all changes from the main branch to the release environment:
16
+
17
+ <%= config.bin %> <%= command.id %> --devops-center-project-name “Recruiting App” --branch-name main --devops-center-username MyReleaseOrg --deploy-all
@@ -1,10 +1,10 @@
1
1
  # promote.branch-name.summary
2
2
 
3
- Name of the branch in the source control repository from which to deploy changes to the stage’s org.
3
+ Name of the branch in the source control repository that corresponds to the pipeline stage that you want to deploy the changes to.
4
4
 
5
5
  # promote.deploy-all.summary
6
6
 
7
- Deploy all metadata in branch.
7
+ Deploy all metadata in the branch to the stage's org.
8
8
 
9
9
  # promote.deploy-all.description
10
10
 
@@ -24,7 +24,7 @@ Apex tests to run when --test-level is RunSpecifiedTests.
24
24
 
25
25
  # promote.tests.description
26
26
 
27
- Separate multiple test names with commas, and enclose the entire flag value in double quotes if a test name contains a space.
27
+ Separate multiple test names with commas. Enclose the entire flag value in double quotes if a test name contains spaces.
28
28
 
29
29
  # promote.test-level.summary
30
30
 
@@ -46,7 +46,7 @@ If you don’t specify a test level, the default behavior depends on the content
46
46
 
47
47
  # promote.async.description
48
48
 
49
- The command immediately returns the job ID and control of the terminal to you. This way, you can continue to use the CLI. To resume the deployment, run "sf deploy pipeline resume". To check the status of the deployment, run "sf deploy pipeline report".
49
+ The command immediately returns the job ID and control of the terminal to you. This way, you can continue to use the CLI. To resume the deployment, run "sf project deploy pipeline resume". To check the status of the deployment, run "sf project deploy pipeline report".
50
50
 
51
51
  # promote.async.summary
52
52