@microsoft/teamsfx-core 2.0.0-alpha.2a6e2f57a.0 → 2.0.0-alpha.34e31d6eb.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/common/deps-checker/constant/helpLink.d.ts +6 -6
- package/build/common/deps-checker/constant/helpLink.d.ts.map +1 -1
- package/build/common/deps-checker/constant/helpLink.js +14 -8
- package/build/common/deps-checker/constant/helpLink.js.map +1 -1
- package/build/common/deps-checker/constant/message.d.ts +4 -2
- package/build/common/deps-checker/constant/message.d.ts.map +1 -1
- package/build/common/deps-checker/constant/message.js +11 -5
- package/build/common/deps-checker/constant/message.js.map +1 -1
- package/build/common/deps-checker/constant/telemetry.d.ts +12 -1
- package/build/common/deps-checker/constant/telemetry.d.ts.map +1 -1
- package/build/common/deps-checker/constant/telemetry.js +11 -0
- package/build/common/deps-checker/constant/telemetry.js.map +1 -1
- package/build/common/deps-checker/depsChecker.d.ts +3 -0
- package/build/common/deps-checker/depsChecker.d.ts.map +1 -1
- package/build/common/deps-checker/depsChecker.js.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.d.ts +3 -4
- package/build/common/deps-checker/internal/funcToolChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.js +108 -64
- package/build/common/deps-checker/internal/funcToolChecker.js.map +1 -1
- package/build/common/deps-checker/internal/nodeChecker.d.ts +3 -3
- package/build/common/deps-checker/internal/nodeChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/nodeChecker.js +1 -1
- package/build/common/deps-checker/internal/nodeChecker.js.map +1 -1
- package/build/common/deps-checker/util/fileHelper.js +1 -1
- package/build/common/deps-checker/util/fileHelper.js.map +1 -1
- package/build/common/versionMetadata.d.ts +1 -0
- package/build/common/versionMetadata.d.ts.map +1 -1
- package/build/common/versionMetadata.js +1 -0
- package/build/common/versionMetadata.js.map +1 -1
- package/build/component/configManager/diagnostic.d.ts +9 -0
- package/build/component/configManager/diagnostic.d.ts.map +1 -0
- package/build/component/configManager/diagnostic.js +47 -0
- package/build/component/configManager/diagnostic.js.map +1 -0
- package/build/component/configManager/parser.d.ts.map +1 -1
- package/build/component/configManager/parser.js +10 -4
- package/build/component/configManager/parser.js.map +1 -1
- package/build/component/constants.d.ts +4 -0
- package/build/component/constants.d.ts.map +1 -1
- package/build/component/constants.js +49 -26
- package/build/component/constants.js.map +1 -1
- package/build/component/coordinator/index.d.ts +2 -2
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +50 -61
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/developerPortalScaffoldUtils.d.ts +4 -1
- package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
- package/build/component/developerPortalScaffoldUtils.js +5 -5
- package/build/component/developerPortalScaffoldUtils.js.map +1 -1
- package/build/component/driver/arm/deployImpl.d.ts.map +1 -1
- package/build/component/driver/arm/deployImpl.js +4 -1
- package/build/component/driver/arm/deployImpl.js.map +1 -1
- package/build/component/driver/arm/validator.d.ts.map +1 -1
- package/build/component/driver/arm/validator.js +0 -15
- package/build/component/driver/arm/validator.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js +3 -3
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js.map +1 -1
- package/build/component/driver/devTool/installDriver.d.ts.map +1 -1
- package/build/component/driver/devTool/installDriver.js +18 -7
- package/build/component/driver/devTool/installDriver.js.map +1 -1
- package/build/component/driver/teamsApp/interfaces/ValidateManifestArgs.d.ts +5 -0
- package/build/component/driver/teamsApp/interfaces/ValidateManifestArgs.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validate.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validate.js +29 -9
- package/build/component/driver/teamsApp/validate.js.map +1 -1
- package/build/component/feature/apiconnector/errors.d.ts +0 -4
- package/build/component/feature/apiconnector/errors.d.ts.map +1 -1
- package/build/component/feature/apiconnector/errors.js +12 -16
- package/build/component/feature/apiconnector/errors.js.map +1 -1
- package/build/component/feature/bot/bot.js +8 -8
- package/build/component/feature/bot/bot.js.map +1 -1
- package/build/component/feature/bot/question.d.ts +6 -6
- package/build/component/feature/bot/question.d.ts.map +1 -1
- package/build/component/feature/bot/question.js +69 -38
- package/build/component/feature/bot/question.js.map +1 -1
- package/build/component/generator/generator.d.ts +1 -1
- package/build/component/generator/generator.d.ts.map +1 -1
- package/build/component/generator/generator.js +2 -2
- package/build/component/generator/generator.js.map +1 -1
- package/build/component/generator/officeAddin/question.d.ts.map +1 -1
- package/build/component/generator/officeAddin/question.js +3 -3
- package/build/component/generator/officeAddin/question.js.map +1 -1
- package/build/component/resource/appManifest/utils/ManifestUtils.d.ts +1 -0
- package/build/component/resource/appManifest/utils/ManifestUtils.d.ts.map +1 -1
- package/build/component/resource/appManifest/utils/ManifestUtils.js +4 -1
- package/build/component/resource/appManifest/utils/ManifestUtils.js.map +1 -1
- package/build/component/resource/appManifest/utils/utils.d.ts.map +1 -1
- package/build/component/resource/appManifest/utils/utils.js +5 -1
- package/build/component/resource/appManifest/utils/utils.js.map +1 -1
- package/build/component/resource/azureSql/errors.js +28 -28
- package/build/component/resource/azureSql/errors.js.map +1 -1
- package/build/component/resource/azureStorage/configs.d.ts +1 -1
- package/build/component/utils/depsChecker/bicepChecker.d.ts.map +1 -1
- package/build/component/utils/depsChecker/bicepChecker.js +4 -7
- package/build/component/utils/depsChecker/bicepChecker.js.map +1 -1
- package/build/core/FxCoreImplementV3.d.ts +1 -0
- package/build/core/FxCoreImplementV3.d.ts.map +1 -1
- package/build/core/FxCoreImplementV3.js +20 -7
- package/build/core/FxCoreImplementV3.js.map +1 -1
- package/build/core/environment.d.ts.map +1 -1
- package/build/core/environment.js +2 -13
- package/build/core/environment.js.map +1 -1
- package/build/core/middleware/projectMigratorV3.d.ts +1 -1
- package/build/core/middleware/projectMigratorV3.d.ts.map +1 -1
- package/build/core/middleware/projectMigratorV3.js +36 -24
- package/build/core/middleware/projectMigratorV3.js.map +1 -1
- package/build/core/middleware/questionModel.d.ts.map +1 -1
- package/build/core/middleware/questionModel.js +100 -17
- package/build/core/middleware/questionModel.js.map +1 -1
- package/build/core/middleware/utils/MigrationUtils.d.ts.map +1 -1
- package/build/core/middleware/utils/MigrationUtils.js +1 -0
- package/build/core/middleware/utils/MigrationUtils.js.map +1 -1
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.d.ts.map +1 -1
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.js +3 -1
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.js.map +1 -1
- package/build/core/middleware/utils/debug/taskMigrator.d.ts +1 -0
- package/build/core/middleware/utils/debug/taskMigrator.d.ts.map +1 -1
- package/build/core/middleware/utils/debug/taskMigrator.js +37 -1
- package/build/core/middleware/utils/debug/taskMigrator.js.map +1 -1
- package/build/core/middleware/utils/migrationContext.d.ts +1 -0
- package/build/core/middleware/utils/migrationContext.d.ts.map +1 -1
- package/build/core/middleware/utils/migrationContext.js +1 -0
- package/build/core/middleware/utils/migrationContext.js.map +1 -1
- package/build/core/middleware/utils/v3MigrationUtils.d.ts +8 -1
- package/build/core/middleware/utils/v3MigrationUtils.d.ts.map +1 -1
- package/build/core/middleware/utils/v3MigrationUtils.js +28 -3
- package/build/core/middleware/utils/v3MigrationUtils.js.map +1 -1
- package/build/core/question.d.ts +7 -1
- package/build/core/question.d.ts.map +1 -1
- package/build/core/question.js +178 -88
- package/build/core/question.js.map +1 -1
- package/build/error/arm.d.ts +6 -0
- package/build/error/arm.d.ts.map +1 -1
- package/build/error/arm.js +17 -1
- package/build/error/arm.js.map +1 -1
- package/build/error/common.d.ts +3 -0
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +14 -1
- package/build/error/common.js.map +1 -1
- package/build/error/deploy.d.ts +1 -1
- package/build/error/deploy.d.ts.map +1 -1
- package/build/error/deploy.js +5 -5
- package/build/error/deploy.js.map +1 -1
- package/build/error/upgrade.d.ts +5 -0
- package/build/error/upgrade.d.ts.map +1 -0
- package/build/error/upgrade.js +16 -0
- package/build/error/upgrade.js.map +1 -0
- package/package.json +11 -7
- package/resource/package.nls.json +52 -59
- package/templates/core/v3Migration/csharp.app.local.yml +3 -2
- package/templates/core/v3Migration/csharp.app.yml +16 -7
- package/templates/core/v3Migration/js.ts.app.local.yml +23 -12
- package/templates/core/v3Migration/js.ts.app.yml +30 -14
- package/templates/core/v3Migration/spfx.app.yml +1 -1
- package/templates/fallback/common.zip +0 -0
- package/templates/fallback/csharp.zip +0 -0
- package/templates/fallback/js.zip +0 -0
- package/templates/fallback/ts.zip +0 -0
- package/templates/plugins/resource/aad/auth/V3/Bot/SSO/SsoOperations.cs +23 -8
- package/templates/plugins/resource/aad/auth/V3/Tab/GetUserProfile.razor +2 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export declare const defaultHelpLink = "https://aka.ms/teamsfx-envchecker-help";
|
|
2
|
+
export declare const v3DefaultHelpLink = "https://aka.ms/teamsfx-actions/devtool-install";
|
|
2
3
|
export declare const validationSettingsHelpLink: string;
|
|
3
4
|
export declare const functionDepsVersionsLink = "https://aka.ms/functions-node-versions";
|
|
4
|
-
export declare const nodeNotFoundHelpLink
|
|
5
|
-
export declare const nodeNotSupportedForAzureHelpLink
|
|
6
|
-
export declare const nodeNotSupportedForFunctionsHelpLink: string;
|
|
5
|
+
export declare const nodeNotFoundHelpLink = "https://aka.ms/teamsfx-node";
|
|
6
|
+
export declare const nodeNotSupportedForAzureHelpLink = "https://aka.ms/teamsfx-node";
|
|
7
7
|
export declare const nodeNotSupportedForSPFxHelpLink: string;
|
|
8
8
|
export declare const nodeInstallationLink = "https://nodejs.org/about/releases/";
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
9
|
+
export declare const dotnetDefaultHelpLink = "https://aka.ms/teamsfx-actions/devtool-install";
|
|
10
|
+
export declare const dotnetExplanationHelpLink = "https://aka.ms/teamsfx-actions/devtool-install";
|
|
11
|
+
export declare const dotnetFailToInstallHelpLink = "https://aka.ms/teamsfx-actions/devtool-install";
|
|
12
12
|
export declare const dotnetNotSupportTargetVersionHelpLink: string;
|
|
13
13
|
export declare const ngrokInstallHelpLink: string;
|
|
14
14
|
export declare const vxTestAppInstallHelpLink: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpLink.d.ts","sourceRoot":"","sources":["../../../../src/common/deps-checker/constant/helpLink.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe,2CAA2C,CAAC;AACxE,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"helpLink.d.ts","sourceRoot":"","sources":["../../../../src/common/deps-checker/constant/helpLink.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe,2CAA2C,CAAC;AACxE,eAAO,MAAM,iBAAiB,mDAAmD,CAAC;AAGlF,eAAO,MAAM,0BAA0B,QAAyD,CAAC;AAEjG,eAAO,MAAM,wBAAwB,2CAA2C,CAAC;AAGjF,eAAO,MAAM,oBAAoB,gCAAgC,CAAC;AAElE,eAAO,MAAM,gCAAgC,gCAAgC,CAAC;AAE9E,eAAO,MAAM,+BAA+B,QAAqD,CAAC;AAClG,eAAO,MAAM,oBAAoB,uCAAuC,CAAC;AAEzE,eAAO,MAAM,qBAAqB,mDAAmD,CAAC;AACtF,eAAO,MAAM,yBAAyB,mDAAwB,CAAC;AAC/D,eAAO,MAAM,2BAA2B,mDAAwB,CAAC;AAEjE,eAAO,MAAM,qCAAqC,QAAqD,CAAC;AAGxG,eAAO,MAAM,oBAAoB,QAA0C,CAAC;AAC5E,eAAO,MAAM,wBAAwB,QAAmE,CAAC;AAEzG,eAAO,MAAM,sBAAsB,gCAAgC,CAAC;AACpE,eAAO,MAAM,0BAA0B,gCAAgC,CAAC;AACxE,eAAO,MAAM,oBAAoB,gCAAgC,CAAC"}
|
|
@@ -2,20 +2,26 @@
|
|
|
2
2
|
// Copyright (c) Microsoft Corporation.
|
|
3
3
|
// Licensed under the MIT license.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.v3NodeNotLtsHelpLink = exports.v3NodeNotSupportedHelpLink = exports.v3NodeNotFoundHelpLink = exports.vxTestAppInstallHelpLink = exports.ngrokInstallHelpLink = exports.dotnetNotSupportTargetVersionHelpLink = exports.
|
|
6
|
-
// TODO:
|
|
5
|
+
exports.v3NodeNotLtsHelpLink = exports.v3NodeNotSupportedHelpLink = exports.v3NodeNotFoundHelpLink = exports.vxTestAppInstallHelpLink = exports.ngrokInstallHelpLink = exports.dotnetNotSupportTargetVersionHelpLink = exports.dotnetFailToInstallHelpLink = exports.dotnetExplanationHelpLink = exports.dotnetDefaultHelpLink = exports.nodeInstallationLink = exports.nodeNotSupportedForSPFxHelpLink = exports.nodeNotSupportedForAzureHelpLink = exports.nodeNotFoundHelpLink = exports.functionDepsVersionsLink = exports.validationSettingsHelpLink = exports.v3DefaultHelpLink = exports.defaultHelpLink = void 0;
|
|
6
|
+
// TODO: remove this link after clean the useless code.
|
|
7
7
|
exports.defaultHelpLink = "https://aka.ms/teamsfx-envchecker-help";
|
|
8
|
+
exports.v3DefaultHelpLink = "https://aka.ms/teamsfx-actions/devtool-install";
|
|
9
|
+
// TODO: remove this link after clean the useless code.
|
|
8
10
|
exports.validationSettingsHelpLink = `${exports.defaultHelpLink}#teams-toolkit-validation-settings`;
|
|
9
11
|
exports.functionDepsVersionsLink = "https://aka.ms/functions-node-versions";
|
|
10
|
-
|
|
11
|
-
exports.
|
|
12
|
-
|
|
12
|
+
// TODO: remove this link after clean the useless code.
|
|
13
|
+
exports.nodeNotFoundHelpLink = `https://aka.ms/teamsfx-node`;
|
|
14
|
+
// TODO: remove this link after clean the useless code.
|
|
15
|
+
exports.nodeNotSupportedForAzureHelpLink = `https://aka.ms/teamsfx-node`;
|
|
16
|
+
// TODO: remove this link after clean the useless code.
|
|
13
17
|
exports.nodeNotSupportedForSPFxHelpLink = `${exports.defaultHelpLink}#nodenotsupported-spfx-hosting`;
|
|
14
18
|
exports.nodeInstallationLink = "https://nodejs.org/about/releases/";
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
19
|
+
exports.dotnetDefaultHelpLink = "https://aka.ms/teamsfx-actions/devtool-install";
|
|
20
|
+
exports.dotnetExplanationHelpLink = exports.dotnetDefaultHelpLink;
|
|
21
|
+
exports.dotnetFailToInstallHelpLink = exports.dotnetDefaultHelpLink;
|
|
22
|
+
// TODO: remove this link after clean the useless code.
|
|
18
23
|
exports.dotnetNotSupportTargetVersionHelpLink = `${exports.defaultHelpLink}#dotnetnotsupporttargetversion`;
|
|
24
|
+
// TODO: remove this link after clean the useless code.
|
|
19
25
|
exports.ngrokInstallHelpLink = `${exports.defaultHelpLink}#failtoinstallngrok`;
|
|
20
26
|
exports.vxTestAppInstallHelpLink = `${exports.defaultHelpLink}#failtoinstallteamsvideoextensibilitytestapp`;
|
|
21
27
|
exports.v3NodeNotFoundHelpLink = "https://aka.ms/teamsfx-node";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpLink.js","sourceRoot":"","sources":["../../../../src/common/deps-checker/constant/helpLink.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,
|
|
1
|
+
{"version":3,"file":"helpLink.js","sourceRoot":"","sources":["../../../../src/common/deps-checker/constant/helpLink.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,uDAAuD;AAC1C,QAAA,eAAe,GAAG,wCAAwC,CAAC;AAC3D,QAAA,iBAAiB,GAAG,gDAAgD,CAAC;AAElF,uDAAuD;AAC1C,QAAA,0BAA0B,GAAG,GAAG,uBAAe,oCAAoC,CAAC;AAEpF,QAAA,wBAAwB,GAAG,wCAAwC,CAAC;AAEjF,uDAAuD;AAC1C,QAAA,oBAAoB,GAAG,6BAA6B,CAAC;AAClE,uDAAuD;AAC1C,QAAA,gCAAgC,GAAG,6BAA6B,CAAC;AAC9E,uDAAuD;AAC1C,QAAA,+BAA+B,GAAG,GAAG,uBAAe,gCAAgC,CAAC;AACrF,QAAA,oBAAoB,GAAG,oCAAoC,CAAC;AAE5D,QAAA,qBAAqB,GAAG,gDAAgD,CAAC;AACzE,QAAA,yBAAyB,GAAG,6BAAqB,CAAC;AAClD,QAAA,2BAA2B,GAAG,6BAAqB,CAAC;AACjE,uDAAuD;AAC1C,QAAA,qCAAqC,GAAG,GAAG,uBAAe,gCAAgC,CAAC;AAExG,uDAAuD;AAC1C,QAAA,oBAAoB,GAAG,GAAG,uBAAe,qBAAqB,CAAC;AAC/D,QAAA,wBAAwB,GAAG,GAAG,uBAAe,8CAA8C,CAAC;AAE5F,QAAA,sBAAsB,GAAG,6BAA6B,CAAC;AACvD,QAAA,0BAA0B,GAAG,6BAA6B,CAAC;AAC3D,QAAA,oBAAoB,GAAG,6BAA6B,CAAC"}
|
|
@@ -2,9 +2,11 @@ export declare const Messages: {
|
|
|
2
2
|
defaultErrorMessage: () => string[];
|
|
3
3
|
needInstallNpm: () => string;
|
|
4
4
|
failToValidateFuncCoreTool: () => string;
|
|
5
|
-
|
|
6
|
-
portableFuncNodeNotMatched: () => string;
|
|
5
|
+
portableFuncNodeNotMatched: (nodeVersion: string, funcVersion: string) => string;
|
|
7
6
|
symlinkDirAlreadyExist: () => string;
|
|
7
|
+
invalidFuncVersion: (version: string) => string;
|
|
8
|
+
noSentinelFile: () => string;
|
|
9
|
+
funcVersionNotMatch: (funcVersion: string, expectedFuncVersion: string) => string;
|
|
8
10
|
startInstallNgrok: () => string;
|
|
9
11
|
finishInstallNgrok: () => string;
|
|
10
12
|
needInstallNgrok: () => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../src/common/deps-checker/constant/message.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../src/common/deps-checker/constant/message.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,QAAQ;;;;8CAQuB,MAAM,eAAe,MAAM;;kCAKvC,MAAM;;uCAGD,MAAM,uBAAuB,MAAM;;;;;;;;;;;;yCAmBjC,MAAM,qBAAqB,MAAM;iCAOzC,MAAM,qBAAqB,MAAM;;;;;;CAsB/D,CAAC"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.Messages = void 0;
|
|
6
6
|
const localizeUtils_1 = require("../../localizeUtils");
|
|
7
|
+
const helpLink_1 = require("./helpLink");
|
|
7
8
|
exports.Messages = {
|
|
8
9
|
// learnMoreButtonText: getLocalizedString("depChecker.learnMoreButtonText"),
|
|
9
10
|
defaultErrorMessage: () => [
|
|
@@ -12,9 +13,13 @@ exports.Messages = {
|
|
|
12
13
|
],
|
|
13
14
|
needInstallNpm: () => localizeUtils_1.getLocalizedString("depChecker.needInstallNpm"),
|
|
14
15
|
failToValidateFuncCoreTool: () => localizeUtils_1.getLocalizedString("depChecker.failToValidateFuncCoreTool"),
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
portableFuncNodeNotMatched: (nodeVersion, funcVersion) => localizeUtils_1.getLocalizedString("depChecker.portableFuncNodeNotMatched")
|
|
17
|
+
.replace("@NodeVersion", nodeVersion)
|
|
18
|
+
.replace("@FuncVersion", funcVersion),
|
|
17
19
|
symlinkDirAlreadyExist: () => localizeUtils_1.getLocalizedString("depChecker.symlinkDirAlreadyExist"),
|
|
20
|
+
invalidFuncVersion: (version) => localizeUtils_1.getLocalizedString("depChecker.invalidFuncVersion", version),
|
|
21
|
+
noSentinelFile: () => localizeUtils_1.getLocalizedString("depChecker.noSentinelFile"),
|
|
22
|
+
funcVersionNotMatch: (funcVersion, expectedFuncVersion) => localizeUtils_1.getLocalizedString("depChecker.funcVersionNotMatch", funcVersion, expectedFuncVersion),
|
|
18
23
|
startInstallNgrok: () => localizeUtils_1.getLocalizedString("depChecker.startInstallNgrok"),
|
|
19
24
|
finishInstallNgrok: () => localizeUtils_1.getLocalizedString("depChecker.finishInstallNgrok"),
|
|
20
25
|
needInstallNgrok: () => localizeUtils_1.getLocalizedString("depChecker.needInstallNgrok"),
|
|
@@ -24,12 +29,13 @@ exports.Messages = {
|
|
|
24
29
|
useGlobalDotnet: () => localizeUtils_1.getLocalizedString("depChecker.useGlobalDotnet"),
|
|
25
30
|
dotnetInstallStderr: () => localizeUtils_1.getLocalizedString("depChecker.dotnetInstallStderr"),
|
|
26
31
|
dotnetInstallErrorCode: () => localizeUtils_1.getLocalizedString("depChecker.dotnetInstallErrorCode"),
|
|
27
|
-
NodeNotFound: () => localizeUtils_1.getLocalizedString("depChecker.NodeNotFound"),
|
|
32
|
+
NodeNotFound: () => localizeUtils_1.getLocalizedString("depChecker.NodeNotFound", helpLink_1.nodeInstallationLink),
|
|
33
|
+
// TODO: remove this message after clean useless code
|
|
28
34
|
NodeNotSupported: () => localizeUtils_1.getLocalizedString("depChecker.NodeNotSupported"),
|
|
29
35
|
// In v3, the message will be displayed in the output.
|
|
30
36
|
// TODO: add localized string to FxError.displayMessage
|
|
31
|
-
V3NodeNotSupported: (currentVersion, supportedVersions) => localizeUtils_1.getDefaultString("depChecker.V3NodeNotSupported", currentVersion, supportedVersions),
|
|
32
|
-
NodeNotLts: (currentVersion, supportedVersions) => localizeUtils_1.getDefaultString("depChecker.NodeNotLts", currentVersion, supportedVersions),
|
|
37
|
+
V3NodeNotSupported: (currentVersion, supportedVersions) => localizeUtils_1.getDefaultString("depChecker.V3NodeNotSupported", currentVersion, supportedVersions, helpLink_1.nodeInstallationLink),
|
|
38
|
+
NodeNotLts: (currentVersion, supportedVersions) => localizeUtils_1.getDefaultString("depChecker.NodeNotLts", currentVersion, supportedVersions, helpLink_1.nodeInstallationLink),
|
|
33
39
|
dotnetNotFound: () => localizeUtils_1.getLocalizedString("depChecker.dotnetNotFound"),
|
|
34
40
|
// depsNotFound: () => getLocalizedString("depChecker.depsNotFound"),
|
|
35
41
|
failToValidateVxTestAppInstallOptions: () => localizeUtils_1.getLocalizedString("depChecker.failToValidateVxTestAppInstallOptions"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../../../src/common/deps-checker/constant/message.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,uDAA2E;
|
|
1
|
+
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../../../src/common/deps-checker/constant/message.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,uDAA2E;AAC3E,yCAAkD;AAErC,QAAA,QAAQ,GAAG;IACtB,6EAA6E;IAC7E,mBAAmB,EAAE,GAAG,EAAE,CAAC;QACzB,gCAAgB,CAAC,sCAAsC,CAAC;QACxD,kCAAkB,CAAC,sCAAsC,CAAC;KAC3D;IACD,cAAc,EAAE,GAAG,EAAE,CAAC,kCAAkB,CAAC,2BAA2B,CAAC;IACrE,0BAA0B,EAAE,GAAG,EAAE,CAAC,kCAAkB,CAAC,uCAAuC,CAAC;IAC7F,0BAA0B,EAAE,CAAC,WAAmB,EAAE,WAAmB,EAAE,EAAE,CACvE,kCAAkB,CAAC,uCAAuC,CAAC;SACxD,OAAO,CAAC,cAAc,EAAE,WAAW,CAAC;SACpC,OAAO,CAAC,cAAc,EAAE,WAAW,CAAC;IACzC,sBAAsB,EAAE,GAAG,EAAE,CAAC,kCAAkB,CAAC,mCAAmC,CAAC;IACrF,kBAAkB,EAAE,CAAC,OAAe,EAAE,EAAE,CACtC,kCAAkB,CAAC,+BAA+B,EAAE,OAAO,CAAC;IAC9D,cAAc,EAAE,GAAG,EAAE,CAAC,kCAAkB,CAAC,2BAA2B,CAAC;IACrE,mBAAmB,EAAE,CAAC,WAAmB,EAAE,mBAA2B,EAAE,EAAE,CACxE,kCAAkB,CAAC,gCAAgC,EAAE,WAAW,EAAE,mBAAmB,CAAC;IACxF,iBAAiB,EAAE,GAAG,EAAE,CAAC,kCAAkB,CAAC,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,qBAAqB,EAAE,GAAG,EAAE,CAAC,kCAAkB,CAAC,kCAAkC,CAAC;IAEnF,iBAAiB,EAAE,GAAG,EAAE,CAAC,kCAAkB,CAAC,8BAA8B,CAAC;IAE3E,8DAA8D;IAC9D,kDAAkD;IAClD,KAAK;CACN,CAAC"}
|
|
@@ -48,7 +48,18 @@ export declare enum TelemetryProperties {
|
|
|
48
48
|
NgrokNpmInstallNodeVersion = "ngrok-npm-install-node-version",
|
|
49
49
|
NgrokNpmInstallNpmVersion = "ngrok-npm-install-npm-version",
|
|
50
50
|
NgrokNpmInstallExitCode = "ngrok-npm-install-exit-code",
|
|
51
|
-
NgrokNpmInstallLog = "ngrok-npm-install-log"
|
|
51
|
+
NgrokNpmInstallLog = "ngrok-npm-install-log",
|
|
52
|
+
SymlinkFuncVersion = "symlink-func-version",
|
|
53
|
+
SelectedPortableFuncVersion = "selected-portable-func-version",
|
|
54
|
+
HistoryFuncVersion = "history-func-version",
|
|
55
|
+
VersioningFuncVersions = "versioning-func-versions",
|
|
56
|
+
GlobalFuncVersion = "global-func-version",
|
|
57
|
+
InstalledFuncVersion = "installed-func-version",
|
|
58
|
+
SymlinkFuncVersionError = "symlink-func-version-error",
|
|
59
|
+
HistoryFuncVersionError = "history-func-version-error",
|
|
60
|
+
VersioningFuncVersionError = "versioning-func-version-error",
|
|
61
|
+
GlobalFuncVersionError = "global-func-version-error",
|
|
62
|
+
InstallFuncError = "install-func-error"
|
|
52
63
|
}
|
|
53
64
|
export declare enum TelemetryMessurement {
|
|
54
65
|
completionTime = "completion-time"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../../../src/common/deps-checker/constant/telemetry.ts"],"names":[],"mappings":"AAGA,oBAAY,gBAAgB;IAC1B,cAAc,iCAAiC;IAC/C,WAAW,6BAA6B;IAExC,WAAW,iBAAiB;IAC5B,gBAAgB,uBAAuB;IACvC,YAAY,mBAAmB;IAC/B,wBAAwB,iCAAiC;IACzD,uBAAuB,gCAAgC;IACvD,0BAA0B,mCAAmC;IAC7D,UAAU,iBAAiB;IAE3B,WAAW,kBAAkB;IAC7B,mBAAmB,0BAA0B;IAE7C,gBAAgB,uBAAuB;IACvC,oBAAoB,2BAA2B;IAC/C,oBAAoB,2BAA2B;IAC/C,gBAAgB,uBAAuB;IACvC,0BAA0B,kCAAkC;IAC5D,sBAAsB,8BAA8B;IACpD,mBAAmB,0BAA0B;IAE7C,kBAAkB,yBAAyB;IAC3C,sBAAsB,6BAA6B;IACnD,sBAAsB,6BAA6B;IACnD,kBAAkB,yBAAyB;IAC3C,4BAA4B,oCAAoC;IAChE,wBAAwB,gCAAgC;IACxD,qBAAqB,4BAA4B;IACjD,sBAAsB,8BAA8B;IAEpD,iBAAiB,wBAAwB;IACzC,qBAAqB,4BAA4B;IACjD,iBAAiB,wBAAwB;IACzC,WAAW,kBAAkB;IAC7B,2BAA2B,mCAAmC;IAC9D,uBAAuB,+BAA+B;IACtD,oBAAoB,2BAA2B;IAE/C,gBAAgB,uBAAuB;CACxC;AAED,oBAAY,gBAAgB;IAC1B,mBAAmB,uCAAuC;IAC1D,oBAAoB,6BAA6B;IACjD,WAAW,sBAAsB;IACjC,wBAAwB,kCAAkC;IAC1D,sBAAsB,+BAA+B;IACrD,wBAAwB,kCAAkC;IAC1D,oBAAoB,6BAA6B;IACjD,qBAAqB,8BAA8B;CACpD;AAED,oBAAY,mBAAmB;IAC7B,0BAA0B,mCAAmC;IAC7D,yBAAyB,kCAAkC;IAC3D,uBAAuB,gCAAgC;IACvD,kBAAkB,0BAA0B;
|
|
1
|
+
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../../../src/common/deps-checker/constant/telemetry.ts"],"names":[],"mappings":"AAGA,oBAAY,gBAAgB;IAC1B,cAAc,iCAAiC;IAC/C,WAAW,6BAA6B;IAExC,WAAW,iBAAiB;IAC5B,gBAAgB,uBAAuB;IACvC,YAAY,mBAAmB;IAC/B,wBAAwB,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,gBAAgB,uBAAuB;CACxC;AAED,oBAAY,oBAAoB;IAC9B,cAAc,oBAAoB;CACnC"}
|
|
@@ -57,6 +57,17 @@ var TelemetryProperties;
|
|
|
57
57
|
TelemetryProperties["NgrokNpmInstallNpmVersion"] = "ngrok-npm-install-npm-version";
|
|
58
58
|
TelemetryProperties["NgrokNpmInstallExitCode"] = "ngrok-npm-install-exit-code";
|
|
59
59
|
TelemetryProperties["NgrokNpmInstallLog"] = "ngrok-npm-install-log";
|
|
60
|
+
TelemetryProperties["SymlinkFuncVersion"] = "symlink-func-version";
|
|
61
|
+
TelemetryProperties["SelectedPortableFuncVersion"] = "selected-portable-func-version";
|
|
62
|
+
TelemetryProperties["HistoryFuncVersion"] = "history-func-version";
|
|
63
|
+
TelemetryProperties["VersioningFuncVersions"] = "versioning-func-versions";
|
|
64
|
+
TelemetryProperties["GlobalFuncVersion"] = "global-func-version";
|
|
65
|
+
TelemetryProperties["InstalledFuncVersion"] = "installed-func-version";
|
|
66
|
+
TelemetryProperties["SymlinkFuncVersionError"] = "symlink-func-version-error";
|
|
67
|
+
TelemetryProperties["HistoryFuncVersionError"] = "history-func-version-error";
|
|
68
|
+
TelemetryProperties["VersioningFuncVersionError"] = "versioning-func-version-error";
|
|
69
|
+
TelemetryProperties["GlobalFuncVersionError"] = "global-func-version-error";
|
|
70
|
+
TelemetryProperties["InstallFuncError"] = "install-func-error";
|
|
60
71
|
})(TelemetryProperties = exports.TelemetryProperties || (exports.TelemetryProperties = {}));
|
|
61
72
|
var TelemetryMessurement;
|
|
62
73
|
(function (TelemetryMessurement) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../../../src/common/deps-checker/constant/telemetry.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,IAAY,gBAyCX;AAzCD,WAAY,gBAAgB;IAC1B,mEAA+C,CAAA;IAC/C,4DAAwC,CAAA;IAExC,gDAA4B,CAAA;IAC5B,2DAAuC,CAAA;IACvC,mDAA+B,CAAA;IAC/B,6EAAyD,CAAA;IACzD,2EAAuD,CAAA;IACvD,iFAA6D,CAAA;IAC7D,+CAA2B,CAAA;IAE3B,iDAA6B,CAAA;IAC7B,iEAA6C,CAAA;IAE7C,2DAAuC,CAAA;IACvC,mEAA+C,CAAA;IAC/C,mEAA+C,CAAA;IAC/C,2DAAuC,CAAA;IACvC,gFAA4D,CAAA;IAC5D,wEAAoD,CAAA;IACpD,iEAA6C,CAAA;IAE7C,+DAA2C,CAAA;IAC3C,uEAAmD,CAAA;IACnD,uEAAmD,CAAA;IACnD,+DAA2C,CAAA;IAC3C,oFAAgE,CAAA;IAChE,4EAAwD,CAAA;IACxD,qEAAiD,CAAA;IACjD,wEAAoD,CAAA;IAEpD,6DAAyC,CAAA;IACzC,qEAAiD,CAAA;IACjD,6DAAyC,CAAA;IACzC,iDAA6B,CAAA;IAC7B,kFAA8D,CAAA;IAC9D,0EAAsD,CAAA;IACtD,mEAA+C,CAAA;IAE/C,2DAAuC,CAAA;AACzC,CAAC,EAzCW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAyC3B;AAED,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC1B,8EAA0D,CAAA;IAC1D,qEAAiD,CAAA;IACjD,qDAAiC,CAAA;IACjC,8EAA0D,CAAA;IAC1D,yEAAqD,CAAA;IACrD,8EAA0D,CAAA;IAC1D,qEAAiD,CAAA;IACjD,uEAAmD,CAAA;AACrD,CAAC,EATW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAS3B;AAED,IAAY,
|
|
1
|
+
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../../../src/common/deps-checker/constant/telemetry.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,IAAY,gBAyCX;AAzCD,WAAY,gBAAgB;IAC1B,mEAA+C,CAAA;IAC/C,4DAAwC,CAAA;IAExC,gDAA4B,CAAA;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AAmB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAChD,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AAEF,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED,oBAAY,QAAQ;IAClB,SAAS,eAAe;IACxB,QAAQ,cAAc;IACtB,OAAO,aAAa;IACpB,WAAW,iBAAiB;IAC5B,MAAM,WAAW;IACjB,aAAa,oBAAoB;IACjC,KAAK,UAAU;IACf,SAAS,gBAAgB;CAC1B;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,oBAAY,cAAc,GAAG,kBAAkB,GAAG,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depsChecker.js","sourceRoot":"","sources":["../../../src/common/deps-checker/depsChecker.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"depsChecker.js","sourceRoot":"","sources":["../../../src/common/deps-checker/depsChecker.ts"],"names":[],"mappings":";;;AAkCA,IAAY,QASX;AATD,WAAY,QAAQ;IAClB,oCAAwB,CAAA;IACxB,kCAAsB,CAAA;IACtB,gCAAoB,CAAA;IACpB,wCAA4B,CAAA;IAC5B,6BAAiB,CAAA;IACjB,6CAAiC,CAAA;IACjC,2BAAe,CAAA;IACf,qCAAyB,CAAA;AAC3B,CAAC,EATW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QASnB"}
|
|
@@ -9,9 +9,9 @@ declare type FuncVersion = {
|
|
|
9
9
|
versionStr: string;
|
|
10
10
|
};
|
|
11
11
|
export declare class FuncToolChecker implements DepsChecker {
|
|
12
|
-
private
|
|
12
|
+
private telemetryProperties;
|
|
13
13
|
constructor(logger?: DepsLogger, telemetry?: DepsTelemetry);
|
|
14
|
-
getDepsInfo(funcVersion: FuncVersion |
|
|
14
|
+
getDepsInfo(funcVersion: FuncVersion | undefined, binFolder: string | undefined, error?: DepsCheckerError): Promise<DependencyStatus>;
|
|
15
15
|
resolve(installOptions: FuncInstallOptions): Promise<DependencyStatus>;
|
|
16
16
|
getInstallationInfo(installOptions: FuncInstallOptions): Promise<DependencyStatus>;
|
|
17
17
|
private getNodeVersion;
|
|
@@ -30,9 +30,8 @@ export declare class FuncToolChecker implements DepsChecker {
|
|
|
30
30
|
private cleanup;
|
|
31
31
|
private installFunc;
|
|
32
32
|
private getExecCommand;
|
|
33
|
-
private appendLog;
|
|
34
33
|
}
|
|
35
|
-
export declare function mapToFuncToolsVersion(output: string): FuncVersion
|
|
34
|
+
export declare function mapToFuncToolsVersion(output: string): FuncVersion;
|
|
36
35
|
export declare function isFuncVersionSupport(actualFuncVersion: FuncVersion, expectedFuncVersion: string): boolean;
|
|
37
36
|
export {};
|
|
38
37
|
//# sourceMappingURL=funcToolChecker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"funcToolChecker.d.ts","sourceRoot":"","sources":["../../../../src/common/deps-checker/internal/funcToolChecker.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAY,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAA6C,MAAM,cAAc,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,M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AAC,sBAAsB;IAIrC,OAAO,CAAC,MAAM,CAAC,wBAAwB;YASzB,gBAAgB;YAahB,MAAM;YASN,OAAO;YAMP,WAAW;IA2BzB,OAAO,CAAC,cAAc;CAGvB;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAwBjE;AAED,wBAAgB,oBAAoB,CAClC,iBAAiB,EAAE,WAAW,EAC9B,mBAAmB,EAAE,MAAM,GAC1B,OAAO,CAET"}
|
|
@@ -22,13 +22,19 @@ const cpUtils_1 = require("../util/cpUtils");
|
|
|
22
22
|
const fileHelper_1 = require("../util/fileHelper");
|
|
23
23
|
const system_1 = require("../util/system");
|
|
24
24
|
const nodeChecker_1 = require("./nodeChecker");
|
|
25
|
+
const telemetry_1 = require("../constant/telemetry");
|
|
26
|
+
const nodeFuncVersionRangeMapping = {
|
|
27
|
+
"12": "3",
|
|
28
|
+
"14": "3 || 4",
|
|
29
|
+
"16": ">=4",
|
|
30
|
+
"18": ">=4.0.4670",
|
|
31
|
+
};
|
|
25
32
|
const funcPackageName = "azure-functions-core-tools";
|
|
26
33
|
const funcToolName = "Azure Functions Core Tools";
|
|
27
34
|
const timeout = 5 * 60 * 1000;
|
|
28
35
|
class FuncToolChecker {
|
|
29
36
|
constructor(logger, telemetry) {
|
|
30
|
-
|
|
31
|
-
this.log = "";
|
|
37
|
+
this.telemetryProperties = {};
|
|
32
38
|
}
|
|
33
39
|
async getDepsInfo(funcVersion, binFolder, error) {
|
|
34
40
|
var _a;
|
|
@@ -43,6 +49,7 @@ class FuncToolChecker {
|
|
|
43
49
|
supportedVersions: [],
|
|
44
50
|
binFolders: binFolder ? [binFolder] : undefined,
|
|
45
51
|
},
|
|
52
|
+
telemetryProperties: this.telemetryProperties,
|
|
46
53
|
error: error,
|
|
47
54
|
});
|
|
48
55
|
}
|
|
@@ -52,12 +59,15 @@ class FuncToolChecker {
|
|
|
52
59
|
const nodeVersion = await this.getNodeVersion();
|
|
53
60
|
installationInfo = await this.getInstallationInfo(installOptions);
|
|
54
61
|
if (!installationInfo.isInstalled) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
62
|
+
const symlinkDir = installOptions.symlinkDir
|
|
63
|
+
? path.resolve(installOptions.projectPath, installOptions.symlinkDir)
|
|
64
|
+
: undefined;
|
|
65
|
+
installationInfo = await this.install(installOptions.version, symlinkDir);
|
|
58
66
|
}
|
|
59
|
-
if (!installationInfo.error &&
|
|
60
|
-
|
|
67
|
+
if (!installationInfo.error &&
|
|
68
|
+
installationInfo.isInstalled &&
|
|
69
|
+
installationInfo.details.installVersion) {
|
|
70
|
+
const expectedFuncNodeError = await this.checkExpectedFuncAndNode(installationInfo.details.installVersion, nodeVersion);
|
|
61
71
|
if (expectedFuncNodeError) {
|
|
62
72
|
installationInfo.error = expectedFuncNodeError;
|
|
63
73
|
}
|
|
@@ -66,34 +76,49 @@ class FuncToolChecker {
|
|
|
66
76
|
}
|
|
67
77
|
catch (error) {
|
|
68
78
|
if (error instanceof depsError_1.DepsCheckerError) {
|
|
69
|
-
return await this.getDepsInfo(
|
|
79
|
+
return await this.getDepsInfo(undefined, undefined, error);
|
|
70
80
|
}
|
|
71
|
-
return await this.getDepsInfo(
|
|
81
|
+
return await this.getDepsInfo(undefined, undefined, new depsError_1.DepsCheckerError(error.message, helpLink_1.v3DefaultHelpLink));
|
|
72
82
|
}
|
|
73
83
|
}
|
|
74
84
|
async getInstallationInfo(installOptions) {
|
|
75
85
|
const symlinkDir = installOptions.symlinkDir
|
|
76
|
-
? path.
|
|
86
|
+
? path.resolve(installOptions.projectPath, installOptions.symlinkDir)
|
|
77
87
|
: undefined;
|
|
78
88
|
if (symlinkDir) {
|
|
79
|
-
const
|
|
80
|
-
if (
|
|
81
|
-
|
|
89
|
+
const symlinkFuncRes = await this.checkFuncVersion(installOptions.version, symlinkDir, undefined);
|
|
90
|
+
if (symlinkFuncRes.isOk()) {
|
|
91
|
+
this.telemetryProperties[telemetry_1.TelemetryProperties.SymlinkFuncVersion] =
|
|
92
|
+
symlinkFuncRes.value.versionStr;
|
|
93
|
+
return await this.getDepsInfo(symlinkFuncRes.value, symlinkDir);
|
|
82
94
|
}
|
|
83
95
|
else {
|
|
96
|
+
this.telemetryProperties[telemetry_1.TelemetryProperties.SymlinkFuncVersionError] =
|
|
97
|
+
symlinkFuncRes.error.message;
|
|
84
98
|
await fileHelper_1.unlinkSymlink(symlinkDir);
|
|
85
99
|
}
|
|
86
100
|
}
|
|
87
101
|
const portableFunc = await this.checkPortableFuncVersion(installOptions.version);
|
|
88
102
|
if (portableFunc) {
|
|
103
|
+
this.telemetryProperties[telemetry_1.TelemetryProperties.SelectedPortableFuncVersion] =
|
|
104
|
+
portableFunc.funcVersion.versionStr;
|
|
89
105
|
if (symlinkDir) {
|
|
90
106
|
await fileHelper_1.createSymlink(portableFunc.binFolder, symlinkDir);
|
|
91
107
|
return await this.getDepsInfo(portableFunc.funcVersion, symlinkDir);
|
|
92
108
|
}
|
|
93
109
|
return await this.getDepsInfo(portableFunc.funcVersion, portableFunc.binFolder);
|
|
94
110
|
}
|
|
95
|
-
const
|
|
96
|
-
|
|
111
|
+
const globalFuncRes = await this.checkFuncVersion(installOptions.version, undefined, undefined);
|
|
112
|
+
if (globalFuncRes.isOk()) {
|
|
113
|
+
this.telemetryProperties[telemetry_1.TelemetryProperties.GlobalFuncVersion] =
|
|
114
|
+
globalFuncRes.value.versionStr;
|
|
115
|
+
return await this.getDepsInfo(globalFuncRes.value, undefined);
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
this.telemetryProperties[telemetry_1.TelemetryProperties.GlobalFuncVersionError] =
|
|
119
|
+
globalFuncRes.error.message;
|
|
120
|
+
return await this.getDepsInfo(undefined, undefined);
|
|
121
|
+
}
|
|
97
122
|
}
|
|
98
123
|
async getNodeVersion() {
|
|
99
124
|
var _a;
|
|
@@ -103,87 +128,118 @@ class FuncToolChecker {
|
|
|
103
128
|
}
|
|
104
129
|
return nodeVersion;
|
|
105
130
|
}
|
|
106
|
-
async checkExpectedFuncAndNode(
|
|
107
|
-
|
|
131
|
+
async checkExpectedFuncAndNode(funcVersion, nodeVersion) {
|
|
132
|
+
const funcVersionRange = nodeFuncVersionRangeMapping[nodeVersion];
|
|
133
|
+
if (funcVersionRange && !semver_1.default.satisfies(funcVersion, funcVersionRange)) {
|
|
134
|
+
return new depsError_1.DepsCheckerError(message_1.Messages.portableFuncNodeNotMatched(nodeVersion, funcVersion), helpLink_1.v3DefaultHelpLink);
|
|
135
|
+
}
|
|
108
136
|
return undefined;
|
|
109
137
|
}
|
|
110
138
|
async checkPortableFuncVersion(expectedFuncVersion) {
|
|
111
139
|
try {
|
|
112
140
|
const historyFuncBinFolder = FuncToolChecker.getPortableFuncBinFolder(undefined);
|
|
113
|
-
const
|
|
141
|
+
const historyFuncRes = await this.checkFuncVersion(expectedFuncVersion, historyFuncBinFolder, FuncToolChecker.getHistorySentinelPath());
|
|
142
|
+
if (historyFuncRes.isOk()) {
|
|
143
|
+
this.telemetryProperties[telemetry_1.TelemetryProperties.HistoryFuncVersion] =
|
|
144
|
+
historyFuncRes.value.versionStr;
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
this.telemetryProperties[telemetry_1.TelemetryProperties.HistoryFuncVersionError] =
|
|
148
|
+
historyFuncRes.error.message;
|
|
149
|
+
}
|
|
114
150
|
const versioningFuncStatus = await this.getVersioningPortableFunc(expectedFuncVersion);
|
|
115
151
|
if (versioningFuncStatus &&
|
|
116
|
-
(
|
|
117
|
-
semver_1.default.gte(versioningFuncStatus.funcVersion.versionStr,
|
|
152
|
+
(historyFuncRes.isErr() ||
|
|
153
|
+
semver_1.default.gte(versioningFuncStatus.funcVersion.versionStr, historyFuncRes.value.versionStr))) {
|
|
118
154
|
return versioningFuncStatus;
|
|
119
155
|
}
|
|
120
|
-
else if (
|
|
121
|
-
return { funcVersion:
|
|
156
|
+
else if (historyFuncRes.isOk()) {
|
|
157
|
+
return { funcVersion: historyFuncRes.value, binFolder: historyFuncBinFolder };
|
|
122
158
|
}
|
|
123
159
|
}
|
|
124
160
|
catch (error) {
|
|
125
161
|
// do nothing
|
|
126
|
-
this.appendLog(error);
|
|
127
162
|
}
|
|
128
|
-
return
|
|
163
|
+
return undefined;
|
|
129
164
|
}
|
|
130
165
|
async checkFuncVersion(expectedFuncVersion, binFolder, sentinelPath) {
|
|
131
166
|
try {
|
|
132
167
|
const funcVersion = await this.queryFuncVersion(binFolder);
|
|
133
168
|
// For portable func, avoid "func -v" and "func new" work well, but "func start" fail.
|
|
134
169
|
const hasSentinel = sentinelPath ? await fs.pathExists(sentinelPath) : true;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
170
|
+
if (!hasSentinel) {
|
|
171
|
+
return teamsfx_api_1.err(new depsError_1.DepsCheckerError(message_1.Messages.noSentinelFile(), helpLink_1.v3DefaultHelpLink));
|
|
172
|
+
}
|
|
173
|
+
const funcVersionSupport = isFuncVersionSupport(funcVersion, expectedFuncVersion);
|
|
174
|
+
if (!funcVersionSupport) {
|
|
175
|
+
return teamsfx_api_1.err(new depsError_1.DepsCheckerError(message_1.Messages.funcVersionNotMatch(funcVersion.versionStr, expectedFuncVersion), helpLink_1.v3DefaultHelpLink));
|
|
176
|
+
}
|
|
177
|
+
return teamsfx_api_1.ok(funcVersion);
|
|
138
178
|
}
|
|
139
179
|
catch (error) {
|
|
140
|
-
|
|
141
|
-
return null;
|
|
180
|
+
return teamsfx_api_1.err(new depsError_1.DepsCheckerError(error.message, helpLink_1.v3DefaultHelpLink));
|
|
142
181
|
}
|
|
143
182
|
}
|
|
144
183
|
async getVersioningPortableFunc(expectedFuncVersion) {
|
|
184
|
+
var _a;
|
|
145
185
|
const files = await fs.readdir(FuncToolChecker.getDefaultInstallPath(), {
|
|
146
186
|
withFileTypes: true,
|
|
147
187
|
});
|
|
148
188
|
const funcDictionaries = files
|
|
149
189
|
.filter((f) => f.isDirectory() && semver_1.default.valid(f.name))
|
|
150
190
|
.map((f) => f.name);
|
|
191
|
+
this.telemetryProperties[telemetry_1.TelemetryProperties.VersioningFuncVersions] =
|
|
192
|
+
JSON.stringify(funcDictionaries);
|
|
151
193
|
while (funcDictionaries.length > 0) {
|
|
152
194
|
const matchedVersion = semver_1.default.maxSatisfying(funcDictionaries, expectedFuncVersion);
|
|
153
195
|
if (!matchedVersion) {
|
|
154
|
-
return
|
|
196
|
+
return undefined;
|
|
155
197
|
}
|
|
156
198
|
const binFolder = FuncToolChecker.getPortableFuncBinFolder(matchedVersion);
|
|
157
|
-
const
|
|
158
|
-
if ((
|
|
199
|
+
const actualFuncRes = await this.checkFuncVersion(expectedFuncVersion, binFolder, FuncToolChecker.getVersioningSentinelPath(matchedVersion));
|
|
200
|
+
if (actualFuncRes.isOk() && actualFuncRes.value.versionStr === matchedVersion) {
|
|
159
201
|
return {
|
|
160
|
-
funcVersion:
|
|
202
|
+
funcVersion: actualFuncRes.value,
|
|
161
203
|
binFolder: binFolder,
|
|
162
204
|
};
|
|
163
205
|
}
|
|
206
|
+
if (actualFuncRes.isErr()) {
|
|
207
|
+
this.telemetryProperties[telemetry_1.TelemetryProperties.VersioningFuncVersionError] =
|
|
208
|
+
((_a = this.telemetryProperties[telemetry_1.TelemetryProperties.VersioningFuncVersionError]) !== null && _a !== void 0 ? _a : "") +
|
|
209
|
+
`[${matchedVersion}] ${actualFuncRes.error.message}`;
|
|
210
|
+
}
|
|
164
211
|
const matchedVersionIndex = funcDictionaries.indexOf(matchedVersion);
|
|
165
212
|
if (matchedVersionIndex < 0) {
|
|
166
|
-
return
|
|
213
|
+
return undefined;
|
|
167
214
|
}
|
|
168
215
|
funcDictionaries.splice(matchedVersionIndex, 1);
|
|
169
216
|
}
|
|
170
|
-
return
|
|
217
|
+
return undefined;
|
|
171
218
|
}
|
|
172
|
-
async install(expectedFuncVersion) {
|
|
219
|
+
async install(expectedFuncVersion, symlinkDir) {
|
|
173
220
|
if (system_1.isLinux()) {
|
|
174
|
-
throw new depsError_1.LinuxNotSupportedError(message_1.Messages.linuxDepsNotFound().split("@SupportedPackages").join(funcToolName), helpLink_1.
|
|
221
|
+
throw new depsError_1.LinuxNotSupportedError(message_1.Messages.linuxDepsNotFound().split("@SupportedPackages").join(funcToolName), helpLink_1.v3DefaultHelpLink);
|
|
175
222
|
}
|
|
176
223
|
if (!(await this.hasNPM())) {
|
|
177
|
-
throw new depsError_1.DepsCheckerError(message_1.Messages.needInstallNpm(), helpLink_1.
|
|
224
|
+
throw new depsError_1.DepsCheckerError(message_1.Messages.needInstallNpm(), helpLink_1.v3DefaultHelpLink);
|
|
178
225
|
}
|
|
179
226
|
const tmpVersion = uuid.v4();
|
|
180
227
|
await this.installFunc(tmpVersion, expectedFuncVersion);
|
|
181
|
-
const
|
|
182
|
-
if (
|
|
228
|
+
const funcVersionRes = await this.checkFuncVersion(expectedFuncVersion, FuncToolChecker.getPortableFuncBinFolder(tmpVersion), FuncToolChecker.getVersioningSentinelPath(tmpVersion));
|
|
229
|
+
if (funcVersionRes.isErr()) {
|
|
183
230
|
await this.cleanup(tmpVersion);
|
|
184
|
-
|
|
231
|
+
this.telemetryProperties[telemetry_1.TelemetryProperties.InstallFuncError] = funcVersionRes.error.message;
|
|
232
|
+
throw new depsError_1.DepsCheckerError(message_1.Messages.failToValidateFuncCoreTool() + " " + funcVersionRes.error.message, helpLink_1.v3DefaultHelpLink);
|
|
233
|
+
}
|
|
234
|
+
this.telemetryProperties[telemetry_1.TelemetryProperties.InstalledFuncVersion] =
|
|
235
|
+
funcVersionRes.value.versionStr;
|
|
236
|
+
await fileHelper_1.rename(FuncToolChecker.getFuncInstallPath(tmpVersion), FuncToolChecker.getFuncInstallPath(funcVersionRes.value.versionStr));
|
|
237
|
+
const binFolder = FuncToolChecker.getPortableFuncBinFolder(funcVersionRes.value.versionStr);
|
|
238
|
+
if (symlinkDir) {
|
|
239
|
+
await fileHelper_1.createSymlink(binFolder, symlinkDir);
|
|
240
|
+
return await this.getDepsInfo(funcVersionRes.value, symlinkDir);
|
|
185
241
|
}
|
|
186
|
-
await
|
|
242
|
+
return await this.getDepsInfo(funcVersionRes.value, binFolder);
|
|
187
243
|
}
|
|
188
244
|
static getDefaultInstallPath() {
|
|
189
245
|
return path.join(os.homedir(), `.${teamsfx_api_1.ConfigFolderName}`, "bin", "azfunc");
|
|
@@ -203,19 +259,11 @@ class FuncToolChecker {
|
|
|
203
259
|
return path.resolve(FuncToolChecker.getFuncInstallPath(versionStr), "node_modules", "azure-functions-core-tools", "bin");
|
|
204
260
|
}
|
|
205
261
|
async queryFuncVersion(funcBinFolder) {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
// same as backend start, avoid powershell execution policy issue.
|
|
212
|
-
{ shell: system_1.isWindows() ? "cmd.exe" : true, env }, "func", "--version");
|
|
213
|
-
return mapToFuncToolsVersion(output);
|
|
214
|
-
}
|
|
215
|
-
catch (error) {
|
|
216
|
-
this.appendLog(error);
|
|
217
|
-
return null;
|
|
218
|
-
}
|
|
262
|
+
const execPath = funcBinFolder ? path.resolve(funcBinFolder, "func") : "func";
|
|
263
|
+
const output = await cpUtils_1.cpUtils.executeCommand(undefined, undefined,
|
|
264
|
+
// same as backend start, avoid powershell execution policy issue.
|
|
265
|
+
{ shell: system_1.isWindows() ? "cmd.exe" : true }, execPath, "--version");
|
|
266
|
+
return mapToFuncToolsVersion(output);
|
|
219
267
|
}
|
|
220
268
|
async hasNPM() {
|
|
221
269
|
try {
|
|
@@ -230,9 +278,7 @@ class FuncToolChecker {
|
|
|
230
278
|
try {
|
|
231
279
|
await fs.remove(FuncToolChecker.getFuncInstallPath(tmpVersionStr));
|
|
232
280
|
}
|
|
233
|
-
catch (
|
|
234
|
-
this.appendLog(error);
|
|
235
|
-
}
|
|
281
|
+
catch (_a) { }
|
|
236
282
|
}
|
|
237
283
|
async installFunc(tmpVersion, expectedFuncVersion) {
|
|
238
284
|
try {
|
|
@@ -244,15 +290,13 @@ class FuncToolChecker {
|
|
|
244
290
|
}
|
|
245
291
|
catch (error) {
|
|
246
292
|
await this.cleanup(tmpVersion);
|
|
247
|
-
|
|
293
|
+
this.telemetryProperties[telemetry_1.TelemetryProperties.InstallFuncError] = error.message;
|
|
294
|
+
throw new depsError_1.DepsCheckerError(localizeUtils_1.getLocalizedString("error.common.InstallSoftwareError", funcToolName), helpLink_1.v3DefaultHelpLink);
|
|
248
295
|
}
|
|
249
296
|
}
|
|
250
297
|
getExecCommand(command) {
|
|
251
298
|
return system_1.isWindows() ? `${command}.cmd` : command;
|
|
252
299
|
}
|
|
253
|
-
appendLog(error) {
|
|
254
|
-
this.log = this.log + "\n" + (error === null || error === void 0 ? void 0 : error.message);
|
|
255
|
-
}
|
|
256
300
|
}
|
|
257
301
|
exports.FuncToolChecker = FuncToolChecker;
|
|
258
302
|
function mapToFuncToolsVersion(output) {
|
|
@@ -260,7 +304,7 @@ function mapToFuncToolsVersion(output) {
|
|
|
260
304
|
const regex = /(?<major_version>\d+)\.(?<minor_version>\d+)\.(?<patch_version>\d+)/gm;
|
|
261
305
|
const match = regex.exec(output);
|
|
262
306
|
if (!match) {
|
|
263
|
-
|
|
307
|
+
throw new depsError_1.DepsCheckerError(message_1.Messages.invalidFuncVersion(output), helpLink_1.v3DefaultHelpLink);
|
|
264
308
|
}
|
|
265
309
|
const majorVersion = Number.parseInt((_b = (_a = match.groups) === null || _a === void 0 ? void 0 : _a.major_version) !== null && _b !== void 0 ? _b : "");
|
|
266
310
|
const minorVersion = Number.parseInt((_d = (_c = match.groups) === null || _c === void 0 ? void 0 : _c.minor_version) !== null && _d !== void 0 ? _d : "");
|
|
@@ -268,7 +312,7 @@ function mapToFuncToolsVersion(output) {
|
|
|
268
312
|
if (!Number.isInteger(majorVersion) ||
|
|
269
313
|
!Number.isInteger(minorVersion) ||
|
|
270
314
|
!Number.isInteger(patchVersion)) {
|
|
271
|
-
|
|
315
|
+
throw new depsError_1.DepsCheckerError(message_1.Messages.invalidFuncVersion(output), helpLink_1.v3DefaultHelpLink);
|
|
272
316
|
}
|
|
273
317
|
return {
|
|
274
318
|
majorVersion: majorVersion,
|