@microsoft/teamsfx-core 3.1.2 → 3.1.3-alpha.f04bf264d7.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/build/client/teamsDevPortalClient.d.ts +1 -1
- package/build/client/teamsDevPortalClient.d.ts.map +1 -1
- package/build/client/teamsDevPortalClient.js +4 -2
- package/build/client/teamsDevPortalClient.js.map +1 -1
- package/build/common/cancellation.d.ts +5 -0
- package/build/common/cancellation.d.ts.map +1 -0
- package/build/common/cancellation.js +17 -0
- package/build/common/cancellation.js.map +1 -0
- package/build/common/globalVars.d.ts.map +1 -1
- package/build/common/globalVars.js.map +1 -1
- package/build/common/mcpToolFetcher.d.ts +2 -2
- package/build/common/mcpToolFetcher.d.ts.map +1 -1
- package/build/common/mcpToolFetcher.js +27 -7
- package/build/common/mcpToolFetcher.js.map +1 -1
- package/build/common/permissionInterface.d.ts +12 -3
- package/build/common/permissionInterface.d.ts.map +1 -1
- package/build/common/permissionInterface.js +7 -1
- package/build/common/permissionInterface.js.map +1 -1
- package/build/common/templates-config.json +3 -3
- package/build/common/treatmentVariables.d.ts +5 -0
- package/build/common/treatmentVariables.d.ts.map +1 -0
- package/build/common/treatmentVariables.js +10 -0
- package/build/common/treatmentVariables.js.map +1 -0
- package/build/component/configManager/lifecycle.d.ts +2 -2
- package/build/component/configManager/lifecycle.d.ts.map +1 -1
- package/build/component/configManager/lifecycle.js +23 -9
- package/build/component/configManager/lifecycle.js.map +1 -1
- package/build/component/driver/botAadApp/create.js +1 -1
- package/build/component/driver/botAadApp/create.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js +2 -2
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js.map +1 -1
- package/build/component/driver/interface/buildAndDeployArgs.d.ts +1 -1
- package/build/component/driver/interface/buildAndDeployArgs.d.ts.map +1 -1
- package/build/component/driver/interface/commonArgs.d.ts +2 -1
- package/build/component/driver/interface/commonArgs.d.ts.map +1 -1
- package/build/component/driver/script/baseBuildDriver.d.ts +1 -2
- package/build/component/driver/script/baseBuildDriver.d.ts.map +1 -1
- package/build/component/driver/script/baseBuildDriver.js +0 -2
- package/build/component/driver/script/baseBuildDriver.js.map +1 -1
- package/build/component/driver/teamsApp/teamsappMgr.d.ts +2 -0
- package/build/component/driver/teamsApp/teamsappMgr.d.ts.map +1 -1
- package/build/component/driver/teamsApp/teamsappMgr.js +32 -0
- package/build/component/driver/teamsApp/teamsappMgr.js.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.d.ts +13 -0
- package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.js +53 -3
- package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
- package/build/component/driver/util/utils.d.ts.map +1 -1
- package/build/component/driver/util/utils.js +1 -0
- package/build/component/driver/util/utils.js.map +1 -1
- package/build/component/feature/sso.js +2 -2
- package/build/component/feature/sso.js.map +1 -1
- package/build/component/generator/configFiles/configGenerator.js +1 -1
- package/build/component/generator/configFiles/configGenerator.js.map +1 -1
- package/build/component/generator/openApiSpec/common.js +1 -1
- package/build/component/generator/openApiSpec/common.js.map +1 -1
- package/build/component/generator/openApiSpec/helper.js +3 -3
- package/build/component/generator/openApiSpec/helper.js.map +1 -1
- package/build/component/generator/spfx/spfxGenerator.js +5 -5
- package/build/component/generator/spfx/spfxGenerator.js.map +1 -1
- package/build/component/m365/errors.d.ts +7 -0
- package/build/component/m365/errors.d.ts.map +1 -1
- package/build/component/m365/errors.js +16 -1
- package/build/component/m365/errors.js.map +1 -1
- package/build/component/m365/packageService.d.ts +4 -5
- package/build/component/m365/packageService.d.ts.map +1 -1
- package/build/component/m365/packageService.js +69 -112
- package/build/component/m365/packageService.js.map +1 -1
- package/build/component/m365/serviceConstant.d.ts.map +1 -1
- package/build/component/m365/serviceConstant.js +0 -10
- package/build/component/m365/serviceConstant.js.map +1 -1
- package/build/component/middleware/questionMW.d.ts.map +1 -1
- package/build/component/middleware/questionMW.js +3 -0
- package/build/component/middleware/questionMW.js.map +1 -1
- package/build/component/utils/envFunctionUtils.js +1 -1
- package/build/component/utils/envFunctionUtils.js.map +1 -1
- package/build/core/FxCore.d.ts +4 -3
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.declarativeAgent.d.ts.map +1 -1
- package/build/core/FxCore.declarativeAgent.js +11 -4
- package/build/core/FxCore.declarativeAgent.js.map +1 -1
- package/build/core/FxCore.js +54 -21
- package/build/core/FxCore.js.map +1 -1
- package/build/core/FxCoreClient.d.ts +96 -0
- package/build/core/FxCoreClient.d.ts.map +1 -0
- package/build/core/FxCoreClient.js +159 -0
- package/build/core/FxCoreClient.js.map +1 -0
- package/build/core/collaborator.d.ts +1 -0
- package/build/core/collaborator.d.ts.map +1 -1
- package/build/core/collaborator.js +37 -0
- package/build/core/collaborator.js.map +1 -1
- package/build/core/createFrontDoorAdapters.d.ts.map +1 -1
- package/build/core/createFrontDoorAdapters.js +38 -4
- package/build/core/createFrontDoorAdapters.js.map +1 -1
- package/build/core/createProjectFrontDoor.d.ts.map +1 -1
- package/build/core/createProjectFrontDoor.js +6 -41
- package/build/core/createProjectFrontDoor.js.map +1 -1
- package/build/core/modifyProjectFrontDoor.d.ts.map +1 -1
- package/build/core/modifyProjectFrontDoor.js +0 -1
- package/build/core/modifyProjectFrontDoor.js.map +1 -1
- package/build/index.d.ts +6 -5
- package/build/index.d.ts.map +1 -1
- package/build/index.js +13 -12
- package/build/index.js.map +1 -1
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +3 -0
- package/build/question/other.js.map +1 -1
- package/build/v4/buildTarget/parseSelector.d.ts.map +1 -1
- package/build/v4/buildTarget/parseSelector.js +2 -6
- package/build/v4/buildTarget/parseSelector.js.map +1 -1
- package/build/v4/buildTarget/resolveBuildTarget.d.ts +1 -4
- package/build/v4/buildTarget/resolveBuildTarget.d.ts.map +1 -1
- package/build/v4/buildTarget/resolveBuildTarget.js +6 -23
- package/build/v4/buildTarget/resolveBuildTarget.js.map +1 -1
- package/build/v4/surface/createSelectorWalk.d.ts.map +1 -1
- package/build/v4/surface/createSelectorWalk.js +0 -3
- package/build/v4/surface/createSelectorWalk.js.map +1 -1
- package/build/v4/surface/modifySelectorWalk.d.ts.map +1 -1
- package/build/v4/surface/modifySelectorWalk.js +0 -3
- package/build/v4/surface/modifySelectorWalk.js.map +1 -1
- package/package.json +6 -6
- package/resource/package.nls.cs.json +8 -3
- package/resource/package.nls.de.json +8 -3
- package/resource/package.nls.es.json +8 -3
- package/resource/package.nls.fr.json +8 -3
- package/resource/package.nls.it.json +8 -3
- package/resource/package.nls.ja.json +8 -3
- package/resource/package.nls.json +2 -0
- package/resource/package.nls.ko.json +8 -3
- package/resource/package.nls.pl.json +8 -3
- package/resource/package.nls.pt-BR.json +8 -3
- package/resource/package.nls.ru.json +8 -3
- package/resource/package.nls.tr.json +8 -3
- package/resource/package.nls.zh-Hans.json +8 -3
- package/resource/package.nls.zh-Hant.json +8 -3
- package/resource/yaml-schema/v1.13/yaml.schema.json +1 -1
- package/resource/yaml-schema/yaml.schema.json +1 -1
- package/templates/configs/remote/python/env/.env.dev +2 -1
- package/templates/configs/remote/python/m365agents.yml.tpl +1 -0
- package/templates/configs/remote/typescript/env/.env.dev +2 -1
- package/templates/configs/remote/typescript/m365agents.yml.tpl +1 -0
- package/templates/fallback/common.zip +0 -0
- package/templates/fallback/csharp.zip +0 -0
- package/templates/fallback/js.zip +0 -0
- package/templates/fallback/python.zip +0 -0
- package/templates/fallback/ts.zip +0 -0
- package/templates/metadata.zip +0 -0
- package/templates/v4/floor.json +1 -1
- package/templates/v4/templates-metadata.zip +0 -0
- package/templates/v4/templates.zip +0 -0
package/build/core/FxCore.js
CHANGED
|
@@ -16,6 +16,7 @@ require("reflect-metadata");
|
|
|
16
16
|
const typedi_1 = require("typedi");
|
|
17
17
|
const url_1 = require("url");
|
|
18
18
|
const teamsDevPortalClient_1 = require("../client/teamsDevPortalClient");
|
|
19
|
+
const cancellation_1 = require("../common/cancellation");
|
|
19
20
|
const constants_1 = require("../common/constants");
|
|
20
21
|
const daSpecParser_1 = require("../common/daSpecParser");
|
|
21
22
|
const featureFlags_1 = require("../common/featureFlags");
|
|
@@ -77,11 +78,11 @@ const crypto_1 = require("./crypto");
|
|
|
77
78
|
const environmentName_1 = require("./environmentName");
|
|
78
79
|
const FxCore_openPlugin_1 = require("./FxCore.openPlugin");
|
|
79
80
|
const generateConfigFiles_1 = require("./generateConfigFiles");
|
|
80
|
-
const v4ArtifactSnapshot_1 = require("./v4ArtifactSnapshot");
|
|
81
81
|
const concurrentLocker_1 = require("./middleware/concurrentLocker");
|
|
82
82
|
const contextInjector_1 = require("./middleware/contextInjector");
|
|
83
83
|
const errorHandler_1 = require("./middleware/errorHandler");
|
|
84
84
|
const fileLocker_1 = require("./middleware/fileLocker");
|
|
85
|
+
const v4ArtifactSnapshot_1 = require("./v4ArtifactSnapshot");
|
|
85
86
|
const retry_1 = require("./middleware/retry");
|
|
86
87
|
const v3MigrationUtils = tslib_1.__importStar(require("./middleware/utils/v3MigrationUtils"));
|
|
87
88
|
const shareCore = tslib_1.__importStar(require("./share"));
|
|
@@ -105,6 +106,9 @@ class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
|
105
106
|
super();
|
|
106
107
|
(0, globalVars_1.setTools)(tools);
|
|
107
108
|
}
|
|
109
|
+
getAbortSignal(inputs) {
|
|
110
|
+
return inputs.abortSignal;
|
|
111
|
+
}
|
|
108
112
|
/**
|
|
109
113
|
* @todo this's a really primitive implement. Maybe could use Subscription Model to
|
|
110
114
|
* refactor later.
|
|
@@ -153,7 +157,7 @@ class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
|
153
157
|
return (0, teamsfx_api_1.err)(new common_2.InputValidationError("manifest.json", "App contains unsupported features"));
|
|
154
158
|
}
|
|
155
159
|
else {
|
|
156
|
-
context.telemetryReporter
|
|
160
|
+
context.telemetryReporter?.sendTelemetryEvent(telemetry_2.CoreTelemetryEvent.CreateFromTdpStart, {
|
|
157
161
|
[telemetry_2.CoreTelemetryProperty.TdpTeamsAppFeatures]: (0, utils_2.getFeaturesFromAppDefinition)(inputs.teamsAppFromTdp).join(","),
|
|
158
162
|
[telemetry_2.CoreTelemetryProperty.TdpTeamsAppId]: inputs.teamsAppFromTdp.teamsAppId,
|
|
159
163
|
});
|
|
@@ -245,6 +249,9 @@ class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
|
245
249
|
* none lifecycle command, uninstall provisioned resources
|
|
246
250
|
*/
|
|
247
251
|
async uninstall(inputs) {
|
|
252
|
+
if (this.getAbortSignal(inputs)?.aborted) {
|
|
253
|
+
return (0, teamsfx_api_1.err)(new common_2.UserCancelError("FxCore"));
|
|
254
|
+
}
|
|
248
255
|
switch (inputs[constants_3.QuestionNames.UninstallMode]) {
|
|
249
256
|
case constants_3.QuestionNames.UninstallModeManifestId:
|
|
250
257
|
return await this.uninstallByManifestId(inputs);
|
|
@@ -269,20 +276,20 @@ class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
|
269
276
|
const tdpOption = uninstallOptions?.includes(constants_3.QuestionNames.UninstallOptionTDP);
|
|
270
277
|
const botOption = uninstallOptions?.includes(constants_3.QuestionNames.UninstallOptionBot);
|
|
271
278
|
if (m356AppOption) {
|
|
272
|
-
const res = await this.uninstallM365App(undefined, manifestId);
|
|
279
|
+
const res = await this.uninstallM365App(undefined, manifestId, this.getAbortSignal(inputs));
|
|
273
280
|
if (res.isErr()) {
|
|
274
281
|
return (0, teamsfx_api_1.err)(res.error);
|
|
275
282
|
}
|
|
276
283
|
}
|
|
277
284
|
if (botOption) {
|
|
278
|
-
const res = await this.uninstallBotFrameworRegistration(undefined, manifestId);
|
|
285
|
+
const res = await this.uninstallBotFrameworRegistration(undefined, manifestId, this.getAbortSignal(inputs));
|
|
279
286
|
if (res.isErr()) {
|
|
280
287
|
return (0, teamsfx_api_1.err)(res.error);
|
|
281
288
|
}
|
|
282
289
|
}
|
|
283
290
|
// App registraion should be the last to remove, because we might need to query some metadata from TDP.
|
|
284
291
|
if (tdpOption) {
|
|
285
|
-
const res = await this.uninstallAppRegistration(manifestId);
|
|
292
|
+
const res = await this.uninstallAppRegistration(manifestId, this.getAbortSignal(inputs));
|
|
286
293
|
if (res.isErr()) {
|
|
287
294
|
return (0, teamsfx_api_1.err)(res.error);
|
|
288
295
|
}
|
|
@@ -327,7 +334,7 @@ class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
|
327
334
|
const tdpOption = uninstallOptions?.includes(constants_3.QuestionNames.UninstallOptionTDP);
|
|
328
335
|
const botOption = uninstallOptions?.includes(constants_3.QuestionNames.UninstallOptionBot);
|
|
329
336
|
if ((teamsAppId || m365TitleId) && m356AppOption) {
|
|
330
|
-
const res = await this.uninstallM365App(m365TitleId, teamsAppId);
|
|
337
|
+
const res = await this.uninstallM365App(m365TitleId, teamsAppId, this.getAbortSignal(inputs));
|
|
331
338
|
if (res.isErr()) {
|
|
332
339
|
return (0, teamsfx_api_1.err)(res.error);
|
|
333
340
|
}
|
|
@@ -335,7 +342,7 @@ class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
|
335
342
|
this.resetEnvVar(m365TitleIdKeyName, ctx);
|
|
336
343
|
}
|
|
337
344
|
if (botId && botOption) {
|
|
338
|
-
const res = await this.uninstallBotFrameworRegistration(botId);
|
|
345
|
+
const res = await this.uninstallBotFrameworRegistration(botId, undefined, this.getAbortSignal(inputs));
|
|
339
346
|
if (res.isErr()) {
|
|
340
347
|
return (0, teamsfx_api_1.err)(res.error);
|
|
341
348
|
}
|
|
@@ -343,7 +350,7 @@ class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
|
343
350
|
}
|
|
344
351
|
// App registraion should be the last to remove, because we might need to query some metadata from TDP.
|
|
345
352
|
if (teamsAppId && tdpOption) {
|
|
346
|
-
const res = await this.uninstallAppRegistration(teamsAppId);
|
|
353
|
+
const res = await this.uninstallAppRegistration(teamsAppId, this.getAbortSignal(inputs));
|
|
347
354
|
if (res.isErr()) {
|
|
348
355
|
return (0, teamsfx_api_1.err)(res.error);
|
|
349
356
|
}
|
|
@@ -372,7 +379,7 @@ class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
|
372
379
|
if (!titleId) {
|
|
373
380
|
return (0, teamsfx_api_1.err)(new common_2.MissingRequiredInputError("title-id", "FxCore"));
|
|
374
381
|
}
|
|
375
|
-
const res = await this.uninstallM365App(titleId);
|
|
382
|
+
const res = await this.uninstallM365App(titleId, undefined, this.getAbortSignal(inputs));
|
|
376
383
|
if (res.isErr()) {
|
|
377
384
|
return (0, teamsfx_api_1.err)(res.error);
|
|
378
385
|
}
|
|
@@ -381,7 +388,10 @@ class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
|
381
388
|
/**
|
|
382
389
|
* uninstall sideloaded appps in M365
|
|
383
390
|
*/
|
|
384
|
-
async uninstallM365App(titleId, manifestId) {
|
|
391
|
+
async uninstallM365App(titleId, manifestId, signal) {
|
|
392
|
+
if (signal?.aborted) {
|
|
393
|
+
return (0, teamsfx_api_1.err)(new common_2.UserCancelError("Uninstall M365 App"));
|
|
394
|
+
}
|
|
385
395
|
if (titleId === undefined && manifestId === undefined) {
|
|
386
396
|
return (0, teamsfx_api_1.err)(new common_2.MissingRequiredInputError("title id or manifest id", "FxCore"));
|
|
387
397
|
}
|
|
@@ -395,7 +405,7 @@ class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
|
395
405
|
const packageService = new packageService_1.PackageService(sideloadingServiceEndpoint, globalVars_1.TOOLS.logProvider);
|
|
396
406
|
if (titleId === undefined) {
|
|
397
407
|
try {
|
|
398
|
-
titleId = await packageService.retrieveTitleId(sideloadingTokenRes.value, manifestId ?? "");
|
|
408
|
+
titleId = await packageService.retrieveTitleId(sideloadingTokenRes.value, manifestId ?? "", signal);
|
|
399
409
|
}
|
|
400
410
|
catch (err) {
|
|
401
411
|
await globalVars_1.TOOLS.ui.showMessage("info", (0, localizeUtils_1.getLocalizedString)("core.uninstall.failed.titleId"), false);
|
|
@@ -408,7 +418,10 @@ class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
|
408
418
|
default: true,
|
|
409
419
|
});
|
|
410
420
|
if (confirmRes?.isOk() && confirmRes.value.result === true) {
|
|
411
|
-
|
|
421
|
+
if (signal?.aborted) {
|
|
422
|
+
return (0, teamsfx_api_1.err)(new common_2.UserCancelError("Uninstall M365 App"));
|
|
423
|
+
}
|
|
424
|
+
await packageService.unacquire(sideloadingTokenRes.value, titleId, signal);
|
|
412
425
|
await globalVars_1.TOOLS.ui.showMessage("info", (0, localizeUtils_1.getLocalizedString)("core.uninstall.success.m365App", titleId), false);
|
|
413
426
|
await globalVars_1.TOOLS.ui.showMessage("info", (0, localizeUtils_1.getLocalizedString)("core.uninstall.success.delayWarning"), false);
|
|
414
427
|
}
|
|
@@ -421,7 +434,10 @@ class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
|
421
434
|
/**
|
|
422
435
|
* uninstall sideloaded apps in Teams Developer Portal
|
|
423
436
|
*/
|
|
424
|
-
async uninstallAppRegistration(manifestId) {
|
|
437
|
+
async uninstallAppRegistration(manifestId, signal) {
|
|
438
|
+
if (signal?.aborted) {
|
|
439
|
+
return (0, teamsfx_api_1.err)(new common_2.UserCancelError("Uninstall App Registration"));
|
|
440
|
+
}
|
|
425
441
|
const appStudioTokenRes = await globalVars_1.TOOLS.tokenProvider.m365TokenProvider.getAccessToken({
|
|
426
442
|
scopes: (0, constants_1.AppStudioScopes)(),
|
|
427
443
|
});
|
|
@@ -434,8 +450,14 @@ class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
|
434
450
|
default: true,
|
|
435
451
|
});
|
|
436
452
|
if (confirmRes?.isOk() && confirmRes.value.result === true) {
|
|
453
|
+
if (signal?.aborted) {
|
|
454
|
+
return (0, teamsfx_api_1.err)(new common_2.UserCancelError("Uninstall App Registration"));
|
|
455
|
+
}
|
|
437
456
|
const token = appStudioTokenRes.value;
|
|
438
457
|
await teamsDevPortalClient_1.teamsDevPortalClient.deleteApp(token, manifestId);
|
|
458
|
+
if (signal?.aborted) {
|
|
459
|
+
return (0, teamsfx_api_1.err)(new common_2.UserCancelError("Uninstall App Registration"));
|
|
460
|
+
}
|
|
439
461
|
await globalVars_1.TOOLS.ui.showMessage("info", (0, localizeUtils_1.getLocalizedString)("core.uninstall.success.tdp", manifestId), false);
|
|
440
462
|
return (0, teamsfx_api_1.ok)(undefined);
|
|
441
463
|
}
|
|
@@ -447,7 +469,10 @@ class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
|
447
469
|
/**
|
|
448
470
|
* uninstall bots created in dev.botframework.com
|
|
449
471
|
*/
|
|
450
|
-
async uninstallBotFrameworRegistration(botId, manifestId) {
|
|
472
|
+
async uninstallBotFrameworRegistration(botId, manifestId, signal) {
|
|
473
|
+
if (signal?.aborted) {
|
|
474
|
+
return (0, teamsfx_api_1.err)(new common_2.UserCancelError("Uninstall Bot Framework Registration"));
|
|
475
|
+
}
|
|
451
476
|
if (!botId && !manifestId) {
|
|
452
477
|
return (0, teamsfx_api_1.err)(new common_2.MissingRequiredInputError("bot id or manifest id", "FxCore"));
|
|
453
478
|
}
|
|
@@ -472,7 +497,13 @@ class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
|
472
497
|
default: true,
|
|
473
498
|
});
|
|
474
499
|
if (confirmRes?.isOk() && confirmRes.value.result === true) {
|
|
500
|
+
if (signal?.aborted) {
|
|
501
|
+
return (0, teamsfx_api_1.err)(new common_2.UserCancelError("Uninstall Bot Framework Registration"));
|
|
502
|
+
}
|
|
475
503
|
await teamsDevPortalClient_1.teamsDevPortalClient.deleteBot(token, botId);
|
|
504
|
+
if (signal?.aborted) {
|
|
505
|
+
return (0, teamsfx_api_1.err)(new common_2.UserCancelError("Uninstall Bot Framework Registration"));
|
|
506
|
+
}
|
|
476
507
|
await globalVars_1.TOOLS.ui.showMessage("info", (0, localizeUtils_1.getLocalizedString)("core.uninstall.success.bot", botId), false);
|
|
477
508
|
}
|
|
478
509
|
else {
|
|
@@ -1416,7 +1447,7 @@ class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
|
1416
1447
|
.showMessage("info", successMessage, false, viewPluginManifest)
|
|
1417
1448
|
.then((userRes) => {
|
|
1418
1449
|
if (userRes.isOk() && userRes.value === viewPluginManifest) {
|
|
1419
|
-
context.telemetryReporter
|
|
1450
|
+
context.telemetryReporter?.sendTelemetryEvent(telemetry_1.TelemetryEvent.ViewPluginManifestAfterAdded);
|
|
1420
1451
|
void globalVars_1.TOOLS?.ui?.openFile?.(destinationPluginManifestPath);
|
|
1421
1452
|
}
|
|
1422
1453
|
});
|
|
@@ -1525,6 +1556,7 @@ class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
|
1525
1556
|
// Confirm before modifying files (matches addPlugin pattern)
|
|
1526
1557
|
const confirmMessage = (0, localizeUtils_1.getLocalizedString)("core.addSkill.confirm", path.relative(inputs.projectPath, appPackageFolder));
|
|
1527
1558
|
const confirmRes = await context.userInteraction.showMessage("warn", confirmMessage, true, (0, localizeUtils_1.getLocalizedString)("core.addSkill.continue"));
|
|
1559
|
+
(0, cancellation_1.throwIfAborted)(inputs);
|
|
1528
1560
|
if (confirmRes.isErr()) {
|
|
1529
1561
|
return (0, teamsfx_api_1.err)(confirmRes.error);
|
|
1530
1562
|
}
|
|
@@ -1903,6 +1935,7 @@ class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
|
1903
1935
|
}
|
|
1904
1936
|
// Update openapi spec
|
|
1905
1937
|
const specParser = new m365_spec_parser_1.SpecParser(apiSpecPath, (0, helper_1.getParserOptions)(m365_spec_parser_1.ProjectType.Copilot, true));
|
|
1938
|
+
(0, cancellation_1.throwIfAborted)(inputs);
|
|
1906
1939
|
await specParser.addAuthScheme(authName, authType, authParameters);
|
|
1907
1940
|
let authTypeScheme;
|
|
1908
1941
|
switch (authType) {
|
|
@@ -1951,13 +1984,13 @@ class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
|
1951
1984
|
const appIdUriPlaceholder = m365_spec_parser_1.Utils.getSafeRegistrationIdEnvName(`${authName}_APPLICATION_ID_URI`);
|
|
1952
1985
|
void context.userInteraction.showMessage("warn", (0, localizeUtils_1.getLocalizedString)("core.addAuthAction.microsoftEntra.message", appIdUriPlaceholder), false);
|
|
1953
1986
|
}
|
|
1954
|
-
context.telemetryReporter
|
|
1987
|
+
context.telemetryReporter?.sendTelemetryEvent(telemetry_1.TelemetryEvent.AddAuthAction, {
|
|
1955
1988
|
[telemetry_1.TelemetryProperty.AddAuthType]: authType,
|
|
1956
1989
|
});
|
|
1957
1990
|
}
|
|
1958
1991
|
catch (e) {
|
|
1959
1992
|
const error = (0, common_2.assembleError)(e);
|
|
1960
|
-
context.telemetryReporter
|
|
1993
|
+
context.telemetryReporter?.sendTelemetryErrorEvent(telemetry_1.TelemetryEvent.AddAuthAction, {
|
|
1961
1994
|
[telemetry_1.TelemetryProperty.ErrorCode]: error.name,
|
|
1962
1995
|
[telemetry_1.TelemetryProperty.ErrorMessage]: error.message,
|
|
1963
1996
|
});
|
|
@@ -2279,7 +2312,7 @@ class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
|
2279
2312
|
.showMessage("info", successMessage, false, viewAgentManifest)
|
|
2280
2313
|
.then((userRes) => {
|
|
2281
2314
|
if (userRes.isOk() && userRes.value === viewAgentManifest) {
|
|
2282
|
-
context.telemetryReporter
|
|
2315
|
+
context.telemetryReporter?.sendTelemetryEvent(telemetry_1.TelemetryEvent.ViewAgentManifestAfterAdded);
|
|
2283
2316
|
void globalVars_1.TOOLS?.ui?.openFile?.(agentManifestPath);
|
|
2284
2317
|
}
|
|
2285
2318
|
});
|
|
@@ -2403,7 +2436,7 @@ tslib_1.__decorate([
|
|
|
2403
2436
|
errorHandler_1.ErrorHandlerMW,
|
|
2404
2437
|
]),
|
|
2405
2438
|
tslib_1.__metadata("design:type", Function),
|
|
2406
|
-
tslib_1.__metadata("design:paramtypes", [String, String]),
|
|
2439
|
+
tslib_1.__metadata("design:paramtypes", [String, String, AbortSignal]),
|
|
2407
2440
|
tslib_1.__metadata("design:returntype", Promise)
|
|
2408
2441
|
], FxCore.prototype, "uninstallM365App", null);
|
|
2409
2442
|
tslib_1.__decorate([
|
|
@@ -2412,7 +2445,7 @@ tslib_1.__decorate([
|
|
|
2412
2445
|
errorHandler_1.ErrorHandlerMW,
|
|
2413
2446
|
]),
|
|
2414
2447
|
tslib_1.__metadata("design:type", Function),
|
|
2415
|
-
tslib_1.__metadata("design:paramtypes", [String]),
|
|
2448
|
+
tslib_1.__metadata("design:paramtypes", [String, AbortSignal]),
|
|
2416
2449
|
tslib_1.__metadata("design:returntype", Promise)
|
|
2417
2450
|
], FxCore.prototype, "uninstallAppRegistration", null);
|
|
2418
2451
|
tslib_1.__decorate([
|
|
@@ -2421,7 +2454,7 @@ tslib_1.__decorate([
|
|
|
2421
2454
|
errorHandler_1.ErrorHandlerMW,
|
|
2422
2455
|
]),
|
|
2423
2456
|
tslib_1.__metadata("design:type", Function),
|
|
2424
|
-
tslib_1.__metadata("design:paramtypes", [String, String]),
|
|
2457
|
+
tslib_1.__metadata("design:paramtypes", [String, String, AbortSignal]),
|
|
2425
2458
|
tslib_1.__metadata("design:returntype", Promise)
|
|
2426
2459
|
], FxCore.prototype, "uninstallBotFrameworRegistration", null);
|
|
2427
2460
|
tslib_1.__decorate([
|