@microsoft/teamsfx-core 2.0.8-alpha.2f5decfcc.0 → 2.0.8-alpha.4cb5c08a8.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.
Files changed (168) hide show
  1. package/build/common/constants.d.ts +1 -2
  2. package/build/common/constants.d.ts.map +1 -1
  3. package/build/common/constants.js +1 -2
  4. package/build/common/constants.js.map +1 -1
  5. package/build/common/featureFlags.js +46 -1
  6. package/build/common/featureFlags.js.map +1 -1
  7. package/build/common/projectSettingsHelper.d.ts +7 -2
  8. package/build/common/projectSettingsHelper.d.ts.map +1 -1
  9. package/build/common/projectSettingsHelper.js +25 -7
  10. package/build/common/projectSettingsHelper.js.map +1 -1
  11. package/build/common/samples.d.ts +1 -2
  12. package/build/common/samples.d.ts.map +1 -1
  13. package/build/common/samples.js +37 -83
  14. package/build/common/samples.js.map +1 -1
  15. package/build/common/telemetry.d.ts +3 -0
  16. package/build/common/telemetry.d.ts.map +1 -1
  17. package/build/common/telemetry.js +3 -0
  18. package/build/common/telemetry.js.map +1 -1
  19. package/build/common/templates-config.json +1 -1
  20. package/build/component/configManager/validator.js +1 -1
  21. package/build/component/configManager/validator.js.map +1 -1
  22. package/build/component/coordinator/index.d.ts.map +1 -1
  23. package/build/component/coordinator/index.js +20 -34
  24. package/build/component/coordinator/index.js.map +1 -1
  25. package/build/component/driver/aad/create.d.ts +1 -0
  26. package/build/component/driver/aad/create.d.ts.map +1 -1
  27. package/build/component/driver/aad/create.js +22 -11
  28. package/build/component/driver/aad/create.js.map +1 -1
  29. package/build/component/driver/aad/error/aadManifestError.d.ts +6 -0
  30. package/build/component/driver/aad/error/aadManifestError.d.ts.map +1 -1
  31. package/build/component/driver/aad/error/aadManifestError.js +25 -1
  32. package/build/component/driver/aad/error/aadManifestError.js.map +1 -1
  33. package/build/component/driver/aad/error/clientSecretNotAllowedError.d.ts +5 -0
  34. package/build/component/driver/aad/error/clientSecretNotAllowedError.d.ts.map +1 -0
  35. package/build/component/driver/aad/error/clientSecretNotAllowedError.js +23 -0
  36. package/build/component/driver/aad/error/clientSecretNotAllowedError.js.map +1 -0
  37. package/build/component/driver/aad/error/credentialInvalidLifetimeError.d.ts +5 -0
  38. package/build/component/driver/aad/error/credentialInvalidLifetimeError.d.ts.map +1 -0
  39. package/build/component/driver/aad/error/credentialInvalidLifetimeError.js +23 -0
  40. package/build/component/driver/aad/error/credentialInvalidLifetimeError.js.map +1 -0
  41. package/build/component/driver/aad/interface/IAADDefinition.d.ts +1 -0
  42. package/build/component/driver/aad/interface/IAADDefinition.d.ts.map +1 -1
  43. package/build/component/driver/aad/interface/createAadAppArgs.d.ts +3 -0
  44. package/build/component/driver/aad/interface/createAadAppArgs.d.ts.map +1 -1
  45. package/build/component/driver/aad/permissions/index.d.ts.map +1 -1
  46. package/build/component/driver/aad/permissions/index.js +9 -0
  47. package/build/component/driver/aad/permissions/index.js.map +1 -1
  48. package/build/component/driver/aad/utility/aadAppClient.d.ts +3 -2
  49. package/build/component/driver/aad/utility/aadAppClient.d.ts.map +1 -1
  50. package/build/component/driver/aad/utility/aadAppClient.js +35 -17
  51. package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
  52. package/build/component/driver/aad/utility/aadManifestHelper.d.ts.map +1 -1
  53. package/build/component/driver/aad/utility/aadManifestHelper.js +7 -0
  54. package/build/component/driver/aad/utility/aadManifestHelper.js.map +1 -1
  55. package/build/component/driver/aad/utility/constants.d.ts +6 -0
  56. package/build/component/driver/aad/utility/constants.d.ts.map +1 -1
  57. package/build/component/driver/aad/utility/constants.js +8 -2
  58. package/build/component/driver/aad/utility/constants.js.map +1 -1
  59. package/build/component/driver/apiKey/create.d.ts +0 -3
  60. package/build/component/driver/apiKey/create.d.ts.map +1 -1
  61. package/build/component/driver/apiKey/create.js +23 -51
  62. package/build/component/driver/apiKey/create.js.map +1 -1
  63. package/build/component/driver/apiKey/interface/createApiKeyArgs.d.ts +2 -0
  64. package/build/component/driver/apiKey/interface/createApiKeyArgs.d.ts.map +1 -1
  65. package/build/component/driver/apiKey/interface/updateApiKeyArgs.d.ts +9 -0
  66. package/build/component/driver/apiKey/interface/updateApiKeyArgs.d.ts.map +1 -0
  67. package/build/component/driver/apiKey/interface/updateApiKeyArgs.js +5 -0
  68. package/build/component/driver/apiKey/interface/updateApiKeyArgs.js.map +1 -0
  69. package/build/component/driver/apiKey/update.d.ts +13 -0
  70. package/build/component/driver/apiKey/update.d.ts.map +1 -0
  71. package/build/component/driver/apiKey/update.js +182 -0
  72. package/build/component/driver/apiKey/update.js.map +1 -0
  73. package/build/component/driver/apiKey/utility/constants.d.ts +2 -0
  74. package/build/component/driver/apiKey/utility/constants.d.ts.map +1 -1
  75. package/build/component/driver/apiKey/utility/constants.js +2 -0
  76. package/build/component/driver/apiKey/utility/constants.js.map +1 -1
  77. package/build/component/driver/apiKey/utility/utility.d.ts +7 -0
  78. package/build/component/driver/apiKey/utility/utility.d.ts.map +1 -0
  79. package/build/component/driver/apiKey/utility/utility.js +56 -0
  80. package/build/component/driver/apiKey/utility/utility.js.map +1 -0
  81. package/build/component/driver/index.d.ts +1 -0
  82. package/build/component/driver/index.d.ts.map +1 -1
  83. package/build/component/driver/index.js +1 -0
  84. package/build/component/driver/index.js.map +1 -1
  85. package/build/component/driver/teamsApp/clients/appStudioClient.d.ts +2 -1
  86. package/build/component/driver/teamsApp/clients/appStudioClient.d.ts.map +1 -1
  87. package/build/component/driver/teamsApp/clients/appStudioClient.js +12 -0
  88. package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
  89. package/build/component/driver/teamsApp/constants.d.ts +1 -0
  90. package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
  91. package/build/component/driver/teamsApp/constants.js +1 -0
  92. package/build/component/driver/teamsApp/constants.js.map +1 -1
  93. package/build/component/driver/teamsApp/createAppPackage.d.ts +2 -1
  94. package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
  95. package/build/component/driver/teamsApp/createAppPackage.js +36 -21
  96. package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
  97. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistration.d.ts +20 -0
  98. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistration.d.ts.map +1 -1
  99. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistration.js.map +1 -1
  100. package/build/component/driver/teamsApp/teamsappMgr.d.ts.map +1 -1
  101. package/build/component/driver/teamsApp/teamsappMgr.js +22 -8
  102. package/build/component/driver/teamsApp/teamsappMgr.js.map +1 -1
  103. package/build/component/driver/teamsApp/utils/telemetry.d.ts +1 -0
  104. package/build/component/driver/teamsApp/utils/telemetry.d.ts.map +1 -1
  105. package/build/component/driver/teamsApp/utils/telemetry.js +1 -0
  106. package/build/component/driver/teamsApp/utils/telemetry.js.map +1 -1
  107. package/build/component/driver/teamsApp/utils/utils.d.ts +1 -0
  108. package/build/component/driver/teamsApp/utils/utils.d.ts.map +1 -1
  109. package/build/component/driver/teamsApp/utils/utils.js +5 -1
  110. package/build/component/driver/teamsApp/utils/utils.js.map +1 -1
  111. package/build/component/driver/teamsApp/validateTestCases.d.ts.map +1 -1
  112. package/build/component/driver/teamsApp/validateTestCases.js +20 -4
  113. package/build/component/driver/teamsApp/validateTestCases.js.map +1 -1
  114. package/build/component/generator/copilotPlugin/helper.d.ts.map +1 -1
  115. package/build/component/generator/copilotPlugin/helper.js +4 -2
  116. package/build/component/generator/copilotPlugin/helper.js.map +1 -1
  117. package/build/component/generator/officeAddin/generator.d.ts +7 -2
  118. package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
  119. package/build/component/generator/officeAddin/generator.js +54 -43
  120. package/build/component/generator/officeAddin/generator.js.map +1 -1
  121. package/build/component/generator/officeXMLAddin/generator.d.ts +4 -1
  122. package/build/component/generator/officeXMLAddin/generator.d.ts.map +1 -1
  123. package/build/component/generator/officeXMLAddin/generator.js +20 -14
  124. package/build/component/generator/officeXMLAddin/generator.js.map +1 -1
  125. package/build/component/generator/officeXMLAddin/projectConfig.d.ts +21 -33
  126. package/build/component/generator/officeXMLAddin/projectConfig.d.ts.map +1 -1
  127. package/build/component/generator/officeXMLAddin/projectConfig.js +73 -86
  128. package/build/component/generator/officeXMLAddin/projectConfig.js.map +1 -1
  129. package/build/component/utils/metadataGraphPermssion.d.ts +8 -6
  130. package/build/component/utils/metadataGraphPermssion.d.ts.map +1 -1
  131. package/build/component/utils/metadataGraphPermssion.js +10 -2
  132. package/build/component/utils/metadataGraphPermssion.js.map +1 -1
  133. package/build/component/utils/metadataRscPermission.d.ts +16 -0
  134. package/build/component/utils/metadataRscPermission.d.ts.map +1 -0
  135. package/build/component/utils/metadataRscPermission.js +69 -0
  136. package/build/component/utils/metadataRscPermission.js.map +1 -0
  137. package/build/component/utils/metadataUtil.d.ts.map +1 -1
  138. package/build/component/utils/metadataUtil.js +2 -0
  139. package/build/component/utils/metadataUtil.js.map +1 -1
  140. package/build/core/FxCore.d.ts.map +1 -1
  141. package/build/core/FxCore.js +4 -1
  142. package/build/core/FxCore.js.map +1 -1
  143. package/build/question/create.d.ts +13 -7
  144. package/build/question/create.d.ts.map +1 -1
  145. package/build/question/create.js +220 -184
  146. package/build/question/create.js.map +1 -1
  147. package/build/question/inputs/CreateProjectInputs.d.ts +3 -5
  148. package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -1
  149. package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
  150. package/build/question/options/CreateProjectOptions.js +17 -9
  151. package/build/question/options/CreateProjectOptions.js.map +1 -1
  152. package/build/question/questionNames.d.ts +0 -1
  153. package/build/question/questionNames.d.ts.map +1 -1
  154. package/build/question/questionNames.js +0 -1
  155. package/build/question/questionNames.js.map +1 -1
  156. package/package.json +5 -4
  157. package/resource/package.nls.json +15 -1
  158. package/resource/yaml-schema/v1.5/yaml.schema.json +1663 -0
  159. package/resource/yaml-schema/yaml.schema.json +77 -2
  160. package/templates/fallback/common.zip +0 -0
  161. package/templates/fallback/csharp.zip +0 -0
  162. package/templates/fallback/js.zip +0 -0
  163. package/templates/fallback/python.zip +0 -0
  164. package/templates/fallback/ts.zip +0 -0
  165. package/build/component/generator/officeAddin/config/projectsJsonData.d.ts +0 -26
  166. package/build/component/generator/officeAddin/config/projectsJsonData.d.ts.map +0 -1
  167. package/build/component/generator/officeAddin/config/projectsJsonData.js +0 -165
  168. package/build/component/generator/officeAddin/config/projectsJsonData.js.map +0 -1
