@microsoft/teamsfx 2.2.3-alpha.dea6b9e8a.0 → 2.2.3-alpha.ea55e6d34.0
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/README.md +165 -115
- package/dist/index.esm2017.js +22 -0
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm2017.mjs +63 -7
- package/dist/index.esm2017.mjs.map +1 -1
- package/dist/index.esm5.js +52 -1
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +184 -118
- package/dist/index.node.cjs.js.map +1 -1
- package/package.json +26 -10
- package/types/teamsfx.d.ts +27 -4
package/dist/index.esm5.js
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
import jwt_decode from 'jwt-decode';
|
2
|
-
import { __awaiter } from 'tslib';
|
3
2
|
import { app, authentication } from '@microsoft/teams-js';
|
4
3
|
import { PublicClientApplication } from '@azure/msal-browser';
|
5
4
|
import { Client } from '@microsoft/microsoft-graph-client';
|
@@ -476,6 +475,36 @@ class OnBehalfOfUserCredential {
|
|
476
475
|
}
|
477
476
|
}
|
478
477
|
|
478
|
+
/******************************************************************************
|
479
|
+
Copyright (c) Microsoft Corporation.
|
480
|
+
|
481
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
482
|
+
purpose with or without fee is hereby granted.
|
483
|
+
|
484
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
485
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
486
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
487
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
488
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
489
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
490
|
+
PERFORMANCE OF THIS SOFTWARE.
|
491
|
+
***************************************************************************** */
|
492
|
+
|
493
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
494
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
495
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
496
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
497
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
498
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
499
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
500
|
+
});
|
501
|
+
}
|
502
|
+
|
503
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
504
|
+
var e = new Error(message);
|
505
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
506
|
+
};
|
507
|
+
|
479
508
|
// Copyright (c) Microsoft Corporation.
|
480
509
|
const tokenRefreshTimeSpanInMillisecond = 5 * 60 * 1000;
|
481
510
|
const loginPageWidth = 600;
|
@@ -799,8 +828,10 @@ class TeamsUserCredential {
|
|
799
828
|
|
800
829
|
// Copyright (c) Microsoft Corporation.
|
801
830
|
const defaultScope = "https://graph.microsoft.com/.default";
|
831
|
+
// eslint-disable-next-line no-secrets/no-secrets
|
802
832
|
/**
|
803
833
|
* Microsoft Graph auth provider for Teams Framework
|
834
|
+
* @deprecated Use `TokenCredentialAuthenticationProvider` from `@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials` instead.
|
804
835
|
*/
|
805
836
|
class MsGraphAuthProvider {
|
806
837
|
constructor(credentialOrTeamsFx, scopes) {
|
@@ -857,6 +888,14 @@ class MsGraphAuthProvider {
|
|
857
888
|
// Copyright (c) Microsoft Corporation.
|
858
889
|
/**
|
859
890
|
* Get Microsoft graph client.
|
891
|
+
* @deprecated Use `TokenCredentialAuthenticationProvider` and `Client.initWithMiddleware` instead.
|
892
|
+
* ```typescript
|
893
|
+
* const authProvider = new TokenCredentialAuthenticationProvider(credential, { scopes: scope });
|
894
|
+
* const graph = Client.initWithMiddleware({
|
895
|
+
* authProvider: authProvider,
|
896
|
+
* });
|
897
|
+
* ```
|
898
|
+
*
|
860
899
|
* @example
|
861
900
|
* Get Microsoft graph client by TokenCredential
|
862
901
|
* ```typescript
|
@@ -914,6 +953,14 @@ function createMicrosoftGraphClient(teamsfx, scopes) {
|
|
914
953
|
// eslint-disable-next-line no-secrets/no-secrets
|
915
954
|
/**
|
916
955
|
* Get Microsoft graph client.
|
956
|
+
* @deprecated Use `TokenCredentialAuthenticationProvider` and `Client.initWithMiddleware` instead.
|
957
|
+
* ```typescript
|
958
|
+
* const authProvider = new TokenCredentialAuthenticationProvider(credential, { scopes: scope });
|
959
|
+
* const graph = Client.initWithMiddleware({
|
960
|
+
* authProvider: authProvider,
|
961
|
+
* });
|
962
|
+
* ```
|
963
|
+
*
|
917
964
|
* @example
|
918
965
|
* Get Microsoft graph client by TokenCredential
|
919
966
|
* ```typescript
|
@@ -1307,6 +1354,8 @@ var IdentityType;
|
|
1307
1354
|
// Copyright (c) Microsoft Corporation.
|
1308
1355
|
/**
|
1309
1356
|
* A class providing credential and configuration.
|
1357
|
+
* @deprecated Please use {@link TeamsUserCredential}
|
1358
|
+
* in browser environment and {@link OnBehalfOfUserCredential} or {@link AppCredential} in NodeJS.
|
1310
1359
|
*/
|
1311
1360
|
class TeamsFx {
|
1312
1361
|
constructor(identityType, customConfig) {
|
@@ -2012,8 +2061,10 @@ class CardActionBot$1 {
|
|
2012
2061
|
}
|
2013
2062
|
}
|
2014
2063
|
|
2064
|
+
// eslint-disable-next-line no-secrets/no-secrets
|
2015
2065
|
/**
|
2016
2066
|
* Users execute query with SSO or Access Token.
|
2067
|
+
* @deprecated
|
2017
2068
|
* @remarks
|
2018
2069
|
* Only works in in server side.
|
2019
2070
|
*/
|