@salesforce/lds-runtime-aura 1.428.0-dev13 → 1.428.0-dev14
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 +21 -13
- package/dist/types/sfap-jwt-mint-params.d.ts +13 -2
- package/package.json +15 -15
package/dist/ldsEngineCreator.js
CHANGED
|
@@ -2763,7 +2763,7 @@ function buildServiceDescriptor$d(luvio) {
|
|
|
2763
2763
|
},
|
|
2764
2764
|
};
|
|
2765
2765
|
}
|
|
2766
|
-
// version: 1.428.0-
|
|
2766
|
+
// version: 1.428.0-dev14-450676496d
|
|
2767
2767
|
|
|
2768
2768
|
/*!
|
|
2769
2769
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -3116,7 +3116,7 @@ function buildServiceDescriptor$9(notifyRecordUpdateAvailable, getNormalizedLuvi
|
|
|
3116
3116
|
},
|
|
3117
3117
|
};
|
|
3118
3118
|
}
|
|
3119
|
-
// version: 1.428.0-
|
|
3119
|
+
// version: 1.428.0-dev14-450676496d
|
|
3120
3120
|
|
|
3121
3121
|
/*!
|
|
3122
3122
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -4786,7 +4786,7 @@ var TypeCheckShapes;
|
|
|
4786
4786
|
TypeCheckShapes[TypeCheckShapes["Integer"] = 3] = "Integer";
|
|
4787
4787
|
TypeCheckShapes[TypeCheckShapes["Unsupported"] = 4] = "Unsupported";
|
|
4788
4788
|
})(TypeCheckShapes || (TypeCheckShapes = {}));
|
|
4789
|
-
// engine version: 0.160.
|
|
4789
|
+
// engine version: 0.160.4-dev1-4b808818
|
|
4790
4790
|
|
|
4791
4791
|
const { keys: keys$1 } = Object;
|
|
4792
4792
|
|
|
@@ -4859,12 +4859,13 @@ const fetchNetworkAdapter = async (resourceRequest, _resourceRequestContext) =>
|
|
|
4859
4859
|
};
|
|
4860
4860
|
};
|
|
4861
4861
|
function generateQueryString(params) {
|
|
4862
|
-
const
|
|
4862
|
+
const searchParams = new URLSearchParams();
|
|
4863
4863
|
for (const key of keys$1(params)) {
|
|
4864
|
-
|
|
4864
|
+
searchParams.append(key, String(params[key]));
|
|
4865
4865
|
}
|
|
4866
|
-
|
|
4867
|
-
|
|
4866
|
+
const queryString = searchParams.toString();
|
|
4867
|
+
if (queryString.length > 0) {
|
|
4868
|
+
return `?${queryString}`;
|
|
4868
4869
|
}
|
|
4869
4870
|
return '';
|
|
4870
4871
|
}
|
|
@@ -5057,9 +5058,9 @@ function coerceToSfapParams(params) {
|
|
|
5057
5058
|
if (scopes !== undefined && !isStringArray(scopes)) {
|
|
5058
5059
|
return { error: 'SFAP JWT params.scopes must be a string[] when provided.' };
|
|
5059
5060
|
}
|
|
5060
|
-
if (dynamicParams !== undefined && !
|
|
5061
|
+
if (dynamicParams !== undefined && !isPrimitiveRecord(dynamicParams)) {
|
|
5061
5062
|
return {
|
|
5062
|
-
error: 'SFAP JWT params.dynamicParams must be a Record<string, string> when provided.',
|
|
5063
|
+
error: 'SFAP JWT params.dynamicParams must be a Record<string, string | boolean | number> when provided.',
|
|
5063
5064
|
};
|
|
5064
5065
|
}
|
|
5065
5066
|
return { params: { scopes, dynamicParams } };
|
|
@@ -5067,11 +5068,18 @@ function coerceToSfapParams(params) {
|
|
|
5067
5068
|
function isStringArray(value) {
|
|
5068
5069
|
return Array.isArray(value) && value.every((s) => typeof s === 'string');
|
|
5069
5070
|
}
|
|
5070
|
-
|
|
5071
|
+
/**
|
|
5072
|
+
* A record whose values are JSON primitives (string, boolean, or number) — the
|
|
5073
|
+
* value types the SFAP Lightning JWT Service accepts for a dynamic parameter
|
|
5074
|
+
* (see {@link SfapDynamicParamValue}). Booleans/numbers are forwarded natively
|
|
5075
|
+
* (not stringified) so claim handlers that gate on a native `Boolean` see the
|
|
5076
|
+
* intended value. Nested objects/arrays, `null`, and `undefined` are rejected.
|
|
5077
|
+
*/
|
|
5078
|
+
function isPrimitiveRecord(value) {
|
|
5071
5079
|
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
5072
5080
|
return false;
|
|
5073
5081
|
}
|
|
5074
|
-
return Object.values(value).every((v) => typeof v === 'string');
|
|
5082
|
+
return Object.values(value).every((v) => typeof v === 'string' || typeof v === 'boolean' || typeof v === 'number');
|
|
5075
5083
|
}
|
|
5076
5084
|
/**
|
|
5077
5085
|
* Build the SFAP mint request body from the coerced params: `scopes` joined into a
|
|
@@ -5984,7 +5992,7 @@ function getEnvironmentSetting(name) {
|
|
|
5984
5992
|
}
|
|
5985
5993
|
return undefined;
|
|
5986
5994
|
}
|
|
5987
|
-
// version: 1.428.0-
|
|
5995
|
+
// version: 1.428.0-dev14-450676496d
|
|
5988
5996
|
|
|
5989
5997
|
const environmentHasAura = typeof window !== 'undefined' && typeof window.$A !== 'undefined';
|
|
5990
5998
|
const defaultConfig = {
|
|
@@ -10942,4 +10950,4 @@ function ldsEngineCreator() {
|
|
|
10942
10950
|
}
|
|
10943
10951
|
|
|
10944
10952
|
export { LexRequestStrategy, PdlPrefetcherEventType, PdlRequestPriority, buildPredictorForContext, configService, ldsEngineCreator as default, initializeLDS, initializeOneStore, notifyUpdateAvailableFactory, registerRequestStrategy, saveRequestAsPrediction, subscribeToPrefetcherEvents, unregisterRequestStrategy, whenPredictionsReady };
|
|
10945
|
-
// version: 1.428.0-
|
|
10953
|
+
// version: 1.428.0-dev14-d04322589b
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import type { JwtMintParams } from '@conduit-client/jwt-manager';
|
|
2
|
+
/**
|
|
3
|
+
* JSON-primitive value a dynamic mint parameter may take.
|
|
4
|
+
*
|
|
5
|
+
* Mirrors the SFAP Lightning JWT Service's own `validateValue`
|
|
6
|
+
* (`SFAPLightningJwtServiceResource.java`), which accepts native `Boolean`,
|
|
7
|
+
* `Number`, or `String` and lets the minted claim's type follow the JSON type.
|
|
8
|
+
* The resolver therefore forwards these primitives verbatim — it must NOT
|
|
9
|
+
* stringify booleans/numbers, because the `data_cloud_user_claims` handler gates
|
|
10
|
+
* on native `Boolean.TRUE.equals(...)` and silently drops a stringified `"true"`.
|
|
11
|
+
*/
|
|
12
|
+
export type SfapDynamicParamValue = string | boolean | number;
|
|
2
13
|
/**
|
|
3
14
|
* Typed shape of the params the SFAP Lightning JWT Service understands.
|
|
4
15
|
* Lives in the resolver layer because OneStore is param-shape-agnostic; it
|
|
@@ -7,7 +18,7 @@ import type { JwtMintParams } from '@conduit-client/jwt-manager';
|
|
|
7
18
|
*/
|
|
8
19
|
export type SfapJwtMintParams = {
|
|
9
20
|
scopes?: string[];
|
|
10
|
-
dynamicParams?: Record<string,
|
|
21
|
+
dynamicParams?: Record<string, SfapDynamicParamValue>;
|
|
11
22
|
};
|
|
12
23
|
/**
|
|
13
24
|
* The `extraInfo` the SFAP JWT resolver returns alongside the minted token: the
|
|
@@ -18,7 +29,7 @@ export type ParameterizedSfapExtraInfo = {
|
|
|
18
29
|
};
|
|
19
30
|
type DynamicParameterItem = {
|
|
20
31
|
name: string;
|
|
21
|
-
value:
|
|
32
|
+
value: SfapDynamicParamValue;
|
|
22
33
|
};
|
|
23
34
|
/**
|
|
24
35
|
* The SFAP Lightning JWT Service mint request body. Sent as the `requestBody`
|
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-dev14",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS engine for Aura runtime",
|
|
6
6
|
"main": "dist/ldsEngineCreator.js",
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@conduit-client/service-provisioner": "3.19.0-dev3",
|
|
38
38
|
"@conduit-client/tools-core": "3.19.0-dev3",
|
|
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-
|
|
39
|
+
"@salesforce/lds-adapters-apex": "^1.428.0-dev14",
|
|
40
|
+
"@salesforce/lds-adapters-uiapi": "^1.428.0-dev14",
|
|
41
|
+
"@salesforce/lds-ads-bridge": "^1.428.0-dev14",
|
|
42
|
+
"@salesforce/lds-aura-storage": "^1.428.0-dev14",
|
|
43
|
+
"@salesforce/lds-bindings": "^1.428.0-dev14",
|
|
44
|
+
"@salesforce/lds-instrumentation": "^1.428.0-dev14",
|
|
45
|
+
"@salesforce/lds-network-aura": "^1.428.0-dev14",
|
|
46
|
+
"@salesforce/lds-network-fetch": "^1.428.0-dev14",
|
|
47
47
|
"jwt-encode": "1.0.1"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
@@ -72,14 +72,14 @@
|
|
|
72
72
|
"@conduit-client/service-pubsub": "3.19.0-dev3",
|
|
73
73
|
"@conduit-client/service-store": "3.19.0-dev3",
|
|
74
74
|
"@conduit-client/utils": "3.19.0-dev3",
|
|
75
|
-
"@luvio/network-adapter-composable": "0.160.
|
|
76
|
-
"@luvio/network-adapter-fetch": "0.160.
|
|
75
|
+
"@luvio/network-adapter-composable": "0.160.4-dev1",
|
|
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-dev14",
|
|
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-dev14",
|
|
81
|
+
"@salesforce/lds-luvio-service": "^1.428.0-dev14",
|
|
82
|
+
"@salesforce/lds-luvio-uiapi-records-service": "^1.428.0-dev14"
|
|
83
83
|
},
|
|
84
84
|
"luvioBundlesize": [
|
|
85
85
|
{
|