@microsoft/teamsfx 2.3.1 → 2.3.2-alpha.e17ffd4d1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.esm2017.mjs +10 -15
- package/dist/index.esm2017.mjs.map +1 -1
- package/dist/index.esm5.js +2 -7
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +10 -35
- package/dist/index.node.cjs.js.map +1 -1
- package/package.json +3 -3
package/dist/index.esm2017.mjs
CHANGED
@@ -8,8 +8,8 @@ import { Dialog, ComponentDialog, WaterfallDialog, DialogSet, DialogTurnStatus }
|
|
8
8
|
import { v4 } from 'uuid';
|
9
9
|
import axios from 'axios';
|
10
10
|
import { Agent } from 'https';
|
11
|
-
import
|
12
|
-
import
|
11
|
+
import { resolve } from 'path';
|
12
|
+
import { access, readFile, writeFile } from 'fs';
|
13
13
|
import { AdaptiveCards } from '@microsoft/adaptivecards-tools';
|
14
14
|
|
15
15
|
// Copyright (c) Microsoft Corporation.
|
@@ -2564,7 +2564,7 @@ class LocalFileStorage {
|
|
2564
2564
|
constructor(fileDir) {
|
2565
2565
|
var _a;
|
2566
2566
|
this.localFileName = (_a = process.env.TEAMSFX_NOTIFICATION_STORE_FILENAME) !== null && _a !== void 0 ? _a : ".notification.localstore.json";
|
2567
|
-
this.filePath =
|
2567
|
+
this.filePath = resolve(fileDir, this.localFileName);
|
2568
2568
|
}
|
2569
2569
|
async read(key) {
|
2570
2570
|
if (!(await this.storeFileExists())) {
|
@@ -2600,7 +2600,7 @@ class LocalFileStorage {
|
|
2600
2600
|
storeFileExists() {
|
2601
2601
|
return new Promise((resolve) => {
|
2602
2602
|
try {
|
2603
|
-
|
2603
|
+
access(this.filePath, (err) => {
|
2604
2604
|
if (err) {
|
2605
2605
|
resolve(false);
|
2606
2606
|
}
|
@@ -2617,7 +2617,7 @@ class LocalFileStorage {
|
|
2617
2617
|
readFromFile() {
|
2618
2618
|
return new Promise((resolve, reject) => {
|
2619
2619
|
try {
|
2620
|
-
|
2620
|
+
readFile(this.filePath, { encoding: "utf-8" }, (err, rawData) => {
|
2621
2621
|
if (err) {
|
2622
2622
|
reject(err);
|
2623
2623
|
}
|
@@ -2635,7 +2635,7 @@ class LocalFileStorage {
|
|
2635
2635
|
return new Promise((resolve, reject) => {
|
2636
2636
|
try {
|
2637
2637
|
const rawData = JSON.stringify(data, undefined, 2);
|
2638
|
-
|
2638
|
+
writeFile(this.filePath, rawData, { encoding: "utf-8" }, (err) => {
|
2639
2639
|
if (err) {
|
2640
2640
|
reject(err);
|
2641
2641
|
}
|
@@ -3066,7 +3066,7 @@ class NotificationBot$1 {
|
|
3066
3066
|
*/
|
3067
3067
|
constructor(adapter, options) {
|
3068
3068
|
var _a, _b;
|
3069
|
-
const storage = (_a = options === null || options === void 0 ? void 0 : options.storage) !== null && _a !== void 0 ? _a : new LocalFileStorage(
|
3069
|
+
const storage = (_a = options === null || options === void 0 ? void 0 : options.storage) !== null && _a !== void 0 ? _a : new LocalFileStorage(resolve(process.env.RUNNING_ON_AZURE === "1" ? (_b = process.env.TEMP) !== null && _b !== void 0 ? _b : "./" : "./"));
|
3070
3070
|
this.conversationReferenceStore = new DefaultConversationReferenceStore(storage);
|
3071
3071
|
this.adapter = adapter.use(new NotificationMiddleware({
|
3072
3072
|
conversationReferenceStore: this.conversationReferenceStore,
|
@@ -3227,7 +3227,7 @@ var SearchScope$1;
|
|
3227
3227
|
SearchScope[SearchScope["All"] = 7] = "All";
|
3228
3228
|
})(SearchScope$1 || (SearchScope$1 = {}));
|
3229
3229
|
|
3230
|
-
|
3230
|
+
/*! *****************************************************************************
|
3231
3231
|
Copyright (c) Microsoft Corporation.
|
3232
3232
|
|
3233
3233
|
Permission to use, copy, modify, and/or distribute this software for any
|
@@ -3252,12 +3252,7 @@ function __rest(s, e) {
|
|
3252
3252
|
t[p[i]] = s[p[i]];
|
3253
3253
|
}
|
3254
3254
|
return t;
|
3255
|
-
}
|
3256
|
-
|
3257
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
3258
|
-
var e = new Error(message);
|
3259
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
3260
|
-
};
|
3255
|
+
}
|
3261
3256
|
|
3262
3257
|
// Copyright (c) Microsoft Corporation.
|
3263
3258
|
let DIALOG_NAME = "BotSsoExecutionDialog";
|
@@ -4664,7 +4659,7 @@ class NotificationBot {
|
|
4664
4659
|
this.conversationReferenceStore = options.store;
|
4665
4660
|
}
|
4666
4661
|
else {
|
4667
|
-
const storage = (_a = options === null || options === void 0 ? void 0 : options.storage) !== null && _a !== void 0 ? _a : new LocalFileStorage(
|
4662
|
+
const storage = (_a = options === null || options === void 0 ? void 0 : options.storage) !== null && _a !== void 0 ? _a : new LocalFileStorage(resolve(process.env.RUNNING_ON_AZURE === "1" ? (_b = process.env.TEMP) !== null && _b !== void 0 ? _b : "./" : "./"));
|
4668
4663
|
this.conversationReferenceStore = new DefaultConversationReferenceStore(storage);
|
4669
4664
|
}
|
4670
4665
|
this.adapter = adapter.use(new NotificationMiddleware({
|