@microsoft/teamsfx-api 0.11.1-alpha.fa070464.0 → 0.12.1-alpha.12edbb86.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 (74) hide show
  1. package/build/constants.d.ts +7 -1
  2. package/build/constants.d.ts.map +1 -1
  3. package/build/constants.js +9 -3
  4. package/build/constants.js.map +1 -1
  5. package/build/core.d.ts +1 -2
  6. package/build/core.d.ts.map +1 -1
  7. package/build/error.d.ts +13 -4
  8. package/build/error.d.ts.map +1 -1
  9. package/build/error.js +8 -2
  10. package/build/error.js.map +1 -1
  11. package/build/index.d.ts +2 -0
  12. package/build/index.d.ts.map +1 -1
  13. package/build/index.js +3 -1
  14. package/build/index.js.map +1 -1
  15. package/build/plugin.d.ts +2 -0
  16. package/build/plugin.d.ts.map +1 -1
  17. package/build/qm/question.d.ts +1 -31
  18. package/build/qm/question.d.ts.map +1 -1
  19. package/build/qm/question.js.map +1 -1
  20. package/build/qm/ui.d.ts +2 -1
  21. package/build/qm/ui.d.ts.map +1 -1
  22. package/build/qm/ui.js.map +1 -1
  23. package/build/qm/validation.d.ts +4 -4
  24. package/build/qm/validation.d.ts.map +1 -1
  25. package/build/qm/validation.js +11 -6
  26. package/build/qm/validation.js.map +1 -1
  27. package/build/qm/visitor.d.ts.map +1 -1
  28. package/build/qm/visitor.js +25 -17
  29. package/build/qm/visitor.js.map +1 -1
  30. package/build/types.d.ts +37 -1
  31. package/build/types.d.ts.map +1 -1
  32. package/build/types.js.map +1 -1
  33. package/build/v2/index.d.ts.map +1 -1
  34. package/build/v2/index.js +2 -0
  35. package/build/v2/index.js.map +1 -1
  36. package/build/v2/resourcePlugin.d.ts +15 -10
  37. package/build/v2/resourcePlugin.d.ts.map +1 -1
  38. package/build/v2/solutionPlugin.d.ts +4 -4
  39. package/build/v2/solutionPlugin.d.ts.map +1 -1
  40. package/build/v2/types.d.ts +1 -1
  41. package/build/v2/types.d.ts.map +1 -1
  42. package/build/v3/AzureResourceStates.d.ts +58 -0
  43. package/build/v3/AzureResourceStates.d.ts.map +1 -0
  44. package/build/v3/AzureResourceStates.js +3 -0
  45. package/build/v3/AzureResourceStates.js.map +1 -0
  46. package/build/v3/core.d.ts +30 -0
  47. package/build/v3/core.d.ts.map +1 -0
  48. package/build/v3/core.js +5 -0
  49. package/build/v3/core.js.map +1 -0
  50. package/build/v3/index.d.ts +8 -0
  51. package/build/v3/index.d.ts.map +1 -0
  52. package/build/v3/index.js +13 -0
  53. package/build/v3/index.js.map +1 -0
  54. package/build/v3/plugins.d.ts +136 -0
  55. package/build/v3/plugins.d.ts.map +1 -0
  56. package/build/v3/plugins.js +5 -0
  57. package/build/v3/plugins.js.map +1 -0
  58. package/build/v3/resourceStates.d.ts +64 -0
  59. package/build/v3/resourceStates.d.ts.map +1 -0
  60. package/build/v3/resourceStates.js +5 -0
  61. package/build/v3/resourceStates.js.map +1 -0
  62. package/build/v3/solution.d.ts +72 -0
  63. package/build/v3/solution.d.ts.map +1 -0
  64. package/build/v3/solution.js +5 -0
  65. package/build/v3/solution.js.map +1 -0
  66. package/build/v3/solutionSettings.d.ts +42 -0
  67. package/build/v3/solutionSettings.d.ts.map +1 -0
  68. package/build/v3/solutionSettings.js +5 -0
  69. package/build/v3/solutionSettings.js.map +1 -0
  70. package/build/v3/types.d.ts +9 -0
  71. package/build/v3/types.d.ts.map +1 -0
  72. package/build/v3/types.js +5 -0
  73. package/build/v3/types.js.map +1 -0
  74. package/package.json +2 -2
