@salesforce/lds-runtime-aura 1.428.0-dev20 → 1.428.0-dev22
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/dist/ldsEngineCreator.js
CHANGED
|
@@ -26,7 +26,7 @@ import { instrument, getRecordAvatarsAdapterFactory, getRecordAdapterFactory, co
|
|
|
26
26
|
import { getInstrumentation } from 'o11y/client';
|
|
27
27
|
import { findExecutableOperation, buildGraphQLInputExtension, addTypenameToDocument } from 'force/luvioGraphqlNormalization';
|
|
28
28
|
import { print, resolveAndValidateGraphQLConfig } from 'force/luvioOnestoreGraphqlParser';
|
|
29
|
-
import { setServices } from 'force/luvioServiceProvisioner1';
|
|
29
|
+
import { buildStaticServiceResolver, setServiceResolver, setServices } from 'force/luvioServiceProvisioner1';
|
|
30
30
|
import { assertIsValid, MissingRequiredPropertyError, JsonSchemaViolationError } from 'force/luvioJsonschemaValidate5';
|
|
31
31
|
import { dispatchGlobalEvent, executeGlobalControllerRawResponse } from 'aura';
|
|
32
32
|
import auraNetworkAdapter, { dispatchAuraAction, defaultActionConfig, instrument as instrument$1, forceRecordTransactionsDisabled as forceRecordTransactionsDisabled$1, ldsNetworkAdapterInstrument, CrudEventState, CrudEventType, UIAPI_RECORDS_PATH, UIAPI_RELATED_LIST_RECORDS_BATCH_PATH, UIAPI_RELATED_LIST_RECORDS_PATH } from 'force/ldsNetwork';
|
|
@@ -402,6 +402,7 @@ class AuraNetworkCommand extends NetworkCommand$1 {
|
|
|
402
402
|
storable: false
|
|
403
403
|
};
|
|
404
404
|
this.networkPreference = "aura";
|
|
405
|
+
this.additionalNullResponses = [];
|
|
405
406
|
}
|
|
406
407
|
get fetchParams() {
|
|
407
408
|
throw new Error(
|
|
@@ -438,14 +439,37 @@ class AuraNetworkCommand extends NetworkCommand$1 {
|
|
|
438
439
|
}
|
|
439
440
|
});
|
|
440
441
|
}
|
|
442
|
+
isSemanticNullResponse(response) {
|
|
443
|
+
return this.additionalNullResponses.includes(response.status);
|
|
444
|
+
}
|
|
445
|
+
isProtocolNoBodyStatus(status) {
|
|
446
|
+
return status === 204 || status === 205;
|
|
447
|
+
}
|
|
448
|
+
isUndeclaredNoBodyResponse(response) {
|
|
449
|
+
return this.isProtocolNoBodyStatus(response.status) && !this.isSemanticNullResponse(response);
|
|
450
|
+
}
|
|
441
451
|
convertFetchResponseToData(response) {
|
|
442
452
|
return response.then(
|
|
443
453
|
(response2) => {
|
|
444
454
|
if (response2.ok) {
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
455
|
+
let resultPromise;
|
|
456
|
+
if (this.isSemanticNullResponse(response2)) {
|
|
457
|
+
resultPromise = Promise.resolve(ok$2(null));
|
|
458
|
+
} else if (this.isUndeclaredNoBodyResponse(response2)) {
|
|
459
|
+
resultPromise = Promise.resolve(
|
|
460
|
+
err$1(
|
|
461
|
+
toError(
|
|
462
|
+
`Unexpected ${response2.status} response: no-content status was not declared in the API specification. Declare this response in your OAS without a content property.`
|
|
463
|
+
)
|
|
464
|
+
)
|
|
465
|
+
);
|
|
466
|
+
} else {
|
|
467
|
+
resultPromise = response2.json().then(
|
|
468
|
+
(json) => ok$2(json),
|
|
469
|
+
(reason) => err$1(toError(reason))
|
|
470
|
+
);
|
|
471
|
+
}
|
|
472
|
+
return resultPromise.finally(() => {
|
|
449
473
|
try {
|
|
450
474
|
this.afterRequestHooks({ statusCode: response2.status });
|
|
451
475
|
} catch {
|
|
@@ -2763,7 +2787,7 @@ function buildServiceDescriptor$d(luvio) {
|
|
|
2763
2787
|
},
|
|
2764
2788
|
};
|
|
2765
2789
|
}
|
|
2766
|
-
// version: 1.428.0-
|
|
2790
|
+
// version: 1.428.0-dev22-bfcb919e66
|
|
2767
2791
|
|
|
2768
2792
|
/*!
|
|
2769
2793
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -3116,7 +3140,7 @@ function buildServiceDescriptor$9(notifyRecordUpdateAvailable, getNormalizedLuvi
|
|
|
3116
3140
|
},
|
|
3117
3141
|
};
|
|
3118
3142
|
}
|
|
3119
|
-
// version: 1.428.0-
|
|
3143
|
+
// version: 1.428.0-dev22-bfcb919e66
|
|
3120
3144
|
|
|
3121
3145
|
/*!
|
|
3122
3146
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -3273,6 +3297,66 @@ function buildServiceDescriptor$8(defaultRetryPolicy) {
|
|
|
3273
3297
|
};
|
|
3274
3298
|
}
|
|
3275
3299
|
|
|
3300
|
+
function tagsEqual(a, b) {
|
|
3301
|
+
const keys = Object.keys(b);
|
|
3302
|
+
return (a !== undefined && keys.length === Object.keys(a).length && keys.every((k) => a[k] === b[k]));
|
|
3303
|
+
}
|
|
3304
|
+
// W-23092947: on Aura sites HTTP-to-core is broken, so withhold every `fetch` service
|
|
3305
|
+
// except those whose request tags are in `allowedFetchTags` (the external hosts). A
|
|
3306
|
+
// withheld optional fetch resolves to `undefined`, making `AuraNetworkCommand` use Aura.
|
|
3307
|
+
function buildAuraSiteServiceResolver(services, allowedFetchTags) {
|
|
3308
|
+
const staticResolver = buildStaticServiceResolver(services);
|
|
3309
|
+
const isWithheld = (req) => req.type === 'fetch' && !allowedFetchTags.some((allowed) => tagsEqual(req.tags, allowed));
|
|
3310
|
+
return (requested) => {
|
|
3311
|
+
const passthrough = {};
|
|
3312
|
+
const withheldUnresolved = [];
|
|
3313
|
+
for (const [name, req] of Object.entries(requested)) {
|
|
3314
|
+
if (!isWithheld(req)) {
|
|
3315
|
+
passthrough[name] = req;
|
|
3316
|
+
}
|
|
3317
|
+
else if (!('optional' in req && req.optional)) {
|
|
3318
|
+
withheldUnresolved.push(name);
|
|
3319
|
+
}
|
|
3320
|
+
}
|
|
3321
|
+
return staticResolver(passthrough).then(([resolved, unresolved]) => [
|
|
3322
|
+
resolved,
|
|
3323
|
+
[...unresolved, ...withheldUnresolved],
|
|
3324
|
+
]);
|
|
3325
|
+
};
|
|
3326
|
+
}
|
|
3327
|
+
|
|
3328
|
+
/**
|
|
3329
|
+
* Helpers for reaching the Aura framework from the LDS Aura runtime.
|
|
3330
|
+
*
|
|
3331
|
+
* `window.$A` is only present when the runtime is hosted inside Aura (LEX or an
|
|
3332
|
+
* Aura site); in tests and non-Aura runtimes it is absent.
|
|
3333
|
+
*/
|
|
3334
|
+
/**
|
|
3335
|
+
* Returns the Aura framework global (`window.$A`) when running inside Aura, or
|
|
3336
|
+
* `undefined` in tests and non-Aura runtimes. Never throws.
|
|
3337
|
+
*/
|
|
3338
|
+
function getAura() {
|
|
3339
|
+
if (typeof window === 'undefined') {
|
|
3340
|
+
return undefined;
|
|
3341
|
+
}
|
|
3342
|
+
return window.$A;
|
|
3343
|
+
}
|
|
3344
|
+
/**
|
|
3345
|
+
* Returns `true` when the Aura runtime is hosted inside an Aura/Experience site
|
|
3346
|
+
* (Experience Builder / `communityApp`) rather than LEX (one.app).
|
|
3347
|
+
* `$A.get('$Site')` is present and truthy on Aura sites, absent/falsy in LEX. A
|
|
3348
|
+
* stable per-page signal. Defensive: never throws. (W-23092947)
|
|
3349
|
+
*/
|
|
3350
|
+
function isAuraSite() {
|
|
3351
|
+
const aura = getAura();
|
|
3352
|
+
try {
|
|
3353
|
+
return !!aura?.get?.('$Site');
|
|
3354
|
+
}
|
|
3355
|
+
catch {
|
|
3356
|
+
return false;
|
|
3357
|
+
}
|
|
3358
|
+
}
|
|
3359
|
+
|
|
3276
3360
|
/*!
|
|
3277
3361
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
3278
3362
|
* All rights reserved.
|
|
@@ -5992,7 +6076,7 @@ function getEnvironmentSetting(name) {
|
|
|
5992
6076
|
}
|
|
5993
6077
|
return undefined;
|
|
5994
6078
|
}
|
|
5995
|
-
// version: 1.428.0-
|
|
6079
|
+
// version: 1.428.0-dev22-bfcb919e66
|
|
5996
6080
|
|
|
5997
6081
|
const environmentHasAura = typeof window !== 'undefined' && typeof window.$A !== 'undefined';
|
|
5998
6082
|
const defaultConfig = {
|
|
@@ -7354,6 +7438,26 @@ function buildJwtParameterizationInterceptor(jwtManager, jwtRequestModifier = (_
|
|
|
7354
7438
|
}
|
|
7355
7439
|
|
|
7356
7440
|
const SFAP_BASE_URL = 'api.salesforce.com';
|
|
7441
|
+
// The fetch-service tag the Data360 (direct-to-Data Cloud) custom command binds
|
|
7442
|
+
// to. Distinct from SFAP's `sfap_api` so the Data360 host-rewrite interceptor only
|
|
7443
|
+
// ever runs for that command — zero blast radius on the SFAP fleet.
|
|
7444
|
+
//
|
|
7445
|
+
// The tag is deliberately named after the *mechanism* (the `cdp_url` host rewrite),
|
|
7446
|
+
// not a capability, because this whole descriptor is interim: it exists only while
|
|
7447
|
+
// the mint service returns the fixed SFAP `baseUri` regardless of platform. When the
|
|
7448
|
+
// service returns the correct per-platform `baseUri`, the data 360 route can be re-evaluated.
|
|
7449
|
+
// This mechanism is NOT intended to be re-used outside of this initial context.
|
|
7450
|
+
// This is a client-side routing key only.
|
|
7451
|
+
const DATA_360_CDP_URL_REWRITE_AUTH_SCOPE = 'data_360_cdp_url_rewrite';
|
|
7452
|
+
// The minted-JWT claim carrying the Data Cloud tenant-specific endpoint (TSE).
|
|
7453
|
+
// The server's `SFAPJwtClaimHandlerImpl` emits it for CDP-provisioned orgs as a
|
|
7454
|
+
// verbatim passthrough of `DataCloudTenant.getApiEndpoint()` — no normalization.
|
|
7455
|
+
// The exact FORM therefore varies and must not be assumed: it may be a bare host
|
|
7456
|
+
// (`<host>`) or a full URL with scheme (`<scheme>://<host>`), and the host suffix
|
|
7457
|
+
// (`<domain-suffix>`) is environment-dependent — it differs per deployment
|
|
7458
|
+
// environment. This is why the interceptor strips any scheme before parsing
|
|
7459
|
+
// and applies no host-suffix policy — see the interceptor docblock's trust boundary.
|
|
7460
|
+
const CDP_URL_CLAIM = 'cdp_url';
|
|
7357
7461
|
function buildDispatchingSfapJwtResolver(legacyResolver, parameterizedResolver) {
|
|
7358
7462
|
return {
|
|
7359
7463
|
getJwt(params) {
|
|
@@ -7397,6 +7501,46 @@ function buildJwtAuthorizedSfapFetchServiceDescriptor(logger) {
|
|
|
7397
7501
|
tags: { authenticationScopes: 'sfap_api' },
|
|
7398
7502
|
};
|
|
7399
7503
|
}
|
|
7504
|
+
/**
|
|
7505
|
+
* Returns a service descriptor for the **direct-to-Data360** custom command
|
|
7506
|
+
* (CDP Query v3, host `*.c360a.salesforce.com`).
|
|
7507
|
+
*
|
|
7508
|
+
* Unlike SFAP, the per-tenant base host is NOT returned in the mint response's
|
|
7509
|
+
* `baseUri` (which is the fixed SFAP host); it rides on the minted JWT as the
|
|
7510
|
+
* `cdp_url` claim. The standard `JwtRequestModifier` only receives `extraInfo`,
|
|
7511
|
+
* never the decoded claims, so the host rewrite cannot be expressed as a modifier
|
|
7512
|
+
* — it must read the token directly. This descriptor therefore uses a bespoke
|
|
7513
|
+
* interceptor ({@link buildData360HostRewriteInterceptor}) that mints the
|
|
7514
|
+
* parameterized SFAP JWT, attaches the Bearer token, decodes `cdp_url`, and
|
|
7515
|
+
* rewrites the request host to that TSE.
|
|
7516
|
+
*
|
|
7517
|
+
* It reuses the module's `sfapJwtManager`: `cdp_url` is emitted on the same
|
|
7518
|
+
* `SFAP_API`-scope JWT, so the Data360 command mints the same kind of token — it
|
|
7519
|
+
* just forwards the data-cloud scopes via the context-seed `jwtMintParams`.
|
|
7520
|
+
*
|
|
7521
|
+
* Gated behind its own `data_360_cdp_url_rewrite` auth-scope tag so it binds ONLY to
|
|
7522
|
+
* the Data360 command — the SFAP fleet never flows past this interceptor.
|
|
7523
|
+
*/
|
|
7524
|
+
function buildJwtAuthorizedData360FetchServiceDescriptor(logger) {
|
|
7525
|
+
const data360FetchService = buildServiceDescriptor$2({
|
|
7526
|
+
createContext: createInstrumentationIdContext(),
|
|
7527
|
+
request: [
|
|
7528
|
+
buildThirdPartyTrackerRegisterInterceptor(),
|
|
7529
|
+
buildData360HostRewriteInterceptor(logger),
|
|
7530
|
+
// Compression runs LAST, after the host-rewrite interceptor has minted,
|
|
7531
|
+
// attached the Bearer token, and rewritten the URL — so it only ever sees
|
|
7532
|
+
// the final request body. It is a strict pass-through: bodies that are
|
|
7533
|
+
// missing, non-string, or under the 1KB threshold flow through untouched,
|
|
7534
|
+
// preserving the tuple (URL + Authorization header) the rewrite produced.
|
|
7535
|
+
buildCompressionInterceptor({ algorithm: 'gzip' }),
|
|
7536
|
+
],
|
|
7537
|
+
finally: [buildThirdPartyTrackerFinishInterceptor()],
|
|
7538
|
+
});
|
|
7539
|
+
return {
|
|
7540
|
+
...data360FetchService,
|
|
7541
|
+
tags: { authenticationScopes: DATA_360_CDP_URL_REWRITE_AUTH_SCOPE },
|
|
7542
|
+
};
|
|
7543
|
+
}
|
|
7400
7544
|
/**
|
|
7401
7545
|
* Returns a service descriptor for a fetch service that includes one-off copilot
|
|
7402
7546
|
* hacks. This fetch service is not intended for use by anything other than
|
|
@@ -7497,6 +7641,75 @@ function buildSfapJwtRequestModifier(logger) {
|
|
|
7497
7641
|
function buildJwtRequestInterceptor(logger) {
|
|
7498
7642
|
return buildJwtRequestHeaderInterceptor(sfapJwtManager, buildSfapJwtRequestModifier(logger));
|
|
7499
7643
|
}
|
|
7644
|
+
/**
|
|
7645
|
+
* Request interceptor for the direct-to-Data360 command. It cannot use the
|
|
7646
|
+
* standard `JwtRequestModifier` seam because the tenant host is a JWT *claim*
|
|
7647
|
+
* (`cdp_url`), and modifiers only receive `extraInfo`. So — like the copilot
|
|
7648
|
+
* interceptor that reads `decodedInfo.iss` — it holds the token directly:
|
|
7649
|
+
*
|
|
7650
|
+
* 1. Read the command's `jwtMintParams` off the per-request context seed and
|
|
7651
|
+
* mint (via the parameterized SFAP resolver, routed by the dispatching
|
|
7652
|
+
* resolver inside `sfapJwtManager`). Without mint params there is no token
|
|
7653
|
+
* to authorize with, so leave the request untouched.
|
|
7654
|
+
* 2. Decode `cdp_url` from the JWT and resolve the tenant-specific endpoint
|
|
7655
|
+
* (TSE). `cdp_url` is a bare host, so a scheme is prepended before parsing
|
|
7656
|
+
* and the protocol is forced to `https:`.
|
|
7657
|
+
* 3. Only after a usable `cdp_url` is confirmed, attach `Authorization: Bearer
|
|
7658
|
+
* <jwt>` and rewrite the request URL's host/protocol to the TSE.
|
|
7659
|
+
*
|
|
7660
|
+
* **Trust boundary.** `cdp_url` is a claim on a first-party, server-minted JWT
|
|
7661
|
+
* delivered over the same-origin Aura transport, so the interceptor does NOT police
|
|
7662
|
+
* its contents (no host-suffix or format allowlist) — the routing host is the
|
|
7663
|
+
* minting service's responsibility, and this mirrors the SFAP sibling, which
|
|
7664
|
+
* likewise trusts the server-provided `baseUri` rewrite target. The one guard that
|
|
7665
|
+
* remains is shape hygiene: if `cdp_url` is absent/empty/non-string (org not
|
|
7666
|
+
* CDP-provisioned, so the server's claim gate did not fire) the interceptor throws
|
|
7667
|
+
* a developer-facing error instead of an opaque parse failure. A minted token is
|
|
7668
|
+
* never attached until a usable host is in hand.
|
|
7669
|
+
*/
|
|
7670
|
+
function buildData360HostRewriteInterceptor(logger) {
|
|
7671
|
+
return (fetchArgs, context) => {
|
|
7672
|
+
const mintParams = context?.[JWT_MINT_PARAMS_SEED_KEY];
|
|
7673
|
+
// No mint params → not a parameterized Data360 request. Nothing to do.
|
|
7674
|
+
if (mintParams === undefined) {
|
|
7675
|
+
return resolvedPromiseLike$2(fetchArgs);
|
|
7676
|
+
}
|
|
7677
|
+
return resolvedPromiseLike$2(sfapJwtManager.getJwt(mintParams)).then((token) => {
|
|
7678
|
+
const [resource, request] = fetchArgs;
|
|
7679
|
+
if (typeof resource !== 'string' && !(resource instanceof URL)) {
|
|
7680
|
+
// istanbul ignore else: not exercised under NODE_ENV=production
|
|
7681
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
7682
|
+
throw new Error('Data360 fetch service expects a string or URL resource');
|
|
7683
|
+
}
|
|
7684
|
+
return fetchArgs;
|
|
7685
|
+
}
|
|
7686
|
+
const cdpUrl = token.decodedInfo?.[CDP_URL_CLAIM];
|
|
7687
|
+
// Require a non-empty string. This is shape hygiene, NOT a content
|
|
7688
|
+
// policy: the routing host is the minting service's responsibility, and
|
|
7689
|
+
// we deliberately do not couple to its contents (no host-suffix/format
|
|
7690
|
+
// check — the SFAP sibling likewise trusts its server-provided rewrite
|
|
7691
|
+
// target). We only confirm we were handed a usable host string; a
|
|
7692
|
+
// missing/empty/non-string claim (org not Data Cloud provisioned, so the
|
|
7693
|
+
// server's claim gate did not fire) fails with a clear error rather than
|
|
7694
|
+
// an opaque `new URL` TypeError. The `typeof` check also narrows `cdpUrl`
|
|
7695
|
+
// to `string` for the `.replace` below.
|
|
7696
|
+
if (typeof cdpUrl !== 'string' || cdpUrl.length === 0) {
|
|
7697
|
+
logger.warn(`Data360 fetch service: minted JWT has no usable "${CDP_URL_CLAIM}" claim. The org may not be Data Cloud provisioned.`);
|
|
7698
|
+
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
7699
|
+
throw new Error(`Data360 fetch service: minted JWT has no usable "${CDP_URL_CLAIM}" claim; cannot route the request to a Data Cloud tenant endpoint.`);
|
|
7700
|
+
}
|
|
7701
|
+
// `cdp_url` is a bare host (no scheme); prepend https so `new URL`
|
|
7702
|
+
// parses it as an origin. Force https regardless of any scheme in the
|
|
7703
|
+
// claim — the TSE is always TLS.
|
|
7704
|
+
const tse = new URL(`https://${cdpUrl.replace(/^[a-z]+:\/\//i, '')}`);
|
|
7705
|
+
const authorizedArgs = setHeaderAuthorization(token, [resource, request]);
|
|
7706
|
+
const url = typeof resource === 'string' ? new URL(resource) : new URL(resource.toString());
|
|
7707
|
+
url.host = tse.host;
|
|
7708
|
+
url.protocol = 'https:';
|
|
7709
|
+
return [url, authorizedArgs[1]];
|
|
7710
|
+
});
|
|
7711
|
+
};
|
|
7712
|
+
}
|
|
7500
7713
|
/**
|
|
7501
7714
|
* Wraps the legacy `buildJwtRequestHeaderInterceptor` with a pass-through guard:
|
|
7502
7715
|
* when the parameterized interceptor has already authorized the request (an
|
|
@@ -10854,6 +11067,13 @@ function initializeLDS() {
|
|
|
10854
11067
|
}
|
|
10855
11068
|
return luvio; // Return the luvio instance so that we can inject it for OneStore
|
|
10856
11069
|
}
|
|
11070
|
+
// W-23092947: fetch request tags allowed to stay on HTTP on Aura sites (external hosts).
|
|
11071
|
+
// Everything else (core UIAPI/GraphQL) is withheld so it falls back to Aura transport.
|
|
11072
|
+
const AURA_SITE_ALLOWED_FETCH_TAGS = [
|
|
11073
|
+
{ authenticationScopes: 'sfap_api' },
|
|
11074
|
+
{ authenticationScopes: 'data_360_cdp_url_rewrite' },
|
|
11075
|
+
{ specialHacksFor: 'copilot' }, // copilot
|
|
11076
|
+
];
|
|
10857
11077
|
// Initializes OneStore in LEX
|
|
10858
11078
|
function initializeOneStore(luvio) {
|
|
10859
11079
|
const loggerService = new ConsoleLogger('ERROR');
|
|
@@ -10904,6 +11124,7 @@ function initializeOneStore(luvio) {
|
|
|
10904
11124
|
buildLexRuntimeDefaultFetchServiceDescriptor(loggerService, retryService),
|
|
10905
11125
|
buildUnauthorizedFetchServiceDescriptor(),
|
|
10906
11126
|
buildJwtAuthorizedSfapFetchServiceDescriptor(loggerService),
|
|
11127
|
+
buildJwtAuthorizedData360FetchServiceDescriptor(loggerService),
|
|
10907
11128
|
buildCopilotFetchServiceDescriptor(loggerService),
|
|
10908
11129
|
buildAuraNetworkService(),
|
|
10909
11130
|
buildServiceDescriptor$j(instrumentationServiceDescriptor.service),
|
|
@@ -10940,7 +11161,13 @@ function initializeOneStore(luvio) {
|
|
|
10940
11161
|
configServiceDescriptor,
|
|
10941
11162
|
prefetchSfapJwtServiceDescriptor,
|
|
10942
11163
|
];
|
|
10943
|
-
|
|
11164
|
+
// W-23092947: Aura sites route core-bound commands over Aura (see the resolver).
|
|
11165
|
+
if (isAuraSite()) {
|
|
11166
|
+
setServiceResolver(buildAuraSiteServiceResolver(services, AURA_SITE_ALLOWED_FETCH_TAGS));
|
|
11167
|
+
}
|
|
11168
|
+
else {
|
|
11169
|
+
setServices(services);
|
|
11170
|
+
}
|
|
10944
11171
|
}
|
|
10945
11172
|
function buildAuraNetworkService() {
|
|
10946
11173
|
return {
|
|
@@ -10958,4 +11185,4 @@ function ldsEngineCreator() {
|
|
|
10958
11185
|
}
|
|
10959
11186
|
|
|
10960
11187
|
export { LexRequestStrategy, PdlPrefetcherEventType, PdlRequestPriority, buildPredictorForContext, configService, ldsEngineCreator as default, initializeLDS, initializeOneStore, notifyUpdateAvailableFactory, registerRequestStrategy, saveRequestAsPrediction, subscribeToPrefetcherEvents, unregisterRequestStrategy, whenPredictionsReady };
|
|
10961
|
-
// version: 1.428.0-
|
|
11188
|
+
// version: 1.428.0-dev22-319313a317
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type PublishedService, type ServiceResolver, type ServicesRequest } from '@conduit-client/service-provisioner/v1';
|
|
2
|
+
import { type ServiceDescriptor } from '@conduit-client/utils';
|
|
3
|
+
type Tags = Record<string, string>;
|
|
4
|
+
export declare function buildAuraSiteServiceResolver<R extends ServicesRequest<ServiceDescriptor<unknown>>>(services: PublishedService[], allowedFetchTags: ReadonlyArray<Tags>): ServiceResolver<R>;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helpers for reaching the Aura framework from the LDS Aura runtime.
|
|
3
|
+
*
|
|
4
|
+
* `window.$A` is only present when the runtime is hosted inside Aura (LEX or an
|
|
5
|
+
* Aura site); in tests and non-Aura runtimes it is absent.
|
|
6
|
+
*/
|
|
7
|
+
interface Aura {
|
|
8
|
+
get?: (expression: string) => unknown;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Returns the Aura framework global (`window.$A`) when running inside Aura, or
|
|
12
|
+
* `undefined` in tests and non-Aura runtimes. Never throws.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getAura(): Aura | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Returns `true` when the Aura runtime is hosted inside an Aura/Experience site
|
|
17
|
+
* (Experience Builder / `communityApp`) rather than LEX (one.app).
|
|
18
|
+
* `$A.get('$Site')` is present and truthy on Aura sites, absent/falsy in LEX. A
|
|
19
|
+
* stable per-page signal. Defensive: never throws. (W-23092947)
|
|
20
|
+
*/
|
|
21
|
+
export declare function isAuraSite(): boolean;
|
|
22
|
+
export {};
|
|
@@ -5,6 +5,27 @@ import { type LoggerService } from '@conduit-client/utils';
|
|
|
5
5
|
export declare function buildDispatchingSfapJwtResolver(legacyResolver: JwtResolver<ExtraInfo>, parameterizedResolver: JwtResolver<ExtraInfo>): JwtResolver<ExtraInfo>;
|
|
6
6
|
export declare function prefetchSfapJwt(): Promise<undefined>;
|
|
7
7
|
export declare function buildJwtAuthorizedSfapFetchServiceDescriptor(logger: LoggerService): FetchServiceDescriptor;
|
|
8
|
+
/**
|
|
9
|
+
* Returns a service descriptor for the **direct-to-Data360** custom command
|
|
10
|
+
* (CDP Query v3, host `*.c360a.salesforce.com`).
|
|
11
|
+
*
|
|
12
|
+
* Unlike SFAP, the per-tenant base host is NOT returned in the mint response's
|
|
13
|
+
* `baseUri` (which is the fixed SFAP host); it rides on the minted JWT as the
|
|
14
|
+
* `cdp_url` claim. The standard `JwtRequestModifier` only receives `extraInfo`,
|
|
15
|
+
* never the decoded claims, so the host rewrite cannot be expressed as a modifier
|
|
16
|
+
* — it must read the token directly. This descriptor therefore uses a bespoke
|
|
17
|
+
* interceptor ({@link buildData360HostRewriteInterceptor}) that mints the
|
|
18
|
+
* parameterized SFAP JWT, attaches the Bearer token, decodes `cdp_url`, and
|
|
19
|
+
* rewrites the request host to that TSE.
|
|
20
|
+
*
|
|
21
|
+
* It reuses the module's `sfapJwtManager`: `cdp_url` is emitted on the same
|
|
22
|
+
* `SFAP_API`-scope JWT, so the Data360 command mints the same kind of token — it
|
|
23
|
+
* just forwards the data-cloud scopes via the context-seed `jwtMintParams`.
|
|
24
|
+
*
|
|
25
|
+
* Gated behind its own `data_360_cdp_url_rewrite` auth-scope tag so it binds ONLY to
|
|
26
|
+
* the Data360 command — the SFAP fleet never flows past this interceptor.
|
|
27
|
+
*/
|
|
28
|
+
export declare function buildJwtAuthorizedData360FetchServiceDescriptor(logger: LoggerService): FetchServiceDescriptor;
|
|
8
29
|
/**
|
|
9
30
|
* Returns a service descriptor for a fetch service that includes one-off copilot
|
|
10
31
|
* hacks. This fetch service is not intended for use by anything other than
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-aura",
|
|
3
|
-
"version": "1.428.0-
|
|
3
|
+
"version": "1.428.0-dev22",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS engine for Aura runtime",
|
|
6
6
|
"main": "dist/ldsEngineCreator.js",
|
|
@@ -34,60 +34,60 @@
|
|
|
34
34
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-aura"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@conduit-client/service-provisioner": "3.19.0-
|
|
38
|
-
"@conduit-client/tools-core": "3.19.0-
|
|
39
|
-
"@salesforce/lds-adapters-apex": "^1.428.0-
|
|
40
|
-
"@salesforce/lds-adapters-uiapi": "^1.428.0-
|
|
41
|
-
"@salesforce/lds-ads-bridge": "^1.428.0-
|
|
42
|
-
"@salesforce/lds-aura-storage": "^1.428.0-
|
|
43
|
-
"@salesforce/lds-bindings": "^1.428.0-
|
|
44
|
-
"@salesforce/lds-instrumentation": "^1.428.0-
|
|
45
|
-
"@salesforce/lds-network-aura": "^1.428.0-
|
|
46
|
-
"@salesforce/lds-network-fetch": "^1.428.0-
|
|
37
|
+
"@conduit-client/service-provisioner": "3.19.0-dev4",
|
|
38
|
+
"@conduit-client/tools-core": "3.19.0-dev4",
|
|
39
|
+
"@salesforce/lds-adapters-apex": "^1.428.0-dev22",
|
|
40
|
+
"@salesforce/lds-adapters-uiapi": "^1.428.0-dev22",
|
|
41
|
+
"@salesforce/lds-ads-bridge": "^1.428.0-dev22",
|
|
42
|
+
"@salesforce/lds-aura-storage": "^1.428.0-dev22",
|
|
43
|
+
"@salesforce/lds-bindings": "^1.428.0-dev22",
|
|
44
|
+
"@salesforce/lds-instrumentation": "^1.428.0-dev22",
|
|
45
|
+
"@salesforce/lds-network-aura": "^1.428.0-dev22",
|
|
46
|
+
"@salesforce/lds-network-fetch": "^1.428.0-dev22",
|
|
47
47
|
"jwt-encode": "1.0.1"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@conduit-client/command-aura-graphql-normalized-cache-control": "3.19.0-
|
|
51
|
-
"@conduit-client/command-aura-network": "3.19.0-
|
|
52
|
-
"@conduit-client/command-aura-normalized-cache-control": "3.19.0-
|
|
53
|
-
"@conduit-client/command-aura-resource-cache-control": "3.19.0-
|
|
54
|
-
"@conduit-client/command-fetch-network": "3.19.0-
|
|
55
|
-
"@conduit-client/command-http-graphql-normalized-cache-control": "3.19.0-
|
|
56
|
-
"@conduit-client/command-http-normalized-cache-control": "3.19.0-
|
|
57
|
-
"@conduit-client/command-ndjson": "3.19.0-
|
|
58
|
-
"@conduit-client/command-network": "3.19.0-
|
|
59
|
-
"@conduit-client/command-sse": "3.19.0-
|
|
60
|
-
"@conduit-client/command-streaming": "3.19.0-
|
|
61
|
-
"@conduit-client/jwt-manager": "3.19.0-
|
|
62
|
-
"@conduit-client/service-aura-network": "3.19.0-
|
|
63
|
-
"@conduit-client/service-bindings-imperative": "3.19.0-
|
|
64
|
-
"@conduit-client/service-bindings-lwc": "3.19.0-
|
|
65
|
-
"@conduit-client/service-cache": "3.19.0-
|
|
66
|
-
"@conduit-client/service-cache-control": "3.19.0-
|
|
67
|
-
"@conduit-client/service-cache-inclusion-policy": "3.19.0-
|
|
68
|
-
"@conduit-client/service-config": "3.19.0-
|
|
69
|
-
"@conduit-client/service-feature-flags": "3.19.0-
|
|
70
|
-
"@conduit-client/service-fetch-network": "3.19.0-
|
|
71
|
-
"@conduit-client/service-instrument-command": "3.19.0-
|
|
72
|
-
"@conduit-client/service-pubsub": "3.19.0-
|
|
73
|
-
"@conduit-client/service-store": "3.19.0-
|
|
74
|
-
"@conduit-client/utils": "3.19.0-
|
|
50
|
+
"@conduit-client/command-aura-graphql-normalized-cache-control": "3.19.0-dev4",
|
|
51
|
+
"@conduit-client/command-aura-network": "3.19.0-dev4",
|
|
52
|
+
"@conduit-client/command-aura-normalized-cache-control": "3.19.0-dev4",
|
|
53
|
+
"@conduit-client/command-aura-resource-cache-control": "3.19.0-dev4",
|
|
54
|
+
"@conduit-client/command-fetch-network": "3.19.0-dev4",
|
|
55
|
+
"@conduit-client/command-http-graphql-normalized-cache-control": "3.19.0-dev4",
|
|
56
|
+
"@conduit-client/command-http-normalized-cache-control": "3.19.0-dev4",
|
|
57
|
+
"@conduit-client/command-ndjson": "3.19.0-dev4",
|
|
58
|
+
"@conduit-client/command-network": "3.19.0-dev4",
|
|
59
|
+
"@conduit-client/command-sse": "3.19.0-dev4",
|
|
60
|
+
"@conduit-client/command-streaming": "3.19.0-dev4",
|
|
61
|
+
"@conduit-client/jwt-manager": "3.19.0-dev4",
|
|
62
|
+
"@conduit-client/service-aura-network": "3.19.0-dev4",
|
|
63
|
+
"@conduit-client/service-bindings-imperative": "3.19.0-dev4",
|
|
64
|
+
"@conduit-client/service-bindings-lwc": "3.19.0-dev4",
|
|
65
|
+
"@conduit-client/service-cache": "3.19.0-dev4",
|
|
66
|
+
"@conduit-client/service-cache-control": "3.19.0-dev4",
|
|
67
|
+
"@conduit-client/service-cache-inclusion-policy": "3.19.0-dev4",
|
|
68
|
+
"@conduit-client/service-config": "3.19.0-dev4",
|
|
69
|
+
"@conduit-client/service-feature-flags": "3.19.0-dev4",
|
|
70
|
+
"@conduit-client/service-fetch-network": "3.19.0-dev4",
|
|
71
|
+
"@conduit-client/service-instrument-command": "3.19.0-dev4",
|
|
72
|
+
"@conduit-client/service-pubsub": "3.19.0-dev4",
|
|
73
|
+
"@conduit-client/service-store": "3.19.0-dev4",
|
|
74
|
+
"@conduit-client/utils": "3.19.0-dev4",
|
|
75
75
|
"@luvio/network-adapter-composable": "0.160.4-dev1",
|
|
76
76
|
"@luvio/network-adapter-fetch": "0.160.4-dev1",
|
|
77
77
|
"@lwc/state": "^0.29.0",
|
|
78
|
-
"@salesforce/lds-adapters-onestore-graphql": "^1.428.0-
|
|
78
|
+
"@salesforce/lds-adapters-onestore-graphql": "^1.428.0-dev22",
|
|
79
79
|
"@salesforce/lds-adapters-uiapi-lex": "^1.415.0",
|
|
80
|
-
"@salesforce/lds-durable-storage": "^1.428.0-
|
|
81
|
-
"@salesforce/lds-luvio-service": "^1.428.0-
|
|
82
|
-
"@salesforce/lds-luvio-uiapi-records-service": "^1.428.0-
|
|
80
|
+
"@salesforce/lds-durable-storage": "^1.428.0-dev22",
|
|
81
|
+
"@salesforce/lds-luvio-service": "^1.428.0-dev22",
|
|
82
|
+
"@salesforce/lds-luvio-uiapi-records-service": "^1.428.0-dev22"
|
|
83
83
|
},
|
|
84
84
|
"luvioBundlesize": [
|
|
85
85
|
{
|
|
86
86
|
"path": "./dist/ldsEngineCreator.js",
|
|
87
87
|
"maxSize": {
|
|
88
|
-
"none": "
|
|
88
|
+
"none": "413 kB",
|
|
89
89
|
"min": "190 kB",
|
|
90
|
-
"compressed": "
|
|
90
|
+
"compressed": "73 kB"
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
],
|