Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/teamsfx-api

Package Overview
Dependencies
Maintainers
3
Versions
1326
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/teamsfx-api - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0-alpha.0

2

build/config.d.ts
import { OptionItem } from "./qm";
import { Platform, VsCodeEnv } from "./constants";
import { AnswerValue } from "./qm";
export declare type ConfigValue = string | string[] | number | number[] | boolean | boolean[] | OptionItem[] | OptionItem | undefined | unknown;
export declare type ConfigValue = string | string[] | number | number[] | boolean | boolean[] | OptionItem[] | OptionItem | undefined | any;
export declare type PluginIdentity = string;

@@ -6,0 +6,0 @@ export declare type PluginConfig = ConfigMap;

@@ -6,2 +6,3 @@ import { ConfigMap, PluginConfig, ProjectSettings, ReadonlySolutionConfig, SolutionConfig } from "./config";

import { Platform } from "./constants";
import { UserInteraction } from "./qm";
export interface Context {

@@ -19,2 +20,3 @@ root: string;

projectSettings?: ProjectSettings;
ui?: UserInteraction;
}

@@ -21,0 +23,0 @@ export interface SolutionContext extends Context {

import { LogProvider, TelemetryReporter, AzureAccountProvider, GraphTokenProvider, AppStudioTokenProvider, Dialog, TreeProvider } from "./utils";
import { Result } from "neverthrow";
import { ConfigMap } from "./config";
import { Func, QTreeNode } from "./qm";
import { Func, QTreeNode, UserInteraction } from "./qm";
import { Platform, Stage } from "./constants";

@@ -19,3 +19,3 @@ import { FxError } from "./error";

*/
withDialog: (dialog: Dialog) => Promise<Result<null, FxError>>;
withDialog: (dialog: Dialog, ui?: UserInteraction) => Promise<Result<null, FxError>>;
/**

@@ -22,0 +22,0 @@ * withLogger

@@ -105,2 +105,3 @@ export interface FxError extends Error {

export declare function returnSystemError(e: Error, source: string, name: string, issueLink?: string, innerError?: any): SystemError;
export declare const UserCancelError: UserError;
//# sourceMappingURL=error.d.ts.map

@@ -5,3 +5,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.returnSystemError = exports.returnUserError = exports.SystemError = exports.UserError = void 0;
exports.UserCancelError = exports.returnSystemError = exports.returnUserError = exports.SystemError = exports.UserError = void 0;
/**

@@ -77,2 +77,3 @@ * Users can recover by themselves, e.g., users input invalid app names.

exports.returnSystemError = returnSystemError;
exports.UserCancelError = new UserError("UserCancel", "UserCancel", "UI");
//# sourceMappingURL=error.js.map

@@ -19,3 +19,3 @@ import { ConfigMap } from "../config";

}
export declare type AnswerValue = string | string[] | number | OptionItem | OptionItem[] | undefined | unknown;
export declare type AnswerValue = string | string[] | number | OptionItem | OptionItem[] | undefined | any;
export declare type KnownAnswerValue = string | string[] | number | OptionItem | OptionItem[] | undefined;

@@ -232,3 +232,3 @@ export interface FunctionRouter {

*/
onDidChangeSelection?: (currentSelectedItems: OptionItem[], previousSelectedItems: OptionItem[]) => Promise<string[]>;
onDidChangeSelection?: (currentSelectedIds: Set<string>, previousSelectedIds: Set<string>) => Promise<Set<string>>;
validation?: StringArrayValidation | RemoteFuncValidation | LocalFuncValidation;

@@ -235,0 +235,0 @@ }

@@ -0,121 +1,97 @@

