From eec86902726d9c52accdd574d68d302c2d2541ca Mon Sep 17 00:00:00 2001 From: Will Cory Date: Mon, 12 Aug 2024 10:59:00 -0700 Subject: [PATCH] :sparkles: Feat: Added tevm cli to top level package (#1377) ## Description _Concise description of proposed changes_ ## Testing Explain the quality checks that have been done on the code changes ## Additional Information - [ ] I read the [contributing docs](../docs/contributing.md) (if this is your first contribution) Your ENS/address: ## Summary by CodeRabbit - **New Features** - Introduced a command-line interface (CLI) for the `tevm` module, allowing users to execute commands related to deploying contracts, managing transactions, and querying states directly from the terminal. - **Usability Enhancements** - Updated project structure to streamline interactions with the `tevm` functionalities, making it more user-friendly for developers. - **Configuration Updates** - Added new executable entries and updated scripts to support the `tevm-cli`, ensuring seamless integration and improved access for users. --------- Co-authored-by: William Cory --- .changeset/slimy-dots-invite.md | 6 + cli/dist/commands/_app.d.ts | 3 - cli/dist/commands/_app.d.ts.map | 1 - cli/dist/commands/_app.js | 3 - cli/dist/commands/create.d.ts | 32 --- cli/dist/commands/create.d.ts.map | 1 - cli/dist/commands/create.js | 4 - cli/dist/commands/generate.d.ts | 28 --- cli/dist/commands/generate.d.ts.map | 1 - cli/dist/commands/generate.js | 4 - cli/dist/commands/run.d.ts | 28 --- cli/dist/commands/run.d.ts.map | 1 - cli/dist/commands/run.js | 4 - cli/dist/commands/server.d.ts | 28 --- cli/dist/commands/server.d.ts.map | 1 - cli/dist/commands/server.js | 4 - cli/dist/commands/tsc.d.ts | 28 --- cli/dist/commands/tsc.d.ts.map | 1 - cli/dist/commands/tsc.js | 4 - cli/dist/components/FancyCreateTitle.d.ts | 10 - cli/dist/components/FancyCreateTitle.d.ts.map | 1 - cli/dist/components/FancyCreateTitle.js | 18 -- cli/dist/components/MultipleChoiceStep.d.ts | 11 - .../components/MultipleChoiceStep.d.ts.map | 1 - cli/dist/components/MultipleChoiceStep.js | 9 - cli/dist/components/SelectInput.d.ts | 24 -- cli/dist/components/SelectInput.d.ts.map | 1 - cli/dist/components/SelectInput.js | 18 -- cli/dist/components/Step.d.ts | 28 --- cli/dist/components/Step.d.ts.map | 1 - cli/dist/components/Step.js | 26 -- cli/dist/components/Table.d.ts | 85 ------- cli/dist/components/Table.d.ts.map | 1 - cli/dist/components/Table.js | 222 ------------------ cli/dist/components/TextInputStep.d.ts | 13 - cli/dist/components/TextInputStep.d.ts.map | 1 - cli/dist/components/TextInputStep.js | 7 - cli/dist/constants/InputStep.d.ts | 24 -- cli/dist/constants/InputStep.d.ts.map | 1 - cli/dist/constants/InputStep.js | 16 -- cli/dist/constants/MultipleChoice.d.ts | 128 ---------- cli/dist/constants/MultipleChoice.d.ts.map | 1 - cli/dist/constants/MultipleChoice.js | 132 ----------- cli/dist/constants/automatedSteps.d.ts | 28 --- cli/dist/constants/automatedSteps.d.ts.map | 1 - cli/dist/constants/automatedSteps.js | 21 -- cli/dist/constants/defaults.d.ts | 2 - cli/dist/constants/defaults.d.ts.map | 1 - cli/dist/constants/defaults.js | 1 - cli/dist/constants/frameworksByUseCase.d.ts | 94 -------- .../constants/frameworksByUseCase.d.ts.map | 1 - cli/dist/constants/frameworksByUseCase.js | 57 ----- cli/dist/constants/index.d.ts | 5 - cli/dist/constants/index.d.ts.map | 1 - cli/dist/constants/index.js | 15 -- cli/dist/constants/types.d.ts | 9 - cli/dist/constants/types.d.ts.map | 1 - cli/dist/constants/types.js | 1 - cli/dist/create-tevm-app.cjs | 19 -- cli/dist/create-tevm-app.cjs.map | 1 - cli/dist/create-tevm-app.d.cts | 1 - cli/dist/create-tevm-app.d.ts | 1 - cli/dist/create-tevm-app.d.ts.map | 1 - cli/dist/create-tevm-app.js | 12 - cli/dist/create-tevm-app.js.map | 1 - cli/dist/create/Create.d.ts | 11 - cli/dist/create/Create.d.ts.map | 1 - cli/dist/create/Create.js | 30 --- cli/dist/create/Create.spec.d.ts | 2 - cli/dist/create/Create.spec.d.ts.map | 1 - cli/dist/create/Create.spec.js | 47 ---- cli/dist/create/Creating.d.ts | 8 - cli/dist/create/Creating.d.ts.map | 1 - cli/dist/create/Creating.js | 79 ------- cli/dist/create/InteractivePrompt.d.ts | 9 - cli/dist/create/InteractivePrompt.d.ts.map | 1 - cli/dist/create/InteractivePrompt.js | 169 ------------- cli/dist/create/args.d.ts | 3 - cli/dist/create/args.d.ts.map | 1 - cli/dist/create/args.js | 10 - cli/dist/create/index.d.ts | 35 --- cli/dist/create/index.d.ts.map | 1 - cli/dist/create/index.js | 8 - cli/dist/create/options.d.ts | 27 --- cli/dist/create/options.d.ts.map | 1 - cli/dist/create/options.js | 79 ------- cli/dist/explorer/Accounts.d.ts | 2 - cli/dist/explorer/Accounts.d.ts.map | 1 - cli/dist/explorer/Accounts.js | 1 - cli/dist/explorer/Blocks.d.ts | 2 - cli/dist/explorer/Blocks.d.ts.map | 1 - cli/dist/explorer/Blocks.js | 1 - cli/dist/explorer/Call.d.ts | 2 - cli/dist/explorer/Call.d.ts.map | 1 - cli/dist/explorer/Call.js | 1 - cli/dist/explorer/Explorer.d.ts | 2 - cli/dist/explorer/Explorer.d.ts.map | 1 - cli/dist/explorer/Explorer.js | 1 - cli/dist/explorer/Home.d.ts | 2 - cli/dist/explorer/Home.d.ts.map | 1 - cli/dist/explorer/Home.js | 1 - cli/dist/explorer/Storage.d.ts | 2 - cli/dist/explorer/Storage.d.ts.map | 1 - cli/dist/explorer/Storage.js | 1 - cli/dist/explorer/Transactions.d.ts | 2 - cli/dist/explorer/Transactions.d.ts.map | 1 - cli/dist/explorer/Transactions.js | 1 - cli/dist/hooks/useCopy.d.ts | 3 - cli/dist/hooks/useCopy.d.ts.map | 1 - cli/dist/hooks/useCopy.js | 13 - cli/dist/hooks/useCounter.d.ts | 5 - cli/dist/hooks/useCounter.d.ts.map | 1 - cli/dist/hooks/useCounter.js | 11 - cli/dist/hooks/useCreateDir.d.ts | 3 - cli/dist/hooks/useCreateDir.d.ts.map | 1 - cli/dist/hooks/useCreateDir.js | 16 -- cli/dist/hooks/useCreateEvmtsApp.d.ts | 3 - cli/dist/hooks/useCreateEvmtsApp.d.ts.map | 1 - cli/dist/hooks/useCreateEvmtsApp.js | 138 ----------- cli/dist/hooks/useExec.d.ts | 12 - cli/dist/hooks/useExec.d.ts.map | 1 - cli/dist/hooks/useExec.js | 43 ---- cli/dist/index.cjs | 15 -- cli/dist/index.cjs.map | 1 - cli/dist/index.d.cts | 66 ------ cli/dist/index.d.ts | 66 ------ cli/dist/index.js | 13 - cli/dist/index.js.map | 1 - cli/dist/server/Server.d.ts | 9 - cli/dist/server/Server.d.ts.map | 1 - cli/dist/server/Server.js | 20 -- cli/dist/server/StartServer.d.ts | 4 - cli/dist/server/StartServer.d.ts.map | 1 - cli/dist/server/StartServer.js | 47 ---- cli/dist/server/StartServerProps.d.ts | 6 - cli/dist/server/StartServerProps.d.ts.map | 1 - cli/dist/server/StartServerProps.js | 2 - cli/dist/server/args.d.ts | 3 - cli/dist/server/args.d.ts.map | 1 - cli/dist/server/args.js | 10 - cli/dist/server/chains.d.ts | 4 - cli/dist/server/chains.d.ts.map | 1 - cli/dist/server/chains.js | 7 - cli/dist/server/createServer.d.ts | 2 - cli/dist/server/createServer.d.ts.map | 1 - cli/dist/server/createServer.js | 1 - cli/dist/server/index.d.ts | 30 --- cli/dist/server/index.d.ts.map | 1 - cli/dist/server/index.js | 8 - cli/dist/server/options.d.ts | 24 -- cli/dist/server/options.d.ts.map | 1 - cli/dist/server/options.js | 21 -- cli/dist/server/startTevm.d.ts | 15 -- cli/dist/server/startTevm.d.ts.map | 1 - cli/dist/server/startTevm.js | 26 -- cli/dist/state/State.d.ts | 31 --- cli/dist/state/State.d.ts.map | 1 - cli/dist/state/State.js | 1 - cli/dist/state/Store.d.ts | 11 - cli/dist/state/Store.d.ts.map | 1 - cli/dist/state/Store.js | 24 -- cli/dist/state/dispatchers.d.ts | 19 -- cli/dist/state/dispatchers.d.ts.map | 1 - cli/dist/state/dispatchers.js | 12 - cli/dist/state/index.d.ts | 2 - cli/dist/state/index.d.ts.map | 1 - cli/dist/state/index.js | 1 - cli/dist/state/reducers.d.ts | 59 ----- cli/dist/state/reducers.d.ts.map | 1 - cli/dist/state/reducers.js | 90 ------- cli/dist/styles/colors.d.ts | 18 -- cli/dist/styles/colors.d.ts.map | 1 - cli/dist/styles/colors.js | 17 -- cli/dist/utils/execPromise.d.ts | 3 - cli/dist/utils/execPromise.d.ts.map | 1 - cli/dist/utils/execPromise.js | 3 - cli/dist/utils/generateRandomName.d.ts | 2 - cli/dist/utils/generateRandomName.d.ts.map | 1 - cli/dist/utils/generateRandomName.js | 6 - cli/dist/utils/getTailLogs.d.ts | 2 - cli/dist/utils/getTailLogs.d.ts.map | 1 - cli/dist/utils/getTailLogs.js | 3 - cli/dist/utils/getUserPkgManager.d.ts | 3 - cli/dist/utils/getUserPkgManager.d.ts.map | 1 - cli/dist/utils/getUserPkgManager.js | 23 -- cli/dist/utils/state.d.ts | 2 - cli/dist/utils/state.d.ts.map | 1 - cli/dist/utils/state.js | 1 - cli/dist/utils/wait.d.ts | 2 - cli/dist/utils/wait.d.ts.map | 1 - cli/dist/utils/wait.js | 1 - cli/package.json | 14 +- cli/src/{create-tevm-app.tsx => tevm-cli.tsx} | 0 cli/tsup.config.ts | 8 +- configs/tsupconfig/docs/README.md | 2 +- .../docs/functions/createTsUpOptions.md | 2 - pnpm-lock.yaml | 3 + tevm/bin/tevm.cjs | 2 + tevm/bin/tevm.js | 2 + tevm/package.json | 5 + 200 files changed, 35 insertions(+), 2800 deletions(-) create mode 100644 .changeset/slimy-dots-invite.md delete mode 100644 cli/dist/commands/_app.d.ts delete mode 100644 cli/dist/commands/_app.d.ts.map delete mode 100644 cli/dist/commands/_app.js delete mode 100644 cli/dist/commands/create.d.ts delete mode 100644 cli/dist/commands/create.d.ts.map delete mode 100644 cli/dist/commands/create.js delete mode 100644 cli/dist/commands/generate.d.ts delete mode 100644 cli/dist/commands/generate.d.ts.map delete mode 100644 cli/dist/commands/generate.js delete mode 100644 cli/dist/commands/run.d.ts delete mode 100644 cli/dist/commands/run.d.ts.map delete mode 100644 cli/dist/commands/run.js delete mode 100644 cli/dist/commands/server.d.ts delete mode 100644 cli/dist/commands/server.d.ts.map delete mode 100644 cli/dist/commands/server.js delete mode 100644 cli/dist/commands/tsc.d.ts delete mode 100644 cli/dist/commands/tsc.d.ts.map delete mode 100644 cli/dist/commands/tsc.js delete mode 100644 cli/dist/components/FancyCreateTitle.d.ts delete mode 100644 cli/dist/components/FancyCreateTitle.d.ts.map delete mode 100644 cli/dist/components/FancyCreateTitle.js delete mode 100644 cli/dist/components/MultipleChoiceStep.d.ts delete mode 100644 cli/dist/components/MultipleChoiceStep.d.ts.map delete mode 100644 cli/dist/components/MultipleChoiceStep.js delete mode 100644 cli/dist/components/SelectInput.d.ts delete mode 100644 cli/dist/components/SelectInput.d.ts.map delete mode 100644 cli/dist/components/SelectInput.js delete mode 100644 cli/dist/components/Step.d.ts delete mode 100644 cli/dist/components/Step.d.ts.map delete mode 100644 cli/dist/components/Step.js delete mode 100644 cli/dist/components/Table.d.ts delete mode 100644 cli/dist/components/Table.d.ts.map delete mode 100644 cli/dist/components/Table.js delete mode 100644 cli/dist/components/TextInputStep.d.ts delete mode 100644 cli/dist/components/TextInputStep.d.ts.map delete mode 100644 cli/dist/components/TextInputStep.js delete mode 100644 cli/dist/constants/InputStep.d.ts delete mode 100644 cli/dist/constants/InputStep.d.ts.map delete mode 100644 cli/dist/constants/InputStep.js delete mode 100644 cli/dist/constants/MultipleChoice.d.ts delete mode 100644 cli/dist/constants/MultipleChoice.d.ts.map delete mode 100644 cli/dist/constants/MultipleChoice.js delete mode 100644 cli/dist/constants/automatedSteps.d.ts delete mode 100644 cli/dist/constants/automatedSteps.d.ts.map delete mode 100644 cli/dist/constants/automatedSteps.js delete mode 100644 cli/dist/constants/defaults.d.ts delete mode 100644 cli/dist/constants/defaults.d.ts.map delete mode 100644 cli/dist/constants/defaults.js delete mode 100644 cli/dist/constants/frameworksByUseCase.d.ts delete mode 100644 cli/dist/constants/frameworksByUseCase.d.ts.map delete mode 100644 cli/dist/constants/frameworksByUseCase.js delete mode 100644 cli/dist/constants/index.d.ts delete mode 100644 cli/dist/constants/index.d.ts.map delete mode 100644 cli/dist/constants/index.js delete mode 100644 cli/dist/constants/types.d.ts delete mode 100644 cli/dist/constants/types.d.ts.map delete mode 100644 cli/dist/constants/types.js delete mode 100755 cli/dist/create-tevm-app.cjs delete mode 100644 cli/dist/create-tevm-app.cjs.map delete mode 100644 cli/dist/create-tevm-app.d.cts delete mode 100644 cli/dist/create-tevm-app.d.ts delete mode 100644 cli/dist/create-tevm-app.d.ts.map delete mode 100755 cli/dist/create-tevm-app.js delete mode 100644 cli/dist/create-tevm-app.js.map delete mode 100644 cli/dist/create/Create.d.ts delete mode 100644 cli/dist/create/Create.d.ts.map delete mode 100644 cli/dist/create/Create.js delete mode 100644 cli/dist/create/Create.spec.d.ts delete mode 100644 cli/dist/create/Create.spec.d.ts.map delete mode 100644 cli/dist/create/Create.spec.js delete mode 100644 cli/dist/create/Creating.d.ts delete mode 100644 cli/dist/create/Creating.d.ts.map delete mode 100644 cli/dist/create/Creating.js delete mode 100644 cli/dist/create/InteractivePrompt.d.ts delete mode 100644 cli/dist/create/InteractivePrompt.d.ts.map delete mode 100644 cli/dist/create/InteractivePrompt.js delete mode 100644 cli/dist/create/args.d.ts delete mode 100644 cli/dist/create/args.d.ts.map delete mode 100644 cli/dist/create/args.js delete mode 100644 cli/dist/create/index.d.ts delete mode 100644 cli/dist/create/index.d.ts.map delete mode 100644 cli/dist/create/index.js delete mode 100644 cli/dist/create/options.d.ts delete mode 100644 cli/dist/create/options.d.ts.map delete mode 100644 cli/dist/create/options.js delete mode 100644 cli/dist/explorer/Accounts.d.ts delete mode 100644 cli/dist/explorer/Accounts.d.ts.map delete mode 100644 cli/dist/explorer/Accounts.js delete mode 100644 cli/dist/explorer/Blocks.d.ts delete mode 100644 cli/dist/explorer/Blocks.d.ts.map delete mode 100644 cli/dist/explorer/Blocks.js delete mode 100644 cli/dist/explorer/Call.d.ts delete mode 100644 cli/dist/explorer/Call.d.ts.map delete mode 100644 cli/dist/explorer/Call.js delete mode 100644 cli/dist/explorer/Explorer.d.ts delete mode 100644 cli/dist/explorer/Explorer.d.ts.map delete mode 100644 cli/dist/explorer/Explorer.js delete mode 100644 cli/dist/explorer/Home.d.ts delete mode 100644 cli/dist/explorer/Home.d.ts.map delete mode 100644 cli/dist/explorer/Home.js delete mode 100644 cli/dist/explorer/Storage.d.ts delete mode 100644 cli/dist/explorer/Storage.d.ts.map delete mode 100644 cli/dist/explorer/Storage.js delete mode 100644 cli/dist/explorer/Transactions.d.ts delete mode 100644 cli/dist/explorer/Transactions.d.ts.map delete mode 100644 cli/dist/explorer/Transactions.js delete mode 100644 cli/dist/hooks/useCopy.d.ts delete mode 100644 cli/dist/hooks/useCopy.d.ts.map delete mode 100644 cli/dist/hooks/useCopy.js delete mode 100644 cli/dist/hooks/useCounter.d.ts delete mode 100644 cli/dist/hooks/useCounter.d.ts.map delete mode 100644 cli/dist/hooks/useCounter.js delete mode 100644 cli/dist/hooks/useCreateDir.d.ts delete mode 100644 cli/dist/hooks/useCreateDir.d.ts.map delete mode 100644 cli/dist/hooks/useCreateDir.js delete mode 100644 cli/dist/hooks/useCreateEvmtsApp.d.ts delete mode 100644 cli/dist/hooks/useCreateEvmtsApp.d.ts.map delete mode 100644 cli/dist/hooks/useCreateEvmtsApp.js delete mode 100644 cli/dist/hooks/useExec.d.ts delete mode 100644 cli/dist/hooks/useExec.d.ts.map delete mode 100644 cli/dist/hooks/useExec.js delete mode 100644 cli/dist/index.cjs delete mode 100644 cli/dist/index.cjs.map delete mode 100644 cli/dist/index.d.cts delete mode 100644 cli/dist/index.d.ts delete mode 100644 cli/dist/index.js delete mode 100644 cli/dist/index.js.map delete mode 100644 cli/dist/server/Server.d.ts delete mode 100644 cli/dist/server/Server.d.ts.map delete mode 100644 cli/dist/server/Server.js delete mode 100644 cli/dist/server/StartServer.d.ts delete mode 100644 cli/dist/server/StartServer.d.ts.map delete mode 100644 cli/dist/server/StartServer.js delete mode 100644 cli/dist/server/StartServerProps.d.ts delete mode 100644 cli/dist/server/StartServerProps.d.ts.map delete mode 100644 cli/dist/server/StartServerProps.js delete mode 100644 cli/dist/server/args.d.ts delete mode 100644 cli/dist/server/args.d.ts.map delete mode 100644 cli/dist/server/args.js delete mode 100644 cli/dist/server/chains.d.ts delete mode 100644 cli/dist/server/chains.d.ts.map delete mode 100644 cli/dist/server/chains.js delete mode 100644 cli/dist/server/createServer.d.ts delete mode 100644 cli/dist/server/createServer.d.ts.map delete mode 100644 cli/dist/server/createServer.js delete mode 100644 cli/dist/server/index.d.ts delete mode 100644 cli/dist/server/index.d.ts.map delete mode 100644 cli/dist/server/index.js delete mode 100644 cli/dist/server/options.d.ts delete mode 100644 cli/dist/server/options.d.ts.map delete mode 100644 cli/dist/server/options.js delete mode 100644 cli/dist/server/startTevm.d.ts delete mode 100644 cli/dist/server/startTevm.d.ts.map delete mode 100644 cli/dist/server/startTevm.js delete mode 100644 cli/dist/state/State.d.ts delete mode 100644 cli/dist/state/State.d.ts.map delete mode 100644 cli/dist/state/State.js delete mode 100644 cli/dist/state/Store.d.ts delete mode 100644 cli/dist/state/Store.d.ts.map delete mode 100644 cli/dist/state/Store.js delete mode 100644 cli/dist/state/dispatchers.d.ts delete mode 100644 cli/dist/state/dispatchers.d.ts.map delete mode 100644 cli/dist/state/dispatchers.js delete mode 100644 cli/dist/state/index.d.ts delete mode 100644 cli/dist/state/index.d.ts.map delete mode 100644 cli/dist/state/index.js delete mode 100644 cli/dist/state/reducers.d.ts delete mode 100644 cli/dist/state/reducers.d.ts.map delete mode 100644 cli/dist/state/reducers.js delete mode 100644 cli/dist/styles/colors.d.ts delete mode 100644 cli/dist/styles/colors.d.ts.map delete mode 100644 cli/dist/styles/colors.js delete mode 100644 cli/dist/utils/execPromise.d.ts delete mode 100644 cli/dist/utils/execPromise.d.ts.map delete mode 100644 cli/dist/utils/execPromise.js delete mode 100644 cli/dist/utils/generateRandomName.d.ts delete mode 100644 cli/dist/utils/generateRandomName.d.ts.map delete mode 100644 cli/dist/utils/generateRandomName.js delete mode 100644 cli/dist/utils/getTailLogs.d.ts delete mode 100644 cli/dist/utils/getTailLogs.d.ts.map delete mode 100644 cli/dist/utils/getTailLogs.js delete mode 100644 cli/dist/utils/getUserPkgManager.d.ts delete mode 100644 cli/dist/utils/getUserPkgManager.d.ts.map delete mode 100644 cli/dist/utils/getUserPkgManager.js delete mode 100644 cli/dist/utils/state.d.ts delete mode 100644 cli/dist/utils/state.d.ts.map delete mode 100644 cli/dist/utils/state.js delete mode 100644 cli/dist/utils/wait.d.ts delete mode 100644 cli/dist/utils/wait.d.ts.map delete mode 100644 cli/dist/utils/wait.js rename cli/src/{create-tevm-app.tsx => tevm-cli.tsx} (100%) create mode 100644 tevm/bin/tevm.cjs create mode 100755 tevm/bin/tevm.js diff --git a/.changeset/slimy-dots-invite.md b/.changeset/slimy-dots-invite.md new file mode 100644 index 0000000000..0f87b9ba87 --- /dev/null +++ b/.changeset/slimy-dots-invite.md @@ -0,0 +1,6 @@ +--- +"tevm": minor +"@tevm/cli": minor +--- + +Added tevm cli to top level package diff --git a/cli/dist/commands/_app.d.ts b/cli/dist/commands/_app.d.ts deleted file mode 100644 index 088eeb0d2b..0000000000 --- a/cli/dist/commands/_app.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { AppProps } from 'pastel'; -export default function App({ Component, commandProps }: AppProps): import("react").JSX.Element; -//# sourceMappingURL=_app.d.ts.map \ No newline at end of file diff --git a/cli/dist/commands/_app.d.ts.map b/cli/dist/commands/_app.d.ts.map deleted file mode 100644 index f9c2ea9883..0000000000 --- a/cli/dist/commands/_app.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"_app.d.ts","sourceRoot":"","sources":["../../src/commands/_app.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEtC,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,QAAQ,+BAEhE"} \ No newline at end of file diff --git a/cli/dist/commands/_app.js b/cli/dist/commands/_app.js deleted file mode 100644 index 68d6b54d32..0000000000 --- a/cli/dist/commands/_app.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function App({ Component, commandProps }) { - return React.createElement(Component, { ...commandProps }); -} diff --git a/cli/dist/commands/create.d.ts b/cli/dist/commands/create.d.ts deleted file mode 100644 index a980e7f522..0000000000 --- a/cli/dist/commands/create.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -export declare const args: import("zod").ZodTuple<[import("zod").ZodDefault>], null>; -export declare const options: import("zod").ZodObject<{ - skipPrompts: import("zod").ZodDefault; - walletConnectProjectId: import("zod").ZodDefault; - packageManager: import("zod").ZodDefault>; - useCase: import("zod").ZodDefault>; - framework: import("zod").ZodDefault>; - noGit: import("zod").ZodDefault; - noInstall: import("zod").ZodDefault; -}, "strip", import("zod").ZodTypeAny, { - walletConnectProjectId: string; - useCase: "simple" | "ui" | "server"; - packageManager: "npm" | "pnpm" | "bun" | "yarn"; - framework: "simple" | "server" | "bun" | "mud" | "pwa" | "next" | "remix"; - skipPrompts: boolean; - noGit: boolean; - noInstall: boolean; -}, { - walletConnectProjectId?: string | undefined; - useCase?: "simple" | "ui" | "server" | undefined; - packageManager?: "npm" | "pnpm" | "bun" | "yarn" | undefined; - framework?: "simple" | "server" | "bun" | "mud" | "pwa" | "next" | "remix" | undefined; - skipPrompts?: boolean | undefined; - noGit?: boolean | undefined; - noInstall?: boolean | undefined; -}>; -declare const _default: import("react").FC<{ - options: import("zod").TypeOf; - args: import("zod").TypeOf; -}>; -export default _default; -//# sourceMappingURL=create.d.ts.map \ No newline at end of file diff --git a/cli/dist/commands/create.d.ts.map b/cli/dist/commands/create.d.ts.map deleted file mode 100644 index 7e3b92ccb7..0000000000 --- a/cli/dist/commands/create.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,8GAAe,CAAA;AAChC,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;EAAkB,CAAA;;;;;AAEtC,wBAAgC"} \ No newline at end of file diff --git a/cli/dist/commands/create.js b/cli/dist/commands/create.js deleted file mode 100644 index fc0fdcce1b..0000000000 --- a/cli/dist/commands/create.js +++ /dev/null @@ -1,4 +0,0 @@ -import { command } from '../create/index.js'; -export const args = command.args; -export const options = command.options; -export default command.Component; diff --git a/cli/dist/commands/generate.d.ts b/cli/dist/commands/generate.d.ts deleted file mode 100644 index fe6e29a09d..0000000000 --- a/cli/dist/commands/generate.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -export declare const args: import("zod").ZodTuple<[import("zod").ZodDefault>], null>; -export declare const options: import("zod").ZodObject<{ - preset: import("zod").ZodEffects, number, string | undefined>; - forkUrl: import("zod").ZodOptional; - block: import("zod").ZodEffects, import("zod").ZodLiteral<"earliest">, import("zod").ZodLiteral<"pending">, import("zod").ZodLiteral<"safe">, import("zod").ZodLiteral<"finalized">, import("zod").ZodBigInt, import("zod").ZodEffects]>, bigint | "pending" | "latest" | "earliest" | "safe" | "finalized" | `0x${string}`, string | bigint>; - host: import("zod").ZodDefault; - port: import("zod").ZodDefault; - loggingLevel: import("zod").ZodDefault, import("zod").ZodLiteral<"debug">, import("zod").ZodLiteral<"info">, import("zod").ZodLiteral<"warn">, import("zod").ZodLiteral<"error">]>>; -}, "strict", import("zod").ZodTypeAny, { - block: bigint | "pending" | "latest" | "earliest" | "safe" | "finalized" | `0x${string}`; - preset: number; - host: string; - port: string; - loggingLevel: "error" | "trace" | "debug" | "info" | "warn"; - forkUrl?: string | undefined; -}, { - block: string | bigint; - preset?: string | undefined; - forkUrl?: string | undefined; - host?: string | undefined; - port?: string | undefined; - loggingLevel?: "error" | "trace" | "debug" | "info" | "warn" | undefined; -}>; -declare const _default: import("react").FC<{ - options: import("zod").TypeOf; -}>; -export default _default; -//# sourceMappingURL=generate.d.ts.map \ No newline at end of file diff --git a/cli/dist/commands/generate.d.ts.map b/cli/dist/commands/generate.d.ts.map deleted file mode 100644 index d452452897..0000000000 --- a/cli/dist/commands/generate.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,8GAAe,CAAA;AAChC,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;EAAkB,CAAA;;;;AAEtC,wBAAgC"} \ No newline at end of file diff --git a/cli/dist/commands/generate.js b/cli/dist/commands/generate.js deleted file mode 100644 index e7ccf38f39..0000000000 --- a/cli/dist/commands/generate.js +++ /dev/null @@ -1,4 +0,0 @@ -import { command } from '../server/index.js'; -export const args = command.args; -export const options = command.options; -export default command.Component; diff --git a/cli/dist/commands/run.d.ts b/cli/dist/commands/run.d.ts deleted file mode 100644 index a52912f0d4..0000000000 --- a/cli/dist/commands/run.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -export declare const args: import("zod").ZodTuple<[import("zod").ZodDefault>], null>; -export declare const options: import("zod").ZodObject<{ - preset: import("zod").ZodEffects, number, string | undefined>; - forkUrl: import("zod").ZodOptional; - block: import("zod").ZodEffects, import("zod").ZodLiteral<"earliest">, import("zod").ZodLiteral<"pending">, import("zod").ZodLiteral<"safe">, import("zod").ZodLiteral<"finalized">, import("zod").ZodBigInt, import("zod").ZodEffects]>, bigint | "pending" | "latest" | "earliest" | "safe" | "finalized" | `0x${string}`, string | bigint>; - host: import("zod").ZodDefault; - port: import("zod").ZodDefault; - loggingLevel: import("zod").ZodDefault, import("zod").ZodLiteral<"debug">, import("zod").ZodLiteral<"info">, import("zod").ZodLiteral<"warn">, import("zod").ZodLiteral<"error">]>>; -}, "strict", import("zod").ZodTypeAny, { - block: bigint | "pending" | "latest" | "earliest" | "safe" | "finalized" | `0x${string}`; - preset: number; - host: string; - port: string; - loggingLevel: "error" | "trace" | "debug" | "info" | "warn"; - forkUrl?: string | undefined; -}, { - block: string | bigint; - preset?: string | undefined; - forkUrl?: string | undefined; - host?: string | undefined; - port?: string | undefined; - loggingLevel?: "error" | "trace" | "debug" | "info" | "warn" | undefined; -}>; -declare const _default: import("react").FC<{ - options: import("zod").TypeOf; -}>; -export default _default; -//# sourceMappingURL=run.d.ts.map \ No newline at end of file diff --git a/cli/dist/commands/run.d.ts.map b/cli/dist/commands/run.d.ts.map deleted file mode 100644 index 3e4c883a3d..0000000000 --- a/cli/dist/commands/run.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,8GAAe,CAAA;AAChC,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;EAAkB,CAAA;;;;AAEtC,wBAAgC"} \ No newline at end of file diff --git a/cli/dist/commands/run.js b/cli/dist/commands/run.js deleted file mode 100644 index e7ccf38f39..0000000000 --- a/cli/dist/commands/run.js +++ /dev/null @@ -1,4 +0,0 @@ -import { command } from '../server/index.js'; -export const args = command.args; -export const options = command.options; -export default command.Component; diff --git a/cli/dist/commands/server.d.ts b/cli/dist/commands/server.d.ts deleted file mode 100644 index d37a711e1e..0000000000 --- a/cli/dist/commands/server.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -export declare const args: import("zod").ZodTuple<[import("zod").ZodDefault>], null>; -export declare const options: import("zod").ZodObject<{ - preset: import("zod").ZodEffects, number, string | undefined>; - forkUrl: import("zod").ZodOptional; - block: import("zod").ZodEffects, import("zod").ZodLiteral<"earliest">, import("zod").ZodLiteral<"pending">, import("zod").ZodLiteral<"safe">, import("zod").ZodLiteral<"finalized">, import("zod").ZodBigInt, import("zod").ZodEffects]>, bigint | "pending" | "latest" | "earliest" | "safe" | "finalized" | `0x${string}`, string | bigint>; - host: import("zod").ZodDefault; - port: import("zod").ZodDefault; - loggingLevel: import("zod").ZodDefault, import("zod").ZodLiteral<"debug">, import("zod").ZodLiteral<"info">, import("zod").ZodLiteral<"warn">, import("zod").ZodLiteral<"error">]>>; -}, "strict", import("zod").ZodTypeAny, { - block: bigint | "pending" | "latest" | "earliest" | "safe" | "finalized" | `0x${string}`; - preset: number; - host: string; - port: string; - loggingLevel: "error" | "trace" | "debug" | "info" | "warn"; - forkUrl?: string | undefined; -}, { - block: string | bigint; - preset?: string | undefined; - forkUrl?: string | undefined; - host?: string | undefined; - port?: string | undefined; - loggingLevel?: "error" | "trace" | "debug" | "info" | "warn" | undefined; -}>; -declare const _default: import("react").FC<{ - options: import("zod").TypeOf; -}>; -export default _default; -//# sourceMappingURL=server.d.ts.map \ No newline at end of file diff --git a/cli/dist/commands/server.d.ts.map b/cli/dist/commands/server.d.ts.map deleted file mode 100644 index f2297cc6c0..0000000000 --- a/cli/dist/commands/server.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,8GAAe,CAAA;AAChC,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;EAAkB,CAAA;;;;AAEtC,wBAAgC"} \ No newline at end of file diff --git a/cli/dist/commands/server.js b/cli/dist/commands/server.js deleted file mode 100644 index e7ccf38f39..0000000000 --- a/cli/dist/commands/server.js +++ /dev/null @@ -1,4 +0,0 @@ -import { command } from '../server/index.js'; -export const args = command.args; -export const options = command.options; -export default command.Component; diff --git a/cli/dist/commands/tsc.d.ts b/cli/dist/commands/tsc.d.ts deleted file mode 100644 index e8d1e611aa..0000000000 --- a/cli/dist/commands/tsc.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -export declare const args: import("zod").ZodTuple<[import("zod").ZodDefault>], null>; -export declare const options: import("zod").ZodObject<{ - preset: import("zod").ZodEffects, number, string | undefined>; - forkUrl: import("zod").ZodOptional; - block: import("zod").ZodEffects, import("zod").ZodLiteral<"earliest">, import("zod").ZodLiteral<"pending">, import("zod").ZodLiteral<"safe">, import("zod").ZodLiteral<"finalized">, import("zod").ZodBigInt, import("zod").ZodEffects]>, bigint | "pending" | "latest" | "earliest" | "safe" | "finalized" | `0x${string}`, string | bigint>; - host: import("zod").ZodDefault; - port: import("zod").ZodDefault; - loggingLevel: import("zod").ZodDefault, import("zod").ZodLiteral<"debug">, import("zod").ZodLiteral<"info">, import("zod").ZodLiteral<"warn">, import("zod").ZodLiteral<"error">]>>; -}, "strict", import("zod").ZodTypeAny, { - block: bigint | "pending" | "latest" | "earliest" | "safe" | "finalized" | `0x${string}`; - preset: number; - host: string; - port: string; - loggingLevel: "error" | "trace" | "debug" | "info" | "warn"; - forkUrl?: string | undefined; -}, { - block: string | bigint; - preset?: string | undefined; - forkUrl?: string | undefined; - host?: string | undefined; - port?: string | undefined; - loggingLevel?: "error" | "trace" | "debug" | "info" | "warn" | undefined; -}>; -declare const _default: import("react").FC<{ - options: import("zod").TypeOf; -}>; -export default _default; -//# sourceMappingURL=tsc.d.ts.map \ No newline at end of file diff --git a/cli/dist/commands/tsc.d.ts.map b/cli/dist/commands/tsc.d.ts.map deleted file mode 100644 index 5ab0bfcb45..0000000000 --- a/cli/dist/commands/tsc.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tsc.d.ts","sourceRoot":"","sources":["../../src/commands/tsc.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,8GAAe,CAAA;AAChC,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;EAAkB,CAAA;;;;AAEtC,wBAAgC"} \ No newline at end of file diff --git a/cli/dist/commands/tsc.js b/cli/dist/commands/tsc.js deleted file mode 100644 index e7ccf38f39..0000000000 --- a/cli/dist/commands/tsc.js +++ /dev/null @@ -1,4 +0,0 @@ -import { command } from '../server/index.js'; -export const args = command.args; -export const options = command.options; -export default command.Component; diff --git a/cli/dist/components/FancyCreateTitle.d.ts b/cli/dist/components/FancyCreateTitle.d.ts deleted file mode 100644 index 3088df0cf3..0000000000 --- a/cli/dist/components/FancyCreateTitle.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react'; -type Props = { - loading?: boolean; -}; -/** - * A fancy pastel gradiant title with an animation for the create-evmts-app - */ -export declare const FancyCreateTitle: React.FC; -export {}; -//# sourceMappingURL=FancyCreateTitle.d.ts.map \ No newline at end of file diff --git a/cli/dist/components/FancyCreateTitle.d.ts.map b/cli/dist/components/FancyCreateTitle.d.ts.map deleted file mode 100644 index 5fe79c2c3f..0000000000 --- a/cli/dist/components/FancyCreateTitle.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FancyCreateTitle.d.ts","sourceRoot":"","sources":["../../src/components/FancyCreateTitle.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,KAAK,KAAK,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAA;AAElC;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAc5C,CAAA"} \ No newline at end of file diff --git a/cli/dist/components/FancyCreateTitle.js b/cli/dist/components/FancyCreateTitle.js deleted file mode 100644 index 2d01b26d90..0000000000 --- a/cli/dist/components/FancyCreateTitle.js +++ /dev/null @@ -1,18 +0,0 @@ -import { useCounter } from '../hooks/useCounter.js'; -import BigText from 'ink-big-text'; -import Gradient from 'ink-gradient'; -import React from 'react'; -const titleText = 'Create EVMts App'; -const loadingTitleText = 'Creating EVMts App'; -/** - * A fancy pastel gradiant title with an animation for the create-evmts-app - */ -export const FancyCreateTitle = ({ loading }) => { - const animationSpeed = 2; - // WARNING: If you get rid of this a set interval will not exist and the cli might - // start exiting early!!! - const { count: i } = useCounter(titleText.length / animationSpeed); - const text = `${loading ? loadingTitleText : titleText}${loading ? '.'.repeat(Math.floor(i * 0.15) % 4) : ''}`.slice(0, i + 1); - return (React.createElement(Gradient, { name: 'pastel' }, - React.createElement(BigText, { font: 'tiny', text: text }))); -}; diff --git a/cli/dist/components/MultipleChoiceStep.d.ts b/cli/dist/components/MultipleChoiceStep.d.ts deleted file mode 100644 index 4971d06a8b..0000000000 --- a/cli/dist/components/MultipleChoiceStep.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { MultipleChoiceStep as MultipleChoiceStepType } from '../constants/index.js'; -import { type StepProps } from './Step.js'; -import React from 'react'; -type Props = Pick & { - multipleChoice: T; - selectedChoice: keyof T['choices']; - onSelect: (value: keyof T['choices']) => void; -}; -export declare const MultipleChoiceStep: ({ multipleChoice, selectedChoice, onSelect, ...stepProps }: Props) => React.JSX.Element; -export {}; -//# sourceMappingURL=MultipleChoiceStep.d.ts.map \ No newline at end of file diff --git a/cli/dist/components/MultipleChoiceStep.d.ts.map b/cli/dist/components/MultipleChoiceStep.d.ts.map deleted file mode 100644 index 0da8eb77f8..0000000000 --- a/cli/dist/components/MultipleChoiceStep.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MultipleChoiceStep.d.ts","sourceRoot":"","sources":["../../src/components/MultipleChoiceStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,IAAI,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAEzF,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,WAAW,CAAA;AAEhD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,KAAK,KAAK,CAAC,CAAC,SAAS,sBAAsB,IAAI,IAAI,CAClD,SAAS,EACT,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CACtC,GAAG;IACH,cAAc,EAAE,CAAC,CAAA;IACjB,cAAc,EAAE,MAAM,CAAC,CAAC,SAAS,CAAC,CAAA;IAClC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,SAAS,CAAC,KAAK,IAAI,CAAA;CAC7C,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,sBAAsB,8DAKhE,KAAK,CAAC,CAAC,CAAC,sBAwBV,CAAA"} \ No newline at end of file diff --git a/cli/dist/components/MultipleChoiceStep.js b/cli/dist/components/MultipleChoiceStep.js deleted file mode 100644 index 03099b6d5e..0000000000 --- a/cli/dist/components/MultipleChoiceStep.js +++ /dev/null @@ -1,9 +0,0 @@ -import { SelectInput } from './SelectInput.js'; -import { Step } from './Step.js'; -import { Text } from 'ink'; -import React from 'react'; -export const MultipleChoiceStep = ({ multipleChoice, selectedChoice, onSelect, ...stepProps }) => { - return (React.createElement(Step, { ...stepProps, prompt: multipleChoice.prompt, nonActiveContent: React.createElement(Text, null, multipleChoice.choices[selectedChoice]?.label), activeContent: React.createElement(SelectInput, { items: Object.values(multipleChoice.choices), onSelect: (choice) => { - onSelect(choice.value); - } }) })); -}; diff --git a/cli/dist/components/SelectInput.d.ts b/cli/dist/components/SelectInput.d.ts deleted file mode 100644 index 42771714a2..0000000000 --- a/cli/dist/components/SelectInput.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react'; -export type Item = { - key?: string; - label: string; - value: V; -}; -type Props = { - /** - * Items to display in a list. Each item must be an object and have `label` and `value` props, it may also optionally have a `key` prop. - * If no `key` prop is provided, `value` will be used as the item key. - */ - items: Array>; - /** - * Function to call when user selects an item. Item object is passed to that function as an argument. - */ - onSelect: (item: Item) => void; -}; -/** - * Create EVMts app step to select the use case - * Uses a MultiSelect - */ -export declare const SelectInput: ({ items, onSelect, }: Props) => React.JSX.Element; -export {}; -//# sourceMappingURL=SelectInput.d.ts.map \ No newline at end of file diff --git a/cli/dist/components/SelectInput.d.ts.map b/cli/dist/components/SelectInput.d.ts.map deleted file mode 100644 index 6995015a5f..0000000000 --- a/cli/dist/components/SelectInput.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SelectInput.d.ts","sourceRoot":"","sources":["../../src/components/SelectInput.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,MAAM,IAAI,CAAC,CAAC,IAAI;IACrB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,CAAC,CAAA;CACR,CAAA;AAED,KAAK,KAAK,CAAC,CAAC,IAAI;IACf;;;OAGG;IACH,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;IACrB;;OAEG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAA;CACjC,CAAA;AAKD;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,wCAG1B,KAAK,CAAC,CAAC,CAAC,sBAaV,CAAA"} \ No newline at end of file diff --git a/cli/dist/components/SelectInput.js b/cli/dist/components/SelectInput.js deleted file mode 100644 index 91f046cd8b..0000000000 --- a/cli/dist/components/SelectInput.js +++ /dev/null @@ -1,18 +0,0 @@ -import { mainSymbols } from 'figures'; -import { Box, Text } from 'ink'; -import InkSelectInput, {} from 'ink-select-input'; -import React from 'react'; -/** - * Create EVMts app step to select the use case - * Uses a MultiSelect - */ -export const SelectInput = ({ items, onSelect, }) => { - const initialIndex = items.findIndex((item) => item.label.includes('(recommended)')); - return (React.createElement(InkSelectInput, { itemComponent: ItemComponent, indicatorComponent: IndicatorComponent, initialIndex: initialIndex > -1 ? initialIndex : 0, items: items, onSelect: onSelect })); -}; -const IndicatorComponent = ({ isSelected }) => { - return (React.createElement(Box, { marginRight: 1 }, isSelected ? (React.createElement(Text, { color: '#B19CD9' }, mainSymbols.pointer)) : (React.createElement(Text, null, " ")))); -}; -const ItemComponent = ({ label, isSelected }) => { - return React.createElement(Text, { color: isSelected ? '#A4DDED' : 'white' }, label); -}; diff --git a/cli/dist/components/Step.d.ts b/cli/dist/components/Step.d.ts deleted file mode 100644 index 518e8a289b..0000000000 --- a/cli/dist/components/Step.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { colorPallet } from '../styles/colors.js'; -import React from 'react'; -import type { FC, ReactNode } from 'react'; -type ValueOf = T[keyof T]; -export type StepProps = { - isActive?: boolean; - activeContent: React.ReactNode; - nonActiveContent: React.ReactNode; - name: string; - prompt: string; - color: ValueOf; - icon?: ReactNode; - children?: never; - hide?: boolean; -}; -export declare const Step: FC; -export type AsyncStepState = 'loading' | 'error' | 'success'; -export type AsyncStepProps = { - name: string; - state: AsyncStepState; - prompt: string; - successMessage: string; - errorMessage: string; - loadingMessage: string; -}; -export declare const AsyncStep: FC; -export {}; -//# sourceMappingURL=Step.d.ts.map \ No newline at end of file diff --git a/cli/dist/components/Step.d.ts.map b/cli/dist/components/Step.d.ts.map deleted file mode 100644 index 47e45212af..0000000000 --- a/cli/dist/components/Step.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Step.d.ts","sourceRoot":"","sources":["../../src/components/Step.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAGnE,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAE1C,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;AAE5B,MAAM,MAAM,SAAS,GAAG;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,EAAE,KAAK,CAAC,SAAS,CAAA;IAC9B,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAA;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;IAClC,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,IAAI,CAAC,EAAE,OAAO,CAAA;CACd,CAAA;AAUD,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CA2B9B,CAAA;AAED,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;AAE5D,MAAM,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,cAAc,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;IACpB,cAAc,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CA8BxC,CAAA"} \ No newline at end of file diff --git a/cli/dist/components/Step.js b/cli/dist/components/Step.js deleted file mode 100644 index 6e201237f0..0000000000 --- a/cli/dist/components/Step.js +++ /dev/null @@ -1,26 +0,0 @@ -import { asyncStateColors, colorPallet } from '../styles/colors.js'; -import { Box, Text } from 'ink'; -import Spinner from 'ink-spinner'; -import React from 'react'; -const DEFAULT_DESIRED_WIDTH = 16; -const formatName = (name, desiredWidth = DEFAULT_DESIRED_WIDTH) => { - const leftWidth = Math.floor((desiredWidth - name.length) / 2); - const rightWidth = Math.ceil((desiredWidth - name.length) / 2); - return ' '.repeat(leftWidth) + name + ' '.repeat(rightWidth); -}; -export const Step = ({ hide = false, isActive, activeContent, nonActiveContent, name, color, icon, prompt, }) => { - if (hide) { - return React.createElement(React.Fragment, null); - } - return (React.createElement(Box, { minHeight: 3, flexDirection: 'column' }, - React.createElement(Box, { flexDirection: 'row', gap: 2 }, - React.createElement(Text, { bold: true, color: 'black', backgroundColor: color }, formatName(name, icon ? DEFAULT_DESIRED_WIDTH - 1 : DEFAULT_DESIRED_WIDTH)), - React.createElement(Text, null, prompt)), - React.createElement(Box, { paddingLeft: 18 }, isActive ? activeContent : nonActiveContent))); -}; -export const AsyncStep = ({ name, state, prompt, successMessage, loadingMessage, errorMessage, }) => { - return (React.createElement(Step, { name: name, isActive: state === 'loading', activeContent: state === 'loading' && (React.createElement(Text, { color: colorPallet.blue }, loadingMessage)), nonActiveContent: [ - state === 'error' && (React.createElement(Text, { color: colorPallet.red }, errorMessage)), - state === 'success' && (React.createElement(Text, { color: colorPallet.green }, successMessage)), - ], color: asyncStateColors[state], prompt: prompt, icon: state === 'loading' ? React.createElement(Spinner, { type: 'dots' }) : undefined })); -}; diff --git a/cli/dist/components/Table.d.ts b/cli/dist/components/Table.d.ts deleted file mode 100644 index 9e4041ef02..0000000000 --- a/cli/dist/components/Table.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -import React from 'react'; -type Scalar = string | number | boolean | null | undefined; -type ScalarDict = { - [key: string]: Scalar; -}; -export type CellProps = React.PropsWithChildren<{ - column: number; -}>; -export type TableProps = { - /** - * List of values (rows). - */ - data: T[]; - /** - * Columns that we should display in the table. - */ - columns: (keyof T)[]; - /** - * Cell padding. - */ - padding: number; - /** - * Header component. - */ - header: (props: React.PropsWithChildren<{}>) => JSX.Element; - /** - * Component used to render a cell in the table. - */ - cell: (props: CellProps) => JSX.Element; - /** - * Component used to render the skeleton of the table. - */ - skeleton: (props: React.PropsWithChildren<{}>) => JSX.Element; -}; -export default class Table extends React.Component, 'data'> & Partial>> { - /** - * Merges provided configuration with defaults. - */ - getConfig(): TableProps; - /** - * Gets all keyes used in data by traversing through the data. - */ - getDataKeys(): (keyof T)[]; - /** - * Calculates the width of each column by finding - * the longest value in a cell of a particular column. - * - * Returns a list of column names and their widths. - */ - getColumns(): Column[]; - /** - * Returns a (data) row representing the headings. - */ - getHeadings(): Partial; - header: (props: RowProps) => JSX.Element; - heading: (props: RowProps) => JSX.Element; - separator: (props: RowProps) => JSX.Element; - data: (props: RowProps) => JSX.Element; - footer: (props: RowProps) => JSX.Element; - render(): React.JSX.Element; -} -type RowProps = { - key: string; - data: Partial; - columns: Column[]; -}; -type Column = { - key: string; - column: keyof T; - width: number; -}; -/** - * Renders the header of a table. - */ -export declare function Header(props: React.PropsWithChildren<{}>): React.JSX.Element; -/** - * Renders a cell in the table. - */ -export declare function Cell(props: CellProps): React.JSX.Element; -/** - * Redners the scaffold of the table. - */ -export declare function Skeleton(props: React.PropsWithChildren<{}>): React.JSX.Element; -export {}; -//# sourceMappingURL=Table.d.ts.map \ No newline at end of file diff --git a/cli/dist/components/Table.d.ts.map b/cli/dist/components/Table.d.ts.map deleted file mode 100644 index e0fb26801b..0000000000 --- a/cli/dist/components/Table.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../src/components/Table.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,KAAK,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAA;AAE1D,KAAK,UAAU,GAAG;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAEnE,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,UAAU,IAAI;IAC9C;;OAEG;IACH,IAAI,EAAE,CAAC,EAAE,CAAA;IACT;;OAEG;IACH,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAA;IACpB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,EAAE,CAAC,KAAK,GAAG,CAAC,OAAO,CAAA;IAC3D;;OAEG;IACH,IAAI,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,GAAG,CAAC,OAAO,CAAA;IACvC;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,EAAE,CAAC,KAAK,GAAG,CAAC,OAAO,CAAA;CAC7D,CAAA;AAID,MAAM,CAAC,OAAO,OAAO,KAAK,CAAC,CAAC,SAAS,UAAU,CAAE,SAAQ,KAAK,CAAC,SAAS,CACvE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACpD;IAGA;;OAEG;IACH,SAAS,IAAI,UAAU,CAAC,CAAC,CAAC;IAW1B;;OAEG;IACH,WAAW,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE;IAa1B;;;;;OAKG;IACH,UAAU,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE;IA0BzB;;OAEG;IACH,WAAW,IAAI,OAAO,CAAC,CAAC,CAAC;IAczB,MAAM,0BAoJoB,GAAG,CAAC,OAAO,CAzInC;IAGF,OAAO,0BAsImB,GAAG,CAAC,OAAO,CA3HnC;IAGF,SAAS,0BAwHiB,GAAG,CAAC,OAAO,CA7GnC;IAGF,IAAI,0BA0GsB,GAAG,CAAC,OAAO,CA/FnC;IAGF,MAAM,0BA4FoB,GAAG,CAAC,OAAO,CAjFnC;IAEO,MAAM;CA+Bf;AA+BD,KAAK,QAAQ,CAAC,CAAC,SAAS,UAAU,IAAI;IACrC,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IAChB,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA;CACpB,CAAA;AAED,KAAK,MAAM,CAAC,CAAC,IAAI;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAC,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CACb,CAAA;AAiED;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,EAAE,CAAC,qBAMxD;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,qBAEpC;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,EAAE,CAAC,qBAE1D"} \ No newline at end of file diff --git a/cli/dist/components/Table.js b/cli/dist/components/Table.js deleted file mode 100644 index 9e006143a0..0000000000 --- a/cli/dist/components/Table.js +++ /dev/null @@ -1,222 +0,0 @@ -import { Box, Text } from 'ink'; -import { sha1 } from 'object-hash'; -// Copied from ink-table https://github.com/maticzav/ink-table/blob/master/src/index.tsx -import React from 'react'; -/* Table */ -export default class Table extends React.Component { - /* Config */ - /** - * Merges provided configuration with defaults. - */ - getConfig() { - return { - data: this.props.data, - columns: this.props.columns || this.getDataKeys(), - padding: this.props.padding || 1, - header: this.props.header || Header, - cell: this.props.cell || Cell, - skeleton: this.props.skeleton || Skeleton, - }; - } - /** - * Gets all keyes used in data by traversing through the data. - */ - getDataKeys() { - const keys = new Set(); - // Collect all the keys. - for (const data of this.props.data) { - for (const key in data) { - keys.add(key); - } - } - return Array.from(keys); - } - /** - * Calculates the width of each column by finding - * the longest value in a cell of a particular column. - * - * Returns a list of column names and their widths. - */ - getColumns() { - const { columns, padding } = this.getConfig(); - const widths = columns.map((key) => { - const header = String(key).length; - /* Get the width of each cell in the column */ - const data = this.props.data.map((data) => { - const value = data[key]; - if (value === undefined || value == null) - return 0; - return String(value).length; - }); - const width = Math.max(...data, header) + padding * 2; - /* Construct a cell */ - return { - column: key, - width: width, - key: String(key), - }; - }); - return widths; - } - /** - * Returns a (data) row representing the headings. - */ - getHeadings() { - const { columns } = this.getConfig(); - const headings = columns.reduce((acc, column) => ({ ...acc, [column]: column }), {}); - return headings; - } - /* Rendering utilities */ - // The top most line in the table. - header = row({ - cell: this.getConfig().skeleton, - padding: this.getConfig().padding, - skeleton: { - component: this.getConfig().skeleton, - // chars - line: '─', - left: '┌', - right: '┐', - cross: '┬', - }, - }); - // The line with column names. - heading = row({ - cell: this.getConfig().header, - padding: this.getConfig().padding, - skeleton: { - component: this.getConfig().skeleton, - // chars - line: ' ', - left: '│', - right: '│', - cross: '│', - }, - }); - // The line that separates rows. - separator = row({ - cell: this.getConfig().skeleton, - padding: this.getConfig().padding, - skeleton: { - component: this.getConfig().skeleton, - // chars - line: '─', - left: '├', - right: '┤', - cross: '┼', - }, - }); - // The row with the data. - data = row({ - cell: this.getConfig().cell, - padding: this.getConfig().padding, - skeleton: { - component: this.getConfig().skeleton, - // chars - line: ' ', - left: '│', - right: '│', - cross: '│', - }, - }); - // The bottom most line of the table. - footer = row({ - cell: this.getConfig().skeleton, - padding: this.getConfig().padding, - skeleton: { - component: this.getConfig().skeleton, - // chars - line: '─', - left: '└', - right: '┘', - cross: '┴', - }, - }); - render() { - /* Data */ - const columns = this.getColumns(); - const headings = this.getHeadings(); - /** - * Render the table line by line. - */ - return (React.createElement(Box, { flexDirection: 'column' }, - this.header({ key: 'header', columns, data: {} }), - this.heading({ key: 'heading', columns, data: headings }), - this.props.data.map((row, index) => { - // Calculate the hash of the row based on its value and position - const key = `row-${sha1(row)}-${index}`; - // Construct a row. - return (React.createElement(Box, { flexDirection: 'column', key: key }, - this.separator({ key: `separator-${key}`, columns, data: {} }), - this.data({ key: `data-${key}`, columns, data: row }))); - }), - this.footer({ key: 'footer', columns, data: {} }))); - } -} -/** - * Constructs a Row element from the configuration. - */ -function row(config) { - /* This is a component builder. We return a function. */ - const skeleton = config.skeleton; - /* Row */ - return (props) => (React.createElement(Box, { flexDirection: 'row' }, - React.createElement(skeleton.component, null, skeleton.left), - ...intersperse((i) => { - const key = `${props.key}-hseparator-${i}`; - // The horizontal separator. - return (React.createElement(skeleton.component, { key: key }, skeleton.cross)); - }, - // Values. - props.columns.map((column, colI) => { - // content - const value = props.data[column.column]; - if (value === undefined || value == null) { - const key = `${props.key}-empty-${column.key}`; - return (React.createElement(config.cell, { key: key, column: colI }, skeleton.line.repeat(column.width))); - } - else { - const key = `${props.key}-cell-${column.key}`; - // margins - const ml = config.padding; - const mr = column.width - String(value).length - config.padding; - return ( - /* prettier-ignore */ - React.createElement(config.cell, { key: key, column: colI }, `${skeleton.line.repeat(ml)}${String(value)}${skeleton.line.repeat(mr)}`)); - } - })), - React.createElement(skeleton.component, null, skeleton.right))); -} -/** - * Renders the header of a table. - */ -export function Header(props) { - return (React.createElement(Text, { bold: true, color: 'blue' }, props.children)); -} -/** - * Renders a cell in the table. - */ -export function Cell(props) { - return React.createElement(Text, null, props.children); -} -/** - * Redners the scaffold of the table. - */ -export function Skeleton(props) { - return React.createElement(Text, { bold: true }, props.children); -} -/* Utility functions */ -/** - * Intersperses a list of elements with another element. - */ -function intersperse(intersperser, elements) { - // Intersparse by reducing from left. - const interspersed = elements.reduce((acc, element, index) => { - // Only add element if it's the first one. - if (acc.length === 0) - return [element]; - // Add the intersparser as well otherwise. - return [...acc, intersperser(index), element]; - }, []); - return interspersed; -} diff --git a/cli/dist/components/TextInputStep.d.ts b/cli/dist/components/TextInputStep.d.ts deleted file mode 100644 index 4197369fba..0000000000 --- a/cli/dist/components/TextInputStep.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { InputStep } from '../constants/index.js'; -import { type StepProps } from './Step.js'; -import type { FC } from 'react'; -type Props = Pick & { - step: InputStep; - value: string; - placeholder: string; - onSubmit: (value: string) => void; - onChange: (value: string) => void; -}; -export declare const TextInputStep: FC; -export {}; -//# sourceMappingURL=TextInputStep.d.ts.map \ No newline at end of file diff --git a/cli/dist/components/TextInputStep.d.ts.map b/cli/dist/components/TextInputStep.d.ts.map deleted file mode 100644 index 7580e8ed3e..0000000000 --- a/cli/dist/components/TextInputStep.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TextInputStep.d.ts","sourceRoot":"","sources":["../../src/components/TextInputStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,WAAW,CAAA;AAGhD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAG/B,KAAK,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC,GAAG;IACtE,IAAI,EAAE,SAAS,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,KAAK,CAuBnC,CAAA"} \ No newline at end of file diff --git a/cli/dist/components/TextInputStep.js b/cli/dist/components/TextInputStep.js deleted file mode 100644 index df3031cea1..0000000000 --- a/cli/dist/components/TextInputStep.js +++ /dev/null @@ -1,7 +0,0 @@ -import { Step } from './Step.js'; -import { Text } from 'ink'; -import TextInput from 'ink-text-input'; -import React from 'react'; -export const TextInputStep = ({ step, value, placeholder, onSubmit, onChange, ...stepProps }) => { - return (React.createElement(Step, { ...stepProps, prompt: step.prompt, nonActiveContent: React.createElement(Text, null, value === '' ? placeholder : value), activeContent: React.createElement(TextInput, { placeholder: placeholder, value: value, onChange: onChange, onSubmit: onSubmit }) })); -}; diff --git a/cli/dist/constants/InputStep.d.ts b/cli/dist/constants/InputStep.d.ts deleted file mode 100644 index 618ca168d0..0000000000 --- a/cli/dist/constants/InputStep.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { Step } from './types.js'; -/** -* A cli step where user enters input text -*/ -export type InputStep = Step & { - type: 'input'; -}; -/** -* Name of the project -*/ -export declare const nameStep: { - readonly type: "input"; - readonly prompt: "What is the name of your project?"; - readonly stateKey: "name"; -}; -/** -* Comma seperated list of chainIds used by the project -*/ -export declare const walletConnectProjectId: { - readonly type: "input"; - readonly prompt: "Please enter your wallet connect project id. See https://docs.walletconnect.com/cloud/relay#project-id"; - readonly stateKey: "walletConnectProjectId"; -}; -//# sourceMappingURL=InputStep.d.ts.map \ No newline at end of file diff --git a/cli/dist/constants/InputStep.d.ts.map b/cli/dist/constants/InputStep.d.ts.map deleted file mode 100644 index 75a1c64144..0000000000 --- a/cli/dist/constants/InputStep.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"InputStep.d.ts","sourceRoot":"","sources":["../../src/constants/InputStep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEtC;;EAEE;AACF,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG;IAC/B,IAAI,EAAE,OAAO,CAAA;CACZ,CAAA;AAED;;EAEE;AACF,eAAO,MAAM,QAAQ;;;;CAIS,CAAA;AAE9B;;EAEE;AACF,eAAO,MAAM,sBAAsB;;;;CAKL,CAAA"} \ No newline at end of file diff --git a/cli/dist/constants/InputStep.js b/cli/dist/constants/InputStep.js deleted file mode 100644 index bc6b995e65..0000000000 --- a/cli/dist/constants/InputStep.js +++ /dev/null @@ -1,16 +0,0 @@ -/** -* Name of the project -*/ -export const nameStep = { - type: 'input', - prompt: 'What is the name of your project?', - stateKey: 'name', -}; -/** -* Comma seperated list of chainIds used by the project -*/ -export const walletConnectProjectId = { - type: 'input', - prompt: 'Please enter your wallet connect project id. See https://docs.walletconnect.com/cloud/relay#project-id', - stateKey: 'walletConnectProjectId', -}; diff --git a/cli/dist/constants/MultipleChoice.d.ts b/cli/dist/constants/MultipleChoice.d.ts deleted file mode 100644 index aeb2d9a62c..0000000000 --- a/cli/dist/constants/MultipleChoice.d.ts +++ /dev/null @@ -1,128 +0,0 @@ -import { type Step } from './types.js'; -export type Choice = { - label: string; - value: number | string | boolean; -}; -export type MultipleChoice = { - [choice in string]: Choice; -}; -export type MultipleChoiceStep = Step & { - type: 'multiple-choice'; - choices: MultipleChoice; -}; -export declare const useCases: { - readonly type: "multiple-choice"; - readonly prompt: "What do you want to build?"; - readonly stateKey: "useCase"; - readonly choices: { - readonly simple: { - readonly value: "simple"; - readonly label: "simple"; - }; - readonly ui: { - readonly value: "ui"; - readonly label: "ui"; - }; - readonly server: { - readonly value: "server"; - readonly label: "server"; - }; - readonly all: { - readonly value: "all"; - readonly label: "all"; - }; - }; -}; -export declare const packageManagers: { - readonly type: "multiple-choice"; - readonly prompt: "What package manager do you want to use?"; - readonly stateKey: "packageManager"; - readonly choices: { - readonly npm: { - readonly value: "npm"; - readonly label: "npm"; - }; - readonly pnpm: { - readonly value: "pnpm"; - readonly label: "pnpm(recommended)"; - }; - readonly bun: { - readonly value: "bun"; - readonly label: "bun"; - }; - readonly yarn: { - readonly value: "yarn"; - readonly label: "yarn"; - }; - }; -}; -export declare const frameworks: { - readonly type: "multiple-choice"; - readonly prompt: "Pick a template"; - readonly stateKey: "framework"; - readonly choices: { - readonly simple: { - readonly value: "simple"; - readonly label: "simple - Bare bones EVMts project"; - }; - readonly bun: { - readonly value: "bun"; - readonly label: "bun: Fast-growing Node.js alternative emphasizing peformance"; - }; - readonly cli: { - readonly value: "server"; - readonly label: "cli: Ethereum CLI application using clack"; - }; - readonly mud: { - readonly value: "mud"; - readonly label: "mud(recommended) - Ethereum framework for ambitious applications"; - }; - readonly pwa: { - readonly value: "pwa"; - readonly label: "pwa - Simple React+Vite PWA"; - }; - readonly next: { - readonly value: "next"; - readonly label: "next - The most popular react framework"; - }; - readonly remix: { - readonly value: "remix"; - readonly label: "remix - React framework emphasizing tighter integration with the web platform"; - }; - readonly server: { - readonly value: "server"; - readonly label: "server: A fastify Node.js server"; - }; - }; -}; -export declare const gitChoices: { - readonly type: "multiple-choice"; - readonly prompt: "Do you want to initialize a git repo?"; - readonly stateKey: "gitChoice"; - readonly choices: { - readonly git: { - readonly value: "git"; - readonly label: "yes - Use git"; - }; - readonly none: { - readonly value: "none"; - readonly label: "no"; - }; - }; -}; -export declare const installChoices: { - readonly type: "multiple-choice"; - readonly prompt: "Do you want to install dependencies?"; - readonly stateKey: "installChoice"; - readonly choices: { - readonly install: { - readonly value: "install"; - readonly label: "yes - install dependencies"; - }; - readonly none: { - readonly value: "none"; - readonly label: "no - skip install"; - }; - }; -}; -//# sourceMappingURL=MultipleChoice.d.ts.map \ No newline at end of file diff --git a/cli/dist/constants/MultipleChoice.d.ts.map b/cli/dist/constants/MultipleChoice.d.ts.map deleted file mode 100644 index 7202322afa..0000000000 --- a/cli/dist/constants/MultipleChoice.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MultipleChoice.d.ts","sourceRoot":"","sources":["../../src/constants/MultipleChoice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAA;AAEtC,MAAM,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;CAChC,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;KAC3B,MAAM,IAAI,MAAM,GAAG,MAAM;CAC1B,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG;IACvC,IAAI,EAAE,iBAAiB,CAAA;IACvB,OAAO,EAAE,cAAc,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;CAYkB,CAAA;AACvC,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;CAUW,CAAA;AACvC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BgB,CAAA;AAkDvC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;CAQgB,CAAA;AACvC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;CAQY,CAAA"} \ No newline at end of file diff --git a/cli/dist/constants/MultipleChoice.js b/cli/dist/constants/MultipleChoice.js deleted file mode 100644 index 2f31ad7329..0000000000 --- a/cli/dist/constants/MultipleChoice.js +++ /dev/null @@ -1,132 +0,0 @@ -import {} from './types.js'; -export const useCases = { - type: 'multiple-choice', - prompt: 'What do you want to build?', - stateKey: 'useCase', - choices: { - simple: { value: 'simple', label: 'simple' }, - ui: { value: 'ui', label: 'ui' }, - // game: { value: 'game', label: 'game' }, - // scripting: { value: 'scripting', label: 'scripting' }, - server: { value: 'server', label: 'server' }, - all: { value: 'all', label: 'all' }, - }, -}; -export const packageManagers = { - type: 'multiple-choice', - prompt: 'What package manager do you want to use?', - stateKey: 'packageManager', - choices: { - npm: { value: 'npm', label: 'npm' }, - pnpm: { value: 'pnpm', label: 'pnpm(recommended)' }, - bun: { value: 'bun', label: 'bun' }, - yarn: { value: 'yarn', label: 'yarn' }, - }, -}; -export const frameworks = { - type: 'multiple-choice', - prompt: 'Pick a template', - stateKey: 'framework', - choices: { - simple: { value: 'simple', label: 'simple - Bare bones EVMts project' }, - bun: { - value: 'bun', - label: 'bun: Fast-growing Node.js alternative emphasizing peformance', - }, - cli: { - value: 'server', - label: 'cli: Ethereum CLI application using clack', - }, - mud: { - value: 'mud', - label: 'mud(recommended) - Ethereum framework for ambitious applications', - }, - pwa: { value: 'pwa', label: 'pwa - Simple React+Vite PWA' }, - next: { value: 'next', label: 'next - The most popular react framework' }, - remix: { - value: 'remix', - label: 'remix - React framework emphasizing tighter integration with the web platform', - }, - // astro: { value: 'astro', label: 'astro - A popular choice for mostly static content' }, - // svelte: { value: 'svelte', label: 'svelte - UI framework producing highly efficient JavaScript' }, - // vue: { value: 'vue', label: 'vue - Approachable and versatile JavaScript framework' }, - server: { value: 'server', label: 'server: A fastify Node.js server' }, - // elysia: { value: 'elysia', label: 'Elysia: A highly peformant Bun based server' }, - }, -}; -// export const solidityFrameworks = { -// type: 'multiple-choice', -// prompt: 'Do you want to use a solidity development framework?', -// stateKey: 'solidityFramework', -// choices: { -// none: { value: 'none', label: 'none - Just deploy and test my contracts with EVMts' }, -// foundry: { value: 'foundry', label: 'foundry(recommended) - A popular solidity toolchain that heavily inspires EVMts apis' }, -// hardhat: { value: 'hardhat', label: 'hardhat - A popular JavaScript solidity framework with a mature feature set' }, -// } -// } as const satisfies MultipleChoiceStep -// export const typescriptStrictness = { -// type: 'multiple-choice', -// prompt: 'How strict do you want your TypeScript?', -// stateKey: 'solidityFramework', -// choices: { -// strictist: { value: 'strictist', label: 'strictist(recommended) - Safest option' }, -// strict: { value: 'strict', label: 'strict - What most projects tend to use' }, -// loose: { value: 'loose', label: 'loose - Very forgiving TypeScript useful for prototyping' }, -// } -// } as const satisfies MultipleChoiceStep -// export const contractStrategy = { -// type: 'multiple-choice', -// prompt: 'What type of contracts are you using?', -// stateKey: 'contractStrategy', -// choices: { -// local: { value: 'local', label: 'local: I\'m writing contracts in this project or monorepo or installing them with npm' }, -// external: { value: 'external', label: 'external: I\'m using verified contracts that are on a blockexplorer' }, -// both: { value: 'both', label: 'both: I\'m using both local and external contracts' }, -// } -// } as const satisfies MultipleChoiceStep -// export const linters = { -// type: 'multiple-choice', -// prompt: 'Do you wish to use a linter?', -// stateKey: 'linter', -// choices: { -// 'eslint-prettier': { value: 'eslint-prettier', label: 'eslint-prettier - The most popular choice for linting and formatting with robust plugin ecosystem' }, -// biome: { value: 'biome', label: 'biome(recommended) - A blazing fast rust alternative' }, -// none: { value: 'none', label: 'none - No linting or formatting' }, -// } -// } as const satisfies MultipleChoiceStep -// export const testFrameworks = { -// type: 'multiple-choice', -// prompt: 'What do you want to build?', -// stateKey: 'testFramework', -// choices: { -// vitest: { value: 'vitest', label: 'vitest(recommended) - A fast and simple test framework' }, -// none: { value: 'none', label: 'none - No test framework' }, -// } -// } as const satisfies MultipleChoiceStep -export const gitChoices = { - type: 'multiple-choice', - prompt: 'Do you want to initialize a git repo?', - stateKey: 'gitChoice', - choices: { - git: { value: 'git', label: 'yes - Use git' }, - none: { value: 'none', label: 'no' }, - }, -}; -export const installChoices = { - type: 'multiple-choice', - prompt: 'Do you want to install dependencies?', - stateKey: 'installChoice', - choices: { - install: { value: 'install', label: 'yes - install dependencies' }, - none: { value: 'none', label: 'no - skip install' }, - }, -}; -// export const ciChoices = { -// type: 'multiple-choice', -// prompt: 'Do you want to use github actions?', -// stateKey: 'ciChoice', -// choices: { -// githubActions: { value: 'githubActions', label: 'yes - Use github actions' }, -// none: { value: 'none', label: 'no - Do not use github actions' }, -// } -// } as const satisfies MultipleChoiceStep diff --git a/cli/dist/constants/automatedSteps.d.ts b/cli/dist/constants/automatedSteps.d.ts deleted file mode 100644 index c0d4f252bf..0000000000 --- a/cli/dist/constants/automatedSteps.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { Step } from './types.js'; -export type AutomatedStep = Step & { - type: 'automated'; - loadingMessage: string; - successMessage: string; -}; -export declare const creatingProject: { - readonly type: "automated"; - readonly prompt: "Creating project"; - readonly stateKey: "creatingProject"; - readonly loadingMessage: "Creating project"; - readonly successMessage: "Project created"; -}; -export declare const initializingGit: { - readonly type: "automated"; - readonly prompt: "Initializing git"; - readonly stateKey: "initializingGit"; - readonly loadingMessage: "Initializing git"; - readonly successMessage: "Git initialized"; -}; -export declare const installingDependencies: { - readonly type: "automated"; - readonly prompt: "Installing dependencies"; - readonly stateKey: "installingDependencies"; - readonly loadingMessage: "Installing dependencies"; - readonly successMessage: "Dependencies installed"; -}; -//# sourceMappingURL=automatedSteps.d.ts.map \ No newline at end of file diff --git a/cli/dist/constants/automatedSteps.d.ts.map b/cli/dist/constants/automatedSteps.d.ts.map deleted file mode 100644 index cb5aabb609..0000000000 --- a/cli/dist/constants/automatedSteps.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"automatedSteps.d.ts","sourceRoot":"","sources":["../../src/constants/automatedSteps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEtC,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG;IAClC,IAAI,EAAE,WAAW,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,eAAe;;;;;;CAMM,CAAA;AAElC,eAAO,MAAM,eAAe;;;;;;CAMM,CAAA;AAElC,eAAO,MAAM,sBAAsB;;;;;;CAMD,CAAA"} \ No newline at end of file diff --git a/cli/dist/constants/automatedSteps.js b/cli/dist/constants/automatedSteps.js deleted file mode 100644 index fcc739b130..0000000000 --- a/cli/dist/constants/automatedSteps.js +++ /dev/null @@ -1,21 +0,0 @@ -export const creatingProject = { - type: 'automated', - prompt: 'Creating project', - stateKey: 'creatingProject', - loadingMessage: 'Creating project', - successMessage: 'Project created', -}; -export const initializingGit = { - type: 'automated', - prompt: 'Initializing git', - stateKey: 'initializingGit', - loadingMessage: 'Initializing git', - successMessage: 'Git initialized', -}; -export const installingDependencies = { - type: 'automated', - prompt: 'Installing dependencies', - stateKey: 'installingDependencies', - loadingMessage: 'Installing dependencies', - successMessage: 'Dependencies installed', -}; diff --git a/cli/dist/constants/defaults.d.ts b/cli/dist/constants/defaults.d.ts deleted file mode 100644 index 4485a7a66f..0000000000 --- a/cli/dist/constants/defaults.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const defaultWalletConnect = "898f836c53a18d0661340823973f0cb4"; -//# sourceMappingURL=defaults.d.ts.map \ No newline at end of file diff --git a/cli/dist/constants/defaults.d.ts.map b/cli/dist/constants/defaults.d.ts.map deleted file mode 100644 index e4c9716212..0000000000 --- a/cli/dist/constants/defaults.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/constants/defaults.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,qCAAqC,CAAA"} \ No newline at end of file diff --git a/cli/dist/constants/defaults.js b/cli/dist/constants/defaults.js deleted file mode 100644 index 947fb922be..0000000000 --- a/cli/dist/constants/defaults.js +++ /dev/null @@ -1 +0,0 @@ -export const defaultWalletConnect = '898f836c53a18d0661340823973f0cb4'; diff --git a/cli/dist/constants/frameworksByUseCase.d.ts b/cli/dist/constants/frameworksByUseCase.d.ts deleted file mode 100644 index 0616a4f831..0000000000 --- a/cli/dist/constants/frameworksByUseCase.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -/** - * A mapping of use case to framworks - */ -export declare const frameworksByUseCase: { - readonly all: { - readonly type: "multiple-choice"; - readonly prompt: "Pick a template"; - readonly stateKey: "framework"; - readonly choices: { - readonly simple: { - readonly value: "simple"; - readonly label: "simple - Bare bones EVMts project"; - }; - readonly bun: { - readonly value: "bun"; - readonly label: "bun: Fast-growing Node.js alternative emphasizing peformance"; - }; - readonly cli: { - readonly value: "server"; - readonly label: "cli: Ethereum CLI application using clack"; - }; - readonly mud: { - readonly value: "mud"; - readonly label: "mud(recommended) - Ethereum framework for ambitious applications"; - }; - readonly pwa: { - readonly value: "pwa"; - readonly label: "pwa - Simple React+Vite PWA"; - }; - readonly next: { - readonly value: "next"; - readonly label: "next - The most popular react framework"; - }; - readonly remix: { - readonly value: "remix"; - readonly label: "remix - React framework emphasizing tighter integration with the web platform"; - }; - readonly server: { - readonly value: "server"; - readonly label: "server: A fastify Node.js server"; - }; - }; - }; - readonly simple: { - readonly stateKey: "framework"; - readonly type: "multiple-choice"; - readonly prompt: "Pick a template (hit arrow left to go back)"; - readonly choices: { - readonly simple: { - readonly value: "simple"; - readonly label: "simple - Bare bones EVMts project"; - }; - readonly bun: { - readonly value: "bun"; - readonly label: "bun: Fast-growing Node.js alternative emphasizing peformance"; - }; - }; - }; - readonly server: { - readonly stateKey: "framework"; - readonly type: "multiple-choice"; - readonly prompt: "Pick a server template (hit arrow left to go back)"; - readonly choices: { - readonly server: { - readonly value: "server"; - readonly label: "server: A fastify Node.js server"; - }; - }; - }; - readonly ui: { - readonly stateKey: "framework"; - readonly type: "multiple-choice"; - readonly prompt: "Pick a UI template (hit arrow left to go back)"; - readonly choices: { - readonly pwa: { - readonly value: "pwa"; - readonly label: "pwa - Simple React+Vite PWA"; - }; - readonly mud: { - readonly value: "mud"; - readonly label: "mud(recommended) - Ethereum framework for ambitious applications"; - }; - readonly next: { - readonly value: "next"; - readonly label: "next - The most popular react framework"; - }; - readonly remix: { - readonly value: "remix"; - readonly label: "remix - React framework emphasizing tighter integration with the web platform"; - }; - }; - }; -}; -//# sourceMappingURL=frameworksByUseCase.d.ts.map \ No newline at end of file diff --git a/cli/dist/constants/frameworksByUseCase.d.ts.map b/cli/dist/constants/frameworksByUseCase.d.ts.map deleted file mode 100644 index 53edc166b7..0000000000 --- a/cli/dist/constants/frameworksByUseCase.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"frameworksByUseCase.d.ts","sourceRoot":"","sources":["../../src/constants/frameworksByUseCase.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuD/B,CAAA"} \ No newline at end of file diff --git a/cli/dist/constants/frameworksByUseCase.js b/cli/dist/constants/frameworksByUseCase.js deleted file mode 100644 index e0054ad617..0000000000 --- a/cli/dist/constants/frameworksByUseCase.js +++ /dev/null @@ -1,57 +0,0 @@ -import { frameworks, } from './MultipleChoice.js'; -/** - * A mapping of use case to framworks - */ -export const frameworksByUseCase = { - all: frameworks, - // scripting: { - // stateKey: frameworks.stateKey, - // type: frameworks.type, - // prompt: 'Pick a scripting template (hit arrow left to go back)', - // choices: { - // cli: frameworks.choices.cli, - // simple: frameworks.choices.simple, - // bun: frameworks.choices.bun, - // } - // }, - simple: { - stateKey: frameworks.stateKey, - type: frameworks.type, - prompt: 'Pick a template (hit arrow left to go back)', - choices: { - simple: frameworks.choices.simple, - bun: frameworks.choices.bun, - }, - }, - server: { - stateKey: frameworks.stateKey, - type: frameworks.type, - prompt: 'Pick a server template (hit arrow left to go back)', - choices: { - server: frameworks.choices.server, - // elysia: frameworks.choices.elysia, - }, - }, - ui: { - stateKey: frameworks.stateKey, - type: frameworks.type, - prompt: 'Pick a UI template (hit arrow left to go back)', - choices: { - pwa: frameworks.choices.pwa, - mud: frameworks.choices.mud, - next: frameworks.choices.next, - remix: frameworks.choices.remix, - // astro: frameworks.choices.astro, - // svelte: frameworks.choices.svelte, - // vue: frameworks.choices.vue, - }, - }, - // game: { - // stateKey: frameworks.stateKey, - // type: frameworks.type, - // prompt: 'Pick a game template (hit arrow left to go back)', - // choices: { - // mud: frameworks.choices.mud, - // } - // }, -}; diff --git a/cli/dist/constants/index.d.ts b/cli/dist/constants/index.d.ts deleted file mode 100644 index 4b08a777e5..0000000000 --- a/cli/dist/constants/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './InputStep.js'; -export * from './MultipleChoice.js'; -export * from './automatedSteps.js'; -export * from './types.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/cli/dist/constants/index.d.ts.map b/cli/dist/constants/index.d.ts.map deleted file mode 100644 index 8798ab5599..0000000000 --- a/cli/dist/constants/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAYA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA"} \ No newline at end of file diff --git a/cli/dist/constants/index.js b/cli/dist/constants/index.js deleted file mode 100644 index 4814bd0e7a..0000000000 --- a/cli/dist/constants/index.js +++ /dev/null @@ -1,15 +0,0 @@ -import fs from 'fs-extra'; -const originalConsoleLog = console.log; -const originalConsoleError = console.error; -console.log = (...args) => { - fs.appendFileSync('../debuglogs.txt', args.join(' ') + '\n'); - originalConsoleLog(...args); -}; -console.error = (...args) => { - fs.appendFileSync('../debuglogs.txt', args.join(' ') + '\n'); - originalConsoleError(...args); -}; -export * from './InputStep.js'; -export * from './MultipleChoice.js'; -export * from './automatedSteps.js'; -export * from './types.js'; diff --git a/cli/dist/constants/types.d.ts b/cli/dist/constants/types.d.ts deleted file mode 100644 index 4cee5ed5c4..0000000000 --- a/cli/dist/constants/types.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Base type for any prompt step - */ -export type Step = { - type: string; - prompt: string; - stateKey: string; -}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/cli/dist/constants/types.d.ts.map b/cli/dist/constants/types.d.ts.map deleted file mode 100644 index 7be45e3f3d..0000000000 --- a/cli/dist/constants/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/constants/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;CAChB,CAAA"} \ No newline at end of file diff --git a/cli/dist/constants/types.js b/cli/dist/constants/types.js deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/cli/dist/constants/types.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/cli/dist/create-tevm-app.cjs b/cli/dist/create-tevm-app.cjs deleted file mode 100755 index cadf7efd6f..0000000000 --- a/cli/dist/create-tevm-app.cjs +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var Pastel = require('pastel'); - -var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null; -function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; } - -var Pastel__default = /*#__PURE__*/_interopDefault(Pastel); - -new Pastel__default.default({ - importMeta: ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('create-tevm-app.cjs', document.baseURI).href)) }), - name: "tevm", - version: "beta", - description: "entrypoint to tevm cli" -}).run(); -console.clear(); -//# sourceMappingURL=create-tevm-app.cjs.map -//# sourceMappingURL=create-tevm-app.cjs.map \ No newline at end of file diff --git a/cli/dist/create-tevm-app.cjs.map b/cli/dist/create-tevm-app.cjs.map deleted file mode 100644 index 841d6eeb5a..0000000000 --- a/cli/dist/create-tevm-app.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/create-tevm-app.tsx"],"names":["Pastel"],"mappings":";;;;;;;;;;AAOA,IAAIA,uBAAO,CAAA;AAAA,EACV,UAAY,EAAA,mNAAA;AAAA,EACZ,IAAM,EAAA,MAAA;AAAA,EACN,OAAS,EAAA,MAAA;AAAA,EACT,WAAa,EAAA,wBAAA;AACd,CAAC,EAAE,GAAI,EAAA,CAAA;AACP,OAAA,CAAQ,KAAM,EAAA","file":"create-tevm-app.cjs","sourcesContent":["#!/usr/bin/env node\nimport Pastel from 'pastel'\n\n/**\n * Uses file based routing to route commands to the [./commands](./commands) directory.\n * @see https://github.com/vadimdemedes/pastel\n */\nnew Pastel({\n\timportMeta: import.meta,\n\tname: 'tevm',\n\tversion: 'beta',\n\tdescription: 'entrypoint to tevm cli',\n}).run()\nconsole.clear()\n"]} \ No newline at end of file diff --git a/cli/dist/create-tevm-app.d.cts b/cli/dist/create-tevm-app.d.cts deleted file mode 100644 index 908ba8417a..0000000000 --- a/cli/dist/create-tevm-app.d.cts +++ /dev/null @@ -1 +0,0 @@ -#!/usr/bin/env node diff --git a/cli/dist/create-tevm-app.d.ts b/cli/dist/create-tevm-app.d.ts deleted file mode 100644 index 908ba8417a..0000000000 --- a/cli/dist/create-tevm-app.d.ts +++ /dev/null @@ -1 +0,0 @@ -#!/usr/bin/env node diff --git a/cli/dist/create-tevm-app.d.ts.map b/cli/dist/create-tevm-app.d.ts.map deleted file mode 100644 index 97e791641c..0000000000 --- a/cli/dist/create-tevm-app.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"create-tevm-app.d.ts","sourceRoot":"","sources":["../src/create-tevm-app.tsx"],"names":[],"mappings":""} \ No newline at end of file diff --git a/cli/dist/create-tevm-app.js b/cli/dist/create-tevm-app.js deleted file mode 100755 index 90a8481dc8..0000000000 --- a/cli/dist/create-tevm-app.js +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env node -import Pastel from 'pastel'; - -new Pastel({ - importMeta: import.meta, - name: "tevm", - version: "beta", - description: "entrypoint to tevm cli" -}).run(); -console.clear(); -//# sourceMappingURL=create-tevm-app.js.map -//# sourceMappingURL=create-tevm-app.js.map \ No newline at end of file diff --git a/cli/dist/create-tevm-app.js.map b/cli/dist/create-tevm-app.js.map deleted file mode 100644 index 2af94c97d1..0000000000 --- a/cli/dist/create-tevm-app.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/create-tevm-app.tsx"],"names":[],"mappings":";;;AAOA,IAAI,MAAO,CAAA;AAAA,EACV,UAAY,EAAA,MAAA,CAAA,IAAA;AAAA,EACZ,IAAM,EAAA,MAAA;AAAA,EACN,OAAS,EAAA,MAAA;AAAA,EACT,WAAa,EAAA,wBAAA;AACd,CAAC,EAAE,GAAI,EAAA,CAAA;AACP,OAAA,CAAQ,KAAM,EAAA","file":"create-tevm-app.js","sourcesContent":["#!/usr/bin/env node\nimport Pastel from 'pastel'\n\n/**\n * Uses file based routing to route commands to the [./commands](./commands) directory.\n * @see https://github.com/vadimdemedes/pastel\n */\nnew Pastel({\n\timportMeta: import.meta,\n\tname: 'tevm',\n\tversion: 'beta',\n\tdescription: 'entrypoint to tevm cli',\n}).run()\nconsole.clear()\n"]} \ No newline at end of file diff --git a/cli/dist/create/Create.d.ts b/cli/dist/create/Create.d.ts deleted file mode 100644 index 4014e91c3b..0000000000 --- a/cli/dist/create/Create.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { args } from './args.js'; -import { type options } from './options.js'; -import React from 'react'; -import { z } from 'zod'; -type Props = { - options: z.infer; - args: z.infer; -}; -export declare const App: React.FC; -export {}; -//# sourceMappingURL=Create.d.ts.map \ No newline at end of file diff --git a/cli/dist/create/Create.d.ts.map b/cli/dist/create/Create.d.ts.map deleted file mode 100644 index b13a295b42..0000000000 --- a/cli/dist/create/Create.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Create.d.ts","sourceRoot":"","sources":["../../src/create/Create.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAErC,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAA;AAK3C,OAAO,KAAyB,MAAM,OAAO,CAAA;AAC7C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,KAAK,KAAK,GAAG;IACb,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAA;IAChC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAA;CACzB,CAAA;AAID,eAAO,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA4B/B,CAAA"} \ No newline at end of file diff --git a/cli/dist/create/Create.js b/cli/dist/create/Create.js deleted file mode 100644 index 1233b131c2..0000000000 --- a/cli/dist/create/Create.js +++ /dev/null @@ -1,30 +0,0 @@ -import { Creating } from './Creating.js'; -import { InteractivePrompt } from './InteractivePrompt.js'; -import { FancyCreateTitle } from '../components/FancyCreateTitle.js'; -import {} from './options.js'; -import { useStore } from '../state/Store.js'; -import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import { Box, Text } from 'ink'; -import React, {} from 'react'; -import { z } from 'zod'; -const queryClient = new QueryClient(); -export const App = ({ options, args: [defaultName] }) => { - const store = useStore({ - ...options, - name: defaultName, - currentStep: 0, - path: '.', - nameInput: '', - walletConnectIdInput: '', - currentPage: options.skipPrompts ? 'creating' : 'interactive', - }); - const pages = { - interactive: React.createElement(InteractivePrompt, { defaultName: defaultName, store: store }), - complete: React.createElement(Text, null, "Complete"), - creating: React.createElement(Creating, { store: store }), - }; - return (React.createElement(QueryClientProvider, { client: queryClient }, - React.createElement(Box, { display: 'flex', flexDirection: 'column' }, - React.createElement(FancyCreateTitle, { key: store.currentPage, loading: store.currentPage === 'creating' }), - pages[store.currentPage]))); -}; diff --git a/cli/dist/create/Create.spec.d.ts b/cli/dist/create/Create.spec.d.ts deleted file mode 100644 index 6f85d2cc21..0000000000 --- a/cli/dist/create/Create.spec.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=Create.spec.d.ts.map \ No newline at end of file diff --git a/cli/dist/create/Create.spec.d.ts.map b/cli/dist/create/Create.spec.d.ts.map deleted file mode 100644 index e774a54fb4..0000000000 --- a/cli/dist/create/Create.spec.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Create.spec.d.ts","sourceRoot":"","sources":["../../src/create/Create.spec.tsx"],"names":[],"mappings":""} \ No newline at end of file diff --git a/cli/dist/create/Create.spec.js b/cli/dist/create/Create.spec.js deleted file mode 100644 index 38ed828411..0000000000 --- a/cli/dist/create/Create.spec.js +++ /dev/null @@ -1,47 +0,0 @@ -import { App } from './Create.js'; -import chalk from 'chalk'; -import { existsSync, rmSync } from 'fs-extra'; -import { render } from 'ink-testing-library'; -import { join } from 'path'; -import { afterAll, expect, test } from 'vitest'; -const TODO = true; -afterAll(() => { - try { - rmSync(join(__dirname, '..', '..', 'my-app'), { recursive: true }); - } - catch (e) { - console.error(e); - } -}); -test('Should work', async () => { - if (TODO) - return; - const { lastFrame, stdin } = render(React.createElement(App, { args: ['my-app'], options: { - noGit: false, - noInstall: false, - framework: 'remix', - packageManager: 'bun', - skipPrompts: true, - useCase: 'ui', - walletConnectProjectId: '123', - } })); - // hackily waiting - await new Promise((resolve) => setTimeout(resolve, 2000)); - expect(lastFrame()).toMatchSnapshot(); - stdin.write('\r'); - expect(lastFrame()).toBe(`Hello, ${chalk.green('Jane')}`); - /* - stdin.write('\r') - expect(lastFrame()).toBe(`Hello, ${chalk.green('Jane')}`) - stdin.write('\r') - expect(lastFrame()).toBe(`Hello, ${chalk.green('Jane')}`) - stdin.write('\r') - expect(lastFrame()).toBe(`Hello, ${chalk.green('Jane')}`) - stdin.write('\r') - expect(lastFrame()).toBe(`Hello, ${chalk.green('Jane')}`) - stdin.write('\r') - - await new Promise(resolve => setTimeout(resolve, 1000)) - */ - expect(existsSync(join(__dirname, '..', '..', 'my-app'))).toBe(true); -}); diff --git a/cli/dist/create/Creating.d.ts b/cli/dist/create/Creating.d.ts deleted file mode 100644 index 2276fcb847..0000000000 --- a/cli/dist/create/Creating.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { Store } from '../state/Store.js'; -import React from 'react'; -type Props = { - store: Store; -}; -export declare const Creating: React.FC; -export {}; -//# sourceMappingURL=Creating.d.ts.map \ No newline at end of file diff --git a/cli/dist/create/Creating.d.ts.map b/cli/dist/create/Creating.d.ts.map deleted file mode 100644 index 5a3080b165..0000000000 --- a/cli/dist/create/Creating.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Creating.d.ts","sourceRoot":"","sources":["../../src/create/Creating.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAM9C,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,KAAK,KAAK,GAAG;IACb,KAAK,EAAE,KAAK,CAAA;CACX,CAAA;AA+CD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAqFpC,CAAA"} \ No newline at end of file diff --git a/cli/dist/create/Creating.js b/cli/dist/create/Creating.js deleted file mode 100644 index 38453b17a1..0000000000 --- a/cli/dist/create/Creating.js +++ /dev/null @@ -1,79 +0,0 @@ -import {} from '../components/Step.js'; -import Table from '../components/Table.js'; -import { useCreateEvmtsApp } from '../hooks/useCreateEvmtsApp.js'; -import { asyncStateColors, colorPallet } from '../styles/colors.js'; -import { getTailLogs } from '../utils/getTailLogs.js'; -import { Box, Text } from 'ink'; -import Spinner from 'ink-spinner'; -import { relative } from 'path'; -import React from 'react'; -const AsyncStep = ({ name, error, prompt, mutationState, progressMessage, }) => { - const icon = { - idle: '🔵', - pending: '🟡', - success: '🟢', - error: '🔴', - }[mutationState]; - const errorMessage = typeof error === 'string' ? error : error?.message; - const promptColor = { - idle: colorPallet.gray, - pending: asyncStateColors.loading, - success: colorPallet.white, - error: asyncStateColors.error, - }[mutationState]; - return (React.createElement(Box, { flexDirection: 'column' }, - React.createElement(Box, { flexDirection: 'row', gap: 2 }, - React.createElement(Text, { bold: true, color: promptColor, dimColor: mutationState !== 'pending' }, icon), - React.createElement(Text, null, mutationState === 'pending' && React.createElement(Spinner, { type: 'dots' })), - React.createElement(Text, null, name), - React.createElement(Text, null, prompt)), - React.createElement(Text, null, mutationState === 'pending' && getTailLogs(progressMessage)), - React.createElement(Text, { color: asyncStateColors.error }, mutationState === 'error' && errorMessage))); -}; -export const Creating = ({ store }) => { - const createState = useCreateEvmtsApp(store); - const { createFixturesMutation: m0, copyTemplateMutation: m1, gitInitMutation: m2, installDependenciesMutation: m3, } = createState; - return (React.createElement(Box, { display: 'flex', flexDirection: 'column' }, - React.createElement(Table, { data: [ - { - name: store.name, - template: store.framework, - node_modules: store.packageManager, - path: relative(process.cwd(), store.path), - }, - ] }), - React.createElement(Text, null, - "completed ", - createState.settled, - " of ", - createState.length, - " tasks"), - React.createElement(AsyncStep, { name: 'Init', mutationState: m0.isSuccess - ? 'success' - : m0.isPending - ? 'pending' - : m0.isError - ? 'error' - : 'idle', prompt: `mkdir ${store.path}`, progressMessage: 'Initializing project...', error: m0.error }), - React.createElement(AsyncStep, { name: 'Scaffolding', mutationState: m1.isSuccess - ? 'success' - : m1.isPending - ? 'pending' - : m1.isError - ? 'error' - : 'idle', prompt: `Initialize ${store.framework}`, progressMessage: 'Copying template...', error: m1.error }), - React.createElement(AsyncStep, { name: 'Git', mutationState: m2.isSuccess - ? 'success' - : m2.isPending - ? 'pending' - : m2.isError - ? 'error' - : 'idle', prompt: 'git init', progressMessage: m2.stderr || m2.stdout, error: m2.error }), - React.createElement(AsyncStep, { name: 'Packages', mutationState: m3.isSuccess - ? 'success' - : m3.isPending - ? 'pending' - : m3.isError - ? 'error' - : 'idle', prompt: `Install ${store.packageManager} dependencies`, progressMessage: m3.stderr || m3.stdout, error: m3.error }))); -}; diff --git a/cli/dist/create/InteractivePrompt.d.ts b/cli/dist/create/InteractivePrompt.d.ts deleted file mode 100644 index ca61dabde1..0000000000 --- a/cli/dist/create/InteractivePrompt.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { type Store } from '../state/Store.js'; -import React from 'react'; -type Props = { - defaultName: string; - store: Store; -}; -export declare const InteractivePrompt: React.FC; -export {}; -//# sourceMappingURL=InteractivePrompt.d.ts.map \ No newline at end of file diff --git a/cli/dist/create/InteractivePrompt.d.ts.map b/cli/dist/create/InteractivePrompt.d.ts.map deleted file mode 100644 index 7c11c994ed..0000000000 --- a/cli/dist/create/InteractivePrompt.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"InteractivePrompt.d.ts","sourceRoot":"","sources":["../../src/create/InteractivePrompt.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAG9C,OAAO,KAAyB,MAAM,OAAO,CAAA;AAE7C,KAAK,KAAK,GAAG;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,KAAK,CAAA;CACZ,CAAA;AAOD,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAoQ7C,CAAA"} \ No newline at end of file diff --git a/cli/dist/create/InteractivePrompt.js b/cli/dist/create/InteractivePrompt.js deleted file mode 100644 index 38c008a604..0000000000 --- a/cli/dist/create/InteractivePrompt.js +++ /dev/null @@ -1,169 +0,0 @@ -import { MultipleChoiceStep } from '../components/MultipleChoiceStep.js'; -import { TextInputStep } from '../components/TextInputStep.js'; -import * as inputSteps from '../constants/InputStep.js'; -import * as multipleChoiceSteps from '../constants/MultipleChoice.js'; -import { defaultWalletConnect } from '../constants/defaults.js'; -import { frameworksByUseCase } from '../constants/frameworksByUseCase.js'; -import {} from '../state/Store.js'; -import { colorPallet } from '../styles/colors.js'; -import { useInput } from 'ink'; -import React, {} from 'react'; -// All colors but remove black -const colorsArray = Object.values(colorPallet).filter((color) => color !== '#000000'); -export const InteractivePrompt = ({ defaultName, store }) => { - useInput((_, { leftArrow }) => { - if (leftArrow) { - store.goToPreviousStep({}); - } - }); - const steps = []; - steps.push(React.createElement(TextInputStep, { name: 'Name', isActive: store.currentStep === steps.length, color: colorsArray[steps.length % colorsArray.length], step: inputSteps.nameStep, value: store.nameInput, placeholder: defaultName, onChange: (value) => { - store.setInput({ input: 'nameInput', value }); - }, onSubmit: (value) => { - if (value === '') { - store.selectAndContinue({ name: 'name', value: defaultName }); - return; - } - store.selectAndContinue({ name: 'name', value }); - } })); - steps.push(React.createElement(MultipleChoiceStep, { name: 'Use case', isActive: store.currentStep === steps.length, hide: store.currentStep < steps.length, color: colorsArray[steps.length % colorsArray.length], multipleChoice: multipleChoiceSteps.useCases, selectedChoice: store.useCase, onSelect: (value) => { - store.selectAndContinue({ - name: 'useCase', - value: value, - }); - } })); - steps.push(React.createElement(MultipleChoiceStep, { name: 'Template', isActive: store.currentStep === steps.length, hide: store.currentStep < steps.length, color: colorsArray[steps.length % colorsArray.length], multipleChoice: frameworksByUseCase[store.useCase], selectedChoice: store.framework, onSelect: (value) => { - store.selectAndContinue({ - name: 'framework', - value, - }); - } })); - const isBun = store.framework.includes('bun'); - const isMud = store.framework.includes('mud'); - const isUi = Object.keys(frameworksByUseCase.ui.choices).includes(store.framework); - if (!isBun && !isMud) { - steps.push(React.createElement(MultipleChoiceStep, { name: 'Manager', isActive: store.currentStep === steps.length, hide: store.currentStep < steps.length, color: colorsArray[steps.length % colorsArray.length], multipleChoice: multipleChoiceSteps.packageManagers, selectedChoice: store.packageManager, onSelect: (value) => { - store.selectAndContinue({ - name: 'packageManager', - value: value, - }); - } })); - } - // if (!isMud) { - // steps.push( - // { - // store.selectAndContinue({ - // name: 'solidityFramework', - // value: value, - // }) - // }} - // />) - // } - // if (!isMud) { - // steps.push( - // { - // store.selectAndContinue({ - // name: 'contractStrategy', - // value: value, - // }) - // }} - // />) - // } - if (!isMud) { - steps.push(React.createElement(MultipleChoiceStep, { name: 'TypeScript', isActive: store.currentStep === steps.length, hide: store.currentStep < steps.length, color: colorsArray[steps.length % colorsArray.length], multipleChoice: multipleChoiceSteps.gitChoices, selectedChoice: store.noGit ? 'none' : 'git', onSelect: (value) => { - store.selectAndContinue({ - name: 'noGit', - value: value === 'none' ? true : false, - }); - } })); - } - if (isUi && !isMud) { - steps.push(React.createElement(TextInputStep, { name: 'WalletConnect', isActive: store.currentStep === steps.length, hide: store.currentStep < steps.length, color: colorsArray[steps.length % colorsArray.length], step: inputSteps.walletConnectProjectId, value: store.walletConnectIdInput, placeholder: defaultWalletConnect, onChange: (value) => { - store.setInput({ input: 'walletConnectIdInput', value }); - }, onSubmit: (value) => { - if (value === '') { - store.selectAndContinue({ - name: 'walletConnectProjectId', - value: defaultName, - }); - return; - } - store.selectAndContinue({ name: 'walletConnectProjectId', value }); - } })); - } - // if (!isMud && !isBun) { - // steps.push( - // { - // store.selectAndContinue({ - // name: 'testFrameworks', - // value: value, - // }) - // }} - // />) - // } - // if (!isMud) { - // steps.push( - // { - // store.selectAndContinue({ - // name: 'linter', - // value: value as string, - // }) - // }} - // />) - // } - // steps.push( - // { - // store.selectAndContinue({ - // name: 'ciChoice', - // value: value, - // }) - // }} - // /> - // ) - steps.push(React.createElement(MultipleChoiceStep, { name: 'Git', isActive: store.currentStep === steps.length, hide: store.currentStep < steps.length, color: colorsArray[steps.length % colorsArray.length], multipleChoice: multipleChoiceSteps.gitChoices, selectedChoice: store.noGit ? 'none' : 'git', onSelect: (value) => { - store.selectAndContinue({ - name: 'noGit', - value: value === 'none' ? true : false, - }); - } })); - steps.push(React.createElement(MultipleChoiceStep, { name: 'Install', isActive: store.currentStep === steps.length, hide: store.currentStep < steps.length, color: colorsArray[steps.length % colorsArray.length], multipleChoice: multipleChoiceSteps.installChoices, selectedChoice: store.noInstall ? 'none' : 'install', onSelect: (value) => { - store.selectAndContinue({ - name: 'noInstall', - value: value === 'none' ? true : false, - nextPage: true, - }); - } })); - return React.createElement(React.Fragment, null, ...steps); -}; diff --git a/cli/dist/create/args.d.ts b/cli/dist/create/args.d.ts deleted file mode 100644 index 1a32975b2b..0000000000 --- a/cli/dist/create/args.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { z } from 'zod'; -export declare const args: z.ZodTuple<[z.ZodDefault>], null>; -//# sourceMappingURL=args.d.ts.map \ No newline at end of file diff --git a/cli/dist/create/args.d.ts.map b/cli/dist/create/args.d.ts.map deleted file mode 100644 index 055ae3bccc..0000000000 --- a/cli/dist/create/args.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/create/args.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,IAAI,8DAQf,CAAA"} \ No newline at end of file diff --git a/cli/dist/create/args.js b/cli/dist/create/args.js deleted file mode 100644 index 1372e4d421..0000000000 --- a/cli/dist/create/args.js +++ /dev/null @@ -1,10 +0,0 @@ -import { generateRandomName } from '../utils/generateRandomName.js'; -import { z } from 'zod'; -const defaultName = generateRandomName(); -export const args = z.tuple([ - z - .string() - .optional() - .default(defaultName) - .describe('The name of the application, as well as the name of the directory to create'), -]); diff --git a/cli/dist/create/index.d.ts b/cli/dist/create/index.d.ts deleted file mode 100644 index 78cfb117c2..0000000000 --- a/cli/dist/create/index.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { args } from './args.js'; -import { options } from './options.js'; -export declare const command: { - args: import("zod").ZodTuple<[import("zod").ZodDefault>], null>; - options: import("zod").ZodObject<{ - skipPrompts: import("zod").ZodDefault; - walletConnectProjectId: import("zod").ZodDefault; - packageManager: import("zod").ZodDefault>; - useCase: import("zod").ZodDefault>; - framework: import("zod").ZodDefault>; - noGit: import("zod").ZodDefault; - noInstall: import("zod").ZodDefault; - }, "strip", import("zod").ZodTypeAny, { - walletConnectProjectId: string; - useCase: "simple" | "ui" | "server"; - packageManager: "npm" | "pnpm" | "bun" | "yarn"; - framework: "simple" | "server" | "bun" | "mud" | "pwa" | "next" | "remix"; - skipPrompts: boolean; - noGit: boolean; - noInstall: boolean; - }, { - walletConnectProjectId?: string | undefined; - useCase?: "simple" | "ui" | "server" | undefined; - packageManager?: "npm" | "pnpm" | "bun" | "yarn" | undefined; - framework?: "simple" | "server" | "bun" | "mud" | "pwa" | "next" | "remix" | undefined; - skipPrompts?: boolean | undefined; - noGit?: boolean | undefined; - noInstall?: boolean | undefined; - }>; - Component: import("react").FC<{ - options: import("zod").TypeOf; - args: import("zod").TypeOf; - }>; -}; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/cli/dist/create/index.d.ts.map b/cli/dist/create/index.d.ts.map deleted file mode 100644 index b58dc8bad5..0000000000 --- a/cli/dist/create/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/create/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAInB,CAAA"} \ No newline at end of file diff --git a/cli/dist/create/index.js b/cli/dist/create/index.js deleted file mode 100644 index ca20e6d84a..0000000000 --- a/cli/dist/create/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import { App } from './Create.js'; -import { args } from './args.js'; -import { options } from './options.js'; -export const command = { - args, - options, - Component: App, -}; diff --git a/cli/dist/create/options.d.ts b/cli/dist/create/options.d.ts deleted file mode 100644 index 575d592637..0000000000 --- a/cli/dist/create/options.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { z } from 'zod'; -export declare const options: z.ZodObject<{ - skipPrompts: z.ZodDefault; - walletConnectProjectId: z.ZodDefault; - packageManager: z.ZodDefault>; - useCase: z.ZodDefault>; - framework: z.ZodDefault>; - noGit: z.ZodDefault; - noInstall: z.ZodDefault; -}, "strip", z.ZodTypeAny, { - walletConnectProjectId: string; - useCase: "simple" | "ui" | "server"; - packageManager: "npm" | "pnpm" | "bun" | "yarn"; - framework: "simple" | "server" | "bun" | "mud" | "pwa" | "next" | "remix"; - skipPrompts: boolean; - noGit: boolean; - noInstall: boolean; -}, { - walletConnectProjectId?: string | undefined; - useCase?: "simple" | "ui" | "server" | undefined; - packageManager?: "npm" | "pnpm" | "bun" | "yarn" | undefined; - framework?: "simple" | "server" | "bun" | "mud" | "pwa" | "next" | "remix" | undefined; - skipPrompts?: boolean | undefined; - noGit?: boolean | undefined; - noInstall?: boolean | undefined; -}>; -//# sourceMappingURL=options.d.ts.map \ No newline at end of file diff --git a/cli/dist/create/options.d.ts.map b/cli/dist/create/options.d.ts.map deleted file mode 100644 index c6c1c6c620..0000000000 --- a/cli/dist/create/options.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/create/options.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;EA4EiC,CAAA"} \ No newline at end of file diff --git a/cli/dist/create/options.js b/cli/dist/create/options.js deleted file mode 100644 index 80e700286e..0000000000 --- a/cli/dist/create/options.js +++ /dev/null @@ -1,79 +0,0 @@ -import { defaultWalletConnect } from '../constants/defaults.js'; -import { frameworks, packageManagers, useCases } from '../constants/index.js'; -import { getUserPkgManager } from '../utils/getUserPkgManager.js'; -import { z } from 'zod'; -export const options = z - .object({ - skipPrompts: z - .boolean() - .default(false) - .describe('Bypass interactive CLI prompt and use only command line flag options'), - walletConnectProjectId: z - .string() - .default(defaultWalletConnect) - .describe('Wallet connect project id'), - packageManager: z - .enum([ - packageManagers.choices.pnpm.value, - packageManagers.choices.npm.value, - packageManagers.choices.bun.value, - packageManagers.choices.yarn.value, - ]) - .default(getUserPkgManager()) - .describe('JS package manager to use'), - // contractStrategy: z - // .enum([contractStrategy.choices.local.value, contractStrategy.choices.external.value, contractStrategy.choices.both.value]) - // .default(contractStrategy.choices.local.value) - // .describe('Strategy for managing contracts'), - useCase: z - .enum([ - useCases.choices.simple.value, - useCases.choices.ui.value, - useCases.choices.server.value, - // useCases.choices.scripting.value - ]) - .default(useCases.choices.ui.value) - .describe('Use case for app'), - framework: z - .enum([ - frameworks.choices.simple.value, - frameworks.choices.mud.value, - frameworks.choices.server.value, - frameworks.choices.pwa.value, - frameworks.choices.next.value, - frameworks.choices.remix.value, - // frameworks.choices.astro.value, - // frameworks.choices.svelte.value, - // frameworks.choices.vue.value, - frameworks.choices.bun.value, - // frameworks.choices.elysia.value - ]) - .default(frameworks.choices.mud.value) - .describe('Framework to use'), - // linter: z - // .enum([linters.choices['eslint-prettier'].value, linters.choices.biome.value, linters.choices.none.value]) - // .default(linters.choices.biome.value) - // .describe('Linter to use'), - // testFrameworks: z - // .enum([testFrameworks.choices.vitest.value, testFrameworks.choices.none.value]) - // .default(testFrameworks.choices.vitest.value), - // solidityFramework: z - // .enum([solidityFrameworks.choices.foundry.value, solidityFrameworks.choices.hardhat.value, solidityFrameworks.choices.none.value]) - // .default(solidityFrameworks.choices.hardhat.value), - // typescriptStrictness: z - // .enum([typescriptStrictness.choices.strictist.value, typescriptStrictness.choices.strict.value, typescriptStrictness.choices.loose.value]) - // .default(typescriptStrictness.choices.strictist.value), - noGit: z - .boolean() - .default(false) - .describe('Skips initializing a new git repo in the project'), - noInstall: z - .boolean() - .default(false) - .describe("Skips running the package manager's install command"), - // ciChoice: z - // .enum([ciChoices.choices.githubActions.value, ciChoices.choices.none.value]) - // .default(ciChoices.choices.none.value) - // .describe('CI choice'), -}) - .describe('Options for the create-evmts-app command'); diff --git a/cli/dist/explorer/Accounts.d.ts b/cli/dist/explorer/Accounts.d.ts deleted file mode 100644 index 1e62b35f6f..0000000000 --- a/cli/dist/explorer/Accounts.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=Accounts.d.ts.map \ No newline at end of file diff --git a/cli/dist/explorer/Accounts.d.ts.map b/cli/dist/explorer/Accounts.d.ts.map deleted file mode 100644 index e682ff1ebb..0000000000 --- a/cli/dist/explorer/Accounts.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Accounts.d.ts","sourceRoot":"","sources":["../../src/explorer/Accounts.tsx"],"names":[],"mappings":""} \ No newline at end of file diff --git a/cli/dist/explorer/Accounts.js b/cli/dist/explorer/Accounts.js deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/cli/dist/explorer/Accounts.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/cli/dist/explorer/Blocks.d.ts b/cli/dist/explorer/Blocks.d.ts deleted file mode 100644 index 67cbe8c1c1..0000000000 --- a/cli/dist/explorer/Blocks.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=Blocks.d.ts.map \ No newline at end of file diff --git a/cli/dist/explorer/Blocks.d.ts.map b/cli/dist/explorer/Blocks.d.ts.map deleted file mode 100644 index c028cd93e9..0000000000 --- a/cli/dist/explorer/Blocks.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Blocks.d.ts","sourceRoot":"","sources":["../../src/explorer/Blocks.tsx"],"names":[],"mappings":""} \ No newline at end of file diff --git a/cli/dist/explorer/Blocks.js b/cli/dist/explorer/Blocks.js deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/cli/dist/explorer/Blocks.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/cli/dist/explorer/Call.d.ts b/cli/dist/explorer/Call.d.ts deleted file mode 100644 index 713e307855..0000000000 --- a/cli/dist/explorer/Call.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=Call.d.ts.map \ No newline at end of file diff --git a/cli/dist/explorer/Call.d.ts.map b/cli/dist/explorer/Call.d.ts.map deleted file mode 100644 index bd1ff05a44..0000000000 --- a/cli/dist/explorer/Call.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Call.d.ts","sourceRoot":"","sources":["../../src/explorer/Call.tsx"],"names":[],"mappings":""} \ No newline at end of file diff --git a/cli/dist/explorer/Call.js b/cli/dist/explorer/Call.js deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/cli/dist/explorer/Call.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/cli/dist/explorer/Explorer.d.ts b/cli/dist/explorer/Explorer.d.ts deleted file mode 100644 index 38da5667d2..0000000000 --- a/cli/dist/explorer/Explorer.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=Explorer.d.ts.map \ No newline at end of file diff --git a/cli/dist/explorer/Explorer.d.ts.map b/cli/dist/explorer/Explorer.d.ts.map deleted file mode 100644 index 7e179b0150..0000000000 --- a/cli/dist/explorer/Explorer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Explorer.d.ts","sourceRoot":"","sources":["../../src/explorer/Explorer.tsx"],"names":[],"mappings":""} \ No newline at end of file diff --git a/cli/dist/explorer/Explorer.js b/cli/dist/explorer/Explorer.js deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/cli/dist/explorer/Explorer.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/cli/dist/explorer/Home.d.ts b/cli/dist/explorer/Home.d.ts deleted file mode 100644 index 8c9241e101..0000000000 --- a/cli/dist/explorer/Home.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=Home.d.ts.map \ No newline at end of file diff --git a/cli/dist/explorer/Home.d.ts.map b/cli/dist/explorer/Home.d.ts.map deleted file mode 100644 index 6476f20ddd..0000000000 --- a/cli/dist/explorer/Home.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Home.d.ts","sourceRoot":"","sources":["../../src/explorer/Home.tsx"],"names":[],"mappings":""} \ No newline at end of file diff --git a/cli/dist/explorer/Home.js b/cli/dist/explorer/Home.js deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/cli/dist/explorer/Home.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/cli/dist/explorer/Storage.d.ts b/cli/dist/explorer/Storage.d.ts deleted file mode 100644 index 346aea3e9c..0000000000 --- a/cli/dist/explorer/Storage.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=Storage.d.ts.map \ No newline at end of file diff --git a/cli/dist/explorer/Storage.d.ts.map b/cli/dist/explorer/Storage.d.ts.map deleted file mode 100644 index 91b264cf88..0000000000 --- a/cli/dist/explorer/Storage.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Storage.d.ts","sourceRoot":"","sources":["../../src/explorer/Storage.tsx"],"names":[],"mappings":""} \ No newline at end of file diff --git a/cli/dist/explorer/Storage.js b/cli/dist/explorer/Storage.js deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/cli/dist/explorer/Storage.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/cli/dist/explorer/Transactions.d.ts b/cli/dist/explorer/Transactions.d.ts deleted file mode 100644 index 5608cb0c5d..0000000000 --- a/cli/dist/explorer/Transactions.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=Transactions.d.ts.map \ No newline at end of file diff --git a/cli/dist/explorer/Transactions.d.ts.map b/cli/dist/explorer/Transactions.d.ts.map deleted file mode 100644 index 0ef5e1dd9d..0000000000 --- a/cli/dist/explorer/Transactions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Transactions.d.ts","sourceRoot":"","sources":["../../src/explorer/Transactions.tsx"],"names":[],"mappings":""} \ No newline at end of file diff --git a/cli/dist/explorer/Transactions.js b/cli/dist/explorer/Transactions.js deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/cli/dist/explorer/Transactions.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/cli/dist/hooks/useCopy.d.ts b/cli/dist/hooks/useCopy.d.ts deleted file mode 100644 index 9a8fcbbb3d..0000000000 --- a/cli/dist/hooks/useCopy.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { type UseMutationResult } from '@tanstack/react-query'; -export declare const useCopy: (from: string, to: string, onSuccess: () => void, withWait?: number) => UseMutationResult; -//# sourceMappingURL=useCopy.d.ts.map \ No newline at end of file diff --git a/cli/dist/hooks/useCopy.d.ts.map b/cli/dist/hooks/useCopy.d.ts.map deleted file mode 100644 index c36273417d..0000000000 --- a/cli/dist/hooks/useCopy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"useCopy.d.ts","sourceRoot":"","sources":["../../src/hooks/useCopy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAe,MAAM,uBAAuB,CAAA;AAG3E,eAAO,MAAM,OAAO,SACb,MAAM,MACR,MAAM,aACC,MAAM,IAAI,wBAEnB,iBAAiB,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,CAS9C,CAAA"} \ No newline at end of file diff --git a/cli/dist/hooks/useCopy.js b/cli/dist/hooks/useCopy.js deleted file mode 100644 index ffa750c559..0000000000 --- a/cli/dist/hooks/useCopy.js +++ /dev/null @@ -1,13 +0,0 @@ -import { wait } from '../utils/wait.js'; -import { useMutation } from '@tanstack/react-query'; -import fs from 'fs-extra'; -export const useCopy = (from, to, onSuccess, withWait = 0) => { - return useMutation({ - onSuccess, - mutationFn: async () => { - fs.copySync(from, to); - // slowing down how this resolves makes the ux better and more clear - await wait(withWait); - }, - }); -}; diff --git a/cli/dist/hooks/useCounter.d.ts b/cli/dist/hooks/useCounter.d.ts deleted file mode 100644 index 3687b23021..0000000000 --- a/cli/dist/hooks/useCounter.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare const useCounter: (n: number) => { - count: number; - isRunning: boolean; -}; -//# sourceMappingURL=useCounter.d.ts.map \ No newline at end of file diff --git a/cli/dist/hooks/useCounter.d.ts.map b/cli/dist/hooks/useCounter.d.ts.map deleted file mode 100644 index c71735cd76..0000000000 --- a/cli/dist/hooks/useCounter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"useCounter.d.ts","sourceRoot":"","sources":["../../src/hooks/useCounter.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,MAAO,MAAM;;;CASnC,CAAA"} \ No newline at end of file diff --git a/cli/dist/hooks/useCounter.js b/cli/dist/hooks/useCounter.js deleted file mode 100644 index dd7b46ce96..0000000000 --- a/cli/dist/hooks/useCounter.js +++ /dev/null @@ -1,11 +0,0 @@ -import { useEffect, useState } from 'react'; -export const useCounter = (n) => { - const [count, setCount] = useState(0); - useEffect(() => { - const intervalId = setInterval(() => { - setCount((currentCount) => currentCount + 1); - }, 50); - return () => clearInterval(intervalId); - }, [count, n]); - return { count, isRunning: count < n }; -}; diff --git a/cli/dist/hooks/useCreateDir.d.ts b/cli/dist/hooks/useCreateDir.d.ts deleted file mode 100644 index 9cb90ecbf8..0000000000 --- a/cli/dist/hooks/useCreateDir.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { type UseMutationResult } from '@tanstack/react-query'; -export declare const useCreateDir: (appPath: string, onSuccess: () => void, withWait?: number) => UseMutationResult; -//# sourceMappingURL=useCreateDir.d.ts.map \ No newline at end of file diff --git a/cli/dist/hooks/useCreateDir.d.ts.map b/cli/dist/hooks/useCreateDir.d.ts.map deleted file mode 100644 index a7b531d9ce..0000000000 --- a/cli/dist/hooks/useCreateDir.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"useCreateDir.d.ts","sourceRoot":"","sources":["../../src/hooks/useCreateDir.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAe,MAAM,uBAAuB,CAAA;AAG3E,eAAO,MAAM,YAAY,YACf,MAAM,aACJ,MAAM,IAAI,wBAEnB,iBAAiB,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,CAY9C,CAAA"} \ No newline at end of file diff --git a/cli/dist/hooks/useCreateDir.js b/cli/dist/hooks/useCreateDir.js deleted file mode 100644 index ffee5b2b90..0000000000 --- a/cli/dist/hooks/useCreateDir.js +++ /dev/null @@ -1,16 +0,0 @@ -import { wait } from '../utils/wait.js'; -import { useMutation } from '@tanstack/react-query'; -import fs from 'fs-extra'; -export const useCreateDir = (appPath, onSuccess, withWait = 0) => { - return useMutation({ - onSuccess, - mutationFn: async () => { - if (await fs.exists(appPath)) { - throw new Error(`Directory ${appPath} already exists`); - } - await fs.mkdir(appPath, { recursive: true }); - // slowing down this resolving makes the ux better - await wait(withWait); - }, - }); -}; diff --git a/cli/dist/hooks/useCreateEvmtsApp.d.ts b/cli/dist/hooks/useCreateEvmtsApp.d.ts deleted file mode 100644 index 1858acfd06..0000000000 --- a/cli/dist/hooks/useCreateEvmtsApp.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Store } from '../state/Store.js'; -export declare const useCreateEvmtsApp: (state: Store) => any; -//# sourceMappingURL=useCreateEvmtsApp.d.ts.map \ No newline at end of file diff --git a/cli/dist/hooks/useCreateEvmtsApp.d.ts.map b/cli/dist/hooks/useCreateEvmtsApp.d.ts.map deleted file mode 100644 index 8734bd73b8..0000000000 --- a/cli/dist/hooks/useCreateEvmtsApp.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"useCreateEvmtsApp.d.ts","sourceRoot":"","sources":["../../src/hooks/useCreateEvmtsApp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAe9C,eAAO,MAAM,iBAAiB,UAAW,KAAK,KAAG,GA6JhD,CAAA"} \ No newline at end of file diff --git a/cli/dist/hooks/useCreateEvmtsApp.js b/cli/dist/hooks/useCreateEvmtsApp.js deleted file mode 100644 index fb77f36a52..0000000000 --- a/cli/dist/hooks/useCreateEvmtsApp.js +++ /dev/null @@ -1,138 +0,0 @@ -import { wait } from '../utils/wait.js'; -import { useCopy } from './useCopy.js'; -import { useCreateDir } from './useCreateDir.js'; -import { useExec } from './useExec.js'; -import { useMutation } from '@tanstack/react-query'; -import { basename, dirname, join } from 'path'; -import { useEffect, useMemo } from 'react'; -import { fileURLToPath } from 'url'; -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const fixturesDir = join(__dirname, '..', '..', 'fixtures'); -export const useCreateEvmtsApp = (state) => { - const appPath = join(process.cwd(), basename(state.name)); - const fixturePath = join(fixturesDir, `${state.framework}/`); - const createFixturesMutation = useCreateDir(appPath, async () => { - copyTemplateMutation.mutate(); - }, 1000); - const copyTemplateMutation = useCopy(fixturePath, appPath, async () => { - if (!state.noGit) { - gitInitMutation.mutate(); - } - else if (!state.noInstall) { - installDependenciesMutation.mutate(); - } - else { - goToNextPageMutation.mutate(); - } - }, 1000); - const gitInitMutation = useExec('git', appPath, ['init'], async () => { - if (!state.noInstall) { - installDependenciesMutation.mutate(); - } - else { - goToNextPageMutation.mutate(); - } - }, 1000); - const installDependenciesMutation = useExec(state.packageManager, appPath, ['install'], async () => { - state.goToNextPage({}); - }); - const goToNextPageMutation = useMutation({ - mutationFn: async () => { - // wait before going to next page - await wait(1000); - state.goToNextPage({}); - }, - }); - useEffect(() => { - createFixturesMutation.mutate(); - }, []); - return useMemo(() => { - const mutations = []; - mutations.push(createFixturesMutation); - mutations.push(copyTemplateMutation); - if (!state.noGit) { - mutations.push(gitInitMutation); - } - if (!state.noInstall) { - mutations.push(installDependenciesMutation); - } - mutations.push(goToNextPageMutation); - // don't count the go to next step mutation - const length = mutations.length - 1; - const isFailure = mutations.some((mutation) => mutation.isError); - const errors = mutations - .map((mutation) => typeof mutation.error === 'string' - ? mutation.error - : mutation.error?.message) - .filter(Boolean); - const isComplete = mutations.every((mutation) => mutation.isSuccess); - // don't count the go to next step mutation - const settled = Math.min(length, mutations.filter((mutation) => mutation.isError || mutation.isSuccess) - .length); - const currentMutation = mutations[settled]; - let output = {}; - if (currentMutation && 'stdout' in currentMutation) { - output = { - stdout: currentMutation.stdout, - stderr: currentMutation.stderr, - }; - } - const debugState = { - createFixture: { - isSuccess: createFixturesMutation.isSuccess, - data: createFixturesMutation.data, - loading: createFixturesMutation.isPending, - error: createFixturesMutation.error, - }, - copyTemplate: { - isSuccess: copyTemplateMutation.isSuccess, - data: copyTemplateMutation.data, - loading: copyTemplateMutation.isPending, - error: copyTemplateMutation.error, - }, - gitInit: { - isSuccess: gitInitMutation.isSuccess, - data: gitInitMutation.data, - loading: gitInitMutation.isPending && - !gitInitMutation.isError && - !gitInitMutation.isSuccess, - error: gitInitMutation.error, - }, - installDependencies: { - isSuccess: installDependenciesMutation.isSuccess, - data: installDependenciesMutation.data, - loading: installDependenciesMutation.isPending && - !installDependenciesMutation.isError && - !installDependenciesMutation.isSuccess, - error: installDependenciesMutation.error, - }, - goToNextPage: { - isSuccess: goToNextPageMutation.isSuccess, - data: goToNextPageMutation.data, - loading: goToNextPageMutation.isPending, - error: goToNextPageMutation.error, - }, - }; - return { - debugState, - errors, - output, - length, - settled, - isFailure, - isComplete, - currentMutation, - createFixturesMutation, - copyTemplateMutation, - gitInitMutation, - installDependenciesMutation, - goToNextPageMutation, - }; - }, [ - createFixturesMutation, - copyTemplateMutation, - gitInitMutation, - installDependenciesMutation, - ]); -}; diff --git a/cli/dist/hooks/useExec.d.ts b/cli/dist/hooks/useExec.d.ts deleted file mode 100644 index 5a54e6582e..0000000000 --- a/cli/dist/hooks/useExec.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export declare const useExec: (command: string, cwd: string, args: any, onSuccess: () => void, withWait?: number) => { - data: string; - stdout: string; - stderr: string; - error: string; - exitCode: number | undefined; - mutate: import("react").DispatchWithoutAction; - isPending: boolean; - isSuccess: boolean; - isError: boolean; -}; -//# sourceMappingURL=useExec.d.ts.map \ No newline at end of file diff --git a/cli/dist/hooks/useExec.d.ts.map b/cli/dist/hooks/useExec.d.ts.map deleted file mode 100644 index 2b2d8a3842..0000000000 --- a/cli/dist/hooks/useExec.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"useExec.d.ts","sourceRoot":"","sources":["../../src/hooks/useExec.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,OAAO,YACV,MAAM,OACV,MAAM,QACL,GAAG,aACE,MAAM,IAAI;;;;;;;;;;CA0CrB,CAAA"} \ No newline at end of file diff --git a/cli/dist/hooks/useExec.js b/cli/dist/hooks/useExec.js deleted file mode 100644 index 3f6280dcbf..0000000000 --- a/cli/dist/hooks/useExec.js +++ /dev/null @@ -1,43 +0,0 @@ -import { wait } from '../utils/wait.js'; -import { spawn } from 'child_process'; -import { useEffect, useReducer, useState } from 'react'; -export const useExec = (command, cwd, args, onSuccess, withWait = 0) => { - const [isStarted, mutate] = useReducer(() => true, false); - const [output, setOutput] = useState(''); - const [error, setError] = useState(''); - const [exitCode, setExitCode] = useState(); - useEffect(() => { - if (!isStarted) { - return; - } - const child = spawn(command, args, { cwd }); - child.stdout.on('data', (data) => { - setOutput((prev) => prev + data.toString()); - }); - child.stderr.on('error', (data) => { - setError((prev) => prev + data.toString()); - }); - child.stderr.on('data', (data) => { - setError((prev) => prev + data.toString()); - }); - child.on('close', async (code) => { - // slowing down how fast this resolves improves ux and makes it more clear what is happening - await wait(withWait); - setExitCode(code ?? 0); - if (code === 0) { - onSuccess(); - } - }); - }, [command, ...args, isStarted]); - return { - data: output, - stdout: output, - stderr: error, - error, - exitCode, - mutate, - isPending: isStarted && exitCode === undefined, - isSuccess: exitCode === 0, - isError: exitCode !== undefined && exitCode !== 0, - }; -}; diff --git a/cli/dist/index.cjs b/cli/dist/index.cjs deleted file mode 100644 index 8add4f82a7..0000000000 --- a/cli/dist/index.cjs +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -var App_js = require('./App.js'); -var args_js = require('./args.js'); -var options_js = require('./options.js'); - -const command = { - args: args_js.args, - options: options_js.options, - Component: App_js.App -}; - -exports.command = command; -//# sourceMappingURL=out.js.map -//# sourceMappingURL=index.cjs.map \ No newline at end of file diff --git a/cli/dist/index.cjs.map b/cli/dist/index.cjs.map deleted file mode 100644 index d6652b1b65..0000000000 --- a/cli/dist/index.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AAAA,SAAS,WAAW;AACpB,SAAS,YAAY;AACrB,SAAS,eAAe;AAEjB,MAAM,UAAU;AAAA,EACtB;AAAA,EACA;AAAA,EACA,WAAW;AACZ","sourcesContent":["import { App } from './App.js'\nimport { args } from './args.js'\nimport { options } from './options.js'\n\nexport const command = {\n\targs,\n\toptions,\n\tComponent: App,\n}\n"]} \ No newline at end of file diff --git a/cli/dist/index.d.cts b/cli/dist/index.d.cts deleted file mode 100644 index d4548592ac..0000000000 --- a/cli/dist/index.d.cts +++ /dev/null @@ -1,66 +0,0 @@ -import * as react from 'react'; -import * as zod from 'zod'; -import { z } from 'zod'; - -declare const args: z.ZodTuple<[z.ZodDefault>], null>; - -declare const options: z.ZodObject<{ - skipPrompts: z.ZodDefault; - walletConnectProjectId: z.ZodDefault; - packageManager: z.ZodDefault>; - useCase: z.ZodDefault>; - framework: z.ZodDefault>; - noGit: z.ZodDefault; - noInstall: z.ZodDefault; -}, "strip", z.ZodTypeAny, { - skipPrompts: boolean; - walletConnectProjectId: string; - packageManager: "npm" | "pnpm" | "bun" | "yarn"; - useCase: "simple" | "ui" | "server"; - framework: "bun" | "simple" | "server" | "mud" | "pwa" | "next" | "remix"; - noGit: boolean; - noInstall: boolean; -}, { - skipPrompts?: boolean | undefined; - walletConnectProjectId?: string | undefined; - packageManager?: "npm" | "pnpm" | "bun" | "yarn" | undefined; - useCase?: "simple" | "ui" | "server" | undefined; - framework?: "bun" | "simple" | "server" | "mud" | "pwa" | "next" | "remix" | undefined; - noGit?: boolean | undefined; - noInstall?: boolean | undefined; -}>; - -declare const command: { - args: zod.ZodTuple<[zod.ZodDefault>], null>; - options: zod.ZodObject<{ - skipPrompts: zod.ZodDefault; - walletConnectProjectId: zod.ZodDefault; - packageManager: zod.ZodDefault>; - useCase: zod.ZodDefault>; - framework: zod.ZodDefault>; - noGit: zod.ZodDefault; - noInstall: zod.ZodDefault; - }, "strip", zod.ZodTypeAny, { - skipPrompts: boolean; - walletConnectProjectId: string; - packageManager: "npm" | "pnpm" | "bun" | "yarn"; - useCase: "simple" | "ui" | "server"; - framework: "bun" | "simple" | "server" | "mud" | "pwa" | "next" | "remix"; - noGit: boolean; - noInstall: boolean; - }, { - skipPrompts?: boolean | undefined; - walletConnectProjectId?: string | undefined; - packageManager?: "npm" | "pnpm" | "bun" | "yarn" | undefined; - useCase?: "simple" | "ui" | "server" | undefined; - framework?: "bun" | "simple" | "server" | "mud" | "pwa" | "next" | "remix" | undefined; - noGit?: boolean | undefined; - noInstall?: boolean | undefined; - }>; - Component: react.FC<{ - options: zod.TypeOf; - args: zod.TypeOf; - }>; -}; - -export { command }; diff --git a/cli/dist/index.d.ts b/cli/dist/index.d.ts deleted file mode 100644 index d4548592ac..0000000000 --- a/cli/dist/index.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import * as react from 'react'; -import * as zod from 'zod'; -import { z } from 'zod'; - -declare const args: z.ZodTuple<[z.ZodDefault>], null>; - -declare const options: z.ZodObject<{ - skipPrompts: z.ZodDefault; - walletConnectProjectId: z.ZodDefault; - packageManager: z.ZodDefault>; - useCase: z.ZodDefault>; - framework: z.ZodDefault>; - noGit: z.ZodDefault; - noInstall: z.ZodDefault; -}, "strip", z.ZodTypeAny, { - skipPrompts: boolean; - walletConnectProjectId: string; - packageManager: "npm" | "pnpm" | "bun" | "yarn"; - useCase: "simple" | "ui" | "server"; - framework: "bun" | "simple" | "server" | "mud" | "pwa" | "next" | "remix"; - noGit: boolean; - noInstall: boolean; -}, { - skipPrompts?: boolean | undefined; - walletConnectProjectId?: string | undefined; - packageManager?: "npm" | "pnpm" | "bun" | "yarn" | undefined; - useCase?: "simple" | "ui" | "server" | undefined; - framework?: "bun" | "simple" | "server" | "mud" | "pwa" | "next" | "remix" | undefined; - noGit?: boolean | undefined; - noInstall?: boolean | undefined; -}>; - -declare const command: { - args: zod.ZodTuple<[zod.ZodDefault>], null>; - options: zod.ZodObject<{ - skipPrompts: zod.ZodDefault; - walletConnectProjectId: zod.ZodDefault; - packageManager: zod.ZodDefault>; - useCase: zod.ZodDefault>; - framework: zod.ZodDefault>; - noGit: zod.ZodDefault; - noInstall: zod.ZodDefault; - }, "strip", zod.ZodTypeAny, { - skipPrompts: boolean; - walletConnectProjectId: string; - packageManager: "npm" | "pnpm" | "bun" | "yarn"; - useCase: "simple" | "ui" | "server"; - framework: "bun" | "simple" | "server" | "mud" | "pwa" | "next" | "remix"; - noGit: boolean; - noInstall: boolean; - }, { - skipPrompts?: boolean | undefined; - walletConnectProjectId?: string | undefined; - packageManager?: "npm" | "pnpm" | "bun" | "yarn" | undefined; - useCase?: "simple" | "ui" | "server" | undefined; - framework?: "bun" | "simple" | "server" | "mud" | "pwa" | "next" | "remix" | undefined; - noGit?: boolean | undefined; - noInstall?: boolean | undefined; - }>; - Component: react.FC<{ - options: zod.TypeOf; - args: zod.TypeOf; - }>; -}; - -export { command }; diff --git a/cli/dist/index.js b/cli/dist/index.js deleted file mode 100644 index 5160ca7069..0000000000 --- a/cli/dist/index.js +++ /dev/null @@ -1,13 +0,0 @@ -import { App } from './App.js'; -import { args } from './args.js'; -import { options } from './options.js'; - -const command = { - args, - options, - Component: App -}; - -export { command }; -//# sourceMappingURL=out.js.map -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/cli/dist/index.js.map b/cli/dist/index.js.map deleted file mode 100644 index d6652b1b65..0000000000 --- a/cli/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AAAA,SAAS,WAAW;AACpB,SAAS,YAAY;AACrB,SAAS,eAAe;AAEjB,MAAM,UAAU;AAAA,EACtB;AAAA,EACA;AAAA,EACA,WAAW;AACZ","sourcesContent":["import { App } from './App.js'\nimport { args } from './args.js'\nimport { options } from './options.js'\n\nexport const command = {\n\targs,\n\toptions,\n\tComponent: App,\n}\n"]} \ No newline at end of file diff --git a/cli/dist/server/Server.d.ts b/cli/dist/server/Server.d.ts deleted file mode 100644 index 725d06cc46..0000000000 --- a/cli/dist/server/Server.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import { z } from 'zod'; -import { options as optionsSchema } from './options.js'; -type ServerProps = { - options: z.infer; -}; -export declare const Server: React.FC; -export {}; -//# sourceMappingURL=Server.d.ts.map \ No newline at end of file diff --git a/cli/dist/server/Server.d.ts.map b/cli/dist/server/Server.d.ts.map deleted file mode 100644 index c76f1a612b..0000000000 --- a/cli/dist/server/Server.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Server.d.ts","sourceRoot":"","sources":["../../src/server/Server.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAIvC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,cAAc,CAAC;AAExD,KAAK,WAAW,GAAG;IACnB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;CACtC,CAAC;AAIF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAkBxC,CAAC"} \ No newline at end of file diff --git a/cli/dist/server/Server.js b/cli/dist/server/Server.js deleted file mode 100644 index 1fe91b6a51..0000000000 --- a/cli/dist/server/Server.js +++ /dev/null @@ -1,20 +0,0 @@ -import React, { useMemo } from 'react'; -import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import { Box } from 'ink'; -import { StartServer } from './StartServer.js'; -import { z } from 'zod'; -import { options as optionsSchema } from './options.js'; -const queryClient = new QueryClient(); -export const Server = ({ options }) => { - const parsedOptions = useMemo(() => { - return optionsSchema.safeParse(options); - }, [options]); - if (parsedOptions.success === false) { - return (React.createElement(Box, { display: "flex", flexDirection: "column", padding: 1 }, - "Invalid options $", - parsedOptions.error.message)); - } - return (React.createElement(QueryClientProvider, { client: queryClient }, - React.createElement(Box, { display: "flex", flexDirection: "column", padding: 1 }, - React.createElement(StartServer, { options: parsedOptions.data })))); -}; diff --git a/cli/dist/server/StartServer.d.ts b/cli/dist/server/StartServer.d.ts deleted file mode 100644 index aed3d33bf5..0000000000 --- a/cli/dist/server/StartServer.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import React from 'react'; -import type { StartServerProps } from './StartServerProps.js'; -export declare const StartServer: React.FC; -//# sourceMappingURL=StartServer.d.ts.map \ No newline at end of file diff --git a/cli/dist/server/StartServer.d.ts.map b/cli/dist/server/StartServer.d.ts.map deleted file mode 100644 index b96695c121..0000000000 --- a/cli/dist/server/StartServer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StartServer.d.ts","sourceRoot":"","sources":["../../src/server/StartServer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAiDlD,CAAC"} \ No newline at end of file diff --git a/cli/dist/server/StartServer.js b/cli/dist/server/StartServer.js deleted file mode 100644 index 6df97494df..0000000000 --- a/cli/dist/server/StartServer.js +++ /dev/null @@ -1,47 +0,0 @@ -import React from 'react'; -import { useQuery } from '@tanstack/react-query'; -import { Box, Text } from 'ink'; -import { PREFUNDED_ACCOUNTS, PREFUNDED_PRIVATE_KEYS } from '@tevm/utils'; -import { startTevm } from './startTevm.js'; -import { FancyCreateTitle } from '../components/FancyCreateTitle.js'; -export const StartServer = ({ options }) => { - const { data, error, isLoading } = useQuery({ - queryKey: ['tevm', options.preset, options.preset, options.host, options.loggingLevel, options.block, options.forkUrl, options.port], - queryFn: () => startTevm(options), - staleTime: Infinity, - }); - return (React.createElement(Box, null, - React.createElement(FancyCreateTitle, { loading: isLoading }), - (() => { - if (isLoading) { - return React.createElement(Text, null, "Initializing..."); - } - if (error) { - return (React.createElement(Box, null, - React.createElement(Text, { color: "red" }, - "Error starting TEVM server: ", - error.message))); - } - })())); - return (React.createElement(Box, { flexDirection: "column" }, - React.createElement(Text, null, "TEVM server started successfully!"), - React.createElement(Box, { flexDirection: "column", marginY: 1 }, - React.createElement(Text, null, - "Chain ID: ", - options.chainId), - React.createElement(Text, null, - "Listening on ", - options.host, - ":", - options.port), - React.createElement(Text, null, - "Logging Level: ", - options.loggingLevel)), - React.createElement(Text, null, "Available Accounts"), - React.createElement(Text, null, PREFUNDED_ACCOUNTS.map((acc, index) => `(${index}) ${acc.address} (1000 ETH)`).join('\n')), - React.createElement(Text, null, "Private Keys"), - React.createElement(Text, null, PREFUNDED_PRIVATE_KEYS.map((acc, index) => `(${index}) ${acc}`).join('\n')), - React.createElement(Text, null, "Wallet"), - React.createElement(Text, null, "Mnemonic: test test test test test test test test test test test junk"), - React.createElement(Text, null, "Derivation path: m/44'/60'/0'/0/"))); -}; diff --git a/cli/dist/server/StartServerProps.d.ts b/cli/dist/server/StartServerProps.d.ts deleted file mode 100644 index 0fd28e7130..0000000000 --- a/cli/dist/server/StartServerProps.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { options as optionsSchema } from './options.js'; -import { z } from 'zod'; -export type StartServerProps = { - options: z.infer; -}; -//# sourceMappingURL=StartServerProps.d.ts.map \ No newline at end of file diff --git a/cli/dist/server/StartServerProps.d.ts.map b/cli/dist/server/StartServerProps.d.ts.map deleted file mode 100644 index 98e9ce4ff1..0000000000 --- a/cli/dist/server/StartServerProps.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"StartServerProps.d.ts","sourceRoot":"","sources":["../../src/server/StartServerProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,MAAM,gBAAgB,GAAG;IAC/B,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;CACtC,CAAC"} \ No newline at end of file diff --git a/cli/dist/server/StartServerProps.js b/cli/dist/server/StartServerProps.js deleted file mode 100644 index c76864b1a6..0000000000 --- a/cli/dist/server/StartServerProps.js +++ /dev/null @@ -1,2 +0,0 @@ -import { options as optionsSchema } from './options.js'; -import { z } from 'zod'; diff --git a/cli/dist/server/args.d.ts b/cli/dist/server/args.d.ts deleted file mode 100644 index 1a32975b2b..0000000000 --- a/cli/dist/server/args.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { z } from 'zod'; -export declare const args: z.ZodTuple<[z.ZodDefault>], null>; -//# sourceMappingURL=args.d.ts.map \ No newline at end of file diff --git a/cli/dist/server/args.d.ts.map b/cli/dist/server/args.d.ts.map deleted file mode 100644 index 3cd42be859..0000000000 --- a/cli/dist/server/args.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/server/args.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,IAAI,8DAQf,CAAA"} \ No newline at end of file diff --git a/cli/dist/server/args.js b/cli/dist/server/args.js deleted file mode 100644 index 1372e4d421..0000000000 --- a/cli/dist/server/args.js +++ /dev/null @@ -1,10 +0,0 @@ -import { generateRandomName } from '../utils/generateRandomName.js'; -import { z } from 'zod'; -const defaultName = generateRandomName(); -export const args = z.tuple([ - z - .string() - .optional() - .default(defaultName) - .describe('The name of the application, as well as the name of the directory to create'), -]); diff --git a/cli/dist/server/chains.d.ts b/cli/dist/server/chains.d.ts deleted file mode 100644 index 01e55050f6..0000000000 --- a/cli/dist/server/chains.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare const chains: { - [x: number]: import("@tevm/common").Common; -}; -//# sourceMappingURL=chains.d.ts.map \ No newline at end of file diff --git a/cli/dist/server/chains.d.ts.map b/cli/dist/server/chains.d.ts.map deleted file mode 100644 index 76e1e33283..0000000000 --- a/cli/dist/server/chains.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["../../src/server/chains.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM;;CAKlB,CAAC"} \ No newline at end of file diff --git a/cli/dist/server/chains.js b/cli/dist/server/chains.js deleted file mode 100644 index ff36bb6a46..0000000000 --- a/cli/dist/server/chains.js +++ /dev/null @@ -1,7 +0,0 @@ -import { base, optimism, mainnet, tevmDefault } from '@tevm/common'; -export const chains = { - [base.id]: base, - [optimism.id]: optimism, - [mainnet.id]: mainnet, - [tevmDefault.id]: tevmDefault, -}; diff --git a/cli/dist/server/createServer.d.ts b/cli/dist/server/createServer.d.ts deleted file mode 100644 index 0f198cfeba..0000000000 --- a/cli/dist/server/createServer.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=createServer.d.ts.map \ No newline at end of file diff --git a/cli/dist/server/createServer.d.ts.map b/cli/dist/server/createServer.d.ts.map deleted file mode 100644 index 7f57a911db..0000000000 --- a/cli/dist/server/createServer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"createServer.d.ts","sourceRoot":"","sources":["../../src/server/createServer.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/cli/dist/server/createServer.js b/cli/dist/server/createServer.js deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/cli/dist/server/createServer.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/cli/dist/server/index.d.ts b/cli/dist/server/index.d.ts deleted file mode 100644 index 000750ace0..0000000000 --- a/cli/dist/server/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { options } from './options.js'; -export declare const command: { - args: import("zod").ZodTuple<[import("zod").ZodDefault>], null>; - options: import("zod").ZodObject<{ - preset: import("zod").ZodEffects, number, string | undefined>; - forkUrl: import("zod").ZodOptional; - block: import("zod").ZodEffects, import("zod").ZodLiteral<"earliest">, import("zod").ZodLiteral<"pending">, import("zod").ZodLiteral<"safe">, import("zod").ZodLiteral<"finalized">, import("zod").ZodBigInt, import("zod").ZodEffects]>, bigint | "pending" | "latest" | "earliest" | "safe" | "finalized" | `0x${string}`, string | bigint>; - host: import("zod").ZodDefault; - port: import("zod").ZodDefault; - loggingLevel: import("zod").ZodDefault, import("zod").ZodLiteral<"debug">, import("zod").ZodLiteral<"info">, import("zod").ZodLiteral<"warn">, import("zod").ZodLiteral<"error">]>>; - }, "strict", import("zod").ZodTypeAny, { - block: bigint | "pending" | "latest" | "earliest" | "safe" | "finalized" | `0x${string}`; - preset: number; - host: string; - port: string; - loggingLevel: "error" | "trace" | "debug" | "info" | "warn"; - forkUrl?: string | undefined; - }, { - block: string | bigint; - preset?: string | undefined; - forkUrl?: string | undefined; - host?: string | undefined; - port?: string | undefined; - loggingLevel?: "error" | "trace" | "debug" | "info" | "warn" | undefined; - }>; - Component: import("react").FC<{ - options: import("zod").TypeOf; - }>; -}; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/cli/dist/server/index.d.ts.map b/cli/dist/server/index.d.ts.map deleted file mode 100644 index f60f5402de..0000000000 --- a/cli/dist/server/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;CAInB,CAAA"} \ No newline at end of file diff --git a/cli/dist/server/index.js b/cli/dist/server/index.js deleted file mode 100644 index 8d3860b1e7..0000000000 --- a/cli/dist/server/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import { Server } from './Server.js'; -import { args } from './args.js'; -import { options } from './options.js'; -export const command = { - args, - options, - Component: Server, -}; diff --git a/cli/dist/server/options.d.ts b/cli/dist/server/options.d.ts deleted file mode 100644 index 5ff38365f0..0000000000 --- a/cli/dist/server/options.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { z } from 'zod'; -export declare const options: z.ZodObject<{ - preset: z.ZodEffects, number, string | undefined>; - forkUrl: z.ZodOptional; - block: z.ZodEffects, z.ZodLiteral<"earliest">, z.ZodLiteral<"pending">, z.ZodLiteral<"safe">, z.ZodLiteral<"finalized">, z.ZodBigInt, z.ZodEffects]>, bigint | "pending" | "latest" | "earliest" | "safe" | "finalized" | `0x${string}`, string | bigint>; - host: z.ZodDefault; - port: z.ZodDefault; - loggingLevel: z.ZodDefault, z.ZodLiteral<"debug">, z.ZodLiteral<"info">, z.ZodLiteral<"warn">, z.ZodLiteral<"error">]>>; -}, "strict", z.ZodTypeAny, { - block: bigint | "pending" | "latest" | "earliest" | "safe" | "finalized" | `0x${string}`; - preset: number; - host: string; - port: string; - loggingLevel: "error" | "trace" | "debug" | "info" | "warn"; - forkUrl?: string | undefined; -}, { - block: string | bigint; - preset?: string | undefined; - forkUrl?: string | undefined; - host?: string | undefined; - port?: string | undefined; - loggingLevel?: "error" | "trace" | "debug" | "info" | "warn" | undefined; -}>; -//# sourceMappingURL=options.d.ts.map \ No newline at end of file diff --git a/cli/dist/server/options.d.ts.map b/cli/dist/server/options.d.ts.map deleted file mode 100644 index 8ff27004f2..0000000000 --- a/cli/dist/server/options.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/server/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;EAkBlB,CAAC"} \ No newline at end of file diff --git a/cli/dist/server/options.js b/cli/dist/server/options.js deleted file mode 100644 index c579f177d3..0000000000 --- a/cli/dist/server/options.js +++ /dev/null @@ -1,21 +0,0 @@ -import { z } from 'zod'; -import { zBlockParam } from '@tevm/actions'; -// Define options using zod -export const options = z.strictObject({ - preset: z.string().default('900').transform(id => { - return parseInt(id); - }).describe('use known chain id'), - forkUrl: z.string().optional().describe('set fork URL'), - block: zBlockParam.transform(block => { - if (typeof block === 'string' && block.startsWith('0x') && block.length !== 66) { - return BigInt(parseInt(block)); - } - if (typeof block === 'number') { - return BigInt(block); - } - return block; - }), - host: z.string().default('localhost').describe('set host'), - port: z.string().default('8545').describe('set port'), - loggingLevel: z.union([z.literal('trace'), z.literal('debug'), z.literal('info'), z.literal('warn'), z.literal('error')]).default('warn').describe('set logging level'), -}); diff --git a/cli/dist/server/startTevm.d.ts b/cli/dist/server/startTevm.d.ts deleted file mode 100644 index 5e580c009f..0000000000 --- a/cli/dist/server/startTevm.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { options as optionsSchema } from './options.js'; -import { z } from 'zod'; -export declare const startTevm: (options: z.infer) => Promise<{ - transport: { - config: import("viem").TransportConfig; - request: import("@tevm/decorators").EIP1193RequestFn; - value: { - tevm: import("@tevm/base-client").BaseClient & { - request: import("@tevm/decorators").EIP1193RequestFn; - }; - }; - }; - server: import("http").Server; -}>; -//# sourceMappingURL=startTevm.d.ts.map \ No newline at end of file diff --git a/cli/dist/server/startTevm.d.ts.map b/cli/dist/server/startTevm.d.ts.map deleted file mode 100644 index 014a68b711..0000000000 --- a/cli/dist/server/startTevm.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"startTevm.d.ts","sourceRoot":"","sources":["../../src/server/startTevm.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,SAAS,YAAmB,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC;;;;;;;;;;;EAuBrE,CAAC"} \ No newline at end of file diff --git a/cli/dist/server/startTevm.js b/cli/dist/server/startTevm.js deleted file mode 100644 index b68d3885d1..0000000000 --- a/cli/dist/server/startTevm.js +++ /dev/null @@ -1,26 +0,0 @@ -import { createTevmTransport } from '@tevm/memory-client'; -import { http } from '@tevm/jsonrpc'; -import { createServer } from '@tevm/server'; -import { options as optionsSchema } from './options.js'; -import { z } from 'zod'; -import { chains } from './chains.js'; -export const startTevm = async (options) => { - const chain = options.preset !== undefined ? chains[options.preset] : undefined; - const transport = createTevmTransport({ - ...(chain !== undefined ? { common: chain } : {}), - fork: { - // TODO transform it into parsing block tag right with tevm/zod - blockTag: options.block ?? 'latest', - transport: http(options.forkUrl ?? chain?.rpcUrls.default.http[0])({}), - }, - loggingLevel: options.loggingLevel, - })({ chain, retryCount: 2 }); - const server = createServer(transport); - await new Promise((resolve) => { - server.listen(parseInt(options.port), options.host, resolve); - }); - return { - transport, - server, - }; -}; diff --git a/cli/dist/state/State.d.ts b/cli/dist/state/State.d.ts deleted file mode 100644 index b3a5af90e5..0000000000 --- a/cli/dist/state/State.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { args } from '../create/args.js'; -import type { options } from '../create/options.js'; -import type { z } from 'zod'; -export type Page = 'interactive' | 'creating' | 'complete'; -/** -* UI state for the app -*/ -export type State = { - /** - * Name of the project. Both the folder and the package name - */ - name: z.infer[0]; - /** - * Path to the project - */ - path: z.infer[0]; - /** - * The current displayed value of the name input - */ - nameInput: string; - walletConnectIdInput: string; - /** - * Currently selected step on the interactive prompt - */ - currentStep: number; - /** - * Currently selected page - */ - currentPage: Page; -} & z.infer; -//# sourceMappingURL=State.d.ts.map \ No newline at end of file diff --git a/cli/dist/state/State.d.ts.map b/cli/dist/state/State.d.ts.map deleted file mode 100644 index ef72690094..0000000000 --- a/cli/dist/state/State.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../src/state/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAE5B,MAAM,MAAM,IAAI,GAAG,aAAa,GAAG,UAAU,GAAG,UAAU,CAAA;AAE1D;;EAEE;AACF,MAAM,MAAM,KAAK,GAAG;IACpB;;MAEE;IACF,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;IAC7B;;MAEE;IACF,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;IAC7B;;MAEE;IACF,SAAS,EAAE,MAAM,CAAA;IAIjB,oBAAoB,EAAE,MAAM,CAAA;IAC5B;;MAEE;IACF,WAAW,EAAE,MAAM,CAAA;IACnB;;MAEE;IACF,WAAW,EAAE,IAAI,CAAA;CAChB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAA"} \ No newline at end of file diff --git a/cli/dist/state/State.js b/cli/dist/state/State.js deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/cli/dist/state/State.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/cli/dist/state/Store.d.ts b/cli/dist/state/Store.d.ts deleted file mode 100644 index 2fb8111454..0000000000 --- a/cli/dist/state/Store.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { State } from './State.js'; -import type { Dispatchers } from './dispatchers.js'; -/** - * Type of zustand store for create-evmts-app cli - */ -export type Store = State & Dispatchers; -/** - * Zustand React wrapper around the flux store - */ -export declare const useStore: (initialState: State) => Store; -//# sourceMappingURL=Store.d.ts.map \ No newline at end of file diff --git a/cli/dist/state/Store.d.ts.map b/cli/dist/state/Store.d.ts.map deleted file mode 100644 index 8504d3f0d4..0000000000 --- a/cli/dist/state/Store.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Store.d.ts","sourceRoot":"","sources":["../../src/state/Store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAKnD;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,KAAK,GAAG,WAAW,CAAA;AAmBvC;;GAEG;AACH,eAAO,MAAM,QAAQ,iBAAkB,KAAK,UAG3C,CAAA"} \ No newline at end of file diff --git a/cli/dist/state/Store.js b/cli/dist/state/Store.js deleted file mode 100644 index dc71cb14b9..0000000000 --- a/cli/dist/state/Store.js +++ /dev/null @@ -1,24 +0,0 @@ -import { reducers } from './reducers.js'; -import { useState } from 'react'; -import { create } from 'zustand'; -/** - * Creates a new zustand store from an initial state - */ -const createStore = (initialState) => { - return create((set) => { - const dispatchers = Object.fromEntries(Object.entries(reducers).map(([key, reducer]) => [ - key, - (payload) => { - set((state) => reducer(payload, state)); - }, - ])); - return { ...initialState, ...dispatchers }; - }); -}; -/** - * Zustand React wrapper around the flux store - */ -export const useStore = (initialState) => { - const [useZustandStore] = useState(() => createStore(initialState)); - return useZustandStore(); -}; diff --git a/cli/dist/state/dispatchers.d.ts b/cli/dist/state/dispatchers.d.ts deleted file mode 100644 index de8eeaf313..0000000000 --- a/cli/dist/state/dispatchers.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { Store } from './Store.js'; -import { type Reducers } from './reducers.js'; -/** - * Zustand set function - */ -type Set = (partial: Store | Partial | ((state: Store) => Store | Partial), replace?: boolean | undefined) => void; -/** - * Type of dispatches UI can make to the store - * Simply just a function that takes the reducer payload as it's only argument - */ -export type Dispatchers = { - [TName in keyof Reducers]: (payload: Parameters[0]) => void; -}; -/** - * Creates a new zustand store from an initial state - */ -export declare const createDispatchers: (set: Set) => Dispatchers; -export {}; -//# sourceMappingURL=dispatchers.d.ts.map \ No newline at end of file diff --git a/cli/dist/state/dispatchers.d.ts.map b/cli/dist/state/dispatchers.d.ts.map deleted file mode 100644 index 4d5b988a72..0000000000 --- a/cli/dist/state/dispatchers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dispatchers.d.ts","sourceRoot":"","sources":["../../src/state/dispatchers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,EAAE,KAAK,QAAQ,EAAY,MAAM,eAAe,CAAA;AAEvD;;GAEG;AACH,KAAK,GAAG,GAAG,CACV,OAAO,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAC5E,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,KACzB,IAAI,CAAA;AAET;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;KACxB,KAAK,IAAI,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI;CAC5E,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAAS,GAAG,KAQpC,WACL,CAAA"} \ No newline at end of file diff --git a/cli/dist/state/dispatchers.js b/cli/dist/state/dispatchers.js deleted file mode 100644 index c1021f448a..0000000000 --- a/cli/dist/state/dispatchers.js +++ /dev/null @@ -1,12 +0,0 @@ -import { reducers } from './reducers.js'; -/** - * Creates a new zustand store from an initial state - */ -export const createDispatchers = (set) => { - return Object.fromEntries(Object.entries(reducers).map(([key, reducer]) => [ - key, - (payload) => { - set((state) => reducer(payload, state)); - }, - ])); -}; diff --git a/cli/dist/state/index.d.ts b/cli/dist/state/index.d.ts deleted file mode 100644 index 1e989d5c2e..0000000000 --- a/cli/dist/state/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { useStore, type Store } from './Store.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/cli/dist/state/index.d.ts.map b/cli/dist/state/index.d.ts.map deleted file mode 100644 index 9d55b91e5c..0000000000 --- a/cli/dist/state/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/state/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,KAAK,EAAE,MAAM,YAAY,CAAA"} \ No newline at end of file diff --git a/cli/dist/state/index.js b/cli/dist/state/index.js deleted file mode 100644 index a4106db5c2..0000000000 --- a/cli/dist/state/index.js +++ /dev/null @@ -1 +0,0 @@ -export { useStore } from './Store.js'; diff --git a/cli/dist/state/reducers.d.ts b/cli/dist/state/reducers.d.ts deleted file mode 100644 index 16cfa3bea6..0000000000 --- a/cli/dist/state/reducers.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import type { State } from './State.js'; -/** - * State transition functions the UI can call - */ -export type Reducer = (payload: TPayload, state: State) => State; -/** - * Mapping of available state transition functions - */ -export type Reducers = typeof reducers; -/** - * Available state transition functions - */ -export declare const reducers: { - setInput: Reducer<{ - value: string; - input: "chainIdInput" | "nameInput" | "walletConnectIdInput"; - }>; - goToNextPage: Reducer; - selectAndContinue: (payload: { - name: TName; - value: State[TName]; - nextPage?: boolean; - }, state: State) => { - readonly path: State["path"]; - readonly name: string; - readonly nameInput: string; - readonly walletConnectIdInput: string; - readonly currentStep: number; - readonly currentPage: import("./State.js").Page; - readonly walletConnectProjectId: string; - readonly useCase: "simple" | "ui" | "server"; - readonly packageManager: "npm" | "pnpm" | "bun" | "yarn"; - readonly framework: "simple" | "server" | "bun" | "mud" | "pwa" | "next" | "remix"; - readonly skipPrompts: boolean; - readonly noGit: boolean; - readonly noInstall: boolean; - } | { - readonly packageManager: "pnpm"; - readonly linter: "eslint-prettier"; - readonly typescriptStrictness: "strict"; - readonly testFrameworks: "none"; - readonly solidityFramework: "foundry"; - readonly contractStrategy: "local"; - readonly name: import("zod").TypeOf[0]; - readonly path: import("zod").TypeOf[0]; - readonly nameInput: string; - readonly walletConnectIdInput: string; - readonly currentStep: number; - readonly currentPage: import("./State.js").Page; - readonly walletConnectProjectId: string; - readonly useCase: "simple" | "ui" | "server"; - readonly framework: "simple" | "server" | "bun" | "mud" | "pwa" | "next" | "remix"; - readonly skipPrompts: boolean; - readonly noGit: boolean; - readonly noInstall: boolean; - }; - goToPreviousStep: Reducer; -}; -//# sourceMappingURL=reducers.d.ts.map \ No newline at end of file diff --git a/cli/dist/state/reducers.d.ts.map b/cli/dist/state/reducers.d.ts.map deleted file mode 100644 index c6231ba01f..0000000000 --- a/cli/dist/state/reducers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"reducers.d.ts","sourceRoot":"","sources":["../../src/state/reducers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAGvC;;GAEG;AACH,MAAM,MAAM,OAAO,CAAC,QAAQ,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,KAAK,KAAK,CAAA;AAE1E;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAA;AA4FtC;;GAEG;AACH,eAAO,MAAM,QAAQ;;eAzFb,MAAM;eACN,cAAc,GAAG,WAAW,GAAG,sBAAsB;;;wBAQjC,KAAK,SAAS,MAAM,KAAK,WAC3C;QAAE,IAAI,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,SAC1D,KAAK;uBAoBa,KAAK,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+DtC,CAAA"} \ No newline at end of file diff --git a/cli/dist/state/reducers.js b/cli/dist/state/reducers.js deleted file mode 100644 index 4dab8f7e54..0000000000 --- a/cli/dist/state/reducers.js +++ /dev/null @@ -1,90 +0,0 @@ -import { basename } from 'path'; -/** - * Sets the name input when user types - */ -const setInput = (payload, state) => { - return { ...state, [payload.input]: payload.value }; -}; -/** - * Selects an option and continues to the next step - */ -const selectAndContinue = ((payload, state) => { - const newState = { - ...state, - [payload.name]: payload.value, - currentStep: payload.nextPage ? state.currentStep : state.currentStep + 1, - currentPage: payload.nextPage - ? goToNextPage({}, state).currentPage - : state.currentPage, - }; - const isName = payload.name === 'name'; - const isFrameworkBun = payload.name === 'framework' && payload.value.includes('bun'); - const isFrameworkMud = payload.name === 'framework' && payload.value.includes('mud'); - // if name step is set also set the path if name is a path instead of a name - if (isName) { - return { - ...newState, - path: payload.value, - name: basename(payload.value), - }; - } - else if (isFrameworkBun) { - return { - ...newState, - packageManager: 'bun', - }; - } - else if (isFrameworkMud) { - return { - ...newState, - packageManager: 'pnpm', - linter: 'eslint-prettier', - typescriptStrictness: 'strict', - testFrameworks: 'none', - solidityFramework: 'foundry', - contractStrategy: 'local', - }; - } - else { - return newState; - } -}); -const goToPreviousStep = (_, state) => { - if (state.currentStep === 0) { - return state; - } - return { - ...state, - currentStep: state.currentStep - 1, - }; -}; -/** - * Gos to the next page of the prompt - */ -const goToNextPage = (_, state) => { - if (state.currentPage === 'interactive') { - return { - ...state, - currentPage: 'creating', - }; - } - if (state.currentPage === 'creating') { - return { - ...state, - currentPage: 'complete', - }; - } - if (state.currentPage === 'complete') { - throw new Error('Cannot go to next page from complete'); - } - throw new Error(`Unknown page ${state.currentPage}`); -}; -/** - * Available state transition functions - */ -export const reducers = { - setInput, - goToNextPage, - selectAndContinue, - goToPreviousStep, -}; diff --git a/cli/dist/styles/colors.d.ts b/cli/dist/styles/colors.d.ts deleted file mode 100644 index 9eae126622..0000000000 --- a/cli/dist/styles/colors.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export declare const colorPallet: { - readonly black: "#000000"; - readonly green: "#77dd77"; - readonly blue: "#a6dcef"; - readonly red: "#ff6961"; - readonly yellow: "#fdd663"; - readonly purple: "#b19cd9"; - readonly orange: "#ffb347"; - readonly pink: "#ff9ff3"; - readonly gray: "#d3d3d3"; - readonly white: "#ffffff"; -}; -export declare const asyncStateColors: { - readonly loading: "#a6dcef"; - readonly error: "#ff6961"; - readonly success: "#77dd77"; -}; -//# sourceMappingURL=colors.d.ts.map \ No newline at end of file diff --git a/cli/dist/styles/colors.d.ts.map b/cli/dist/styles/colors.d.ts.map deleted file mode 100644 index 916fb3c14f..0000000000 --- a/cli/dist/styles/colors.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/styles/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;;;;;;;;;CAWd,CAAA;AACV,eAAO,MAAM,gBAAgB;;;;CAInB,CAAA"} \ No newline at end of file diff --git a/cli/dist/styles/colors.js b/cli/dist/styles/colors.js deleted file mode 100644 index c5fd54a65f..0000000000 --- a/cli/dist/styles/colors.js +++ /dev/null @@ -1,17 +0,0 @@ -export const colorPallet = { - black: '#000000', - green: '#77dd77', - blue: '#a6dcef', - red: '#ff6961', - yellow: '#fdd663', - purple: '#b19cd9', - orange: '#ffb347', - pink: '#ff9ff3', - gray: '#d3d3d3', - white: '#ffffff', -}; -export const asyncStateColors = { - loading: colorPallet.blue, - error: colorPallet.red, - success: colorPallet.green, -}; diff --git a/cli/dist/utils/execPromise.d.ts b/cli/dist/utils/execPromise.d.ts deleted file mode 100644 index 4d267cfd05..0000000000 --- a/cli/dist/utils/execPromise.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { exec } from 'child_process'; -export declare const execPromise: typeof exec.__promisify__; -//# sourceMappingURL=execPromise.d.ts.map \ No newline at end of file diff --git a/cli/dist/utils/execPromise.d.ts.map b/cli/dist/utils/execPromise.d.ts.map deleted file mode 100644 index 29084af2dc..0000000000 --- a/cli/dist/utils/execPromise.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"execPromise.d.ts","sourceRoot":"","sources":["../../src/utils/execPromise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAGpC,eAAO,MAAM,WAAW,2BAAkB,CAAA"} \ No newline at end of file diff --git a/cli/dist/utils/execPromise.js b/cli/dist/utils/execPromise.js deleted file mode 100644 index d01ae55fe6..0000000000 --- a/cli/dist/utils/execPromise.js +++ /dev/null @@ -1,3 +0,0 @@ -import { exec } from 'child_process'; -import { promisify } from 'util'; -export const execPromise = promisify(exec); diff --git a/cli/dist/utils/generateRandomName.d.ts b/cli/dist/utils/generateRandomName.d.ts deleted file mode 100644 index 6ac6473bd5..0000000000 --- a/cli/dist/utils/generateRandomName.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const generateRandomName: () => string; -//# sourceMappingURL=generateRandomName.d.ts.map \ No newline at end of file diff --git a/cli/dist/utils/generateRandomName.d.ts.map b/cli/dist/utils/generateRandomName.d.ts.map deleted file mode 100644 index 7a8e256115..0000000000 --- a/cli/dist/utils/generateRandomName.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"generateRandomName.d.ts","sourceRoot":"","sources":["../../src/utils/generateRandomName.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,kBAAkB,cAI9B,CAAA"} \ No newline at end of file diff --git a/cli/dist/utils/generateRandomName.js b/cli/dist/utils/generateRandomName.js deleted file mode 100644 index 61cfc924f3..0000000000 --- a/cli/dist/utils/generateRandomName.js +++ /dev/null @@ -1,6 +0,0 @@ -import { adjectives, animals, colors, uniqueNamesGenerator, } from 'unique-names-generator'; -export const generateRandomName = () => { - return uniqueNamesGenerator({ - dictionaries: [adjectives, colors, animals], - }); -}; diff --git a/cli/dist/utils/getTailLogs.d.ts b/cli/dist/utils/getTailLogs.d.ts deleted file mode 100644 index 2583d38560..0000000000 --- a/cli/dist/utils/getTailLogs.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const getTailLogs: (logString: string) => string; -//# sourceMappingURL=getTailLogs.d.ts.map \ No newline at end of file diff --git a/cli/dist/utils/getTailLogs.d.ts.map b/cli/dist/utils/getTailLogs.d.ts.map deleted file mode 100644 index 3cb2d1d7a8..0000000000 --- a/cli/dist/utils/getTailLogs.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getTailLogs.d.ts","sourceRoot":"","sources":["../../src/utils/getTailLogs.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,cAAe,MAAM,WAE5C,CAAA"} \ No newline at end of file diff --git a/cli/dist/utils/getTailLogs.js b/cli/dist/utils/getTailLogs.js deleted file mode 100644 index f00eaf7e87..0000000000 --- a/cli/dist/utils/getTailLogs.js +++ /dev/null @@ -1,3 +0,0 @@ -export const getTailLogs = (logString) => { - return logString.split('\n').slice(-15).join('\n'); -}; diff --git a/cli/dist/utils/getUserPkgManager.d.ts b/cli/dist/utils/getUserPkgManager.d.ts deleted file mode 100644 index a6fd36e431..0000000000 --- a/cli/dist/utils/getUserPkgManager.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type PackageManager = 'npm' | 'pnpm' | 'yarn' | 'bun'; -export declare const getUserPkgManager: () => PackageManager; -//# sourceMappingURL=getUserPkgManager.d.ts.map \ No newline at end of file diff --git a/cli/dist/utils/getUserPkgManager.d.ts.map b/cli/dist/utils/getUserPkgManager.d.ts.map deleted file mode 100644 index a8e85a4032..0000000000 --- a/cli/dist/utils/getUserPkgManager.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getUserPkgManager.d.ts","sourceRoot":"","sources":["../../src/utils/getUserPkgManager.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAA;AAG5D,eAAO,MAAM,iBAAiB,EAAE,MAAM,cAkBrC,CAAA"} \ No newline at end of file diff --git a/cli/dist/utils/getUserPkgManager.js b/cli/dist/utils/getUserPkgManager.js deleted file mode 100644 index bce6a05432..0000000000 --- a/cli/dist/utils/getUserPkgManager.js +++ /dev/null @@ -1,23 +0,0 @@ -// Originally from https://github.com/t3-oss/create-t3-app/blob/main/cli/src/utils/getUserPkgManager.ts -export const getUserPkgManager = () => { - // This environment variable is set by npm and yarn but pnpm seems less consistent - const userAgent = process.env['npm_config_user_agent']; - if (userAgent) { - if (userAgent.startsWith('yarn')) { - return 'yarn'; - } - else if (userAgent.startsWith('pnpm')) { - return 'pnpm'; - } - else if (userAgent.startsWith('bun')) { - return 'bun'; - } - else { - return 'npm'; - } - } - else { - // If no user agent is set, assume npm - return 'npm'; - } -}; diff --git a/cli/dist/utils/state.d.ts b/cli/dist/utils/state.d.ts deleted file mode 100644 index 6b01d7f7fd..0000000000 --- a/cli/dist/utils/state.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=state.d.ts.map \ No newline at end of file diff --git a/cli/dist/utils/state.d.ts.map b/cli/dist/utils/state.d.ts.map deleted file mode 100644 index 92f797c113..0000000000 --- a/cli/dist/utils/state.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/utils/state.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/cli/dist/utils/state.js b/cli/dist/utils/state.js deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/cli/dist/utils/state.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/cli/dist/utils/wait.d.ts b/cli/dist/utils/wait.d.ts deleted file mode 100644 index 8fe567248b..0000000000 --- a/cli/dist/utils/wait.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const wait: (ms?: number) => Promise; -//# sourceMappingURL=wait.d.ts.map \ No newline at end of file diff --git a/cli/dist/utils/wait.d.ts.map b/cli/dist/utils/wait.d.ts.map deleted file mode 100644 index 7f43215d3c..0000000000 --- a/cli/dist/utils/wait.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"wait.d.ts","sourceRoot":"","sources":["../../src/utils/wait.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,mCACiC,CAAA"} \ No newline at end of file diff --git a/cli/dist/utils/wait.js b/cli/dist/utils/wait.js deleted file mode 100644 index 6b71d6b611..0000000000 --- a/cli/dist/utils/wait.js +++ /dev/null @@ -1 +0,0 @@ -export const wait = (ms = 0) => new Promise((resolve) => setTimeout(resolve, ms)); diff --git a/cli/package.json b/cli/package.json index 649d0c7d7f..4b27903f4f 100644 --- a/cli/package.json +++ b/cli/package.json @@ -14,13 +14,23 @@ "types": "./dist/index.d.cts", "default": "./dist/index.cjs" } + }, + "./tevm-cli": { + "import": { + "types": "./dist/tevm-cli.d.ts", + "default": "./dist/tevm-cli.js" + }, + "require": { + "types": "./dist/tevm-cli.d.cts", + "default": "./dist/tevm-cli.cjs" + } } }, "main": "dist/index.cjs", "module": "dist/index.js", "types": "dist/index.d.ts", "bin": { - "create-tevm-app": "dist/create-tevm-app.js" + "tevm-cli": "dist/tevm-cli.js" }, "files": [ "dist", @@ -38,7 +48,7 @@ "lint:check": "rome check . --verbose", "lint:deps": "bunx depcheck", "lint:package": "bunx publint --strict && attw --pack", - "start": "node dist/create-tevm-app.js", + "start": "node dist/tevm-cli.js", "test": "vitest --coverage", "test:coverage": "vitest run --coverage", "test:run": "vitest run", diff --git a/cli/src/create-tevm-app.tsx b/cli/src/tevm-cli.tsx similarity index 100% rename from cli/src/create-tevm-app.tsx rename to cli/src/tevm-cli.tsx diff --git a/cli/tsup.config.ts b/cli/tsup.config.ts index f1155899de..ab13067ac3 100644 --- a/cli/tsup.config.ts +++ b/cli/tsup.config.ts @@ -1,11 +1,11 @@ import { createTsUpOptions } from '@tevm/tsupconfig' import { defineConfig } from 'tsup' const base = createTsUpOptions({ - entry: ['src/index.ts', 'src/create-tevm-app.tsx'], - target: 'node', +entry: ['src/index.ts', 'src/tevm-cli.tsx'], +target: 'node', }) export default defineConfig({ - ...base, - bundle: false, +...base, +bundle: false, }) diff --git a/configs/tsupconfig/docs/README.md b/configs/tsupconfig/docs/README.md index 3590e153c9..7f6afd0e16 100644 --- a/configs/tsupconfig/docs/README.md +++ b/configs/tsupconfig/docs/README.md @@ -4,4 +4,4 @@ # `@tevm/tsupconfig` -[Shared factory function](./createTsupOptions.js) for creating tsup options for tevm packages +[Shared factory function]() for creating tsup options for tevm packages diff --git a/configs/tsupconfig/docs/functions/createTsUpOptions.md b/configs/tsupconfig/docs/functions/createTsUpOptions.md index 830a6a71e2..a6ec8c9b9c 100644 --- a/configs/tsupconfig/docs/functions/createTsUpOptions.md +++ b/configs/tsupconfig/docs/functions/createTsUpOptions.md @@ -8,8 +8,6 @@ > **createTsUpOptions**(`options`): `Options` -Creates tsup options from params - ## Parameters • **options** diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d7c6d92a13..95cbe98e55 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2408,6 +2408,9 @@ importers: '@tevm/bun-plugin': specifier: workspace:^ version: link:../bundler-packages/bun + '@tevm/cli': + specifier: workspace:^ + version: link:../cli '@tevm/client-types': specifier: workspace:^ version: link:../packages/client-types diff --git a/tevm/bin/tevm.cjs b/tevm/bin/tevm.cjs new file mode 100644 index 0000000000..c1eb6f44d8 --- /dev/null +++ b/tevm/bin/tevm.cjs @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('@tevm/cli/tevm-cli'); diff --git a/tevm/bin/tevm.js b/tevm/bin/tevm.js new file mode 100755 index 0000000000..bf4d99c4f4 --- /dev/null +++ b/tevm/bin/tevm.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +import '@tevm/cli/tevm-cli'; diff --git a/tevm/package.json b/tevm/package.json index 7a25a93170..c8f3adec79 100644 --- a/tevm/package.json +++ b/tevm/package.json @@ -368,8 +368,12 @@ "main": "index.cjs", "module": "index.js", "types": "index.d.ts", + "bin": { + "tevm": "./bin/tevm.js" + }, "files": [ "index*", + "bin", "actions", "address", "node", @@ -425,6 +429,7 @@ "@tevm/block": "workspace:^", "@tevm/blockchain": "workspace:^", "@tevm/bun-plugin": "workspace:^", + "@tevm/cli": "workspace:^", "@tevm/client-types": "workspace:^", "@tevm/common": "workspace:^", "@tevm/compiler": "workspace:^",