Skip to content

Commit 38f6500

Browse files
feat: created pakcage bundle install command
1 parent cd07918 commit 38f6500

15 files changed

Lines changed: 1486 additions & 12 deletions

command-snapshot.json

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,40 @@
6363
"flags": ["api-version", "description", "flags-dir", "json", "loglevel", "name", "target-dev-hub"],
6464
"plugin": "@salesforce/plugin-packaging"
6565
},
66+
{
67+
"alias": [],
68+
"command": "package:bundle:install",
69+
"flagAliases": ["apiversion", "target-hub-org", "targetdevhubusername", "targetusername", "u"],
70+
"flagChars": ["b", "o", "v", "w"],
71+
"flags": [
72+
"api-version",
73+
"bundle",
74+
"flags-dir",
75+
"json",
76+
"loglevel",
77+
"target-dev-hub",
78+
"target-org",
79+
"verbose",
80+
"wait"
81+
],
82+
"plugin": "@salesforce/plugin-packaging"
83+
},
84+
{
85+
"alias": [],
86+
"command": "package:bundle:install:list",
87+
"flagAliases": ["apiversion", "createdlastdays", "target-hub-org", "targetdevhubusername"],
88+
"flagChars": ["c", "s", "v"],
89+
"flags": ["api-version", "created-last-days", "flags-dir", "json", "loglevel", "status", "target-org", "verbose"],
90+
"plugin": "@salesforce/plugin-packaging"
91+
},
92+
{
93+
"alias": [],
94+
"command": "package:bundle:install:report",
95+
"flagAliases": ["apiversion", "packageinstallrequestid", "target-hub-org", "targetdevhubusername"],
96+
"flagChars": ["i", "v"],
97+
"flags": ["api-version", "flags-dir", "json", "loglevel", "package-install-request-id", "target-org", "verbose"],
98+
"plugin": "@salesforce/plugin-packaging"
99+
},
66100
{
67101
"alias": [],
68102
"command": "package:bundle:list",
@@ -128,7 +162,7 @@
128162
"alias": [],
129163
"command": "package:bundle:version:report",
130164
"flagAliases": ["apiversion", "target-hub-org", "targetdevhubusername"],
131-
"flagChars": ["p", "v"],
165+
"flagChars": ["b", "v"],
132166
"flags": ["api-version", "bundle-version", "flags-dir", "json", "loglevel", "target-dev-hub", "verbose"],
133167
"plugin": "@salesforce/plugin-packaging"
134168
},

messages/bundle_install.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# summary
2+
3+
Install a package bundle version in the target org.
4+
5+
# description
6+
7+
Install a specific version of a package bundle in the target org. During developer preview, bundles can be installed only in scratch orgs.
8+
9+
# examples
10+
11+
Install a package bundle version in a scratch org:
12+
13+
sf package bundle install --bundle MyPkgBundle1@0.1 --target-org my-scratch-org --wait 10
14+
15+
# flags.bundle.summary
16+
17+
Package bundle version to install (format: BundleName@Version).
18+
19+
# flags.target-org.summary
20+
21+
Target org for the bundle installation.
22+
23+
# flags.wait.summary
24+
25+
Number of minutes to wait for the installation to complete.
26+
27+
# flags.verbose.summary
28+
29+
Display extended installation detail.
30+
31+
# requestInProgress
32+
33+
Installing bundle.
34+
35+
# bundleInstallWaitingStatus
36+
37+
%d minutes remaining until timeout. Install status: %s
38+
39+
# bundleInstallFinalStatus
40+
41+
Install status: %s
42+
43+
# bundleInstallSuccess
44+
45+
Successfully installed bundle [%s]
46+
47+
# bundleInstallError
48+
49+
Encountered errors installing the bundle! %s
50+
51+
# bundleInstallInProgress
52+
53+
Bundle installation is currently %s. You can continue to query the status using
54+
sf package bundle install:report -i %s -o %s

