refactor: update zod imports in /cli (#2473)

updates in /cli
This commit is contained in:
kevinmitch14
2024-01-28 05:57:26 -03:00
committed by GitHub
parent ee94767dba
commit 343b20fc5c
9 changed files with 13 additions and 8 deletions

View File

@@ -0,0 +1,5 @@
---
"shadcn-ui": patch
---
update zod imports

View File

@@ -17,7 +17,7 @@ import { Command } from "commander"
import { execa } from "execa"
import ora from "ora"
import prompts from "prompts"
import * as z from "zod"
import { z } from "zod"
const addOptionsSchema = z.object({
components: z.array(z.string()).optional(),

View File

@@ -14,7 +14,7 @@ import { transform } from "@/src/utils/transformers"
import chalk from "chalk"
import { Command } from "commander"
import { diffLines, type Change } from "diff"
import * as z from "zod"
import { z } from "zod"
const updateOptionsSchema = z.object({
component: z.string().optional(),

View File

@@ -26,7 +26,7 @@ import { execa } from "execa"
import template from "lodash.template"
import ora from "ora"
import prompts from "prompts"
import * as z from "zod"
import { z } from "zod"
import { applyPrefixesCss } from "../utils/transformers/transform-tw-prefix"

View File

@@ -2,7 +2,7 @@ import path from "path"
import { resolveImport } from "@/src/utils/resolve-import"
import { cosmiconfig } from "cosmiconfig"
import { loadConfig } from "tsconfig-paths"
import * as z from "zod"
import { z } from "zod"
export const DEFAULT_STYLE = "default"
export const DEFAULT_COMPONENTS = "@/components"

View File

@@ -9,7 +9,7 @@ import {
} from "@/src/utils/registry/schema"
import { HttpsProxyAgent } from "https-proxy-agent"
import fetch from "node-fetch"
import * as z from "zod"
import { z } from "zod"
const baseUrl = process.env.COMPONENTS_REGISTRY_URL ?? "https://ui.shadcn.com"
const agent = process.env.https_proxy

View File

@@ -1,4 +1,4 @@
import * as z from "zod"
import { z } from "zod"
// TODO: Extract this to a shared package.
export const registryItemSchema = z.object({

View File

@@ -8,7 +8,7 @@ import { transformImport } from "@/src/utils/transformers/transform-import"
import { transformJsx } from "@/src/utils/transformers/transform-jsx"
import { transformRsc } from "@/src/utils/transformers/transform-rsc"
import { Project, ScriptKind, type SourceFile } from "ts-morph"
import * as z from "zod"
import { z } from "zod"
import { transformTwPrefixes } from "./transform-tw-prefix"

View File

@@ -1,7 +1,7 @@
import { registryBaseColorSchema } from "@/src/utils/registry/schema"
import { Transformer } from "@/src/utils/transformers"
import { ScriptKind, SyntaxKind } from "ts-morph"
import * as z from "zod"
import { z } from "zod"
export const transformCssVars: Transformer = async ({
sourceFile,