diff --git a/packages/cli-app/src/api/configuration/mutations.ts b/packages/cli-app/src/api/configuration/mutations.ts index f1ca7f32..e071e512 100644 --- a/packages/cli-app/src/api/configuration/mutations.ts +++ b/packages/cli-app/src/api/configuration/mutations.ts @@ -2,7 +2,7 @@ import { z } from "zod" import { getConfiguration, setConfiguration } from "@/lib/configuration" import { env } from "@/lib/env" -import { pluginsDirectory } from "@/lib/plugins" +import { rootPluginsDirectory } from "@/lib/plugins" import { handleApiError } from "@/lib/utils/server-utils" import { apiInputFromSchema } from "@/types" import { applyConfigurationTask } from "@next-boilerplate/scripts/utils/template-config/apply.js" @@ -46,7 +46,7 @@ export const applyConfiguration = async ({}: apiInputFromSchema z.object({ name: z.string().optional(), plugins: z.array(fullPluginSchema).optional(), + stores: z.array(z.string()).optional(), }) export type TConfiguration = z.infer> diff --git a/packages/cli-app/src/app/components/sidenav.dr.ts b/packages/cli-app/src/app/components/sidenav.dr.ts index 2725e169..00f7d821 100644 --- a/packages/cli-app/src/app/components/sidenav.dr.ts +++ b/packages/cli-app/src/app/components/sidenav.dr.ts @@ -4,4 +4,5 @@ export const SidenavDr = dictionaryRequirements({ configuration: true, templates: true, plugins: true, + stores: true, }) diff --git a/packages/cli-app/src/app/components/sidenav.tsx b/packages/cli-app/src/app/components/sidenav.tsx index 7b1ec3e2..620f7d23 100644 --- a/packages/cli-app/src/app/components/sidenav.tsx +++ b/packages/cli-app/src/app/components/sidenav.tsx @@ -55,6 +55,10 @@ export default function Sidenav({ afterContent={ 0 ? { @@ -85,6 +89,9 @@ export default function Sidenav({ {dictionary.plugins} + + {dictionary.stores} + ) diff --git a/packages/cli-app/src/app/stores/content.dr.ts b/packages/cli-app/src/app/stores/content.dr.ts new file mode 100644 index 00000000..21385544 --- /dev/null +++ b/packages/cli-app/src/app/stores/content.dr.ts @@ -0,0 +1,15 @@ +import { HeaderDr } from "@/components/ui/header.dr" +import { dictionaryRequirements } from "@/lib/utils/dictionary" + +export const StoresContentDr = dictionaryRequirements( + { + stores: true, + search: true, + addStore: true, + storeRemote: true, + storeRemoteExample: true, + close: true, + save: true, + }, + HeaderDr +) diff --git a/packages/cli-app/src/app/stores/content.tsx b/packages/cli-app/src/app/stores/content.tsx new file mode 100644 index 00000000..9ed856c8 --- /dev/null +++ b/packages/cli-app/src/app/stores/content.tsx @@ -0,0 +1,101 @@ +"use client" + +import { useState } from "react" + +import { Plus } from "lucide-react" + +import Header from "@/components/ui/header" +import ItemCard from "@/components/ui/item-card" +import { ModalHeader } from "@/components/ui/modal" +import { TDictionary } from "@/lib/langs" +import { trpc } from "@/lib/trpc/client" +import { RouterOutputs } from "@/lib/trpc/utils" +import { gitRemoteToName } from "@/lib/utils/client-utils" +import { Button } from "@nextui-org/button" +import { Input } from "@nextui-org/input" +import { Modal, ModalBody, ModalContent, ModalFooter } from "@nextui-org/modal" + +import { StoresContentDr } from "./content.dr" + +export default function StoresContent({ + ssrConfiguration, + dictionary, +}: { + ssrConfiguration: RouterOutputs["configuration"]["getConfiguration"] + dictionary: TDictionary +}) { + const configuration = trpc.configuration.getConfiguration.useQuery(undefined, { + initialData: ssrConfiguration, + }) + + const [isAddStoreOpen, setIsAddStoreOpen] = useState(false) + const [newStoreName, setNewStoreName] = useState("") + + const utils = trpc.useUtils() + const updateConfigurationMutation = trpc.configuration.updateConfiguration.useMutation({ + onSuccess: async () => { + await utils.configuration.invalidate() + }, + }) + const onAddStore = async (e: React.FormEvent) => { + e.preventDefault() + if (!newStoreName) return + await updateConfigurationMutation.mutateAsync({ + configuration: { + ...configuration.data.configuration, + stores: Array.from(new Set([...(configuration.data.configuration.stores ?? []), newStoreName])), + }, + }) + setIsAddStoreOpen(false) + setNewStoreName("") + } + + const isPending = updateConfigurationMutation.isPending + + return ( + <> +
setIsAddStoreOpen(true)} isLoading={isPending}> + + {dictionary.addStore} + + } + /> +
    + {(configuration.data.configuration.stores ?? []).map((storeRemote) => ( + + ))} +
+ + + {(onClose) => ( + <> + {dictionary.addStore} +
+ + + + + + + +
+ + )} +
+
+ + ) +} diff --git a/packages/cli-app/src/app/stores/page.tsx b/packages/cli-app/src/app/stores/page.tsx new file mode 100644 index 00000000..79ec9932 --- /dev/null +++ b/packages/cli-app/src/app/stores/page.tsx @@ -0,0 +1,20 @@ +import Section from "@/components/ui/section" +import { getDictionary } from "@/lib/langs" +import { serverTrpc } from "@/lib/trpc/server" +import { dictionaryRequirements } from "@/lib/utils/dictionary" +import { extractLocale } from "@/lib/utils/server-utils" + +import StoresContent from "./content" +import { StoresContentDr } from "./content.dr" + +export default async function Stores() { + const locale = extractLocale() + const dictionary = await getDictionary(locale, dictionaryRequirements(StoresContentDr)) + const ssrConfiguration = await serverTrpc.configuration.getConfiguration() + + return ( +
+ +
+ ) +} diff --git a/packages/cli-app/src/components/ui/item-card.tsx b/packages/cli-app/src/components/ui/item-card.tsx index 7eb5fb23..c7d4bedd 100644 --- a/packages/cli-app/src/components/ui/item-card.tsx +++ b/packages/cli-app/src/components/ui/item-card.tsx @@ -24,7 +24,7 @@ export default function ItemCard({ title: string subTitle?: React.ReactNode actions?: React.ReactNode - description: string + description?: string className?: string endContent?: React.ReactNode href?: string @@ -39,7 +39,7 @@ export default function ItemCard({
{actions}
-

{description}

+ {description !== undefined &&

{description}

} {endContent} ) diff --git a/packages/cli-app/src/langs/en.json b/packages/cli-app/src/langs/en.json index 3df61add..97d7feb5 100644 --- a/packages/cli-app/src/langs/en.json +++ b/packages/cli-app/src/langs/en.json @@ -237,5 +237,10 @@ "pluginSettings": "Plugin settings", "apply": "Apply", "configurationApplied": "Configuration applied", - "search": "Search" + "search": "Search", + "stores": "Stores", + "store": "Store", + "addStore": "Add store", + "storeRemote": "Store URL (git)", + "storeRemoteExample": "git@github.com:rharkor/next-boilerplate--store.git" } \ No newline at end of file diff --git a/packages/cli-app/src/langs/fr.json b/packages/cli-app/src/langs/fr.json index 917b20c0..6e1113cd 100644 --- a/packages/cli-app/src/langs/fr.json +++ b/packages/cli-app/src/langs/fr.json @@ -237,5 +237,10 @@ "pluginSettings": "Paramètres du plugin", "apply": "Appliquer", "configurationApplied": "Configuration appliquée", - "search": "Rechercher" + "search": "Rechercher", + "stores": "Magasins", + "store": "Magasin", + "addStore": "Ajouter un magasin", + "storeRemote": "URL du magasin (git)", + "storeRemoteExample": "git@github.com:rharkor/next-boilerplate--store.git" } \ No newline at end of file diff --git a/packages/cli-app/src/lib/configuration/index.ts b/packages/cli-app/src/lib/configuration/index.ts index 546c708d..4e98e95d 100644 --- a/packages/cli-app/src/lib/configuration/index.ts +++ b/packages/cli-app/src/lib/configuration/index.ts @@ -42,6 +42,8 @@ const webConfigToApiConfig = (webConfig: TConfiguration): z.infer { const pluginsFilled: TPluginStore[] = [] const stores = await getStores() for (const store of stores) { const pluginsDirectory = path.join(store.fullPath, "data", "plugins") - logger.debug(`Loading plugins (${pluginsDirectory})`) if (!(await fs.exists(pluginsDirectory))) { throw new TRPCError({ message: `The plugins directory doesn't exist at ${pluginsDirectory}`, @@ -58,10 +64,6 @@ const loadPlugins = async () => { pluginsFilled.sort((a, b) => a.name.localeCompare(b.name)) - pluginsFilled.forEach((plugin) => { - logger.debug(`Plugin ${plugin.id} loaded`) - }) - setPluginsToStore(pluginsFilled) return pluginsFilled } diff --git a/packages/cli-app/src/lib/utils/client-utils.ts b/packages/cli-app/src/lib/utils/client-utils.ts index 772f15ee..d944f770 100644 --- a/packages/cli-app/src/lib/utils/client-utils.ts +++ b/packages/cli-app/src/lib/utils/client-utils.ts @@ -51,3 +51,7 @@ export const handleMutationError = >( } return resp } + +export const gitRemoteToName = (remote: string) => { + return remote.replace(/.*\//, "").replace(/\.git$/, "") +} diff --git a/packages/cli/assets/stores/0/config.json b/packages/cli/assets/stores/0/config.json deleted file mode 100644 index dd83a81c..00000000 --- a/packages/cli/assets/stores/0/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "remote": "git@github.com:rharkor/next-boilerplate.git" -} \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/app/empty/app/.gitkeep b/packages/cli/assets/stores/0/data/plugins/app/empty/app/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/cli/assets/stores/0/data/plugins/app/empty/config.json b/packages/cli/assets/stores/0/data/plugins/app/empty/config.json deleted file mode 100644 index 0a38bbca..00000000 --- a/packages/cli/assets/stores/0/data/plugins/app/empty/config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "../../component.d.json", - "name": "Empty app directory", - "description": "Generates an empty app directory", - "paths": [ - { - "from": "app", - "to": "app" - } - ] -} \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/conventional-commits/default/.git-hooks/commit-msg b/packages/cli/assets/stores/0/data/plugins/conventional-commits/default/.git-hooks/commit-msg deleted file mode 100755 index 0ea01d05..00000000 --- a/packages/cli/assets/stores/0/data/plugins/conventional-commits/default/.git-hooks/commit-msg +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -# fix for windows systems -PATH="/c/Program Files/nodejs:$HOME/AppData/Roaming/npm/:$PATH" - -git-conventional-commits commit-msg-hook "$1" \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/conventional-commits/default/config.json b/packages/cli/assets/stores/0/data/plugins/conventional-commits/default/config.json deleted file mode 100644 index e1d3b248..00000000 --- a/packages/cli/assets/stores/0/data/plugins/conventional-commits/default/config.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "../../component.d.json", - "name": "Git hooks", - "description": "Execute git-conventional-commits on commit", - "paths": [ - { - "from": ".git-hooks", - "to": ".git-hooks" - }, - { - "from": "git-conventional-commits.yaml", - "to": "git-conventional-commits.yaml" - } - ] -} \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/conventional-commits/default/git-conventional-commits.yaml b/packages/cli/assets/stores/0/data/plugins/conventional-commits/default/git-conventional-commits.yaml deleted file mode 100644 index 1aec83f5..00000000 --- a/packages/cli/assets/stores/0/data/plugins/conventional-commits/default/git-conventional-commits.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -convention: - commitTypes: - - feat - - fix - - perf - - refactor - - style - - test - - build - - ops - - docs - - chore - - merge - - revert - commitScopes: [] - releaseTagGlobPattern: v[0-9]*.[0-9]*.[0-9]* -changelog: - commitTypes: - - feat - - fix - - perf - - merge - includeInvalidCommits: true - commitIgnoreRegexPattern: "^WIP " - headlines: - feat: Features - fix: Bug Fixes - perf: Performance Improvements - merge: Merges - breakingChange: BREAKING CHANGES - - ## GitHub - # commitUrl: https://github.com/ACCOUNT/REPOSITORY/commit/%commit% - # commitRangeUrl: https://github.com/ACCOUNT/REPOSITORY/compare/%from%...%to%?diff=split - - ## GitHub Issues - # issueRegexPattern: "#[0-9]+" - # issueUrl: https://github.com/ACCOUNT/REPOSITORY/issues/%issue% - - ## Jira Issues - # issueRegexPattern: "[A-Z][A-Z0-9]+-[0-9]+" - # issueUrl: https://WORKSPACE.atlassian.net/browse/%issue% diff --git a/packages/cli/assets/stores/0/data/plugins/devcontainer/default/.devcontainer/Dockerfile b/packages/cli/assets/stores/0/data/plugins/devcontainer/default/.devcontainer/Dockerfile deleted file mode 100644 index 37fbbb16..00000000 --- a/packages/cli/assets/stores/0/data/plugins/devcontainer/default/.devcontainer/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye - -# Install additional OS packages. -RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ - && apt-get -y install --no-install-recommends git zsh nano vim gnupg software-properties-common - -# [Optional] Uncomment if you want to install an additional version of node using nvm -# ARG EXTRA_NODE_VERSION=10 -# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}" - -# Install more global node modules -RUN su node -c "npm install -g npm@latest" -RUN su node -c "npm install -g turbo" \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/devcontainer/default/.devcontainer/devcontainer.json b/packages/cli/assets/stores/0/data/plugins/devcontainer/default/.devcontainer/devcontainer.json deleted file mode 100644 index ae7cbeac..00000000 --- a/packages/cli/assets/stores/0/data/plugins/devcontainer/default/.devcontainer/devcontainer.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "next-boilerplate", - - // Update the 'dockerComposeFile' list if you have more compose files or use different names. - // The .devcontainer/docker-compose.yml file contains any overrides you need/want to make. - "dockerComposeFile": "docker-compose.yml", - - // The 'service' property is the name of the service for the container that VS Code should - // use. Update this value and .devcontainer/docker-compose.yml to the real service name. - "service": "app", - - // The optional 'workspaceFolder' property is the path VS Code should open by default when - // connected. This is typically a file mount in .devcontainer/docker-compose.yml - "workspaceFolder": "/workspace", - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - "forwardPorts": [], - - "portsAttributes": {}, - - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "/bin/sh -c ./.devcontainer/post-create-command.sh", - - "customizations": { - "vscode": { - "extensions": [ - "formulahendry.auto-rename-tag", - "aaron-bond.better-comments", - "WallabyJs.console-ninja", - "EditorConfig.EditorConfig", - "dsznajder.es7-react-js-snippets", - "dbaeumer.vscode-eslint", - "tombonnike.vscode-status-bar-format-toggle", - "github.vscode-github-actions", - "GitHub.copilot", - "GitHub.copilot-chat", - "eamodio.gitlens", - "ecmel.vscode-html-css", - "Zignd.html-css-class-completion", - "yzhang.markdown-all-in-one", - "esbenp.prettier-vscode", - "Prisma.prisma", - "bradlc.vscode-tailwindcss", - "donjayamanne.githistory", - "ms-azuretools.vscode-docker", - "ftonato.password-generator", - "adamhartford.vscode-base64", - "ChakrounAnas.turbo-console-log", - "yoavbls.pretty-ts-errors", - "humao.rest-client", - "tldraw-org.tldraw-vscode", - "unifiedjs.vscode-mdx" - ] - } - } - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} diff --git a/packages/cli/assets/stores/0/data/plugins/devcontainer/default/.devcontainer/docker-compose.yml b/packages/cli/assets/stores/0/data/plugins/devcontainer/default/.devcontainer/docker-compose.yml deleted file mode 100644 index 5c52f2ed..00000000 --- a/packages/cli/assets/stores/0/data/plugins/devcontainer/default/.devcontainer/docker-compose.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: next-boilerplate -services: - app: - build: - context: . - dockerfile: Dockerfile - - volumes: - - ..:/workspace:cached - - node_modules:/workspace/node_modules - - # Overrides default command so things don't shut down after the process ends. - command: sleep infinity - - # Use "forwardPorts" in **devcontainer.json** to forward an app port locally. - # (Adding the "ports" property to this file will not forward from a Codespace.) - -volumes: - node_modules: diff --git a/packages/cli/assets/stores/0/data/plugins/devcontainer/default/.devcontainer/extensions.txt b/packages/cli/assets/stores/0/data/plugins/devcontainer/default/.devcontainer/extensions.txt deleted file mode 100644 index edf8fb1d..00000000 --- a/packages/cli/assets/stores/0/data/plugins/devcontainer/default/.devcontainer/extensions.txt +++ /dev/null @@ -1,26 +0,0 @@ -formulahendry.auto-rename-tag -aaron-bond.better-comments -WallabyJs.console-ninja -EditorConfig.EditorConfig -dsznajder.es7-react-js-snippets -dbaeumer.vscode-eslint -tombonnike.vscode-status-bar-format-toggle -github.vscode-github-actions -GitHub.copilot -GitHub.copilot-chat -eamodio.gitlens -ecmel.vscode-html-css -Zignd.html-css-class-completion -yzhang.markdown-all-in-one -esbenp.prettier-vscode -Prisma.prisma -bradlc.vscode-tailwindcss -donjayamanne.githistory -ms-azuretools.vscode-docker -ftonato.password-generator -adamhartford.vscode-base64 -ChakrounAnas.turbo-console-log -yoavbls.pretty-ts-errors -humao.rest-client -tldraw-org.tldraw-vscode -unifiedjs.vscode-mdx \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/devcontainer/default/.devcontainer/post-create-command.sh b/packages/cli/assets/stores/0/data/plugins/devcontainer/default/.devcontainer/post-create-command.sh deleted file mode 100755 index 08df7cbc..00000000 --- a/packages/cli/assets/stores/0/data/plugins/devcontainer/default/.devcontainer/post-create-command.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -set -e - -echo "🔓 Changing node_modules permissions" -sudo chown node node_modules - -echo "📦 Installing dependencies" -npm i -s \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/devcontainer/default/config.json b/packages/cli/assets/stores/0/data/plugins/devcontainer/default/config.json deleted file mode 100644 index ea16c1a6..00000000 --- a/packages/cli/assets/stores/0/data/plugins/devcontainer/default/config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "../../component.d.json", - "name": "Default devcontainer configuration", - "description": "Open VS Code in a linux container", - "paths": [ - { - "from": ".devcontainer", - "to": ".devcontainer" - } - ] -} \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/github/issue-template/default/ISSUE_TEMPLATE/bug_report.yml b/packages/cli/assets/stores/0/data/plugins/github/issue-template/default/ISSUE_TEMPLATE/bug_report.yml deleted file mode 100644 index a0dd5ca0..00000000 --- a/packages/cli/assets/stores/0/data/plugins/github/issue-template/default/ISSUE_TEMPLATE/bug_report.yml +++ /dev/null @@ -1,88 +0,0 @@ -name: "Bug report" -title: "[BUG] - YOUR_ISSUE_TITLE_HERE_REPLACE_ME" -description: Create a report to help us improve -labels: [bug] -body: - - type: markdown - attributes: - value: | - Thank you for reporting an issue :pray:. - - This issue tracker is for reporting bugs found in [next-boilerplate github repository](https://github.com/rharkor/next-boilerplate/) - If you have a question about how to achieve something and are struggling, please post a question - inside of either of the following places: - - next-boilerplate's [Discussion's tab](https://github.com/rharkor/next-boilerplate/discussions) - - - Before submitting a new bug/issue, please check the links below to see if there is a solution or question posted there already: - - next-boilerplate's [Issue's tab](https://github.com/rharkor/next-boilerplate/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) - - next-boilerplate's [closed issues tab](https://github.com/rharkor/next-boilerplate/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aclosed) - - next-boilerplate's [Discussions tab](https://github.com/rharkor/next-boilerplate/discussions) - - The more information you fill in, the better the community can help you. - - type: input - id: version - attributes: - label: next-boilerplate version - description: | - Please provide the version of next-boilerplate you are using. - placeholder: ex. 2.4.2 - validations: - required: false - - type: textarea - id: description - attributes: - label: Describe the bug - description: Provide a clear and concise description of the challenge you are running into. - validations: - required: true - - type: input - id: link - attributes: - label: Reproduction Link - description: | - If you have a reproduction link, please provide it here. - placeholder: | - e.g. https://stackblitz.com/edit/...... OR Github Repo - validations: - required: false - - type: textarea - id: steps - attributes: - label: Steps to Reproduce the Bug or Issue - description: Describe the steps we have to take to reproduce the behavior. - placeholder: | - 1. Go to '...' - 2. Click on '....' - 3. Scroll down to '....' - 4. See error - validations: - required: true - - type: textarea - id: expected - attributes: - label: Expected behavior - description: Provide a clear and concise description of what you expected to happen. - placeholder: | - As a user, I expected ___ behavior but i am seeing ___ - validations: - required: true - - type: textarea - id: screenshots_or_videos - attributes: - label: Screenshots or Videos - description: | - If applicable, add screenshots or a video to help explain your problem. - For more information on the supported file image/file types and the file size limits, please refer - to the following link: https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/attaching-files - placeholder: | - You can drag your video or image files inside of this editor ↓ - - type: input - id: os - attributes: - label: Operating System Version - description: What operating system are you using? - placeholder: | - - OS: [e.g. macOS, Windows, Linux] - validations: - required: true diff --git a/packages/cli/assets/stores/0/data/plugins/github/issue-template/default/ISSUE_TEMPLATE/feature_request.yml b/packages/cli/assets/stores/0/data/plugins/github/issue-template/default/ISSUE_TEMPLATE/feature_request.yml deleted file mode 100644 index 5be482ba..00000000 --- a/packages/cli/assets/stores/0/data/plugins/github/issue-template/default/ISSUE_TEMPLATE/feature_request.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Feature request -title: "[Feature Request] YOUR_FEATURE_TITLE_HERE_REPLACE_ME" -labels: [feature request] -description: | - 💡 Suggest an idea for the `next-boilerplate` project - Examples - - propose a new component - - improve an exiting component - - ....etc -body: - - type: markdown - attributes: - value: | - This issue form is for requesting features only! For example, requesting a new component, behavior ... etc - If you want to report a bug, please use the [bug report form](https://github.com/rharkor/next-boilerplate/issues/new?assignees=&labels=&template=bug_report.yml). - - type: textarea - validations: - required: true - attributes: - label: Is your feature request related to a problem? Please describe. - description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - - type: textarea - validations: - required: true - attributes: - label: Describe the solution you'd like - description: A clear and concise description of what you want to happen. - placeholder: | - As a user, I expected ___ behavior but ___ ... - - Ideal Steps I would like to see: - 1. Go to '...' - 2. Click on '....' - 3. .... - - type: textarea - validations: - required: true - attributes: - label: Describe alternatives you've considered - description: A clear and concise description of any alternative solutions or features you've considered. - - type: textarea - attributes: - label: Screenshots or Videos - description: | - If applicable, add screenshots or a video to help explain your problem. - For more information on the supported file image/file types and the file size limits, please refer - to the following link: https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/attaching-files - placeholder: | - You can drag your video or image files inside of this editor ↓ diff --git a/packages/cli/assets/stores/0/data/plugins/github/issue-template/default/config.json b/packages/cli/assets/stores/0/data/plugins/github/issue-template/default/config.json deleted file mode 100644 index d0e7397a..00000000 --- a/packages/cli/assets/stores/0/data/plugins/github/issue-template/default/config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "../../../component.d.json", - "name": "Default gitHub issue template", - "description": "FitHub issue template with bug report and feature request", - "paths": [ - { - "from": "ISSUE_TEMPLATE", - "to": ".github/ISSUE_TEMPLATE" - } - ] -} \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/github/workflows/default/config.json b/packages/cli/assets/stores/0/data/plugins/github/workflows/default/config.json deleted file mode 100644 index 25339a88..00000000 --- a/packages/cli/assets/stores/0/data/plugins/github/workflows/default/config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "../../../component.d.json", - "name": "Default gitHub workflows", - "description": "Basic github workflows configuration (check, deploy, release)", - "paths": [ - { - "from": "workflows", - "to": ".github/workflows" - } - ] -} \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/github/workflows/default/workflows/check.yml b/packages/cli/assets/stores/0/data/plugins/github/workflows/default/workflows/check.yml deleted file mode 100644 index 99cdd45b..00000000 --- a/packages/cli/assets/stores/0/data/plugins/github/workflows/default/workflows/check.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: Check - -on: - #? We want to run this workflow on pull requests to the dev branch - #? Because we use the git flow workflow, the dev branch is the one that will receive the pull requests that may be invalid - pull_request: - branches: - - dev - workflow_dispatch: - -jobs: - check: - name: Check - runs-on: ubuntu-latest - env: - TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} - TURBO_TEAM: ${{ vars.TURBO_TEAM }} - TURBO_REMOTE_ONLY: true - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 2 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "20.x" - cache: "npm" - - name: Install dependencies - run: npm install - - name: Cache for Turbo - uses: rharkor/caching-for-turbo@v1.5 - - name: Init - run: npm run init - - name: Lint check - run: npm run lint - - name: Format check - run: npm run prettier - - name: Unit & Integration tests - run: npm run test - - name: Check dependencies usage - run: npm run depcheck - - name: Advanced check - run: npm run ci-check - - build: - name: Build - runs-on: ubuntu-latest - env: - TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} - TURBO_TEAM: ${{ vars.TURBO_TEAM }} - TURBO_REMOTE_ONLY: true - steps: - - uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "20.x" - cache: "npm" - - name: Install dependencies - run: npm install - - name: Cache for Turbo - uses: rharkor/caching-for-turbo@v1.5 - - name: Init - run: npm run init - - name: Build - run: npm run type-check diff --git a/packages/cli/assets/stores/0/data/plugins/github/workflows/default/workflows/deploy.yml b/packages/cli/assets/stores/0/data/plugins/github/workflows/default/workflows/deploy.yml deleted file mode 100644 index b602ca98..00000000 --- a/packages/cli/assets/stores/0/data/plugins/github/workflows/default/workflows/deploy.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Deployment - -on: - push: - branches: - - dev - - rec - - main - - workflow_dispatch: - inputs: - FORCE_APP_DEPLOY: - description: "Force deploy app" - required: false - default: "false" - -env: - # push => github.event.before - # pull_request => github.event.pull_request.base.sha - # workflow_dispatch => HEAD^ - TURBO_RUN_FILTER: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event_name == 'push' && github.event.before || 'HEAD^' }} - -jobs: - checks: - name: Build - runs-on: ubuntu-latest - outputs: - changed-app: ${{ steps.changed-app.outputs.result }} - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "20.x" - cache: "npm" - - name: Changeset - id: changeset - # 1. We need the 'output' of a turbo dry-run to get a json with all affected packages of these run. - # 2. The multi line json string is transformed to a single line string. - # 3. The single line json string is set to an 'output' (or result) of this step. - run: | - content=`npx -y turbo build --filter="...[$TURBO_RUN_FILTER]" --dry-run=json` - echo 'result<> $GITHUB_OUTPUT - echo $content >> $GITHUB_OUTPUT - echo 'EOF' >> $GITHUB_OUTPUT - echo $content > $GITHUB_WORKSPACE/result.json - - name: Upload Result as Artifact - uses: actions/upload-artifact@v4 - with: - name: changeset-result - path: ${{ github.workspace }}/result.json - - name: Changed app? - id: changed-app - if: ${{ contains(fromJSON(steps.changeset.outputs.result).packages, '@next-boilerplate/app') || github.event.inputs.FORCE_APP_DEPLOY == 'true' }} - run: | - echo "result=true" >> $GITHUB_OUTPUT - - deploy_app: - name: Deploy app - runs-on: ubuntu-latest - needs: checks - if: ${{ needs.checks.outputs.changed-app == 'true' }} - steps: - - name: Deploy app - run: | - echo "### Deploying app 🚀" >> $GITHUB_STEP_SUMMARY - echo "Found changes in app compared to this commit $TURBO_RUN_FILTER" >> $GITHUB_STEP_SUMMARY diff --git a/packages/cli/assets/stores/0/data/plugins/github/workflows/default/workflows/release.yml b/packages/cli/assets/stores/0/data/plugins/github/workflows/default/workflows/release.yml deleted file mode 100644 index 3adbe864..00000000 --- a/packages/cli/assets/stores/0/data/plugins/github/workflows/default/workflows/release.yml +++ /dev/null @@ -1,102 +0,0 @@ -name: Release -on: - push: - branches: - - main - - main-release - - rec - - rec-release - - workflow_dispatch: - -permissions: - contents: read # for checkout - -jobs: - # This job is used to sync the main branch to the main:release branch and the rec branch to the rec:release branch - sync: - name: Sync - runs-on: ubuntu-latest - permissions: - contents: write # to be able to push to the main:release and rec:release branches - id-token: write # to enable use of OIDC for npm provenance - if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rec' - steps: - - name: Generate token - id: generate_token - uses: tibdex/github-app-token@v2 - with: - app_id: ${{ secrets.MYBOT_APP_ID }} - private_key: ${{ secrets.MYBOT_PRIVATE_KEY }} - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - token: ${{ steps.generate_token.outputs.token }} - - name: Setup Git Config - run: | - git config user.name "GitHub Actions" - git config user.email "github-actions@example.com" - - - name: Sync Branch - run: | - SOURCE_BRANCH="${GITHUB_REF_NAME}" - TARGET_BRANCH="${GITHUB_REF_NAME}-release" - MAIN_RELEASE_BRANCH="main-release" - # Fetch all - git fetch origin - # Create the main-release branch from main if it doesn't exist - if ! git show-ref --verify --quiet "refs/remotes/origin/${MAIN_RELEASE_BRANCH}"; then - echo "Target branch ${MAIN_RELEASE_BRANCH} does not exist. Creating it from main." - git checkout -b ${MAIN_RELEASE_BRANCH} origin/main - git push --set-upstream origin ${MAIN_RELEASE_BRANCH} - fi - # Check if the target branch exists and checkout to it - if git show-ref --verify --quiet "refs/remotes/origin/${TARGET_BRANCH}"; then - git checkout ${TARGET_BRANCH} - else - echo "Target branch ${TARGET_BRANCH} does not exist. Creating it from ${SOURCE_BRANCH}." - git checkout -b ${TARGET_BRANCH} origin/${SOURCE_BRANCH} - git push --set-upstream origin ${TARGET_BRANCH} - fi - # Merge changes from SOURCE_BRANCH to TARGET_BRANCH, favoring 'theirs' for conflicts - git merge -X theirs origin/${SOURCE_BRANCH} - # Push changes to TARGET_BRANCH - git push origin ${TARGET_BRANCH} - env: - GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} - - release: - name: Release - runs-on: ubuntu-latest - permissions: - contents: write # to be able to publish a GitHub release - issues: write # to be able to comment on released issues - pull-requests: write # to be able to comment on released pull requests - id-token: write # to enable use of OIDC for npm provenance - if: (github.ref == 'refs/heads/main-release' || github.ref == 'refs/heads/rec-release') - steps: - - name: Generate token - id: generate_token - uses: tibdex/github-app-token@v2 - with: - app_id: ${{ secrets.MYBOT_APP_ID }} - private_key: ${{ secrets.MYBOT_PRIVATE_KEY }} - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - token: ${{ steps.generate_token.outputs.token }} - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "20.x" - cache: "npm" - - name: Install dependencies - run: npm install - # - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies - # run: npm audit signatures - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: npx semantic-release diff --git a/packages/cli/assets/stores/0/data/plugins/gitignore/default/config.json b/packages/cli/assets/stores/0/data/plugins/gitignore/default/config.json deleted file mode 100644 index 8a1db7cd..00000000 --- a/packages/cli/assets/stores/0/data/plugins/gitignore/default/config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "../../component.d.json", - "name": "Default gitignore", - "description": "Default gitignore configuration", - "paths": [ - { - "from": "default.gitignore", - "to": ".gitignore" - } - ] -} \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/gitignore/default/default.gitignore b/packages/cli/assets/stores/0/data/plugins/gitignore/default/default.gitignore deleted file mode 100644 index 13d2affe..00000000 --- a/packages/cli/assets/stores/0/data/plugins/gitignore/default/default.gitignore +++ /dev/null @@ -1,49 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -node_modules -.pnp -.pnp.js - -# testing -coverage - -# next.js -.next/ -out/ -build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* -.pnpm-debug.log* - -# local env files -.env.development.local -.env.test.local -.env.production.local -.env - -# Playwright -/test-results/ -/playwright-report/ -/playwright/.cache/ - -# Turbo -.turbo - -# Basic build files -dist - - -# Terraform -*.terraform* -!.terraform.lock.hcl -!terraform.tfstate -*.tfstate.backup -.auto.tfvars.json \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/license/default/LICENSE b/packages/cli/assets/stores/0/data/plugins/license/default/LICENSE deleted file mode 100644 index cb582d40..00000000 --- a/packages/cli/assets/stores/0/data/plugins/license/default/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 HUORT Louis - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/packages/cli/assets/stores/0/data/plugins/license/default/config.json b/packages/cli/assets/stores/0/data/plugins/license/default/config.json deleted file mode 100644 index d4f5a63b..00000000 --- a/packages/cli/assets/stores/0/data/plugins/license/default/config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "../../component.d.json", - "name": "MIT License", - "description": "", - "paths": [ - { - "from": "LICENSE", - "to": "LICENSE" - } - ] -} \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/makefile/default/Makefile b/packages/cli/assets/stores/0/data/plugins/makefile/default/Makefile deleted file mode 100644 index d6b3932c..00000000 --- a/packages/cli/assets/stores/0/data/plugins/makefile/default/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -.PHONY: buildnrun bnr help - -# The default goal is 'help' -.DEFAULT_GOAL := help - -# Main build and run target -buildnrun: - @$(MAKE) -s _buildnrun CMD=$(filter-out $@,$(MAKECMDGOALS)) - -# Alias for buildnrun -bnr: - @$(MAKE) -s _buildnrun CMD=$(filter-out $@,$(MAKECMDGOALS)) - -# Internal buildnrun target -_buildnrun: -ifeq ($(CMD),app) - docker build -f apps/app/Dockerfile -t next-boilerplate/app --network host . - docker run -e PORT=8080 --network host next-boilerplate/app -else - @echo "Please provide a valid target. List of available targets:" - @echo " - app" -endif - -# Help message -help: - @echo "Available commands:" - @echo " make buildnrun - Build and run the Docker container for " - @echo " make bnr - Alias for buildnrun " - @echo " make help - Display this help message" \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/makefile/default/config.json b/packages/cli/assets/stores/0/data/plugins/makefile/default/config.json deleted file mode 100644 index 7e474542..00000000 --- a/packages/cli/assets/stores/0/data/plugins/makefile/default/config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "../../component.d.json", - "name": "Default makefile", - "description": "Basic makefile with buildnrun command to start a docker app", - "paths": [ - { - "from": "Makefile", - "to": "Makefile" - } - ] -} \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/packages/empty/config.json b/packages/cli/assets/stores/0/data/plugins/packages/empty/config.json deleted file mode 100644 index 3fb1ffed..00000000 --- a/packages/cli/assets/stores/0/data/plugins/packages/empty/config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "../../component.d.json", - "name": "Empty packages directory", - "description": "Generates an empty packages directory", - "paths": [ - { - "from": "packages", - "to": "packages" - } - ] -} \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/packages/empty/packages/.gitkeep b/packages/cli/assets/stores/0/data/plugins/packages/empty/packages/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/cli/assets/stores/0/data/plugins/releaserc/default/.releaserc.json b/packages/cli/assets/stores/0/data/plugins/releaserc/default/.releaserc.json deleted file mode 100644 index 5c3fdb35..00000000 --- a/packages/cli/assets/stores/0/data/plugins/releaserc/default/.releaserc.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "branches": [ - { - "name": "rec-release", - "channel": "beta", - "prerelease": true - }, - { - "name": "main-release" - } - ], - "plugins": [ - [ - "@semantic-release/npm", - { - "npmPublish": false - } - ], - [ - "@semantic-release/commit-analyzer", - { - "preset": "conventionalCommits", - "releaseRules": [ - { - "type": "revert", - "scope": "*", - "release": "patch" - }, - { - "type": "docs", - "scope": "*", - "release": "patch" - }, - { - "type": "style", - "scope": "*", - "release": "patch" - }, - { - "type": "chore", - "scope": "*", - "release": "patch" - }, - { - "type": "refactor", - "scope": "*", - "release": "patch" - }, - { - "type": "test", - "scope": "*", - "release": "patch" - }, - { - "type": "build", - "scope": "*", - "release": "patch" - }, - { - "type": "ci", - "scope": "*", - "release": "patch" - }, - { - "type": "improvement", - "scope": "*", - "release": "patch" - } - ] - } - ], - [ - "@semantic-release/release-notes-generator", - { - "preset": "conventionalCommits", - "presetConfig": { - "types": [ - { - "type": "feat", - "section": "Features" - }, - { - "type": "fix", - "section": "Bug Fixes" - }, - { - "type": "perf", - "section": "Performance Improvements" - }, - { - "type": "revert", - "section": "Reverts" - }, - { - "type": "docs", - "section": "Documentation", - "hidden": false - }, - { - "type": "style", - "section": "Styles", - "hidden": false - }, - { - "type": "chore", - "section": "Miscellaneous Chores", - "hidden": false - }, - { - "type": "refactor", - "section": "Code Refactors", - "hidden": false - }, - { - "type": "test", - "section": "Tests", - "hidden": false - }, - { - "type": "build", - "section": "Build System", - "hidden": false - }, - { - "type": "ci", - "section": "CI/CD", - "hidden": false - }, - { - "type": "improvement", - "section": "Improvements", - "hidden": false - } - ] - } - } - ], - [ - "@semantic-release/github", - { - "successCommentCondition": "<% return issue.user.type !== 'Bot'; %>" - } - ], - "@semantic-release/git", - "@semantic-release/changelog" - ] -} \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/releaserc/default/config.json b/packages/cli/assets/stores/0/data/plugins/releaserc/default/config.json deleted file mode 100644 index 300456fc..00000000 --- a/packages/cli/assets/stores/0/data/plugins/releaserc/default/config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "../../component.d.json", - "name": "Default semantic-release configuration", - "description": "Automate versioning and package publishing with semantic-release", - "paths": [ - { - "from": ".releaserc.json", - "to": ".releaserc.json" - } - ] -} \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/turbo/default/config.json b/packages/cli/assets/stores/0/data/plugins/turbo/default/config.json deleted file mode 100644 index cb7457db..00000000 --- a/packages/cli/assets/stores/0/data/plugins/turbo/default/config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "../../component.d.json", - "name": "Default turbo configuration", - "description": "Basic steps configuration for turbo (build, lint, dev, ...)", - "paths": [ - { - "from": "turbo.json", - "to": "turbo.json" - } - ] -} \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/turbo/default/turbo.json b/packages/cli/assets/stores/0/data/plugins/turbo/default/turbo.json deleted file mode 100644 index f9ee12c6..00000000 --- a/packages/cli/assets/stores/0/data/plugins/turbo/default/turbo.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "https://turbo.build/schema.json", - "tasks": { - "build": { - "dependsOn": [ - "^build" - ] - }, - "type-check": { - "dependsOn": [ - "^type-check" - ] - }, - "test": {}, - "ci-check": {}, - "lint": {}, - "lint:fix": { - "cache": false - }, - "prettier": {}, - "prettier:fix": { - "cache": false - }, - "dev": { - "cache": false, - "persistent": true - } - } -} \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/vscode/default/.vscode/settings.json b/packages/cli/assets/stores/0/data/plugins/vscode/default/.vscode/settings.json deleted file mode 100644 index bbc7cf55..00000000 --- a/packages/cli/assets/stores/0/data/plugins/vscode/default/.vscode/settings.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "editor.codeActionsOnSave": { - "source.fixAll": "explicit" - }, - "editor.formatOnSave": true -} \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/vscode/default/config.json b/packages/cli/assets/stores/0/data/plugins/vscode/default/config.json deleted file mode 100644 index fa910b06..00000000 --- a/packages/cli/assets/stores/0/data/plugins/vscode/default/config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "../../component.d.json", - "name": "Default vscode configuration", - "description": "Suggested vscode configuration with format on save", - "paths": [ - { - "from": ".vscode", - "to": ".vscode" - } - ] -} \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/templates/empty-monorepo/config.json b/packages/cli/assets/stores/0/data/templates/empty-monorepo/config.json deleted file mode 100644 index b30f1f4a..00000000 --- a/packages/cli/assets/stores/0/data/templates/empty-monorepo/config.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "../schema.d.json", - "name": "Empty monorepo", - "description": "An empty monorepo", - "plugins": [ - "turbo/default", - "devcontainer/default", - "app/empty", - "packages/empty", - "conventional-commits/default", - "vscode/default", - "github/workflows/default", - "github/issue-template/default", - "gitignore/default", - "releaserc/default", - "license/default", - "makefile/default" - ] -} \ No newline at end of file diff --git a/packages/cli/assets/stores/0/data/plugins/component.d.json b/packages/cli/schemas/plugin.d.json similarity index 100% rename from packages/cli/assets/stores/0/data/plugins/component.d.json rename to packages/cli/schemas/plugin.d.json diff --git a/packages/cli/assets/stores/0/data/templates/schema.d.json b/packages/cli/schemas/template.d.json similarity index 100% rename from packages/cli/assets/stores/0/data/templates/schema.d.json rename to packages/cli/schemas/template.d.json diff --git a/packages/scripts/src/utils/template-config/index.ts b/packages/scripts/src/utils/template-config/index.ts index 9848a23f..c6b6ef7d 100644 --- a/packages/scripts/src/utils/template-config/index.ts +++ b/packages/scripts/src/utils/template-config/index.ts @@ -43,6 +43,7 @@ export const fullPluginSchema = z.object({ export const configSchema = z.object({ name: z.string(), plugins: z.array(z.string().or(fullPluginSchema)), + stores: z.array(z.string()), }) export type TConfig = z.infer