New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/msgraph-sdk-core

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/msgraph-sdk-core - npm Package Compare versions

Comparing version 1.0.0-preview.4 to 1.0.0-preview.5

dist/adapter/BaseGraphRequestAdapter.d.ts.map

1

dist/adapter/BaseGraphRequestAdapter.d.ts

@@ -19,1 +19,2 @@ import { AuthenticationProvider, ParseNodeFactory, SerializationWriterFactory } from "@microsoft/kiota-abstractions";

}
//# sourceMappingURL=BaseGraphRequestAdapter.d.ts.map

16

dist/adapter/BaseGraphRequestAdapter.js

@@ -1,11 +0,8 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseGraphRequestAdapter = void 0;
const kiota_abstractions_1 = require("@microsoft/kiota-abstractions");
const kiota_http_fetchlibrary_1 = require("@microsoft/kiota-http-fetchlibrary");
const GraphHttpClient_1 = require("../http/GraphHttpClient");
import { ParseNodeFactoryRegistry, SerializationWriterFactoryRegistry, } from "@microsoft/kiota-abstractions";
import { FetchRequestAdapter, ObservabilityOptionsImpl, } from "@microsoft/kiota-http-fetchlibrary";
import { GraphHttpClient } from "../http/GraphHttpClient";
/**
* Base request adapter for graph clients. Bootstraps telemetry and other aspects.
*/
class BaseGraphRequestAdapter extends kiota_http_fetchlibrary_1.FetchRequestAdapter {
export class BaseGraphRequestAdapter extends FetchRequestAdapter {
/**

@@ -21,10 +18,9 @@ * Instantiates a new request adapter.

*/
constructor(graphServiceTargetVersion, graphServiceLibraryClientVersion, authenticationProvider, parseNodeFactory = kiota_abstractions_1.ParseNodeFactoryRegistry.defaultInstance, serializationWriterFactory = kiota_abstractions_1.SerializationWriterFactoryRegistry.defaultInstance, httpClient = new GraphHttpClient_1.GraphHttpClient({
constructor(graphServiceTargetVersion, graphServiceLibraryClientVersion, authenticationProvider, parseNodeFactory = ParseNodeFactoryRegistry.defaultInstance, serializationWriterFactory = SerializationWriterFactoryRegistry.defaultInstance, httpClient = new GraphHttpClient({
graphServiceTargetVersion,
graphServiceLibraryClientVersion,
}), observabilityOptions = new kiota_http_fetchlibrary_1.ObservabilityOptionsImpl()) {
}), observabilityOptions = new ObservabilityOptionsImpl()) {
super(authenticationProvider, parseNodeFactory, serializationWriterFactory, httpClient, observabilityOptions);
}
}
exports.BaseGraphRequestAdapter = BaseGraphRequestAdapter;
//# sourceMappingURL=BaseGraphRequestAdapter.js.map
export * from "./BaseGraphRequestAdapter";
//# sourceMappingURL=index.d.ts.map

@@ -1,18 +0,2 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./BaseGraphRequestAdapter"), exports);
export * from "./BaseGraphRequestAdapter";
//# sourceMappingURL=index.js.map

@@ -15,1 +15,2 @@ import { HttpClient, type Middleware } from "@microsoft/kiota-http-fetchlibrary";

}
//# sourceMappingURL=GraphHttpClient.d.ts.map

@@ -1,10 +0,7 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GraphHttpClient = void 0;
const kiota_http_fetchlibrary_1 = require("@microsoft/kiota-http-fetchlibrary");
const middleware_1 = require("../middleware");
import { HttpClient } from "@microsoft/kiota-http-fetchlibrary";
import { getDefaultMiddlewares } from "../middleware";
/**
* Specialized version of the HTTP client for the Graph API that bootstraps telemetry, /me replacement, and other aspects
*/
class GraphHttpClient extends kiota_http_fetchlibrary_1.HttpClient {
export class GraphHttpClient extends HttpClient {
/**

@@ -19,3 +16,3 @@ * Creates a new instance of the GraphHttpClient class

? middlewares
: (0, middleware_1.getDefaultMiddlewares)({
: getDefaultMiddlewares({
customFetch,

@@ -26,3 +23,2 @@ graphTelemetryOption,

}
exports.GraphHttpClient = GraphHttpClient;
//# sourceMappingURL=GraphHttpClient.js.map
export * from "./GraphHttpClient";
//# sourceMappingURL=index.d.ts.map

@@ -1,18 +0,2 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./GraphHttpClient"), exports);
export * from "./GraphHttpClient";
//# sourceMappingURL=index.js.map

@@ -6,1 +6,2 @@ export * from "./adapter";

export * from "./utils/Version";
//# sourceMappingURL=index.d.ts.map

@@ -1,22 +0,6 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./adapter"), exports);
__exportStar(require("./http"), exports);
__exportStar(require("./middleware"), exports);
__exportStar(require("./utils/Constants"), exports);
__exportStar(require("./utils/Version"), exports);
export * from "./adapter";
export * from "./http";
export * from "./middleware";
export * from "./utils/Constants";
export * from "./utils/Version";
//# sourceMappingURL=index.js.map

@@ -12,1 +12,2 @@ import { TelemetryHandler } from "@microsoft/kiota-http-fetchlibrary";

}
//# sourceMappingURL=GraphTelemetryHandler.d.ts.map

@@ -1,10 +0,7 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GraphTelemetryHandler = void 0;
const kiota_http_fetchlibrary_1 = require("@microsoft/kiota-http-fetchlibrary");
const Version_1 = require("../utils/Version");
import { TelemetryHandler, appendRequestHeader } from "@microsoft/kiota-http-fetchlibrary";
import { coreVersion } from "../utils/Version";
/**
* Adds telemetry headers to requests made to the Graph API
*/
class GraphTelemetryHandler extends kiota_http_fetchlibrary_1.TelemetryHandler {
export class GraphTelemetryHandler extends TelemetryHandler {
/**

@@ -16,3 +13,3 @@ * Creates a new instance of the GraphTelemetryHandler class

const productPrefix = (_a = graphTelemetryOption.graphProductPrefix) !== null && _a !== void 0 ? _a : "graph-typescript";
const coreProduct = `${productPrefix}-core/${Version_1.coreVersion}`;
const coreProduct = `${productPrefix}-core/${coreVersion}`;
let product = "";

@@ -28,3 +25,3 @@ if (graphTelemetryOption.graphServiceLibraryClientVersion) {

telemetryConfigurator: (_url, requestInit, _requestOptions, _telemetryInformation) => {
(0, kiota_http_fetchlibrary_1.appendRequestHeader)(requestInit.headers, "SdkVersion", versionHeaderValue);
appendRequestHeader(requestInit.headers, "SdkVersion", versionHeaderValue);
},

@@ -35,3 +32,2 @@ getKey: () => "graphTelemetryOption",

}
exports.GraphTelemetryHandler = GraphTelemetryHandler;
//# sourceMappingURL=GraphTelemetryHandler.js.map

@@ -16,1 +16,2 @@ export interface GraphTelemetryOption {

}
//# sourceMappingURL=GraphTelemetryOption.d.ts.map

@@ -1,3 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
export {};
//# sourceMappingURL=GraphTelemetryOption.js.map
export * from "./GraphTelemetryOption";
export * from "./GraphTelemetryHandler";
export * from "./MiddlewareFactory";
//# sourceMappingURL=index.d.ts.map

@@ -1,20 +0,4 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./GraphTelemetryOption"), exports);
__exportStar(require("./GraphTelemetryHandler"), exports);
__exportStar(require("./MiddlewareFactory"), exports);
export * from "./GraphTelemetryOption";
export * from "./GraphTelemetryHandler";
export * from "./MiddlewareFactory";
//# sourceMappingURL=index.js.map

@@ -9,1 +9,2 @@ import { Middleware } from "@microsoft/kiota-http-fetchlibrary";

export {};
//# sourceMappingURL=MiddlewareFactory.d.ts.map

@@ -1,17 +0,14 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getDefaultMiddlewares = void 0;
const kiota_http_fetchlibrary_1 = require("@microsoft/kiota-http-fetchlibrary");
const GraphTelemetryHandler_1 = require("./GraphTelemetryHandler");
const Constants_1 = require("../utils/Constants");
const getDefaultMiddlewares = (options = { customFetch: fetch }) => {
let kiotaChain = kiota_http_fetchlibrary_1.MiddlewareFactory.getDefaultMiddlewares(options === null || options === void 0 ? void 0 : options.customFetch);
import { MiddlewareFactory, UrlReplaceHandler, UrlReplaceHandlerOptions, } from "@microsoft/kiota-http-fetchlibrary";
import { GraphTelemetryHandler } from "./GraphTelemetryHandler";
import { defaultUrlReplacementPairs } from "../utils/Constants";
export const getDefaultMiddlewares = (options = { customFetch: fetch }) => {
let kiotaChain = MiddlewareFactory.getDefaultMiddlewares(options === null || options === void 0 ? void 0 : options.customFetch);
const additionalMiddleware = [
new kiota_http_fetchlibrary_1.UrlReplaceHandler(new kiota_http_fetchlibrary_1.UrlReplaceHandlerOptions({
new UrlReplaceHandler(new UrlReplaceHandlerOptions({
enabled: true,
urlReplacements: Constants_1.defaultUrlReplacementPairs,
urlReplacements: defaultUrlReplacementPairs,
})),
];
if (options.graphTelemetryOption) {
additionalMiddleware.push(new GraphTelemetryHandler_1.GraphTelemetryHandler(options.graphTelemetryOption));
additionalMiddleware.push(new GraphTelemetryHandler(options.graphTelemetryOption));
}

@@ -23,3 +20,2 @@ const fetchMiddleware = kiotaChain.slice(-1);

};
exports.getDefaultMiddlewares = getDefaultMiddlewares;
//# sourceMappingURL=MiddlewareFactory.js.map
export declare const defaultUrlReplacementPairs: Record<string, string>;
//# sourceMappingURL=Constants.d.ts.map

@@ -1,7 +0,4 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultUrlReplacementPairs = void 0;
exports.defaultUrlReplacementPairs = {
export const defaultUrlReplacementPairs = {
"/users/TokenToReplace": "/me",
};
//# sourceMappingURL=Constants.js.map

@@ -1,1 +0,2 @@

export declare const coreVersion = "1.0.0-preview.4";
export declare const coreVersion = "1.0.0-preview.5";
//# sourceMappingURL=Version.d.ts.map

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.coreVersion = void 0;
exports.coreVersion = "1.0.0-preview.4";
export const coreVersion = "1.0.0-preview.5";
//# sourceMappingURL=Version.js.map

@@ -6,3 +6,3 @@ {

"name": "@microsoft/msgraph-sdk-core",
"version": "1.0.0-preview.4",
"version": "1.0.0-preview.5",
"description": "Core functionalities for the Microsoft Graph JavaScript SDK",

@@ -12,9 +12,6 @@ "main": "./dist/index.js",

"module": "./dist/index.js",
"type": "module",
"exports": {
".": "./dist/index.js"
},
"files": [
"dist",
"src"
],
"scripts": {

@@ -33,3 +30,3 @@ "prepare": "husky",

"test:ui": "vitest --ui",
"lint": "eslint -c ./.eslintrc.js \"src/**/*.ts\"",
"lint": "eslint -c ./.eslintrc.cjs \"src/**/*.ts\"",
"lint:fix": "npm run lint -- --fix",

@@ -39,3 +36,3 @@ "prettier:base": "prettier --parser typescript",

"prettier:fix": "npm run prettier:base -- --write \"src/**/*.{ts,tsx}\"",
"updateVersion": "node ./scripts/updateVersion.js"
"updateVersion": "node ./scripts/updateVersion.cjs"
},

@@ -42,0 +39,0 @@ "repository": {

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