@pagopa/dx-cli
Version:
A CLI useful to manage DX tools.
67 lines (66 loc) • 2.5 kB
TypeScript
import inquirer from "inquirer";
import { type DynamicPromptsFunction } from "node-plop";
import { CloudAccount, CloudAccountRepository, CloudAccountService, CloudRegion } from "../../../../domain/cloud-account.js";
type InquirerChoice<T> = inquirer.Separator | {
name: string;
value: T;
};
import { z } from "zod/v4";
export declare const workspaceSchema: z.ZodObject<{
domain: z.ZodDefault<z.ZodString>;
}, z.core.$strip>;
export declare const payloadSchema: z.ZodObject<{
env: z.ZodObject<{
cloudAccounts: z.ZodArray<z.ZodObject<{
csp: z.ZodDefault<z.ZodEnum<{
azure: "azure";
}>>;
defaultLocation: z.ZodString;
displayName: z.ZodString;
id: z.ZodString;
}, z.core.$strip>>;
name: z.ZodEnum<{
dev: "dev";
prod: "prod";
uat: "uat";
}>;
prefix: z.ZodString;
}, z.core.$strip>;
github: z.ZodObject<{
owner: z.ZodString;
repo: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
}, z.core.$strip>;
init: z.ZodOptional<z.ZodObject<{
cloudAccountsToInitialize: z.ZodArray<z.ZodObject<{
csp: z.ZodDefault<z.ZodEnum<{
azure: "azure";
}>>;
defaultLocation: z.ZodString;
displayName: z.ZodString;
id: z.ZodString;
}, z.core.$strip>>;
terraformBackend: z.ZodOptional<z.ZodObject<{
cloudAccount: z.ZodObject<{
csp: z.ZodDefault<z.ZodEnum<{
azure: "azure";
}>>;
defaultLocation: z.ZodString;
displayName: z.ZodString;
id: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>>;
}, z.core.$strip>>;
tags: z.ZodRecord<z.ZodString, z.ZodString>;
workspace: z.ZodObject<{
domain: z.ZodDefault<z.ZodString>;
}, z.core.$strip>;
}, z.core.$strip>;
export type Payload = z.infer<typeof payloadSchema>;
export type PromptsDependencies = {
cloudAccountRepository: CloudAccountRepository;
cloudAccountService: CloudAccountService;
};
declare const prompts: (deps: PromptsDependencies) => DynamicPromptsFunction;
export declare const getCloudAccountChoices: (cloudAccounts: CloudAccount[]) => InquirerChoice<CloudAccount>[];
export declare const getCloudLocationChoices: (regions: CloudRegion[]) => InquirerChoice<CloudRegion["name"]>[];
export default prompts;