Skip to content

Commit 7fb75d6

Browse files
authored
Merge pull request #667 from salesforcecli/sm/sbox-move-default
Sm/sbox-move-default
2 parents 2655a45 + 94e6647 commit 7fb75d6

File tree

8 files changed

+91
-59
lines changed

8 files changed

+91
-59
lines changed

messages/clone.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ Sets the streaming client socket timeout, in minutes. If the streaming client so
4646

4747
The sandbox org cloning process %s is in progress. Run "sfdx force:org:status -n %s" to check for status. If the org is ready, checking the status also logs the requesting user in to the sandbox org and authorizes the org for use with Salesforce CLI.
4848

49-
# missingLicenseType
50-
51-
The sandbox license type is required, but you didn't provide a value. Specify the license type in the sandbox definition file with the "licenseType" option, or specify the option as a name-value pair at the command-line. See https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_sandbox_definition.htm for more information.
52-
5349
# commandOrganizationTypeNotSupport
5450

5551
The only supported org type is: %s

messages/create.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,6 @@ The sandbox org creation process %s is in progress. Run "sfdx force:org:status -
104104

105105
This command requires a username. Specify it with the -u parameter or with the "sfdx config:set defaultusername=<username>" command.
106106

107-
# missingLicenseType
108-
109-
The sandbox license type is required, but you didn't provide a value. Specify the license type in the sandbox definition file with the "licenseType" option, or specify the option as a name-value pair at the command-line. See https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_sandbox_definition.htm for more information.
110-
111107
# dnsTimeout
112108

113109
The sandbox was successfully created and authenticated. However, the sandbox DNS records aren't ready yet and so the sandbox may not be available. Run "org:list" and check if the sandbox is listed correctly. If it isn't listed, run "force:org:status" to view its status and, if necessary, authenticate to it again. If this issue happens frequently, try setting the SFDX_DNS_TIMEOUT environment variable to a larger number; the default value is 3 seconds.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
"main": "lib/index.js",
77
"bugs": "https://github.com/forcedotcom/cli/issues",
88
"dependencies": {
9-
"@oclif/core": "^2.8.2",
10-
"@salesforce/core": "^3.34.8",
9+
"@oclif/core": "^2.8.4",
10+
"@salesforce/core": "^3.36.0",
1111
"@salesforce/kit": "^1.9.2",
12-
"@salesforce/sf-plugins-core": "^2.2.7",
13-
"@salesforce/source-deploy-retrieve": "^8.0.1",
12+
"@salesforce/sf-plugins-core": "^2.4.0",
13+
"@salesforce/source-deploy-retrieve": "^8.0.5",
1414
"open": "^8.4.2",
1515
"tslib": "^2"
1616
},
@@ -36,7 +36,7 @@
3636
"eslint-plugin-header": "^3.0.0",
3737
"eslint-plugin-import": "2.27.5",
3838
"eslint-plugin-jsdoc": "^40.0.3",
39-
"eslint-plugin-sf-plugin": "^1.14.0",
39+
"eslint-plugin-sf-plugin": "^1.15.1",
4040
"husky": "^7.0.4",
4141
"mocha": "^10.2.0",
4242
"moment": "^2.29.1",

src/commands/org/create/sandbox.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,11 @@ import { Ux } from '@salesforce/sf-plugins-core/lib/ux';
1111
import * as Interfaces from '@oclif/core/lib/interfaces';
1212
import { createSandboxRequest } from '../../../shared/sandboxRequest';
1313
import { SandboxCommandBase } from '../../../shared/sandboxCommandBase';
14+
import { SandboxLicenseType } from '../../../shared/orgTypes';
1415

1516
Messages.importMessagesDirectory(__dirname);
1617
const messages = Messages.loadMessages('@salesforce/plugin-org', 'create.sandbox');
1718

18-
export enum SandboxLicenseType {
19-
developer = 'Developer',
20-
developerPro = 'Developer_Pro',
21-
partial = 'Partial',
22-
full = 'Full',
23-
}
24-
2519
const getLicenseTypes = (): string[] => Object.values(SandboxLicenseType);
2620

