From 2baad0715268ddb21fff4f0c5b66774c10d5fe3e Mon Sep 17 00:00:00 2001 From: breadchris Date: Tue, 2 May 2023 11:56:43 -0700 Subject: [PATCH] rename editor to studio --- README.md | 14 ++++++++++++++ pkg/api/http.go | 2 +- pkg/cli/cli.go | 4 ++-- {editor => studio}/.gitignore | 0 {editor => studio}/esbuild.mjs | 0 {editor => studio}/package.json | 4 ++-- {editor => studio}/pnpm-lock.yaml | 0 {editor => studio}/public/build/index.js | 0 {editor => studio}/public/build/index.js.map | 0 {editor => studio}/public/build/styles/globals.js | 0 .../public/build/styles/globals.js.map | 0 {editor => studio}/public/favicon.ico | Bin {editor => studio}/public/index.html | 0 {editor => studio}/public/static.go | 0 {editor => studio}/rpc/block_pb.ts | 0 {editor => studio}/rpc/generate_connect.ts | 0 {editor => studio}/rpc/generate_pb.ts | 0 {editor => studio}/rpc/graph_pb.ts | 0 {editor => studio}/rpc/project_connect.ts | 0 {editor => studio}/rpc/project_pb.ts | 0 {editor => studio}/rpc/resource_pb.ts | 0 {editor => studio}/src/App.tsx | 0 {editor => studio}/src/components/ActionBar.tsx | 0 {editor => studio}/src/components/ActionPanel.tsx | 0 {editor => studio}/src/components/BlocksList.tsx | 0 .../src/components/EditorActions.tsx | 0 {editor => studio}/src/components/EditorPanel.tsx | 0 {editor => studio}/src/components/RunPanel.tsx | 0 {editor => studio}/src/components/Toolbar.tsx | 0 .../src/components/blockEditors/BucketEditor.tsx | 0 .../components/blockEditors/CollectionEditor.tsx | 0 .../components/blockEditors/FunctionEditor.tsx | 0 .../src/components/blockEditors/InputEditor.tsx | 0 .../src/components/blockEditors/QueryEditor.tsx | 0 .../src/components/blockEditors/RESTEditor.tsx | 0 .../src/components/blocks/BlockCard.tsx | 0 .../src/components/blocks/BucketBlock.tsx | 0 .../src/components/blocks/CollectionBlock.tsx | 0 .../src/components/blocks/FunctionBlock.tsx | 0 .../src/components/blocks/InputBlock.tsx | 0 .../src/components/blocks/QueryBlock.tsx | 0 .../src/components/blocks/QueueBlock.tsx | 0 .../src/components/blocks/RESTBlock.tsx | 0 {editor => studio}/src/hooks/useBlockTypes.ts | 0 {editor => studio}/src/hooks/useDefaultProject.ts | 0 {editor => studio}/src/hooks/useSelectedNodes.ts | 0 {editor => studio}/src/index.tsx | 0 {editor => studio}/src/lib/api.ts | 0 {editor => studio}/src/lib/checkIsApple.ts | 0 {editor => studio}/src/lib/configTypes.ts | 0 {editor => studio}/src/lib/project.tsx | 0 {editor => studio}/src/pages/index.tsx | 0 .../src/providers/EditorProvider.tsx | 0 .../src/providers/ProjectProvider.tsx | 0 {editor => studio}/src/routes.tsx | 0 {editor => studio}/src/styles/globals.css | 0 {editor => studio}/tsconfig.json | 0 57 files changed, 19 insertions(+), 5 deletions(-) rename {editor => studio}/.gitignore (100%) rename {editor => studio}/esbuild.mjs (100%) rename {editor => studio}/package.json (96%) rename {editor => studio}/pnpm-lock.yaml (100%) rename {editor => studio}/public/build/index.js (100%) rename {editor => studio}/public/build/index.js.map (100%) rename {editor => studio}/public/build/styles/globals.js (100%) rename {editor => studio}/public/build/styles/globals.js.map (100%) rename {editor => studio}/public/favicon.ico (100%) rename {editor => studio}/public/index.html (100%) rename {editor => studio}/public/static.go (100%) rename {editor => studio}/rpc/block_pb.ts (100%) rename {editor => studio}/rpc/generate_connect.ts (100%) rename {editor => studio}/rpc/generate_pb.ts (100%) rename {editor => studio}/rpc/graph_pb.ts (100%) rename {editor => studio}/rpc/project_connect.ts (100%) rename {editor => studio}/rpc/project_pb.ts (100%) rename {editor => studio}/rpc/resource_pb.ts (100%) rename {editor => studio}/src/App.tsx (100%) rename {editor => studio}/src/components/ActionBar.tsx (100%) rename {editor => studio}/src/components/ActionPanel.tsx (100%) rename {editor => studio}/src/components/BlocksList.tsx (100%) rename {editor => studio}/src/components/EditorActions.tsx (100%) rename {editor => studio}/src/components/EditorPanel.tsx (100%) rename {editor => studio}/src/components/RunPanel.tsx (100%) rename {editor => studio}/src/components/Toolbar.tsx (100%) rename {editor => studio}/src/components/blockEditors/BucketEditor.tsx (100%) rename {editor => studio}/src/components/blockEditors/CollectionEditor.tsx (100%) rename {editor => studio}/src/components/blockEditors/FunctionEditor.tsx (100%) rename {editor => studio}/src/components/blockEditors/InputEditor.tsx (100%) rename {editor => studio}/src/components/blockEditors/QueryEditor.tsx (100%) rename {editor => studio}/src/components/blockEditors/RESTEditor.tsx (100%) rename {editor => studio}/src/components/blocks/BlockCard.tsx (100%) rename {editor => studio}/src/components/blocks/BucketBlock.tsx (100%) rename {editor => studio}/src/components/blocks/CollectionBlock.tsx (100%) rename {editor => studio}/src/components/blocks/FunctionBlock.tsx (100%) rename {editor => studio}/src/components/blocks/InputBlock.tsx (100%) rename {editor => studio}/src/components/blocks/QueryBlock.tsx (100%) rename {editor => studio}/src/components/blocks/QueueBlock.tsx (100%) rename {editor => studio}/src/components/blocks/RESTBlock.tsx (100%) rename {editor => studio}/src/hooks/useBlockTypes.ts (100%) rename {editor => studio}/src/hooks/useDefaultProject.ts (100%) rename {editor => studio}/src/hooks/useSelectedNodes.ts (100%) rename {editor => studio}/src/index.tsx (100%) rename {editor => studio}/src/lib/api.ts (100%) rename {editor => studio}/src/lib/checkIsApple.ts (100%) rename {editor => studio}/src/lib/configTypes.ts (100%) rename {editor => studio}/src/lib/project.tsx (100%) rename {editor => studio}/src/pages/index.tsx (100%) rename {editor => studio}/src/providers/EditorProvider.tsx (100%) rename {editor => studio}/src/providers/ProjectProvider.tsx (100%) rename {editor => studio}/src/routes.tsx (100%) rename {editor => studio}/src/styles/globals.css (100%) rename {editor => studio}/tsconfig.json (100%) diff --git a/README.md b/README.md index 9814e8d..66f8c24 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,25 @@ or go install github.com/protoflow-labs/protoflow@latest ``` +## Run +Visually build your microservice with Protoflow Studio: +```shell +protoflow studio +``` + ## Demo [![youtube demo screenshot](http://img.youtube.com/vi/ZnUyUbh-Xp8/0.jpg)](https://www.youtube.com/watch?v=ZnUyUbh-Xp8) ## Hack ```shell +go run main.go studio +``` + +### Studio +```shell +cd studio +pnpm install +npm run dev ``` ### Haphazard notes diff --git a/pkg/api/http.go b/pkg/api/http.go index 05437dd..c5f8ae6 100644 --- a/pkg/api/http.go +++ b/pkg/api/http.go @@ -4,7 +4,7 @@ import ( "context" "fmt" "github.com/bufbuild/connect-go" - "github.com/protoflow-labs/protoflow/editor/public" + "github.com/protoflow-labs/protoflow/studio/public" "github.com/rs/zerolog/log" "net/http" "os" diff --git a/pkg/cli/cli.go b/pkg/cli/cli.go index 6d69be9..0ba120e 100644 --- a/pkg/cli/cli.go +++ b/pkg/cli/cli.go @@ -49,11 +49,11 @@ func New( }, }, { - Name: "serve", + Name: "studio", Flags: []cli.Flag{ &cli.IntFlag{ Name: "http", - Usage: "Port for the http server", + Usage: "Port for the studio", }, }, Action: func(ctx *cli.Context) error { diff --git a/editor/.gitignore b/studio/.gitignore similarity index 100% rename from editor/.gitignore rename to studio/.gitignore diff --git a/editor/esbuild.mjs b/studio/esbuild.mjs similarity index 100% rename from editor/esbuild.mjs rename to studio/esbuild.mjs diff --git a/editor/package.json b/studio/package.json similarity index 96% rename from editor/package.json rename to studio/package.json index 29579f2..a887d73 100644 --- a/editor/package.json +++ b/studio/package.json @@ -1,6 +1,6 @@ { - "name": "editor", - "version": "0.1.0", + "name": "studio", + "version": "0.0.1", "private": true, "type": "module", "scripts": { diff --git a/editor/pnpm-lock.yaml b/studio/pnpm-lock.yaml similarity index 100% rename from editor/pnpm-lock.yaml rename to studio/pnpm-lock.yaml diff --git a/editor/public/build/index.js b/studio/public/build/index.js similarity index 100% rename from editor/public/build/index.js rename to studio/public/build/index.js diff --git a/editor/public/build/index.js.map b/studio/public/build/index.js.map similarity index 100% rename from editor/public/build/index.js.map rename to studio/public/build/index.js.map diff --git a/editor/public/build/styles/globals.js b/studio/public/build/styles/globals.js similarity index 100% rename from editor/public/build/styles/globals.js rename to studio/public/build/styles/globals.js diff --git a/editor/public/build/styles/globals.js.map b/studio/public/build/styles/globals.js.map similarity index 100% rename from editor/public/build/styles/globals.js.map rename to studio/public/build/styles/globals.js.map diff --git a/editor/public/favicon.ico b/studio/public/favicon.ico similarity index 100% rename from editor/public/favicon.ico rename to studio/public/favicon.ico diff --git a/editor/public/index.html b/studio/public/index.html similarity index 100% rename from editor/public/index.html rename to studio/public/index.html diff --git a/editor/public/static.go b/studio/public/static.go similarity index 100% rename from editor/public/static.go rename to studio/public/static.go diff --git a/editor/rpc/block_pb.ts b/studio/rpc/block_pb.ts similarity index 100% rename from editor/rpc/block_pb.ts rename to studio/rpc/block_pb.ts diff --git a/editor/rpc/generate_connect.ts b/studio/rpc/generate_connect.ts similarity index 100% rename from editor/rpc/generate_connect.ts rename to studio/rpc/generate_connect.ts diff --git a/editor/rpc/generate_pb.ts b/studio/rpc/generate_pb.ts similarity index 100% rename from editor/rpc/generate_pb.ts rename to studio/rpc/generate_pb.ts diff --git a/editor/rpc/graph_pb.ts b/studio/rpc/graph_pb.ts similarity index 100% rename from editor/rpc/graph_pb.ts rename to studio/rpc/graph_pb.ts diff --git a/editor/rpc/project_connect.ts b/studio/rpc/project_connect.ts similarity index 100% rename from editor/rpc/project_connect.ts rename to studio/rpc/project_connect.ts diff --git a/editor/rpc/project_pb.ts b/studio/rpc/project_pb.ts similarity index 100% rename from editor/rpc/project_pb.ts rename to studio/rpc/project_pb.ts diff --git a/editor/rpc/resource_pb.ts b/studio/rpc/resource_pb.ts similarity index 100% rename from editor/rpc/resource_pb.ts rename to studio/rpc/resource_pb.ts diff --git a/editor/src/App.tsx b/studio/src/App.tsx similarity index 100% rename from editor/src/App.tsx rename to studio/src/App.tsx diff --git a/editor/src/components/ActionBar.tsx b/studio/src/components/ActionBar.tsx similarity index 100% rename from editor/src/components/ActionBar.tsx rename to studio/src/components/ActionBar.tsx diff --git a/editor/src/components/ActionPanel.tsx b/studio/src/components/ActionPanel.tsx similarity index 100% rename from editor/src/components/ActionPanel.tsx rename to studio/src/components/ActionPanel.tsx diff --git a/editor/src/components/BlocksList.tsx b/studio/src/components/BlocksList.tsx similarity index 100% rename from editor/src/components/BlocksList.tsx rename to studio/src/components/BlocksList.tsx diff --git a/editor/src/components/EditorActions.tsx b/studio/src/components/EditorActions.tsx similarity index 100% rename from editor/src/components/EditorActions.tsx rename to studio/src/components/EditorActions.tsx diff --git a/editor/src/components/EditorPanel.tsx b/studio/src/components/EditorPanel.tsx similarity index 100% rename from editor/src/components/EditorPanel.tsx rename to studio/src/components/EditorPanel.tsx diff --git a/editor/src/components/RunPanel.tsx b/studio/src/components/RunPanel.tsx similarity index 100% rename from editor/src/components/RunPanel.tsx rename to studio/src/components/RunPanel.tsx diff --git a/editor/src/components/Toolbar.tsx b/studio/src/components/Toolbar.tsx similarity index 100% rename from editor/src/components/Toolbar.tsx rename to studio/src/components/Toolbar.tsx diff --git a/editor/src/components/blockEditors/BucketEditor.tsx b/studio/src/components/blockEditors/BucketEditor.tsx similarity index 100% rename from editor/src/components/blockEditors/BucketEditor.tsx rename to studio/src/components/blockEditors/BucketEditor.tsx diff --git a/editor/src/components/blockEditors/CollectionEditor.tsx b/studio/src/components/blockEditors/CollectionEditor.tsx similarity index 100% rename from editor/src/components/blockEditors/CollectionEditor.tsx rename to studio/src/components/blockEditors/CollectionEditor.tsx diff --git a/editor/src/components/blockEditors/FunctionEditor.tsx b/studio/src/components/blockEditors/FunctionEditor.tsx similarity index 100% rename from editor/src/components/blockEditors/FunctionEditor.tsx rename to studio/src/components/blockEditors/FunctionEditor.tsx diff --git a/editor/src/components/blockEditors/InputEditor.tsx b/studio/src/components/blockEditors/InputEditor.tsx similarity index 100% rename from editor/src/components/blockEditors/InputEditor.tsx rename to studio/src/components/blockEditors/InputEditor.tsx diff --git a/editor/src/components/blockEditors/QueryEditor.tsx b/studio/src/components/blockEditors/QueryEditor.tsx similarity index 100% rename from editor/src/components/blockEditors/QueryEditor.tsx rename to studio/src/components/blockEditors/QueryEditor.tsx diff --git a/editor/src/components/blockEditors/RESTEditor.tsx b/studio/src/components/blockEditors/RESTEditor.tsx similarity index 100% rename from editor/src/components/blockEditors/RESTEditor.tsx rename to studio/src/components/blockEditors/RESTEditor.tsx diff --git a/editor/src/components/blocks/BlockCard.tsx b/studio/src/components/blocks/BlockCard.tsx similarity index 100% rename from editor/src/components/blocks/BlockCard.tsx rename to studio/src/components/blocks/BlockCard.tsx diff --git a/editor/src/components/blocks/BucketBlock.tsx b/studio/src/components/blocks/BucketBlock.tsx similarity index 100% rename from editor/src/components/blocks/BucketBlock.tsx rename to studio/src/components/blocks/BucketBlock.tsx diff --git a/editor/src/components/blocks/CollectionBlock.tsx b/studio/src/components/blocks/CollectionBlock.tsx similarity index 100% rename from editor/src/components/blocks/CollectionBlock.tsx rename to studio/src/components/blocks/CollectionBlock.tsx diff --git a/editor/src/components/blocks/FunctionBlock.tsx b/studio/src/components/blocks/FunctionBlock.tsx similarity index 100% rename from editor/src/components/blocks/FunctionBlock.tsx rename to studio/src/components/blocks/FunctionBlock.tsx diff --git a/editor/src/components/blocks/InputBlock.tsx b/studio/src/components/blocks/InputBlock.tsx similarity index 100% rename from editor/src/components/blocks/InputBlock.tsx rename to studio/src/components/blocks/InputBlock.tsx diff --git a/editor/src/components/blocks/QueryBlock.tsx b/studio/src/components/blocks/QueryBlock.tsx similarity index 100% rename from editor/src/components/blocks/QueryBlock.tsx rename to studio/src/components/blocks/QueryBlock.tsx diff --git a/editor/src/components/blocks/QueueBlock.tsx b/studio/src/components/blocks/QueueBlock.tsx similarity index 100% rename from editor/src/components/blocks/QueueBlock.tsx rename to studio/src/components/blocks/QueueBlock.tsx diff --git a/editor/src/components/blocks/RESTBlock.tsx b/studio/src/components/blocks/RESTBlock.tsx similarity index 100% rename from editor/src/components/blocks/RESTBlock.tsx rename to studio/src/components/blocks/RESTBlock.tsx diff --git a/editor/src/hooks/useBlockTypes.ts b/studio/src/hooks/useBlockTypes.ts similarity index 100% rename from editor/src/hooks/useBlockTypes.ts rename to studio/src/hooks/useBlockTypes.ts diff --git a/editor/src/hooks/useDefaultProject.ts b/studio/src/hooks/useDefaultProject.ts similarity index 100% rename from editor/src/hooks/useDefaultProject.ts rename to studio/src/hooks/useDefaultProject.ts diff --git a/editor/src/hooks/useSelectedNodes.ts b/studio/src/hooks/useSelectedNodes.ts similarity index 100% rename from editor/src/hooks/useSelectedNodes.ts rename to studio/src/hooks/useSelectedNodes.ts diff --git a/editor/src/index.tsx b/studio/src/index.tsx similarity index 100% rename from editor/src/index.tsx rename to studio/src/index.tsx diff --git a/editor/src/lib/api.ts b/studio/src/lib/api.ts similarity index 100% rename from editor/src/lib/api.ts rename to studio/src/lib/api.ts diff --git a/editor/src/lib/checkIsApple.ts b/studio/src/lib/checkIsApple.ts similarity index 100% rename from editor/src/lib/checkIsApple.ts rename to studio/src/lib/checkIsApple.ts diff --git a/editor/src/lib/configTypes.ts b/studio/src/lib/configTypes.ts similarity index 100% rename from editor/src/lib/configTypes.ts rename to studio/src/lib/configTypes.ts diff --git a/editor/src/lib/project.tsx b/studio/src/lib/project.tsx similarity index 100% rename from editor/src/lib/project.tsx rename to studio/src/lib/project.tsx diff --git a/editor/src/pages/index.tsx b/studio/src/pages/index.tsx similarity index 100% rename from editor/src/pages/index.tsx rename to studio/src/pages/index.tsx diff --git a/editor/src/providers/EditorProvider.tsx b/studio/src/providers/EditorProvider.tsx similarity index 100% rename from editor/src/providers/EditorProvider.tsx rename to studio/src/providers/EditorProvider.tsx diff --git a/editor/src/providers/ProjectProvider.tsx b/studio/src/providers/ProjectProvider.tsx similarity index 100% rename from editor/src/providers/ProjectProvider.tsx rename to studio/src/providers/ProjectProvider.tsx diff --git a/editor/src/routes.tsx b/studio/src/routes.tsx similarity index 100% rename from editor/src/routes.tsx rename to studio/src/routes.tsx diff --git a/editor/src/styles/globals.css b/studio/src/styles/globals.css similarity index 100% rename from editor/src/styles/globals.css rename to studio/src/styles/globals.css diff --git a/editor/tsconfig.json b/studio/tsconfig.json similarity index 100% rename from editor/tsconfig.json rename to studio/tsconfig.json