Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
c765915
feat: add package push list feature
btrn11 Dec 12, 2024
1175b46
fix: export required type
btrn11 Dec 12, 2024
137bfdd
feat: add pushupgrade list schema file
btrn11 Dec 12, 2024
38dcf0c
fix: edit pushupgrade list schema file
btrn11 Dec 12, 2024
3947f9a
fix: edit pushupgrade list md file
btrn11 Dec 12, 2024
2d89ac4
fix: change name
btrn11 Dec 12, 2024
5ee2cc3
fix: update push upgrade list md file
btrn11 Dec 13, 2024
1616eaf
feat: add beta state to pu list command
btrn11 Dec 13, 2024
f46cf25
feat: hide pu command
btrn11 Dec 13, 2024
76bcd4b
feat: add package as required flag
btrn11 Dec 13, 2024
cc5b530
fix: add missing type
btrn11 Dec 16, 2024
a90421a
feat: add test for pu request list command
btrn11 Dec 17, 2024
9c40d9b
feat: implement schedule command
btrn11 Dec 30, 2024
3398869
fix: add push upgrade schedule schema
btrn11 Dec 30, 2024
91aef4c
fix: change flag char
btrn11 Dec 30, 2024
3383f38
fix: change flag char
btrn11 Dec 30, 2024
e2c924e
fix: add push upgrade schedule schema
btrn11 Dec 30, 2024
e55f05a
fix: temp test remove
btrn11 Dec 30, 2024
f6d7613
fix: add lint exceptions
btrn11 Dec 30, 2024
ba0ddf6
fix: add lint exceptions
btrn11 Dec 30, 2024
9eda6ab
fix: update list schema
btrn11 Dec 30, 2024
7b114c4
fix: add eslint exception
btrn11 Dec 30, 2024
50c996c
feat: add schedule command test
btrn11 Dec 30, 2024
8b85e14
feat: add num orgs scheduled, succedded and failed + add test for lis…
btrn11 Jan 2, 2025
8752847
feat: add request scheduled time
btrn11 Jan 2, 2025
f0098c2
feat: add schedule last days option
btrn11 Jan 2, 2025
fb6b050
feat: add schedule last days check
btrn11 Jan 2, 2025
29fb2ff
fix: readd test
btrn11 Jan 2, 2025
3285377
fix: remove verbose flag for list
btrn11 Jan 6, 2025
d5024a5
fix: remove verbose flag for list (update test)
btrn11 Jan 6, 2025
a51573b
fix: update schema and snapshot
btrn11 Jan 6, 2025
81d3da1
feat: adds pushupgrade abort command support
mradulsf Jan 10, 2025
0ae3183
feat: display list command correctly
btrn11 Jan 13, 2025
91d38fc
fix: update snapshot
btrn11 Jan 13, 2025
a0c2374
fix: update list schema
btrn11 Jan 13, 2025
e05b38d
fix: update list test
btrn11 Jan 13, 2025
e1315a2
fix: revert gitignore
btrn11 Jan 14, 2025
0fc713a
fix: change summary text
btrn11 Jan 14, 2025
08b758d
fix: remove verbose flag schedule
btrn11 Jan 14, 2025
94571a9
fix: fix schedule command texts
btrn11 Jan 14, 2025
2089364
fix: modify readOrgList function
btrn11 Jan 14, 2025
e6ac978
fix: modify field names
btrn11 Jan 14, 2025
61a5a89
fix: change to schedule start time
btrn11 Jan 14, 2025
0f51039
feat: adds pushupgrade report command
tshopshireSalesforce Dec 17, 2024
09453a8
Merge pull request #859 from salesforcecli/t/packaging-distribution/W…
tshopshireSalesforce Jan 15, 2025
c95c302
feat: adds support for package version
tshopshireSalesforce Jan 15, 2025
48d3a2d
fix: add package version number to display
btrn11 Jan 15, 2025
5f29486
Merge pull request #875 from salesforcecli/t/packaging-distribution/W…
tshopshireSalesforce Jan 15, 2025
ff32db5
Merge branch 'packagingDistribution/pushUpgradeCLI' into t/packaging-…
btrn11 Jan 15, 2025
84f8954
fix: update push upgrade list md file
btrn11 Jan 15, 2025
0e35681
Merge pull request #853 from salesforcecli/t/packaging-distribution/W…
btrn11 Jan 15, 2025
651b755
fix: update schedule md file
btrn11 Jan 17, 2025
8aba4e2
feat: add return message schedule command
btrn11 Jan 22, 2025
a49a11d
fix: fix SfError type
btrn11 Jan 23, 2025
97f84c4
fix: better error handling
btrn11 Jan 23, 2025
cfdd6b5
Merge branch 'packagingDistribution/pushUpgradeCLI' into btrn/pushCLI…
btrn11 Jan 23, 2025
9d2f961
fix: fix schedule tests
btrn11 Jan 23, 2025
524f59d
fix: update snapshot
btrn11 Jan 23, 2025
e8db083
fix: fix schedule based on comments
btrn11 Jan 27, 2025
6f0d167
fix: fix test
btrn11 Jan 27, 2025
348b2ba
fix: fix hub org deprecate call schedule
btrn11 Jan 27, 2025
4fe35de
Merge pull request #867 from salesforcecli/btrn/pushCLISchedule
btrn11 Jan 28, 2025
3384074
fix: pr comments
mradulsf Jan 28, 2025
59c498f
fix: split orgid according to new line
btrn11 Jan 29, 2025
e150a14
Merge pull request #887 from salesforcecli/btrn/pushCLISchedule
btrn11 Jan 29, 2025
6db3a4e
fix: based on packaging PR changes
mradulsf Jan 29, 2025
cddc9d3
fix: remove deprecated aliases
mradulsf Jan 29, 2025
0b4494c
Merge branch 'packagingDistribution/pushUpgradeCLI' into t/packaging-…
mradulsf Jan 29, 2025
141bdff
test: add tests
mradulsf Jan 29, 2025
b6a1c5c
fix: tests added
mradulsf Jan 30, 2025
7b9e5ab
Merge pull request #870 from salesforcecli/t/packaging-distribution/W…
mradulsf Jan 30, 2025
331b533
feat: add org list flag
btrn11 Mar 25, 2025
e73fa1d
chore: fix test
btrn11 Mar 25, 2025
2f49b94
fix: add try catch for get org list function
btrn11 Mar 25, 2025
990d0f0
fix: add orgInput check cannot be empty
btrn11 Mar 26, 2025
03ceace
fix: handle case when both org file and org input not supplied
btrn11 Mar 26, 2025
8e3aae2
fix: help text for schedule command
btrn11 Mar 26, 2025
ce58855
fix: update help text for all push upgrade commands
btrn11 Mar 26, 2025
0bb0f5a
fix: update snapshot
btrn11 Mar 26, 2025
7386cad
fix: remove error from message
btrn11 Mar 26, 2025
346899a
fix: fix error message
btrn11 Mar 26, 2025
590d944
fix: update org list summary text
btrn11 Mar 26, 2025
0fbc2c0
Merge pull request #926 from salesforcecli/add-org-list-flag
btrn11 Mar 27, 2025
d46ab94
fix: fix no-unsafe errors and other issues
btrn11 Apr 29, 2025
0cb9635
fix: remove redundant check
btrn11 Apr 29, 2025
351e229
fix: fix all any errors
btrn11 Apr 29, 2025
683510f
Merge branch 'main' into packagingDistribution/pushUpgradeCLI
btrn11 Apr 29, 2025
67a77ff
fix: fix linting issues
btrn11 Apr 29, 2025
f4ea739
fix: fix linting issues
btrn11 Apr 29, 2025
5d86f29
fix: fix linting issues
btrn11 Apr 29, 2025
f589d77
feat: add push migration flag
btrn11 Apr 29, 2025
52f9ab5
fix: fix yarn issue
btrn11 Apr 29, 2025
db17295
fix: update yarn lock
btrn11 Apr 29, 2025
f2783d9
fix: add migration flag test
btrn11 Apr 30, 2025
f754d13
feat: add migration filter to list command
btrn11 May 1, 2025
8883c53
fix: fix migration text
btrn11 May 1, 2025
25f19d8
fix: uncomment code
btrn11 May 1, 2025
bd19e59
fix: change command to push-upgrade
btrn11 May 5, 2025
b85e45f
fix: update command snapshot
btrn11 May 5, 2025
ee680d0
fix: resolve conflicts
btrn11 May 5, 2025
1820382
fix: fix yarn lock
btrn11 May 5, 2025
3450cc2
feat: add migration filter for list command
btrn11 May 5, 2025
53b8934
fix: update command snapshot
btrn11 May 5, 2025
4417746
Merge pull request #947 from salesforcecli/btrn/push-migration
btrn11 May 5, 2025
0c026e3
fix: update file path for test files
btrn11 May 14, 2025
0bf6dba
fix: update file path for test files
btrn11 May 14, 2025
aa173b8
fix: start time is required error
btrn11 Jun 3, 2025
72ae65b
Merge pull request #965 from salesforcecli/btrn/fix-start-time-requir…
btrn11 Jun 3, 2025
8a4eb10
fix: fix help texts messages
btrn11 Jun 4, 2025
7e719f6
fix: fix help texts messages
btrn11 Jun 4, 2025
09a14bd
fix: fix help texts messages
btrn11 Jun 4, 2025
b8569f2
fix: fix help texts messages
btrn11 Jun 4, 2025
29bb834
fix: fix help texts messages
btrn11 Jun 4, 2025
6968c80
fix: remove beta flag
btrn11 Jun 4, 2025
7da85f0
fix: fix snapshot
btrn11 Jun 4, 2025
316caec
Merge pull request #966 from salesforcecli/btrn/fix-help-texts-plugin
btrn11 Jun 4, 2025
54055d4
fix: update yarn lock
btrn11 Jun 4, 2025
36e8f01
fix: update yarn lock
btrn11 Jun 4, 2025
4033ff7
fix: update yarn lock
btrn11 Jun 4, 2025
2d1c174
Merge branch 'main' into packagingDistribution/pushUpgradeCLI
btrn11 Jun 4, 2025
c67dd8e
fix: update snapshot
btrn11 Jun 4, 2025
352df55
Merge branch 'packagingDistribution/pushUpgradeCLI' of github.com:sal…
btrn11 Jun 4, 2025
bc02c9a
fix: update package.json
btrn11 Jun 4, 2025
cf2425f
fix: fix tests
btrn11 Jun 4, 2025
5439e24
fix: update schema
btrn11 Jun 5, 2025
65b060a
fix: remove old schemas
btrn11 Jun 5, 2025
7c9dace
fix: update snapshot
btrn11 Jun 5, 2025
b34aaae
fix: fix nut test error
btrn11 Jun 5, 2025
b4b16b6
fix: fix nut test error
btrn11 Jun 5, 2025
cad9947
chore: remove unused eslint directives
WillieRuemmele Jun 5, 2025
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
64 changes: 57 additions & 7 deletions command-snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@
"definitionfile",
"installationkey",
"installationkeybypass",
"patchversion",
"target-hub-org",
"targetdevhubusername",
"patchversion"
"targetdevhubusername"
],
"flagChars": ["f", "k", "m", "p", "s", "v", "w", "x", "a"],
"flagChars": ["a", "f", "k", "m", "p", "s", "v", "w", "x"],
"flags": [
"api-version",
"build-instance",
Expand All @@ -79,11 +79,11 @@
"json",
"loglevel",
"package",
"patch-version",
"seed-metadata",
"target-dev-hub",
"verbose",
"wait",
"patch-version"
"wait"
],
"plugin": "@salesforce/plugin-packaging"
},
Expand Down Expand Up @@ -181,6 +181,57 @@
"flags": ["api-version", "flags-dir", "json", "loglevel", "target-dev-hub", "verbose"],
"plugin": "@salesforce/plugin-packaging"
},
{
"alias": [],
"command": "package:push-upgrade:abort",
"flagAliases": [],
"flagChars": ["i", "v"],
"flags": ["api-version", "flags-dir", "json", "push-request-id", "target-dev-hub"],
"plugin": "@salesforce/plugin-packaging"
},
{
"alias": ["force:package:push-upgrade:list"],
"command": "package:push-upgrade:list",
"flagAliases": ["apiversion", "scheduledlastdays", "target-hub-org", "targetdevhubusername"],
"flagChars": ["l", "p", "s", "v"],
"flags": [
"api-version",
"flags-dir",
"json",
"package",
"scheduled-last-days",
"show-push-migrations-only",
"status",
"target-dev-hub"
],
"plugin": "@salesforce/plugin-packaging"
},
{
"alias": ["force:package:push-upgrade:report"],
"command": "package:push-upgrade:report",
"flagAliases": ["apiversion", "pushrequestid", "target-hub-org", "targetdevhubusername"],
"flagChars": ["i", "v"],
"flags": ["api-version", "flags-dir", "json", "loglevel", "push-request-id", "target-dev-hub"],
"plugin": "@salesforce/plugin-packaging"
},
{
"alias": [],
"command": "package:push-upgrade:schedule",
"flagAliases": ["apiversion"],
"flagChars": ["f", "l", "p", "t", "v"],
"flags": [
"api-version",
"flags-dir",
"json",
"migrate-to-2gp",
"org-file",
"org-list",
"package",
"start-time",
"target-dev-hub"
],
"plugin": "@salesforce/plugin-packaging"
},
{
"alias": ["force:package:uninstall"],
"command": "package:uninstall",
Expand Down Expand Up @@ -231,7 +282,6 @@
"releasenotesurl",
"skipancestorcheck",
"skipvalidation",
"asyncvalidation",
"target-hub-org",
"targetdevhubusername",
"uninstallscript",
Expand All @@ -243,6 +293,7 @@
"flagChars": ["a", "b", "c", "d", "e", "f", "j", "k", "n", "p", "r", "s", "t", "v", "w", "x"],
"flags": [
"api-version",
"async-validation",
"branch",
"build-instance",
"code-coverage",
Expand All @@ -261,7 +312,6 @@
"releasenotes-url",
"skip-ancestor-check",
"skip-validation",
"async-validation",
"tag",
"target-dev-hub",
"uninstall-script",
Expand Down
51 changes: 51 additions & 0 deletions messages/package_pushupgrade_abort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# summary

Abort a package push upgrade that has been scheduled. Only push upgrade requests with a status of Created or Pending can be aborted.

# description

Specify the request ID for which you want abort the request. If applicable, the command displays errors related to the request.

To show all requests in the org, run "<%= config.bin %> package pushupgrade list --package 033...".

# examples

- Cancel the specified package push upgrade request with the specified ID; uses your default Dev Hub org:

<%= config.bin %> <%= command.id %> --push-request-id 0DV...

- Cancel the specified package push upgrade request in the Dev Hub org with username devhub@example.com:

<%= config.bin %> <%= command.id %> --push-request-id 0DV... --target-dev-hub devhub@example.com

# flags.push-request-id.summary

ID of the package push request (starts with 0DV). This ID is returned after the package push-upgrade schedule command completes successfully.

# flags.target-dev-hub.summary

Username or alias of the Dev Hub org.

# flags.target-dev-hub.description

Overrides the value of the target-dev-hub configuration variable, if set.

# error.invalid-push-request-id-owner

Can’t abort package push upgrade request. The specified push upgrade ID is associated with a package in a different Dev Hub org. Retry this command in the context of the Dev Hub org that owns the package.

# error.invalid-push-request-id

Can’t abort package push upgrade request. The specified push upgrade ID isn’t valid. Check the ID (starts with 0DV) and retry the command.

# error.invalid-push-request-status

Can’t abort package push upgrade request with status '${pushRequest.Status}'. Only push upgrade requests with a status of 'Created' or 'Pending' can be cancelled.

# status

Status

# output

Scheduled push upgrade ID [%s] was cancelled.
61 changes: 61 additions & 0 deletions messages/package_pushupgrade_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# summary

Lists the status of push upgrade requests for a given package.

# description

Shows the details of each request to create a push upgrade in the Dev Hub org.

All filter parameters are applied using the AND logical operator (not OR).

To get information about a specific request, run "sf package pushupgrade report" and supply the request ID.

# flags.package.summary

Package ID (starts with 033) of the package that you want push upgrade information for.

# flags.scheduled-last-days.summary

Number of days in the past for which to display the list of push upgrade requests that were scheduled. Used to filter the list output to only recently scheduled push upgrades.

# flags.status.summary

Status used to filter the list output Valid values are: Created, Canceled, Pending, In Progress, Failed, or Succeeded

# flags.show-push-migrations-only.summary

Display only push upgrade requests for package migrations.

# examples

- List all package push upgrade requests in the specified Dev Hub org:

<%= config.bin %> <%= command.id %> --package 033xyz --target-dev-hub myHub

- List all package push upgrade requests in the specified Dev Hub org scheduled in the last 30 days:

<%= config.bin %> <%= command.id %> --package 033xyz --scheduled-last-days 30 --target-dev-hub myHub

- List all package push upgrade with a status Succeeded:

<%= config.bin %> <%= command.id %> --package 033xyz –-status Succeeded

- List all package push upgrade with a status Failed:

<%= config.bin %> <%= command.id %> --package 033xyz –-status Failed

# id

ID

# status

Status

# package-id

Package Id

# packageVersionId

Package Version Id
27 changes: 27 additions & 0 deletions messages/package_pushupgrade_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# summary

Retrieve the status of a package push upgrade.

# description

Specify the request ID for which you want to view details. If applicable, the command displays errors related to the request.

To show all requests in the org, run "<%= config.bin %> package pushupgrade list".

# examples

- Retrieve details about the package push upgrade with the specified ID; uses your default Dev Hub org:

<%= config.bin %> <%= command.id %> --push-request-id 0DV...

- Retrieve details about the specified package push request in the Dev Hub org with username devhub@example.com:

<%= config.bin %> <%= command.id %> --push-request-id 0DV... --target-dev-hub devhub@example.com

# flags.push-request-id.summary

ID of the package push request (starts with 0DV). This ID is returned after the package push-upgrade schedule command completes successfully.

# truncatedErrors

To see all errors, run: %s data query -q "SELECT ErrorMessage FROM PackagePushError WHERE PackagePushJob.PackagePushRequestId='%s'"
109 changes: 109 additions & 0 deletions messages/package_pushupgrade_schedule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# summary

Schedule a package push upgrade.

# description

Represents a push upgrade request for upgrading a package in one or many orgs from one version to another version.
To initiate a push upgrade for an unlocked or second-generation managed package, the Create and Update Second-Generation Packages user permission is required.
For second-generation managed packages, the push upgrade feature is available only for packages that have passed AppExchange security review. To enable push upgrades for your managed package, log a support case in the Salesforce Partner Community.
For unlocked packages, push upgrades are enabled by default.

Use the -–migrate-to-2GP flag to indicate you’re installing a converted second-generation managed package into an org that has the first-generation managed package version of that package installed.

# flags.target-dev-hub.summary

Username or alias of the Dev Hub org.

# flags.target-dev-hub.description

Overrides the value of the target-dev-hub configuration variable, if set.

# flags.package.summary

ID (starts with 04t) of the package version that the package is being upgraded to. The package version must be an active, non-beta package version.

# flags.start-time.summary

Date and time (UTC) when the push upgrade is processed. Set to the earliest time that you want Salesforce to attempt to start the upgrade.

# flags.start-time.description

Scheduled push upgrades begin as soon as resources are available on the Salesforce instance, which is either at or after the start time you specify. In certain scenarios, the push upgrade starts a few hours after the scheduled start time.

As a best practice, schedule push upgrades at off-peak hours like 1:00 AM Saturday.
If you don't specify this flag, the push upgrade is scheduled to run as soon as resources are available on the Salesforce instance.

# flags.org-file.summary

Filename of the CSV file that contains the list of orgs that need the package upgrade.

# flags.org-file.description

The file must contain one org per line. The org ID must be the only value in each row.
All listed orgs must have a package version installed in their org that is lower than the package version you specified for the --package-version flag.

# flags.org-list.summary

Comma-separated list of subscriber org IDs that need the package upgrade.

# flags.migrate-to-2gp.summary

Upgrade from a first-generation managed package (1GP) to a second-generation managed package (2GP). Required when you’re pushing a 2GP package to orgs with the 1GP version installed.

# error.invalid-package-version

Invalid package version.

# error.empty-org-list

Can’t schedule the package push upgrade. The
org file you specified is empty. Review the file you specified, and retry this command.

# error.empty-org-input

There are no org Ids.

# error.invalid-org-file

Can’t schedule the package push upgrade. The org file you specified is invalid. The org file must be a CSV file, and each row can contain only one org ID. Review and update your org file and retry this command.

# error.invalid-org-input

Can’t schedule the package push upgrade. One or more of the orgs IDs you specified in the org list is an invalid org ID. Review the list of orgs you specified, and retry this command

# error.no-org-file-or-org-list-input

Can’t schedule the package push upgrade. You must specify either a list of orgs, or a file containing the list of orgs to be upgraded. Retry this command using either --org-list or --org-file flag and include the required details.

# examples

- Schedule a push upgrade that initiates at a specified time:
<%= config.bin %> <%= command.id %> --package 04txyz --start-time "2024-12-06T21:00:00" --org-file upgrade-orgs.csv

- Schedule a push upgrade that initiates as soon as possible:
<%= config.bin %> <%= command.id %> --package 04txyz --org-file upgrade-orgs.csv

- Schedule a push migration from a 1GP package to a 2GP package:
<%= config.bin %> <%= command.id %> --migrate-to-2gp --package 04txyz --start-time "2024-12-06T21:00:00" --org-file upgrade-orgs.csv --target-dev-hub myHub

# id

ID

# status

Status

# package-id

Package Id

# packageVersionId

Package Version Id

# output

Push upgrade has been scheduled. To check the status of this push upgrade, use push upgrade request ID [%s] with either "package push-upgrade list" or "package push-upgrade report".
Orgs scheduled for push upgrade: {%s}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@oclif/core": "^4",
"@salesforce/core": "^8.11.1",
"@salesforce/kit": "^3.2.3",
"@salesforce/packaging": "^4.5.0",
"@salesforce/packaging": "^4.6.0",
"@salesforce/sf-plugins-core": "^12.2.2",
"chalk": "^5.4.1"
},
Expand Down
18 changes: 18 additions & 0 deletions schemas/package-push__upgrade-abort.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/PackagePushUpgradeAbortResult",
"definitions": {
"PackagePushUpgradeAbortResult": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
}
},
"required": [
"success"
],
"additionalProperties": false
}
}
}
Loading
Loading