@microsoft/teamsfx 2.3.1 → 2.3.2-beta.2024031405.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.
@@ -18,28 +18,8 @@ var adaptivecardsTools = require('@microsoft/adaptivecards-tools');
18
18
 
19
19
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
20
20
 
21
- function _interopNamespace(e) {
22
- if (e && e.__esModule) return e;
23
- var n = Object.create(null);
24
- if (e) {
25
- Object.keys(e).forEach(function (k) {
26
- if (k !== 'default') {
27
- var d = Object.getOwnPropertyDescriptor(e, k);
28
- Object.defineProperty(n, k, d.get ? d : {
29
- enumerable: true,
30
- get: function () { return e[k]; }
31
- });
32
- }
33
- });
34
- }
35
- n["default"] = e;
36
- return Object.freeze(n);
37
- }
38
-
39
21
  var jwt_decode__default = /*#__PURE__*/_interopDefaultLegacy(jwt_decode);
40
22
  var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
41
- var path__namespace = /*#__PURE__*/_interopNamespace(path);
42
- var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
43
23
 
44
24
  // Copyright (c) Microsoft Corporation.
45
25
  // Licensed under the MIT license.
@@ -190,7 +170,7 @@ class ErrorWithCode extends Error {
190
170
  }
191
171
  }
192
172
 
193
- /******************************************************************************
173
+ /*! *****************************************************************************
194
174
  Copyright (c) Microsoft Corporation.
195
175
 
196
176
  Permission to use, copy, modify, and/or distribute this software for any
@@ -225,12 +205,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
225
205
  function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
226
206
  step((generator = generator.apply(thisArg, _arguments || [])).next());
227
207
  });
228
- }
229
-
230
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
231
- var e = new Error(message);
232
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
233
- };
208
+ }
234
209
 
235
210
  // Copyright (c) Microsoft Corporation.
236
211
  // Licensed under the MIT license.
@@ -376,7 +351,7 @@ function setLogFunction(logFunction) {
376
351
  */
377
352
  function parseJwt(token) {
378
353
  try {
379
- const tokenObj = jwt_decode__default["default"](token);
354
+ const tokenObj = jwt_decode__default['default'](token);
380
355
  if (!tokenObj || !tokenObj.exp) {
381
356
  throw new ErrorWithCode("Decoded token is null or exp claim does not exists.", exports.ErrorCode.InternalError);
382
357
  }
@@ -1560,7 +1535,7 @@ class TeamsBotSsoPrompt extends botbuilderDialogs.Dialog {
1560
1535
  */
1561
1536
  function createApiClient(apiEndpoint, authProvider) {
1562
1537
  // Add a request interceptor
1563
- const instance = axios__default["default"].create({
1538
+ const instance = axios__default['default'].create({
1564
1539
  baseURL: apiEndpoint,
1565
1540
  });
1566
1541
  instance.interceptors.request.use(function (config) {
@@ -2673,7 +2648,7 @@ class LocalFileStorage {
2673
2648
  constructor(fileDir) {
2674
2649
  var _a;
2675
2650
  this.localFileName = (_a = process.env.TEAMSFX_NOTIFICATION_STORE_FILENAME) !== null && _a !== void 0 ? _a : ".notification.localstore.json";
2676
- this.filePath = path__namespace.resolve(fileDir, this.localFileName);
2651
+ this.filePath = path.resolve(fileDir, this.localFileName);
2677
2652
  }
2678
2653
  read(key) {
2679
2654
  return __awaiter(this, void 0, void 0, function* () {
@@ -2717,7 +2692,7 @@ class LocalFileStorage {
2717
2692
  storeFileExists() {
2718
2693
  return new Promise((resolve) => {
2719
2694
  try {
2720
- fs__namespace.access(this.filePath, (err) => {
2695
+ fs.access(this.filePath, (err) => {
2721
2696
  if (err) {
2722
2697
  resolve(false);
2723
2698
  }
@@ -2734,7 +2709,7 @@ class LocalFileStorage {
2734
2709
  readFromFile() {
2735
2710
  return new Promise((resolve, reject) => {
2736
2711
  try {
2737
- fs__namespace.readFile(this.filePath, { encoding: "utf-8" }, (err, rawData) => {
2712
+ fs.readFile(this.filePath, { encoding: "utf-8" }, (err, rawData) => {
2738
2713
  if (err) {
2739
2714
  reject(err);
2740
2715
  }
@@ -2753,7 +2728,7 @@ class LocalFileStorage {
2753
2728
  return new Promise((resolve, reject) => {
2754
2729
  try {
2755
2730
  const rawData = JSON.stringify(data, undefined, 2);
2756
- fs__namespace.writeFile(this.filePath, rawData, { encoding: "utf-8" }, (err) => {
2731
+ fs.writeFile(this.filePath, rawData, { encoding: "utf-8" }, (err) => {
2757
2732
  if (err) {
2758
2733
  reject(err);
2759
2734
  }
@@ -3211,7 +3186,7 @@ class NotificationBot$1 {
3211
3186
  */
3212
3187
  constructor(adapter, options) {
3213
3188
  var _a, _b;
3214
- const storage = (_a = options === null || options === void 0 ? void 0 : options.storage) !== null && _a !== void 0 ? _a : new LocalFileStorage(path__namespace.resolve(process.env.RUNNING_ON_AZURE === "1" ? (_b = process.env.TEMP) !== null && _b !== void 0 ? _b : "./" : "./"));
3189
+ const storage = (_a = options === null || options === void 0 ? void 0 : options.storage) !== null && _a !== void 0 ? _a : new LocalFileStorage(path.resolve(process.env.RUNNING_ON_AZURE === "1" ? (_b = process.env.TEMP) !== null && _b !== void 0 ? _b : "./" : "./"));
3215
3190
  this.conversationReferenceStore = new DefaultConversationReferenceStore(storage);
3216
3191
  this.adapter = adapter.use(new NotificationMiddleware({
3217
3192
  conversationReferenceStore: this.conversationReferenceStore,
@@ -4842,7 +4817,7 @@ class NotificationBot {
4842
4817
  this.conversationReferenceStore = options.store;
4843
4818
  }
4844
4819
  else {
4845
- const storage = (_a = options === null || options === void 0 ? void 0 : options.storage) !== null && _a !== void 0 ? _a : new LocalFileStorage(path__namespace.resolve(process.env.RUNNING_ON_AZURE === "1" ? (_b = process.env.TEMP) !== null && _b !== void 0 ? _b : "./" : "./"));
4820
+ const storage = (_a = options === null || options === void 0 ? void 0 : options.storage) !== null && _a !== void 0 ? _a : new LocalFileStorage(path.resolve(process.env.RUNNING_ON_AZURE === "1" ? (_b = process.env.TEMP) !== null && _b !== void 0 ? _b : "./" : "./"));
4846
4821
  this.conversationReferenceStore = new DefaultConversationReferenceStore(storage);
4847
4822
  }
4848
4823
  this.adapter = adapter.use(new NotificationMiddleware({