Socket
Socket
Sign inDemoInstall

@microsoft/applicationinsights-angularplugin-js

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/applicationinsights-angularplugin-js - npm Package Compare versions

Comparing version 2.5.10 to 2.5.11

dist/bundles/microsoft-applicationinsights-angularplugin-js.umd.js

104

package.json
{
"name": "@microsoft/applicationinsights-angularplugin-js",
"version": "2.5.10",
"description": "Microsoft Application Insights Angular plugin",
"main": "dist/applicationinsights-angularplugin-js.js",
"module": "dist-esm/applicationinsights-angularplugin-js.js",
"types": "types/applicationinsights-angularplugin-js.d.ts",
"sideEffects": false,
"repository": {
"type": "git",
"url": "https://github.com/microsoft/ApplicationInsights-JS/tree/master/extensions/applicationinsights-angularplugin-js"
},
"scripts": {
"prepublishOnly": "npm install && npm run build",
"build": "npm run build:esm && npm run build:browser",
"build:esm": "tsc -p tsconfig.json",
"build:browser": "rollup -c",
"test": "cd Tests/test-app && npm install && ng test",
"lint": "tslint -p tsconfig.json"
},
"devDependencies": {
"@microsoft/applicationinsights-rollup-es3": "1.1.3",
"@microsoft/applicationinsights-properties-js": "2.5.10",
"@angular/core": "~8.1.2",
"@angular/router": "~8.1.2",
"grunt": "1.0.1",
"rollup": "^0.66.0",
"rollup-plugin-commonjs": "^9.3.4",
"rollup-plugin-node-resolve": "^3.4.0",
"rollup-plugin-replace": "^2.1.0",
"rollup-plugin-uglify": "^6.0.0",
"ts-node": "^8.3.0",
"typescript": "~3.4.3",
"rxjs": "~6.4.0",
"types": "^0.1.1",
"zone.js": "~0.9.1",
"@angular/common": "~8.1.2",
"@angular/platform-browser": "~8.1.2",
"tslint": "^5.19.0",
"tslint-config-prettier": "^1.18.0"
},
"dependencies": {
"@microsoft/applicationinsights-shims": "^1.0.3",
"@microsoft/applicationinsights-common": "2.5.10",
"@microsoft/applicationinsights-core-js": "2.5.10"
},
"license": "MIT"
"name": "@microsoft/applicationinsights-angularplugin-js",
"version": "2.5.11",
"description": "Microsoft Application Insights Angular plugin",
"main": "dist/bundles/microsoft-applicationinsights-angularplugin-js.umd.js",
"module": "dist/fesm2015/microsoft-applicationinsights-angularplugin-js.js",
"types": "dist/microsoft-applicationinsights-angularplugin-js.d.ts",
"metadata": "dist/microsoft-applicationinsights-angularplugin-js.metadata.json",
"repository": {
"type": "git",
"url": "https://github.com/microsoft/ApplicationInsights-JS/tree/master/extensions/applicationinsights-angularplugin-js"
},
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build --prod",
"test": "ng test",
"lint": "ng lint"
},
"dependencies": {
"@angular/animations": "~11.0.6",
"@angular/common": "~11.0.6",
"@angular/compiler": "~11.0.6",
"@angular/core": "~11.0.6",
"@angular/forms": "~11.0.6",
"@angular/platform-browser": "~11.0.6",
"@angular/platform-browser-dynamic": "~11.0.6",
"@angular/router": "~11.0.6",
"@microsoft/applicationinsights-common": "2.5.11",
"@microsoft/applicationinsights-core-js": "2.5.11",
"findup-sync": "^4.0.0",
"grunt-cli": "^1.3.2",
"nopt": "^5.0.0",
"pify": "^2.3.0",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1100.6",
"@angular/cli": "~11.0.6",
"@angular/compiler-cli": "~11.0.6",
"@types/jasmine": "~3.6.0",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.1.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"ng-packagr": "^11.0.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~4.0.2",
"@microsoft/applicationinsights-properties-js": "2.5.11"
}
}

@@ -11,3 +11,2 @@ # Microsoft Application Insights JavaScript SDK - Angular Plugin

- Tracking of router changes
- Angular components usage statistics

@@ -27,6 +26,7 @@ Angular Plugin for the Application Insights Javascript SDK

Set up an instance of Application Insights in the entry component in your app:
```js
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';
import { ApplicationInsights } from '@microsoft/applicationinsights-web';
import { AngularPlugin, AngularPluginService } from '@microsoft/applicationinsights-angularplugin-js';
import { AngularPlugin } from '@microsoft/applicationinsights-angularplugin-js';
import { Router } from '@angular/router';

@@ -39,11 +39,8 @@

})
export class AppComponent implements OnInit {
private appInsights;
export class AppComponent {
constructor(
private router: Router,
private angularPluginService: AngularPluginService
private router: Router
){
var angularPlugin = new AngularPlugin();
this.angularPluginService.init(angularPlugin, this.router);
this.appInsights = new ApplicationInsights({ config: {
const appInsights = new ApplicationInsights({ config: {
instrumentationKey: 'YOUR_INSTRUMENTATION_KEY_GOES_HERE',

@@ -55,43 +52,7 @@ extensions: [angularPlugin],

} });
appInsights.loadAppInsights();
}
ngOnInit() {
this.appInsights.loadAppInsights();
}
}
```
If you need to use trackMetric method to track Angular component usage, add `AngularPluginService` as a provider in providers list in `app.module.ts` file:
```js
import { AngularPluginService } from '@microsoft/applicationinsights-angularplugin-js';
@NgModule({
...
providers: [ AngularPluginService ],
})
export class AppModule { }
```
Make the `trackMetric` call in the `ngOnDestroy` method in the component you want to track the lifetime with. When this component gets destroyed, it will trigger a trackMetric event sent with the time user stayed on this page, and the component name.
```js
import { Component, OnDestroy, HostListener } from '@angular/core';
import { AngularPluginService } from '@microsoft/applicationinsights-angularplugin-js';
@Component({
selector: 'app-test',
templateUrl: './test.component.html',
styleUrls: ['./test.component.css']
})
export class TestComponent implements OnDestroy {
constructor(private angularPluginService: AngularPluginService) {}
@HostListener('window:beforeunload')
ngOnDestroy() {
this.angularPluginService.trackMetric();
}
}
```
## Contributing

@@ -101,6 +62,6 @@

Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.microsoft.com.
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.

@@ -112,11 +73,19 @@

## Trademarks
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
trademarks or logos is subject to and must follow
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
Any use of third-party trademarks or logos are subject to those third-party's policies.
### Note
Angular plugin is using newer version of typescript, make sure to build and test before you create a pull request.
Navigate to the root folder of Angular plugin, under /extensions/applicationinsights-angularplugin-js:
```
Angular plugin is using newer version of typescript, make sure to build and test before you create a pull request.
Navigate to the root folder of Angular plugin, under /applicationinsights-angularplugin-js:
```js
npm install
npm run build
npm run test
```

@@ -127,2 +96,1 @@

[MIT](LICENSE)
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "src",
"module": "es6",
"outDir": "dist-esm",
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": true,
"declarationDir": "./types",
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"rootDir": "./src",
"importHelpers": true,
"target": "es2015",
"module": "es2020",
"lib": [
"es2017",
"es2018",
"dom"
]
},
"include": [
"./src/*.ts"
],
"exclude": [
"node_modules"
]
],
"paths": {
"applicationinsights-angularplugin-js": [
"dist/applicationinsights-angularplugin-js/applicationinsights-angularplugin-js",
"dist/applicationinsights-angularplugin-js"
]
}
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc