inquirer#QuestionCollection TypeScript Examples
The following examples show how to use
inquirer#QuestionCollection.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: promptBuilder.ts From bedrock-cli with MIT License | 6 votes |
servicePrincipal = (
id?: string | undefined,
pwd?: string | undefined,
tenantId?: string | undefined
): QuestionCollection[] => {
return [
servicePrincipalId(id),
servicePrincipalPassword(pwd),
servicePrincipalTenantId(tenantId),
];
}
Example #2
Source File: promptBuilder.ts From bedrock-cli with MIT License | 6 votes |
approvingHLDPullRequest = (
url: string,
defaultValue = true
): QuestionCollection => {
return {
default: defaultValue,
message: `Please approve and merge the Pull Request at ${url}? Refresh the page if you do not see an active Pull Request.`,
name: "approve_hld_pr",
type: "confirm",
};
}
Example #3
Source File: promptBuilder.ts From bedrock-cli with MIT License | 6 votes |
storageAccountName = (
defaultValue?: string | undefined
): QuestionCollection => {
return {
default: defaultValue,
mask: "*",
message: `${i18n.prompt.storageAccessKey}\n`,
name: "azdo_storage_account_name",
type: "password",
validate: validator.validateStorageAccessKey,
};
}
Example #4
Source File: promptBuilder.ts From bedrock-cli with MIT License | 6 votes |
azureStorageAccessKey = (
defaultValue?: string | undefined
): QuestionCollection => {
return {
default: defaultValue,
mask: "*",
message: `${i18n.prompt.storageAccessKey}\n`,
name: "azdo_storage_access_key",
type: "password",
validate: validator.validateStorageAccessKey,
};
}
Example #5
Source File: promptBuilder.ts From bedrock-cli with MIT License | 6 votes |
azureKeyVaultName = (
defaultValue?: string | undefined
): QuestionCollection => {
return {
default: defaultValue,
message: `${i18n.prompt.storageKeyVaultName}\n`,
name: "azdo_storage_key_vault_name",
type: "input",
validate: validator.validateStorageKeyVaultName,
};
}
Example #6
Source File: promptBuilder.ts From bedrock-cli with MIT License | 6 votes |
azureStoragePartitionKey = (
defaultValue?: string | undefined
): QuestionCollection => {
return {
default: defaultValue,
message: `${i18n.prompt.storagePartitionKey}\n`,
name: "azdo_storage_partition_key",
type: "input",
validate: validator.validateStoragePartitionKey,
};
}
Example #7
Source File: promptBuilder.ts From bedrock-cli with MIT License | 6 votes |
azureStorageTableName = (
defaultValue?: string | undefined
): QuestionCollection => {
return {
default: defaultValue,
message: `${i18n.prompt.storageTableName}\n`,
name: "azdo_storage_table_name",
type: "input",
validate: validator.validateStorageTableName,
};
}
Example #8
Source File: promptBuilder.ts From bedrock-cli with MIT License | 6 votes |
azureStorageAccountName = (
defaultValue?: string | undefined
): QuestionCollection => {
return {
default: defaultValue,
message: `${i18n.prompt.storageAccountName}\n`,
name: "azdo_storage_account_name",
type: "input",
validate: validator.validateStorageAccountName,
};
}
Example #9
Source File: promptBuilder.ts From bedrock-cli with MIT License | 6 votes |
servicePrincipalTenantId = (
defaultValue?: string | undefined
): QuestionCollection => {
return {
default: defaultValue,
message: `${i18n.prompt.servicePrincipalTenantId}\n`,
name: "az_sp_tenant",
type: "input",
validate: validator.validateServicePrincipalTenantId,
};
}
Example #10
Source File: promptBuilder.ts From bedrock-cli with MIT License | 6 votes |
servicePrincipalPassword = (
defaultValue?: string | undefined
): QuestionCollection => {
return {
default: defaultValue,
mask: "*",
message: `${i18n.prompt.servicePrincipalPassword}\n`,
name: "az_sp_password",
type: "password",
validate: validator.validateServicePrincipalPassword,
};
}
Example #11
Source File: promptBuilder.ts From bedrock-cli with MIT License | 6 votes |
servicePrincipalId = (
defaultValue?: string | undefined
): QuestionCollection => {
return {
default: defaultValue,
message: `${i18n.prompt.servicePrincipalId}\n`,
name: "az_sp_id",
type: "input",
validate: validator.validateServicePrincipalId,
};
}
Example #12
Source File: promptBuilder.ts From bedrock-cli with MIT License | 6 votes |
askToCreateServicePrincipal = (
defaultValue = false
): QuestionCollection => {
return {
default: defaultValue,
message: i18n.prompt.createServicePrincipal,
name: "create_service_principal",
type: "confirm",
};
}
Example #13
Source File: promptBuilder.ts From bedrock-cli with MIT License | 6 votes |
askToSetupIntrospectionConfig = (
defaultValue = false
): QuestionCollection => {
return {
default: defaultValue,
message: i18n.prompt.setupIntrospectionConfig,
name: "toSetupIntrospectionConfig",
type: "confirm",
};
}
Example #14
Source File: promptBuilder.ts From bedrock-cli with MIT License | 6 votes |
azureAccessToken = (
defaultValue?: string | undefined
): QuestionCollection => {
return {
default: defaultValue,
mask: "*",
message: `${i18n.prompt.personalAccessToken}\n`,
name: "azdo_pat",
type: "password",
validate: validator.validateAccessToken,
};
}
Example #15
Source File: promptBuilder.ts From bedrock-cli with MIT License | 6 votes |
azureProjectName = (
defaultValue?: string | undefined
): QuestionCollection => {
return {
default: defaultValue,
message: `${i18n.prompt.projectName}\n`,
name: "azdo_project_name",
type: "input",
validate: validator.validateProjectName,
};
}
Example #16
Source File: promptBuilder.ts From bedrock-cli with MIT License | 6 votes |
azureOrgName = (
defaultValue?: string | undefined
): QuestionCollection => {
return {
default: defaultValue,
message: `${i18n.prompt.orgName}\n`,
name: "azdo_org_name",
type: "input",
validate: validator.validateOrgName,
};
}
Example #17
Source File: ask.ts From reskript with MIT License | 5 votes |
questions: QuestionCollection<UserOptions> = [
{
name: 'driver',
message: 'Choose your build engine',
type: 'list',
choices: ['webpack', 'vite'],
},
{
name: 'packageManager',
message: 'Choose your package manager',
type: 'list',
choices: ['npm', 'yarn', 'pnpm'],
},
{
name: 'packageName',
message: 'Enter your package name, this will be set to package.json',
type: 'input',
validate: (value: string) => !!value.length,
},
{
name: 'appTitle',
message: 'Enter your application title in browser tab',
type: 'input',
validate: (value: string) => !!value.length,
},
{
name: 'gerrit',
message: 'Are you developing on Gerrit which creates a Change-Id line in your commit',
type: 'confirm',
},
{
name: 'devServerPort',
message: 'Choose a port for dev server',
type: 'number',
default: 8788,
validate: (value: number) => !!value,
},
{
name: 'tasks',
message: 'Select tasks you involve in your project',
type: 'checkbox',
multiple: true,
choices: [
{message: 'Unit test with jest', value: 'test'},
{message: 'Debug a single component inside project', value: 'play'},
],
},
]
Example #18
Source File: promptBuilder.ts From bedrock-cli with MIT License | 5 votes |
chooseSubscriptionId = (names: string[]): QuestionCollection => {
return {
choices: names,
message: `${i18n.prompt.selectSubscriptionId}\n`,
name: "az_subscription",
type: "list",
};
}