Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/src/commands/wizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const wizardCommand: CommandModule<{}> = {
handler: async () => {
try {
const { default: createEnvironment } =
await import("../scripts/env/create-environment");
await import("../scripts/wizard/generate");
await createEnvironment();
process.exit(0);
} catch (error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
generateWorkerConfig,
icons,
promptUser,
} from "../../utils/create-environment";
} from "../../utils/wizard";
import { resolveChainPath } from "../../utils/pathResolver";

export default async function () {
Expand Down Expand Up @@ -46,24 +46,22 @@ export default async function () {
fs.writeFileSync(chainConfigPath, chainConfig);

if (answers.includeIndexer) {
const indexerConfig = generateIndexerConfig(answers);
const indexerConfig = generateIndexerConfig();
if (indexerConfig) {
fs.writeFileSync(indexerConfigPath, indexerConfig);
}
}

if (answers.includeProcessor && answers.includeIndexer) {
const processorConfig = generateProcessorConfig(answers);
if (answers.includeProcessor) {
const processorConfig = generateProcessorConfig();
if (processorConfig) {
fs.writeFileSync(processorConfigPath, processorConfig);
}
}

if (answers.preset !== "inmemory") {
const workerConfig = generateWorkerConfig(answers);
if (workerConfig) {
fs.writeFileSync(workerConfigPath, workerConfig);
}
const workerConfig = generateWorkerConfig(answers);
if (workerConfig) {
fs.writeFileSync(workerConfigPath, workerConfig);
}

console.log(
Expand All @@ -89,7 +87,7 @@ export default async function () {
if (answers.includeProcessor && answers.includeIndexer) {
console.log(` ${green(icons.checkmark)} processor.config.ts`);
}
if (answers.preset !== "inmemory") {
if (workerConfig) {
console.log(` ${green(icons.checkmark)} worker.config.ts`);
}

Expand Down
Loading
Loading