Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(retrieve): improve source-tracking err message #882

Merged
merged 4 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
11 changes: 11 additions & 0 deletions messages/retrieve.start.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,14 @@ The retrieve target directory [%s] overlaps one of your package directories. Spe
# wantsToRetrieveCustomFields

Because you're retrieving one or more CustomFields, we're also retrieving the CustomObject to which it's associated.

# noSourceTracking

Unable to track changes in source.
cristiand391 marked this conversation as resolved.
Show resolved Hide resolved
This command expects the org to support source tracking, if it doesn't you need to specify the metadata to be retrieved.
cristiand391 marked this conversation as resolved.
Show resolved Hide resolved

# noSourceTracking.actions

- Use `--source-dir`, `--manifest` or `--package-name` to retrieve in source format:
cristiand391 marked this conversation as resolved.
Show resolved Hide resolved

- Use `--target-metadata-dir` to retrieve in metadata format to a directory
cristiand391 marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@salesforce/kit": "^3.0.15",
"@salesforce/sf-plugins-core": "^7.1.1",
"@salesforce/source-deploy-retrieve": "^10.2.10",
"@salesforce/source-tracking": "^5.1.3",
"@salesforce/source-tracking": "^5.1.4",
"@salesforce/ts-types": "^2.0.9",
"chalk": "^5.3.0"
},
Expand Down Expand Up @@ -237,7 +237,7 @@
"output": []
},
"link-check": {
"command": "node -e \"process.exit(process.env.CI ? 0 : 1)\" || linkinator \"**/*.md\" --skip \"CHANGELOG.md|node_modules|test/|confluence.internal.salesforce.com|my.salesforce.com|%s\" --markdown --retry --directory-listing --verbosity error",
"command": "node -e \"process.exit(process.env.CI ? 0 : 1)\" || linkinator \"**/*.md\" --skip \"CHANGELOG.md|node_modules|lib|test/|confluence.internal.salesforce.com|my.salesforce.com|%s\" --markdown --retry --directory-listing --verbosity error",
cristiand391 marked this conversation as resolved.
Show resolved Hide resolved
"files": [
"./*.md",
"./!(CHANGELOG).md",
Expand Down
7 changes: 7 additions & 0 deletions src/commands/project/retrieve/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,13 @@ const buildRetrieveAndDeleteTargets = async (
!flags['package-name']?.length;

if (isChanges) {
if (!(await flags['target-org'].supportsSourceTracking())) {
throw new SfError(
messages.getMessage('noSourceTracking'),
'noSourceTracking',
messages.getMessages('noSourceTracking.actions')
);
}
const stl = await SourceTracking.create({
org: flags['target-org'],
project: await SfProject.resolve(),
Expand Down
28 changes: 14 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1425,7 +1425,7 @@
read-package-json-fast "^3.0.0"
which "^3.0.0"

"@oclif/core@^3.10.8", "@oclif/core@^3.11.0", "@oclif/core@^3.15.0", "@oclif/core@^3.15.1", "@oclif/core@^3.16.0", "@oclif/core@^3.18.1":
"@oclif/core@^3.11.0", "@oclif/core@^3.15.0", "@oclif/core@^3.15.1", "@oclif/core@^3.16.0", "@oclif/core@^3.18.1":
version "3.18.1"
resolved "https://registry.yarnpkg.com/@oclif/core/-/core-3.18.1.tgz#a8c9ee3848ad663d5694bef6079116c70d32fc55"
integrity sha512-l0LsjzGcqjbUEdeSBX6bdZieVmEv82Q0W3StiyaDMEnPZ9KLH28HrLpcZg6d50mCYW9CUZNzmRo6qrCHWrgLKw==
Expand Down Expand Up @@ -1651,7 +1651,7 @@
strip-ansi "6.0.1"
ts-retry-promise "^0.7.1"

"@salesforce/core@^6.1.0", "@salesforce/core@^6.1.3", "@salesforce/core@^6.4.0", "@salesforce/core@^6.4.1", "@salesforce/core@^6.4.2", "@salesforce/core@^6.4.4", "@salesforce/core@^6.4.6":
"@salesforce/core@^6.1.0", "@salesforce/core@^6.1.3", "@salesforce/core@^6.4.0", "@salesforce/core@^6.4.1", "@salesforce/core@^6.4.2", "@salesforce/core@^6.4.4", "@salesforce/core@^6.4.6", "@salesforce/core@^6.4.7":
version "6.4.7"
resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-6.4.7.tgz#f15538380aa5c75de697d3c95a2ddbdabae69dbb"
integrity sha512-gebjw2xC8Z0gqS3lYRQWz7J+PuGZtybotrnnaJbnzzxdfpBFIp6PjW4nt/235BQW9UWFTLaQh+AwkFgmMTTSkA==
Expand Down Expand Up @@ -1787,12 +1787,12 @@
"@salesforce/ts-types" "^2.0.9"
chalk "^5.3.0"

"@salesforce/source-deploy-retrieve@^10.0.0", "@salesforce/source-deploy-retrieve@^10.2.1", "@salesforce/source-deploy-retrieve@^10.2.10", "@salesforce/source-deploy-retrieve@^10.2.5":
version "10.2.10"
resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-10.2.10.tgz#76a70b534258bcddd4542a9709b1c2bfb1c93726"
integrity sha512-Io8JpYydSfdx7hgjYLj/5ZNIGKp3JZpcB/PVY+/uql6tFhGXcCSetyLbGnFdTw1lLlpN8RrYxexJG2PbhdoiYg==
"@salesforce/source-deploy-retrieve@^10.0.0", "@salesforce/source-deploy-retrieve@^10.2.10", "@salesforce/source-deploy-retrieve@^10.2.11", "@salesforce/source-deploy-retrieve@^10.2.5":
version "10.2.11"
resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-10.2.11.tgz#b3eaa75a1342d9dfbc8d84ff05d1a8ebf48b5241"
integrity sha512-XUoSn4I4Ki9m6rX/DaGpfM4PBu2TP/WSDszhlwvfktSO4XjLCqdI2B5KrGk/BQZ5KoxDQIhDp2G7rwgoyypJxw==
dependencies:
"@salesforce/core" "^6.4.4"
"@salesforce/core" "^6.4.7"
"@salesforce/kit" "^3.0.15"
"@salesforce/ts-types" "^2.0.9"
fast-levenshtein "^3.0.0"
Expand Down Expand Up @@ -1822,15 +1822,15 @@
shelljs "^0.8.4"
sinon "^10.0.0"

"@salesforce/source-tracking@^5.0.0", "@salesforce/source-tracking@^5.1.3":
version "5.1.3"
resolved "https://registry.yarnpkg.com/@salesforce/source-tracking/-/source-tracking-5.1.3.tgz#65dff11ffbd8f42ddd6477fe8342e338a9ec4f8f"
integrity sha512-X4lHQmpc62RQaW6CiRn4M7rYQ2cftE+bCBaMvTp/HGKq5k+DQIOVQmDU+xYBGiaenxTBXZdX2zwiuXmv3WGImg==
"@salesforce/source-tracking@^5.0.0", "@salesforce/source-tracking@^5.1.4":
version "5.1.4"
resolved "https://registry.yarnpkg.com/@salesforce/source-tracking/-/source-tracking-5.1.4.tgz#e7dbe46573fba154ab48b1fe4f04e13d653bf10c"
integrity sha512-VFxaR7457NjC/1r6MiVag7ES2A1Lg/O8oGmfYPeWgZ0FeEwmL++lxma5KxyE5rxcROqCXQYpXBSCPXfuOs05GQ==
dependencies:
"@oclif/core" "^3.10.8"
"@salesforce/core" "^6.4.0"
"@oclif/core" "^3.18.1"
"@salesforce/core" "^6.4.7"
"@salesforce/kit" "^3.0.15"
"@salesforce/source-deploy-retrieve" "^10.2.1"
"@salesforce/source-deploy-retrieve" "^10.2.11"
"@salesforce/ts-types" "^2.0.9"
fast-xml-parser "^4.2.5"
graceful-fs "^4.2.11"
Expand Down