@salesforce/core 3.33.0 → 3.33.1
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.
- package/lib/org/org.d.ts +7 -1
- package/lib/org/org.js +21 -1
- package/package.json +4 -4
package/lib/org/org.d.ts
CHANGED
|
@@ -182,7 +182,7 @@ export declare class Org extends AsyncOptionalCreatable<Org.Options> {
|
|
|
182
182
|
*/
|
|
183
183
|
retrieveOrgUsersConfig(): Promise<OrgUsersConfig>;
|
|
184
184
|
/**
|
|
185
|
-
* Cleans up all org related artifacts including users, sandbox config(if a sandbox and auth file.
|
|
185
|
+
* Cleans up all org related artifacts including users, sandbox config (if a sandbox), source tracking files, and auth file.
|
|
186
186
|
*
|
|
187
187
|
* @param throwWhenRemoveFails Determines if the call should throw an error or fail silently.
|
|
188
188
|
*/
|
|
@@ -468,6 +468,12 @@ export declare class Org extends AsyncOptionalCreatable<Org.Options> {
|
|
|
468
468
|
*/
|
|
469
469
|
private sandboxSignupComplete;
|
|
470
470
|
private validateWaitOptions;
|
|
471
|
+
/**
|
|
472
|
+
* removes source tracking files hosted in the project/.sf/orgs/<org id>/
|
|
473
|
+
*
|
|
474
|
+
* @private
|
|
475
|
+
*/
|
|
476
|
+
private removeSourceTrackingFiles;
|
|
471
477
|
}
|
|
472
478
|
export declare namespace Org {
|
|
473
479
|
/**
|
package/lib/org/org.js
CHANGED
|
@@ -246,7 +246,7 @@ class Org extends kit_1.AsyncOptionalCreatable {
|
|
|
246
246
|
return orgUsersConfig_1.OrgUsersConfig.create(orgUsersConfig_1.OrgUsersConfig.getOptions(this.getOrgId()));
|
|
247
247
|
}
|
|
248
248
|
/**
|
|
249
|
-
* Cleans up all org related artifacts including users, sandbox config(if a sandbox and auth file.
|
|
249
|
+
* Cleans up all org related artifacts including users, sandbox config (if a sandbox), source tracking files, and auth file.
|
|
250
250
|
*
|
|
251
251
|
* @param throwWhenRemoveFails Determines if the call should throw an error or fail silently.
|
|
252
252
|
*/
|
|
@@ -264,6 +264,7 @@ class Org extends kit_1.AsyncOptionalCreatable {
|
|
|
264
264
|
//
|
|
265
265
|
// So, just in case no users are added to this org we will try the remove again.
|
|
266
266
|
await this.removeAuth();
|
|
267
|
+
await this.removeSourceTrackingFiles();
|
|
267
268
|
}
|
|
268
269
|
/**
|
|
269
270
|
* Check if org is a sandbox org by checking its SandboxOrgConfig.
|
|
@@ -1176,6 +1177,25 @@ class Org extends kit_1.AsyncOptionalCreatable {
|
|
|
1176
1177
|
pollInterval = pollInterval.seconds > wait.seconds ? wait : pollInterval;
|
|
1177
1178
|
return [wait, pollInterval];
|
|
1178
1179
|
}
|
|
1180
|
+
/**
|
|
1181
|
+
* removes source tracking files hosted in the project/.sf/orgs/<org id>/
|
|
1182
|
+
*
|
|
1183
|
+
* @private
|
|
1184
|
+
*/
|
|
1185
|
+
async removeSourceTrackingFiles() {
|
|
1186
|
+
try {
|
|
1187
|
+
const rootFolder = await config_1.Config.resolveRootFolder(false);
|
|
1188
|
+
await fs.promises.rm((0, path_1.join)(rootFolder, global_1.Global.SF_STATE_FOLDER, 'orgs', this.getOrgId()), {
|
|
1189
|
+
recursive: true,
|
|
1190
|
+
force: true,
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1193
|
+
catch (e) {
|
|
1194
|
+
const err = sfError_1.SfError.wrap(e);
|
|
1195
|
+
// consume the error in case something went wrong
|
|
1196
|
+
this.logger.debug(`error deleting source tracking information for ${this.getOrgId()} error: ${err.message}`);
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1179
1199
|
}
|
|
1180
1200
|
exports.Org = Org;
|
|
1181
1201
|
(function (Org) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/core",
|
|
3
|
-
"version": "3.33.
|
|
3
|
+
"version": "3.33.1",
|
|
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",
|
|
@@ -69,10 +69,10 @@
|
|
|
69
69
|
"chai": "^4.3.7",
|
|
70
70
|
"chai-string": "^1.5.0",
|
|
71
71
|
"commitizen": "^3.1.2",
|
|
72
|
-
"eslint": "^8.
|
|
73
|
-
"eslint-config-prettier": "^8.
|
|
72
|
+
"eslint": "^8.32.0",
|
|
73
|
+
"eslint-config-prettier": "^8.6.0",
|
|
74
74
|
"eslint-config-salesforce": "^1.1.0",
|
|
75
|
-
"eslint-config-salesforce-license": "^0.
|
|
75
|
+
"eslint-config-salesforce-license": "^0.2.0",
|
|
76
76
|
"eslint-config-salesforce-typescript": "^1.1.1",
|
|
77
77
|
"eslint-plugin-header": "^3.1.1",
|
|
78
78
|
"eslint-plugin-import": "^2.26.0",
|