Skip to content

Commit 3bd7160

Browse files
authored
Merge pull request #613 from salesforcecli/phale/W-12467406
fix: check if sandbox is resumable
2 parents 0c9b247 + 852b2eb commit 3bd7160

File tree

6 files changed

+126
-183
lines changed

6 files changed

+126
-183
lines changed

messages/create.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ Number of scratch org auth retries after scratch org is successfully signed up.
6868

6969
Streaming client socket timeout (in minutes).
7070

71+
# flags.targetOrg.summary
72+
73+
Username or alias of the production org that contains the sandbox license.
74+
7175
# scratchOrgCreateSuccess
7276

7377
Successfully created scratch org: %s, username: %s.

messages/sandboxbase.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The sandbox org creation was successful.
55
# sandboxSuccess.actions
66

77
The username for the sandbox is %s.
8-
You can open the org by running "%s org open -e %s"
8+
You can open the org by running "%s org open -o %s"
99

1010
# checkSandboxStatus
1111

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,26 @@
77
"bugs": "https://github.com/forcedotcom/cli/issues",
88
"dependencies": {
99
"@oclif/core": "^2.6.3",
10-
"@salesforce/core": "^3.33.5",
11-
"@salesforce/kit": "^1.9.0",
12-
"@salesforce/sf-plugins-core": "^2.2.3",
13-
"@salesforce/source-deploy-retrieve": "^7.11.0",
10+
"@salesforce/core": "^3.34.3",
11+
"@salesforce/kit": "^1.9.2",
12+
"@salesforce/sf-plugins-core": "^2.2.4",
13+
"@salesforce/source-deploy-retrieve": "^7.12.0",
1414
"open": "^8.4.2",
1515
"tslib": "^2"
1616
},
1717
"devDependencies": {
1818
"@oclif/plugin-command-snapshot": "^3.3.9",
19-
"@salesforce/cli-plugins-testkit": "^3.2.25",
19+
"@salesforce/cli-plugins-testkit": "^3.2.26",
2020
"@salesforce/dev-config": "^3.1.0",
2121
"@salesforce/dev-scripts": "^4.1.3",
2222
"@salesforce/plugin-command-reference": "^2.2.9",
2323
"@salesforce/plugin-source": "^2.8.0",
2424
"@salesforce/prettier-config": "^0.0.2",
2525
"@salesforce/ts-sinon": "1.4.6",
26-
"@swc/core": "^1.3.37",
26+
"@swc/core": "1.3.39",
2727
"@types/chai-as-promised": "^7.1.5",
2828
"@types/shelljs": "^0.8.10",
29-
"@typescript-eslint/eslint-plugin": "^5.54.0",
29+
"@typescript-eslint/eslint-plugin": "^5.55.0",
3030
"@typescript-eslint/parser": "^5.55.0",
3131
"chai": "^4.3.7",
3232
"chai-as-promised": "^7.1.1",

src/commands/force/org/create.ts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,30 @@
88
import { Interfaces } from '@oclif/core';
99
import {
1010
Flags,
11-
SfCommand,
11+
loglevel,
12+
optionalHubFlagWithDeprecations,
1213
optionalOrgFlagWithDeprecations,
1314
orgApiVersionFlagWithDeprecations,
1415
parseVarArgs,
15-
optionalHubFlagWithDeprecations,
16-
loglevel,
16+
SfCommand,
1717
} from '@salesforce/sf-plugins-core';
1818
import {
1919
AuthFields,
20-
StateAggregator,
2120
Config,
2221
Lifecycle,
22+
Logger,
2323
Messages,
24-
OrgTypes,
2524
OrgConfigProperties,
25+
OrgTypes,
2626
ResultEvent,
2727
SandboxEvents,
2828
SandboxProcessObject,
2929
SandboxUserAuthResponse,
30-
SfError,
31-
StatusEvent,
3230
ScratchOrgInfo,
3331
ScratchOrgRequest,
34-
Logger,
32+
SfError,
33+
StateAggregator,
34+
StatusEvent,
3535
} from '@salesforce/core';
3636
import { createSandboxRequest } from '../../../shared/sandboxRequest';
3737
import { SandboxReporter } from '../../../shared/sandboxReporter';
@@ -48,6 +48,7 @@ export interface ScratchOrgProcessObject {
4848
}
4949

5050
export type CreateResult = ScratchOrgProcessObject | SandboxProcessObject;
51+
5152
export class Create extends SfCommand<CreateResult> {
5253
public static readonly summary = messages.getMessage('summary');
5354
public static readonly description = messages.getMessage('description');
@@ -63,7 +64,10 @@ export class Create extends SfCommand<CreateResult> {
6364
public static readonly strict = false;
6465

6566
public static readonly flags = {
66-
'target-org': optionalOrgFlagWithDeprecations,
67+
'target-org': {
68+
...optionalOrgFlagWithDeprecations,
69+
summary: messages.getMessage('flags.targetOrg.summary'),
70+
},
6771
'target-dev-hub': optionalHubFlagWithDeprecations,
6872
'api-version': orgApiVersionFlagWithDeprecations,
6973
loglevel,

src/shared/sandboxCommandBase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ export abstract class SandboxCommandBase<T> extends SfCommand<T> {
160160
[
161161
messages.getMessage('sandboxSuccess'),
162162
messages.getMessages('sandboxSuccess.actions', [
163-
this.config.bin,
164163
results.sandboxRes?.authUserName,
164+
this.config.bin,
165165
results.sandboxRes?.authUserName,
166166
]),
167167
].join(os.EOL)

0 commit comments

Comments
 (0)