Compare commits

...

3 Commits

Author SHA1 Message Date
Shantur Rathore
2530cd4fc8 Bump to v0.8.0 2026-01-22 18:17:23 +00:00
Shantur Rathore
b25fb0073e fix(cloudflare): serve version.json as static asset
Avoid Workers billing for /version.json by removing worker-first routing and generating static _headers rules during manifest build.
2026-01-22 18:05:01 +00:00
Shantur Rathore
c01846f7fd ci: run release-ui in release pipeline 2026-01-22 17:29:49 +00:00
12 changed files with 37 additions and 39 deletions

View File

@@ -1,7 +1,7 @@
name: Release UI
on:
push:
branches:
- main
workflow_call: {}
workflow_dispatch: {}
permissions:
@@ -12,7 +12,8 @@ env:
jobs:
release-ui:
if: ${{ github.ref == 'refs/heads/main' }}
# Automated via reusable call (main releases); manual runs allowed on dev.
if: ${{ github.event_name == 'workflow_call' || github.ref == 'refs/heads/dev' }}
runs-on: ubuntu-24.04
steps:
- name: Checkout
@@ -27,6 +28,9 @@ jobs:
- name: Install dependencies
run: npm ci --workspaces --include=optional
- name: Ensure rollup native binary
run: npm install @rollup/rollup-linux-x64-gnu --no-save
- name: Install Cloudflare worker deps
run: npm ci
working-directory: packages/cloudflare

View File

@@ -69,6 +69,13 @@ jobs:
release_name: ${{ needs.prepare-release.outputs.release_name }}
secrets: inherit
release-ui:
needs: prepare-release
permissions:
contents: read
uses: ./.github/workflows/release-ui.yml
secrets: inherit
publish-server:
needs:
- prepare-release

12
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "codenomad-workspace",
"version": "0.7.6",
"version": "0.8.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "codenomad-workspace",
"version": "0.7.6",
"version": "0.8.0",
"dependencies": {
"7zip-bin": "^5.2.0",
"google-auth-library": "^10.5.0"
@@ -7384,7 +7384,7 @@
},
"packages/electron-app": {
"name": "@neuralnomads/codenomad-electron-app",
"version": "0.7.6",
"version": "0.8.0",
"dependencies": {
"@codenomad/ui": "file:../ui",
"@neuralnomads/codenomad": "file:../server"
@@ -7418,7 +7418,7 @@
},
"packages/server": {
"name": "@neuralnomads/codenomad",
"version": "0.7.6",
"version": "0.8.0",
"dependencies": {
"@fastify/cors": "^8.5.0",
"@fastify/reply-from": "^9.8.0",
@@ -7455,14 +7455,14 @@
},
"packages/tauri-app": {
"name": "@codenomad/tauri-app",
"version": "0.7.6",
"version": "0.8.0",
"devDependencies": {
"@tauri-apps/cli": "^2.9.4"
}
},
"packages/ui": {
"name": "@codenomad/ui",
"version": "0.7.6",
"version": "0.8.0",
"dependencies": {
"@git-diff-view/solid": "^0.0.8",
"@kobalte/core": "0.13.11",

View File

@@ -1,6 +1,6 @@
{
"name": "codenomad-workspace",
"version": "0.7.6",
"version": "0.8.0",
"private": true,
"description": "CodeNomad monorepo workspace",
"workspaces": {

View File

@@ -72,4 +72,12 @@ const manifest = {
fs.mkdirSync(distDir, { recursive: true })
fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2) + "\n", "utf-8")
const headersPath = path.join(distDir, "_headers")
fs.writeFileSync(
headersPath,
"/version.json\n Cache-Control: no-cache\n Content-Type: application/json; charset=utf-8\n",
"utf-8",
)
console.log(`Wrote ${manifestPath}`)
console.log(`Wrote ${headersPath}`)

View File

@@ -2,28 +2,8 @@ export interface Env {
ASSETS: { fetch: (request: Request) => Promise<Response> }
}
function withHeader(response: Response, key: string, value: string): Response {
const headers = new Headers(response.headers)
headers.set(key, value)
return new Response(response.body, {
status: response.status,
statusText: response.statusText,
headers,
})
}
export default {
async fetch(request: Request, env: Env): Promise<Response> {
const url = new URL(request.url)
if (url.pathname === "/version.json") {
const assetResponse = await env.ASSETS.fetch(request)
// Ensure this stays fresh; the server uses it on startup.
const withCache = withHeader(assetResponse, "Cache-Control", "no-cache")
return withHeader(withCache, "Content-Type", "application/json; charset=utf-8")
}
return new Response("Not found", { status: 404 })
return env.ASSETS.fetch(request)
},
}

View File

@@ -12,4 +12,3 @@ custom_domain = true
directory = "./dist"
binding = "ASSETS"
not_found_handling = "404-page"
run_worker_first = ["/version.json"]

View File

@@ -1,6 +1,6 @@
{
"name": "@neuralnomads/codenomad-electron-app",
"version": "0.7.6",
"version": "0.8.0",
"description": "CodeNomad - AI coding assistant",
"author": {
"name": "Neural Nomads",

View File

@@ -1,12 +1,12 @@
{
"name": "@neuralnomads/codenomad",
"version": "0.7.6",
"version": "0.8.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@neuralnomads/codenomad",
"version": "0.7.6",
"version": "0.8.0",
"dependencies": {
"@fastify/cors": "^8.5.0",
"@fastify/reply-from": "^9.8.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@neuralnomads/codenomad",
"version": "0.7.6",
"version": "0.8.0",
"description": "CodeNomad Server",
"author": {
"name": "Neural Nomads",

View File

@@ -1,6 +1,6 @@
{
"name": "@codenomad/tauri-app",
"version": "0.7.6",
"version": "0.8.0",
"private": true,
"scripts": {
"dev": "tauri dev",

View File

@@ -1,6 +1,6 @@
{
"name": "@codenomad/ui",
"version": "0.7.6",
"version": "0.8.0",
"private": true,
"type": "module",
"scripts": {