@microsoft/teamsfx 2.3.3-beta.2024081502.0 → 2.3.3-beta.2024090406.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/dist/index.esm2017.mjs
CHANGED
@@ -10,7 +10,7 @@ import axios from 'axios';
|
|
10
10
|
import { Agent } from 'https';
|
11
11
|
import { resolve } from 'path';
|
12
12
|
import { access, readFile, writeFile } from 'fs';
|
13
|
-
import {
|
13
|
+
import { Template } from 'adaptivecards-templating';
|
14
14
|
|
15
15
|
// Copyright (c) Microsoft Corporation.
|
16
16
|
// Licensed under the MIT license.
|
@@ -3780,8 +3780,11 @@ class MessageBuilder {
|
|
3780
3780
|
* ```
|
3781
3781
|
*/
|
3782
3782
|
static attachAdaptiveCard(cardTemplate, data) {
|
3783
|
+
const context = {
|
3784
|
+
$root: data,
|
3785
|
+
};
|
3783
3786
|
return {
|
3784
|
-
attachments: [CardFactory.adaptiveCard(
|
3787
|
+
attachments: [CardFactory.adaptiveCard(new Template(cardTemplate).expand(context))],
|
3785
3788
|
};
|
3786
3789
|
}
|
3787
3790
|
/**
|
@@ -3792,7 +3795,7 @@ class MessageBuilder {
|
|
3792
3795
|
*/
|
3793
3796
|
static attachAdaptiveCardWithoutData(card) {
|
3794
3797
|
return {
|
3795
|
-
attachments: [CardFactory.adaptiveCard(
|
3798
|
+
attachments: [CardFactory.adaptiveCard(card)],
|
3796
3799
|
};
|
3797
3800
|
}
|
3798
3801
|
/**
|