messages/bundle_install_list.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# summary
2+
3+
List package bundle installation requests.
4+
5+
# description
6+
7+
Shows the details of each request to install a package bundle version in the target org.
8+
9+
All filter parameters are applied using the AND logical operator (not OR).
10+
11+
To get information about a specific request, run "<%= config.bin %> package bundle install report" and supply the request ID.
12+
13+
# flags.status.summary
14+
15+
Status of the installation request, used to filter the list.
16+
17+
# flags.verbose.summary
18+
19+
Displays additional information at a slight performance cost, such as validation text for each package bundle install request.
20+
21+
# flags.created-last-days.summary
22+
23+
Number of days since the request was created, starting at 00:00:00 of first day to now. Use 0 for today.
24+
25+
# examples
26+
27+
- List all package bundle installation requests in your default Dev Hub org:
28+
29+
<%= config.bin %> <%= command.id %>
30+
31+
- List package bundle installation requests from the last 3 days in the Dev Hub org with username devhub@example.com:
32+
33+
<%= config.bin %> <%= command.id %> --created-last-days 3 --target-dev-hub
34+
35+
- List package bundle installation requests with status Error:
36+
37+
<%= config.bin %> <%= command.id %> --status Error
38+
39+
- List package bundle installation requests with status Queued:
40+
41+
<%= config.bin %> <%= command.id %> --status Queued
42+
43+
- List package bundle installation requests with status Success that were created today:
44+
45+
<%= config.bin %> <%= command.id %> --created-last-days 0 --status Success
46+
47+
# id
48+
49+
ID
50+
51+
# status
52+
53+
Status
54+
55+
# package-bundle-version-id
56+
57+
Package Bundle Version ID
58+
59+
# development-organization
60+
61+
Development Organization
62+
63+
# created-by
64+
65+
Created By
66+
67+
# validation-error
68+
69+
Validation Error

