Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/mgt-element

Package Overview
Dependencies
Maintainers
9
Versions
831
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/mgt-element - npm Package Compare versions

Comparing version 2.2.0-preview.78568fa to 2.2.0-preview.8178bb8

2

dist/es6/Graph.js

@@ -124,3 +124,3 @@ /**

new TelemetryHandler(),
new SdkVersionMiddleware(PACKAGE_VERSION),
new SdkVersionMiddleware(PACKAGE_VERSION, provider.name),
new HTTPMessageHandler()

@@ -127,0 +127,0 @@ ];

@@ -46,3 +46,10 @@ /**

getAccessToken(): Promise<string>;
/**
* Name used for analytics
*
* @readonly
* @memberof IProvider
*/
get name(): string;
}
//# sourceMappingURL=MockProvider.d.ts.map

@@ -76,3 +76,12 @@ /**

}
/**
* Name used for analytics
*
* @readonly
* @memberof IProvider
*/
get name() {
return 'MgtMockProvider';
}
}
//# sourceMappingURL=MockProvider.js.map

@@ -37,2 +37,9 @@ /**

get state(): ProviderState;
/**
* Name used for analytics
*
* @readonly
* @memberof IProvider
*/
get name(): string;
constructor();

@@ -75,3 +82,3 @@ /**

/**
* uses scopes to recieve access token
* uses scopes to receive access token
*

@@ -78,0 +85,0 @@ * @param {...string[]} scopes

@@ -32,2 +32,11 @@ /**

/**
* Name used for analytics
*
* @readonly
* @memberof IProvider
*/
get name() {
return 'MgtIProvider';
}
/**
* sets state of Provider and fires loginchangedDispatcher

@@ -63,3 +72,3 @@ *

/**
* uses scopes to recieve access token
* uses scopes to receive access token
*

@@ -66,0 +75,0 @@ * @param {...string[]} scopes

@@ -20,2 +20,9 @@ /**

private _logoutHandler;
/**
* Name used for analytics
*
* @readonly
* @memberof IProvider
*/
get name(): string;
constructor(getAccessTokenHandler: (scopes: string[]) => Promise<string>, loginHandler?: () => Promise<void>, logoutHandler?: () => Promise<void>);

@@ -22,0 +29,0 @@ /**

@@ -25,2 +25,11 @@ /**

/**
* Name used for analytics
*
* @readonly
* @memberof IProvider
*/
get name() {
return 'MgtSimpleProvider';
}
/**
* Invokes the getAccessToken function

@@ -27,0 +36,0 @@ *

@@ -130,2 +130,5 @@ /**

}
else if (r.headers['Content-Type'].includes('image/pjpeg')) {
response.content = 'data:image/pjpeg;base64,' + r.body;
}
else {

@@ -132,0 +135,0 @@ response.content = r.body;

@@ -22,3 +22,4 @@ /**

private _packageVersion;
constructor(packageVersion: string);
private _providerName;
constructor(packageVersion: string, providerName?: string);
execute(context: Context): Promise<void>;

@@ -25,0 +26,0 @@ /**

@@ -26,4 +26,5 @@ /**

export class SdkVersionMiddleware {
constructor(packageVersion) {
constructor(packageVersion, providerName) {
this._packageVersion = packageVersion;
this._providerName = providerName;
}

@@ -41,2 +42,6 @@ // tslint:disable-next-line: completed-docs

}
if (this._providerName) {
const providerVersion = `${this._providerName}/${this._packageVersion}`;
headerParts.push(providerVersion);
}
// Package version

@@ -43,0 +48,0 @@ const packageVersion = `mgt/${this._packageVersion}`;

{
"name": "@microsoft/mgt-element",
"version": "2.2.0-preview.78568fa",
"version": "2.2.0-preview.8178bb8",
"description": "Microsoft Graph Toolkit base classes",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/microsoftgraph/microsoft-graph-toolkit",

@@ -154,3 +154,3 @@ /**

new TelemetryHandler(),
new SdkVersionMiddleware(PACKAGE_VERSION),
new SdkVersionMiddleware(PACKAGE_VERSION, provider.name),
new HTTPMessageHandler()

@@ -157,0 +157,0 @@ ];

@@ -48,2 +48,3 @@ /**

}
/**

@@ -60,2 +61,3 @@ * sets Provider state to signed out

}
/**

@@ -70,2 +72,12 @@ * Promise returning token from graph.microsoft.com

}
/**
* Name used for analytics
*
* @readonly
* @memberof IProvider
*/
public get name() {
return 'MgtMockProvider';
}
}

@@ -42,2 +42,12 @@ /**

/**
* Name used for analytics
*
* @readonly
* @memberof IProvider
*/
public get name() {
return 'MgtIProvider';
}
constructor() {

@@ -96,3 +106,3 @@ this._state = ProviderState.Loading;

/**
* uses scopes to recieve access token
* uses scopes to receive access token
*

@@ -99,0 +109,0 @@ * @param {...string[]} scopes

@@ -24,2 +24,12 @@ /**

/**
* Name used for analytics
*
* @readonly
* @memberof IProvider
*/
public get name() {
return 'MgtSimpleProvider';
}
constructor(

@@ -26,0 +36,0 @@ getAccessTokenHandler: (scopes: string[]) => Promise<string>,

@@ -190,2 +190,4 @@ /**

response.content = 'data:image/jpeg;base64,' + r.body;
} else if (r.headers['Content-Type'].includes('image/pjpeg')) {
response.content = 'data:image/pjpeg;base64,' + r.body;
} else {

@@ -192,0 +194,0 @@ response.content = r.body;

@@ -26,5 +26,7 @@ /**

private _packageVersion: string;
private _providerName: string;
constructor(packageVersion: string) {
constructor(packageVersion: string, providerName?: string) {
this._packageVersion = packageVersion;
this._providerName = providerName;
}

@@ -47,2 +49,7 @@

if (this._providerName) {
const providerVersion: string = `${this._providerName}/${this._packageVersion}`;
headerParts.push(providerVersion);
}
// Package version

@@ -49,0 +56,0 @@ const packageVersion: string = `mgt/${this._packageVersion}`;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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