@salesforce/lds-ads-bridge 1.303.0 → 1.305.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/dist/ads-bridge-perf.js +239 -969
- package/dist/adsBridge.js +14 -4777
- package/dist/types/ads-bridge.d.ts +1 -0
- package/package.json +15 -4
- package/src/ads-bridge.ts +12 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Luvio } from '@luvio/engine';
|
|
2
2
|
import type { RecordRepresentation } from '@salesforce/lds-adapters-uiapi';
|
|
3
|
+
export declare function isStoreKeyRecordId(key: string): boolean;
|
|
3
4
|
interface AdsRecord {
|
|
4
5
|
/**
|
|
5
6
|
* True if the passed record is a primary record, otherwise false.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-ads-bridge",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.305.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "Bridge to sync data between LDS and ADS",
|
|
6
6
|
"main": "dist/adsBridge.js",
|
|
@@ -24,15 +24,26 @@
|
|
|
24
24
|
"build": "rollup --bundleConfigAsCjs --config rollup.config.js",
|
|
25
25
|
"clean": "rm -rf dist",
|
|
26
26
|
"test:perf": "best",
|
|
27
|
+
"test:size": "luvioBundlesize",
|
|
27
28
|
"test:unit": "jest",
|
|
28
29
|
"test:unit:debug": "node --inspect-brk ../../node_modules/.bin/jest --runInBand",
|
|
29
30
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-ads-bridge"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
33
|
-
"@salesforce/lds-uiapi-record-utils-mobile": "^1.
|
|
33
|
+
"@salesforce/lds-adapters-uiapi": "^1.305.0",
|
|
34
|
+
"@salesforce/lds-uiapi-record-utils-mobile": "^1.305.0"
|
|
34
35
|
},
|
|
35
36
|
"volta": {
|
|
36
37
|
"extends": "../../package.json"
|
|
37
|
-
}
|
|
38
|
+
},
|
|
39
|
+
"luvioBundlesize": [
|
|
40
|
+
{
|
|
41
|
+
"path": "./dist/adsBridge.js",
|
|
42
|
+
"maxSize": {
|
|
43
|
+
"none": "14.6 kB",
|
|
44
|
+
"min": "4.6 kB",
|
|
45
|
+
"compressed": "3.9 kB"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
]
|
|
38
49
|
}
|
package/src/ads-bridge.ts
CHANGED
|
@@ -27,7 +27,18 @@ import {
|
|
|
27
27
|
} from './utils/metric-keys';
|
|
28
28
|
import { instrumentation } from './instrumentation';
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
// The below imports were changed in W-15596354 to be imported from '@salesforce/lds-uipai-record-utils-mobile' which caused graphQL to be bundled
|
|
31
|
+
// resulting in the module size greatly increasing: https://gus.lightning.force.com/lightning/r/ADM_Work__c/a07EE00001wIJcBYAW/view. Therefore,
|
|
32
|
+
// the fix is to just include these values directly instead of importing.
|
|
33
|
+
|
|
34
|
+
const API_NAMESPACE = 'UiApi';
|
|
35
|
+
const RECORD_REPRESENTATION_NAME = 'RecordRepresentation';
|
|
36
|
+
const RECORD_ID_PREFIX = `${API_NAMESPACE}::${RECORD_REPRESENTATION_NAME}:`;
|
|
37
|
+
const RECORD_FIELDS_KEY_JUNCTION = '__fields__';
|
|
38
|
+
|
|
39
|
+
export function isStoreKeyRecordId(key: string) {
|
|
40
|
+
return key.indexOf(RECORD_ID_PREFIX) > -1 && key.indexOf(RECORD_FIELDS_KEY_JUNCTION) === -1;
|
|
41
|
+
}
|
|
31
42
|
|
|
32
43
|
// No need to pass the actual record key `luvio.ingestStore`. The `RecordRepresentation.ts#ingest`
|
|
33
44
|
// function extracts the appropriate record id from the ingested record.
|