@microsoft/teamsfx-api 0.20.3-alpha.0c8479eb2.0 → 0.20.3-alpha.1bdc33843.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/action.d.ts +18 -4
- package/build/action.d.ts.map +1 -1
- package/package.json +3 -3
package/build/action.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Result } from "neverthrow";
|
|
2
2
|
import { Bicep } from "./bicep";
|
|
3
3
|
import { FxError } from "./error";
|
|
4
|
+
import { IProgressHandler } from "./qm";
|
|
4
5
|
import { QTreeNode } from "./qm/question";
|
|
5
6
|
import { Json, ContextV3, MaybePromise } from "./types";
|
|
6
7
|
import { InputsWithProjectPath } from "./v2/types";
|
|
@@ -19,9 +20,9 @@ export interface ActionBase {
|
|
|
19
20
|
inputs?: Json;
|
|
20
21
|
plan?: (context: ContextV3, inputs: InputsWithProjectPath) => MaybePromise<Result<Effect[], FxError>>;
|
|
21
22
|
question?: (context: ContextV3, inputs: InputsWithProjectPath) => MaybePromise<Result<QTreeNode | undefined, FxError>>;
|
|
22
|
-
pre?: (context: ContextV3, inputs: InputsWithProjectPath) => MaybePromise<Result<
|
|
23
|
-
post?: (context: ContextV3, inputs: InputsWithProjectPath) => MaybePromise<Result<
|
|
24
|
-
exception?: (context: ContextV3, inputs: InputsWithProjectPath) => MaybePromise<Result<
|
|
23
|
+
pre?: (context: ContextV3, inputs: InputsWithProjectPath) => MaybePromise<Result<undefined, FxError>>;
|
|
24
|
+
post?: (context: ContextV3, inputs: InputsWithProjectPath) => MaybePromise<Result<undefined, FxError>>;
|
|
25
|
+
exception?: (context: ContextV3, inputs: InputsWithProjectPath) => MaybePromise<Result<undefined, FxError>>;
|
|
25
26
|
}
|
|
26
27
|
export declare type Action = GroupAction | ShellAction | CallAction | FunctionAction;
|
|
27
28
|
/**
|
|
@@ -55,15 +56,28 @@ export interface CallAction extends ActionBase {
|
|
|
55
56
|
required: boolean;
|
|
56
57
|
targetAction: string;
|
|
57
58
|
}
|
|
59
|
+
export declare type ErrorHandler = (error: any, telemetryProps: Record<string, string>) => FxError;
|
|
58
60
|
/**
|
|
59
61
|
* function action: run a javascript function call that can do any kinds of work
|
|
60
62
|
*/
|
|
61
63
|
export interface FunctionAction extends ActionBase {
|
|
64
|
+
name: string;
|
|
62
65
|
type: "function";
|
|
66
|
+
errorSource?: string;
|
|
67
|
+
errorHelpLink?: string;
|
|
68
|
+
errorIssueLink?: string;
|
|
69
|
+
errorHandler?: ErrorHandler;
|
|
70
|
+
enableTelemetry?: boolean;
|
|
71
|
+
telemetryComponentName?: string;
|
|
72
|
+
telemetryEventName?: string;
|
|
73
|
+
telemetryProps?: Record<string, string>;
|
|
74
|
+
enableProgressBar?: boolean;
|
|
75
|
+
progressTitle?: string;
|
|
76
|
+
progressSteps?: number;
|
|
63
77
|
/**
|
|
64
78
|
* function body is a function that takes some context and inputs as parameter
|
|
65
79
|
*/
|
|
66
|
-
execute: (context: ContextV3, inputs: InputsWithProjectPath) => MaybePromise<Result<Effect[], FxError>>;
|
|
80
|
+
execute: (context: ContextV3, inputs: InputsWithProjectPath, progress?: IProgressHandler, telemetryProps?: Record<string, string>) => MaybePromise<Result<Effect[], FxError>>;
|
|
67
81
|
}
|
|
68
82
|
/**
|
|
69
83
|
* create: create a new file if it does not exist; skip if it already exists
|
package/build/action.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../src/action.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CA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QAAQ,GACR,YAAY,GACZ,aAAa,CAAC;AAElB,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B,OAAO,EAAE,aAAa,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,oBAAY,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,iBAAiB,GAAG,KAAK,GAAG,WAAW,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/teamsfx-api",
|
|
3
|
-
"version": "0.20.3-alpha.
|
|
3
|
+
"version": "0.20.3-alpha.1bdc33843.0",
|
|
4
4
|
"description": "teamsfx framework api",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -60,14 +60,14 @@
|
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@azure/core-http": "^1.2.2",
|
|
62
62
|
"@azure/ms-rest-nodeauth": "^3.1.1",
|
|
63
|
-
"@microsoft/teams-manifest": "0.0.
|
|
63
|
+
"@microsoft/teams-manifest": "^0.0.5",
|
|
64
64
|
"@types/fs-extra": "^9.0.10",
|
|
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": "2328ff22895ffb76796883d63ab260b6b86571b3",
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|