Skip to content

Commit 928be88

Browse files
Wr/deploy recent validation (#46)
* fix: add initial rest vs soap options * fix: add the validateddeployrequestid flag option * fix: update message * fix: resolve conflicts Co-authored-by: Steve Hetzel <[email protected]>
1 parent 1ccaba2 commit 928be88

File tree

5 files changed

+56
-47
lines changed

5 files changed

+56
-47
lines changed

command-snapshot.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"manifest",
1313
"metadata",
1414
"runtests",
15+
"soapdeploy",
1516
"sourcepath",
1617
"targetusername",
1718
"testlevel",

messages/deploy.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"runTests": "tests to run if --testlevel RunSpecifiedTests",
2525
"ignoreErrors": "ignore any errors and do not roll back deployment",
2626
"ignoreWarnings": "whether a warning will allow a deployment to complete successfully",
27-
"validateDeployRequestId": "request ID of the validated deployment to run a Quick Deploy"
27+
"validateDeployRequestId": "request ID of the validated deployment to run a Quick Deploy",
28+
"soapDeploy": "deploy metadata with SOAP API instead of REST API"
2829
},
2930
"checkOnlySuccess": "\nSuccessfully validated the deployment"
3031
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"dependencies": {
88
"@oclif/config": "^1",
99
"@salesforce/command": "^3.1.0",
10-
"@salesforce/core": "^2.20.5",
10+
"@salesforce/core": "^2.20.8",
1111
"@salesforce/source-deploy-retrieve": "1.1.21",
1212
"chalk": "^4.1.0",
1313
"tslib": "^2"

src/commands/force/source/deploy.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { flags, FlagsConfig } from '@salesforce/command';
1111
import { Lifecycle, Messages } from '@salesforce/core';
1212
import { DeployResult } from '@salesforce/source-deploy-retrieve';
1313
import { Duration } from '@salesforce/kit';
14-
import { asString, asArray, getBoolean } from '@salesforce/ts-types';
14+
import { asString, asArray, getBoolean, JsonCollection } from '@salesforce/ts-types';
1515
import * as chalk from 'chalk';
1616
import { SourceCommand } from '../../../sourceCommand';
1717

@@ -28,6 +28,10 @@ export class Deploy extends SourceCommand {
2828
char: 'c',
2929
description: messages.getMessage('flags.checkonly'),
3030
}),
31+
soapdeploy: flags.boolean({
32+
default: false,
33+
description: messages.getMessage('flags.soapDeploy'),
34+
}),
3135
wait: flags.minutes({
3236
char: 'w',
3337
default: Duration.minutes(SourceCommand.DEFAULT_SRC_WAIT_MINUTES),
@@ -88,13 +92,16 @@ export class Deploy extends SourceCommand {
8892
};
8993
protected readonly lifecycleEventNames = ['predeploy', 'postdeploy'];
9094

91-
public async run(): Promise<DeployResult> {
92-
if (this.flags.validatedeployrequestid) {
93-
// TODO: return this.doDeployRecentValidation();
94-
throw Error('NOT IMPLEMENTED YET');
95+
public async run(): Promise<DeployResult | JsonCollection> {
96+
if (this.flags.validateddeployrequestid) {
97+
const conn = this.org.getConnection();
98+
return conn.deployRecentValidation({
99+
id: this.flags.validateddeployrequestid as string,
100+
rest: !this.flags.soapdeploy,
101+
});
95102
}
96-
const hookEmitter = Lifecycle.getInstance();
97103

104+
const hookEmitter = Lifecycle.getInstance();
98105
const cs = await this.createComponentSet({
99106
sourcepath: asArray<string>(this.flags.sourcepath),
100107
manifest: asString(this.flags.manifest),

yarn.lock

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@
533533

534534
"@salesforce/[email protected]":
535535
version "0.1.21"
536-
resolved "https://registry.yarnpkg.com/@salesforce/apex-node/-/apex-node-0.1.21.tgz#684766f05a896a5c0d7fdc282eb71000f17aeed2"
536+
resolved "https://registry.npmjs.org/@salesforce/apex-node/-/apex-node-0.1.21.tgz#684766f05a896a5c0d7fdc282eb71000f17aeed2"
537537
integrity sha512-fKMrfDIB6Vn1lP5LCg+FUlVMhuIpnKVq8OTca8/W2nQf6W+KrqVctpDRNXEMxK2Jd25uGcoGA+vc+IM6AH+Dqw==
538538
dependencies:
539539
"@salesforce/core" "2.13.0"
@@ -616,10 +616,10 @@
616616
mkdirp "1.0.4"
617617
sfdx-faye "^1.0.9"
618618

619-
"@salesforce/core@^2.15.2", "@salesforce/core@^2.16.3", "@salesforce/core@^2.2.0", "@salesforce/core@^2.20.3", "@salesforce/core@^2.20.5", "@salesforce/core@^2.6.0":
620-
version "2.20.5"
621-
resolved "https://registry.npmjs.org/@salesforce/core/-/core-2.20.5.tgz#043d4aa6fb7ffc5270fc69fbec08aa1a52a2f2b7"
622-
integrity sha512-hB4o4TuOGJo01rLmx84nf6KFGizDqLo5bmQ8bFlMZw5xKeQaP1Jc74se6hj+6eI5Nx331EvbD+YHphsuLbaJjQ==
619+
"@salesforce/core@^2.15.2", "@salesforce/core@^2.16.3", "@salesforce/core@^2.2.0", "@salesforce/core@^2.20.3", "@salesforce/core@^2.20.8", "@salesforce/core@^2.6.0":
620+
version "2.20.8"
621+
resolved "https://registry.npmjs.org/@salesforce/core/-/core-2.20.8.tgz#7767c2fc19c7663a803e9d0092f102dabdc23a0d"
622+
integrity sha512-7bhpj95SS7EDtKOwAnpoBu4zreooI2PUKbIQPCfK2yx1Tl/sm4j5FrE44wl33j3QA0GUwk93VSj6RNNDHB9VLw==
623623
dependencies:
624624
"@salesforce/bunyan" "^2.0.0"
625625
"@salesforce/kit" "^1.4.3"
@@ -692,7 +692,7 @@
692692

693693
"@salesforce/plugin-apex@^0.1.18":
694694
version "0.1.21"
695-
resolved "https://registry.yarnpkg.com/@salesforce/plugin-apex/-/plugin-apex-0.1.21.tgz#ee71324ef98f070c301192bcf458b318873a3b25"
695+
resolved "https://registry.npmjs.org/@salesforce/plugin-apex/-/plugin-apex-0.1.21.tgz#ee71324ef98f070c301192bcf458b318873a3b25"
696696
integrity sha512-z0jr/hk+rkf4GLxS4E566qoZiRTs0llPjCxtbAef52JASMZ8v43B+UHrDT1xtn9QceHywUmRQzc5ilpzltEhnQ==
697697
dependencies:
698698
"@oclif/command" "^1"
@@ -754,7 +754,7 @@
754754

755755
"@salesforce/[email protected]":
756756
version "1.3.5"
757-
resolved "https://registry.yarnpkg.com/@salesforce/ts-sinon/-/ts-sinon-1.3.5.tgz#23ed0d956657bf71aec413d0c0ff79b7666a7ad7"
757+
resolved "https://registry.npmjs.org/@salesforce/ts-sinon/-/ts-sinon-1.3.5.tgz#23ed0d956657bf71aec413d0c0ff79b7666a7ad7"
758758
integrity sha512-Zp92SW5IrxAman3G61jhxDiJX+SrvYtfiNKhXi/nGKNk5Utbq0O2KfbjPomqk4vVvhUheZpnHUdN/y/XaxRsoA==
759759
dependencies:
760760
"@salesforce/ts-types" "^1.5.5"
@@ -821,9 +821,9 @@
821821
integrity sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==
822822

823823
"@types/chai@*", "@types/chai@^4.2.11":
824-
version "4.2.15"
825-
resolved "https://registry.npmjs.org/@types/chai/-/chai-4.2.15.tgz#b7a6d263c2cecf44b6de9a051cf496249b154553"
826-
integrity sha512-rYff6FI+ZTKAPkJUoyz7Udq3GaoDZnxYDEvdEdFZASiA7PoErltHezDishqQiSDWrGxvxmplH304jyzQmjp0AQ==
824+
version "4.2.16"
825+
resolved "https://registry.npmjs.org/@types/chai/-/chai-4.2.16.tgz#f09cc36e18d28274f942e7201147cce34d97e8c8"
826+
integrity sha512-vI5iOAsez9+roLS3M3+Xx7w+WRuDtSmF8bQkrbcIJ2sC1PcDgVoA0WGpa+bIrJ+y8zqY2oi//fUctkxtIcXJCw==
827827

828828
"@types/debug@^4.1.5":
829829
version "4.1.5"
@@ -1542,9 +1542,9 @@ camelcase@^6.0.0:
15421542
integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==
15431543

15441544
caniuse-lite@^1.0.30001181:
1545-
version "1.0.30001205"
1546-
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001205.tgz#d79bf6a6fb13196b4bb46e5143a22ca0242e0ef8"
1547-
integrity sha512-TL1GrS5V6LElbitPazidkBMD9sa448bQDDLrumDqaggmKFcuU2JW1wTOHJPukAcOMtEmLcmDJEzfRrf+GjM0Og==
1545+
version "1.0.30001207"
1546+
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001207.tgz#364d47d35a3007e528f69adb6fecb07c2bb2cc50"
1547+
integrity sha512-UPQZdmAsyp2qfCTiMU/zqGSWOYaY9F9LL61V8f+8MrubsaDGpaHD9HRV/EWZGULZn0Hxu48SKzI5DgFwTvHuYw==
15481548

15491549
cardinal@^2.1.1:
15501550
version "2.1.1"
@@ -2336,9 +2336,9 @@ [email protected]:
23362336
safe-buffer "^5.0.1"
23372337

23382338
electron-to-chromium@^1.3.649:
2339-
version "1.3.705"
2340-
resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.705.tgz#9729956782ce44cd93bdb4197818cff71f7d5e9d"
2341-
integrity sha512-agtrL5vLSOIK89sE/YSzAgqCw76eZ60gf3J7Tid5RfLbSp5H4nWL28/dIV+H+ZhNNi1JNiaF62jffwYsAyXc0g==
2339+
version "1.3.707"
2340+
resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.707.tgz#71386d0ceca6727835c33ba31f507f6824d18c35"
2341+
integrity sha512-BqddgxNPrcWnbDdJw7SzXVzPmp+oiyjVrc7tkQVaznPGSS9SKZatw6qxoP857M+HbOyyqJQwYQtsuFIMSTNSZA==
23422342

23432343
"emoji-regex@>=6.0.0 <=6.1.1":
23442344
version "6.1.1"
@@ -3422,9 +3422,9 @@ [email protected]:
34223422
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
34233423

34243424
highlight.js@^10.0.0:
3425-
version "10.7.1"
3426-
resolved "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.1.tgz#a8ec4152db24ea630c90927d6cae2a45f8ecb955"
3427-
integrity sha512-S6G97tHGqJ/U8DsXcEdnACbirtbx58Bx9CzIVeYli8OuswCfYI/LsXH2EiGcoGio1KAC3x4mmUwulOllJ2ZyRA==
3425+
version "10.7.2"
3426+
resolved "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.2.tgz#89319b861edc66c48854ed1e6da21ea89f847360"
3427+
integrity sha512-oFLl873u4usRM9K63j4ME9u3etNF0PLiJhSQ8rdfuL51Wn3zkD6drf9ZW0dOzjnZI22YYG24z30JcmfCZjMgYg==
34283428

34293429
homedir-polyfill@^1.0.1:
34303430
version "1.0.3"
@@ -3708,9 +3708,9 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2:
37083708
kind-of "^6.0.2"
37093709

37103710
is-docker@^2.0.0:
3711-
version "2.1.1"
3712-
resolved "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz#4125a88e44e450d384e09047ede71adc2d144156"
3713-
integrity sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==
3711+
version "2.2.0"
3712+
resolved "https://registry.npmjs.org/is-docker/-/is-docker-2.2.0.tgz#b037c8815281edaad6c2562648a5f5f18839d5f7"
3713+
integrity sha512-K4GwB4i/HzhAzwP/XSlspzRdFTI9N8OxJOyOU7Y5Rz+p+WBokXWVWblaJeBkggthmoSV0OoGTH5thJNvplpkvQ==
37143714

37153715
is-extendable@^0.1.0, is-extendable@^0.1.1:
37163716
version "0.1.1"
@@ -4146,9 +4146,9 @@ jsprim@^1.2.2:
41464146
verror "1.10.0"
41474147

41484148
just-extend@^4.0.2:
4149-
version "4.1.1"
4150-
resolved "https://registry.npmjs.org/just-extend/-/just-extend-4.1.1.tgz#158f1fdb01f128c411dc8b286a7b4837b3545282"
4151-
integrity sha512-aWgeGFW67BP3e5181Ep1Fv2v8z//iBJfrvyTnq8wG86vEESwmonn1zPBJ0VfmT9CJq2FIT0VsETtrNFm2a+SHA==
4149+
version "4.2.1"
4150+
resolved "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz#ef5e589afb61e5d66b24eca749409a8939a8c744"
4151+
integrity sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==
41524152

41534153
jwa@^1.4.1:
41544154
version "1.4.1"
@@ -4243,9 +4243,9 @@ listenercount@~1.0.1:
42434243
integrity sha1-hMinKrWcRyUyFIDJdeZQg0LnCTc=
42444244

42454245
listr2@^3.2.2:
4246-
version "3.4.4"
4247-
resolved "https://registry.npmjs.org/listr2/-/listr2-3.4.4.tgz#5bb5e0107cc9a8787dcfb5d302c88cbddcdba248"
4248-
integrity sha512-okQwtieCHDX5erlxcEn2xwNfVQhV+/YiD+U0v+6DQamXnknE7mc6B5fopHl96v1PuZjTpaoChctf96PB6K4XRg==
4246+
version "3.5.0"
4247+
resolved "https://registry.npmjs.org/listr2/-/listr2-3.5.0.tgz#09353bbf76b4f97de0b6abf099db2aa3f0ae1ef2"
4248+
integrity sha512-97a1ZegjnsGIKfU2PtoE/RFrbYTb7bWb5wzq8ikFOVgOwjCjkJhAaJ+lNQEH25YvrzzKRS+522WkR4OZ9mfhdA==
42494249
dependencies:
42504250
chalk "^4.1.0"
42514251
cli-truncate "^2.1.0"
@@ -4586,17 +4586,17 @@ micromatch@^4.0.2:
45864586
braces "^3.0.1"
45874587
picomatch "^2.0.5"
45884588

4589-
mime-db@1.46.0:
4590-
version "1.46.0"
4591-
resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz#6267748a7f799594de3cbc8cde91def349661cee"
4592-
integrity sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==
4589+
mime-db@1.47.0:
4590+
version "1.47.0"
4591+
resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz#8cb313e59965d3c05cfbf898915a267af46a335c"
4592+
integrity sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==
45934593

45944594
mime-types@^2.1.12, mime-types@~2.1.19:
4595-
version "2.1.29"
4596-
resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz#1d4ab77da64b91f5f72489df29236563754bb1b2"
4597-
integrity sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==
4595+
version "2.1.30"
4596+
resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz#6e7be8b4c479825f85ed6326695db73f9305d62d"
4597+
integrity sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==
45984598
dependencies:
4599-
mime-db "1.46.0"
4599+
mime-db "1.47.0"
46004600

46014601
46024602
version "2.4.6"
@@ -6894,9 +6894,9 @@ y18n@^4.0.0:
68946894
integrity sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==
68956895

68966896
y18n@^5.0.5:
6897-
version "5.0.5"
6898-
resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18"
6899-
integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==
6897+
version "5.0.6"
6898+
resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.6.tgz#8236b05cfc5af6a409f41326a4847c68989bb04f"
6899+
integrity sha512-PlVX4Y0lDTN6E2V4ES2tEdyvXkeKzxa8c/vo0pxPr/TqbztddTP0yn7zZylIyiAuxerqj0Q5GhpJ1YJCP8LaZQ==
69006900

69016901
yallist@^4.0.0:
69026902
version "4.0.0"

0 commit comments

Comments
 (0)