From 9a07687fc5fd10b01be75d17c6c4c55485b18751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Emir=20=C5=9Een?= Date: Fri, 24 May 2024 13:52:27 +0300 Subject: [PATCH] feat(cli): prompt to update all Refine dependencies (#5947) --- .changeset/brave-chicken-grow.md | 9 ++ .changeset/poor-adults-sneeze.md | 7 + packages/cli/ANNOUNCEMENTS.md | 5 +- .../cli/src/commands/check-updates/index.tsx | 10 +- packages/cli/src/commands/devtools/index.ts | 22 +-- packages/cli/src/commands/runner/dev/index.ts | 2 +- .../cli/src/commands/runner/projectScripts.ts | 2 +- packages/cli/src/commands/swizzle/index.tsx | 6 +- packages/cli/src/commands/update/index.ts | 55 +++++-- .../src/commands/update/interactive/index.ts | 2 +- .../components/update-warning-table/table.ts | 119 +------------- .../cli/src/components/version-table/index.ts | 151 ++++++++++++++++++ packages/cli/src/update-notifier/index.tsx | 2 +- packages/cli/src/utils/package/index.ts | 2 +- packages/devtools-server/FEED.md | 4 +- .../devtools-server/src/client/index.html | 3 +- .../src/packages/get-available-packages.ts | 40 ++--- packages/devtools-server/src/serve-ws.ts | 2 +- packages/devtools-server/src/setup-server.ts | 6 +- .../src/components/add-package-drawer.tsx | 2 +- packages/devtools-ui/src/components/feed.tsx | 2 +- .../src/components/project-id-fix-modal.tsx | 2 +- 22 files changed, 275 insertions(+), 180 deletions(-) create mode 100644 .changeset/brave-chicken-grow.md create mode 100644 .changeset/poor-adults-sneeze.md create mode 100644 packages/cli/src/components/version-table/index.ts diff --git a/.changeset/brave-chicken-grow.md b/.changeset/brave-chicken-grow.md new file mode 100644 index 000000000000..ee579adb5be1 --- /dev/null +++ b/.changeset/brave-chicken-grow.md @@ -0,0 +1,9 @@ +--- +"@refinedev/cli": patch +"@refinedev/devtools-server": patch +"@refinedev/devtools-ui": patch +--- + +fix: capitalize Refine + +Capitalized "Refine" in the user-facing texts diff --git a/.changeset/poor-adults-sneeze.md b/.changeset/poor-adults-sneeze.md new file mode 100644 index 000000000000..021810e36dc3 --- /dev/null +++ b/.changeset/poor-adults-sneeze.md @@ -0,0 +1,7 @@ +--- +"@refinedev/cli": patch +--- + +feat(cli): prompt to update all in `update` command + +Previously, if users doesn't provide `--all` option, `update` command will display an interactive prompt to pick which packages to update. Now, before displaying the prompt, it will ask if users want to update all packages. diff --git a/packages/cli/ANNOUNCEMENTS.md b/packages/cli/ANNOUNCEMENTS.md index 27967040de72..5cf9c4e1f799 100644 --- a/packages/cli/ANNOUNCEMENTS.md +++ b/packages/cli/ANNOUNCEMENTS.md @@ -3,14 +3,13 @@ hidden: false --- -refine Devtools beta version is out! To install in your project, just run `npm run refine devtools init`. https://s.refine.dev/devtools-beta ---- +## Refine Devtools beta version is out! To install in your project, just run `npm run refine devtools init`. https://s.refine.dev/devtools-beta ---announcement hidden: false --- -Hello from refine team! Hope you enjoy! Join our Discord community to get help and discuss with other users. https://discord.gg/refine +Hello from Refine team! Hope you enjoy! Join our Discord community to get help and discuss with other users. https://discord.gg/refine --- diff --git a/packages/cli/src/commands/check-updates/index.tsx b/packages/cli/src/commands/check-updates/index.tsx index 15099bcfa2c2..e4e72b30488b 100644 --- a/packages/cli/src/commands/check-updates/index.tsx +++ b/packages/cli/src/commands/check-updates/index.tsx @@ -12,14 +12,14 @@ import semverDiff from "semver-diff"; const load = (program: Command) => { return program .command("check-updates") - .description("Check all installed `refine` packages are up to date") + .description("Check all installed `Refine` packages are up to date") .action(action); }; const action = async () => { const packages = await spinner(isRefineUptoDate, "Checking for updates..."); if (!packages.length) { - console.log("All `refine` packages are up to date πŸŽ‰\n"); + console.log("All `Refine` packages are up to date πŸŽ‰\n"); return; } @@ -28,9 +28,9 @@ const action = async () => { /** * - * @returns `refine` packages that have updates. - * @returns `[]` if no refine package found. - * @returns `[]` if all `refine` packages are up to date. + * @returns `Refine` packages that have updates. + * @returns `[]` if no Refine package found. + * @returns `[]` if all `Refine` packages are up to date. */ export const isRefineUptoDate = async () => { const refinePackages = await getOutdatedRefinePackages(); diff --git a/packages/cli/src/commands/devtools/index.ts b/packages/cli/src/commands/devtools/index.ts index 8efa31fc64f5..6070bbd0aaa4 100644 --- a/packages/cli/src/commands/devtools/index.ts +++ b/packages/cli/src/commands/devtools/index.ts @@ -27,7 +27,7 @@ const load = (program: Command) => { return program .command("devtools") .description( - "Start or install refine's devtools server; it starts on port 5001.", + "Start or install Refine Devtools server; it starts on port 5001.", ) .addArgument( new Argument("[command]", "devtools related commands") @@ -38,8 +38,8 @@ const load = (program: Command) => { "after", ` Commands: - start Start refine's devtools server - init Install refine's devtools client and adds it to your project + start Start Refine Devtools server + init Install Refine Devtools client and adds it to your project `, ) .action(action); @@ -64,7 +64,7 @@ const devtoolsInstaller = async () => { "Checking if devtools is installed...", ); if (isInstalled) { - console.log("πŸŽ‰ refine devtools is already installed"); + console.log("πŸŽ‰ Refine Devtools is already installed"); return; } @@ -75,7 +75,7 @@ const devtoolsInstaller = async () => { return; } - console.log("🌱 Installing refine devtools..."); + console.log("🌱 Installing Refine Devtools..."); const packagesToInstall = ["@refinedev/devtools@latest"]; // we should update core package if it is lower than minRefineCoreVersionForDevtools if ( @@ -83,7 +83,7 @@ const devtoolsInstaller = async () => { semver.lt(corePackage.version, minRefineCoreVersionForDevtools) ) { packagesToInstall.push("@refinedev/core@latest"); - console.log("🌱 refine core package is being updated for devtools..."); + console.log("🌱 Refine core package is being updated for devtools..."); } await installPackagesSync(packagesToInstall); @@ -94,13 +94,13 @@ const devtoolsInstaller = async () => { console.log("🌱 Adding devtools component to your project...."); await addDevtoolsComponent(); console.log( - "βœ… refine devtools package and components added to your project", + "βœ… Refine Devtools package and components added to your project", ); // if core package is updated, we should show the updated version if (packagesToInstall.includes("@refinedev/core@latest")) { const updatedCorePackage = await getRefineCorePackage(); console.log( - `βœ… refine core package updated from ${ + `βœ… Refine core package updated from ${ corePackage?.version ?? "unknown" } to ${updatedCorePackage?.version ?? "unknown"}`, ); @@ -176,7 +176,7 @@ export const devtoolsRunner = async ({ if (semver.lt(corePackage.version, minRefineCoreVersionForDevtools)) { console.log( - `🚨 You're using an old version of refine(${corePackage.version}). refine version should be @4.42.0 or higher to use devtools.`, + `🚨 You're using an old version of Refine(${corePackage.version}). Refine version should be @4.42.0 or higher to use devtools.`, ); const pm = await getPreferedPM(); console.log( @@ -217,9 +217,9 @@ export const validateCorePackageIsNotDeprecated = async ({ }) => { if (pkg.name === "@pankod/refine-core" || semver.lt(pkg.version, "4.0.0")) { console.log( - `🚨 You're using an old version of refine(${pkg.version}). refine version should be @4.42.0 or higher to use devtools.`, + `🚨 You're using an old version of Refine(${pkg.version}). Refine version should be @4.42.0 or higher to use devtools.`, ); - console.log("You can follow migration guide to update refine."); + console.log("You can follow migration guide to update Refine."); console.log( chalk.blue("https://refine.dev/docs/migration-guide/3x-to-4x/"), ); diff --git a/packages/cli/src/commands/runner/dev/index.ts b/packages/cli/src/commands/runner/dev/index.ts index 874d1bb173e7..1a7a455e511b 100644 --- a/packages/cli/src/commands/runner/dev/index.ts +++ b/packages/cli/src/commands/runner/dev/index.ts @@ -26,7 +26,7 @@ const dev = (program: Command) => { .addOption( new Option( "-d, --devtools ", - "Start refine's devtools server", + "Start Refine Devtools server", ).default("true", "true if devtools is installed"), ) .argument("[args...]") diff --git a/packages/cli/src/commands/runner/projectScripts.ts b/packages/cli/src/commands/runner/projectScripts.ts index 83a27f391c18..b3e9547e509c 100644 --- a/packages/cli/src/commands/runner/projectScripts.ts +++ b/packages/cli/src/commands/runner/projectScripts.ts @@ -1,7 +1,7 @@ import { ProjectTypes } from "@definitions/projectTypes"; /** - * Map `refine` cli commands to project script + * Map `Refine` cli commands to project script */ export const projectScripts = { [ProjectTypes.REACT_SCRIPT]: { diff --git a/packages/cli/src/commands/swizzle/index.tsx b/packages/cli/src/commands/swizzle/index.tsx index 958d85d37182..e64286a63107 100644 --- a/packages/cli/src/commands/swizzle/index.tsx +++ b/packages/cli/src/commands/swizzle/index.tsx @@ -28,7 +28,7 @@ const swizzle = (program: Command) => { .command("swizzle") .description( `Export a component or a function from ${chalk.bold( - "refine", + "Refine", )} packages to customize it in your project`, ) .action(action); @@ -86,7 +86,7 @@ const action = async (_options: OptionValues) => { ); if (packagesWithConfig.length === 0) { - console.log("No refine packages found with swizzle configuration."); + console.log("No Refine packages found with swizzle configuration."); return; } @@ -95,7 +95,7 @@ const action = async (_options: OptionValues) => { `Found ${chalk.blueBright( packagesWithConfig.length, )} installed ${chalk.blueBright.bold( - "refine", + "Refine", )} packages with swizzle configuration.`, { padding: 1, diff --git a/packages/cli/src/commands/update/index.ts b/packages/cli/src/commands/update/index.ts index fa52dbfda7d7..dd72606af57b 100644 --- a/packages/cli/src/commands/update/index.ts +++ b/packages/cli/src/commands/update/index.ts @@ -1,9 +1,12 @@ +import inquirer from "inquirer"; +import center from "center-align"; import { Command, Option } from "commander"; -import { isRefineUptoDate } from "@commands/check-updates"; import spinner from "@utils/spinner"; +import { isRefineUptoDate } from "@commands/check-updates"; import { getPreferedPM, installPackages, pmCommands } from "@utils/package"; import { promptInteractiveRefineUpdate } from "@commands/update/interactive"; import { RefinePackageInstalledVersionData } from "@definitions/package"; +import { getVersionTable } from "@components/version-table"; enum Tag { Wanted = "wanted", @@ -21,7 +24,7 @@ const load = (program: Command) => { return program .command("update") .description( - "Interactively select and update all `refine` packages to selected version. To skip the interactive mode, use the `--all` option.", + "Interactively select and update all `Refine` packages to selected version. To skip the interactive mode, use the `--all` option.", ) .addOption( new Option("-t, --tag [tag]", "Select version to update to.") @@ -33,7 +36,7 @@ const load = (program: Command) => { ) .option( "-a, --all", - "Update all `refine` packages to the selected `tag`. If `tag` is not provided, version ranges in the `package.json` will be installed. This option skips the interactive mode.", + "Update all `Refine` packages to the selected `tag`. If `tag` is not provided, version ranges in the `package.json` will be installed. This option skips the interactive mode.", false, ) .option( @@ -49,13 +52,45 @@ const action = async (options: OptionValues) => { const packages = await spinner(isRefineUptoDate, "Checking for updates..."); if (!packages?.length) { - console.log("All `refine` packages are up to date πŸŽ‰"); + console.log("All `Refine` packages are up to date πŸŽ‰"); return; } - const selectedPackages = all - ? runAll(tag, packages) - : await promptInteractiveRefineUpdate(packages); + let selectedPackages: string[] | null | undefined = null; + + if (all) { + runAll(tag, packages); + } else { + const { table, width } = getVersionTable(packages) ?? ""; + + console.log(center("Available Updates", width)); + console.log(table); + + const { allByPrompt } = await inquirer.prompt<{ allByPrompt: boolean }>([ + { + type: "list", + name: "allByPrompt", + message: + "Do you want to update all Refine packages for minor and patch versions?", + choices: [ + { + name: "Yes (Recommended)", + value: true, + }, + { + name: "No, use interactive mode", + value: false, + }, + ], + }, + ]); + + if (allByPrompt) { + selectedPackages = runAll(tag, packages); + } else { + selectedPackages = await promptInteractiveRefineUpdate(packages); + } + } if (!selectedPackages) return; @@ -74,7 +109,7 @@ const runAll = (tag: Tag, packages: RefinePackageInstalledVersionData[]) => { ); if (isAllPackagesAtWantedVersion) { console.log( - "All `refine` packages are up to date with the wanted version πŸŽ‰", + "All `Refine` packages are up to date with the wanted version πŸŽ‰", ); return null; } @@ -95,8 +130,8 @@ const printInstallCommand = async (packages: string[]) => { }; const pmInstall = (packages: string[]) => { - console.log("Updating `refine` packages..."); - console.log(packages); + console.log("Updating `Refine` packages..."); + console.log(packages.map((pkg) => ` - ${pkg}`).join("\n")); installPackages(packages); }; diff --git a/packages/cli/src/commands/update/interactive/index.ts b/packages/cli/src/commands/update/interactive/index.ts index e05c4134897c..41365976fbb5 100644 --- a/packages/cli/src/commands/update/interactive/index.ts +++ b/packages/cli/src/commands/update/interactive/index.ts @@ -28,7 +28,7 @@ export const promptInteractiveRefineUpdate = async ( ) => { const uiGroup = createUIGroup(packages); if (!uiGroup) { - console.log("All `refine` packages are up to date. πŸŽ‰"); + console.log("All `Refine` packages are up to date. πŸŽ‰"); return; } diff --git a/packages/cli/src/components/update-warning-table/table.ts b/packages/cli/src/components/update-warning-table/table.ts index e794b1d95a03..7e998ba8007a 100644 --- a/packages/cli/src/components/update-warning-table/table.ts +++ b/packages/cli/src/components/update-warning-table/table.ts @@ -1,26 +1,8 @@ -import React from "react"; import { RefinePackageInstalledVersionData } from "@definitions/package"; -import Table from "cli-table3"; import chalk from "chalk"; import center from "center-align"; import { getDependencies, getPreferedPM, getScripts } from "@utils/package"; -import { removeANSIColors } from "@utils/text"; - -const columns = { - name: "name", - current: "current", - wanted: "wanted", - latest: "latest", - changelog: "changelog", -} as const; - -const orderedColumns: (typeof columns)[keyof typeof columns][] = [ - columns.name, - columns.current, - columns.wanted, - columns.latest, - columns.changelog, -]; +import { getVersionTable } from "@components/version-table"; export interface UpdateWarningTableParams { data: RefinePackageInstalledVersionData[]; @@ -33,52 +15,14 @@ export const printUpdateWarningTable = async ( const tableHead = Object.keys(data?.[0] || {}); if (!data || !tableHead.length) return; - const table = new Table({ - head: orderedColumns, - style: { - head: ["blue"], - }, - }); - - data.forEach((row) => { - table.push( - orderedColumns.map((column) => { - const columnValue = row[column]; - if (!columnValue) return columnValue; - - if (column === "latest" || column === "wanted") { - const installedVersion = parseVersions(row.current); - const latestVersion = parseVersions(columnValue); - const colors = getColorsByVersionDiffrence( - installedVersion, - latestVersion, - ); - const textMajor = chalk[colors.major](latestVersion.major); - const textMinor = chalk[colors.minor](latestVersion.minor); - const textPatch = chalk[colors.patch](latestVersion.patch); - return `${textMajor}.${textMinor}.${textPatch}`; - } - - if (column === "changelog") { - return chalk.blueBright.underline(columnValue); - } - - return columnValue; - }), - ); - }); - - const tableOutput = table.toString(); - const tableWidth = removeANSIColors( - tableOutput.split("\n")?.[0] || "", - ).length; + const { table, width } = getVersionTable(data); console.log(); - console.log(center("Update Available", tableWidth)); - console.log(tableOutput); + console.log(center("Update Available", width)); + console.log(table); console.log( center( - `To update ${chalk.bold("`refine`")} packages with wanted version`, - tableWidth, + `To update ${chalk.bold("`Refine`")} packages with wanted version`, + width, ), ); console.log( @@ -86,61 +30,12 @@ export const printUpdateWarningTable = async ( ` Run the following command: ${chalk.yellowBright( await getInstallCommand(), )}`, - tableWidth, + width, ), ); console.log(); }; -const parseVersions = (text: string) => { - const versions = text.split("."); - return { - major: versions[0], - minor: versions[1], - patch: versions[2], - }; -}; - -const getColorsByVersionDiffrence = ( - installedVersion: ReturnType, - nextVersion: ReturnType, -) => { - const isMajorDiffrence = - installedVersion.major.trim() !== nextVersion.major.trim(); - - if (isMajorDiffrence) - return { - major: "red", - minor: "red", - patch: "red", - } as const; - - const isMinorDiffrence = - installedVersion.minor.trim() !== nextVersion.minor.trim(); - - if (isMinorDiffrence) - return { - major: "white", - minor: "yellow", - patch: "yellow", - } as const; - - const isPatchDiffrence = - installedVersion.patch.trim() !== nextVersion.patch.trim(); - if (isPatchDiffrence) - return { - major: "white", - minor: "white", - patch: "green", - } as const; - - return { - major: "white", - minor: "white", - patch: "white", - } as const; -}; - export const getInstallCommand = async () => { const fallbackCommand = "npx @refinedev/cli update"; diff --git a/packages/cli/src/components/version-table/index.ts b/packages/cli/src/components/version-table/index.ts new file mode 100644 index 000000000000..e14d35f0c569 --- /dev/null +++ b/packages/cli/src/components/version-table/index.ts @@ -0,0 +1,151 @@ +import { RefinePackageInstalledVersionData } from "@definitions/package"; +import Table from "cli-table3"; +import chalk from "chalk"; +import { removeANSIColors } from "@utils/text"; + +const columns = { + name: "name", + current: "current", + wanted: "wanted", + latest: "latest", + changelog: "changelog", +} as const; + +const orderedColumns: (typeof columns)[keyof typeof columns][] = [ + columns.name, + columns.current, + columns.wanted, + columns.latest, + columns.changelog, +]; + +export const getVersionTable = ( + packages: RefinePackageInstalledVersionData[] = [], +) => { + const tableHead = Object.keys(packages?.[0] || {}); + if (!packages || !tableHead.length) return { table: "", width: 0 }; + + const terminalWidth = process.stdout.columns || 80; + + const nameColumnWidth = + Math.max(...packages.map((row) => row.name.length)) + 2; + const versionColumnWidth = 7 + 2; + const bordersWidth = 6; + const changelogColumnWidth = Math.min( + 35, + terminalWidth - nameColumnWidth - versionColumnWidth * 3 - bordersWidth, + ); + + const columnWidths = { + name: nameColumnWidth, + current: versionColumnWidth, + wanted: versionColumnWidth, + latest: versionColumnWidth, + changelog: changelogColumnWidth, + } as const; + + const table = new Table({ + head: orderedColumns, + wordWrap: false, + wrapOnWordBoundary: true, + colWidths: orderedColumns.map((column) => columnWidths[column]), + style: { + head: ["blue"], + }, + }); + + const ellipsisFromCenter = (text: string, length: number) => { + // if text is longer than length, cut it from the center to fit the length (add ellipsis) + if (text.length > length) { + const fitLength = length - 3; + const start = text.slice(0, Math.floor(fitLength / 2)); + const end = text.slice(-Math.ceil(fitLength / 2)); + return `${start}...${end}`; + } + return text; + }; + + packages.forEach((row) => { + table.push( + orderedColumns.map((column) => { + const columnValue = row[column]; + if (!columnValue) return columnValue; + + if (column === "latest" || column === "wanted") { + const installedVersion = parseVersions(row.current); + const latestVersion = parseVersions(columnValue); + const colors = getColorsByVersionDiffrence( + installedVersion, + latestVersion, + ); + const textMajor = chalk[colors.major](latestVersion.major); + const textMinor = chalk[colors.minor](latestVersion.minor); + const textPatch = chalk[colors.patch](latestVersion.patch); + return `${textMajor}.${textMinor}.${textPatch}`; + } + + if (column === "changelog") { + return chalk.blueBright.underline(columnValue); + } + + return columnValue; + }), + ); + }); + + const tableString = table.toString(); + const tableWidth = removeANSIColors( + tableString.split("\n")?.[0] || "", + ).length; + + return { table: tableString, width: tableWidth }; +}; + +const parseVersions = (text: string) => { + const versions = text.split("."); + return { + major: versions[0], + minor: versions[1], + patch: versions[2], + }; +}; + +const getColorsByVersionDiffrence = ( + installedVersion: ReturnType, + nextVersion: ReturnType, +) => { + const isMajorDiffrence = + installedVersion.major.trim() !== nextVersion.major.trim(); + + if (isMajorDiffrence) + return { + major: "red", + minor: "red", + patch: "red", + } as const; + + const isMinorDiffrence = + installedVersion.minor.trim() !== nextVersion.minor.trim(); + + if (isMinorDiffrence) + return { + major: "white", + minor: "yellow", + patch: "yellow", + } as const; + + const isPatchDiffrence = + installedVersion.patch.trim() !== nextVersion.patch.trim(); + if (isPatchDiffrence) + return { + major: "white", + minor: "white", + patch: "green", + } as const; + + return { + major: "white", + minor: "white", + patch: "white", + } as const; +}; diff --git a/packages/cli/src/update-notifier/index.tsx b/packages/cli/src/update-notifier/index.tsx index 99d15e2fef95..5c77855b7815 100644 --- a/packages/cli/src/update-notifier/index.tsx +++ b/packages/cli/src/update-notifier/index.tsx @@ -124,7 +124,7 @@ export const generateKeyFromPackages = async () => { if (!packages) { console.error( chalk.red( - "Something went wrong when trying to get installed `refine` packages.", + "Something went wrong when trying to get installed `Refine` packages.", ), ); diff --git a/packages/cli/src/utils/package/index.ts b/packages/cli/src/utils/package/index.ts index d9c9c16ccdf1..0944188301ab 100644 --- a/packages/cli/src/utils/package/index.ts +++ b/packages/cli/src/utils/package/index.ts @@ -179,7 +179,7 @@ export const installPackages = async (packages: string[]) => { execution.on("exit", (exitCode) => { if (exitCode === 0) { - console.log("All `refine` packages updated πŸŽ‰"); + console.log("All `Refine` packages updated πŸŽ‰"); return; } diff --git a/packages/devtools-server/FEED.md b/packages/devtools-server/FEED.md index 4cada2920334..cbe57915ac7a 100644 --- a/packages/devtools-server/FEED.md +++ b/packages/devtools-server/FEED.md @@ -1,7 +1,7 @@ # Feed ---section -title: refine devtools is now in beta! +title: Refine devtools is now in beta! author: Ali Emir Şen cover: https://refine.ams3.cdn.digitaloceanspaces.com/devtools/first-feed-cover.png date: 2023-09-19T15:14:00.000Z @@ -10,4 +10,4 @@ avatar: https://avatars.githubusercontent.com/u/11361964 --- -We've released the first beta version of the refine devtools. Feel free to reach us out for any feedback or bug reports. We're looking forward to hearing from you! Check out or [GitHub](https://github.com/refinedev/refine) and [Discord](https://discord.gg/refine) channel. +We've released the first beta version of the Refine devtools. Feel free to reach us out for any feedback or bug reports. We're looking forward to hearing from you! Check out or [GitHub](https://github.com/refinedev/refine) and [Discord](https://discord.gg/refine) channel. diff --git a/packages/devtools-server/src/client/index.html b/packages/devtools-server/src/client/index.html index 85b8fcad2a64..119772f8cd24 100644 --- a/packages/devtools-server/src/client/index.html +++ b/packages/devtools-server/src/client/index.html @@ -8,13 +8,12 @@ /> - - refine devtools + Refine Devtools diff --git a/packages/devtools-server/src/packages/get-available-packages.ts b/packages/devtools-server/src/packages/get-available-packages.ts index 879e4150202c..24bc80f1d885 100644 --- a/packages/devtools-server/src/packages/get-available-packages.ts +++ b/packages/devtools-server/src/packages/get-available-packages.ts @@ -5,7 +5,7 @@ import { getPackagesFromPackageJSON } from "./get-packages-from-package-json"; export const AVAILABLE_PACKAGES: AvailablePackageType[] = [ { name: "@refinedev/ably", - description: "Ably integration for refine", + description: "Ably integration for Refine", install: "npm install @refinedev/ably", usage: dedent( ` @@ -28,7 +28,7 @@ export const AVAILABLE_PACKAGES: AvailablePackageType[] = [ }, { name: "@refinedev/airtable", - description: "Airtable integration for refine", + description: "Airtable integration for Refine", install: "npm install @refinedev/airtable", usage: dedent( ` @@ -49,7 +49,7 @@ export const AVAILABLE_PACKAGES: AvailablePackageType[] = [ }, { name: "@refinedev/antd", - description: "Ant Design integration for refine", + description: "Ant Design integration for Refine", install: "npm install @refinedev/antd antd", usage: dedent( ` @@ -73,7 +73,7 @@ export const AVAILABLE_PACKAGES: AvailablePackageType[] = [ }, { name: "@refinedev/appwrite", - description: "Appwrite integration for refine", + description: "Appwrite integration for Refine", install: "npm install @refinedev/appwrite", usage: dedent( ` @@ -100,7 +100,7 @@ export const AVAILABLE_PACKAGES: AvailablePackageType[] = [ }, { name: "@refinedev/chakra-ui", - description: "Chakra UI integration for refine", + description: "Chakra UI integration for Refine", install: "npm install @refinedev/chakra-ui @chakra-ui/react @emotion/react @emotion/styled framer-motion @tabler/icons-react", usage: dedent( @@ -126,7 +126,7 @@ export const AVAILABLE_PACKAGES: AvailablePackageType[] = [ }, { name: "@refinedev/graphql", - description: "GraphQL integration for refine", + description: "GraphQL integration for Refine", install: "npm install @refinedev/graphql", usage: dedent( ` @@ -149,7 +149,7 @@ export const AVAILABLE_PACKAGES: AvailablePackageType[] = [ }, { name: "@refinedev/hasura", - description: "GraphQL integration for refine", + description: "GraphQL integration for Refine", install: "npm install @refinedev/hasura", usage: dedent( ` @@ -176,7 +176,7 @@ export const AVAILABLE_PACKAGES: AvailablePackageType[] = [ }, { name: "@refinedev/inferencer", - description: "Auto generate views based on your APIs with refine", + description: "Auto generate views based on your APIs with Refine", install: "npm install @refinedev/inferencer", usage: dedent( ` @@ -196,7 +196,7 @@ export const AVAILABLE_PACKAGES: AvailablePackageType[] = [ }, { name: "@refinedev/kbar", - description: "Command palette integration with kbar for refine", + description: "Command palette integration with kbar for Refine", install: "npm install @refinedev/kbar", usage: dedent( ` @@ -218,7 +218,7 @@ export const AVAILABLE_PACKAGES: AvailablePackageType[] = [ }, { name: "@refinedev/mantine", - description: "Mantine UI integration for refine", + description: "Mantine UI integration for Refine", install: "npm install @refinedev/mantine @refinedev/react-table @mantine/core @mantine/hooks @mantine/form @mantine/notifications @emotion/react @tabler/icons-react", usage: dedent( @@ -244,7 +244,7 @@ export const AVAILABLE_PACKAGES: AvailablePackageType[] = [ }, { name: "@refinedev/medusa", - description: "Medusa store integration for refine", + description: "Medusa store integration for Refine", install: "npm install @refinedev/medusa", usage: dedent( ` @@ -266,7 +266,7 @@ export const AVAILABLE_PACKAGES: AvailablePackageType[] = [ }, { name: "@refinedev/mui", - description: "Material UI integration for refine", + description: "Material UI integration for Refine", install: "npm install @refinedev/mui @refinedev/react-hook-form @mui/material @mui/lab @mui/x-data-grid @emotion/react @emotion/styled react-hook-form", usage: dedent( @@ -297,7 +297,7 @@ export const AVAILABLE_PACKAGES: AvailablePackageType[] = [ }, { name: "@refinedev/nestjs-query", - description: "NestJS Query data provider integration for refine", + description: "NestJS Query data provider integration for Refine", install: "npm install @refinedev/nestjs-query graphql-ws", usage: dedent( ` @@ -324,7 +324,7 @@ export const AVAILABLE_PACKAGES: AvailablePackageType[] = [ }, { name: "@refinedev/nestjsx-crud", - description: "NestJSX CRUD data provider integration for refine", + description: "NestJSX CRUD data provider integration for Refine", install: "npm install @refinedev/nestjsx-crud", usage: dedent( ` @@ -345,7 +345,7 @@ export const AVAILABLE_PACKAGES: AvailablePackageType[] = [ }, { name: "@refinedev/react-hook-form", - description: "React Hook Form integration for refine", + description: "React Hook Form integration for Refine", install: "npm install @refinedev/react-hook-form react-hook-form", usage: dedent( ` @@ -371,7 +371,7 @@ export const AVAILABLE_PACKAGES: AvailablePackageType[] = [ }, { name: "@refinedev/react-table", - description: "Tanstack React Table integration for refine", + description: "Tanstack React Table integration for Refine", install: "npm install @refinedev/react-table @tanstack/react-table", usage: dedent( ` @@ -411,7 +411,7 @@ export const AVAILABLE_PACKAGES: AvailablePackageType[] = [ }, { name: "@refinedev/simple-rest", - description: "Data provider integration for REST APIs with refine", + description: "Data provider integration for REST APIs with Refine", install: "npm install @refinedev/simple-rest", usage: dedent( ` @@ -433,7 +433,7 @@ export const AVAILABLE_PACKAGES: AvailablePackageType[] = [ { name: "@refinedev/supabase", description: - "Data provider and live provider integrations for Supabase with refine", + "Data provider and live provider integrations for Supabase with Refine", install: "npm install @refinedev/supabase", usage: dedent( ` @@ -457,7 +457,7 @@ export const AVAILABLE_PACKAGES: AvailablePackageType[] = [ }, { name: "@refinedev/strapi", - description: "Strapi integration of refine", + description: "Strapi integration of Refine", install: "npm install @refinedev/strapi axios", usage: dedent( ` @@ -481,7 +481,7 @@ export const AVAILABLE_PACKAGES: AvailablePackageType[] = [ }, { name: "@refinedev/strapi-v4", - description: "StrapiV4 integration of refine", + description: "StrapiV4 integration of Refine", install: "npm install @refinedev/strapi-v4 axios", usage: dedent( ` diff --git a/packages/devtools-server/src/serve-ws.ts b/packages/devtools-server/src/serve-ws.ts index 5f967606024a..4c95d14fef15 100644 --- a/packages/devtools-server/src/serve-ws.ts +++ b/packages/devtools-server/src/serve-ws.ts @@ -12,7 +12,7 @@ export const serveWs = ( if (error?.code === "EADDRINUSE") { console.error( `\n${cyanBright.bold("\u2717 ")}${bold( - "refine devtools server", + "Refine Devtools server", )} (websocket) failed to start. Port ${SERVER_PORT} is already in use.\n`, ); } else { diff --git a/packages/devtools-server/src/setup-server.ts b/packages/devtools-server/src/setup-server.ts index 372cb2387604..ba23d7623f3f 100644 --- a/packages/devtools-server/src/setup-server.ts +++ b/packages/devtools-server/src/setup-server.ts @@ -11,13 +11,13 @@ export const setupServer = (app: Express, onError: () => void) => { if (error?.code === "EADDRINUSE") { console.error( `\n${cyanBright.bold("\u2717 ")}${bold( - "refine devtools server", + "Refine Devtools server", )} (http) failed to start. Port ${SERVER_PORT} is already in use.\n`, ); } else { console.error( `\n${cyanBright.bold("\u2717 ")}${bold( - "error from refine devtools", + "error from Refine Devtools", )}`, error, ); @@ -32,7 +32,7 @@ export const setupServer = (app: Express, onError: () => void) => { .on("listening", () => { console.log( `\n${cyanBright.bold("\u2713 ")}${bold( - "refine devtools", + "Refine Devtools", )} is running at port ${cyanBright.bold(SERVER_PORT)}\n`, ); }); diff --git a/packages/devtools-ui/src/components/add-package-drawer.tsx b/packages/devtools-ui/src/components/add-package-drawer.tsx index c92f010acf7e..55f74ce45855 100644 --- a/packages/devtools-ui/src/components/add-package-drawer.tsx +++ b/packages/devtools-ui/src/components/add-package-drawer.tsx @@ -198,7 +198,7 @@ export const AddPackageDrawer = ({ "re-font-semibold", )} > - Explore refine packages + Explore Refine packages