@@ -14,7 +14,7 @@
14
14
  "version": {
15
15
  "type": "string",
16
16
  "description": "The version of the yaml file schema",
17
- "const": "v1.4"
17
+ "const": "v1.5"
18
18
  },
19
19
  "additionalMetadata": {
20
20
  "type": "object",
@@ -72,7 +72,8 @@
72
72
  { "$ref": "#/definitions/teamsAppCopyAppPackageToSPFx" },
73
73
  { "$ref": "#/definitions/script" },
74
74
  { "$ref": "#/definitions/apiKeyRegister"},
75
- { "$ref": "#/definitions/azureStaticWebAppGetDeploymentKey"}
75
+ { "$ref": "#/definitions/azureStaticWebAppGetDeploymentKey"},
76
+ { "$ref": "#/definitions/apiKeyUpdate"}
76
77
  ]
77
78
  }
78
79
  },
@@ -127,6 +128,19 @@
127
128
  "type": "string",
128
129
  "description": "Specifies what Microsoft accounts are supported for the current application.",
129
130
  "enum": ["AzureADMyOrg", "AzureADMultipleOrgs", "AzureADandPersonalMicrosoftAccount", "PersonalMicrosoftAccount"]
131
+ },
132
+ "serviceManagementReference": {
133
+ "type": "string",
134
+ "description": "References application or service contact information from a Service or Asset Management database."
135
+ },
136
+ "clientSecretExpireDays": {
137
+ "type": "integer",
138
+ "description": "The number of days the client secret is valid.",
139
+ "minimum": 1
140
+ },
141
+ "clientSecretDescription": {
142
+ "type": "string",
143
+ "description": "The description of the client secret."
130
144
  }