messages/bundle_install_report.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# summary
2+
3+
Report on the status of a package bundle installation request.
4+
5+
# description
6+
7+
Use this command to check the status of a package bundle installation request. The command returns information about the request, including its current status and details about the package bundle version being installed.
8+
9+
# examples
10+
11+
- Report on a package bundle installation request:
12+
13+
<%= config.bin %> <%= command.id %> --package-install-request-id 0Ho0x0000000000000
14+
15+
- Report on a package bundle installation request using an alias:
16+
17+
<%= config.bin %> force:package:bundle:install:report -i 0Ho0x0000000000000
18+
19+
# flags.package-install-request-id.summary
20+
21+
The ID of the package bundle installation request to report on.
22+
23+
# id
24+
25+
ID
26+
27+
# status
28+
29+
Status
30+
31+
# package-bundle-version-id
32+
33+
Package Bundle Version ID
34+
35+
# development-organization
36+
37+
Development Organization
38+
39+
# validation-error
40+
41+
Validation Error
42+
43+
# created-date
44+
45+
Created Date
46+
47+
# created-by
48+
49+
Created By
50+
51+
# flags.verbose.summary
52+
53+
Show verbose output.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$ref": "#/definitions/PackageBundleInstallRequestResults",
4+
"definitions": {
5+
"PackageBundleInstallRequestResults": {
6+
"type": "array",
7+
"items": {
8+
"$ref": "#/definitions/BundleSObjects.PkgBundleVersionInstallReqResult"
9+
}
10+
},
11+
"BundleSObjects.PkgBundleVersionInstallReqResult": {
12+
"type": "object",
13+
"additionalProperties": false,
14+
"properties": {
15+
"Id": {
16+
"type": "string"
17+
},
18+
"InstallStatus": {
19+
"$ref": "#/definitions/BundleSObjects.PkgBundleVersionInstallReqStatus"
20+
},
21+
"ValidationError": {
22+
"type": "string"
23+
},
24+
"CreatedDate": {
25+
"type": "string"
26+
},
27+
"CreatedById": {
28+
"type": "string"
29+
},
30+
"Error": {
31+
"type": "array",
32+
"items": {
33+
"type": "string"
34+
}
35+
},
36+
"PackageBundleVersionID": {
37+
"type": "string"
38+
},
39+
"DevelopmentOrganization": {
40+
"type": "string"
41+
}
42+
},
43+
"required": [
44+
"CreatedById",
45+
"CreatedDate",
46+
"DevelopmentOrganization",
47+
"Id",
48+
"InstallStatus",
49+
"PackageBundleVersionID",
50+
"ValidationError"
51+
]
52+
},
53+
"BundleSObjects.PkgBundleVersionInstallReqStatus": {
54+
"type": "string",
55+
"enum": ["Queued", "Success", "Error"]
56+
}
57+
}
58+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$ref": "#/definitions/ReportCommandResult",
4+
"definitions": {
5+
"ReportCommandResult": {
6+
"type": "array",
7+
"items": {
8+
"$ref": "#/definitions/BundleSObjects.PkgBundleVersionInstallReqResult"
9+
}
10+
},
11+
"BundleSObjects.PkgBundleVersionInstallReqResult": {
12+
"type": "object",
13+
"additionalProperties": false,
14+
"properties": {
15+
"Id": {
16+
"type": "string"
17+
},
18+
"InstallStatus": {
19+
"$ref": "#/definitions/BundleSObjects.PkgBundleVersionInstallReqStatus"
20+
},
21+
"ValidationError": {
22+
"type": "string"
23+
},
24+
"CreatedDate": {
25+
"type": "string"
26+
},
27+
"CreatedById": {
28+
"type": "string"
29+
},
30+
"Error": {
31+
"type": "array",
32+
"items": {
33+
"type": "string"
34+
}
35+
},
36+
"PackageBundleVersionID": {
37+
"type": "string"
38+
},
39+
"DevelopmentOrganization": {
40+
"type": "string"
41+
}
42+
},
43+
"required": [
44+
"CreatedById",
45+
"CreatedDate",
46+
"DevelopmentOrganization",
47+
"Id",
48+
"InstallStatus",
49+
"PackageBundleVersionID",
50+
"ValidationError"
51+
]
52+
},
53+
"BundleSObjects.PkgBundleVersionInstallReqStatus": {
54+
"type": "string",
55+
"enum": ["Queued", "Success", "Error"]
56+
}
57+
}
58+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$ref": "#/definitions/BundleSObjects.PkgBundleVersionInstallReqResult",
4+
"definitions": {
5+
"BundleSObjects.PkgBundleVersionInstallReqResult": {
6+
"type": "object",
7+
"additionalProperties": false,
8+
"properties": {
9+
"Id": {
10+
"type": "string"
11+
},
12+
"InstallStatus": {
13+
"$ref": "#/definitions/BundleSObjects.PkgBundleVersionInstallReqStatus"
14+
},
15+
"ValidationError": {
16+
"type": "string"
17+
},
18+
"CreatedDate": {
19+
"type": "string"
20+
},
21+
"CreatedById": {
22+
"type": "string"
23+
},
24+
"Error": {
25+
"type": "array",
26+
"items": {
27+
"type": "string"
28+
}
29+
},
30+
"PackageBundleVersionID": {
31+
"type": "string"
32+
},
33+
"DevelopmentOrganization": {
34+
"type": "string"
35+
}
36+
},
37+
"required": [
38+
"CreatedById",
39+
"CreatedDate",
40+
"DevelopmentOrganization",
41+
"Id",
42+
"InstallStatus",
43+
"PackageBundleVersionID",
44+
"ValidationError"
45+
]
46+
},
47+
"BundleSObjects.PkgBundleVersionInstallReqStatus": {
48+
"type": "string",
49+
"enum": ["Queued", "Success", "Error"]
50+
}
51+
}
52+
}

0 commit comments

Comments
 (0)