@microsoft/applicationinsights-channel-js 2.8.7-nightly.2208-09 → 2.8.7

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.
Files changed (29) hide show
  1. package/browser/applicationinsights-channel-js.integrity.json +9 -9
  2. package/browser/applicationinsights-channel-js.js +10 -4
  3. package/browser/applicationinsights-channel-js.js.map +1 -1
  4. package/browser/applicationinsights-channel-js.min.js +2 -2
  5. package/browser/applicationinsights-channel-js.min.js.map +1 -1
  6. package/dist/applicationinsights-channel-js.api.json +10 -14
  7. package/dist/applicationinsights-channel-js.d.ts +1 -1
  8. package/dist/applicationinsights-channel-js.js +10 -4
  9. package/dist/applicationinsights-channel-js.js.map +1 -1
  10. package/dist/applicationinsights-channel-js.min.js +2 -2
  11. package/dist/applicationinsights-channel-js.min.js.map +1 -1
  12. package/dist/applicationinsights-channel-js.rollup.d.ts +1 -1
  13. package/dist-esm/EnvelopeCreator.js +2 -2
  14. package/dist-esm/EnvelopeCreator.js.map +1 -1
  15. package/dist-esm/Interfaces.js +1 -1
  16. package/dist-esm/InternalConstants.js +1 -1
  17. package/dist-esm/Offline.js +1 -1
  18. package/dist-esm/SendBuffer.js +1 -1
  19. package/dist-esm/Sender.js +10 -2
  20. package/dist-esm/Sender.js.map +1 -1
  21. package/dist-esm/Serializer.js +1 -1
  22. package/dist-esm/TelemetryProcessors/Sample.js +1 -1
  23. package/dist-esm/TelemetryProcessors/SamplingScoreGenerators/HashCodeScoreGenerator.js +1 -1
  24. package/dist-esm/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.js +1 -1
  25. package/dist-esm/__DynamicConstants.js +1 -1
  26. package/dist-esm/applicationinsights-channel-js.js +1 -1
  27. package/package.json +57 -60
  28. package/src/Sender.ts +9 -1
  29. package/types/tsdoc-metadata.json +1 -1