131
145
  }
132
146
  },
@@ -192,6 +206,10 @@
192
206
  "type": "string",
193
207
  "description": "Specifies what Microsoft accounts are supported for the current application.",
194
208
  "enum": ["AzureADMyOrg", "AzureADMultipleOrgs", "AzureADandPersonalMicrosoftAccount", "PersonalMicrosoftAccount"]
209
+ },
210
+ "serviceManagementReference": {
211
+ "type": "string",
212
+ "description": "References application or service contact information from a Service or Asset Management database."
195
213
  }
196
214
  }
197
215
  },
@@ -1530,6 +1548,16 @@
1530
1548
  "apiSpecPath": {
1531
1549
  "type": "string",
1532
1550
  "description": "The path of API specification file."
1551
+ },
1552
+ "applicableToApps": {
1553
+ "type": "string",
1554
+ "description": "Which app can access the API key? Values can be \"SpecificApp\" or \"AnyApp\". Default is \"AnyApp\".",
1555
+ "enum": ["SpecificApp", "AnyApp"]
1556
+ },
1557
+ "targetAudience": {
1558
+ "type": "string",
1559
+ "description": "Which tenant can access the API key? Values can be \"HomeTenant\" or \"AnyTenant\". Default is \"AnyTenant\".",
1560
+ "enum": ["HomeTenant", "AnyTenant"]
1533
1561
  }
