@salesforce/core 3.31.8 → 3.31.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -218,6 +218,9 @@ const checkOrgDoesntExist = async (scratchOrgInfo) => {
|
|
|
218
218
|
* @returns {Promise<SaveResult>}
|
|
219
219
|
*/
|
|
220
220
|
const requestScratchOrgCreation = async (hubOrg, scratchOrgRequest, settings) => {
|
|
221
|
+
if (!hubOrg.isDevHubOrg()) {
|
|
222
|
+
throw messages.createError('hubOrgIsNotDevHub', [hubOrg.getUsername(), hubOrg.getOrgId()]);
|
|
223
|
+
}
|
|
221
224
|
// If these were present, they were already used to initialize the scratchOrgSettingsGenerator.
|
|
222
225
|
// They shouldn't be submitted as part of the scratchOrgInfo.
|
|
223
226
|
delete scratchOrgRequest.settings;
|
package/lib/sfProject.js
CHANGED
|
@@ -501,7 +501,15 @@ class SfProject {
|
|
|
501
501
|
*/
|
|
502
502
|
getPackageFromPath(path) {
|
|
503
503
|
const packageDirs = this.getPackageDirectories();
|
|
504
|
-
|
|
504
|
+
// resolve the given path
|
|
505
|
+
const fullPath = (0, path_1.resolve)(path);
|
|
506
|
+
const match = packageDirs.find((packageDir) => {
|
|
507
|
+
// fullPath will not have a trailing slash, so remove it from packageDir.fullPath, if it exists
|
|
508
|
+
const fullPathSansTrailingSep = packageDir.fullPath.replace(/(\\|\/)$/, '');
|
|
509
|
+
return ((0, path_1.basename)(path) === packageDir.path ||
|
|
510
|
+
fullPath === fullPathSansTrailingSep ||
|
|
511
|
+
fullPath.includes(packageDir.fullPath));
|
|
512
|
+
});
|
|
505
513
|
return match;
|
|
506
514
|
}
|
|
507
515
|
/**
|
|
@@ -13,3 +13,7 @@ We've deprecated OrgPreferences. Update the scratch org definition file to repla
|
|
|
13
13
|
# SourceStatusResetFailureError
|
|
14
14
|
|
|
15
15
|
Successfully created org with ID: %s and name: %s. Unfortunately, source tracking isn’t working as expected. If you run force:source:status, the results may be incorrect. Try again by creating another scratch org.
|
|
16
|
+
|
|
17
|
+
# hubOrgIsNotDevHub
|
|
18
|
+
|
|
19
|
+
Make sure that the org with username %s and ID %s is enabled as a Dev Hub. To enable it, open the org in your browser, navigate to the Dev Hub page in Setup, and click Enable.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/core",
|
|
3
|
-
"version": "3.31.
|
|
3
|
+
"version": "3.31.10",
|
|
4
4
|
"description": "Core libraries to interact with SFDX projects, orgs, and APIs.",
|
|
5
5
|
"main": "lib/exported",
|
|
6
6
|
"types": "lib/exported.d.ts",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@salesforce/bunyan": "^2.0.0",
|
|
38
38
|
"@salesforce/kit": "^1.7.0",
|
|
39
39
|
"@salesforce/schemas": "^1.1.0",
|
|
40
|
-
"@salesforce/ts-types": "^1.5.
|
|
40
|
+
"@salesforce/ts-types": "^1.5.21",
|
|
41
41
|
"@types/graceful-fs": "^4.1.5",
|
|
42
42
|
"@types/semver": "^7.3.9",
|
|
43
43
|
"ajv": "^8.11.0",
|