@microsoft/teamsfx-api 0.16.0 → 0.16.1-alpha.e96379031.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/v3/plugins.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { FxError } from "../error";
|
|
|
3
3
|
import { QTreeNode } from "../qm/question";
|
|
4
4
|
import { Inputs, Void } from "../types";
|
|
5
5
|
import { TokenProvider } from "../utils/login";
|
|
6
|
-
import { ResourceTemplate } from "../v2/resourcePlugin";
|
|
7
6
|
import { Context, DeepReadonly, InputsWithProjectPath } from "../v2/types";
|
|
8
7
|
import { EnvInfoV3, ManifestCapability } from "./types";
|
|
9
8
|
export interface AppManifestProvider {
|
|
@@ -18,76 +17,6 @@ export interface ContextWithManifestProvider extends Context {
|
|
|
18
17
|
export interface AddFeatureInputs extends InputsWithProjectPath {
|
|
19
18
|
allPluginsAfterAdd: string[];
|
|
20
19
|
}
|
|
21
|
-
export interface OtherFeaturesAddedInputs extends AddFeatureInputs {
|
|
22
|
-
addedPlugins: {
|
|
23
|
-
name: string;
|
|
24
|
-
value: ResourceTemplate[];
|
|
25
|
-
}[];
|
|
26
|
-
}
|
|
27
|
-
export interface FeaturePlugin {
|
|
28
|
-
/**
|
|
29
|
-
* unique identifier for plugin in IoC container
|
|
30
|
-
*/
|
|
31
|
-
name: string;
|
|
32
|
-
/**
|
|
33
|
-
* display name for the plugin
|
|
34
|
-
*/
|
|
35
|
-
displayName?: string;
|
|
36
|
-
/**
|
|
37
|
-
* resource description
|
|
38
|
-
*/
|
|
39
|
-
description?: string;
|
|
40
|
-
/**
|
|
41
|
-
* return dependent plugin names, when adding feature
|
|
42
|
-
* If plugin A depends on plugin B, when plugin A is added into the project, plugin B will also be added
|
|
43
|
-
*/
|
|
44
|
-
pluginDependencies?(ctx: Context, inputs: Inputs): Promise<Result<string[], FxError>>;
|
|
45
|
-
/**
|
|
46
|
-
* questions in add feature flow
|
|
47
|
-
*/
|
|
48
|
-
getQuestionsForAddFeature?: (ctx: Context, inputs: Inputs) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
49
|
-
/**
|
|
50
|
-
* triggered by add feature event, this API aims to add/modify files in local workspace
|
|
51
|
-
*
|
|
52
|
-
* @param {ContextWithManifestProvider} context with manifest provider
|
|
53
|
-
* @param {AddFeatureInputs} inputs with plugins names after added
|
|
54
|
-
* @returns {ResourceTemplate[]} resource template
|
|
55
|
-
*/
|
|
56
|
-
addFeature: (ctx: ContextWithManifestProvider, inputs: AddFeatureInputs) => Promise<Result<ResourceTemplate[], FxError>>;
|
|
57
|
-
/**
|
|
58
|
-
* triggered after other feature(s) is/are added
|
|
59
|
-
* one scenario is that when feature A is added, feature plugin B should be notified after adding feature A.
|
|
60
|
-
*
|
|
61
|
-
* @param {ContextWithManifestProvider} context with manifest provider
|
|
62
|
-
*
|
|
63
|
-
* @param {OtherFeaturesAddedInputs} inputs with added features
|
|
64
|
-
*
|
|
65
|
-
* @param {EnvInfoV3} envInfo optional
|
|
66
|
-
*
|
|
67
|
-
* @returns {ResourceTemplate[]} resource template
|
|
68
|
-
*/
|
|
69
|
-
afterOtherFeaturesAdded?: (ctx: ContextWithManifestProvider, inputs: OtherFeaturesAddedInputs) => Promise<Result<ResourceTemplate[], FxError>>;
|
|
70
|
-
/**
|
|
71
|
-
* customized questions for provision
|
|
72
|
-
*/
|
|
73
|
-
getQuestionsForProvision?: (ctx: Context, inputs: Inputs, envInfo: DeepReadonly<EnvInfoV3>, tokenProvider: TokenProvider) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
74
|
-
/**
|
|
75
|
-
* provision includes provision local resource or remote resource
|
|
76
|
-
*/
|
|
77
|
-
provisionResource?: (ctx: Context, inputs: InputsWithProjectPath, envInfo: EnvInfoV3, tokenProvider: TokenProvider) => Promise<Result<Void, FxError>>;
|
|
78
|
-
/**
|
|
79
|
-
* config resources includes both local and remote
|
|
80
|
-
*/
|
|
81
|
-
configureResource?: (ctx: Context, inputs: InputsWithProjectPath, envInfo: EnvInfoV3, tokenProvider: TokenProvider) => Promise<Result<Void, FxError>>;
|
|
82
|
-
/**
|
|
83
|
-
* customized questions for deploy
|
|
84
|
-
*/
|
|
85
|
-
getQuestionsForDeploy?: (ctx: Context, inputs: Inputs, envInfo: DeepReadonly<EnvInfoV3>, tokenProvider: TokenProvider) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
86
|
-
/**
|
|
87
|
-
* deploy
|
|
88
|
-
*/
|
|
89
|
-
deploy?: (ctx: Context, inputs: InputsWithProjectPath, envInfo: DeepReadonly<EnvInfoV3>, tokenProvider: TokenProvider) => Promise<Result<Void, FxError>>;
|
|
90
|
-
}
|
|
91
20
|
export interface BicepTemplate extends Record<any, unknown> {
|
|
92
21
|
Provision?: {
|
|
93
22
|
Orchestration?: string;
|
|
@@ -139,11 +68,6 @@ export interface AzureResourcePlugin {
|
|
|
139
68
|
* in this API, plugin is supposed to generate source code
|
|
140
69
|
*/
|
|
141
70
|
generateCode?: (ctx: ContextWithManifestProvider, inputs: AddFeatureInputs) => Promise<Result<Void, FxError>>;
|
|
142
|
-
/**
|
|
143
|
-
* triggered when some other resource(s) is(are) added,
|
|
144
|
-
* in this API, plugin is supposed to update the source code according to the updated context
|
|
145
|
-
*/
|
|
146
|
-
updateCode?: (ctx: ContextWithManifestProvider, inputs: UpdateInputs) => Promise<Result<Void, FxError>>;
|
|
147
71
|
/**
|
|
148
72
|
* triggered when the resource is added,
|
|
149
73
|
* in this API, plugin is supposed to generate bicep template for the resource provisioning
|
|
@@ -1 +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,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM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CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAEpC;;OAEG;IACH,qBAAqB,CAAC,EAAE,CACtB,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,EAChC,aAAa,EAAE,aAAa,KACzB,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;IAErD;;OAEG;IACH,MAAM,CAAC,EAAE,CACP,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,qBAAqB,EAC7B,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,EAChC,aAAa,EAAE,aAAa,KACzB,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;CACrC;AAED,oBAAY,QAAQ,GAAG,mBAAmB,CAAC"}
|
package/build/v3/types.d.ts
CHANGED
|
@@ -6,31 +6,19 @@ export interface EnvInfoV3 extends EnvInfoV2 {
|
|
|
6
6
|
}
|
|
7
7
|
export declare type ManifestCapability = {
|
|
8
8
|
name: "staticTab";
|
|
9
|
-
snippet?:
|
|
10
|
-
local: IStaticTab;
|
|
11
|
-
remote: IStaticTab;
|
|
12
|
-
};
|
|
9
|
+
snippet?: IStaticTab;
|
|
13
10
|
existingApp?: boolean;
|
|
14
11
|
} | {
|
|
15
12
|
name: "configurableTab";
|
|
16
|
-
snippet?:
|
|
17
|
-
local: IConfigurableTab;
|
|
18
|
-
remote: IConfigurableTab;
|
|
19
|
-
};
|
|
13
|
+
snippet?: IConfigurableTab;
|
|
20
14
|
existingApp?: boolean;
|
|
21
15
|
} | {
|
|
22
16
|
name: "Bot";
|
|
23
|
-
snippet?:
|
|
24
|
-
local: IBot;
|
|
25
|
-
remote: IBot;
|
|
26
|
-
};
|
|
17
|
+
snippet?: IBot;
|
|
27
18
|
existingApp?: boolean;
|
|
28
19
|
} | {
|
|
29
20
|
name: "MessageExtension";
|
|
30
|
-
snippet?:
|
|
31
|
-
local: IComposeExtension;
|
|
32
|
-
remote: IComposeExtension;
|
|
33
|
-
};
|
|
21
|
+
snippet?: IComposeExtension;
|
|
34
22
|
existingApp?: boolean;
|
|
35
23
|
} | {
|
|
36
24
|
name: "WebApplicationInfo";
|
package/build/v3/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/v3/types.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,IAAI,EACJ,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C,KAAK,EAAE,cAAc,CAAC;CACvB;AAGD,oBAAY,kBAAkB,GAC1B;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,CAAC,EAAE
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/v3/types.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,IAAI,EACJ,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C,KAAK,EAAE,cAAc,CAAC;CACvB;AAGD,oBAAY,kBAAkB,GAC1B;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GACD;IACE,IAAI,EAAE,iBAAiB,CAAC;IACxB,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GACD;IACE,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GACD;IACE,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GACD;IACE,IAAI,EAAE,oBAAoB,CAAC;IAC3B,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/teamsfx-api",
|
|
3
|
-
"version": "0.16.0",
|
|
3
|
+
"version": "0.16.1-alpha.e96379031.0",
|
|
4
4
|
"description": "teamsfx framework api",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@typescript-eslint/parser": "^4.19.0",
|
|
44
44
|
"chai-as-promised": "^7.1.1",
|
|
45
45
|
"chai-spies": "^1.0.0",
|
|
46
|
-
"cpy-cli": "^
|
|
46
|
+
"cpy-cli": "^4.0.0",
|
|
47
47
|
"eslint": "^7.22.0",
|
|
48
48
|
"eslint-plugin-import": "^2.25.2",
|
|
49
49
|
"eslint-plugin-no-secrets": "^0.8.9",
|
|
@@ -61,15 +61,15 @@
|
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@azure/core-http": "^1.2.2",
|
|
64
|
-
"@azure/ms-rest-nodeauth": "^3.
|
|
65
|
-
"@microsoft/teams-manifest": "
|
|
64
|
+
"@azure/ms-rest-nodeauth": "^3.1.1",
|
|
65
|
+
"@microsoft/teams-manifest": "0.0.3-alpha.e96379031.0",
|
|
66
66
|
"@types/fs-extra": "^9.0.10",
|
|
67
67
|
"axios": "^0.21.2",
|
|
68
68
|
"chai": "^4.3.4",
|
|
69
69
|
"jsonschema": "^1.4.0",
|
|
70
70
|
"neverthrow": "^3.2.0"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "864d287b78300063ed1737c509c64bbd2ff8747e",
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|