import { Result } from "neverthrow";
import { FxError } from "../error";
import { AnswerValue, OptionItem, StaticOption } from "./question";
export interface FxQuickPickOption {
/**
* title text of the QuickPick
*/
import { OptionItem, StaticOption } from "../qm/question";
export interface UIConfig<T> {
type: "radio" | "multibox" | "text" | "file" | "files" | "folder";
name: string;
title: string;
/**
* select option list
*/
items: StaticOption;
/**
* whether is multiple select or single select
*/
canSelectMany: boolean;
/**
* The default selected `id` (for single select) or `id` array (for multiple select)
*/
defaultValue?: string | string[];
/**
* placeholder text
*/
placeholder?: string;
prompt?: string;
/**
* whether enable `go back` button
*/
backButton?: boolean;
/**
* whether the answer return the original `OptionItem` object array.
* if true: the answer is the original `OptionItem` object array;
* if false: the answer is the `id` array of the `OptionItem`
* The default value is false
*/
returnObject?: boolean;
/**
* a callback function when the select changes
* @items: current selected `OptionItem` array
* @returns: the new selected `id` array
*/
onDidChangeSelection?: (currentSelectedItems: OptionItem[], previousSelectedItems: OptionItem[]) => Promise<string[]>;
validation?: (input: string | string[]) => Promise<string | undefined>;
step?: number;
totalSteps?: number;
default?: T;
validation?: (input: T) => string | undefined | Promise<string | undefined>;
}
export interface FxInputBoxOption {
title: string;
password: boolean;
defaultValue?: string;
placeholder?: string;
prompt?: string;
validation?: (input: string) => Promise<string | undefined>;
backButton?: boolean;
number?: boolean;
step?: number;
totalSteps?: number;
export interface SingleSelectConfig extends UIConfig<string> {
type: "radio";
options: StaticOption;
returnObject?: boolean;
}
export interface FxOpenDialogOption {
/**
* The resource the dialog shows when opened.
*/
defaultUri?: string;
/**
* A human-readable string for the open button.
*/
openLabel?: string;
/**
* Allow to select files, defaults to `true`.
*/
canSelectFiles?: boolean;
/**
* Allow to select folders, defaults to `false`.
*/
canSelectFolders?: boolean;
/**
* Allow to select many files or folders.
*/
canSelectMany?: boolean;
/**
* A set of file filters that are used by the dialog. Each entry is a human-readable label,
* like "TypeScript", and an array of extensions, e.g.
* ```ts
* {
* 'Images': ['png', 'jpg']
* 'TypeScript': ['ts', 'tsx']
* }
* ```
*/
filters?: {
[name: string]: string[];
};
/**
* Dialog title.
*
* This parameter might be ignored, as not all operating systems display a title on open dialogs
* (for example, macOS).
*/
title?: string;
validation?: (input: string) => Promise<string | undefined>;
backButton?: boolean;
step?: number;
totalSteps?: number;
export interface MultiSelectConfig extends UIConfig<string[]> {
type: "multibox";
options: StaticOption;
returnObject?: boolean;
onDidChangeSelection?: (currentSelectedIds: Set<string>, previousSelectedIds: Set<string>) => Promise<Set<string>>;
}
export declare enum InputResultType {
cancel = "cancel",
back = "back",
sucess = "sucess",
error = "error",
pass = "pass"
export interface InputTextConfig extends UIConfig<string> {
type: "text";
password?: boolean;
}
export interface InputResult {
type: InputResultType;
result?: AnswerValue;
export interface SelectFileConfig extends UIConfig<string> {
type: "file";
}
export interface SelectFilesConfig extends UIConfig<string[]> {
type: "files";
}
export interface SelectFolderConfig extends UIConfig<string> {
type: "folder";
}
export interface InputResult<T> {
type: "success" | "skip" | "cancel" | "back" | "error";
result?: T;
error?: FxError;
}
export interface UserInterface {
showQuickPick: (option: FxQuickPickOption) => Promise<InputResult>;
showInputBox: (option: FxInputBoxOption) => Promise<InputResult>;
showOpenDialog: (option: FxOpenDialogOption) => Promise<InputResult>;
export declare type SingleSelectResult = InputResult<string | OptionItem>;
export declare type MultiSelectResult = InputResult<StaticOption>;
export declare type InputTextResult = InputResult<string>;
export declare type SelectFileResult = InputResult<string>;
export declare type SelectFilesResult = InputResult<string[]>;
export declare type SelectFolderResult = InputResult<string>;
export declare type OpenUrlResult = InputResult<boolean>;
export declare type ShowMessageResult = InputResult<string | undefined>;
export declare type RunWithProgressResult = InputResult<any>;
export interface TimeConsumingTask<T> {
name: string;
cancelable: boolean;
total: number;
current: number;
message: string;
isCanceled: boolean;
run(...args: any): Promise<T>;
cancel(): void;
}
export interface UserInteraction {
selectOption: (config: SingleSelectConfig) => Promise<SingleSelectResult>;
selectOptions: (config: MultiSelectConfig) => Promise<MultiSelectResult>;
inputText: (config: InputTextConfig) => Promise<InputTextResult>;
selectFile: (config: SelectFileConfig) => Promise<SelectFileResult>;
selectFiles: (config: SelectFilesConfig) => Promise<SelectFilesResult>;
selectFolder: (config: SelectFolderConfig) => Promise<SelectFolderResult>;
openUrl(link: string): Promise<OpenUrlResult>;
showMessage(level: "info" | "warn" | "error", message: string, modal: boolean, ...items: string[]): Promise<ShowMessageResult>;
runWithProgress(task: TimeConsumingTask<any>): Promise<RunWithProgressResult>;
}
export interface FunctionGroupTaskConfig<T> {
name: string;
tasks: (() => Promise<Result<T, Error>>)[];
taskNames?: string[];
cancelable: boolean;
concurrent: boolean;
fastFail: boolean;
}
export declare class FunctionGroupTask<T> implements TimeConsumingTask<Result<Result<T, Error>[], Error>> {
name: string;
current: number;
total: number;
message: string;
isCanceled: boolean;
concurrent: boolean;
cancelable: boolean;
fastFail: boolean;
tasks: (() => Promise<Result<T, Error>>)[];
taskNames?: string[];
constructor(config: FunctionGroupTaskConfig<T>);
run(): Promise<Result<Result<T, Error>[], Error>>;
cancel(): void;
}
//# sourceMappingURL=ui.d.ts.map

@@ -5,11 +5,88 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.InputResultType = void 0;
var InputResultType;
(function (InputResultType) {
InputResultType["cancel"] = "cancel";
InputResultType["back"] = "back";
InputResultType["sucess"] = "sucess";
InputResultType["error"] = "error";
InputResultType["pass"] = "pass"; // for single select option quick pass it
})(InputResultType = exports.InputResultType || (exports.InputResultType = {}));
exports.FunctionGroupTask = void 0;
const neverthrow_1 = require("neverthrow");
const error_1 = require("../error");
;
;
;
class FunctionGroupTask {
constructor(config) {
this.current = 0;
this.total = 0;
this.message = "";
this.isCanceled = false;
this.concurrent = true;
this.cancelable = true;
this.fastFail = false;
this.name = config.name;
this.tasks = config.tasks;
this.taskNames = config.taskNames;
this.cancelable = config.cancelable;
this.concurrent = config.concurrent;
this.fastFail = config.fastFail;
this.total = this.tasks.length;
}
async run() {
if (this.total === 0)
return neverthrow_1.ok([]);
return new Promise(async (resolve) => {
let results = [];
if (!this.concurrent) {
for (let i = 0; i < this.total; ++i) {
if (this.isCanceled === true) {
resolve(neverthrow_1.err(error_1.UserCancelError));
return;
}
const task = this.tasks[i];
if (this.taskNames) {
this.message = this.taskNames[i];
}
try {
let taskRes = await task();
if (taskRes.isErr() && this.fastFail) {
this.isCanceled = true;
resolve(neverthrow_1.err(taskRes.error));
return;
}
results.push(taskRes);
}
catch (e) {
if (this.fastFail) {
this.isCanceled = true;
resolve(neverthrow_1.err(e));
return;
}
results.push(neverthrow_1.err(e));
}
this.current = i + 1;
}
}
else {
let promiseResults = this.tasks.map((t) => t());
promiseResults.forEach((p) => {
p.then((v) => {
this.current++;
if (v.isErr() && this.fastFail) {
this.isCanceled = true;
resolve(neverthrow_1.err(v.error));
}
}).catch((e) => {
this.current++;
if (this.fastFail) {
this.isCanceled = true;
resolve(neverthrow_1.err(e));
}
});
});
results = await Promise.all(promiseResults);
}
resolve(neverthrow_1.ok(results));
});
}
cancel() {
if (this.cancelable)
this.isCanceled = true;
}
}
exports.FunctionGroupTask = FunctionGroupTask;
//# sourceMappingURL=ui.js.map

@@ -5,5 +5,5 @@ import { Validation, Func } from "./question";

import { ConfigMap } from "../config";
export declare type RemoteFuncExecutor = (func: Func, answers: ConfigMap) => Promise<Result<unknown, FxError>>;
export declare type RemoteFuncExecutor = (func: Func, answers: ConfigMap) => Promise<Result<any, FxError>>;
export declare function getValidationFunction(validation: Validation, outputs: ConfigMap, remoteFuncValidator?: RemoteFuncExecutor): (input: string | string[]) => Promise<string | undefined>;
export declare function validate(validation: Validation, valueToValidate: string | string[], inputs: ConfigMap, remoteFuncValidator?: RemoteFuncExecutor): Promise<string | undefined>;
//# sourceMappingURL=validation.d.ts.map

@@ -1,5 +0,5 @@

import { QTreeNode, Question, SingleSelectQuestion, StaticOption, MultiSelectQuestion, DynamicValue, AnswerValue } from "./question";
import { QTreeNode, Question, SingleSelectQuestion, StaticOption, OptionItem, MultiSelectQuestion, DynamicValue, AnswerValue } from "./question";
import { RemoteFuncExecutor } from "./validation";
import { ConfigMap } from "../config";
import { InputResult, UserInterface } from "./ui";
import { InputResult, UserInteraction } from "./ui";
export declare function isAutoSkipSelect(q: Question): boolean;

@@ -12,3 +12,3 @@ export declare function loadOptions(q: Question, inputs: ConfigMap, remoteFuncExecutor?: RemoteFuncExecutor): Promise<{

export declare function getCallFuncValue(inputs: ConfigMap, throwError: boolean, raw?: string | string[] | number | DynamicValue<AnswerValue>, remoteFuncExecutor?: RemoteFuncExecutor): Promise<unknown>;
export declare function traverse(root: QTreeNode, inputs: ConfigMap, ui: UserInterface, remoteFuncExecutor?: RemoteFuncExecutor): Promise<InputResult>;
export declare function traverse(root: QTreeNode, inputs: ConfigMap, ui: UserInteraction, remoteFuncExecutor?: RemoteFuncExecutor): Promise<InputResult<string | OptionItem | StaticOption>>;
//# sourceMappingURL=visitor.d.ts.map

@@ -8,4 +8,2 @@ "use strict";

const validation_1 = require("./validation");
const config_1 = require("../config");
const ui_1 = require("./ui");
const error_1 = require("../error");

@@ -109,3 +107,6 @@ async function getRealValue(parentValue, defaultValue, inputs, remoteFuncExecutor) {

*/
const questionVisitor = async function (question, parentValue, ui, backButton, inputs, remoteFuncExecutor, step, totalSteps) {
const questionVisitor = async function (question, parentValue, ui, inputs, remoteFuncExecutor, step, totalSteps) {
if (inputs.get(question.name) !== undefined) {
return { type: "success", result: inputs.get(question.name) };
}
//FunctionCallQuestion

@@ -116,6 +117,6 @@ if (question.type === question_1.NodeType.func) {

if (res.isOk()) {
return { type: ui_1.InputResultType.sucess, result: res.value };
return { type: "success", result: res.value };
}
else {
return { type: ui_1.InputResultType.error, error: res.error };
return { type: "error", error: res.error };
}

@@ -126,3 +127,3 @@ }

const res = await question.func(inputs);
return { type: ui_1.InputResultType.sucess, result: res };
return { type: "success", result: res };
}

@@ -143,13 +144,13 @@ else {

const prompt = (await getCallFuncValue(inputs, false, inputQuestion.prompt, remoteFuncExecutor));
return await ui.showInputBox({
return await ui.inputText({
type: "text",
name: question.name,
title: title,
password: !!(question.type === question_1.NodeType.password),
defaultValue: defaultValue,
default: defaultValue,
placeholder: placeholder,
prompt: prompt,
validation: validationFunc,
backButton: backButton,
number: !!(question.type === question_1.NodeType.number),
// step: step,
// totalSteps: totalSteps
step: step,
totalSteps: totalSteps,
});

@@ -162,3 +163,3 @@ }

return {
type: ui_1.InputResultType.error,
type: "error",
error: error_1.returnSystemError(new Error("Select option is empty!"), "API", "EmptySelectOption"),

@@ -171,3 +172,3 @@ };

return {
type: ui_1.InputResultType.pass,
type: "skip",
result: returnResult,

@@ -182,16 +183,32 @@ };

const prompt = (await getCallFuncValue(inputs, false, mq.prompt, remoteFuncExecutor));
return await ui.showQuickPick({
title: title,
items: res.options,
canSelectMany: !!(question.type === question_1.NodeType.multiSelect),
returnObject: selectQuestion.returnObject,
defaultValue: defaultValue,
placeholder: placeholder,
backButton: backButton,
onDidChangeSelection: question.type === question_1.NodeType.multiSelect ? mq.onDidChangeSelection : undefined,
validation: validationFunc,
prompt: prompt,
// step: step,
// totalSteps: totalSteps
});
if (question.type === question_1.NodeType.singleSelect) {
return await ui.selectOption({
type: "radio",
name: question.name,
title: title,
options: res.options,
returnObject: selectQuestion.returnObject,
default: defaultValue,
placeholder: placeholder,
prompt: prompt,
step: step,
totalSteps: totalSteps,
});
}
else {
return await ui.selectOptions({
type: "multibox",
name: question.name,
title: title,
options: res.options,
returnObject: selectQuestion.returnObject,
default: defaultValue,
placeholder: placeholder,
prompt: prompt,
onDidChangeSelection: mq.onDidChangeSelection,
validation: validationFunc,
step: step,
totalSteps: totalSteps,
});
}
}

@@ -203,12 +220,10 @@ else if (question.type === question_1.NodeType.folder) {

: undefined;
return await ui.showOpenDialog({
defaultUri: defaultValue,
canSelectFiles: false,
canSelectFolders: true,
canSelectMany: false,
return await ui.selectFolder({
type: "folder",
name: question.name,
default: defaultValue,
title: title,
validation: validationFunc,
backButton: backButton,
// step: step,
// totalSteps: totalSteps
step: step,
totalSteps: totalSteps,
});

@@ -218,3 +233,3 @@ }

return {
type: ui_1.InputResultType.error,
type: "error",
error: error_1.returnUserError(new Error(`Unsupported question node type:${question.type}`), "API.qm", "UnsupportedNodeType"),

@@ -226,7 +241,8 @@ };

const history = [];
let firstQuestion;
stack.push(root);
let step = 0;
let totalSteps = 1;
let step = 1; // manual input step
let totalStep = 1;
const parentMap = new Map();
const valueMap = new Map();
const autoSkipSet = new Set();
while (stack.length > 0) {

@@ -237,30 +253,9 @@ const curr = stack.pop();

const parent = parentMap.get(curr);
let parentValue = parent && parent.data.type !== question_1.NodeType.group ? parent.data.value : undefined;
if (curr.condition) {
/// if parent node is single select node and return OptionItem as value, then the parentValue is it's id
if (parent && parent.data.type === question_1.NodeType.singleSelect) {
const sq = parent.data;
if (sq.returnObject) {
parentValue = sq.value.id;
}
}
const valueToValidate = curr.condition.target
? await getRealValue(parentValue, curr.condition.target, inputs, remoteFuncExecutor)
: parentValue;
if (valueToValidate) {
const validRes = await validation_1.validate(curr.condition, valueToValidate, inputs, remoteFuncExecutor);
if (validRes !== undefined) {
continue;
}
}
}
const parentValue = parent ? valueMap.get(parent) : undefined;
//visit
if (curr.data.type !== question_1.NodeType.group) {
const question = curr.data;
if (!firstQuestion)
firstQuestion = question;
++step;
totalSteps = step + stack.length;
const inputResult = await questionVisitor(question, parentValue, ui, question !== firstQuestion, inputs, remoteFuncExecutor, step, totalSteps);
if (inputResult.type === ui_1.InputResultType.back) {
totalStep = step + stack.length;
const inputResult = await questionVisitor(question, parentValue, ui, inputs, remoteFuncExecutor, step, totalStep);
if (inputResult.type === "back") {
//go back

@@ -279,3 +274,2 @@ if (curr.children) {

stack.push(curr);
--step;
// find the previoud input that is neither group nor func nor single option select

@@ -298,9 +292,8 @@ let found = false;

stack.push(last);
--step;
let autoSkip = false;
if (last.data.type === question_1.NodeType.singleSelect || last.data.type === question_1.NodeType.multiSelect) {
const loadOptionRes = await loadOptions(last.data, inputs, remoteFuncExecutor);
autoSkip = loadOptionRes.autoSkip;
}
if (last.data.type !== question_1.NodeType.group && last.data.type !== question_1.NodeType.func && !autoSkip) {
if (last.data.type !== question_1.NodeType.group)
inputs.delete(last.data.name);
const lastIsAutoSkip = autoSkipSet.has(last);
if (last.data.type !== question_1.NodeType.group &&
last.data.type !== question_1.NodeType.func &&
!lastIsAutoSkip) {
found = true;

@@ -312,20 +305,36 @@ break;

// no node to back
return { type: ui_1.InputResultType.back };
return { type: "cancel" };
}
--step;
continue; //ignore the following steps
}
else if (inputResult.type === ui_1.InputResultType.error ||
inputResult.type === ui_1.InputResultType.cancel) {
//cancel
else if (inputResult.type === "error" ||
inputResult.type === "cancel") {
return inputResult;
} //continue
else {
//success or pass
//success or skip
question.value = inputResult.result;
if (inputs instanceof config_1.ConfigMap) {
inputs.set(question.name, question.value);
inputs.set(question.name, question.value);
if (inputResult.type === "skip" || question.type === question_1.NodeType.func) {
if (inputResult.type === "skip")
autoSkipSet.add(curr);
}
else {
inputs[question.name] = question.value;
++step;
}
let valueInMap = question.value;
if (question.type === question_1.NodeType.singleSelect) {
const sq = question;
if (sq.value && typeof sq.value !== "string") {
valueInMap = sq.value.id;
}
}
else if (question.type === question_1.NodeType.multiSelect) {
const mq = question;
if (mq.value && typeof mq.value[0] !== "string") {
valueInMap = mq.value.map((i) => i.id);
}
}
valueMap.set(curr, valueInMap);
}

@@ -335,33 +344,25 @@ }

if (curr.children) {
for (let i = curr.children.length - 1; i >= 0; --i) {
const child = curr.children[i];
const matchChildren = [];
const valudInMap = valueMap.get(curr);
for (const child of curr.children) {
if (!child)
continue;
if (child.condition) {
const validRes = await validation_1.validate(child.condition, valudInMap, inputs);
if (validRes !== undefined) {
continue;
}
}
matchChildren.push(child);
}
for (let i = matchChildren.length - 1; i >= 0; --i) {
const child = matchChildren[i];
parentMap.set(child, curr);
stack.push(child);
// if(child.data.type === NodeType.func || child.data.type === NodeType.group) //ignore non-input node
// continue;
// if (child.condition) { //ignore node to skip
// let currValue = curr.data.type !== NodeType.group ? curr.data.value : undefined;
// if (curr.data.type === NodeType.singleSelect) {
// const csq:SingleSelectQuestion = curr.data;
// if (csq.returnObject) {
// currValue = (csq.value as OptionItem).id;
// }
// }
// const valueToValidate = child.condition.target ? await getRealValue(currValue, child.condition.target, inputs, remoteFuncExecutor) : currValue;
// if (valueToValidate) {
// const validRes = await validate(child.condition, valueToValidate as string | string[], inputs, remoteFuncExecutor);
// if (validRes !== undefined) {
// continue;
// }
// }
// }
// ++ totalSteps;
}
}
}
return { type: ui_1.InputResultType.sucess };
return { type: "success" };
}
exports.traverse = traverse;
//# sourceMappingURL=visitor.js.map
import { Result } from "neverthrow";
import { FxError } from "../error";
/**
* @deprecated
*/
export interface Dialog {

@@ -36,2 +39,5 @@ communicate: (msg: DialogMsg) => Promise<DialogMsg>;

}
/**
* @deprecated
*/
export declare enum MsgLevel {

@@ -42,2 +48,5 @@ Info = "Info",

}
/**
* @deprecated
*/
export interface IMessage {

@@ -49,2 +58,5 @@ description: string;

}
/**
* @deprecated
*/
export declare enum QuestionType {

@@ -60,2 +72,5 @@ Text = "Text",

}
/**
* @deprecated
*/
export interface IQuestion {

@@ -72,2 +87,5 @@ type: QuestionType;

}
/**
* @deprecated
*/
export interface IProgressStatus {

@@ -86,3 +104,9 @@ message: string;

}
/**
* @deprecated
*/
export declare type Answer = string | undefined;
/**
* @deprecated
*/
export declare enum DialogType {

@@ -95,2 +119,5 @@ Show = "Show",

}
/**
* @deprecated
*/
export declare class DialogMsg {

@@ -97,0 +124,0 @@ dialogType: DialogType;

@@ -6,2 +6,5 @@ // Copyright (c) Microsoft Corporation.

exports.DialogMsg = exports.DialogType = exports.QuestionType = exports.MsgLevel = void 0;
/**
* @deprecated
*/
var MsgLevel;

@@ -13,2 +16,5 @@ (function (MsgLevel) {

})(MsgLevel = exports.MsgLevel || (exports.MsgLevel = {}));
/**
* @deprecated
*/
var QuestionType;

@@ -25,2 +31,5 @@ (function (QuestionType) {

})(QuestionType = exports.QuestionType || (exports.QuestionType = {}));
/**
* @deprecated
*/
var DialogType;

@@ -34,2 +43,5 @@ (function (DialogType) {

})(DialogType = exports.DialogType || (exports.DialogType = {}));
/**
* @deprecated
*/
class DialogMsg {

@@ -36,0 +48,0 @@ constructor(dialogType, content) {

@@ -9,14 +9,2 @@ import { TokenCredential } from "@azure/core-http";

/**
* @deprecated
* Get ms-rest-* [credential](https://github.com/Azure/ms-rest-nodeauth/blob/master/lib/credentials/tokenCredentialsBase.ts)
* @param showDialog Control whether the UI layer displays pop-up windows.
*/
getAccountCredential(showDialog?: boolean): TokenCredentialsBase | undefined;
/**
* @deprecated
* Get identity [crendential](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/core/core-auth/src/tokenCredential.ts)
* @param showDialog Control whether the UI layer displays pop-up windows.
*/
getIdentityCredential(showDialog?: boolean): TokenCredential | undefined;
/**
* Async get ms-rest-* [credential](https://github.com/Azure/ms-rest-nodeauth/blob/master/lib/credentials/tokenCredentialsBase.ts)

@@ -37,9 +25,2 @@ * @param showDialog Control whether the UI layer displays pop-up windows.

/**
* Add update account info callback. If this method called twice, the latter will overwrite the previous execution.
* @param status SignedIn: User already sign in, SignedOut: User sign out.
* @param token SignedIn: access token string, SignedOut: undefined.
* @param accountInfo SignedIn: access token json object, SignedOut: undefined.
*/
setStatusChangeCallback(statusChange: (status: string, token?: string, accountInfo?: Record<string, unknown>) => Promise<void>): Promise<boolean>;
/**
* Add update account info callback

@@ -96,9 +77,2 @@ * @param name callback name

/**
* Add update account info callback. If this method called twice, the latter will overwrite the previous execution.
* @param status SignedIn: User already sign in, SignedOut: User sign out.
* @param token SignedIn: access token string, SignedOut: undefined.
* @param accountInfo SignedIn: access token json object, SignedOut: undefined.
*/
setStatusChangeCallback(statusChange: (status: string, token?: string, accountInfo?: Record<string, unknown>) => Promise<void>): Promise<boolean>;
/**
* Add update account info callback

@@ -138,9 +112,2 @@ * @param name callback name

/**
* Add update account info callback. If this method called twice, the latter will overwrite the previous execution.
* @param status SignedIn: User already sign in, SignedOut: User sign out.
* @param token SignedIn: access token string, SignedOut: undefined.
* @param accountInfo SignedIn: access token json object, SignedOut: undefined.
*/
setStatusChangeCallback(statusChange: (status: string, token?: string, accountInfo?: Record<string, unknown>) => Promise<void>): Promise<boolean>;
/**
* Add update account info callback

@@ -147,0 +114,0 @@ * @param name callback name

{
"name": "@microsoft/teamsfx-api",
"version": "0.1.1",
"version": "0.2.0-alpha.0",
"description": "teamsfx framework api",

@@ -56,3 +56,3 @@ "main": "build/index.js",

},
"gitHead": "28f77dec7a1a54f89e4b1dd04026cf0a84f7b018",
"gitHead": "b6bf3f4a7d684fc31ce31db32c3b8296a4d9fa6b",
"publishConfig": {

@@ -59,0 +59,0 @@ "access": "public"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc