@salesforce/core-bundle 8.16.0 → 8.18.0
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/index.d.ts +78 -1
- package/lib/index.js +184 -7
- package/messages/org.md +16 -0
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -1698,6 +1698,7 @@ declare module '@salesforce/core-bundle/index' {
|
|
|
1698
1698
|
export { ScratchOrgCache } from '@salesforce/core-bundle/org/scratchOrgCache';
|
|
1699
1699
|
export { default as ScratchOrgSettingsGenerator } from '@salesforce/core-bundle/org/scratchOrgSettingsGenerator';
|
|
1700
1700
|
export * from '@salesforce/core-bundle/util/sfdc';
|
|
1701
|
+
export * from '@salesforce/core-bundle/util/mutex';
|
|
1701
1702
|
export * from '@salesforce/core-bundle/testSetup';
|
|
1702
1703
|
|
|
1703
1704
|
}
|
|
@@ -2666,6 +2667,8 @@ declare module '@salesforce/core-bundle/org/authInfo' {
|
|
|
2666
2667
|
getFields(decrypt?: boolean): Readonly<AuthFields>;
|
|
2667
2668
|
/**
|
|
2668
2669
|
* Get the org front door (used for web based oauth flows)
|
|
2670
|
+
*
|
|
2671
|
+
* @deprecated Will be removed in the next major version. Use the `Org.getFrontDoorUrl()` method instead.
|
|
2669
2672
|
*/
|
|
2670
2673
|
getOrgFrontDoorUrl(): string;
|
|
2671
2674
|
/**
|
|
@@ -3224,6 +3227,39 @@ declare module '@salesforce/core-bundle/org/org' {
|
|
|
3224
3227
|
* @ignore
|
|
3225
3228
|
*/
|
|
3226
3229
|
constructor(options?: Org.Options);
|
|
3230
|
+
/**
|
|
3231
|
+
* Generate a URL to a metadata UI builder/setup section in an org.
|
|
3232
|
+
*
|
|
3233
|
+
* Bot: open in Agentforce Builder
|
|
3234
|
+
* ApexPage: opens page
|
|
3235
|
+
* Flow: open in Flow Builder
|
|
3236
|
+
* FlexiPage: open in Lightning App Builder
|
|
3237
|
+
* CustomObject: open in Object Manager
|
|
3238
|
+
* ApexClass: open in Setup -> Apex Classes UI
|
|
3239
|
+
*
|
|
3240
|
+
* if you pass any other metadata type you'll get a path to Lightning App Builder
|
|
3241
|
+
*
|
|
3242
|
+
* @example
|
|
3243
|
+
* // use SDR resolver:
|
|
3244
|
+
* import { MetadataResolver } from '@salesforce/source-deploy-retrieve';
|
|
3245
|
+
*
|
|
3246
|
+
* const metadataResolver = new MetadataResolver();
|
|
3247
|
+
* const components = metadataResolver.getComponentsFromPath(filePath);
|
|
3248
|
+
* const typeName = components[0]?.type?.name;
|
|
3249
|
+
*
|
|
3250
|
+
* const metadataBuilderUrl = await org.getMetadataUIURL(typeName, filePath);
|
|
3251
|
+
*
|
|
3252
|
+
* @typeName Bot | ApexPage | Flow | FlexiPage | CustomObject | ApexClass
|
|
3253
|
+
* @file Absolute file path to the metadata file
|
|
3254
|
+
*/
|
|
3255
|
+
getMetadataUIURL(typeName: string, file: string): Promise<string>;
|
|
3256
|
+
/**
|
|
3257
|
+
* Get a Frontdoor URL
|
|
3258
|
+
*
|
|
3259
|
+
* This uses the UI Bridge API to generate a single-use Frontdoor URL:
|
|
3260
|
+
* https://help.salesforce.com/s/articleView?id=xcloud.frontdoor_singleaccess.htm&type=5
|
|
3261
|
+
*/
|
|
3262
|
+
getFrontDoorUrl(redirectUri?: string): Promise<string>;
|
|
3227
3263
|
/**
|
|
3228
3264
|
* create a sandbox from a production org
|
|
3229
3265
|
* 'this' needs to be a production org with sandbox licenses available
|
|
@@ -6387,11 +6423,52 @@ declare module '@salesforce/core-bundle/util/mapKeys' {
|
|
|
6387
6423
|
}
|
|
6388
6424
|
declare module '@salesforce/core-bundle/util/mutex' {
|
|
6389
6425
|
/**
|
|
6390
|
-
*
|
|
6426
|
+
* A mutual exclusion (mutex) class that ensures only one asynchronous operation
|
|
6427
|
+
* can execute at a time, providing thread-safe execution of critical sections.
|
|
6428
|
+
*
|
|
6429
|
+
* @example
|
|
6430
|
+
* ```typescript
|
|
6431
|
+
* const mutex = new Mutex();
|
|
6432
|
+
*
|
|
6433
|
+
* // Only one of these will execute at a time
|
|
6434
|
+
* mutex.lock(async () => {
|
|
6435
|
+
* // Critical section code here
|
|
6436
|
+
* return someAsyncOperation();
|
|
6437
|
+
* });
|
|
6438
|
+
* ```
|
|
6391
6439
|
*/
|
|
6392
6440
|
export class Mutex {
|
|
6441
|
+
/**
|
|
6442
|
+
* Internal promise chain that maintains the mutex state.
|
|
6443
|
+
* Each new lock acquisition is chained to this promise.
|
|
6444
|
+
*
|
|
6445
|
+
* @private
|
|
6446
|
+
*/
|
|
6393
6447
|
private mutex;
|
|
6448
|
+
/**
|
|
6449
|
+
* Acquires the mutex lock and executes the provided function.
|
|
6450
|
+
* The function will not execute until all previously queued operations complete.
|
|
6451
|
+
*
|
|
6452
|
+
* @template T - The return type of the function
|
|
6453
|
+
* @param fn - The function to execute while holding the mutex lock. Can be synchronous or asynchronous.
|
|
6454
|
+
* @returns A promise that resolves with the result of the function execution
|
|
6455
|
+
*
|
|
6456
|
+
* @example
|
|
6457
|
+
* ```typescript
|
|
6458
|
+
* const result = await mutex.lock(async () => {
|
|
6459
|
+
* // This code is guaranteed to run exclusively
|
|
6460
|
+
* return await someAsyncOperation();
|
|
6461
|
+
* });
|
|
6462
|
+
* ```
|
|
6463
|
+
*/
|
|
6394
6464
|
lock<T>(fn: () => Promise<T> | T): Promise<T>;
|
|
6465
|
+
/**
|
|
6466
|
+
* Acquires the mutex by waiting for the current promise chain to resolve
|
|
6467
|
+
* and returns a release function to unlock the mutex.
|
|
6468
|
+
*
|
|
6469
|
+
* @private
|
|
6470
|
+
* @returns A promise that resolves to a function that releases the mutex lock
|
|
6471
|
+
*/
|
|
6395
6472
|
private acquire;
|
|
6396
6473
|
}
|
|
6397
6474
|
|
package/lib/index.js
CHANGED
|
@@ -12336,7 +12336,7 @@ var require_package2 = __commonJS({
|
|
|
12336
12336
|
"package.json"(exports2, module2) {
|
|
12337
12337
|
module2.exports = {
|
|
12338
12338
|
name: "@salesforce/core-bundle",
|
|
12339
|
-
version: "8.
|
|
12339
|
+
version: "8.18.0",
|
|
12340
12340
|
description: "Core libraries to interact with SFDX projects, orgs, and APIs.",
|
|
12341
12341
|
main: "lib/index",
|
|
12342
12342
|
types: "lib/index.d.ts",
|
|
@@ -12373,7 +12373,7 @@ var require_package2 = __commonJS({
|
|
|
12373
12373
|
"messageTransformer/messageTransformer.ts"
|
|
12374
12374
|
],
|
|
12375
12375
|
dependencies: {
|
|
12376
|
-
"@jsforce/jsforce-node": "^3.
|
|
12376
|
+
"@jsforce/jsforce-node": "^3.9.1",
|
|
12377
12377
|
"@salesforce/kit": "^3.2.2",
|
|
12378
12378
|
"@salesforce/schemas": "^1.9.0",
|
|
12379
12379
|
"@salesforce/ts-types": "^2.0.10",
|
|
@@ -15858,7 +15858,29 @@ var require_mutex = __commonJS({
|
|
|
15858
15858
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
15859
15859
|
exports2.Mutex = void 0;
|
|
15860
15860
|
var Mutex = class {
|
|
15861
|
+
/**
|
|
15862
|
+
* Internal promise chain that maintains the mutex state.
|
|
15863
|
+
* Each new lock acquisition is chained to this promise.
|
|
15864
|
+
*
|
|
15865
|
+
* @private
|
|
15866
|
+
*/
|
|
15861
15867
|
mutex = Promise.resolve();
|
|
15868
|
+
/**
|
|
15869
|
+
* Acquires the mutex lock and executes the provided function.
|
|
15870
|
+
* The function will not execute until all previously queued operations complete.
|
|
15871
|
+
*
|
|
15872
|
+
* @template T - The return type of the function
|
|
15873
|
+
* @param fn - The function to execute while holding the mutex lock. Can be synchronous or asynchronous.
|
|
15874
|
+
* @returns A promise that resolves with the result of the function execution
|
|
15875
|
+
*
|
|
15876
|
+
* @example
|
|
15877
|
+
* ```typescript
|
|
15878
|
+
* const result = await mutex.lock(async () => {
|
|
15879
|
+
* // This code is guaranteed to run exclusively
|
|
15880
|
+
* return await someAsyncOperation();
|
|
15881
|
+
* });
|
|
15882
|
+
* ```
|
|
15883
|
+
*/
|
|
15862
15884
|
async lock(fn) {
|
|
15863
15885
|
const unlock = await this.acquire();
|
|
15864
15886
|
try {
|
|
@@ -15867,6 +15889,13 @@ var require_mutex = __commonJS({
|
|
|
15867
15889
|
unlock();
|
|
15868
15890
|
}
|
|
15869
15891
|
}
|
|
15892
|
+
/**
|
|
15893
|
+
* Acquires the mutex by waiting for the current promise chain to resolve
|
|
15894
|
+
* and returns a release function to unlock the mutex.
|
|
15895
|
+
*
|
|
15896
|
+
* @private
|
|
15897
|
+
* @returns A promise that resolves to a function that releases the mutex lock
|
|
15898
|
+
*/
|
|
15870
15899
|
async acquire() {
|
|
15871
15900
|
let release;
|
|
15872
15901
|
const promise = new Promise((resolve) => {
|
|
@@ -33107,7 +33136,7 @@ var require_VERSION = __commonJS({
|
|
|
33107
33136
|
"node_modules/@jsforce/jsforce-node/lib/VERSION.js"(exports2) {
|
|
33108
33137
|
"use strict";
|
|
33109
33138
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
33110
|
-
exports2.default = "3.
|
|
33139
|
+
exports2.default = "3.9.1";
|
|
33111
33140
|
}
|
|
33112
33141
|
});
|
|
33113
33142
|
|
|
@@ -46282,6 +46311,49 @@ var require_connection = __commonJS({
|
|
|
46282
46311
|
* @param options
|
|
46283
46312
|
*/
|
|
46284
46313
|
async upsert(type2, records, extIdField, options = {}) {
|
|
46314
|
+
return Array.isArray(records) ? (
|
|
46315
|
+
// check the version whether SObject collection API is supported (46.0)
|
|
46316
|
+
this._ensureVersion(46) ? this._upsertMany(type2, records, extIdField, options) : this._upsertParallel(type2, records, extIdField, options)
|
|
46317
|
+
) : this._upsertParallel(type2, records, extIdField, options);
|
|
46318
|
+
}
|
|
46319
|
+
/** @private */
|
|
46320
|
+
async _upsertMany(type2, records, extIdField, options = {}) {
|
|
46321
|
+
if (records.length === 0) {
|
|
46322
|
+
return [];
|
|
46323
|
+
}
|
|
46324
|
+
if (records.length > MAX_DML_COUNT && options.allowRecursive) {
|
|
46325
|
+
return [
|
|
46326
|
+
...await this._upsertMany(type2, records.slice(0, MAX_DML_COUNT), extIdField, options),
|
|
46327
|
+
...await this._upsertMany(type2, records.slice(MAX_DML_COUNT), extIdField, options)
|
|
46328
|
+
];
|
|
46329
|
+
}
|
|
46330
|
+
const _records = records.map((recordItem) => {
|
|
46331
|
+
const { [extIdField]: extId, type: recordType, attributes, ...rec } = recordItem;
|
|
46332
|
+
const sobjectType = recordType || attributes?.type || type2;
|
|
46333
|
+
if (!extId) {
|
|
46334
|
+
throw new Error("External ID is not found in record.");
|
|
46335
|
+
}
|
|
46336
|
+
if (!sobjectType) {
|
|
46337
|
+
throw new Error("No SObject Type defined in record");
|
|
46338
|
+
}
|
|
46339
|
+
return { [extIdField]: extId, attributes: { type: sobjectType }, ...rec };
|
|
46340
|
+
});
|
|
46341
|
+
const url = [this._baseUrl(), "composite", "sobjects", type2, extIdField].join("/");
|
|
46342
|
+
return this.request({
|
|
46343
|
+
method: "PATCH",
|
|
46344
|
+
url,
|
|
46345
|
+
body: JSON.stringify({
|
|
46346
|
+
allOrNone: options.allOrNone || false,
|
|
46347
|
+
records: _records
|
|
46348
|
+
}),
|
|
46349
|
+
headers: {
|
|
46350
|
+
...options.headers || {},
|
|
46351
|
+
"content-type": "application/json"
|
|
46352
|
+
}
|
|
46353
|
+
});
|
|
46354
|
+
}
|
|
46355
|
+
/** @private */
|
|
46356
|
+
async _upsertParallel(type2, records, extIdField, options = {}) {
|
|
46285
46357
|
const isArray = Array.isArray(records);
|
|
46286
46358
|
const _records = Array.isArray(records) ? records : [records];
|
|
46287
46359
|
if (_records.length > this._maxRequest) {
|
|
@@ -107787,10 +107859,13 @@ var require_org = __commonJS({
|
|
|
107787
107859
|
__setModuleDefault2(result, mod);
|
|
107788
107860
|
return result;
|
|
107789
107861
|
};
|
|
107862
|
+
var __importDefault3 = exports2 && exports2.__importDefault || function(mod) {
|
|
107863
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
107864
|
+
};
|
|
107790
107865
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
107791
107866
|
exports2.Org = exports2.SandboxEvents = exports2.OrgTypes = void 0;
|
|
107792
107867
|
exports2.sandboxIsResumable = sandboxIsResumable;
|
|
107793
|
-
var node_path_1 = require("node:path");
|
|
107868
|
+
var node_path_1 = __importDefault3(require("node:path"));
|
|
107794
107869
|
var fs = __importStar2(require("node:fs"));
|
|
107795
107870
|
var kit_1 = require_lib2();
|
|
107796
107871
|
var ts_types_1 = require_lib();
|
|
@@ -107810,7 +107885,7 @@ var require_org = __commonJS({
|
|
|
107810
107885
|
var authInfo_12 = require_authInfo();
|
|
107811
107886
|
var scratchOrgCreate_12 = require_scratchOrgCreate();
|
|
107812
107887
|
var orgConfigProperties_12 = require_orgConfigProperties();
|
|
107813
|
-
var messages = new messages_12.Messages("@salesforce/core-bundle", "org", /* @__PURE__ */ new Map([["notADevHub", "The provided dev hub username %s is not a valid dev hub."], ["noUsernameFound", "No username found."], ["noDevHubFound", "Unable to associate this scratch org with a DevHub."], ["deleteOrgHubError", "The Dev Hub org cannot be deleted."], ["insufficientAccessToDelete", "You do not have the appropriate permissions to delete a scratch org. Please contact your Salesforce admin."], ["scratchOrgNotFound", "Attempting to delete an expired or deleted org"], ["sandboxDeleteFailed", "The sandbox org deletion failed with a result of %s."], ["sandboxNotFound", "We can't find a SandboxProcess for the sandbox %s."], ["sandboxInfoCreateFailed", "The sandbox org creation failed with a result of %s."], ["sandboxInfoRefreshFailed", "The sandbox org refresh failed with a result of %s."], ["missingAuthUsername", "The sandbox %s does not have an authorized username."], ["orgPollingTimeout", "Sandbox status is %s; timed out waiting for completion."], ["NotFoundOnDevHub", "The scratch org does not belong to the dev hub username %s."], ["AuthInfoOrgIdUndefined", "AuthInfo orgId is undefined."], ["sandboxCreateNotComplete", "The sandbox creation has not completed."], ["SandboxProcessNotFoundBySandboxName", "We can't find a SandboxProcess with the SandboxName %s."], ["MultiSandboxProcessNotFoundBySandboxName", "We found more than one SandboxProcess with the SandboxName %s."], ["sandboxNotResumable", "The sandbox %s cannot resume with status of %s."]]));
|
|
107888
|
+
var messages = new messages_12.Messages("@salesforce/core-bundle", "org", /* @__PURE__ */ new Map([["notADevHub", "The provided dev hub username %s is not a valid dev hub."], ["noUsernameFound", "No username found."], ["noDevHubFound", "Unable to associate this scratch org with a DevHub."], ["deleteOrgHubError", "The Dev Hub org cannot be deleted."], ["insufficientAccessToDelete", "You do not have the appropriate permissions to delete a scratch org. Please contact your Salesforce admin."], ["scratchOrgNotFound", "Attempting to delete an expired or deleted org"], ["sandboxDeleteFailed", "The sandbox org deletion failed with a result of %s."], ["sandboxNotFound", "We can't find a SandboxProcess for the sandbox %s."], ["sandboxInfoCreateFailed", "The sandbox org creation failed with a result of %s."], ["sandboxInfoRefreshFailed", "The sandbox org refresh failed with a result of %s."], ["missingAuthUsername", "The sandbox %s does not have an authorized username."], ["orgPollingTimeout", "Sandbox status is %s; timed out waiting for completion."], ["NotFoundOnDevHub", "The scratch org does not belong to the dev hub username %s."], ["AuthInfoOrgIdUndefined", "AuthInfo orgId is undefined."], ["sandboxCreateNotComplete", "The sandbox creation has not completed."], ["SandboxProcessNotFoundBySandboxName", "We can't find a SandboxProcess with the SandboxName %s."], ["MultiSandboxProcessNotFoundBySandboxName", "We found more than one SandboxProcess with the SandboxName %s."], ["sandboxNotResumable", "The sandbox %s cannot resume with status of %s."], ["FrontdoorURLError", "Failed to generate a frontdoor URL."], ["FlowIdNotFound", "ID not found for Flow %s."], ["CustomObjectIdNotFound", "ID not found for custom object %s."], ["ApexClassIdNotFound", "ID not found for Apex class %s."]]));
|
|
107814
107889
|
var OrgTypes;
|
|
107815
107890
|
(function(OrgTypes2) {
|
|
107816
107891
|
OrgTypes2["Scratch"] = "scratch";
|
|
@@ -107877,6 +107952,105 @@ var require_org = __commonJS({
|
|
|
107877
107952
|
super(options);
|
|
107878
107953
|
this.options = options ?? {};
|
|
107879
107954
|
}
|
|
107955
|
+
/**
|
|
107956
|
+
* Generate a URL to a metadata UI builder/setup section in an org.
|
|
107957
|
+
*
|
|
107958
|
+
* Bot: open in Agentforce Builder
|
|
107959
|
+
* ApexPage: opens page
|
|
107960
|
+
* Flow: open in Flow Builder
|
|
107961
|
+
* FlexiPage: open in Lightning App Builder
|
|
107962
|
+
* CustomObject: open in Object Manager
|
|
107963
|
+
* ApexClass: open in Setup -> Apex Classes UI
|
|
107964
|
+
*
|
|
107965
|
+
* if you pass any other metadata type you'll get a path to Lightning App Builder
|
|
107966
|
+
*
|
|
107967
|
+
* @example
|
|
107968
|
+
* // use SDR resolver:
|
|
107969
|
+
* import { MetadataResolver } from '@salesforce/source-deploy-retrieve';
|
|
107970
|
+
*
|
|
107971
|
+
* const metadataResolver = new MetadataResolver();
|
|
107972
|
+
* const components = metadataResolver.getComponentsFromPath(filePath);
|
|
107973
|
+
* const typeName = components[0]?.type?.name;
|
|
107974
|
+
*
|
|
107975
|
+
* const metadataBuilderUrl = await org.getMetadataUIURL(typeName, filePath);
|
|
107976
|
+
*
|
|
107977
|
+
* @typeName Bot | ApexPage | Flow | FlexiPage | CustomObject | ApexClass
|
|
107978
|
+
* @file Absolute file path to the metadata file
|
|
107979
|
+
*/
|
|
107980
|
+
async getMetadataUIURL(typeName, file) {
|
|
107981
|
+
const botFileNameToId = async (conn, filePath) => (await conn.singleRecordQuery(`SELECT id FROM BotDefinition WHERE DeveloperName='${node_path_1.default.basename(filePath, ".bot-meta.xml")}'`)).Id;
|
|
107982
|
+
const flexiPageFilenameToId = async (conn, filePath) => (await conn.singleRecordQuery(`SELECT id FROM flexipage WHERE DeveloperName='${node_path_1.default.basename(filePath, ".flexipage-meta.xml")}'`, { tooling: true })).Id;
|
|
107983
|
+
const flowFileNameToId = async (conn, filePath) => {
|
|
107984
|
+
try {
|
|
107985
|
+
const flow = await conn.singleRecordQuery(`SELECT DurableId FROM FlowVersionView WHERE FlowDefinitionView.ApiName = '${node_path_1.default.basename(filePath, ".flow-meta.xml")}' ORDER BY VersionNumber DESC LIMIT 1`);
|
|
107986
|
+
return flow.DurableId;
|
|
107987
|
+
} catch (error) {
|
|
107988
|
+
throw messages.createError("FlowIdNotFound", [filePath]);
|
|
107989
|
+
}
|
|
107990
|
+
};
|
|
107991
|
+
const customObjectFileNameToId = async (conn, filePath) => {
|
|
107992
|
+
try {
|
|
107993
|
+
const customObject = await conn.singleRecordQuery(`SELECT Id FROM CustomObject WHERE DeveloperName = '${node_path_1.default.basename(filePath.replace(/__c/g, ""), ".object-meta.xml")}'`, {
|
|
107994
|
+
tooling: true
|
|
107995
|
+
});
|
|
107996
|
+
return customObject.Id;
|
|
107997
|
+
} catch (error) {
|
|
107998
|
+
throw messages.createError("CustomObjectIdNotFound", [filePath]);
|
|
107999
|
+
}
|
|
108000
|
+
};
|
|
108001
|
+
const apexClassFileNameToId = async (conn, filePath) => {
|
|
108002
|
+
try {
|
|
108003
|
+
const apexClass = await conn.singleRecordQuery(`SELECT Id FROM ApexClass WHERE Name = '${node_path_1.default.basename(filePath, ".cls")}'`, {
|
|
108004
|
+
tooling: true
|
|
108005
|
+
});
|
|
108006
|
+
return apexClass.Id;
|
|
108007
|
+
} catch (error) {
|
|
108008
|
+
throw messages.createError("ApexClassIdNotFound", [filePath]);
|
|
108009
|
+
}
|
|
108010
|
+
};
|
|
108011
|
+
let redirectUri = "";
|
|
108012
|
+
switch (typeName) {
|
|
108013
|
+
case "ApexClass":
|
|
108014
|
+
redirectUri = `lightning/setup/ApexClasses/page?address=%2F${await apexClassFileNameToId(this.connection, file)}`;
|
|
108015
|
+
break;
|
|
108016
|
+
case "CustomObject":
|
|
108017
|
+
redirectUri = `lightning/setup/ObjectManager/${await customObjectFileNameToId(this.connection, file)}/Details/view`;
|
|
108018
|
+
break;
|
|
108019
|
+
case "Bot":
|
|
108020
|
+
redirectUri = `/AiCopilot/copilotStudio.app#/copilot/builder?copilotId=${await botFileNameToId(this.connection, file)}`;
|
|
108021
|
+
break;
|
|
108022
|
+
case "ApexPage":
|
|
108023
|
+
redirectUri = `/apex/${node_path_1.default.basename(file).replace(".page-meta.xml", "").replace(".page", "")}`;
|
|
108024
|
+
break;
|
|
108025
|
+
case "Flow":
|
|
108026
|
+
redirectUri = `/builder_platform_interaction/flowBuilder.app?flowId=${await flowFileNameToId(this.connection, file)}`;
|
|
108027
|
+
break;
|
|
108028
|
+
case "FlexiPage":
|
|
108029
|
+
redirectUri = `/visualEditor/appBuilder.app?pageId=${await flexiPageFilenameToId(this.connection, file)}`;
|
|
108030
|
+
break;
|
|
108031
|
+
default:
|
|
108032
|
+
redirectUri = "/lightning/setup/FlexiPageList/home";
|
|
108033
|
+
break;
|
|
108034
|
+
}
|
|
108035
|
+
return this.getFrontDoorUrl(redirectUri);
|
|
108036
|
+
}
|
|
108037
|
+
/**
|
|
108038
|
+
* Get a Frontdoor URL
|
|
108039
|
+
*
|
|
108040
|
+
* This uses the UI Bridge API to generate a single-use Frontdoor URL:
|
|
108041
|
+
* https://help.salesforce.com/s/articleView?id=xcloud.frontdoor_singleaccess.htm&type=5
|
|
108042
|
+
*/
|
|
108043
|
+
async getFrontDoorUrl(redirectUri) {
|
|
108044
|
+
await this.refreshAuth();
|
|
108045
|
+
const singleAccessUrl = new URL("/services/oauth2/singleaccess", this.connection.instanceUrl);
|
|
108046
|
+
if (redirectUri) {
|
|
108047
|
+
singleAccessUrl.searchParams.append("redirect_uri", redirectUri);
|
|
108048
|
+
}
|
|
108049
|
+
const response = await this.connection.requestGet(singleAccessUrl.toString());
|
|
108050
|
+
if (response.frontdoor_uri)
|
|
108051
|
+
return response.frontdoor_uri;
|
|
108052
|
+
throw new sfError_12.SfError(messages.getMessage("FrontdoorURLError")).setData(response);
|
|
108053
|
+
}
|
|
107880
108054
|
/**
|
|
107881
108055
|
* create a sandbox from a production org
|
|
107882
108056
|
* 'this' needs to be a production org with sandbox licenses available
|
|
@@ -108600,7 +108774,7 @@ var require_org = __commonJS({
|
|
|
108600
108774
|
}
|
|
108601
108775
|
async getLocalDataDir(orgDataPath) {
|
|
108602
108776
|
const rootFolder = await config_12.Config.resolveRootFolder(false);
|
|
108603
|
-
return
|
|
108777
|
+
return node_path_1.default.join(rootFolder, global_12.Global.SFDX_STATE_FOLDER, orgDataPath ? orgDataPath : "orgs");
|
|
108604
108778
|
}
|
|
108605
108779
|
/**
|
|
108606
108780
|
* Gets the sandboxProcessObject and then polls for it to complete.
|
|
@@ -108978,7 +109152,7 @@ var require_org = __commonJS({
|
|
|
108978
109152
|
async removeSourceTrackingFiles() {
|
|
108979
109153
|
try {
|
|
108980
109154
|
const rootFolder = await config_12.Config.resolveRootFolder(false);
|
|
108981
|
-
await fs.promises.rm(
|
|
109155
|
+
await fs.promises.rm(node_path_1.default.join(rootFolder, global_12.Global.SF_STATE_FOLDER, "orgs", this.getOrgId()), {
|
|
108982
109156
|
recursive: true,
|
|
108983
109157
|
force: true
|
|
108984
109158
|
});
|
|
@@ -109491,6 +109665,8 @@ var require_authInfo = __commonJS({
|
|
|
109491
109665
|
}
|
|
109492
109666
|
/**
|
|
109493
109667
|
* Get the org front door (used for web based oauth flows)
|
|
109668
|
+
*
|
|
109669
|
+
* @deprecated Will be removed in the next major version. Use the `Org.getFrontDoorUrl()` method instead.
|
|
109494
109670
|
*/
|
|
109495
109671
|
getOrgFrontDoorUrl() {
|
|
109496
109672
|
const authFields = this.getFields(true);
|
|
@@ -123365,6 +123541,7 @@ Object.defineProperty(exports, "ScratchOrgSettingsGenerator", { enumerable: true
|
|
|
123365
123541
|
return __importDefault2(scratchOrgSettingsGenerator_1).default;
|
|
123366
123542
|
} });
|
|
123367
123543
|
__exportStar2(require_sfdc(), exports);
|
|
123544
|
+
__exportStar2(require_mutex(), exports);
|
|
123368
123545
|
__exportStar2(require_testSetup(), exports);
|
|
123369
123546
|
/*! Bundled license information:
|
|
123370
123547
|
|
package/messages/org.md
CHANGED
|
@@ -69,3 +69,19 @@ We found more than one SandboxProcess with the SandboxName %s.
|
|
|
69
69
|
# sandboxNotResumable
|
|
70
70
|
|
|
71
71
|
The sandbox %s cannot resume with status of %s.
|
|
72
|
+
|
|
73
|
+
# FrontdoorURLError
|
|
74
|
+
|
|
75
|
+
Failed to generate a frontdoor URL.
|
|
76
|
+
|
|
77
|
+
# FlowIdNotFound
|
|
78
|
+
|
|
79
|
+
ID not found for Flow %s.
|
|
80
|
+
|
|
81
|
+
# CustomObjectIdNotFound
|
|
82
|
+
|
|
83
|
+
ID not found for custom object %s.
|
|
84
|
+
|
|
85
|
+
# ApexClassIdNotFound
|
|
86
|
+
|
|
87
|
+
ID not found for Apex class %s.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/core-bundle",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.18.0",
|
|
4
4
|
"description": "Core libraries to interact with SFDX projects, orgs, and APIs.",
|
|
5
5
|
"main": "lib/index",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"messageTransformer/messageTransformer.ts"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@jsforce/jsforce-node": "^3.
|
|
40
|
+
"@jsforce/jsforce-node": "^3.9.1",
|
|
41
41
|
"@salesforce/kit": "^3.2.2",
|
|
42
42
|
"@salesforce/schemas": "^1.9.0",
|
|
43
43
|
"@salesforce/ts-types": "^2.0.10",
|