1534
1562
  }
1535
1563
  },
@@ -1583,6 +1611,53 @@
1583
1611
  }
1584
1612
  }
1585
1613
  }
1614
+ },
1615
+ "apiKeyUpdate": {
1616
+ "type": "object",
1617
+ "additionalProperties": false,
1618
+ "description": "Update an API key.",
1619
+ "required": ["uses", "with"],
1620
+ "properties": {
1621
+ "uses": {
1622
+ "type": "string",
1623
+ "description": "Updagte API key. Refer to https://aka.ms/teamsfx-actions/apiKey-update for more details.",
1624
+ "const": "apiKey/update"
1625
+ },
1626
+ "with": {
1627
+ "type": "object",
1628
+ "additionalProperties": false,
1629
+ "description": "Parameters for this action",
1630
+ "required": ["name", "appId", "apiSpecPath", "registrationId"],
1631
+ "properties": {
1632
+ "name": {
1633
+ "type": "string",
1634
+ "description": "The name of API key."
1635
+ },
1636
+ "appId": {
1637
+ "type": "string",
1638
+ "description": "The app ID of Teams app."
1639
+ },
1640
+ "apiSpecPath": {
1641
+ "type": "string",
1642
+ "description": "The path of API specification file."
1643
+ },
1644
+ "registrationId": {
1645
+ "type": "string",
1646
+ "description": "The registration id of API key."
1647
+ },
1648
+ "applicableToApps": {
1649
+ "type": "string",
1650
+ "description": "Which app can access the API key? Values can be \"SpecificApp\" or \"AnyApp\". Default is \"AnyApp\".",
1651
+ "enum": ["SpecificApp", "AnyApp"]
1652
+ },
1653
+ "targetAudience": {
1654
+ "type": "string",
1655
+ "description": "Which tenant can access the API key? Values can be \"HomeTenant\" or \"AnyTenant\". Default is \"AnyTenant\".",
1656
+ "enum": ["HomeTenant", "AnyTenant"]
1657
+ }
1658
+ }
1659
+ }
1660
+ }
1586
1661
  }
