Skip to content

Commit 24cc8fe

Browse files
authored
Merge pull request #88 from NeuralNomadsAI/dev
Release v0.8.0 - Auto update UI and more fixes
2 parents 282b234 + 2530cd4 commit 24cc8fe

12 files changed

Lines changed: 37 additions & 39 deletions

File tree

.github/workflows/release-ui.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
name: Release UI
2+
13
on:
2-
push:
3-
branches:
4-
- main
4+
workflow_call: {}
55
workflow_dispatch: {}
66

77
permissions:
@@ -12,7 +12,8 @@ env:
1212

1313
jobs:
1414
release-ui:
15-
if: ${{ github.ref == 'refs/heads/main' }}
15+
# Automated via reusable call (main releases); manual runs allowed on dev.
16+
if: ${{ github.event_name == 'workflow_call' || github.ref == 'refs/heads/dev' }}
1617
runs-on: ubuntu-24.04
1718
steps:
1819
- name: Checkout
@@ -27,6 +28,9 @@ jobs:
2728
- name: Install dependencies
2829
run: npm ci --workspaces --include=optional
2930

31+
- name: Ensure rollup native binary
32+
run: npm install @rollup/rollup-linux-x64-gnu --no-save
33+
3034
- name: Install Cloudflare worker deps
3135
run: npm ci
3236
working-directory: packages/cloudflare

.github/workflows/reusable-release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ jobs:
6969
release_name: ${{ needs.prepare-release.outputs.release_name }}
7070
secrets: inherit
7171

72+
release-ui:
73+
needs: prepare-release
74+
permissions:
75+
contents: read
76+
uses: ./.github/workflows/release-ui.yml
77+
secrets: inherit
78+
7279
publish-server:
7380
needs:
7481
- prepare-release

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codenomad-workspace",
3-
"version": "0.7.6",
3+
"version": "0.8.0",
44
"private": true,
55
"description": "CodeNomad monorepo workspace",
66
"workspaces": {

packages/cloudflare/scripts/build-manifest.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,12 @@ const manifest = {
7272
fs.mkdirSync(distDir, { recursive: true })
7373
fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2) + "\n", "utf-8")
7474

75+
const headersPath = path.join(distDir, "_headers")
76+
fs.writeFileSync(
77+
headersPath,
78+
"/version.json\n Cache-Control: no-cache\n Content-Type: application/json; charset=utf-8\n",
79+
"utf-8",
80+
)
81+
7582
console.log(`Wrote ${manifestPath}`)
83+
console.log(`Wrote ${headersPath}`)

packages/cloudflare/src/index.ts

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,8 @@ export interface Env {
22
ASSETS: { fetch: (request: Request) => Promise<Response> }
33
}
44

5-
function withHeader(response: Response, key: string, value: string): Response {
6-
const headers = new Headers(response.headers)
7-
headers.set(key, value)
8-
return new Response(response.body, {
9-
status: response.status,
10-
statusText: response.statusText,
11-
headers,
12-
})
13-
}
14-
155
export default {
166
async fetch(request: Request, env: Env): Promise<Response> {
17-
const url = new URL(request.url)
18-
19-
if (url.pathname === "/version.json") {
20-
const assetResponse = await env.ASSETS.fetch(request)
21-
22-
// Ensure this stays fresh; the server uses it on startup.
23-
const withCache = withHeader(assetResponse, "Cache-Control", "no-cache")
24-
return withHeader(withCache, "Content-Type", "application/json; charset=utf-8")
25-
}
26-
27-
return new Response("Not found", { status: 404 })
7+
return env.ASSETS.fetch(request)
288
},
299
}

packages/cloudflare/wrangler.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ custom_domain = true
1212
directory = "./dist"
1313
binding = "ASSETS"
1414
not_found_handling = "404-page"
15-
run_worker_first = ["/version.json"]

packages/electron-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@neuralnomads/codenomad-electron-app",
3-
"version": "0.7.6",
3+
"version": "0.8.0",
44
"description": "CodeNomad - AI coding assistant",
55
"author": {
66
"name": "Neural Nomads",

packages/server/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@neuralnomads/codenomad",
3-
"version": "0.7.6",
3+
"version": "0.8.0",
44
"description": "CodeNomad Server",
55
"author": {
66
"name": "Neural Nomads",

0 commit comments

Comments
 (0)