UNPKG

@supernovaio/cli

Version:

Supernova.io Command Line Interface

74 lines (72 loc) 2.96 kB
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5ab03dc1-f1db-5684-bbad-abfa62e131c0")}catch(e){}}(); import { z } from "zod"; const safeString = z.string().optional().catch(undefined); const safeBoolean = z.boolean().optional().catch(undefined); export const setupStateValues = [ "INIT", "SELECT_DESIGN_SYSTEM", "SELECT_SCAN_SOURCE_PATH", "SELECT_SCAN_PACKAGES", "RUN_SCAN", "REVIEW_SCAN_OUTPUT", "UPLOAD_SCAN_RESULTS", "SELECT_TEMPLATE_DESTINATION", "PREPARE_TEMPLATE", "CONFIGURE_DEPENDENCIES", "CONFIGURE_PRIVATE_REGISTRY", "VALIDATE_DEPENDENCY_ACCESS", "UPLOAD_CONTAINER", "CREATE_SHARED_CONTEXT", "FINALIZE_AND_REDIRECT", "DONE", ]; export const SetupStateSchema = z.enum(setupStateValues); export const SetupSessionStatusSchema = z.enum(["InProgress", "Completed"]); export const setupTemplateFrameworkValues = ["React", "Angular", "Vue"]; export const TemplateFrameworkSchema = z.enum(setupTemplateFrameworkValues); export const SetupContextSchema = z.object({ analysisProcessingRunId: safeString, componentPackages: z.array(z.string()).optional().catch(undefined), contextName: safeString, createdFeatureId: safeString, createdProjectId: safeString, customPrompt: safeString, dependencyPackageNames: z.array(z.string()).optional().catch(undefined), dependencyMode: z.enum(["Public", "Private"]).optional().catch(undefined), designSystemId: safeString, discoveredPackages: z .array(z.object({ name: z.string(), packageDir: z.string(), relativePath: z.string(), })) .optional() .catch(undefined), privateDependencyEntries: z.array(z.string()).optional().catch(undefined), npmToken: safeString, projectUrl: safeString, selectedPromptPreset: z.enum(["KitchenSink", "Custom"]).optional().catch(undefined), repoPaths: z.array(z.string()).optional().catch(undefined), scanOutputPaths: z.array(z.string()).optional().catch(undefined), scanSourcePath: safeString, sharedContextId: safeString, shouldRunScan: safeBoolean, shouldUploadScanResults: safeBoolean, templateDestinationPath: safeString, templateFramework: TemplateFrameworkSchema.optional().catch(undefined), uploadedSandboxTemplateId: safeString, uploadedSandboxTemplateVersion: safeString, workspaceId: safeString, }); export const SetupSessionSchema = SetupContextSchema.omit({ discoveredPackages: true, npmToken: true, scanOutputPaths: true, }).extend({ lastState: SetupStateSchema, startedAt: z.string(), status: SetupSessionStatusSchema, updatedAt: z.string(), }); //# sourceMappingURL=types.js.map //# debugId=5ab03dc1-f1db-5684-bbad-abfa62e131c0