@salesforce/lds-environment-settings 1.124.2 → 1.124.4
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.
|
@@ -12,30 +12,30 @@
|
|
|
12
12
|
* *******************************************************************************************
|
|
13
13
|
*/
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
|
-
var EnvironmentSettings;
|
|
16
|
-
(function (EnvironmentSettings) {
|
|
17
|
-
EnvironmentSettings["ForceRecordTransactionsDisabled"] = "forceRecordTransactionsDisabled";
|
|
18
|
-
})(EnvironmentSettings || (EnvironmentSettings = {}));
|
|
19
|
-
const GATE_FORCE_RECORD_TRANSACTIONS_DISABLED = '$Browser.S1Features.forceRecordTransactionsDisabled';
|
|
20
|
-
const supportedEnvironmentSettings = {
|
|
21
|
-
[EnvironmentSettings.ForceRecordTransactionsDisabled]: GATE_FORCE_RECORD_TRANSACTIONS_DISABLED,
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Returns aura configuration settings. Used to check gate/perm statuses.
|
|
25
|
-
* @param name Name of the setting to check.
|
|
26
|
-
* @returns Value of the setting, or undefined if $A is not available.
|
|
27
|
-
*/
|
|
28
|
-
function getEnvironmentSetting(name) {
|
|
29
|
-
if (typeof window === 'undefined') {
|
|
30
|
-
// server environment i.e. SSR in LWR
|
|
31
|
-
return undefined;
|
|
32
|
-
}
|
|
33
|
-
const environmentSetting = supportedEnvironmentSettings[name];
|
|
34
|
-
if (typeof window.$A !== 'undefined' && environmentSetting !== undefined) {
|
|
35
|
-
return window.$A.get(environmentSetting);
|
|
36
|
-
}
|
|
37
|
-
return undefined;
|
|
15
|
+
var EnvironmentSettings;
|
|
16
|
+
(function (EnvironmentSettings) {
|
|
17
|
+
EnvironmentSettings["ForceRecordTransactionsDisabled"] = "forceRecordTransactionsDisabled";
|
|
18
|
+
})(EnvironmentSettings || (EnvironmentSettings = {}));
|
|
19
|
+
const GATE_FORCE_RECORD_TRANSACTIONS_DISABLED = '$Browser.S1Features.forceRecordTransactionsDisabled';
|
|
20
|
+
const supportedEnvironmentSettings = {
|
|
21
|
+
[EnvironmentSettings.ForceRecordTransactionsDisabled]: GATE_FORCE_RECORD_TRANSACTIONS_DISABLED,
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Returns aura configuration settings. Used to check gate/perm statuses.
|
|
25
|
+
* @param name Name of the setting to check.
|
|
26
|
+
* @returns Value of the setting, or undefined if $A is not available.
|
|
27
|
+
*/
|
|
28
|
+
function getEnvironmentSetting(name) {
|
|
29
|
+
if (typeof window === 'undefined') {
|
|
30
|
+
// server environment i.e. SSR in LWR
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
const environmentSetting = supportedEnvironmentSettings[name];
|
|
34
|
+
if (typeof window.$A !== 'undefined' && environmentSetting !== undefined) {
|
|
35
|
+
return window.$A.get(environmentSetting);
|
|
36
|
+
}
|
|
37
|
+
return undefined;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export { EnvironmentSettings, getEnvironmentSetting };
|
|
41
|
-
// version: 1.124.
|
|
41
|
+
// version: 1.124.4-fc08995da
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare enum EnvironmentSettings {
|
|
2
|
-
ForceRecordTransactionsDisabled = "forceRecordTransactionsDisabled"
|
|
3
|
-
}
|
|
4
|
-
/**
|
|
5
|
-
* Returns aura configuration settings. Used to check gate/perm statuses.
|
|
6
|
-
* @param name Name of the setting to check.
|
|
7
|
-
* @returns Value of the setting, or undefined if $A is not available.
|
|
8
|
-
*/
|
|
9
|
-
export declare function getEnvironmentSetting(name: EnvironmentSettings): boolean | undefined;
|
|
1
|
+
export declare enum EnvironmentSettings {
|
|
2
|
+
ForceRecordTransactionsDisabled = "forceRecordTransactionsDisabled"
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Returns aura configuration settings. Used to check gate/perm statuses.
|
|
6
|
+
* @param name Name of the setting to check.
|
|
7
|
+
* @returns Value of the setting, or undefined if $A is not available.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getEnvironmentSetting(name: EnvironmentSettings): boolean | undefined;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-environment-settings",
|
|
3
|
-
"version": "1.124.
|
|
3
|
+
"version": "1.124.4",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "Environment Settings for LDS",
|
|
6
6
|
"main": "dist/ldsEnvironmentSettings.js",
|
|
7
|
-
"types": "dist/main.d.ts",
|
|
7
|
+
"types": "dist/types/main.d.ts",
|
|
8
8
|
"sfdc": {
|
|
9
9
|
"path": "forcelds/ldsEnvironmentSettings/",
|
|
10
10
|
"publishedFileName": "ldsEnvironmentSettings.js",
|
package/rollup.config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import resolve from '@rollup/plugin-node-resolve';
|
|
2
|
-
import typescript from 'rollup
|
|
2
|
+
import typescript from '@rollup/plugin-typescript';
|
|
3
3
|
|
|
4
4
|
import * as packageJson from './package.json';
|
|
5
5
|
import { buildBanner, buildFooter, copyrightHeaderPlugin } from '../../scripts/rollup/rollup-utils';
|
|
@@ -20,7 +20,7 @@ const ldsEnvironmentSettings = {
|
|
|
20
20
|
copyrightHeaderPlugin,
|
|
21
21
|
resolve(),
|
|
22
22
|
typescript({
|
|
23
|
-
|
|
23
|
+
declarationDir: 'types',
|
|
24
24
|
}),
|
|
25
25
|
],
|
|
26
26
|
};
|