1587
1662
  }
1588
1663
  }
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,26 +0,0 @@
1
- export default class projectsJsonData {
2
- projectJsonData: any;
3
- constructor();
4
- getProjectDisplayName(projectType: string): string;
5
- getProjectDetails(projectType: string): string;
6
- getParsedProjectJsonData(): unknown;
7
- getProjectTemplateNames(): string[];
8
- projectBothScriptTypes(projectType: string): boolean;
9
- projectBothScriptTypesNew(projectType: string): boolean;
10
- getManifestPath(projectType: string): string | undefined;
11
- getHostTemplateNames(projectType: string): string[];
12
- getSupportedScriptTypes(projectType: string): string[];
13
- getSupportedScriptTypesNew(projectType: string): string[];
14
- getHostDisplayName(hostKey: string): string | undefined;
15
- getProjectTemplateRepository(projectTypeKey: string, scriptType: string): string | undefined;
16
- getProjectTemplateBranchName(projectTypeKey: string, scriptType: string, prerelease: boolean): string | undefined;
17
- getProjectDownloadLink(projectTypeKey: string, scriptType: string): string;
18
- getProjectDownloadLinkNew(projectTypeKey: string, scriptType: string, frameworkType: string): string;
19
- getProjectRepoAndBranchNew(projectTypeKey: string, scriptType: string, frameworkType: string, prerelease: boolean): {
20
- repo: string | undefined;
21
- branch: string | undefined;
22
- };
23
- getProjectTemplateRepositoryNew(projectTypeKey: string, scriptType: string, frameworkType: string): string | undefined;
24
- getProjectTemplateBranchNameNew(projectTypeKey: string, scriptType: string, frameworkType: string, prerelease: boolean): string | undefined;
25
- }
26
- //# sourceMappingURL=projectsJsonData.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"projectsJsonData.d.ts","sourceRoot":"","sources":["../../../../../src/component/generator/offic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AAG,SAAS,CAAA;KAAE;IAkB3D,+BAA+B,CAC7B,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,GACpB,MAAM,GAAG,SAAS;IAWrB,+BAA+B,CAC7B,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,OAAO,GAClB,MAAM,GAAG,SAAS;CAgBtB"}
@@ -1,165 +0,0 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- const tslib_1 = require("tslib");
6
- const lodash_1 = tslib_1.__importDefault(require("lodash"));
7
- const projectProperties_1 = require("./projectProperties");
8
- class projectsJsonData {
9
- constructor() {
10
- this.projectJsonData = projectProperties_1.projectProperties;
11
- }
12
- getProjectDisplayName(projectType) {
13
- return this.projectJsonData.projectTypes[lodash_1.default.toLower(projectType)].displayname;
14
- }
15
- getProjectDetails(projectType) {
16
- return this.projectJsonData.projectTypes[lodash_1.default.toLower(projectType)].detail;
17
- }
18
- getParsedProjectJsonData() {
19
- return this.projectJsonData;
20
- }
21
- getProjectTemplateNames() {
22
- const projectTemplates = [];
23
- for (const key in this.projectJsonData.projectTypes) {
24
- projectTemplates.push(key);
25
- }
26
- return projectTemplates;
27
- }
28
- projectBothScriptTypes(projectType) {
29
- return (this.projectJsonData.projectTypes[lodash_1.default.toLower(projectType)].templates.javascript.archive !=
30
- undefined &&
31
- this.projectJsonData.projectTypes[lodash_1.default.toLower(projectType)].templates.typescript.archive !=
32
- undefined);
33
- }
34
- projectBothScriptTypesNew(projectType) {
35
- return (this.projectJsonData.projectTypes[lodash_1.default.toLower(projectType)].templates.javascript != undefined &&
36
- this.projectJsonData.projectTypes[lodash_1.default.toLower(projectType)].templates.typescript != undefined);
37
- }
38
- getManifestPath(projectType) {
39
- return this.projectJsonData.projectTypes[projectType].manifestPath;
40
- }
41
- getHostTemplateNames(projectType) {
42
- let hosts = [];
43
- if (projectType) {
44
- for (const key in this.projectJsonData.projectTypes) {
45
- if (key === projectType) {
46
- hosts = this.projectJsonData.projectTypes[key].supportedHosts;
47
- }
48
- }
49
- }
50
- return hosts;
51
- }
52
- getSupportedScriptTypes(projectType) {
53
- const scriptTypes = [];
54
- if (projectType) {
55
- for (const template in this.projectJsonData.projectTypes[projectType].templates) {
56
- const archive = this.projectJsonData.projectTypes[projectType].templates[template].archive;
57
- if (template === "javascript" && archive !== undefined) {
58
- scriptTypes.push("JavaScript");
59
- }
60
- else if (template === "typescript" && archive !== undefined) {
61
- scriptTypes.push("TypeScript");
62
- }
63
- }
64
- }
65
- return scriptTypes;
66
- }
67
- getSupportedScriptTypesNew(projectType) {
68
- const scriptTypes = [];
69
- if (projectType) {
70
- for (const template in this.projectJsonData.projectTypes[projectType].templates) {
71
- let scriptType = "";
72
- if (template === "javascript") {
73
- scriptType = "JavaScript";
74
- }
75
- else if (template === "typescript") {
76
- scriptType = "TypeScript";
77
- }
78
- scriptTypes.push(scriptType);
79
- }
80
- }
81
- return scriptTypes;
82
- }
83
- getHostDisplayName(hostKey) {
84
- for (const key in this.projectJsonData.hostTypes) {
85
- if (lodash_1.default.toLower(hostKey) == key) {
86
- return this.projectJsonData.hostTypes[key].displayname;
87
- }
88
- }
89
- return undefined;
90
- }
91
- getProjectTemplateRepository(projectTypeKey, scriptType) {
92
- for (const key in this.projectJsonData.projectTypes) {
93
- if (lodash_1.default.toLower(projectTypeKey) == key) {
94
- if (projectTypeKey == "manifest") {
95
- return this.projectJsonData.projectTypes[key].templates.manifestonly.repository;
96
- }
97
- else {
98
- return this.projectJsonData.projectTypes[key].templates[scriptType].repository;
99
- }
100
- }
101
- }
102
- return undefined;
103
- }
104
- getProjectTemplateBranchName(projectTypeKey, scriptType, prerelease) {
105
- for (const key in this.projectJsonData.projectTypes) {
106
- if (lodash_1.default.toLower(projectTypeKey) == key) {
107
- if (projectTypeKey == "manifest") {
108
- return this.projectJsonData.projectTypes.manifest.templates.branch;
109
- }
110
- else {
111
- if (prerelease) {
112
- return this.projectJsonData.projectTypes[key].templates[scriptType].prerelease;
113
- }
114
- else {
115
- return this.projectJsonData.projectTypes[key].templates[scriptType].branch;
116
- }
117
- }
118
- }
119
- }
120
- return undefined;
121
- }
122
- getProjectDownloadLink(projectTypeKey, scriptType) {
123
- scriptType = scriptType.toLowerCase();
124
- return this.projectJsonData.projectTypes[projectTypeKey].templates[scriptType]
125
- .archive;
126
- }
127
- getProjectDownloadLinkNew(projectTypeKey, scriptType, frameworkType) {
128
- scriptType = scriptType.toLowerCase();
129
- return this.projectJsonData.projectTypes[projectTypeKey].templates[scriptType].frameworks[frameworkType].archive;
130
- }
131
- getProjectRepoAndBranchNew(projectTypeKey, scriptType, frameworkType, prerelease) {
132
- const repoBranchInfo = {
133
- repo: null,
134
- branch: null,
135
- };
136
- repoBranchInfo.repo = this.getProjectTemplateRepositoryNew(projectTypeKey, scriptType, frameworkType);
137
- repoBranchInfo.branch = repoBranchInfo.repo
138
- ? this.getProjectTemplateBranchNameNew(projectTypeKey, scriptType, frameworkType, prerelease)
139
- : undefined;
140
- return repoBranchInfo;
141
- }
142
- getProjectTemplateRepositoryNew(projectTypeKey, scriptType, frameworkType) {
143
- for (const key in this.projectJsonData.projectTypes) {
144
- if (lodash_1.default.toLower(projectTypeKey) == key) {
145
- return this.projectJsonData.projectTypes[key].templates[scriptType].frameworks[frameworkType].repository;
146
- }
147
- }
148
- return undefined;
149
- }
150
- getProjectTemplateBranchNameNew(projectTypeKey, scriptType, frameworkType, prerelease) {
151
- for (const key in this.projectJsonData.projectTypes) {
152
- if (lodash_1.default.toLower(projectTypeKey) == key) {
153
- if (prerelease) {
154
- return this.projectJsonData.projectTypes[key].templates[scriptType].frameworks[frameworkType].prerelease;
155
- }
156
- else {
157
- return this.projectJsonData.projectTypes[key].templates[scriptType].frameworks[frameworkType].branch;
158
- }
159
- }
160
- }
161
- return undefined;
162
- }
163
- }
164
- exports.default = projectsJsonData;
165
- //# sourceMappingURL=projectsJsonData.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"projectsJsonData.js","sourceRoot":"","sources":["../../../../../src/component/generator/officeAddin/config/projectsJsonData.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,4DAAuB;AACvB,2DAAwD;AAExD,MAAqB,gBAAgB;IAInC;QACE,IAAI,CAAC,eAAe,GAAG,qCAAiB,CAAC;IAC3C,CAAC;IAED,qBAAqB,CAAC,WAAmB;QACvC,OAAO,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,gBAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC;IAC/E,CAAC;IAED,iBAAiB,CAAC,WAAmB;QACnC,OAAO,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,gBAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC;IAC1E,CAAC;IAED,wBAAwB;QACtB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAED,uBAAuB;QACrB,MAAM,gBAAgB,GAAa,EAAE,CAAC;QACtC,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,eAAe,CAAC,YAAY,EAAE;YACnD,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC5B;QACD,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,sBAAsB,CAAC,WAAmB;QACxC,OAAO,CACL,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,gBAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,OAAO;YACpF,SAAS;YACX,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,gBAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,OAAO;gBACpF,SAAS,CACZ,CAAC;IACJ,CAAC;IAED,yBAAyB,CAA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