Skip to content

Commit

Permalink
Hatch experimentation (#350)
Browse files Browse the repository at this point in the history
* Remove creation cli

* Remove cli from monorepo

* Remove cli creation flow from github workflows

* Hack in support for create-honc-app hatch flow (needs testing)

* Move existing codegen into v0 api (preparing to add new code)

* Add placeholder ui and placeholder logic for v1 api

* Add autoselected radio element

* Start adding v1 codegen and fix some type errors

* Add code gen utilities for v1 and code gen playground

* Udpate playground

* Update codegen readme

* Reintroduce cloudflare bindings task

* Add a route to name proposed projects

* Use server-side events (scaffolding) in code gen page

* Fix issues with SSE in honc-code-gen

* Try adding SEE with a DurableObject... fail

* Use modified version of sse streaming to MAKE IT WORK

* Put v1 behind a feature flag kinda

* Remove create cli deps from api package.json

* Update pnpm lock

* Fix hatch args

* Format

* Update package.json versions

* Update honc-code-gen README

* Fix lint error

* Revert p.json bump on client-library-otel

* Add a typecheck command for fp-services

* Cannot use workspace version of fiberplane hono-otel for our deployed services duh
  • Loading branch information
brettimus authored Nov 1, 2024
1 parent 21ea5ec commit 3210009
Show file tree
Hide file tree
Showing 86 changed files with 7,191 additions and 2,217 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/build_frontends.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ on:
pull_request:
branches: ["*"]
paths:
- "cli/**"
- "api/**"
- "packages/client-library-otel/**"
- "studio/**"
push:
branches: ["main", "release-*"]
paths:
- "cli/**"
- "api/**"
- "packages/client-library-otel/**"
- "studio/**"
Expand Down Expand Up @@ -80,12 +78,11 @@ jobs:

# Building

- name: Build api, frontend, cli, and client library
- name: Build api, frontend and client library
run: |
pnpm \
--filter=@fiberplane/studio-frontend \
--filter=@fiberplane/studio \
--filter=@fiberplane/studio-cli \
--filter=@fiberplane/hono-otel \
build
Expand All @@ -94,8 +91,5 @@ jobs:
- name: Copy the frontend files into the api
run: cp -r ./studio/dist/* ./api/dist

- name: Copy the cli files into the api
run: cp -r ./cli/dist ./api/dist/cli

- name: Publish a temporary preview version
run: pnpx pkg-pr-new publish --pnpm "./api" "./packages/client-library-otel"
10 changes: 9 additions & 1 deletion api/bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const script = (args[0] ?? "").trim();
const scriptsToRun = !script ? ["migrate", "studio"] : [script];

const validScripts = {
create: "dist/cli/index.js",
create: "npm create honc-app@latest -- --hatch",
migrate: "dist/migrate.js",
studio: "dist/src/index.node.js",
};
Expand Down Expand Up @@ -353,6 +353,14 @@ function runScript(scriptName) {
process.exit(1);
}

if (scriptName === "create") {
execSync(scriptPath, {
stdio: "inherit",
env: { ...USER_VARS, ...process.env },
});
return;
}

// Get the root directory of this script's project
const scriptDir = path.resolve(__dirname, "../");

Expand Down
9 changes: 1 addition & 8 deletions api/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.10.0",
"version": "0.10.1",
"name": "@fiberplane/studio",
"description": "Local development debugging interface for Hono apps",
"author": "Fiberplane<[email protected]>",
Expand Down Expand Up @@ -43,15 +43,12 @@
"@ai-sdk/mistral": "^0.0.42",
"@ai-sdk/openai": "^0.0.66",
"@anthropic-ai/sdk": "^0.24.3",
"@clack/core": "^0.3.4",
"@clack/prompts": "^0.7.0",
"@fiberplane/fpx-types": "workspace:*",
"@hono/node-server": "^1.11.1",
"@hono/zod-validator": "^0.2.2",
"@iarna/toml": "^2.2.5",
"@langchain/core": "^0.2.15",
"@libsql/client": "^0.6.2",
"@neondatabase/api-client": "^1.10.3",
"acorn": "^8.11.3",
"acorn-walk": "^8.3.2",
"ai": "^3.4.10",
Expand All @@ -61,14 +58,10 @@
"drizzle-orm": "^0.33.0",
"drizzle-zod": "^0.5.1",
"figlet": "^1.7.0",
"giget": "^1.2.3",
"hono": "^4.6.2",
"minimatch": "^10.0.1",
"ollama-ai-provider": "^0.15.2",
"open": "^10.1.0",
"openai": "^4.47.1",
"oslo": "^1.2.1",
"picocolors": "^1.0.1",
"source-map": "^0.7.4",
"typescript": "^5.5.4",
"typescript-language-server": "^4.3.3",
Expand Down
5 changes: 4 additions & 1 deletion biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"include": [
"packages/client-library-otel",
"api",
"cli",
"honc-code-gen",
"fp-services"
],
Expand All @@ -96,6 +95,10 @@
// API related
"meta/*.json",

// Honc code gen playground outputs
"honc-code-gen/outputs/**/*",
"honc-code-gen/storage/**/*",

// Client library and website related
"dist",
"www/",
Expand Down
33 changes: 0 additions & 33 deletions cli/.gitignore

This file was deleted.

23 changes: 0 additions & 23 deletions cli/LICENSE

This file was deleted.

91 changes: 0 additions & 91 deletions cli/README.md

This file was deleted.

42 changes: 0 additions & 42 deletions cli/package.json

This file was deleted.

62 changes: 0 additions & 62 deletions cli/src/actions/code-gen.ts

This file was deleted.

15 changes: 0 additions & 15 deletions cli/src/actions/database/d1.ts

This file was deleted.

Loading

0 comments on commit 3210009

Please sign in to comment.