@microsoft/sp-http-msgraph 1.23.2 → 1.24.0-beta.2
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/dist/aec2bbfd-a968-4d5b-a279-12e570f378e6.manifest.json +132 -142
- package/dist/chunk.sp-http-msgraphclient_none_c219d50ed0c3718eb04c.js +2 -0
- package/dist/chunk.sp-http-msgraphclientv3_none_f69d5240fbc396e22113.js +2 -0
- package/dist/sp-http-msgraph_default_b1a01d6b4cff75fbeb8b.js +2 -0
- package/dist/sp-http-msgraph_en-us_c25b4ebcf02eb1bfeda7.js +2 -0
- package/dist/sp-http-msgraph_qps-ploc_e3ac749f677a1d25e5d1.js +2 -0
- package/dist/sp-http-msgraph_qps-ploca_1b3894e46de77590c544.js +2 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/lib-commonjs/KillSwitches.js +16 -0
- package/lib-commonjs/MSGraphAuthenticationProvider.js +39 -33
- package/lib-commonjs/MSGraphClient.js +71 -82
- package/lib-commonjs/MSGraphClientFactory.js +73 -79
- package/lib-commonjs/MSGraphClientV3.js +135 -156
- package/lib-commonjs/common/Killswitches.js +26 -16
- package/lib-commonjs/index.js +23 -12
- package/lib-dts/KillSwitches.d.ts +2 -0
- package/lib-esm/KillSwitches.js +6 -0
- package/lib-esm/MSGraphAuthenticationProvider.js +49 -0
- package/lib-esm/MSGraphClient.js +97 -0
- package/lib-esm/MSGraphClientFactory.js +94 -0
- package/lib-esm/MSGraphClientV3.js +190 -0
- package/{lib → lib-esm}/common/Killswitches.js +5 -10
- package/{lib → lib-esm}/index.js +3 -3
- package/package.json +39 -8
- package/dist/chunk.sp-http-msgraphclient_none_99a41fce9bf3925a21e2.js +0 -2
- package/dist/chunk.sp-http-msgraphclientv3_none_c34e76d04711b268a3cd.js +0 -2
- package/dist/sp-http-msgraph_default_6e69c31eaaed44b5aab3.js +0 -1
- package/dist/sp-http-msgraph_en-us_26c6c90f8da57ad234d5.js +0 -1
- package/dist/sp-http-msgraph_qps-ploc_db5eb720e90b9545bca7.js +0 -1
- package/dist/sp-http-msgraph_qps-ploca_cb2655427d0c64681f92.js +0 -1
- package/lib/MSGraphAuthenticationProvider.d.ts.map +0 -1
- package/lib/MSGraphAuthenticationProvider.js +0 -50
- package/lib/MSGraphClient.d.ts.map +0 -1
- package/lib/MSGraphClient.js +0 -104
- package/lib/MSGraphClientFactory.d.ts.map +0 -1
- package/lib/MSGraphClientFactory.js +0 -106
- package/lib/MSGraphClientV3.d.ts.map +0 -1
- package/lib/MSGraphClientV3.js +0 -206
- package/lib/common/Killswitches.d.ts.map +0 -1
- package/lib/index.d.ts.map +0 -1
- /package/{lib → lib-dts}/MSGraphAuthenticationProvider.d.ts +0 -0
- /package/{lib → lib-dts}/MSGraphClient.d.ts +0 -0
- /package/{lib → lib-dts}/MSGraphClientFactory.d.ts +0 -0
- /package/{lib → lib-dts}/MSGraphClientV3.d.ts +0 -0
- /package/{lib → lib-dts}/SPHttpMsGraphStrings.resx.d.ts +0 -0
- /package/{lib → lib-dts}/common/Killswitches.d.ts +0 -0
- /package/{lib → lib-dts}/index.d.ts +0 -0
- /package/{lib → lib-esm}/SPHttpMsGraphStrings.resx.json +0 -0
- /package/{lib → lib-esm}/sp-http-msgraph.manifest.json +0 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { ServiceKey, _SPKillSwitch } from '@microsoft/sp-core-library';
|
|
2
|
+
import { _QosMonitor } from '@microsoft/sp-diagnostics';
|
|
3
|
+
import MSGraphClient from './MSGraphClient';
|
|
4
|
+
class MSGraphClientFactory {
|
|
5
|
+
getClient(version, options) {
|
|
6
|
+
if (!version || version === '1') {
|
|
7
|
+
// returns a v1 version of MSGraphClient
|
|
8
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */ if (!MSGraphClient._instance) {
|
|
9
|
+
return import(/* webpackChunkName: 'sp-http-msgraphclient' */ '@microsoft/microsoft-graph-clientv1/lib/graph-js-sdk-web').then(()=>{
|
|
10
|
+
return new MSGraphClient(this._serviceScope);
|
|
11
|
+
});
|
|
12
|
+
} else {
|
|
13
|
+
return Promise.resolve(new MSGraphClient(this._serviceScope));
|
|
14
|
+
}
|
|
15
|
+
} else if (version === '3' && !_SPKillSwitch.isActivated('24401914-15d6-4c3c-aeea-4aace46d5586' /* '01/06/2022', 'use new MSGraphVersion' */ )) {
|
|
16
|
+
const qosMonitor = new _QosMonitor('MSGraphClientFactory.GetClientV3');
|
|
17
|
+
// returns a v3 version of MSGraphClient
|
|
18
|
+
// Should only import once no matter how many times it is called
|
|
19
|
+
return import(/* webpackChunkName: 'sp-http-msgraphclientv3' */ './MSGraphClientV3').then((msGraphClientV3)=>{
|
|
20
|
+
// We create a new object every time rather than referencing an existing object in case the service scope changes
|
|
21
|
+
qosMonitor.writeSuccess({
|
|
22
|
+
version: 3,
|
|
23
|
+
options: !!options
|
|
24
|
+
});
|
|
25
|
+
return new msGraphClientV3.default(this._serviceScope, options, undefined);
|
|
26
|
+
}).catch((error)=>{
|
|
27
|
+
qosMonitor.writeUnexpectedFailure('ImportMSGraphV3ChunkFailed', error);
|
|
28
|
+
throw error;
|
|
29
|
+
});
|
|
30
|
+
} else {
|
|
31
|
+
const errorMessage = 'Not yet implemented.';
|
|
32
|
+
throw Error(errorMessage);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Returns an instance of the MSGraphClient that communicates with the current tenant's configurable Service Pricipal.
|
|
37
|
+
* Allows to specify custom middleware options.
|
|
38
|
+
*
|
|
39
|
+
* @param version - The version of the Graph API to use. 3.
|
|
40
|
+
* @param options - Client options for the Graph API.
|
|
41
|
+
*/ getClientWithMiddleware(version, options) {
|
|
42
|
+
const qosMonitor = new _QosMonitor('MSGraphClientFactory.GetClientV3WithMiddleware');
|
|
43
|
+
// returns a v3 version of MSGraphClient
|
|
44
|
+
// Should only import once no matter how many times it is called
|
|
45
|
+
return import(/* webpackChunkName: 'sp-http-msgraphclientv3' */ './MSGraphClientV3').then((msGraphClientV3)=>{
|
|
46
|
+
// We create a new object every time rather than referencing an existing object in case the service scope changes
|
|
47
|
+
qosMonitor.writeSuccess({
|
|
48
|
+
version: 3
|
|
49
|
+
});
|
|
50
|
+
return new msGraphClientV3.default(this._serviceScope, undefined, options);
|
|
51
|
+
}).catch((error)=>{
|
|
52
|
+
qosMonitor.writeUnexpectedFailure('ImportMSGraphV3ChunkFailed', error);
|
|
53
|
+
throw error;
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Returns a v3 version of MSGraphClient with the 1P App Principal
|
|
58
|
+
*
|
|
59
|
+
* @internal
|
|
60
|
+
*
|
|
61
|
+
*/ getClientInternal(version, options) {
|
|
62
|
+
const qosMonitor = new _QosMonitor('MSGraphClientFactory.GetInternalClientV3');
|
|
63
|
+
// Should only import once no matter how many times it is called
|
|
64
|
+
return import(/* webpackChunkName: 'sp-http-msgraphclientv3' */ './MSGraphClientV3').then((msGraphClientV3)=>{
|
|
65
|
+
// We create a new object every time rather than referencing an existing object in case the service scope changes
|
|
66
|
+
qosMonitor.writeSuccess({
|
|
67
|
+
version: 3,
|
|
68
|
+
options: !!options
|
|
69
|
+
});
|
|
70
|
+
return new msGraphClientV3.default(this._serviceScope, options, undefined, true);
|
|
71
|
+
}).catch((error)=>{
|
|
72
|
+
qosMonitor.writeUnexpectedFailure('ImportMSGraphV3ChunkFailed', error);
|
|
73
|
+
throw error;
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* @param serviceScope - Provides services for the MSGraphClient to consume.
|
|
78
|
+
*
|
|
79
|
+
* @internal
|
|
80
|
+
*/ constructor(serviceScope){
|
|
81
|
+
this._serviceScope = serviceScope;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The service key for MSGraphClientFactory.
|
|
86
|
+
*/ MSGraphClientFactory.serviceKey = ServiceKey.create('sp-http:MSGraphClientFactory', MSGraphClientFactory);
|
|
87
|
+
/**
|
|
88
|
+
* Returns a preinitialized version of the MSGraphClient.
|
|
89
|
+
* For more information: {@link https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-msgraph}
|
|
90
|
+
*
|
|
91
|
+
* @public
|
|
92
|
+
*/ export { MSGraphClientFactory as default };
|
|
93
|
+
|
|
94
|
+
//# sourceMappingURL=./MSGraphClientFactory.js.map
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { _ClientManifestData, Validate } from '@microsoft/sp-core-library';
|
|
2
|
+
import { _QosMonitor } from '@microsoft/sp-diagnostics';
|
|
3
|
+
import { Client as _InternalGraphClient, AuthenticationHandler, MiddlewareFactory } from '@msinternal/ms-graph-v3-bundle';
|
|
4
|
+
import { _GraphHttpClientContext, _AadTokenProviders, _SPRequestRateMonitor } from '@microsoft/sp-http-base';
|
|
5
|
+
import { isCustomHostsKSActivated, isPassSdkVersionKSActivated, isRequestRateMonitorKSActivated } from './common/Killswitches';
|
|
6
|
+
import { MSGraphAuthenticationProvider } from './MSGraphAuthenticationProvider';
|
|
7
|
+
class MSGraphClientV3 {
|
|
8
|
+
/**
|
|
9
|
+
* All calls to Microsoft Graph are chained together starting with the api function.
|
|
10
|
+
*
|
|
11
|
+
* @remarks Path supports the following formats:
|
|
12
|
+
* * me
|
|
13
|
+
* * /me
|
|
14
|
+
* * https://graph.microsoft.com/v1.0/me
|
|
15
|
+
* * https://graph.microsoft.com/beta/me
|
|
16
|
+
* * me/events?$filter=startswith(subject, 'ship')
|
|
17
|
+
*
|
|
18
|
+
* The authProvider and baseUrl option should not be used, as they have already been
|
|
19
|
+
* provided by the framework. See the official documentation here:
|
|
20
|
+
* https://github.com/microsoftgraph/msgraph-sdk-javascript
|
|
21
|
+
*
|
|
22
|
+
* @param path - The path for the request to MSGraph.
|
|
23
|
+
*/ api(path) {
|
|
24
|
+
Validate.isNonemptyString(path, 'path');
|
|
25
|
+
if (!isRequestRateMonitorKSActivated() && this._requestRateMonitor && this._consumerComponentManifest) {
|
|
26
|
+
const { componentType, alias, id } = this._consumerComponentManifest;
|
|
27
|
+
if (componentType === 'WebPart' || componentType === 'AdaptiveCardExtension') {
|
|
28
|
+
const trackingUrl = path.startsWith('http') ? path : new URL(path.replace(/^\//, ''), MSGraphClientV3._graphBaseUrl).href;
|
|
29
|
+
this._requestRateMonitor.trackRequest(trackingUrl, `${componentType}.${alias}.${id}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (this._isInternal) {
|
|
33
|
+
return MSGraphClientV3._internalInstance.api(path);
|
|
34
|
+
}
|
|
35
|
+
return MSGraphClientV3._instance.api(path);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Gets the instance of the instantiated Client object from Microsoft Graph SDK.
|
|
39
|
+
*/ get client() {
|
|
40
|
+
if (this._isInternal) {
|
|
41
|
+
return MSGraphClientV3._internalInstance;
|
|
42
|
+
}
|
|
43
|
+
return MSGraphClientV3._instance;
|
|
44
|
+
}
|
|
45
|
+
_createGraphClientInstance(tokenProvider, options) {
|
|
46
|
+
const qosMonitor = new _QosMonitor('MSGraphClientV3.CreateGraphClientInstance');
|
|
47
|
+
let graphClient;
|
|
48
|
+
try {
|
|
49
|
+
graphClient = this._createClientInstance({
|
|
50
|
+
...options,
|
|
51
|
+
authProvider: undefined
|
|
52
|
+
}, tokenProvider, false);
|
|
53
|
+
} catch (e) {
|
|
54
|
+
qosMonitor.writeUnexpectedFailure(e.message, e);
|
|
55
|
+
throw e;
|
|
56
|
+
}
|
|
57
|
+
return graphClient;
|
|
58
|
+
}
|
|
59
|
+
_createGraphClientInstanceWithMiddleware(tokenProvider, options) {
|
|
60
|
+
const qosMonitor = new _QosMonitor('MSGraphClientV3.CreateGraphClientInstanceWithMiddleware');
|
|
61
|
+
let graphClient;
|
|
62
|
+
try {
|
|
63
|
+
graphClient = this._createClientInstance(options, tokenProvider, false);
|
|
64
|
+
qosMonitor.writeSuccess();
|
|
65
|
+
return graphClient;
|
|
66
|
+
} catch (e) {
|
|
67
|
+
qosMonitor.writeUnexpectedFailure(e.message, e);
|
|
68
|
+
throw e;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
_createInternalGraphClientInstance(tokenProvider, options) {
|
|
72
|
+
const qosMonitor = new _QosMonitor('MSGraphClientV3.CreateInternalGraphClientInstance');
|
|
73
|
+
let graphClient;
|
|
74
|
+
try {
|
|
75
|
+
graphClient = this._createClientInstance({
|
|
76
|
+
...options,
|
|
77
|
+
authProvider: undefined
|
|
78
|
+
}, tokenProvider, true);
|
|
79
|
+
} catch (e) {
|
|
80
|
+
qosMonitor.writeUnexpectedFailure(e.message, e);
|
|
81
|
+
throw e;
|
|
82
|
+
}
|
|
83
|
+
return graphClient;
|
|
84
|
+
}
|
|
85
|
+
_createClientInstance(options, tokenProvider, isInternal) {
|
|
86
|
+
const clientOptions = options || {};
|
|
87
|
+
clientOptions.baseUrl = MSGraphClientV3._graphBaseUrl;
|
|
88
|
+
let middlewareChain;
|
|
89
|
+
if (!clientOptions.middleware) {
|
|
90
|
+
// creating default chain
|
|
91
|
+
middlewareChain = MiddlewareFactory.getDefaultMiddlewareChain(new MSGraphAuthenticationProvider(tokenProvider, MSGraphClientV3._graphBaseUrl, isInternal));
|
|
92
|
+
} else {
|
|
93
|
+
// a developer has provided middleware(s)
|
|
94
|
+
const authMiddleware = new AuthenticationHandler(new MSGraphAuthenticationProvider(tokenProvider, MSGraphClientV3._graphBaseUrl, isInternal));
|
|
95
|
+
middlewareChain = [
|
|
96
|
+
authMiddleware
|
|
97
|
+
];
|
|
98
|
+
if (Array.isArray(clientOptions.middleware)) {
|
|
99
|
+
middlewareChain.push(...clientOptions.middleware);
|
|
100
|
+
} else {
|
|
101
|
+
middlewareChain.push(clientOptions.middleware);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (!isPassSdkVersionKSActivated() && this._consumerComponentManifest) {
|
|
105
|
+
if (!clientOptions.fetchOptions) {
|
|
106
|
+
clientOptions.fetchOptions = {};
|
|
107
|
+
}
|
|
108
|
+
if (!clientOptions.fetchOptions.headers) {
|
|
109
|
+
clientOptions.fetchOptions.headers = {};
|
|
110
|
+
}
|
|
111
|
+
const sdkVersionValue = `SPFx/${this._consumerComponentManifest.alias}/${this._consumerComponentManifest.id}/Is3PRequest:${this._consumerComponentManifest.isInternal ? '0' : '1'}`;
|
|
112
|
+
const { headers } = clientOptions.fetchOptions;
|
|
113
|
+
if (Array.isArray(headers)) {
|
|
114
|
+
const sdkVersionHeaderIndex = headers.findIndex((header)=>header[0] === 'SdkVersion');
|
|
115
|
+
if (sdkVersionHeaderIndex === -1) {
|
|
116
|
+
headers.push([
|
|
117
|
+
'SdkVersion',
|
|
118
|
+
sdkVersionValue
|
|
119
|
+
]);
|
|
120
|
+
} else {
|
|
121
|
+
headers[sdkVersionHeaderIndex][1] += `, ${sdkVersionValue}`;
|
|
122
|
+
}
|
|
123
|
+
} else if (headers instanceof Headers) {
|
|
124
|
+
headers.has('SdkVersion') ? headers.set('SdkVersion', `${headers.get('SdkVersion')}, ${sdkVersionValue}`) : headers.set('SdkVersion', sdkVersionValue);
|
|
125
|
+
} else {
|
|
126
|
+
headers.SdkVersion = headers.SdkVersions ? `${headers.SdkVersion}, ${sdkVersionValue}` : sdkVersionValue;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
// we can add more middleware to the end of the chain here
|
|
130
|
+
clientOptions.middleware = middlewareChain;
|
|
131
|
+
if (!isCustomHostsKSActivated()) {
|
|
132
|
+
try {
|
|
133
|
+
const url = new URL(MSGraphClientV3._graphBaseUrl);
|
|
134
|
+
clientOptions.customHosts = new Set([
|
|
135
|
+
url.host
|
|
136
|
+
]);
|
|
137
|
+
} catch (e) {
|
|
138
|
+
const qosMonitor = new _QosMonitor('MSGraphClientV3.CustomHostsAdditionsFailed');
|
|
139
|
+
qosMonitor.writeUnexpectedFailure(e.message, e);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return _InternalGraphClient.initWithMiddleware(clientOptions);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* @param serviceScope - Provides services for the MSGraphClient to consume.
|
|
146
|
+
*
|
|
147
|
+
* @internal
|
|
148
|
+
*/ constructor(serviceScope, options, clientOptions, internalClient){
|
|
149
|
+
this._isInternal = false;
|
|
150
|
+
serviceScope.whenFinished(()=>{
|
|
151
|
+
if (!MSGraphClientV3._graphBaseUrl) {
|
|
152
|
+
MSGraphClientV3._graphBaseUrl = serviceScope.consume(_GraphHttpClientContext.serviceKey).getGraphEndpointUrl();
|
|
153
|
+
}
|
|
154
|
+
if (!isPassSdkVersionKSActivated()) {
|
|
155
|
+
const clientManifestData = serviceScope.consume(_ClientManifestData.serviceKey);
|
|
156
|
+
this._consumerComponentManifest = clientManifestData.manifest;
|
|
157
|
+
}
|
|
158
|
+
if (!isRequestRateMonitorKSActivated()) {
|
|
159
|
+
this._requestRateMonitor = serviceScope.consume(_SPRequestRateMonitor.serviceKey);
|
|
160
|
+
}
|
|
161
|
+
if (internalClient) {
|
|
162
|
+
this._isInternal = true;
|
|
163
|
+
if (!MSGraphClientV3._internalInstance) {
|
|
164
|
+
MSGraphClientV3._internalInstance = this._createInternalGraphClientInstance(_AadTokenProviders.configurable, options);
|
|
165
|
+
}
|
|
166
|
+
} else if (!MSGraphClientV3._instance) {
|
|
167
|
+
if (clientOptions !== undefined) {
|
|
168
|
+
MSGraphClientV3._instance = this._createGraphClientInstanceWithMiddleware(_AadTokenProviders.configurable, clientOptions);
|
|
169
|
+
} else {
|
|
170
|
+
MSGraphClientV3._instance = this._createGraphClientInstance(_AadTokenProviders.configurable, options);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* MSGraphClient is used to perform REST calls against Microsoft Graph.
|
|
178
|
+
*
|
|
179
|
+
* @remarks The Microsoft Graph JavaScript client library is a lightweight wrapper around the
|
|
180
|
+
* Microsoft Graph API. This class allows developers to start making REST calls to MSGraph without
|
|
181
|
+
* needing to initialize the the MSGraph client library. If a custom configuration is desired,
|
|
182
|
+
* the MSGraphClient api function needs to be provided with that custom configuration for
|
|
183
|
+
* every request.
|
|
184
|
+
*
|
|
185
|
+
* For more information: {@link https://github.com/microsoftgraph/msgraph-sdk-javascript}
|
|
186
|
+
*
|
|
187
|
+
* @public
|
|
188
|
+
*/ export { MSGraphClientV3 as default };
|
|
189
|
+
|
|
190
|
+
//# sourceMappingURL=./MSGraphClientV3.js.map
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
import { _SPKillSwitch } from '@microsoft/sp-core-library';
|
|
2
2
|
export function isPassSdkVersionKSActivated() {
|
|
3
|
-
return _SPKillSwitch.isActivated('cf20bd1c-8f94-466b-b394-382640c75c23'
|
|
4
|
-
/* '04/10/2023', 'aterentiev - Pass SdkVersion header to MS Graph requests'*/
|
|
5
|
-
);
|
|
3
|
+
return _SPKillSwitch.isActivated('cf20bd1c-8f94-466b-b394-382640c75c23');
|
|
6
4
|
}
|
|
7
5
|
export function isCustomHostsKSActivated() {
|
|
8
|
-
return _SPKillSwitch.isActivated('249a915b-2c26-4fe0-a2da-19f8a7b2b56e'
|
|
9
|
-
/* '09/06/2024', 'grahamc - Add currrent graph endpoint to custom hosts'*/
|
|
10
|
-
);
|
|
6
|
+
return _SPKillSwitch.isActivated('249a915b-2c26-4fe0-a2da-19f8a7b2b56e');
|
|
11
7
|
}
|
|
12
8
|
export function isRequestRateMonitorKSActivated() {
|
|
13
|
-
return _SPKillSwitch.isActivated('c76f25a9-9d5a-4860-8883-fcacc64a0b19'
|
|
14
|
-
/* '2/25/2026', 'tianbli - Disable request rate monitoring for web parts' */
|
|
15
|
-
);
|
|
9
|
+
return _SPKillSwitch.isActivated('c76f25a9-9d5a-4860-8883-fcacc64a0b19');
|
|
16
10
|
}
|
|
17
|
-
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=./Killswitches.js.map
|
package/{lib → lib-esm}/index.js
RENAMED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* the SharePoint Framework.
|
|
7
7
|
*
|
|
8
8
|
* @packagedocumentation
|
|
9
|
-
*/
|
|
10
|
-
export { default as MSGraphClient } from './MSGraphClient';
|
|
9
|
+
*/ export { default as MSGraphClient } from './MSGraphClient';
|
|
11
10
|
export { default as MSGraphClientFactory } from './MSGraphClientFactory';
|
|
12
|
-
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=./index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/sp-http-msgraph",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.24.0-beta.2",
|
|
4
4
|
"description": "Microsoft Graph communication layer for the SharePoint Framework",
|
|
5
5
|
"homepage": "http://aka.ms/spfx",
|
|
6
6
|
"license": "https://aka.ms/spfx/license",
|
|
@@ -8,22 +8,49 @@
|
|
|
8
8
|
"tsdocFlavor": "AEDoc"
|
|
9
9
|
},
|
|
10
10
|
"main": "lib-commonjs/index.js",
|
|
11
|
-
"module": "lib/index.js",
|
|
11
|
+
"module": "lib-esm/index.js",
|
|
12
12
|
"typings": "dist/index-internal.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index-internal.d.ts",
|
|
16
|
+
"import": "./lib-esm/index.js",
|
|
17
|
+
"require": "./lib-commonjs/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./lib/*.resx": "./lib-esm/*.resx.json",
|
|
20
|
+
"./lib/*": {
|
|
21
|
+
"types": "./lib-dts/*.d.ts",
|
|
22
|
+
"import": "./lib-esm/*.js",
|
|
23
|
+
"require": "./lib-commonjs/*.js"
|
|
24
|
+
},
|
|
25
|
+
"./lib-commonjs/*.resx": "./lib-esm/*.resx.json",
|
|
26
|
+
"./lib-commonjs/*": {
|
|
27
|
+
"types": "./lib-dts/*.d.ts",
|
|
28
|
+
"import": "./lib-esm/*.js",
|
|
29
|
+
"require": "./lib-commonjs/*.js"
|
|
30
|
+
},
|
|
31
|
+
"./package.json": "./package.json"
|
|
32
|
+
},
|
|
33
|
+
"typesVersions": {
|
|
34
|
+
"*": {
|
|
35
|
+
"lib/*": [
|
|
36
|
+
"lib-dts/*"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
13
40
|
"dependencies": {
|
|
14
41
|
"@microsoft/microsoft-graph-client": "3.0.2",
|
|
15
42
|
"@microsoft/microsoft-graph-clientv1": "npm:@microsoft/microsoft-graph-client@1.7.2-spfx",
|
|
16
43
|
"@swc/helpers": "^0.5.12",
|
|
17
44
|
"tslib": "2.3.1",
|
|
18
|
-
"@microsoft/sp-core-library": "1.
|
|
19
|
-
"@microsoft/sp-diagnostics": "1.
|
|
20
|
-
"@microsoft/sp-
|
|
21
|
-
"@microsoft/sp-
|
|
45
|
+
"@microsoft/sp-core-library": "1.24.0-beta.2",
|
|
46
|
+
"@microsoft/sp-diagnostics": "1.24.0-beta.2",
|
|
47
|
+
"@microsoft/sp-http-base": "1.24.0-beta.2",
|
|
48
|
+
"@microsoft/sp-loader": "1.24.0-beta.2"
|
|
22
49
|
},
|
|
23
50
|
"devDependencies": {
|
|
24
51
|
"@rushstack/heft": "1.2.17",
|
|
25
52
|
"eslint": "9.37.0",
|
|
26
|
-
"@microsoft/sp-module-interfaces": "1.
|
|
53
|
+
"@microsoft/sp-module-interfaces": "1.24.0-beta.2",
|
|
27
54
|
"@msinternal/spfx-internal-web-build-rig": "0.1.0",
|
|
28
55
|
"@msinternal/ms-graph-v3-bundle": "3.0.2"
|
|
29
56
|
},
|
|
@@ -32,8 +59,12 @@
|
|
|
32
59
|
"clean": "heft clean",
|
|
33
60
|
"deploy": "heft dev-deploy",
|
|
34
61
|
"start": "heft build-watch --serve",
|
|
62
|
+
"test": "heft test",
|
|
63
|
+
"test-watch": "heft test-watch",
|
|
35
64
|
"_phase:build": "heft run --only build -- --clean",
|
|
36
65
|
"_phase:build:incremental": "heft run --only build --",
|
|
37
|
-
"_phase:depscan": "heft depscan"
|
|
66
|
+
"_phase:depscan": "heft depscan",
|
|
67
|
+
"_phase:test": "heft run --only test -- --clean",
|
|
68
|
+
"_phase:test:incremental": "heft run --only test --"
|
|
38
69
|
}
|
|
39
70
|
}
|