Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"bugs": "https://github.com/forcedotcom/cli/issues",
"dependencies": {
"@oclif/core": "^3.16.0",
"@salesforce/apex-node": "^2.1.7",
"@salesforce/apex-node": "^3.0.1",
"@salesforce/core": "^6.4.4",
"@salesforce/kit": "^3.0.15",
"@salesforce/sf-plugins-core": "^5.0.13",
"@salesforce/source-deploy-retrieve": "^10.2.1",
"@salesforce/sf-plugins-core": "^7.0.0",
"@salesforce/source-deploy-retrieve": "^10.2.6",
"@salesforce/source-tracking": "^5.1.3",
"chalk": "^5.3.0",
"got": "^13.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/force/source/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export class Deploy extends DeployCommand {
// we'll check ACTUAL conflicts once we get a componentSet built
ignoreConflicts: true,
org: this.org,
project: this.project,
project: this.project!,
ux: new Ux({ jsonEnabled: this.jsonEnabled() }),
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/commands/force/source/pull.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default class Pull extends SourceCommand {
this.tracking = await trackingSetup({
ignoreConflicts: this.flags?.forceoverwrite ?? false,
org: this.flags['target-org'],
project: this.project,
project: this.project!,
ux: new Ux({ jsonEnabled: this.jsonEnabled() }),
});
}
Expand Down Expand Up @@ -130,7 +130,7 @@ export default class Pull extends SourceCommand {
const mdapiRetrieve = await componentSet.retrieve({
usernameOrConnection: username,
merge: true,
output: this.project.getDefaultPackage().fullPath,
output: this.project!.getDefaultPackage().fullPath,
});

this.spinner.status = 'Retrieving metadata from the org';
Expand Down
6 changes: 3 additions & 3 deletions src/commands/force/source/push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default class Push extends DeployCommand {
this.tracking = await trackingSetup({
ignoreConflicts: this.flags.forceoverwrite ?? false,
org: this.flags['target-org'],
project: this.project,
project: this.project!,
ux: new Ux({ jsonEnabled: this.jsonEnabled() }),
});

Expand All @@ -97,7 +97,7 @@ export default class Push extends DeployCommand {
protected async deploy(): Promise<void> {
const username = this.flags['target-org'].getUsername() as string;
const isSequentialDeploy = getBoolean(
await this.project.resolveProjectConfig(),
await this.project!.resolveProjectConfig(),
'pushPackageDirectoriesSequentially',
false
);
Expand Down Expand Up @@ -163,7 +163,7 @@ export default class Push extends DeployCommand {
if (
result.response.status !== RequestStatus.Succeeded &&
isSequentialDeploy &&
this.project.hasMultiplePackages()
this.project!.hasMultiplePackages()
) {
this.log(messages.getMessage('sequentialFail'));
break;
Expand Down
6 changes: 3 additions & 3 deletions src/commands/force/source/retrieve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export class Retrieve extends SourceCommand {
this.tracking = await trackingSetup({
ux: new Ux({ jsonEnabled: this.jsonEnabled() }),
org: this.flags['target-org'],
project: this.project,
project: this.project!,
ignoreConflicts: true,
});
}
Expand Down Expand Up @@ -215,7 +215,7 @@ export class Retrieve extends SourceCommand {
const mdapiRetrieve = await this.componentSet.retrieve({
usernameOrConnection: username,
merge: true,
output: this.resolvedTargetDir || this.project.getDefaultPackage().fullPath,
output: this.resolvedTargetDir || this.project!.getDefaultPackage().fullPath,
packageOptions: this.flags.packagenames,
});

Expand Down Expand Up @@ -340,6 +340,6 @@ export class Retrieve extends SourceCommand {
}

private overlapsPackage(): boolean {
return !!this.project.getPackageNameFromPath(this.resolvedTargetDir);
return !!this.project!.getPackageNameFromPath(this.resolvedTargetDir);
}
}
5 changes: 2 additions & 3 deletions src/commands/force/source/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,15 @@ export default class Status extends SfCommand<StatusCommandResult> {
const tracking = await trackingSetup({
ignoreConflicts: true,
org: this.flags['target-org'],
project: this.project,
project: this.project!,
ux: new Ux({ jsonEnabled: this.jsonEnabled() }),
});

const wantsLocal = this.flags.local || (!this.flags.remote && !this.flags.local);
const wantsRemote = this.flags.remote || (!this.flags.remote && !this.flags.local);

this.debug(
`project is ${this.project.getPath()} and pkgDirs are ${this.project
.getPackageDirectories()
`project is ${this.project!.getPath()} and pkgDirs are ${this.project!.getPackageDirectories()
.map((dir) => dir.path)
.join(',')}`
);
Expand Down
6 changes: 3 additions & 3 deletions src/sourceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { ux } from '@oclif/core';
import { SfCommand } from '@salesforce/sf-plugins-core';
import { EnsureFsFlagOptions, FsError, ProgressBar } from './types.js';

Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
const messages = Messages.loadMessages('@salesforce/plugin-source', 'flags.validation');

export abstract class SourceCommand extends SfCommand<unknown> {
Expand Down Expand Up @@ -46,11 +46,11 @@ export abstract class SourceCommand extends SfCommand<unknown> {
}

protected getPackageDirs(): string[] {
return this.project.getUniquePackageDirectories().map((pDir) => pDir.fullPath);
return this.project!.getUniquePackageDirectories().map((pDir) => pDir.fullPath);
}

protected async getSourceApiVersion(): Promise<Optional<string>> {
const projectConfig = await this.project.resolveProjectConfig();
const projectConfig = await this.project!.resolveProjectConfig();
return getString(projectConfig, 'sourceApiVersion') as string;
}

Expand Down
129 changes: 111 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,59 @@
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz#e5211452df060fa8522b55c7b3c0c4d1981cb044"
integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==

"@inquirer/confirm@^2.0.15":
version "2.0.15"
resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-2.0.15.tgz#b5512ed190efd8c5b96e0969115756b48546ab36"
integrity sha512-hj8Q/z7sQXsF0DSpLQZVDhWYGN6KLM/gNjjqGkpKwBzljbQofGjn0ueHADy4HUY+OqDHmXuwk/bY+tZyIuuB0w==
dependencies:
"@inquirer/core" "^5.1.1"
"@inquirer/type" "^1.1.5"
chalk "^4.1.2"

"@inquirer/core@^5.1.1":
version "5.1.1"
resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-5.1.1.tgz#849d4846aea68371c133df6ec9059f5e5bd30d30"
integrity sha512-IuJyZQUg75+L5AmopgnzxYrgcU6PJKL0hoIs332G1Gv55CnmZrhG6BzNOeZ5sOsTi1YCGOopw4rYICv74ejMFg==
dependencies:
"@inquirer/type" "^1.1.5"
"@types/mute-stream" "^0.0.4"
"@types/node" "^20.9.0"
"@types/wrap-ansi" "^3.0.0"
ansi-escapes "^4.3.2"
chalk "^4.1.2"
cli-spinners "^2.9.1"
cli-width "^4.1.0"
figures "^3.2.0"
mute-stream "^1.0.0"
run-async "^3.0.0"
signal-exit "^4.1.0"
strip-ansi "^6.0.1"
wrap-ansi "^6.2.0"

"@inquirer/input@^1.2.14":
version "1.2.14"
resolved "https://registry.yarnpkg.com/@inquirer/input/-/input-1.2.14.tgz#8951867618bb5cd16dd096e02404eec225a92207"
integrity sha512-tISLGpUKXixIQue7jypNEShrdzJoLvEvZOJ4QRsw5XTfrIYfoWFqAjMQLerGs9CzR86yAI89JR6snHmKwnNddw==
dependencies:
"@inquirer/core" "^5.1.1"
"@inquirer/type" "^1.1.5"
chalk "^4.1.2"

"@inquirer/password@^1.1.14":
version "1.1.14"
resolved "https://registry.yarnpkg.com/@inquirer/password/-/password-1.1.14.tgz#c1fc139efe84a38986870a1bcf80718050f82bbf"
integrity sha512-vL2BFxfMo8EvuGuZYlryiyAB3XsgtbxOcFs4H9WI9szAS/VZCAwdVqs8rqEeaAf/GV/eZOghIOYxvD91IsRWSg==
dependencies:
"@inquirer/input" "^1.2.14"
"@inquirer/type" "^1.1.5"
ansi-escapes "^4.3.2"
chalk "^4.1.2"

"@inquirer/type@^1.1.5":
version "1.1.5"
resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-1.1.5.tgz#b8c171f755859c8159b10e41e1e3a88f0ca99d7f"
integrity sha512-wmwHvHozpPo4IZkkNtbYenem/0wnfI6hvOcGKmPEa0DwuaH5XUQzFqy6OpEpjEegZMhYIk8HDYITI16BPLtrRA==

"@isaacs/cliui@^8.0.2":
version "8.0.2"
resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550"
Expand Down Expand Up @@ -954,10 +1007,10 @@
resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33"
integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==

"@salesforce/apex-node@^2.1.7":
version "2.1.7"
resolved "https://registry.yarnpkg.com/@salesforce/apex-node/-/apex-node-2.1.7.tgz#0785f2a1363fbeb636f5cef4904287e4ef057d88"
integrity sha512-2s29mbHNL0vXmbcfndkLbKEYclHHc7sj7ei2vscsR8/HdHGy3SsEfir1IU/Sqeqd79yxJdxMUfwmzVnRFR6WJA==
"@salesforce/apex-node@^3.0.1":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@salesforce/apex-node/-/apex-node-3.0.1.tgz#0374133b4c53393f47f342e29c0073f2f939ad35"
integrity sha512-zQKr4+vddu/OWH1RJSZBE0kflmyurGhUu34uR4PyI3F0mLEfkZPTTzMY8OsbsxtYRCd0oN1psL/t0xrjlF16DQ==
dependencies:
"@salesforce/core" "^6.1.0"
"@salesforce/kit" "^3.0.15"
Expand Down Expand Up @@ -1143,10 +1196,23 @@
chalk "^4"
inquirer "^8.2.5"

"@salesforce/source-deploy-retrieve@^10.2.1", "@salesforce/source-deploy-retrieve@^10.2.5":
version "10.2.5"
resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-10.2.5.tgz#bd2037e28d17ff9bead321acedc63bafb05bd952"
integrity sha512-8XDQgEgESToJX7/0f0/OTcCYt1bGpHSU+FwOddIBfmajILjKLRxHTAMMkVFuvniAFoyrlz9M6coy3DMp+gcltQ==
"@salesforce/sf-plugins-core@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-7.0.0.tgz#56cb4eaafcd04a183938d86c5e93323e037b15ab"
integrity sha512-vl53Ee0/eg9wgvtWro6kX82/943s28Hph/o3lTQk6URorfqMC+zH0RGKJj1X0VKeLhDSOCRYXqIu54jE8AZ/3g==
dependencies:
"@inquirer/confirm" "^2.0.15"
"@inquirer/password" "^1.1.14"
"@oclif/core" "^3.16.0"
"@salesforce/core" "^6.4.2"
"@salesforce/kit" "^3.0.15"
"@salesforce/ts-types" "^2.0.9"
chalk "^5.3.0"

"@salesforce/source-deploy-retrieve@^10.2.1", "@salesforce/source-deploy-retrieve@^10.2.5", "@salesforce/source-deploy-retrieve@^10.2.6":
version "10.2.6"
resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-10.2.6.tgz#37189ff3c2185158a856137e63a811bdd5b05b43"
integrity sha512-MGN5Jrz2dhk5f6XfrvfpD0SKGjSI+Jf/mCXc1svMZe7PMTg4RO3y/B9aTqLZmHcmUWLTvrKVIwN2PsZfNqrLgQ==
dependencies:
"@salesforce/core" "^6.4.2"
"@salesforce/kit" "^3.0.15"
Expand Down Expand Up @@ -1522,10 +1588,17 @@
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.6.tgz#818551d39113081048bdddbef96701b4e8bb9d1b"
integrity sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==

"@types/node@*":
version "20.9.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.9.0.tgz#bfcdc230583aeb891cf51e73cfdaacdd8deae298"
integrity sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==
"@types/mute-stream@^0.0.4":
version "0.0.4"
resolved "https://registry.yarnpkg.com/@types/mute-stream/-/mute-stream-0.0.4.tgz#77208e56a08767af6c5e1237be8888e2f255c478"
integrity sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==
dependencies:
"@types/node" "*"

"@types/node@*", "@types/node@^20.9.0":
version "20.10.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.6.tgz#a3ec84c22965802bf763da55b2394424f22bfbb5"
integrity sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw==
dependencies:
undici-types "~5.26.4"

Expand Down Expand Up @@ -1615,6 +1688,11 @@
"@types/expect" "^1.20.4"
"@types/node" "*"

"@types/wrap-ansi@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz#18b97a972f94f60a679fd5c796d96421b9abb9fd"
integrity sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==

"@typescript-eslint/eslint-plugin@^6.10.0":
version "6.11.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.11.0.tgz#52aae65174ff526576351f9ccd41cea01001463f"
Expand Down Expand Up @@ -2625,10 +2703,10 @@ cli-progress@^3.12.0:
dependencies:
string-width "^4.2.3"

cli-spinners@^2.5.0:
version "2.9.1"
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.1.tgz#9c0b9dad69a6d47cbb4333c14319b060ed395a35"
integrity sha512-jHgecW0pxkonBJdrKsqxgRX9AcG+u/5k0Q7WPDfi8AogLAdwxEkyYYNWwZ5GvVFoFx2uiY1eNcSK00fh+1+FyQ==
cli-spinners@^2.5.0, cli-spinners@^2.9.1:
version "2.9.2"
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41"
integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==

cli-table3@^0.6.0:
version "0.6.3"
Expand All @@ -2651,6 +2729,11 @@ cli-width@^3.0.0:
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6"
integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==

cli-width@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-4.1.0.tgz#42daac41d3c254ef38ad8ac037672130173691c5"
integrity sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==

cliui@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1"
Expand Down Expand Up @@ -3780,7 +3863,7 @@ faye@1.4.0, faye@^1.4.0:
tough-cookie "*"
tunnel-agent "*"

figures@^3.0.0:
figures@^3.0.0, figures@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af"
integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==
Expand Down Expand Up @@ -6004,6 +6087,11 @@ mute-stream@0.0.8:
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==

mute-stream@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-1.0.0.tgz#e31bd9fe62f0aed23520aa4324ea6671531e013e"
integrity sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==

nanoid@3.3.3:
version "3.3.3"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25"
Expand Down Expand Up @@ -7359,6 +7447,11 @@ run-async@^2.0.0, run-async@^2.4.0:
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455"
integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==

run-async@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/run-async/-/run-async-3.0.0.tgz#42a432f6d76c689522058984384df28be379daad"
integrity sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==

run-parallel@^1.1.9:
version "1.2.0"
resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee"
Expand Down Expand Up @@ -7577,7 +7670,7 @@ signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7:
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"
integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==

signal-exit@^4.0.1:
signal-exit@^4.0.1, signal-exit@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04"
integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==
Expand Down