package/package.json CHANGED
@@ -1,60 +1,57 @@
1
- {
2
- "name": "@microsoft/applicationinsights-channel-js",
3
- "version": "2.8.7-nightly.2208-09",
4
- "description": "Microsoft Application Insights JavaScript SDK Channel",
5
- "homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
6
- "author": "Microsoft Application Insights Team",
7
- "main": "dist/applicationinsights-channel-js.js",
8
- "module": "dist-esm/applicationinsights-channel-js.js",
9
- "types": "types/applicationinsights-channel-js.d.ts",
10
- "sideEffects": false,
11
- "repository": "github:Microsoft/applicationinsights-js",
12
- "scripts": {
13
- "clean": "rm -rf browser dist dist-esm types",
14
- "build": "npm run build:esm && npm run build:browser && npm run sri && npm run dtsgen",
15
- "build:esm": "grunt aichannel",
16
- "build:browser": "rollup -c",
17
- "rebuild": "npm run build",
18
- "test": "grunt aichanneltest",
19
- "mintest": "grunt aichannel-mintest",
20
- "lint": "tslint -p tsconfig.json",
21
- "dtsgen": "api-extractor run --local && node ../../scripts/dtsgen.js \"Microsoft Application Insights JavaScript SDK Channel\"",
22
- "sri": "node ../../tools/subResourceIntegrity/generateIntegrityFile.js",
23
- "ai-min": "grunt aichannel-min",
24
- "ai-restore": "grunt aichannel-restore"
25
- },
26
- "devDependencies": {
27
- "@microsoft/ai-test-framework": "0.0.1",
28
- "@microsoft/applicationinsights-rollup-plugin-uglify3-js": "1.0.0",
29
- "@microsoft/applicationinsights-rollup-es3": "1.1.3",
30
- "@microsoft/api-extractor": "^7.18.1",
31
- "@types/sinon": "4.3.3",
32
- "grunt": "^1.5.3",
33
- "grunt-cli": "^1.4.3",
34
- "@nevware21/grunt-ts-plugin": "^0.4.3",
35
- "@nevware21/grunt-eslint-ts": "^0.2.2",
36
- "globby": "^11.0.0",
37
- "magic-string": "^0.25.7",
38
- "@rollup/plugin-commonjs": "^18.0.0",
39
- "@rollup/plugin-node-resolve": "^11.2.1",
40
- "@rollup/plugin-replace": "^2.3.3",
41
- "rollup-plugin-cleanup": "^3.2.1",
42
- "rollup": "^2.32.0",
43
- "typescript": "^4.3.4",
44
- "tslib": "^2.0.0",
45
- "sinon": "^7.3.1"
46
- },
47
- "peerDependencies": {
48
- "tslib": "*"
49
- },
50
- "dependencies": {
51
- "@microsoft/dynamicproto-js": "^1.1.6",
52
- "@microsoft/applicationinsights-shims": "2.0.1",
53
- "@microsoft/applicationinsights-core-js": "2.8.7-nightly.2208-09",
54
- "@microsoft/applicationinsights-common": "2.8.7-nightly.2208-09"
55
- },
56
- "license": "MIT",
57
- "publishConfig": {
58
- "tag": "nightly"
59
- }
60
- }
1
+ {
2
+ "name": "@microsoft/applicationinsights-channel-js",
3
+ "version": "2.8.7",
4
+ "description": "Microsoft Application Insights JavaScript SDK Channel",
5
+ "homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
6
+ "author": "Microsoft Application Insights Team",
7
+ "main": "dist/applicationinsights-channel-js.js",
8
+ "module": "dist-esm/applicationinsights-channel-js.js",
9
+ "types": "types/applicationinsights-channel-js.d.ts",
10
+ "sideEffects": false,
11
+ "repository": "github:Microsoft/applicationinsights-js",
12
+ "scripts": {
13
+ "clean": "rm -rf browser dist dist-esm types",
14
+ "build": "npm run build:esm && npm run build:browser && npm run sri && npm run dtsgen",
15
+ "build:esm": "grunt aichannel",
16
+ "build:browser": "rollup -c",
17
+ "rebuild": "npm run build",
18
+ "test": "grunt aichanneltest",
19
+ "mintest": "grunt aichannel-mintest",
20
+ "lint": "tslint -p tsconfig.json",
21
+ "dtsgen": "api-extractor run --local && node ../../scripts/dtsgen.js \"Microsoft Application Insights JavaScript SDK Channel\"",
22
+ "sri": "node ../../tools/subResourceIntegrity/generateIntegrityFile.js",
23
+ "ai-min": "grunt aichannel-min",
24
+ "ai-restore": "grunt aichannel-restore"
25
+ },
26
+ "devDependencies": {
27
+ "@microsoft/ai-test-framework": "0.0.1",
28
+ "@microsoft/applicationinsights-rollup-plugin-uglify3-js": "1.0.0",
29
+ "@microsoft/applicationinsights-rollup-es3": "1.1.3",
30
+ "@microsoft/api-extractor": "^7.18.1",
31
+ "@types/sinon": "4.3.3",
32
+ "grunt": "^1.5.3",
33
+ "grunt-cli": "^1.4.3",
34
+ "@nevware21/grunt-ts-plugin": "^0.4.3",
35
+ "@nevware21/grunt-eslint-ts": "^0.2.2",
36
+ "globby": "^11.0.0",
37
+ "magic-string": "^0.25.7",
38
+ "@rollup/plugin-commonjs": "^18.0.0",
39
+ "@rollup/plugin-node-resolve": "^11.2.1",
40
+ "@rollup/plugin-replace": "^2.3.3",
41
+ "rollup-plugin-cleanup": "^3.2.1",
42
+ "rollup": "^2.32.0",
43
+ "typescript": "^4.3.4",
44
+ "tslib": "^2.0.0",
45
+ "sinon": "^7.3.1"
46
+ },
47
+ "peerDependencies": {
48
+ "tslib": "*"
49
+ },
50
+ "dependencies": {
51
+ "@microsoft/dynamicproto-js": "^1.1.6",
52
+ "@microsoft/applicationinsights-shims": "2.0.1",
53
+ "@microsoft/applicationinsights-core-js": "2.8.7",
54
+ "@microsoft/applicationinsights-common": "2.8.7"
55
+ },
56
+ "license": "MIT"
57
+ }
package/src/Sender.ts CHANGED
@@ -218,9 +218,17 @@ export class Sender extends BaseTelemetryPlugin implements IChannelControlsAI {
218
218
  _evtNamespace = mergeEvtNamespace(createUniqueNamespace("Sender"), core.evtNamespace && core.evtNamespace());
219
219
  _offlineListener = createOfflineListener(_evtNamespace);
220
220
 
221
+ // TODO v3.x: Change the ISenderConfig to not be function calls
221
222
  const defaultConfig = _getDefaultAppInsightsChannelConfig();
222
223
  objForEachKey(defaultConfig, (field, value) => {
223
- _self._senderConfig[field] = () => ctx.getConfig(identifier, field, value());
224
+ _self._senderConfig[field] = () => {
225
+ let theValue = ctx.getConfig(identifier, field, value())
226
+ if (!theValue && field === "endpointUrl") {
227
+ // Use the default value (handles empty string in the configuration)
228
+ theValue = value();
229
+ }
230
+ return theValue;
231
+ }
224
232
  });
225
233
 
226
234
  _self._buffer = (_self._senderConfig.enableSessionStorageBuffer() && utlCanUseSessionStorage())
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.29.0"
8
+ "packageVersion": "7.30.0"
9
9
  }
10
10
  ]
11
11
  }