@supernovaio/cli
Version:
Supernova.io Command Line Interface
31 lines (29 loc) • 1.62 kB
JavaScript
!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]="e6b1d05c-8ab7-56e2-a675-4123e99a0d87")}catch(e){}}();
import { promptTemplateDestination } from "./prompts.js";
export function createContainerHandlers(services) {
return {
async SELECT_TEMPLATE_DESTINATION(context) {
services.ui.renderStep("Container destination");
if (!context.templateFramework)
services.ui.error("Template framework is missing.");
const templateDestinationPath = await promptTemplateDestination({
defaultDestinationPath: context.templateDestinationPath,
error: services.ui.error,
framework: context.templateFramework,
log: services.ui.log,
});
return { templateDestinationPath };
},
async PREPARE_TEMPLATE(context) {
services.ui.renderStep("Container setup");
if (!context.templateFramework || !context.templateDestinationPath) {
services.ui.error("Template context is incomplete.");
}
await services.container.ensureTemplateRepository(context.templateFramework, context.templateDestinationPath);
services.ui.renderTemplateReadyCard(context.templateDestinationPath);
return undefined;
},
};
}
//# sourceMappingURL=index.js.map
//# debugId=e6b1d05c-8ab7-56e2-a675-4123e99a0d87