@microsoft/teamsfx 0.6.3-alpha.85a816c65.0 → 0.6.3-alpha.ffd3f8bc7.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.
@@ -1674,6 +1674,22 @@ function createPfxCertOption(pfx, passphrase) {
1674
1674
  }
1675
1675
 
1676
1676
  // Copyright (c) Microsoft Corporation.
1677
+ // Following keys are used by SDK internally
1678
+ const ReservedKey = new Set([
1679
+ "authorityHost",
1680
+ "tenantId",
1681
+ "clientId",
1682
+ "clientSecret",
1683
+ "initiateLoginEndpoint",
1684
+ "applicationIdUri",
1685
+ "apiEndpoint",
1686
+ "apiName",
1687
+ "sqlServerEndpoint",
1688
+ "sqlUsername",
1689
+ "sqlPassword",
1690
+ "sqlDatabaseName",
1691
+ "sqlIdentityId",
1692
+ ]);
1677
1693
  /**
1678
1694
  * A class providing credential and configuration.
1679
1695
  * @beta
@@ -1851,10 +1867,10 @@ class TeamsFx {
1851
1867
  this.configuration.set("sqlDatabaseName", env.SQL_DATABASE_NAME);
1852
1868
  this.configuration.set("sqlIdentityId", env.IDENTITY_ID);
1853
1869
  Object.keys(env).forEach((key) => {
1854
- const value = env[key];
1855
- if (key.startsWith("TEAMSFX_") && value) {
1856
- this.configuration.set(key.substring(8), value);
1870
+ if (ReservedKey.has(key)) {
1871
+ internalLogger.warn(`The name of environment variable ${key} is preserved. Will not load it as configuration.`);
1857
1872
  }
1873
+ this.configuration.set(key, env[key]);
1858
1874
  });
1859
1875
  }
1860
1876
  }
@@ -1889,13 +1905,6 @@ class NotificationMiddleware {
1889
1905
  yield this.conversationReferenceStore.set(reference);
1890
1906
  break;
1891
1907
  }
1892
- case ActivityType.CurrentBotMessaged: {
1893
- const reference = botbuilder.TurnContext.getConversationReference(context.activity);
1894
- if (!(yield this.conversationReferenceStore.check(reference))) {
1895
- yield this.conversationReferenceStore.set(reference);
1896
- }
1897
- break;
1898
- }
1899
1908
  case ActivityType.CurrentBotUninstalled:
1900
1909
  case ActivityType.TeamDeleted: {
1901
1910
  const reference = botbuilder.TurnContext.getConversationReference(context.activity);
@@ -1918,9 +1927,6 @@ class NotificationMiddleware {
1918
1927
  return ActivityType.CurrentBotUninstalled;
1919
1928
  }
1920
1929
  }
1921
- else if (activityType === "message") {
1922
- return ActivityType.CurrentBotMessaged;
1923
- }
1924
1930
  else if (activityType === "conversationUpdate") {
1925
1931
  const eventType = (_b = activity.channelData) === null || _b === void 0 ? void 0 : _b.eventType;
1926
1932
  if (eventType === "teamDeleted") {
@@ -2723,8 +2729,8 @@ class MessageBuilder {
2723
2729
  /**
2724
2730
  * Build a bot message activity attached with adaptive card.
2725
2731
  *
2726
- * @param getCardData Function to prepare your card data.
2727
2732
  * @param cardTemplate The adaptive card template.
2733
+ * @param data card data used to render the template.
2728
2734
  * @returns A bot message activity attached with an adaptive card.
2729
2735
  *
2730
2736
  * @example
@@ -2749,19 +2755,18 @@ class MessageBuilder {
2749
2755
  * title: string,
2750
2756
  * description: string
2751
2757
  * };
2752
- * const card = MessageBuilder.attachAdaptiveCard<CardData>(() => {
2753
- * return {
2754
- * title: "sample card title",
2755
- * description: "sample card description"
2756
- * }}, cardTemplate);
2758
+ * const card = MessageBuilder.attachAdaptiveCard<CardData>(
2759
+ * cardTemplate, {
2760
+ * title: "sample card title",
2761
+ * description: "sample card description"
2762
+ * });
2757
2763
  * ```
2758
2764
  *
2759
2765
  * @beta
2760
2766
  */
2761
- static attachAdaptiveCard(getCardData, cardTemplate) {
2762
- const cardData = getCardData();
2767
+ static attachAdaptiveCard(cardTemplate, data) {
2763
2768
  return {
2764
- attachments: [botbuilder.CardFactory.adaptiveCard(AdaptiveCards.declare(cardTemplate).render(cardData))],
2769
+ attachments: [botbuilder.CardFactory.adaptiveCard(AdaptiveCards.declare(cardTemplate).render(data))],
2765
2770
  };
2766
2771
  }
2767
2772
  /**