From 42c1c35ffc9616b874a10378f5d34b5822e176b0 Mon Sep 17 00:00:00 2001 From: alvarosabu Date: Thu, 16 Jan 2025 11:21:41 +0100 Subject: [PATCH] chore: remove block command implementation and clean up imports - Deleted the entire block command implementation from the codebase. - Removed unused imports related to the block command in the components test file. --- src/commands/block/index.ts | 30 --------------------------- src/commands/components/index.test.ts | 1 - 2 files changed, 31 deletions(-) delete mode 100644 src/commands/block/index.ts diff --git a/src/commands/block/index.ts b/src/commands/block/index.ts deleted file mode 100644 index 9ddedfd..0000000 --- a/src/commands/block/index.ts +++ /dev/null @@ -1,30 +0,0 @@ -import chalk from 'chalk' -import { colorPalette, commands } from '../../constants' -import { session } from '../../session' -import { getProgram } from '../../program' -import { CommandError, handleError, konsola } from '../../utils' - -import type { PullComponentsOptions } from './constants' - -const program = getProgram() // Get the shared singleton instance - -export const blocksCommand = program - .command('block') - .option('-s, --space ', 'space ID') - .option('-p, --path ', 'path to where schemas are saved. Default is .storyblok/components') - .description(`Operations on Storyblok blocks`) - -blocksCommand - .command('pull') - .description(`Download your space's blocks schema as json`) - .option('--sf, --separate-files [value]', 'Argument to create a single file for each component') - .action(async (options: PullComponentsOptions) => { - console.log('pulling blocks...', blocksCommand.opts()) - }) - -blocksCommand - .command('push') - .description(`Push your space's blocks schema as json`) - .action(async (options: PullComponentsOptions) => { - console.log('pushing blocks...', options) - }) diff --git a/src/commands/components/index.test.ts b/src/commands/components/index.test.ts index 62b6f91..1094f73 100644 --- a/src/commands/components/index.test.ts +++ b/src/commands/components/index.test.ts @@ -4,7 +4,6 @@ import { fetchComponents, saveComponentsToFiles } from './actions' import { componentsCommand } from '.' import chalk from 'chalk' import { colorPalette } from '../../constants' -import { group } from 'node:console' vi.mock('./actions', () => ({ fetchComponents: vi.fn(),