Migrate .storybook/main to a Storybook 7 framework

Proprietary

When .storybook/main.* names a renderer as its framework ('@storybook/react', or {name: '@storybook/react'}) and core.builder as webpack5 or vite, changes the framework to @storybook/<renderer>-webpack5 or @storybook/<renderer>-vite, removes core.builder (and core when nothing else is left in it), and moves a StorybookConfig import from @storybook/<renderer>/types to the framework package. A config without core.builder is left as it is, since its builder is not stated.

org.openrewrite.nodejs.migrate.storybook.MigrateStorybook7Config
mod run . --recipe=org.openrewrite.nodejs.migrate.storybook.MigrateStorybook7Config

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.