@@ -0,0 +1,136 @@
1
+ import { Result } from "neverthrow";
2
+ import { FxError } from "../error";
3
+ import { Func, QTreeNode } from "../qm/question";
4
+ import { Inputs, Json, Void } from "../types";
5
+ import { AzureAccountProvider, TokenProvider } from "../utils/login";
6
+ import { ResourceTemplate } from "../v2/resourcePlugin";
7
+ import { Context, DeepReadonly, InputsWithProjectPath } from "../v2/types";
8
+ import { CloudResource } from "./resourceStates";
9
+ import { EnvInfoV3 } from "./types";
10
+ /**
11
+ * Description of scaffolding templates
12
+ */
13
+ export interface ScaffoldTemplate {
14
+ /**
15
+ * unique identifier for the template
16
+ */
17
+ name: string;
18
+ /**
19
+ * programming language
20
+ */
21
+ language: string;
22
+ /**
23
+ * description of the template
24
+ */
25
+ description: string;
26
+ }
27
+ export interface PluginScaffoldInputs extends InputsWithProjectPath {
28
+ /**
29
+ * scaffold template name
30
+ */
31
+ template: string;
32
+ /**
33
+ * module index
34
+ */
35
+ module?: string;
36
+ /**
37
+ * customized source root dir name
38
+ */
39
+ dir?: string;
40
+ /**
41
+ * customized build directory name
42
+ */
43
+ buildPath?: string;
44
+ }
45
+ export interface PluginDeployInputs extends InputsWithProjectPath {
46
+ /**
47
+ * root directory name
48
+ */
49
+ dir?: string;
50
+ /**
51
+ * relative path for the built artifact, it can be a folder path or a file path, depends the deployment type
52
+ */
53
+ buildPath?: string;
54
+ /**
55
+ * deployment type for bits
56
+ */
57
+ deployType?: string;
58
+ }
59
+ export interface Plugin {
60
+ /**
61
+ * unique identifier for plugin
62
+ */
63
+ name: string;
64
+ /**
65
+ * display name for the plugin
66
+ */
67
+ displayName?: string;
68
+ }
69
+ export interface ScaffoldPlugin extends Plugin {
70
+ /**
71
+ * Source code template descriptions
72
+ */
73
+ getTemplates: (ctx: Context, inputs: Inputs) => Promise<Result<ScaffoldTemplate[], FxError>>;
74
+ /**
75
+ * get questions before scaffolding
76
+ */
77
+ getQuestionsForScaffold?: (ctx: Context, inputs: Inputs) => Promise<Result<QTreeNode | undefined, FxError>>;
78
+ /**
79
+ * scaffold source code
80
+ */
81
+ scaffold: (ctx: Context, inputs: PluginScaffoldInputs) => Promise<Result<Json | undefined, FxError>>;
82
+ }
83
+ export interface ResourcePlugin extends Plugin {
84
+ /**
85
+ * resource type the plugin provide
86
+ */
87
+ resourceType: string;
88
+ /**
89
+ * resource description
90
+ */
91
+ description?: string;
92
+ /**
93
+ * return dependent plugin names, when adding resource, the toolkit will add all dependent resources
94
+ */
95
+ pluginDependencies?(ctx: Context, inputs: Inputs): Promise<Result<string[], FxError>>;
96
+ /**
97
+ * customize questions needed for add resource operation
98
+ */
99
+ getQuestionsForAddResource?: (ctx: Context, inputs: Inputs) => Promise<Result<QTreeNode | undefined, FxError>>;
100
+ /**
101
+ * add resource is a new lifecycle task for resource plugin, which will do some extra work after project settings is updated,
102
+ * for example, APIM will scaffold the openapi folder with files
103
+ */
104
+ addResource?: (ctx: Context, inputs: InputsWithProjectPath & {
105
+ existingResources: string[];
106
+ }) => Promise<Result<Void, FxError>>;
107
+ /**
108
+ * customize questions needed for local debug
109
+ */
110
+ getQuestionsForLocalProvision?: (ctx: Context, inputs: Inputs, tokenProvider: TokenProvider, localSettings?: DeepReadonly<Json>) => Promise<Result<QTreeNode | undefined, FxError>>;
111
+ provisionLocalResource?: (ctx: Context, inputs: InputsWithProjectPath, localSettings: Json, tokenProvider: TokenProvider) => Promise<Result<Json, FxError>>;
112
+ configureLocalResource?: (ctx: Context, inputs: InputsWithProjectPath, localSettings: Json, tokenProvider: TokenProvider) => Promise<Result<Void, FxError>>;
113
+ /**
114
+ * customize questions needed for provision
115
+ */
116
+ getQuestionsForProvision?: (ctx: Context, inputs: Inputs, tokenProvider: TokenProvider, envInfo?: DeepReadonly<EnvInfoV3>) => Promise<Result<QTreeNode | undefined, FxError>>;
117
+ provisionResource?: (ctx: Context, inputs: InputsWithProjectPath, envInfo: DeepReadonly<EnvInfoV3>, tokenProvider: TokenProvider) => Promise<Result<CloudResource, FxError>>;
118
+ configureResource?: (ctx: Context, inputs: InputsWithProjectPath, envInfo: DeepReadonly<EnvInfoV3>, tokenProvider: TokenProvider) => Promise<Result<Void, FxError>>;
119
+ generateResourceTemplate?: (ctx: Context, inputs: InputsWithProjectPath & {
120
+ existingResources: string[];
121
+ }) => Promise<Result<ResourceTemplate, FxError>>;
122
+ updateResourceTemplate?: (ctx: Context, inputs: InputsWithProjectPath & {
123
+ existingResources: string[];
124
+ }) => Promise<Result<ResourceTemplate, FxError>>;
125
+ /**
126
+ * customize questions needed for deploy
127
+ */
128
+ getQuestionsForDeploy?: (ctx: Context, inputs: Inputs, envInfo: DeepReadonly<EnvInfoV3>, tokenProvider: TokenProvider) => Promise<Result<QTreeNode | undefined, FxError>>;
129
+ deploy?: (ctx: Context, inputs: PluginDeployInputs, envInfo: DeepReadonly<EnvInfoV3>, tokenProvider: AzureAccountProvider) => Promise<Result<Void, FxError>>;
130
+ /**
131
+ * customize questions needed for user task
132
+ */
133
+ getQuestionsForUserTask?: (ctx: Context, inputs: Inputs, func: Func, localSettings: Json, envInfo: DeepReadonly<EnvInfoV3>, tokenProvider: TokenProvider) => Promise<Result<QTreeNode | undefined, FxError>>;
134
+ executeUserTask?: (ctx: Context, inputs: Inputs, func: Func, localSettings: Json, envInfo: EnvInfoV3, tokenProvider: TokenProvider) => Promise<Result<unknown, FxError>>;
135
+ }
136
+ //# sourceMappingURL=plugins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../src/v3/plugins.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG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AC,SAAS,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;IACrD,MAAM,CAAC,EAAE,CACP,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,kBAAkB,EAC1B,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,EAChC,aAAa,EAAE,oBAAoB,KAChC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAEpC;;OAEG;IACH,uBAAuB,CAAC,EAAE,CACxB,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,IAAI,EACnB,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,EAChC,aAAa,EAAE,aAAa,KACzB,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;IAErD,eAAe,CAAC,EAAE,CAChB,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,IAAI,EACnB,OAAO,EAAE,SAAS,EAClB,aAAa,EAAE,aAAa,KACzB,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;CACxC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=plugins.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../src/v3/plugins.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC"}
@@ -0,0 +1,64 @@
1
+ import { Json } from "../types";
2
+ export interface CloudResource extends Json {
3
+ /**
4
+ * resource id is unique identifier for the cloud resource
5
+ */
6
+ resourceId?: string;
7
+ /**
8
+ * resource name is the string name for the resource
9
+ */
10
+ resourceName?: string;
11
+ /**
12
+ * endpoint url for access
13
+ */
14
+ endpoint?: string | string[];
15
+ /**
16
+ * secret fields names, if a property is defined as secret, the value will be encrypted and replaced in .userdata file
17
+ */
18
+ secretFields?: string[];
19
+ }
20
+ /**
21
+ * ResourceStates contains all provision outputs of all resource plugins
22
+ */
23
+ export interface ResourceStates {
24
+ /**
25
+ * solution object contains common configs shared by all resources
26
+ */
27
+ solution: Json;
28
+ /**
29
+ * key is resource plugin name
30
+ * value is cloud resource state object
31
+ */
32
+ [key: string]: CloudResource;
33
+ }
34
+ export declare type AzureResource = CloudResource;
35
+ /**
36
+ * Azure solution common config
37
+ */
38
+ export interface AzureSolutionConfig extends Json {
39
+ resourceNameSuffix: string;
40
+ resourceGroupName: string;
41
+ tenantId: string;
42
+ subscriptionId: string;
43
+ subscriptionName: string;
44
+ location: string;
45
+ provisionSucceeded: boolean;
46
+ }
47
+ export interface TeamsAppResource extends AzureResource {
48
+ /**
49
+ * M365 tenant id
50
+ */
51
+ tenantId: string;
52
+ /**
53
+ * teams app id
54
+ */
55
+ teamsAppId: string;
56
+ }
57
+ export interface TeamsFxAzureResourceStates extends ResourceStates {
58
+ /**
59
+ * Azure solution configs contains common configs shared by all resources
60
+ */
61
+ solution: AzureSolutionConfig;
62
+ [key: string]: AzureResource;
63
+ }
64
+ //# sourceMappingURL=resourceStates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resourceStates.d.ts","sourceRoot":"","sources":["../../src/v3/resourceStates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,MAAM,WAAW,aAAc,SAAQ,IAAI;IACzC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC7B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,QAAQ,EAAE,IAAI,CAAC;IAEf;;;OAGG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAC;CAC9B;AAGD,oBAAY,aAAa,GAAG,aAAa,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,IAAI;IAC/C,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,0BAA2B,SAAQ,cAAc;IAChE;;OAEG;IACH,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAC;CAC9B"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=resourceStates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resourceStates.js","sourceRoot":"","sources":["../../src/v3/resourceStates.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC"}
@@ -0,0 +1,72 @@
1
+ import { Result } from "neverthrow";
2
+ import { FxError } from "../error";
3
+ import { Func, QTreeNode } from "../qm/question";
4
+ import { Inputs, Json, OptionItem, Void } from "../types";
5
+ import { AppStudioTokenProvider, TokenProvider } from "../utils/login";
6
+ import { Context, DeepReadonly, InputsWithProjectPath } from "../v2/types";
7
+ import { EnvInfoV3 } from "./types";
8
+ export interface ISolution {
9
+ name: string;
10
+ /**
11
+ * init
12
+ */
13
+ getQuestionsForInit?: (ctx: Context, inputs: Inputs) => Promise<Result<QTreeNode | undefined, FxError>>;
14
+ init: (ctx: Context, inputs: InputsWithProjectPath) => Promise<Result<Void, FxError>>;
15
+ /**
16
+ * scaffold
17
+ */
18
+ getQuestionsForScaffold?: (ctx: Context, inputs: InputsWithProjectPath) => Promise<Result<QTreeNode | undefined, FxError>>;
19
+ /**
20
+ * scaffold is a repeatable lifecycle stage
21
+ *
22
+ * @param {Context} ctx - plugin's runtime context shared by all lifecycles.
23
+ * @param {Inputs} inputs - module: module index(0,1,2), template: template name
24
+ *
25
+ * @returns Void
26
+ */
27
+ scaffold: (ctx: Context, inputs: InputsWithProjectPath & {
28
+ module?: string;
29
+ template?: OptionItem;
30
+ }) => Promise<Result<Void, FxError>>;
31
+ /**
32
+ * addResource
33
+ */
34
+ getQuestionsForAddResource?: (ctx: Context, inputs: InputsWithProjectPath) => Promise<Result<QTreeNode | undefined, FxError>>;
35
+ /**
36
+ * addResource
37
+ *
38
+ * @param {Context} ctx - plugin's runtime context shared by all lifecycles.
39
+ * @param {Inputs} inputs - module: module index(0,1,2), template: template name
40
+ *
41
+ * @returns Void
42
+ */
43
+ addResource: (ctx: Context, inputs: InputsWithProjectPath & {
44
+ module?: string;
45
+ resource?: string;
46
+ }) => Promise<Result<Void, FxError>>;
47
+ /**
48
+ * addModule
49
+ */
50
+ getQuestionsForAddModule?: (ctx: Context, inputs: InputsWithProjectPath) => Promise<Result<QTreeNode | undefined, FxError>>;
51
+ /**
52
+ * addModule means adding a sub-project
53
+ *
54
+ * @param {string[]} capabilities - capabilities for the module
55
+ */
56
+ addModule: (ctx: Context, localSettings: Json, inputs: InputsWithProjectPath & {
57
+ capabilities?: string[];
58
+ }) => Promise<Result<Void, FxError>>;
59
+ getQuestionsForProvision?: (ctx: Context, inputs: InputsWithProjectPath, tokenProvider: TokenProvider, envInfo?: DeepReadonly<EnvInfoV3>) => Promise<Result<QTreeNode | undefined, FxError>>;
60
+ provisionResources?: (ctx: Context, inputs: InputsWithProjectPath, envInfo: EnvInfoV3, tokenProvider: TokenProvider) => Promise<Result<EnvInfoV3, FxError>>;
61
+ getQuestionsForLocalProvision?: (ctx: Context, inputs: InputsWithProjectPath, tokenProvider: TokenProvider, localSettings?: DeepReadonly<Json>) => Promise<Result<QTreeNode | undefined, FxError>>;
62
+ provisionLocalResources?: (ctx: Context, inputs: InputsWithProjectPath, localSettings: Json, tokenProvider: TokenProvider) => Promise<Result<Json, FxError>>;
63
+ getQuestionsForDeploy?: (ctx: Context, inputs: InputsWithProjectPath, envInfo: DeepReadonly<EnvInfoV3>, tokenProvider: TokenProvider) => Promise<Result<QTreeNode | undefined, FxError>>;
64
+ deploy?: (ctx: Context, inputs: InputsWithProjectPath & {
65
+ modules: string[];
66
+ }, envInfo: DeepReadonly<EnvInfoV3>, tokenProvider: TokenProvider) => Promise<Result<Void, FxError>>;
67
+ getQuestionsForPublish?: (ctx: Context, inputs: InputsWithProjectPath, envInfo: DeepReadonly<EnvInfoV3>, tokenProvider: AppStudioTokenProvider) => Promise<Result<QTreeNode | undefined, FxError>>;
68
+ publishApplication: (ctx: Context, inputs: InputsWithProjectPath, envInfo: DeepReadonly<EnvInfoV3>, tokenProvider: AppStudioTokenProvider) => Promise<Result<Void, FxError>>;
69
+ getQuestionsForUserTask?: (ctx: Context, inputs: Inputs, func: Func, localSettings: Json, envInfo: DeepReadonly<EnvInfoV3>, tokenProvider: TokenProvider) => Promise<Result<QTreeNode | undefined, FxError>>;
70
+ executeUserTask?: (ctx: Context, inputs: Inputs, func: Func, localSettings: Json, envInfo: EnvInfoV3, tokenProvider: TokenProvider) => Promise<Result<unknown, FxError>>;
71
+ }
72
+ //# sourceMappingURL=solution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solution.d.ts","sourceRoot":"","sources":["../../src/v3/solution.ts"],"names":[],"mappings":"AAGA,OAAO,EAA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MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAGpC,uBAAuB,CAAC,EAAE,CACxB,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,IAAI,EACnB,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,EAChC,aAAa,EAAE,aAAa,KACzB,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;IACrD,eAAe,CAAC,EAAE,CAChB,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,IAAI,EACnB,OAAO,EAAE,SAAS,EAClB,aAAa,EAAE,aAAa,KACzB,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;CACxC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=solution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solution.js","sourceRoot":"","sources":["../../src/v3/solution.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC"}
@@ -0,0 +1,42 @@
1
+ import { SolutionSettings, AzureSolutionSettings } from "../types";
2
+ /**
3
+ * Module is basic building block of the App
4
+ */
5
+ export interface Module {
6
+ /**
7
+ * capabilities that the module supports
8
+ */
9
+ capabilities: string[];
10
+ /**
11
+ * root directory name
12
+ */
13
+ dir?: string;
14
+ /**
15
+ * relative path for the built artifact, it can be a folder path or a file path, depends the deployment type
16
+ */
17
+ buildPath?: string;
18
+ /**
19
+ * hostingPlugin is available after add resource, this is an mapping between module and resource plugin
20
+ */
21
+ hostingPlugin?: string;
22
+ /**
23
+ * deployment type for bits
24
+ */
25
+ deployType?: string;
26
+ }
27
+ export interface TeamsFxSolutionSettings extends AzureSolutionSettings {
28
+ /**
29
+ * upgrade solution settings version to 3.0.0
30
+ */
31
+ version: "3.0.0";
32
+ modules: Module[];
33
+ }
34
+ export interface TeamsSPFxSolutionSettings extends SolutionSettings {
35
+ version: "3.0.0";
36
+ modules: Module[];
37
+ hostType: string;
38
+ capabilities: string[];
39
+ activeResourcePlugins: string[];
40
+ migrateFromV1?: boolean;
41
+ }
42
+ //# sourceMappingURL=solutionSettings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solutionSettings.d.ts","sourceRoot":"","sources":["../../src/v3/solutionSettings.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACnE;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,uBAAwB,SAAQ,qBAAqB;IACpE;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,yBAA0B,SAAQ,gBAAgB;IACjE,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=solutionSettings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solutionSettings.js","sourceRoot":"","sources":["../../src/v3/solutionSettings.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC"}
@@ -0,0 +1,9 @@
1
+ import { EnvInfoV2 } from "../v2/types";
2
+ import { ResourceStates } from "./resourceStates";
3
+ /**
4
+ * Upgrade EnvInfoV2, specify the state type as ResourceStates
5
+ */
6
+ export interface EnvInfoV3 extends EnvInfoV2 {
7
+ state: ResourceStates;
8
+ }
9
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/v3/types.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C,KAAK,EAAE,cAAc,CAAC;CACvB"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/v3/types.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/teamsfx-api",
3
- "version": "0.11.1-alpha.fa070464.0",
3
+ "version": "0.12.1-alpha.12edbb86.0",
4
4
  "description": "teamsfx framework api",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -67,7 +67,7 @@
67
67
  "jsonschema": "^1.4.0",
68
68
  "neverthrow": "^3.2.0"
69
69
  },
70
- "gitHead": "c093f517460b8cda482e93b9e0c9363b746fe861",
70
+ "gitHead": "9cbb2c946f31a04619d1036b8e4cabf5ddcff484",
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },