@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.
@@ -1614,6 +1614,22 @@ function createPfxCertOption(pfx, passphrase) {
1614
1614
  }
1615
1615
 
1616
1616
  // Copyright (c) Microsoft Corporation.
1617
+ // Following keys are used by SDK internally
1618
+ const ReservedKey = new Set([
1619
+ "authorityHost",
1620
+ "tenantId",
1621
+ "clientId",
1622
+ "clientSecret",
1623
+ "initiateLoginEndpoint",
1624
+ "applicationIdUri",
1625
+ "apiEndpoint",
1626
+ "apiName",
1627
+ "sqlServerEndpoint",
1628
+ "sqlUsername",
1629
+ "sqlPassword",
1630
+ "sqlDatabaseName",
1631
+ "sqlIdentityId",
1632
+ ]);
1617
1633
  /**
1618
1634
  * A class providing credential and configuration.
1619
1635
  * @beta
@@ -1787,10 +1803,10 @@ class TeamsFx {
1787
1803
  this.configuration.set("sqlDatabaseName", env.SQL_DATABASE_NAME);
1788
1804
  this.configuration.set("sqlIdentityId", env.IDENTITY_ID);
1789
1805
  Object.keys(env).forEach((key) => {
1790
- const value = env[key];
1791
- if (key.startsWith("TEAMSFX_") && value) {
1792
- this.configuration.set(key.substring(8), value);
1806
+ if (ReservedKey.has(key)) {
1807
+ internalLogger.warn(`The name of environment variable ${key} is preserved. Will not load it as configuration.`);
1793
1808
  }
1809
+ this.configuration.set(key, env[key]);
1794
1810
  });
1795
1811
  }
1796
1812
  }
@@ -1824,13 +1840,6 @@ class NotificationMiddleware {
1824
1840
  await this.conversationReferenceStore.set(reference);
1825
1841
  break;
1826
1842
  }
1827
- case ActivityType.CurrentBotMessaged: {
1828
- const reference = TurnContext.getConversationReference(context.activity);
1829
- if (!(await this.conversationReferenceStore.check(reference))) {
1830
- await this.conversationReferenceStore.set(reference);
1831
- }
1832
- break;
1833
- }
1834
1843
  case ActivityType.CurrentBotUninstalled:
1835
1844
  case ActivityType.TeamDeleted: {
1836
1845
  const reference = TurnContext.getConversationReference(context.activity);
@@ -1852,9 +1861,6 @@ class NotificationMiddleware {
1852
1861
  return ActivityType.CurrentBotUninstalled;
1853
1862
  }
1854
1863
  }
1855
- else if (activityType === "message") {
1856
- return ActivityType.CurrentBotMessaged;
1857
- }
1858
1864
  else if (activityType === "conversationUpdate") {
1859
1865
  const eventType = (_b = activity.channelData) === null || _b === void 0 ? void 0 : _b.eventType;
1860
1866
  if (eventType === "teamDeleted") {
@@ -2627,8 +2633,8 @@ class MessageBuilder {
2627
2633
  /**
2628
2634
  * Build a bot message activity attached with adaptive card.
2629
2635
  *
2630
- * @param getCardData Function to prepare your card data.
2631
2636
  * @param cardTemplate The adaptive card template.
2637
+ * @param data card data used to render the template.
2632
2638
  * @returns A bot message activity attached with an adaptive card.
2633
2639
  *
2634
2640
  * @example
@@ -2653,19 +2659,18 @@ class MessageBuilder {
2653
2659
  * title: string,
2654
2660
  * description: string
2655
2661
  * };
2656
- * const card = MessageBuilder.attachAdaptiveCard<CardData>(() => {
2657
- * return {
2658
- * title: "sample card title",
2659
- * description: "sample card description"
2660
- * }}, cardTemplate);
2662
+ * const card = MessageBuilder.attachAdaptiveCard<CardData>(
2663
+ * cardTemplate, {
2664
+ * title: "sample card title",
2665
+ * description: "sample card description"
2666
+ * });
2661
2667
  * ```
2662
2668
  *
2663
2669
  * @beta
2664
2670
  */
2665
- static attachAdaptiveCard(getCardData, cardTemplate) {
2666
- const cardData = getCardData();
2671
+ static attachAdaptiveCard(cardTemplate, data) {
2667
2672
  return {
2668
- attachments: [CardFactory.adaptiveCard(AdaptiveCards.declare(cardTemplate).render(cardData))],
2673
+ attachments: [CardFactory.adaptiveCard(AdaptiveCards.declare(cardTemplate).render(data))],
2669
2674
  };
2670
2675
  }
2671
2676
  /**