@microsoft/teamsfx-api 0.22.2-alpha.69d5c41c0.0 → 0.22.2-alpha.6d2819207.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 +6 -2
- package/build/constants.d.ts.map +1 -1
- package/build/constants.js +5 -1
- package/build/constants.js.map +1 -1
- package/build/core.d.ts +0 -1
- package/build/core.d.ts.map +1 -1
- package/build/error.d.ts +0 -3
- package/build/error.d.ts.map +1 -1
- package/build/error.js +1 -7
- 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/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/qm/visitor.d.ts.map +1 -1
- package/build/qm/visitor.js +4 -0
- package/build/qm/visitor.js.map +1 -1
- package/build/utils/log.d.ts +8 -4
- package/build/utils/log.d.ts.map +1 -1
- package/build/utils/log.js.map +1 -1
- package/build/utils/login.d.ts +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 +0 -13
- package/build/v2/types.d.ts.map +1 -1
- 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 +5 -5
- 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/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
package/build/v2/types.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { Inputs, Json, ProjectSettings } from "../types";
|
|
|
3
3
|
import { CryptoProvider, LogProvider, TelemetryReporter, PermissionRequestProvider, ExpServiceProvider } from "../utils";
|
|
4
4
|
import { EnvInfo } from "../context";
|
|
5
5
|
import { FxError } from "../error";
|
|
6
|
-
export declare type PluginName = string;
|
|
7
6
|
export interface Context {
|
|
8
7
|
userInteraction: UserInteraction;
|
|
9
8
|
logProvider: LogProvider;
|
|
@@ -24,21 +23,9 @@ export declare type LocalSetting = {
|
|
|
24
23
|
key: keyof LocalSettings;
|
|
25
24
|
value: Record<string, string>;
|
|
26
25
|
};
|
|
27
|
-
export declare type SolutionInputs = {
|
|
28
|
-
resourceNameSuffix: string;
|
|
29
|
-
resourceGroupName: string;
|
|
30
|
-
location: string;
|
|
31
|
-
teamsAppTenantId: string;
|
|
32
|
-
subscriptionId: string;
|
|
33
|
-
tenantId: string;
|
|
34
|
-
remoteTeamsAppId?: string;
|
|
35
|
-
provisionSucceeded?: boolean;
|
|
36
|
-
};
|
|
37
26
|
export declare type InputsWithProjectPath = Inputs & {
|
|
38
27
|
projectPath: string;
|
|
39
28
|
};
|
|
40
|
-
export declare type ProvisionInputs = InputsWithProjectPath & SolutionInputs;
|
|
41
|
-
export declare type DeploymentInputs = InputsWithProjectPath & SolutionInputs;
|
|
42
29
|
export declare class FxSuccess<T> {
|
|
43
30
|
kind: "success";
|
|
44
31
|
output: T;
|
package/build/v2/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/v2/types.ts"],"names":[],"mappings":"AAIA,OAA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C,CAAC,CAAC,CAAC,CAAC;CAC5C,CAAC"}
|
package/build/v2/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/v2/types.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/v2/types.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AAoCb,MAAa,SAAS;IAGpB,YAAY,MAAS;QACnB,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAPD,8BAOC;AAED,MAAa,gBAAgB;IAI3B,YAAY,MAAS,EAAE,KAAY;QACjC,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF;AATD,4CASC;AAED,MAAa,SAAS;IAGpB,YAAY,KAAY;QACtB,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF;AAPD,8BAOC"}
|
package/build/v3/core.d.ts
CHANGED
|
@@ -4,19 +4,12 @@ import { FxError } from "../error";
|
|
|
4
4
|
import { Void } from "../types";
|
|
5
5
|
import { InputsWithProjectPath } from "../v2/types";
|
|
6
6
|
export interface ICore extends Core {
|
|
7
|
-
/**
|
|
8
|
-
* init means enable TeamsFx feature for current project folder.
|
|
9
|
-
* init command is called to create a minimized teamsfx project
|
|
10
|
-
*/
|
|
11
|
-
init: (inputs: InputsWithProjectPath & {
|
|
12
|
-
solution?: string;
|
|
13
|
-
}) => Promise<Result<Void, FxError>>;
|
|
14
7
|
/**
|
|
15
8
|
* add feature means add/modify files in local workspace folder:
|
|
16
9
|
* 1. scaffold/update source code
|
|
17
10
|
* 2. generate/update arm templates
|
|
18
11
|
* 3. update teams app manifest file
|
|
19
12
|
*/
|
|
20
|
-
addFeature
|
|
13
|
+
addFeature?: (inputs: InputsWithProjectPath) => Promise<Result<Void, FxError>>;
|
|
21
14
|
}
|
|
22
15
|
//# sourceMappingURL=core.d.ts.map
|
package/build/v3/core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/v3/core.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEpD,MAAM,WAAW,KAAM,SAAQ,IAAI;IACjC
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/v3/core.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEpD,MAAM,WAAW,KAAM,SAAQ,IAAI;IACjC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,KAAK,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;CAChF"}
|
package/build/v3/plugins.d.ts
CHANGED
|
@@ -1,104 +1,12 @@
|
|
|
1
1
|
import { Result } from "neverthrow";
|
|
2
2
|
import { FxError } from "../error";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { Context, DeepReadonly, InputsWithProjectPath } from "../v2/types";
|
|
7
|
-
import { EnvInfoV3, ManifestCapability } from "./types";
|
|
3
|
+
import { Void } from "../types";
|
|
4
|
+
import { Context, InputsWithProjectPath } from "../v2/types";
|
|
5
|
+
import { ManifestCapability } from "./types";
|
|
8
6
|
export interface AppManifestProvider {
|
|
9
7
|
addCapabilities: (ctx: Context, inputs: InputsWithProjectPath, capabilities: ManifestCapability[]) => Promise<Result<Void, FxError>>;
|
|
10
8
|
updateCapability: (ctx: Context, inputs: InputsWithProjectPath, capability: ManifestCapability) => Promise<Result<Void, FxError>>;
|
|
11
9
|
deleteCapability: (ctx: Context, inputs: InputsWithProjectPath, capability: ManifestCapability) => Promise<Result<Void, FxError>>;
|
|
12
10
|
capabilityExceedLimit: (ctx: Context, inputs: InputsWithProjectPath, capability: "staticTab" | "configurableTab" | "Bot" | "MessageExtension" | "WebApplicationInfo") => Promise<Result<boolean, FxError>>;
|
|
13
11
|
}
|
|
14
|
-
export interface ContextWithManifestProvider extends Context {
|
|
15
|
-
appManifestProvider: AppManifestProvider;
|
|
16
|
-
}
|
|
17
|
-
export interface AddFeatureInputs extends InputsWithProjectPath {
|
|
18
|
-
allPluginsAfterAdd: string[];
|
|
19
|
-
}
|
|
20
|
-
export interface BicepTemplate extends Record<any, unknown> {
|
|
21
|
-
Provision?: {
|
|
22
|
-
Orchestration?: string;
|
|
23
|
-
Modules?: {
|
|
24
|
-
[moduleFileName: string]: string;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
Configuration?: {
|
|
28
|
-
Orchestration?: string;
|
|
29
|
-
Modules?: {
|
|
30
|
-
[moduleFileName: string]: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
Reference?: Record<string, unknown>;
|
|
34
|
-
Parameters?: Record<string, string>;
|
|
35
|
-
}
|
|
36
|
-
export interface UpdateInputs extends AddFeatureInputs {
|
|
37
|
-
/**
|
|
38
|
-
* newly added plugins
|
|
39
|
-
*/
|
|
40
|
-
newPlugins: string[];
|
|
41
|
-
}
|
|
42
|
-
export interface AzureResourcePlugin {
|
|
43
|
-
/**
|
|
44
|
-
* unique identifier for plugin in IoC container
|
|
45
|
-
*/
|
|
46
|
-
name: string;
|
|
47
|
-
/**
|
|
48
|
-
* display name for the plugin
|
|
49
|
-
*/
|
|
50
|
-
displayName?: string;
|
|
51
|
-
/**
|
|
52
|
-
* resource description
|
|
53
|
-
*/
|
|
54
|
-
description?: string;
|
|
55
|
-
/**
|
|
56
|
-
* questions asked when the resource is selected to add
|
|
57
|
-
*/
|
|
58
|
-
getQuestionsForAddInstance?: (ctx: Context, inputs: Inputs) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
59
|
-
/**
|
|
60
|
-
* triggered when the resource is added,
|
|
61
|
-
* in this API, plugin is supposed to:
|
|
62
|
-
* 1. register itself in project settings
|
|
63
|
-
* 2. add/update capabilities in manifest
|
|
64
|
-
*/
|
|
65
|
-
addInstance?: (ctx: ContextWithManifestProvider, inputs: InputsWithProjectPath) => Promise<Result<string[], FxError>>;
|
|
66
|
-
/**
|
|
67
|
-
* triggered when the resource is added,
|
|
68
|
-
* in this API, plugin is supposed to generate source code
|
|
69
|
-
*/
|
|
70
|
-
generateCode?: (ctx: ContextWithManifestProvider, inputs: AddFeatureInputs) => Promise<Result<Void, FxError>>;
|
|
71
|
-
/**
|
|
72
|
-
* triggered when the resource is added,
|
|
73
|
-
* in this API, plugin is supposed to generate bicep template for the resource provisioning
|
|
74
|
-
*/
|
|
75
|
-
generateBicep?: (ctx: ContextWithManifestProvider, inputs: AddFeatureInputs) => Promise<Result<BicepTemplate[], FxError>>;
|
|
76
|
-
/**
|
|
77
|
-
* triggered when some other resource(s) is(are) added,
|
|
78
|
-
* in this API, plugin is supposed to update bicep template according to the updated context
|
|
79
|
-
*/
|
|
80
|
-
updateBicep?: (ctx: ContextWithManifestProvider, inputs: UpdateInputs) => Promise<Result<BicepTemplate[], FxError>>;
|
|
81
|
-
/**
|
|
82
|
-
* questions to ask for provision
|
|
83
|
-
*/
|
|
84
|
-
getQuestionsForProvision?: (ctx: Context, inputs: Inputs, envInfo: DeepReadonly<EnvInfoV3>, tokenProvider: TokenProvider) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
85
|
-
/**
|
|
86
|
-
* this API is for some tasks that can not be finished using arm templates
|
|
87
|
-
* The API will be kept until all provision tasks can be done by template driven method
|
|
88
|
-
*/
|
|
89
|
-
provisionResource?: (ctx: Context, inputs: InputsWithProjectPath, envInfo: EnvInfoV3, tokenProvider: TokenProvider) => Promise<Result<Void, FxError>>;
|
|
90
|
-
/**
|
|
91
|
-
* configuration of resources after provisioning finished
|
|
92
|
-
*/
|
|
93
|
-
configureResource?: (ctx: Context, inputs: InputsWithProjectPath, envInfo: EnvInfoV3, tokenProvider: TokenProvider) => Promise<Result<Void, FxError>>;
|
|
94
|
-
/**
|
|
95
|
-
* questions to collect answers before deployment
|
|
96
|
-
*/
|
|
97
|
-
getQuestionsForDeploy?: (ctx: Context, inputs: Inputs, envInfo: DeepReadonly<EnvInfoV3>, tokenProvider: TokenProvider) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
98
|
-
/**
|
|
99
|
-
* deploy bits to the cloud
|
|
100
|
-
*/
|
|
101
|
-
deploy?: (ctx: Context, inputs: InputsWithProjectPath, envInfo: DeepReadonly<EnvInfoV3>, tokenProvider: TokenProvider) => Promise<Result<Void, FxError>>;
|
|
102
|
-
}
|
|
103
|
-
export declare type PluginV3 = AzureResourcePlugin;
|
|
104
12
|
//# sourceMappingURL=plugins.d.ts.map
|
|
@@ -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,OAA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soft/teamsfx-api",
|
|
3
|
-
"version": "0.22.2-alpha.
|
|
3
|
+
"version": "0.22.2-alpha.6d2819207.0",
|
|
4
4
|
"description": "teamsfx framework api",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
|
32
32
|
"@microsoft/api-documenter": "^7.15.3",
|
|
33
33
|
"@microsoft/api-extractor": "^7.18.4",
|
|
34
|
-
"@microsoft/eslint-plugin-teamsfx": "0.0.2-alpha.
|
|
34
|
+
"@microsoft/eslint-plugin-teamsfx": "0.0.2-alpha.6d2819207.0",
|
|
35
35
|
"@types/chai": "^4.2.14",
|
|
36
36
|
"@types/chai-as-promised": "^7.1.3",
|
|
37
37
|
"@types/chai-spies": "^1.0.3",
|
|
@@ -60,14 +60,14 @@
|
|
|
60
60
|
"typescript": "^4.2.3"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@azure/core-
|
|
64
|
-
"@microsoft/teams-manifest": "0.0.10-alpha.
|
|
63
|
+
"@azure/core-auth": "^1.4.0",
|
|
64
|
+
"@microsoft/teams-manifest": "0.0.10-alpha.6d2819207.0",
|
|
65
65
|
"axios": "^0.21.2",
|
|
66
66
|
"chai": "^4.3.4",
|
|
67
67
|
"jsonschema": "^1.4.0",
|
|
68
68
|
"neverthrow": "^3.2.0"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "09e7819bd704400f44a279687a6b9e0815878625",
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
package/build/plugin.d.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { Context, PluginContext } from "./context";
|
|
2
|
-
import { Result } from "neverthrow";
|
|
3
|
-
import { FxError } from "./error";
|
|
4
|
-
import { Stage } from "./constants";
|
|
5
|
-
import { Func, QTreeNode } from "./qm";
|
|
6
|
-
import { AzureSolutionSettings } from "./types";
|
|
7
|
-
/**
|
|
8
|
-
* Plugin.
|
|
9
|
-
*/
|
|
10
|
-
export interface Plugin {
|
|
11
|
-
name: string;
|
|
12
|
-
displayName: string;
|
|
13
|
-
/**
|
|
14
|
-
* resource plugin decide whether it need to be activated
|
|
15
|
-
* @param solutionSettings solution settings
|
|
16
|
-
*/
|
|
17
|
-
activate(solutionSettings: AzureSolutionSettings): boolean;
|
|
18
|
-
/**
|
|
19
|
-
* prerequisiteCheck will check the whether required software has been installed. e.g. dotnet runtime of a required version.
|
|
20
|
-
* If the check fails, please return a human read-able msg that tells what software is missing.
|
|
21
|
-
*/
|
|
22
|
-
prerequisiteCheck?: (ctx: Readonly<Context>) => Promise<Result<{
|
|
23
|
-
pass: true;
|
|
24
|
-
} | {
|
|
25
|
-
pass: false;
|
|
26
|
-
msg: string;
|
|
27
|
-
}, FxError>>;
|
|
28
|
-
/**
|
|
29
|
-
* user questions
|
|
30
|
-
*/
|
|
31
|
-
getQuestions?: (stage: Stage, ctx: PluginContext) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
32
|
-
/**
|
|
33
|
-
* func entry for dymanic question
|
|
34
|
-
*/
|
|
35
|
-
callFunc?: (func: Func, ctx: PluginContext) => Promise<Result<any, FxError>>;
|
|
36
|
-
/**
|
|
37
|
-
* for local debug
|
|
38
|
-
*/
|
|
39
|
-
localDebug?: (ctx: PluginContext) => Promise<Result<any, FxError>>;
|
|
40
|
-
postLocalDebug?: (ctx: PluginContext) => Promise<Result<any, FxError>>;
|
|
41
|
-
preProvision?: (ctx: PluginContext) => Promise<Result<any, FxError>>;
|
|
42
|
-
provision?: (ctx: PluginContext) => Promise<Result<any, FxError>>;
|
|
43
|
-
postProvision?: (ctx: PluginContext) => Promise<Result<any, FxError>>;
|
|
44
|
-
preScaffold?: (ctx: PluginContext) => Promise<Result<any, FxError>>;
|
|
45
|
-
scaffold?: (ctx: PluginContext) => Promise<Result<any, FxError>>;
|
|
46
|
-
postScaffold?: (ctx: PluginContext) => Promise<Result<any, FxError>>;
|
|
47
|
-
preDeploy?: (ctx: PluginContext) => Promise<Result<any, FxError>>;
|
|
48
|
-
deploy?: (ctx: PluginContext) => Promise<Result<any, FxError>>;
|
|
49
|
-
postDeploy?: (ctx: PluginContext) => Promise<Result<any, FxError>>;
|
|
50
|
-
generateArmTemplates?: (ctx: PluginContext) => Promise<Result<any, FxError>>;
|
|
51
|
-
updateArmTemplates?: (ctx: PluginContext) => Promise<Result<any, FxError>>;
|
|
52
|
-
/**
|
|
53
|
-
* publish
|
|
54
|
-
*/
|
|
55
|
-
publish?: (ctx: PluginContext) => Promise<Result<any, FxError>>;
|
|
56
|
-
/**
|
|
57
|
-
* user questions for user customized task
|
|
58
|
-
*/
|
|
59
|
-
getQuestionsForUserTask?: (func: Func, ctx: PluginContext) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
60
|
-
/**
|
|
61
|
-
* execute user customized task
|
|
62
|
-
*/
|
|
63
|
-
executeUserTask?: (func: Func, ctx: PluginContext) => Promise<Result<any, FxError>>;
|
|
64
|
-
/**
|
|
65
|
-
* For grant and check permission in remote collaboration
|
|
66
|
-
*/
|
|
67
|
-
grantPermission?: (ctx: PluginContext, userInfo: Record<string, any>) => Promise<Result<any, FxError>>;
|
|
68
|
-
checkPermission?: (ctx: PluginContext, userInfo: Record<string, any>) => Promise<Result<any, FxError>>;
|
|
69
|
-
listCollaborator?: (ctx: PluginContext, userInfo: Record<string, any>) => Promise<Result<any, FxError>>;
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=plugin.d.ts.map
|
package/build/plugin.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,YAA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AE3E;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IAEhE;;OAEG;IACH,uBAAuB,CAAC,EAAE,CACxB,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,aAAa,KACf,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;IACrD;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,aAAa,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IAEpF;;OAEG;IACH,eAAe,CAAC,EAAE,CAChB,GAAG,EAAE,aAAa,EAClB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC1B,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IAEnC,eAAe,CAAC,EAAE,CAChB,GAAG,EAAE,aAAa,EAClB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC1B,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IAEnC,gBAAgB,CAAC,EAAE,CACjB,GAAG,EAAE,aAAa,EAClB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC1B,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;CACpC"}
|
package/build/plugin.js
DELETED
package/build/plugin.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC"}
|
package/build/solution.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Result } from "neverthrow";
|
|
2
|
-
import { SolutionContext } from "./context";
|
|
3
|
-
import { FxError } from "./error";
|
|
4
|
-
import { Func, QTreeNode } from "./qm";
|
|
5
|
-
import { Stage } from "./constants";
|
|
6
|
-
export interface Solution {
|
|
7
|
-
name: string;
|
|
8
|
-
create: (ctx: SolutionContext) => Promise<Result<any, FxError>>;
|
|
9
|
-
scaffold: (ctx: SolutionContext) => Promise<Result<any, FxError>>;
|
|
10
|
-
provision: (ctx: SolutionContext) => Promise<Result<any, FxError>>;
|
|
11
|
-
deploy: (ctx: SolutionContext) => Promise<Result<any, FxError>>;
|
|
12
|
-
publish: (ctx: SolutionContext) => Promise<Result<any, FxError>>;
|
|
13
|
-
localDebug: (ctx: SolutionContext) => Promise<Result<any, FxError>>;
|
|
14
|
-
getQuestions: (task: Stage, ctx: SolutionContext) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
15
|
-
getQuestionsForUserTask?: (func: Func, ctx: SolutionContext) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
16
|
-
executeUserTask?: (func: Func, ctx: SolutionContext) => Promise<Result<any, FxError>>;
|
|
17
|
-
/**
|
|
18
|
-
* For grant and check permission in remote collaboration
|
|
19
|
-
*/
|
|
20
|
-
grantPermission?: (ctx: SolutionContext) => Promise<Result<any, FxError>>;
|
|
21
|
-
checkPermission?: (ctx: SolutionContext) => Promise<Result<any, FxError>>;
|
|
22
|
-
listCollaborator?: (ctx: SolutionContext) => Promise<Result<any, FxError>>;
|
|
23
|
-
/**
|
|
24
|
-
* for env management
|
|
25
|
-
*/
|
|
26
|
-
createEnv?: (ctx: SolutionContext) => Promise<Result<any, FxError>>;
|
|
27
|
-
activateEnv?: (ctx: SolutionContext) => Promise<Result<any, FxError>>;
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=solution.d.ts.map
|
package/build/solution.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"solution.d.ts","sourceRoot":"","sources":["../src/solution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,SAAS,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;IAErD,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,eAAe,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IAEtF;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IAE1E,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IAE1E,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IAE3E;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IACpE,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;CACvE"}
|
package/build/solution.js
DELETED
package/build/solution.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"solution.js","sourceRoot":"","sources":["../src/solution.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC"}
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import { Result } from "neverthrow";
|
|
2
|
-
import { FxError } from "../error";
|
|
3
|
-
import { Func, QTreeNode } from "../qm/question";
|
|
4
|
-
import { ProjectSettings, Inputs, Json, Void } from "../types";
|
|
5
|
-
import { M365TokenProvider, TokenProvider } from "../utils";
|
|
6
|
-
import { Context, DeepReadonly, DeploymentInputs, EnvInfoV2, InputsWithProjectPath, ProvisionInputs } from "./types";
|
|
7
|
-
export declare type ResourceTemplate = BicepTemplate | JsonTemplate;
|
|
8
|
-
export declare type JsonTemplate = {
|
|
9
|
-
kind: "json";
|
|
10
|
-
template: Json;
|
|
11
|
-
};
|
|
12
|
-
export declare type BicepTemplate = {
|
|
13
|
-
kind: "bicep";
|
|
14
|
-
template: Record<string, unknown>;
|
|
15
|
-
};
|
|
16
|
-
export declare type ResourceProvisionOutput = {
|
|
17
|
-
output: Json;
|
|
18
|
-
secrets: Json;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Interface for ResourcePlugins. a ResourcePlugin can hook into Toolkit's
|
|
22
|
-
* lifecycles by implementing the corresponding API.
|
|
23
|
-
* Implementation of all lifecycles is expected to be idempotent. The return values
|
|
24
|
-
* and observable side effects of each lifecycle are expected to be the same with the same input.
|
|
25
|
-
*
|
|
26
|
-
* All lifecycles follow the same pattern of returning a Promise<Result<T, FxError>>.
|
|
27
|
-
* Please return {@link UserError} or {@link SystemError} when error happens
|
|
28
|
-
* instead of throwing.
|
|
29
|
-
*/
|
|
30
|
-
export interface ResourcePlugin {
|
|
31
|
-
name: string;
|
|
32
|
-
displayName: string;
|
|
33
|
-
/**
|
|
34
|
-
* A resource plugin can decide whether it needs to be activated when the Toolkit initializes
|
|
35
|
-
* based on project settings.
|
|
36
|
-
*
|
|
37
|
-
* @param projectSettings project settings
|
|
38
|
-
*
|
|
39
|
-
* @returns whether to be activated
|
|
40
|
-
*/
|
|
41
|
-
activate(projectSettings: ProjectSettings): boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Called by Toolkit when creating a new project or adding a new resource.
|
|
44
|
-
* A resource plugin is expected to scaffold source code or files on disk, relative to context.projectPath.
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* ```
|
|
48
|
-
* scaffoldSourceCode(ctx: Context, inputs: Inputs) {
|
|
49
|
-
* const fs = require("fs-extra");
|
|
50
|
-
* let content = "let x = 1;"
|
|
51
|
-
* let path = path.join(ctx.projectPath, "myFolder");
|
|
52
|
-
* let sourcePath = "somePathhere";
|
|
53
|
-
* let result = await fs.copy(sourcePath, content);
|
|
54
|
-
* return ok(Void);
|
|
55
|
-
* }
|
|
56
|
-
* ```
|
|
57
|
-
*
|
|
58
|
-
* @param {Context} ctx - plugin's runtime context shared by all lifecycles.
|
|
59
|
-
* @param {Inputs} inputs - User answers to questions defined in {@link getQuestionsForScaffolding} along with some system inputs.
|
|
60
|
-
*
|
|
61
|
-
* @returns Void because side effect is expected.
|
|
62
|
-
*/
|
|
63
|
-
scaffoldSourceCode?: (ctx: Context, inputs: Inputs) => Promise<Result<Void, FxError>>;
|
|
64
|
-
/**
|
|
65
|
-
* This method is called when creating a new project or adding a new resource.
|
|
66
|
-
* A resource plugin is expected to return a resource template(e.g. Bicep templates/plain JSON) which will be persisted
|
|
67
|
-
* by the Toolkit and will be used to provision resource when Provision command is called.
|
|
68
|
-
*
|
|
69
|
-
* @param {Context} ctx - plugin's runtime context shared by all lifecycles.
|
|
70
|
-
* @param {Inputs} inputs - User's answers to questions defined in {@link getQuestionsForScaffolding} along with some system inputs.
|
|
71
|
-
*
|
|
72
|
-
* @return {@link ResourceTemplate} return ARM template for solution to combine.
|
|
73
|
-
*/
|
|
74
|
-
generateResourceTemplate?: (ctx: Context, inputs: Inputs & {
|
|
75
|
-
existingResources: string[];
|
|
76
|
-
}) => Promise<Result<ResourceTemplate, FxError>>;
|
|
77
|
-
updateResourceTemplate?: (ctx: Context, inputs: Inputs & {
|
|
78
|
-
existingResources: string[];
|
|
79
|
-
}) => Promise<Result<ResourceTemplate, FxError>>;
|
|
80
|
-
/**
|
|
81
|
-
* provisionResource() runs before ARM/Bicep provision when Provision command is called.
|
|
82
|
-
* There are two reasons why a resource needs to implement this method:
|
|
83
|
-
* 1) to generate input for ARM/Bicep provision to consume.
|
|
84
|
-
* 2) the resource can't be provisioned using resource templates like ARM/Bicep.
|
|
85
|
-
* Two typical resources that need to implement this method are AAD(Azure Active Directory)
|
|
86
|
-
* and AppSudio, which statisfy both above criteria.
|
|
87
|
-
*
|
|
88
|
-
* A plugin can get access tokens to cloud service using TokenProvider.
|
|
89
|
-
*
|
|
90
|
-
* @param {Context} ctx - plugin's runtime context shared by all lifecycles.
|
|
91
|
-
* @param {ProvisionInputs} inputs - inputs injected by Toolkit runtime and solution.
|
|
92
|
-
* @param {EnvInfoV2} envInfo - a reference of environment info modeled after (config|state).${env}.json
|
|
93
|
-
* @param {TokenProvider} tokenProvider - Tokens for Azure and AppStudio
|
|
94
|
-
* @returns Void because side effect is expected.
|
|
95
|
-
*/
|
|
96
|
-
provisionResource?: (ctx: Context, inputs: ProvisionInputs, envInfo: EnvInfoV2, tokenProvider: TokenProvider) => Promise<Result<Void, FxError>>;
|
|
97
|
-
/**
|
|
98
|
-
* configureResource() is guaranteed to run after Bicep/ARM provision.
|
|
99
|
-
* Plugins are expected to read the provision output of other plugins via envInfo's state,
|
|
100
|
-
* and return a new copy of its own provision output possibly with added and modified fields.
|
|
101
|
-
*
|
|
102
|
-
* Plugins can also sync their settings to the clould using access tokens provided by TokenProvider
|
|
103
|
-
*
|
|
104
|
-
* @param {Context} ctx - plugin's runtime context shared by all lifecycles.
|
|
105
|
-
* @param {ProvisionInputs} inputs - inputs injected by Toolkit runtime and solution.
|
|
106
|
-
* @param {EnvInfoV2} envInfo - a reference of environment info modeled after (config|state).${env}.json
|
|
107
|
-
* @param {TokenProvider} tokenProvider - Tokens for Azure and AppStudio
|
|
108
|
-
* @returns Void because side effect is expected.
|
|
109
|
-
*/
|
|
110
|
-
configureResource?: (ctx: Context, inputs: ProvisionInputs, envInfo: EnvInfoV2, tokenProvider: TokenProvider) => Promise<Result<Void, FxError>>;
|
|
111
|
-
/**
|
|
112
|
-
* Depends on the provision output values returned by {@link provisionResource}, ARM/Bicep provision
|
|
113
|
-
* and {@link configureResource}.
|
|
114
|
-
* Plugins are expected to deploy code to cloud using access tokens provided by {@link TokenProvider}.
|
|
115
|
-
*
|
|
116
|
-
* @param {Context} ctx - plugin's runtime context shared by all lifecycles.
|
|
117
|
-
* @param {DeploymentInputs} inputs - inputs injected by Toolkit runtime and solution.
|
|
118
|
-
* @param {DeepReadonly<EnvInfoV2>} envInfo - a readonly view of environment info modeled after (config|state).${env}.json
|
|
119
|
-
* @param {TokenProvider} tokenProvider - Token provider for Azure, AppStudio and m365
|
|
120
|
-
* @returns Void because side effect is expected.
|
|
121
|
-
*/
|
|
122
|
-
deploy?: (ctx: Context, inputs: DeploymentInputs, envInfo: DeepReadonly<EnvInfoV2>, tokenProvider: TokenProvider) => Promise<Result<Void, FxError>>;
|
|
123
|
-
/**
|
|
124
|
-
* Depends on the output of {@link package}. Uploads Teams package to AppStudio
|
|
125
|
-
* @param {Context} ctx - plugin's runtime context shared by all lifecycles.
|
|
126
|
-
* @param {Inputs} inputs - system inputs.
|
|
127
|
-
* @param {DeepReadonly<EnvInfoV2>} envInfo - a readonly view of environment info modeled after (config|state).${env}.json
|
|
128
|
-
* @param {M365TokenProvider} tokenProvider - Token for M365
|
|
129
|
-
*
|
|
130
|
-
* @returns Void because side effect is expected.
|
|
131
|
-
*/
|
|
132
|
-
publishApplication?: (ctx: Context, inputs: Inputs, envInfo: DeepReadonly<EnvInfoV2>, tokenProvider: M365TokenProvider) => Promise<Result<Void, FxError>>;
|
|
133
|
-
/**
|
|
134
|
-
* provisionLocalResource is a special lifecycle, called when users press F5 in vscode.
|
|
135
|
-
* It works like provision, but only creates necessary cloud resources for local debugging like AAD and AppStudio App.
|
|
136
|
-
*
|
|
137
|
-
* @param {Context} ctx - plugin's runtime context shared by all lifecycles.
|
|
138
|
-
* @param {Inputs} inputs - system inputs.
|
|
139
|
-
* @param {Json} localSettings - local debug settings generated by {@link provisionLocalResource}
|
|
140
|
-
* @param {TokenProvider} tokenProvider - Tokens for Azure and AppStudio
|
|
141
|
-
* @param {EnvInfoV2} envInfo - a reference of environment info modeled after (config|state).${env}.json
|
|
142
|
-
*
|
|
143
|
-
* @returns Void because side effect is expected.
|
|
144
|
-
*/
|
|
145
|
-
provisionLocalResource?: (ctx: Context, inputs: Inputs, localSettings: Json, tokenProvider: TokenProvider, envInfo?: EnvInfoV2) => Promise<Result<Void, FxError>>;
|
|
146
|
-
/**
|
|
147
|
-
* configureLocalResource works like {@link configureResource} but only for local debugging resources.
|
|
148
|
-
* Plugins are expected to read the local provision output values of other plugins, and modify in-place
|
|
149
|
-
*
|
|
150
|
-
* @param {Context} ctx - plugin's runtime context shared by all lifecycles.
|
|
151
|
-
* @param {Json} localSettings - local debug settings generated by {@link scaffoldSourceCode}
|
|
152
|
-
* @param {TokenProvider} tokenProvider - Tokens for Azure and AppStudio
|
|
153
|
-
* @param {EnvInfoV2} envInfo - a reference of environment info modeled after (config|state).${env}.json
|
|
154
|
-
*
|
|
155
|
-
* @returns Void because side effect is expected.
|
|
156
|
-
*/
|
|
157
|
-
configureLocalResource?: (ctx: Context, inputs: Inputs, localSettings: Json, tokenProvider: TokenProvider, envInfo?: EnvInfoV2) => Promise<Result<Void, FxError>>;
|
|
158
|
-
/**
|
|
159
|
-
* Plugins that need to collect user input are expected to implement this method.
|
|
160
|
-
* Questions are organized as a tree. Please see {@link QTreeNode}.
|
|
161
|
-
*
|
|
162
|
-
* getQuestionsForScaffolding() is guaranteed to be called before scaffoldSourceCode().
|
|
163
|
-
*
|
|
164
|
-
* @param {Context} ctx - plugin's runtime context shared by all lifecycles.
|
|
165
|
-
* @param {Inputs} inputs - system inputs.
|
|
166
|
-
*
|
|
167
|
-
* @returns question tree.
|
|
168
|
-
*/
|
|
169
|
-
getQuestionsForScaffolding?: (ctx: Context, inputs: Inputs) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
170
|
-
executeUserTask?: (ctx: Context, inputs: Inputs, func: Func, localSettings: Json, envInfo: EnvInfoV2, tokenProvider: TokenProvider) => Promise<Result<unknown, FxError>>;
|
|
171
|
-
getQuestions?: (ctx: Context, inputs: Inputs, envInfo: DeepReadonly<EnvInfoV2>, tokenProvider: TokenProvider) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
172
|
-
getQuestionsForUserTask?: (ctx: Context, inputs: Inputs, func: Func, envInfo: DeepReadonly<EnvInfoV2>, tokenProvider: TokenProvider) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
173
|
-
/**
|
|
174
|
-
* For grant and check permission in remote collaboration
|
|
175
|
-
*/
|
|
176
|
-
grantPermission?: (ctx: Context, inputs: InputsWithProjectPath, envInfo: DeepReadonly<EnvInfoV2>, tokenProvider: TokenProvider, userInfo: Json) => Promise<Result<Json, FxError>>;
|
|
177
|
-
checkPermission?: (ctx: Context, inputs: InputsWithProjectPath, envInfo: DeepReadonly<EnvInfoV2>, tokenProvider: TokenProvider, userInfo: Json) => Promise<Result<Json, FxError>>;
|
|
178
|
-
listCollaborator?: (ctx: Context, inputs: InputsWithProjectPath, envInfo: DeepReadonly<EnvInfoV2>, tokenProvider: TokenProvider, userInfo: Json) => Promise<Result<Json, FxError>>;
|
|
179
|
-
}
|
|
180
|
-
//# sourceMappingURL=resourcePlugin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resourcePlugin.d.ts","sourceRoot":"","sources":["../../src/v2/resourcePlugin.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,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EACL,OAAO,EACP,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,qBAAqB,EACrB,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB,oBAAY,gB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