@microsoft/applicationinsights-cfgsync-js 3.4.0-nightlybeta3.2505-36 → 3.4.0-nightlybeta3.2507-23
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/README.md +10 -10
- package/browser/es5/{ai.cfgsync.3.4.0-nightlybeta3.2505-36.cjs.js → ai.cfgsync.3.4.0-nightlybeta3.2507-23.cjs.js} +18 -19
- package/browser/es5/ai.cfgsync.3.4.0-nightlybeta3.2507-23.cjs.js.map +1 -0
- package/browser/es5/{ai.cfgsync.3.4.0-nightlybeta3.2505-36.cjs.min.js → ai.cfgsync.3.4.0-nightlybeta3.2507-23.cjs.min.js} +3 -3
- package/browser/es5/{ai.cfgsync.3.4.0-nightlybeta3.2505-36.cjs.min.js.map → ai.cfgsync.3.4.0-nightlybeta3.2507-23.cjs.min.js.map} +1 -1
- package/browser/es5/{ai.cfgsync.3.4.0-nightlybeta3.2505-36.gbl.js → ai.cfgsync.3.4.0-nightlybeta3.2507-23.gbl.js} +20 -21
- package/browser/es5/ai.cfgsync.3.4.0-nightlybeta3.2507-23.gbl.js.map +1 -0
- package/browser/es5/ai.cfgsync.3.4.0-nightlybeta3.2507-23.gbl.min.js +6 -0
- package/browser/es5/{ai.cfgsync.3.4.0-nightlybeta3.2505-36.gbl.min.js.map → ai.cfgsync.3.4.0-nightlybeta3.2507-23.gbl.min.js.map} +1 -1
- package/browser/es5/ai.cfgsync.3.4.0-nightlybeta3.2507-23.integrity.json +66 -0
- package/browser/es5/{ai.cfgsync.3.4.0-nightlybeta3.2505-36.js → ai.cfgsync.3.4.0-nightlybeta3.2507-23.js} +20 -21
- package/browser/es5/ai.cfgsync.3.4.0-nightlybeta3.2507-23.js.map +1 -0
- package/browser/es5/ai.cfgsync.3.4.0-nightlybeta3.2507-23.min.js +6 -0
- package/browser/es5/{ai.cfgsync.3.4.0-nightlybeta3.2505-36.min.js.map → ai.cfgsync.3.4.0-nightlybeta3.2507-23.min.js.map} +1 -1
- package/browser/es5/ai.cfgsync.3.cjs.js +17 -18
- package/browser/es5/ai.cfgsync.3.cjs.js.map +1 -1
- package/browser/es5/ai.cfgsync.3.cjs.min.js +2 -2
- package/browser/es5/ai.cfgsync.3.cjs.min.js.map +1 -1
- package/browser/es5/ai.cfgsync.3.gbl.js +19 -20
- package/browser/es5/ai.cfgsync.3.gbl.js.map +1 -1
- package/browser/es5/ai.cfgsync.3.gbl.min.js +2 -2
- package/browser/es5/ai.cfgsync.3.gbl.min.js.map +1 -1
- package/browser/es5/ai.cfgsync.3.integrity.json +25 -25
- package/browser/es5/ai.cfgsync.3.js +19 -20
- package/browser/es5/ai.cfgsync.3.js.map +1 -1
- package/browser/es5/ai.cfgsync.3.min.js +2 -2
- package/browser/es5/ai.cfgsync.3.min.js.map +1 -1
- package/dist/es5/applicationinsights-cfgsync-js.js +17 -18
- package/dist/es5/applicationinsights-cfgsync-js.js.map +1 -1
- package/dist/es5/applicationinsights-cfgsync-js.min.js +2 -2
- package/dist/es5/applicationinsights-cfgsync-js.min.js.map +1 -1
- package/dist-es5/CfgSyncHelperFuncs.js +1 -1
- package/dist-es5/CfgSyncPlugin.js +1 -1
- package/dist-es5/Interfaces/ICfgSyncCdnConfig.js +1 -1
- package/dist-es5/Interfaces/ICfgSyncConfig.js +1 -1
- package/dist-es5/Interfaces/ICfgSyncPlugin.js +1 -1
- package/dist-es5/__DynamicConstants.js +1 -1
- package/dist-es5/applicationinsights-cfgsync-js.js +1 -1
- package/package.json +3 -3
- package/types/applicationinsights-cfgsync-js.d.ts +1 -1
- package/types/applicationinsights-cfgsync-js.namespaced.d.ts +283 -14
- package/browser/es5/ai.cfgsync.3.4.0-nightlybeta3.2505-36.cjs.js.map +0 -1
- package/browser/es5/ai.cfgsync.3.4.0-nightlybeta3.2505-36.gbl.js.map +0 -1
- package/browser/es5/ai.cfgsync.3.4.0-nightlybeta3.2505-36.gbl.min.js +0 -6
- package/browser/es5/ai.cfgsync.3.4.0-nightlybeta3.2505-36.integrity.json +0 -66
- package/browser/es5/ai.cfgsync.3.4.0-nightlybeta3.2505-36.js.map +0 -1
- package/browser/es5/ai.cfgsync.3.4.0-nightlybeta3.2505-36.min.js +0 -6
package/README.md
CHANGED
|
@@ -8,19 +8,19 @@
|
|
|
8
8
|
Application Insights CfgSync Plugin enables configuration change communication among mutiple instances.
|
|
9
9
|
Refer to [our GitHub page](https://github.com/microsoft/ApplicationInsights-JS) for more details on getting started.
|
|
10
10
|
|
|
11
|
-
## Configuration
|
|
11
|
+
## [Configuration](https://microsoft.github.io/ApplicationInsights-JS/webSdk/applicationinsights-cfgsync-js/interfaces/ICfgSyncConfig.html)
|
|
12
12
|
|
|
13
13
|
| Name | Type | Default | Description |
|
|
14
14
|
|------|------|---------|-------------|
|
|
15
|
-
| syncMode | ICfgSyncMode<br>[Optional]| Broadcast | Sync mode of current instance. If set to `None`, current instance will NOT receive or broadcast config changes. If set to `Broadcast`, current instance will ONLY broadcast changes. If set to `Receive`, instance will ONLY receive config changes but NOT broadcast config changes. |
|
|
16
|
-
| customEvtName | string<br>[Optional] | ai_cfgsync | Event name for sending or listening to configuration change details. |
|
|
17
|
-
| cfgUrl | string<br>[Optional] | null | CDN endpoint for fetching configuration. If cfgUrl is defined, instance will NOT listen to core configuration changes. Details defined in the CDN endpoint should follow `ICfgSyncCdnConfig` interface. |
|
|
18
|
-
| blkCdnCfg | boolean<br>[Optional] | false | Determines if fetching the CDN endpoint should be blocked or not. |
|
|
19
|
-
| onCfgChangeReceive | function<br>[Optional] | null | Overrides callback function to handle event details when changes are received via event listener. |
|
|
20
|
-
| overrideSyncFn | function<br>[Optional] | null | Overrides sync() function to broadcast changes. |
|
|
21
|
-
| overrideFetchFn | function<br>[Optional] | null | Overrides fetch function to get config from cfgUrl when cfgUrl is defined. |
|
|
22
|
-
| nonOverrideConfigs | NonOverrideCfg<br>[Optional] | {instrumentationKey: true, connectionString: true, endpointUrl: true } | When current instance is set with syncMode: `Receive`, config fields under nonOverrideConfigs will NOT be changed by any confif details sent out from other instances. NOTE: this config will be ONLY applied during initialization, so it won't be changed dynamically. |
|
|
23
|
-
| scheduleFetchTimeout | number<br>[Optional] | 30 mins | Identifies the time interval (in milliseconds) for fetching config details from cfgUrl when cfgUrl is defined. If set to 0, the fetch operation will only be called once during initialization. |
|
|
15
|
+
| [syncMode](https://microsoft.github.io/ApplicationInsights-JS/webSdk/applicationinsights-cfgsync-js/interfaces/ICfgSyncConfig.html#syncMode) | ICfgSyncMode<br>[Optional]| Broadcast | Sync mode of current instance. If set to `None`, current instance will NOT receive or broadcast config changes. If set to `Broadcast`, current instance will ONLY broadcast changes. If set to `Receive`, instance will ONLY receive config changes but NOT broadcast config changes. |
|
|
16
|
+
| [customEvtName](https://microsoft.github.io/ApplicationInsights-JS/webSdk/applicationinsights-cfgsync-js/interfaces/ICfgSyncConfig.html#customEvtName) | string<br>[Optional] | ai_cfgsync | Event name for sending or listening to configuration change details. |
|
|
17
|
+
| [cfgUrl](https://microsoft.github.io/ApplicationInsights-JS/webSdk/applicationinsights-cfgsync-js/interfaces/ICfgSyncConfig.html#cfgUrl) | string<br>[Optional] | null | CDN endpoint for fetching configuration. If cfgUrl is defined, instance will NOT listen to core configuration changes. Details defined in the CDN endpoint should follow `ICfgSyncCdnConfig` interface. |
|
|
18
|
+
| [blkCdnCfg](https://microsoft.github.io/ApplicationInsights-JS/webSdk/applicationinsights-cfgsync-js/interfaces/ICfgSyncConfig.html#blkCdnCfg) | boolean<br>[Optional] | false | Determines if fetching the CDN endpoint should be blocked or not. |
|
|
19
|
+
| [onCfgChangeReceive](https://microsoft.github.io/ApplicationInsights-JS/webSdk/applicationinsights-cfgsync-js/interfaces/ICfgSyncConfig.html#onCfgChangeReceive) | function<br>[Optional] | null | Overrides callback function to handle event details when changes are received via event listener. |
|
|
20
|
+
| [overrideSyncFn](https://microsoft.github.io/ApplicationInsights-JS/webSdk/applicationinsights-cfgsync-js/interfaces/ICfgSyncConfig.html#overrideSyncFn) | function<br>[Optional] | null | Overrides sync() function to broadcast changes. |
|
|
21
|
+
| [overrideFetchFn](https://microsoft.github.io/ApplicationInsights-JS/webSdk/applicationinsights-cfgsync-js/interfaces/ICfgSyncConfig.html#overrideFetchFn) | function<br>[Optional] | null | Overrides fetch function to get config from cfgUrl when cfgUrl is defined. |
|
|
22
|
+
| [nonOverrideConfigs](https://microsoft.github.io/ApplicationInsights-JS/webSdk/applicationinsights-cfgsync-js/interfaces/ICfgSyncConfig.html#nonOverrideConfigs) | NonOverrideCfg<br>[Optional] | {instrumentationKey: true, connectionString: true, endpointUrl: true } | When current instance is set with syncMode: `Receive`, config fields under nonOverrideConfigs will NOT be changed by any confif details sent out from other instances. NOTE: this config will be ONLY applied during initialization, so it won't be changed dynamically. |
|
|
23
|
+
| [scheduleFetchTimeout](https://microsoft.github.io/ApplicationInsights-JS/webSdk/applicationinsights-cfgsync-js/interfaces/ICfgSyncConfig.html#scheduleFetchTimeout) | number<br>[Optional] | 30 mins | Identifies the time interval (in milliseconds) for fetching config details from cfgUrl when cfgUrl is defined. If set to 0, the fetch operation will only be called once during initialization. |
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
## Contributing
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Properties Plugin, 3.4.0-nightlybeta3.
|
|
2
|
+
* Application Insights JavaScript SDK - Properties Plugin, 3.4.0-nightlybeta3.2507-23
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -1614,7 +1614,7 @@ function newId(maxLength) {
|
|
|
1614
1614
|
return result;
|
|
1615
1615
|
}
|
|
1616
1616
|
|
|
1617
|
-
var version = '3.4.0-nightlybeta3.
|
|
1617
|
+
var version = '3.4.0-nightlybeta3.2507-23';
|
|
1618
1618
|
var instanceName = "." + newId(6);
|
|
1619
1619
|
var _dataUid = 0;
|
|
1620
1620
|
function _canAcceptData(target) {
|
|
@@ -2678,27 +2678,26 @@ function _createInternalContext(telemetryChain, dynamicHandler, core, startAt) {
|
|
|
2678
2678
|
}
|
|
2679
2679
|
function _getExtCfg(identifier, createIfMissing) {
|
|
2680
2680
|
var idCfg = null;
|
|
2681
|
-
var
|
|
2681
|
+
var extCfg = _getCfg(dynamicHandler.cfg, "extensionConfig", createIfMissing);
|
|
2682
|
+
if (extCfg) {
|
|
2683
|
+
idCfg = _getCfg(extCfg, identifier, createIfMissing);
|
|
2684
|
+
}
|
|
2685
|
+
return idCfg;
|
|
2686
|
+
}
|
|
2687
|
+
function _getCfg(cfg, identifier, createIfMissing) {
|
|
2688
|
+
var idCfg = null;
|
|
2682
2689
|
if (cfg && identifier) {
|
|
2683
|
-
|
|
2684
|
-
if (!
|
|
2685
|
-
|
|
2686
|
-
}
|
|
2687
|
-
cfg[STR_EXTENSION_CONFIG] = extCfg;
|
|
2688
|
-
extCfg = dynamicHandler.ref(cfg, STR_EXTENSION_CONFIG);
|
|
2689
|
-
if (extCfg) {
|
|
2690
|
-
idCfg = extCfg[identifier];
|
|
2691
|
-
if (!idCfg && createIfMissing) {
|
|
2692
|
-
idCfg = {};
|
|
2693
|
-
}
|
|
2694
|
-
extCfg[identifier] = idCfg;
|
|
2695
|
-
idCfg = dynamicHandler.ref(extCfg, identifier);
|
|
2690
|
+
idCfg = cfg[identifier];
|
|
2691
|
+
if (!idCfg && createIfMissing) {
|
|
2692
|
+
idCfg = {};
|
|
2696
2693
|
}
|
|
2694
|
+
cfg[identifier] = idCfg;
|
|
2695
|
+
idCfg = dynamicHandler.ref(cfg, identifier);
|
|
2697
2696
|
}
|
|
2698
2697
|
return idCfg;
|
|
2699
2698
|
}
|
|
2700
|
-
function _resolveExtCfg(identifier, defaultValues) {
|
|
2701
|
-
var newConfig = _getExtCfg(identifier, true);
|
|
2699
|
+
function _resolveExtCfg(identifier, defaultValues, rootOnly) {
|
|
2700
|
+
var newConfig = rootOnly ? _getCfg(dynamicHandler.cfg, identifier, true) : _getExtCfg(identifier, true);
|
|
2702
2701
|
if (defaultValues) {
|
|
2703
2702
|
objForEachKey(defaultValues, function (field, defaultValue) {
|
|
2704
2703
|
if (isNullOrUndefined(newConfig[field])) {
|
|
@@ -3796,4 +3795,4 @@ var CfgSyncPlugin = /** @class */ (function (_super) {
|
|
|
3796
3795
|
}(BaseTelemetryPlugin));
|
|
3797
3796
|
|
|
3798
3797
|
exports.CfgSyncPlugin = CfgSyncPlugin;
|
|
3799
|
-
//# sourceMappingURL=ai.cfgsync.3.4.0-nightlybeta3.
|
|
3798
|
+
//# sourceMappingURL=ai.cfgsync.3.4.0-nightlybeta3.2507-23.cjs.js.map
|