2721
type SandboxConfirmData = SandboxRequest & { CloneSource?: string };
@@ -99,7 +93,6 @@ export default class CreateSandbox extends SandboxCommandBase<SandboxProcessObje
9993
char: 'l',
10094
summary: messages.getMessage('flags.licenseType.summary'),
10195
exclusive: ['definition-file', 'clone'],
102-
default: SandboxLicenseType.developer,
10396
}),
10497
'target-org': Flags.requiredOrg({
10598
char: 'o',

src/shared/orgTypes.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,10 @@ export interface ScratchCreateResponse {
9898
warnings: string[];
9999
orgId?: string;
100100
}
101+
102+
export enum SandboxLicenseType {
103+
developer = 'Developer',
104+
developerPro = 'Developer_Pro',
105+
partial = 'Partial',
106+
full = 'Full',
107+
}

src/shared/sandboxRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
import * as fs from 'fs';
88
import { Logger, SandboxRequest, Messages, SfError, Lifecycle } from '@salesforce/core';
99
import { lowerToUpper } from './utils';
10+
import { SandboxLicenseType } from './orgTypes';
1011

1112
Messages.importMessagesDirectory(__dirname);
12-
const messages = Messages.loadMessages('@salesforce/plugin-org', 'create');
1313
const cloneMessages = Messages.loadMessages('@salesforce/plugin-org', 'clone');
1414

1515
export const generateSboxName = async (): Promise<string> => {
@@ -72,7 +72,7 @@ export async function createSandboxRequest(
7272
return { sandboxReq, srcSandboxName: SourceSandboxName };
7373
} else {
7474
if (!sandboxReq.LicenseType) {
75-
throw new SfError(messages.getMessage('missingLicenseType'));
75+
return { sandboxReq: { ...sandboxReq, LicenseType: SandboxLicenseType.developer } };
7676
}
7777
return { sandboxReq };
7878
}

test/shared/orgListUtil.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ describe('orgListUtil tests', () => {
115115
defaultusername: orgAuthConfigFields.username,
116116
defaultdevhubusername: devHubConfigFields.username,
117117
}),
118+
getPropertyValue: () => ({}),
118119
});
119120

120121
stubMethod(sandbox, fs, 'stat').resolves({ atime: 'test' });

yarn.lock

Lines changed: 75 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -695,10 +695,10 @@
695695
supports-color "^8.1.1"
696696
tslib "^2"
697697

698-
"@oclif/core@^2.0.7", "@oclif/core@^2.3.0", "@oclif/core@^2.4.0", "@oclif/core@^2.6.3", "@oclif/core@^2.7.1", "@oclif/core@^2.8.0", "@oclif/core@^2.8.2":
699-
version "2.8.2"
700-
resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.8.2.tgz#86fc31f20419dbb3cd25f89f4f1d83760c60f7c0"
701-
integrity sha512-g50NrCdEcFlBfuwZb9RxLmxPNQ9wIaBPOiwbxlGYRkHMnsC6LNHcvVtyDnmndU8qoXrmCOZ6ocSZenOMlG+G1w==
698+
"@oclif/core@^2.0.7", "@oclif/core@^2.3.0", "@oclif/core@^2.4.0", "@oclif/core@^2.6.3", "@oclif/core@^2.7.1", "@oclif/core@^2.8.0", "@oclif/core@^2.8.2", "@oclif/core@^2.8.4":
699+
version "2.8.4"
700+
resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.8.4.tgz#7b453be6d4cd060ff4990bc8e31824a1de308354"
701+
integrity sha512-VlFDhoAJ1RDwcpDF46wAlciWTIryapMUViACttY9GwX6Ci6Lud1awe/pC3k4jad5472XshnPQV4bHAl4a/yxpA==
702702
dependencies:
703703
"@types/cli-progress" "^3.11.0"
704704
ansi-escapes "^4.3.2"
@@ -916,24 +916,22 @@
916916
strip-ansi "6.0.1"
917917
ts-retry-promise "^0.7.0"
918918

919-
"@salesforce/core@^3.32.12", "@salesforce/core@^3.33.6", "@salesforce/core@^3.34.6", "@salesforce/core@^3.34.8":
920-
version "3.34.8"
921-
resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-3.34.8.tgz#01d74a6548ca395502ad61fe6e6e0ddc83f2ad01"
922-
integrity sha512-2BpnyHMzN7NOg/nXEQNxpditMfQ9oKD30wC1IpTbSeS5JxZYYCAdDZkL0CfbtUceJwj/E3/x6oldiW2zQugrVg==
919+
"@salesforce/core@^3.32.12", "@salesforce/core@^3.34.6", "@salesforce/core@^3.34.8", "@salesforce/core@^3.35.0", "@salesforce/core@^3.36.0":
920+
version "3.36.0"
921+
resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-3.36.0.tgz#cbff147d888eee0b921e368c1fdc1a1a3c2eacab"
922+
integrity sha512-LOeSJgozf5B1S8C98/K3afewRsathfEm+HrXxaFXJjITFfIhxqcIDB5xC1cw0VikfRUlq7dQocmVsvezcK0Ghw==
923923
dependencies:
924924
"@salesforce/bunyan" "^2.0.0"
925925
"@salesforce/kit" "^1.9.2"
926926
"@salesforce/schemas" "^1.5.1"
927927
"@salesforce/ts-types" "^1.7.2"
928-
"@types/graceful-fs" "^4.1.6"
929928
"@types/semver" "^7.3.13"
930929
ajv "^8.12.0"
931930
archiver "^5.3.0"
932931
change-case "^4.1.2"
933932
debug "^3.2.7"
934933
faye "^1.4.0"
935934
form-data "^4.0.0"
936-
graceful-fs "^4.2.11"
937935
js2xmlparser "^4.0.1"
938936
jsforce "^2.0.0-beta.21"
939937
jsonwebtoken "9.0.0"
@@ -1038,24 +1036,24 @@
10381036
resolved "https://registry.yarnpkg.com/@salesforce/schemas/-/schemas-1.5.1.tgz#2d1bfdcf593caaa04cd4b3e6fe621097ff7f28fe"
10391037
integrity sha512-MRqU+tn8w5IFvZ0Lm9YKLgxYxr2MQMI+fXXsTrwfUnijsps+ybF9IOTu6MOMxxl2vCUkO8XDjA435wXlWSLI6g==
10401038

1041-
"@salesforce/sf-plugins-core@^2.0.1", "@salesforce/sf-plugins-core@^2.2.7":
1042-
version "2.2.7"
1043-
resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-2.2.7.tgz#dd3d567ef89396b3f414645b986dbddadc6ee342"
1044-
integrity sha512-bwtfYfJbvjrx3Up2fLmqHXgfXWdcI3CFS5D5zQf2wZhc5Ori4jlNMPsW2SP2J3ze50thjX+kLOTKu96AHiW7sA==
1039+
"@salesforce/sf-plugins-core@^2.0.1", "@salesforce/sf-plugins-core@^2.2.7", "@salesforce/sf-plugins-core@^2.4.0":
1040+
version "2.4.0"
1041+
resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-2.4.0.tgz#625aa3601c0ea3c27abba9fe510ded6e9fd82546"
1042+
integrity sha512-IOcWeljHB2byDDIn3J18c4MIURHOJ8fQ0TkKVQ9t3rIITj/I/QOwB2yYloGntFvvsFMnDV3NS+IL+rOuq6iRxg==
10451043
dependencies:
1046-
"@oclif/core" "^2.8.0"
1047-
"@salesforce/core" "^3.34.6"
1048-
"@salesforce/kit" "^1.9.0"
1044+
"@oclif/core" "^2.8.2"
1045+
"@salesforce/core" "^3.35.0"
1046+
"@salesforce/kit" "^1.9.2"
10491047
"@salesforce/ts-types" "^1.7.3"
10501048
chalk "^4"
10511049
inquirer "^8.2.5"
10521050

1053-
"@salesforce/source-deploy-retrieve@^8.0.1":
1054-
version "8.0.1"
1055-
resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-8.0.1.tgz#769d761cf2a3015282ad6a77e103d2a9c1e99052"
1056-
integrity sha512-uXgMwBXaCH0SM93e8Q/ptGc4xi+wna/CO+SFfZHvy3nnlGHi7MQOUNRnAn2L5NzqEg0ZX9HrXpx4ILf4hLFl3w==
1051+
"@salesforce/source-deploy-retrieve@^8.0.1", "@salesforce/source-deploy-retrieve@^8.0.5":
1052+
version "8.0.5"
1053+
resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-8.0.5.tgz#63134afe5c57685e5fae55e3d56a213c354502d5"
1054+
integrity sha512-DPke2fjvLWJl2wj5wjBU0fF+rKqQeJ4CN0BhsPvnluzkvXkRZQWwfWi+c5sH7m75IO97G4dTrPiN25pG2i6TXQ==
10571055
dependencies:
1058-
"@salesforce/core" "^3.34.6"
1056+
"@salesforce/core" "^3.34.8"
10591057
"@salesforce/kit" "^1.9.2"
10601058
"@salesforce/ts-types" "^1.7.2"
10611059
archiver "^5.3.1"
@@ -1292,13 +1290,6 @@
12921290
"@types/minimatch" "*"
12931291
"@types/node" "*"
12941292

1295-
"@types/graceful-fs@^4.1.6":
1296-
version "4.1.6"
1297-
resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.6.tgz#e14b2576a1c25026b7f02ede1de3b84c3a1efeae"
1298-
integrity sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==
1299-
dependencies:
1300-
"@types/node" "*"
1301-
13021293
"@types/http-cache-semantics@*":
13031294
version "4.0.1"
13041295
resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812"
@@ -1459,6 +1450,14 @@
14591450
"@typescript-eslint/types" "5.59.1"
14601451
"@typescript-eslint/visitor-keys" "5.59.1"
14611452

1453+
"@typescript-eslint/[email protected]":
1454+
version "5.59.2"
1455+
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.59.2.tgz#f699fe936ee4e2c996d14f0fdd3a7da5ba7b9a4c"
1456+
integrity sha512-dB1v7ROySwQWKqQ8rEWcdbTsFjh2G0vn8KUyvTXdPoyzSL6lLGkiXEV5CvpJsEe9xIdKV+8Zqb7wif2issoOFA==
1457+
dependencies:
1458+
"@typescript-eslint/types" "5.59.2"
1459+
"@typescript-eslint/visitor-keys" "5.59.2"
1460+
14621461
"@typescript-eslint/[email protected]":
14631462
version "5.59.1"
14641463
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.59.1.tgz#63981d61684fd24eda2f9f08c0a47ecb000a2111"
@@ -1474,6 +1473,11 @@
14741473
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.59.1.tgz#03f3fedd1c044cb336ebc34cc7855f121991f41d"
14751474
integrity sha512-dg0ICB+RZwHlysIy/Dh1SP+gnXNzwd/KS0JprD3Lmgmdq+dJAJnUPe1gNG34p0U19HvRlGX733d/KqscrGC1Pg==
14761475

1476+
"@typescript-eslint/[email protected]":
1477+
version "5.59.2"
1478+
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.59.2.tgz#b511d2b9847fe277c5cb002a2318bd329ef4f655"
1479+
integrity sha512-LbJ/HqoVs2XTGq5shkiKaNTuVv5tTejdHgfdjqRUGdYhjW1crm/M7og2jhVskMt8/4wS3T1+PfFvL1K3wqYj4w==
1480+
14771481
"@typescript-eslint/[email protected]":
14781482
version "5.59.1"
14791483
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.1.tgz#4aa546d27fd0d477c618f0ca00b483f0ec84c43c"
@@ -1487,7 +1491,20 @@
14871491
semver "^7.3.7"
14881492
tsutils "^3.21.0"
14891493

1490-
"@typescript-eslint/[email protected]", "@typescript-eslint/utils@^5.54.1":
1494+
"@typescript-eslint/[email protected]":
1495+
version "5.59.2"
1496+
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.2.tgz#6e2fabd3ba01db5d69df44e0b654c0b051fe9936"
1497+
integrity sha512-+j4SmbwVmZsQ9jEyBMgpuBD0rKwi9RxRpjX71Brr73RsYnEr3Lt5QZ624Bxphp8HUkSKfqGnPJp1kA5nl0Sh7Q==
1498+
dependencies:
1499+
"@typescript-eslint/types" "5.59.2"
1500+
"@typescript-eslint/visitor-keys" "5.59.2"
1501+
debug "^4.3.4"
1502+
globby "^11.1.0"
1503+
is-glob "^4.0.3"
1504+
semver "^7.3.7"
1505+
tsutils "^3.21.0"
1506+
1507+
"@typescript-eslint/[email protected]":
14911508
version "5.59.1"
14921509
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.59.1.tgz#d89fc758ad23d2157cfae53f0b429bdf15db9473"
14931510
integrity sha512-MkTe7FE+K1/GxZkP5gRj3rCztg45bEhsd8HYjczBuYm+qFHP5vtZmjx3B0yUCDotceQ4sHgTyz60Ycl225njmA==
@@ -1501,6 +1518,20 @@
15011518
eslint-scope "^5.1.1"
15021519
semver "^7.3.7"
15031520

1521+
"@typescript-eslint/utils@^5.58.0":
1522+
version "5.59.2"
1523+
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.59.2.tgz#0c45178124d10cc986115885688db6abc37939f4"
1524+
integrity sha512-kSuF6/77TZzyGPhGO4uVp+f0SBoYxCDf+lW3GKhtKru/L8k/Hd7NFQxyWUeY7Z/KGB2C6Fe3yf2vVi4V9TsCSQ==
1525+
dependencies:
1526+
"@eslint-community/eslint-utils" "^4.2.0"
1527+
"@types/json-schema" "^7.0.9"
1528+
"@types/semver" "^7.3.12"
1529+
"@typescript-eslint/scope-manager" "5.59.2"
1530+
"@typescript-eslint/types" "5.59.2"
1531+
"@typescript-eslint/typescript-estree" "5.59.2"
1532+
eslint-scope "^5.1.1"
1533+
semver "^7.3.7"
1534+
15041535
"@typescript-eslint/[email protected]":
15051536
version "5.59.1"
15061537
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.1.tgz#0d96c36efb6560d7fb8eb85de10442c10d8f6058"
@@ -1509,6 +1540,14 @@
15091540
"@typescript-eslint/types" "5.59.1"
15101541
eslint-visitor-keys "^3.3.0"
15111542

1543+
"@typescript-eslint/[email protected]":
1544+
version "5.59.2"
1545+
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.2.tgz#37a419dc2723a3eacbf722512b86d6caf7d3b750"
1546+
integrity sha512-EEpsO8m3RASrKAHI9jpavNv9NlEUebV4qmF1OWxSTtKSFBpC1NCmWazDQHFivRf0O1DV11BA645yrLEVQ0/Lig==
1547+
dependencies:
1548+
"@typescript-eslint/types" "5.59.2"
1549+
eslint-visitor-keys "^3.3.0"
1550+
15121551
15131552
version "1.1.2"
15141553
resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44"
@@ -3179,13 +3218,13 @@ eslint-plugin-prefer-arrow@^1.2.1:
31793218
resolved "https://registry.yarnpkg.com/eslint-plugin-prefer-arrow/-/eslint-plugin-prefer-arrow-1.2.3.tgz#e7fbb3fa4cd84ff1015b9c51ad86550e55041041"
31803219
integrity sha512-J9I5PKCOJretVuiZRGvPQxCbllxGAV/viI20JO3LYblAodofBxyMnZAJ+WGeClHgANnSJberTNoFWWjrWKBuXQ==
31813220

3182-
eslint-plugin-sf-plugin@^1.14.0:
3183-
version "1.14.0"
3184-
resolved "https://registry.yarnpkg.com/eslint-plugin-sf-plugin/-/eslint-plugin-sf-plugin-1.14.0.tgz#6bb25bd107119019e854595249b0c792aac5c3d4"
3185-
integrity sha512-KMgHn0uhml3ZjirCIP6h3e8PtIlN0JnTTOwypq17HJvOvKkb7SDPzCn4ogk/LfOGa0WrTuMGSzRWbrM3lhNydQ==
3221+
eslint-plugin-sf-plugin@^1.15.1:
3222+
version "1.15.1"
3223+
resolved "https://registry.yarnpkg.com/eslint-plugin-sf-plugin/-/eslint-plugin-sf-plugin-1.15.1.tgz#c922cd4825d118fcfcb4b20629d9d65b0d394d89"
3224+
integrity sha512-D2i0EiQfTOjVNPivS2Bib/YsLS+l+QU5i72NT4Lhn4nSCTb5VS19PP7lLjlFlW5ffg552q7li3BMM6Cs75YQgw==
31863225
dependencies:
3187-
"@salesforce/core" "^3.33.6"
3188-
"@typescript-eslint/utils" "^5.54.1"
3226+
"@salesforce/core" "^3.34.6"
3227+
"@typescript-eslint/utils" "^5.58.0"
31893228

31903229
eslint-scope@^5.1.1:
31913230
version "5.1.1"

0 commit comments

Comments
 (0)