@microsoft/teamsfx-api 0.22.3 → 0.22.4-alpha.22a5754c6.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/constants.d.ts +0 -2
- package/build/constants.d.ts.map +1 -1
- package/build/constants.js +1 -3
- package/build/constants.js.map +1 -1
- package/build/error.d.ts +0 -47
- package/build/error.d.ts.map +1 -1
- package/build/error.js +3 -135
- package/build/error.js.map +1 -1
- package/build/index.d.ts +0 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +0 -2
- package/build/index.js.map +1 -1
- package/build/qm/index.d.ts +0 -1
- package/build/qm/index.d.ts.map +1 -1
- package/build/qm/index.js +0 -1
- package/build/qm/index.js.map +1 -1
- package/build/qm/ui.d.ts +0 -84
- package/build/qm/ui.d.ts.map +1 -1
- package/build/qm/ui.js +0 -86
- package/build/qm/ui.js.map +1 -1
- package/build/types.d.ts +0 -1
- package/build/types.d.ts.map +1 -1
- package/build/types.js +1 -11
- package/build/types.js.map +1 -1
- package/build/v2/index.d.ts +0 -2
- package/build/v2/index.d.ts.map +1 -1
- package/build/v2/index.js +0 -2
- package/build/v2/index.js.map +1 -1
- package/build/v2/types.d.ts +2 -37
- package/build/v2/types.d.ts.map +1 -1
- package/build/v2/types.js +0 -23
- package/build/v2/types.js.map +1 -1
- package/build/v3/core.d.ts +1 -8
- package/build/v3/core.d.ts.map +1 -1
- package/build/v3/plugins.d.ts +3 -95
- package/build/v3/plugins.d.ts.map +1 -1
- package/package.json +4 -4
- package/build/plugin.d.ts +0 -71
- package/build/plugin.d.ts.map +0 -1
- package/build/plugin.js +0 -5
- package/build/plugin.js.map +0 -1
- package/build/qm/visitor.d.ts +0 -15
- package/build/qm/visitor.d.ts.map +0 -1
- package/build/qm/visitor.js +0 -388
- package/build/qm/visitor.js.map +0 -1
- package/build/solution.d.ts +0 -29
- package/build/solution.d.ts.map +0 -1
- package/build/solution.js +0 -5
- package/build/solution.js.map +0 -1
- package/build/v2/resourcePlugin.d.ts +0 -180
- package/build/v2/resourcePlugin.d.ts.map +0 -1
- package/build/v2/resourcePlugin.js +0 -5
- package/build/v2/resourcePlugin.js.map +0 -1
- package/build/v2/solutionPlugin.d.ts +0 -100
- package/build/v2/solutionPlugin.d.ts.map +0 -1
- package/build/v2/solutionPlugin.js +0 -5
- package/build/v2/solutionPlugin.js.map +0 -1
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { Result } from "neverthrow";
|
|
2
|
-
import { DeepReadonly, InputsWithProjectPath, ResourceProvisionOutput } from ".";
|
|
3
|
-
import { M365TokenProvider, Func, FxError, Inputs, QTreeNode, TokenProvider, Void } from "../index";
|
|
4
|
-
import { Json } from "../types";
|
|
5
|
-
import { Context, EnvInfoV2, FxResult } from "./types";
|
|
6
|
-
export declare type SolutionProvisionOutput = Record<string, ResourceProvisionOutput>;
|
|
7
|
-
export interface SolutionPlugin {
|
|
8
|
-
name: string;
|
|
9
|
-
displayName: string;
|
|
10
|
-
/**
|
|
11
|
-
* Called by Toolkit when creating a new project or adding a new resource.
|
|
12
|
-
* Scaffolds source code on disk, relative to context.projectPath.
|
|
13
|
-
*
|
|
14
|
-
* @param {Context} ctx - plugin's runtime context shared by all lifecycles.
|
|
15
|
-
* @param {Inputs} inputs - User answers to questions defined in {@link getQuestionsForScaffolding} along with some system inputs.
|
|
16
|
-
*
|
|
17
|
-
* @returns scaffold return nothing in API, all source code are persist in FS.
|
|
18
|
-
*/
|
|
19
|
-
scaffoldSourceCode: (ctx: Context, inputs: Inputs) => Promise<Result<Void, FxError>>;
|
|
20
|
-
/**
|
|
21
|
-
* Called when creating a new project or adding a new resource.
|
|
22
|
-
* Returns resource templates (e.g. Bicep templates/plain JSON) for provisioning
|
|
23
|
-
* based on the resource templates returned by resource plugins.
|
|
24
|
-
*
|
|
25
|
-
* @param {Context} ctx - plugin's runtime context shared by all lifecycles.
|
|
26
|
-
* @param {Inputs} inputs - User's answers to questions defined in {@link getQuestionsForLifecycleTask} for {@link Stage.create} along with some system inputs.
|
|
27
|
-
* @param {Json} - model for config.${env}.json, which is created core, solution will fill in some keys in it, such as azure, manifest
|
|
28
|
-
*
|
|
29
|
-
* @return {Json} envConfig
|
|
30
|
-
*/
|
|
31
|
-
generateResourceTemplate: (ctx: Context, inputs: Inputs) => Promise<Result<Json, FxError>>;
|
|
32
|
-
/**
|
|
33
|
-
* This method is called by the Toolkit when users run "Provision in the Cloud" command.
|
|
34
|
-
* The implementation of solution is expected to do these operations in order:
|
|
35
|
-
* 1) Call resource plugins' provisionResource.
|
|
36
|
-
* 2) Run Bicep/ARM deployment returned by {@link generateResourceTemplate}.
|
|
37
|
-
* 3) Call resource plugins' configureResource.
|
|
38
|
-
*
|
|
39
|
-
* @param {Context} ctx - plugin's runtime context shared by all lifecycles.
|
|
40
|
-
* @param {ProvisionInputs} inputs - system inputs
|
|
41
|
-
* @param {EnvInfoV2} envInfo - model for config.${env}.json, in which, user can customize some inputs for provision
|
|
42
|
-
* @param {TokenProvider} tokenProvider - Tokens for Azure and AppStudio
|
|
43
|
-
*/
|
|
44
|
-
provisionResources: (ctx: Context, inputs: Inputs, envInfo: EnvInfoV2, tokenProvider: TokenProvider) => Promise<Result<Void, FxError>>;
|
|
45
|
-
/**
|
|
46
|
-
* Depends on the values returned by {@link provisionResources}.
|
|
47
|
-
* Expected behavior is to deploy code to cloud using credentials provided by {@link AzureAccountProvider}.
|
|
48
|
-
*
|
|
49
|
-
* @param {Context} ctx - plugin's runtime context shared by all lifecycles.
|
|
50
|
-
* @param {Inputs} inputs - system inputs
|
|
51
|
-
* @param {DeepReadonly<EnvInfoV2>} envInfo - a readonly view of environment info modeled after (config|state).${env}.json
|
|
52
|
-
* @param {TokenProvider} tokenProvider - Token providers for Azure, AppStudio and m365.
|
|
53
|
-
*
|
|
54
|
-
*/
|
|
55
|
-
deploy?: (ctx: Context, inputs: Inputs, envInfo: DeepReadonly<EnvInfoV2>, tokenProvider: TokenProvider) => Promise<Result<Void, FxError>>;
|
|
56
|
-
/**
|
|
57
|
-
* Depends on the output of {@link package}. Uploads Teams package to AppStudio
|
|
58
|
-
* @param {Context} ctx - plugin's runtime context shared by all lifecycles.
|
|
59
|
-
* @param {Inputs} inputs - User answers to questions defined in {@link getQuestionsForLifecycleTask}
|
|
60
|
-
* @param {DeepReadonly<EnvInfoV2>} envInfo - a readonly view to the current env
|
|
61
|
-
* @param {M365TokenProvider} tokenProvider - Token for M365
|
|
62
|
-
*/
|
|
63
|
-
publishApplication: (ctx: Context, inputs: Inputs, envInfo: DeepReadonly<EnvInfoV2>, tokenProvider: M365TokenProvider) => Promise<Result<Void, FxError>>;
|
|
64
|
-
/**
|
|
65
|
-
* provisionLocalResource is a special lifecycle, called when users press F5 in vscode.
|
|
66
|
-
* It works like provision, but only creates necessary cloud resources for local debugging like AAD and AppStudio App.
|
|
67
|
-
* Implementation of this lifecycle is expected to call each resource plugins' provisionLocalResource, and after all of
|
|
68
|
-
* them finishes, call configureLocalResource of each plugin.
|
|
69
|
-
*
|
|
70
|
-
* @param {Context} ctx - plugin's runtime context shared by all lifecycles.
|
|
71
|
-
* @param {Inputs} inputs - User answers to questions defined in {@link getQuestionsForLifecycleTask}
|
|
72
|
-
* @param {Json} localSettings - JSON holding the output values for debugging
|
|
73
|
-
* @param {TokenProvider} tokenProvider - Tokens for Azure and AppStudio
|
|
74
|
-
*
|
|
75
|
-
* @returns the output localSettings
|
|
76
|
-
*/
|
|
77
|
-
provisionLocalResource?: (ctx: Context, inputs: Inputs, localSettings: Json, tokenProvider: TokenProvider, envInfo?: EnvInfoV2) => Promise<FxResult<Json, FxError>>;
|
|
78
|
-
/**
|
|
79
|
-
* get question model for lifecycle {@link Stage} (create), Questions are organized as a tree. Please check {@link QTreeNode}.
|
|
80
|
-
*/
|
|
81
|
-
getQuestionsForScaffolding?: (ctx: Context, inputs: Inputs) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
82
|
-
/**
|
|
83
|
-
* execute user customized task, for example `Add Resource`, `Add Capabilities`, etc
|
|
84
|
-
*/
|
|
85
|
-
executeUserTask?: (ctx: Context, inputs: Inputs, func: Func, localSettings: Json, envInfo: EnvInfoV2, tokenProvider: TokenProvider) => Promise<Result<unknown, FxError>>;
|
|
86
|
-
/**
|
|
87
|
-
* for env management
|
|
88
|
-
*/
|
|
89
|
-
createEnv?: (ctx: Context, inputs: Inputs) => Promise<Result<Void, FxError>>;
|
|
90
|
-
activateEnv?: (ctx: Context, inputs: Inputs) => Promise<Result<Void, FxError>>;
|
|
91
|
-
/**
|
|
92
|
-
* For grant and check permission in remote collaboration
|
|
93
|
-
*/
|
|
94
|
-
grantPermission?: (ctx: Context, inputs: InputsWithProjectPath, envInfo: DeepReadonly<EnvInfoV2>, tokenProvider: TokenProvider) => Promise<Result<Json, FxError>>;
|
|
95
|
-
checkPermission?: (ctx: Context, inputs: InputsWithProjectPath, envInfo: DeepReadonly<EnvInfoV2>, tokenProvider: TokenProvider) => Promise<Result<Json, FxError>>;
|
|
96
|
-
listCollaborator?: (ctx: Context, inputs: InputsWithProjectPath, envInfo: DeepReadonly<EnvInfoV2>, tokenProvider: TokenProvider) => Promise<Result<Json, FxError>>;
|
|
97
|
-
getQuestions?: (ctx: Context, inputs: Inputs, envInfo: DeepReadonly<EnvInfoV2>, tokenProvider: TokenProvider) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
98
|
-
getQuestionsForUserTask?: (ctx: Context, inputs: Inputs, func: Func, envInfo: DeepReadonly<EnvInfoV2>, tokenProvider: TokenProvider) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
99
|
-
}
|
|
100
|
-
//# sourceMappingURL=solutionPlugin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"solutionPlugin.d.ts","sourceRoot":"","sources":["../../src/v2/solutionPlugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EACL,YAAY,EAEZ,qBAAqB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