Skip to content

Commit cc823f7

Browse files
authored
Merge pull request #1152 from salesforcecli/packaging-distribution/bundle-installed-list-and-uninstall-cli
@W-21729309 Merge bundle uninstall and installed list CLI code to main (plugin)
2 parents 9725442 + 4f65140 commit cc823f7

20 files changed

Lines changed: 894 additions & 352 deletions

command-snapshot.json

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,18 @@
8181
},
8282
{
8383
"alias": [],
84-
"command": "package:bundle:install:list",
84+
"command": "package:bundle:install:report",
8585
"flagAliases": ["apiversion", "targetusername", "u"],
86-
"flagChars": ["c", "o", "s"],
87-
"flags": ["api-version", "created-last-days", "flags-dir", "json", "loglevel", "status", "target-org", "verbose"],
86+
"flagChars": ["i", "o"],
87+
"flags": ["api-version", "flags-dir", "json", "loglevel", "package-install-request-id", "target-org", "verbose"],
8888
"plugin": "@salesforce/plugin-packaging"
8989
},
9090
{
9191
"alias": [],
92-
"command": "package:bundle:install:report",
92+
"command": "package:bundle:installed:list",
9393
"flagAliases": ["apiversion", "targetusername", "u"],
94-
"flagChars": ["i", "o"],
95-
"flags": ["api-version", "flags-dir", "json", "loglevel", "package-install-request-id", "target-org", "verbose"],
94+
"flagChars": ["o"],
95+
"flags": ["api-version", "flags-dir", "json", "loglevel", "target-org"],
9696
"plugin": "@salesforce/plugin-packaging"
9797
},
9898
{
@@ -103,6 +103,14 @@
103103
"flags": ["api-version", "flags-dir", "json", "loglevel", "target-dev-hub", "verbose"],
104104
"plugin": "@salesforce/plugin-packaging"
105105
},
106+
{
107+
"alias": [],
108+
"command": "package:bundle:uninstall",
109+
"flagAliases": ["apiversion", "targetusername", "u"],
110+
"flagChars": ["b", "o", "w"],
111+
"flags": ["api-version", "bundle", "flags-dir", "json", "loglevel", "target-org", "verbose", "wait"],
112+
"plugin": "@salesforce/plugin-packaging"
113+
},
106114
{
107115
"alias": [],
108116
"command": "package:bundle:version:create",

messages/bundle_install_list.md

Lines changed: 0 additions & 69 deletions
This file was deleted.

messages/bundle_installed_list.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# summary
2+
3+
List all installed package bundles in the target org.
4+
5+
# description
6+
7+
Displays information about all package bundles currently installed in the target org, including the bundle details and the associated packages with their expected and actual versions.
8+
9+
# examples
10+
11+
- List all installed package bundles in your default org:
12+
13+
<%= config.bin %> <%= command.id %>
14+
15+
- List all installed package bundles in a specific org:
16+
17+
<%= config.bin %> <%= command.id %> --target-org myorg@example.com
18+
19+
# flags.target-org.summary
20+
21+
The org to list installed package bundles from.

messages/bundle_uninstall.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# summary
2+
3+
Uninstall a package bundle version from a target org.
4+
5+
# description
6+
7+
Provide the package bundle version ID or alias and the target org to start an uninstall request. Optionally wait for the uninstall to complete.
8+
9+
# examples
10+
11+
- Uninstall a bundle version by ID from a specified org:
12+
13+
<%= config.bin %> <%= command.id %> --bundle 1Q8... --target-org me@example.com
14+
15+
- Uninstall a bundle version by alias from your default org and wait up to 10 minutes for completion:
16+
17+
<%= config.bin %> <%= command.id %> --bundle MyBundle@1.2 -w 10
18+
19+
# flags.bundle.summary
20+
21+
ID (starts with 1Q8) or alias of the package bundle version to uninstall.
22+
23+
# flags.wait.summary
24+
25+
Number of minutes to wait for the uninstall request to complete.
26+
27+
# flags.verbose.summary
28+
29+
Show additional progress while waiting for uninstall to finish.
30+
31+
# bundleUninstallWaitingStatus
32+
33+
Waiting %s more minutes for bundle uninstall. Current status: %s
34+
35+
# bundleUninstallError
36+
37+
Encountered errors uninstalling the bundle! %s
38+
39+
# bundleUninstallInProgress
40+
41+
Bundle uninstall is currently %s. Request Id: %s. Target org: %s
42+
43+
# bundleUninstallSuccess
44+
45+
Successfully uninstalled bundle version %s from %s
46+

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"o11yUploadEndpoint": "https://794testsite.my.site.com/byolwr/webruntime/log/metrics",
99
"dependencies": {
1010
"@oclif/core": "^4",
11-
"@salesforce/core": "^8.27.0",
11+
"@salesforce/core": "^8.27.1",
1212
"@salesforce/kit": "^3.2.6",
13-
"@salesforce/packaging": "^4.21.10",
13+
"@salesforce/packaging": "^4.22.0",
1414
"@salesforce/sf-plugins-core": "^12.2.6",
1515
"chalk": "^5.6.2"
1616
},
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$ref": "#/definitions/PackageBundleInstalledListResults",
4+
"definitions": {
5+
"PackageBundleInstalledListResults": {
6+
"type": "array",
7+
"items": {
8+
"$ref": "#/definitions/BundleSObjects.InstalledPackageBundleVersion"
9+
}
10+
},
11+
"BundleSObjects.InstalledPackageBundleVersion": {
12+
"type": "object",
13+
"properties": {
14+
"Id": {
15+
"type": "string"
16+
},
17+
"BundleName": {
18+
"type": "string"
19+
},
20+
"BundleId": {
21+
"type": "string"
22+
},
23+
"BundleVersionId": {
24+
"type": "string"
25+
},
26+
"BundleVersionName": {
27+
"type": "string"
28+
},
29+
"MajorVersion": {
30+
"type": "number"
31+
},
32+
"MinorVersion": {
33+
"type": "number"
34+
},
35+
"Description": {
36+
"type": "string"
37+
},
38+
"InstalledDate": {
39+
"type": "string"
40+
},
41+
"LastUpgradedDate": {
42+
"type": "string"
43+
},
44+
"Components": {
45+
"type": "array",
46+
"items": {
47+
"$ref": "#/definitions/BundleSObjects.InstalledPackageBundleVersionComponent"
48+
}
49+
}
50+
},
51+
"required": [
52+
"Id",
53+
"BundleName",
54+
"BundleId",
55+
"BundleVersionId",
56+
"BundleVersionName",
57+
"MajorVersion",
58+
"MinorVersion",
59+
"Description",
60+
"InstalledDate",
61+
"LastUpgradedDate",
62+
"Components"
63+
],
64+
"additionalProperties": false
65+
},
66+
"BundleSObjects.InstalledPackageBundleVersionComponent": {
67+
"type": "object",
68+
"properties": {
69+
"ExpectedPackageName": {
70+
"type": "string"
71+
},
72+
"ExpectedPackageVersionNumber": {
73+
"type": "string"
74+
},
75+
"ActualPackageName": {
76+
"type": "string"
77+
},
78+
"ActualPackageVersionNumber": {
79+
"type": "string"
80+
}
81+
},
82+
"required": [
83+
"ExpectedPackageName",
84+
"ExpectedPackageVersionNumber",
85+
"ActualPackageName",
86+
"ActualPackageVersionNumber"
87+
],
88+
"additionalProperties": false
89+
}
90+
}
91+
}
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"$ref": "#/definitions/PackageBundleInstallRequestResults",
3+
"$ref": "#/definitions/BundleUninstallResult",
44
"definitions": {
5-
"PackageBundleInstallRequestResults": {
6-
"type": "array",
7-
"items": {
8-
"$ref": "#/definitions/BundleSObjects.PkgBundleVersionInstallReqResult"
9-
}
5+
"BundleUninstallResult": {
6+
"$ref": "#/definitions/BundleSObjects.PkgBundleVerUninstallReqResult"
107
},
11-
"BundleSObjects.PkgBundleVersionInstallReqResult": {
8+
"BundleSObjects.PkgBundleVerUninstallReqResult": {
129
"type": "object",
1310
"additionalProperties": false,
1411
"properties": {
1512
"Id": {
1613
"type": "string"
1714
},
18-
"InstallStatus": {
19-
"$ref": "#/definitions/BundleSObjects.PkgBundleVersionInstallReqStatus"
20-
},
21-
"ValidationError": {
22-
"type": "string"
15+
"UninstallStatus": {
16+
"$ref": "#/definitions/BundleSObjects.PkgBundleVersionUninstallReqStatus"
2317
},
2418
"CreatedDate": {
2519
"type": "string"
@@ -36,28 +30,18 @@
3630
"PackageBundleVersionId": {
3731
"type": "string"
3832
},
39-
"DevelopmentOrganization": {
33+
"InstalledPkgBundleVersionId": {
34+
"type": "string"
35+
},
36+
"ValidationError": {
4037
"type": "string"
4138
}
4239
},
43-
"required": [
44-
"CreatedById",
45-
"CreatedDate",
46-
"DevelopmentOrganization",
47-
"Id",
48-
"InstallStatus",
49-
"PackageBundleVersionId",
50-
"ValidationError"
51-
]
40+
"required": ["CreatedById", "CreatedDate", "Id", "PackageBundleVersionId", "UninstallStatus"]
5241
},
53-
"BundleSObjects.PkgBundleVersionInstallReqStatus": {
42+
"BundleSObjects.PkgBundleVersionUninstallReqStatus": {
5443
"type": "string",
55-
"enum": [
56-
"Queued",
57-
"InProgress",
58-
"Success",
59-
"Error"
60-
]
44+
"enum": ["Queued", "InProgress", "Success", "Error"]
6145
}
6246
}
63-
}
47+
}

0 commit comments

Comments
 (0)