@fabrika/builder 0.4.8 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/daemon/src/handlers.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AssertReadable, type CanvasScope, compileJsx, type SessionManager, watchSession } from '@fabrika/canvas-kernel/server'
|
|
2
|
-
import type
|
|
2
|
+
import { jsonResponse, type Route } from '@fabrika/daemon-kit'
|
|
3
3
|
import { existsSync, readdirSync, readFileSync, statSync } from 'fs'
|
|
4
4
|
import { basename, dirname, extname, join } from 'path'
|
|
5
5
|
import type { z } from 'zod'
|
|
@@ -10,13 +10,6 @@ import { derivePhaseState, type GateOracle } from './phases'
|
|
|
10
10
|
import { BuilderPlatform } from './platform'
|
|
11
11
|
import { PlatformError } from './platform-storage'
|
|
12
12
|
|
|
13
|
-
function jsonResponse(data: unknown, status = 200): Response {
|
|
14
|
-
return new Response(JSON.stringify(data), {
|
|
15
|
-
status,
|
|
16
|
-
headers: { 'Content-Type': 'application/json' },
|
|
17
|
-
})
|
|
18
|
-
}
|
|
19
|
-
|
|
20
13
|
function errorMessage(error: unknown): string {
|
|
21
14
|
return error instanceof Error ? error.message : String(error)
|
|
22
15
|
}
|
|
@@ -27,14 +20,6 @@ function routeParam(match: URLPatternResult, name: string): string {
|
|
|
27
20
|
return value
|
|
28
21
|
}
|
|
29
22
|
|
|
30
|
-
export function corsHeaders(port: number): Record<string, string> {
|
|
31
|
-
return {
|
|
32
|
-
'Access-Control-Allow-Origin': builderDaemonUrl(port),
|
|
33
|
-
'Access-Control-Allow-Methods': 'GET, POST, OPTIONS',
|
|
34
|
-
'Access-Control-Allow-Headers': 'Content-Type',
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
23
|
export interface HandlerContext {
|
|
39
24
|
sessionManager: SessionManager
|
|
40
25
|
broadcastPlanUpdate: (id: string) => void
|
|
@@ -7,7 +7,7 @@ provides: [authentication, authorization, proxy-enforcement]
|
|
|
7
7
|
requires: [zerops-platform]
|
|
8
8
|
recommends: []
|
|
9
9
|
conflicts: [propustka, cloudflare-access, auth-password-kv]
|
|
10
|
-
npm: ["@fabrika/app@0.
|
|
10
|
+
npm: ["@fabrika/app@0.5.0", "@fabrika/db@0.5.0", "zod@^3.25.76"]
|
|
11
11
|
status: wip
|
|
12
12
|
sources:
|
|
13
13
|
- where: "packages/app/skill/SKILL.md in fabrika-platform (the `fabrika-app` skill)"
|
|
@@ -7,7 +7,7 @@ provides: [platform, private-services, managed-deploy]
|
|
|
7
7
|
requires: [bun, postgres]
|
|
8
8
|
recommends: []
|
|
9
9
|
conflicts: [cloudflare]
|
|
10
|
-
npm: ["@fabrika/provider-zerops@0.
|
|
10
|
+
npm: ["@fabrika/provider-zerops@0.5.0", "@fabrika/app@0.5.0", "@fabrika/cli@0.5.0"]
|
|
11
11
|
status: wip
|
|
12
12
|
sources:
|
|
13
13
|
- where: "examples/zerops-app/fabrika.config.ts + zerops.yaml in fabrika-platform"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fabrika/builder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Local-first guided application design and agent-assisted implementation.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"zod": "^3.25.76",
|
|
50
|
-
"@fabrika/annotations": "0.
|
|
51
|
-
"@fabrika/app": "0.
|
|
52
|
-
"@fabrika/auth-core": "0.
|
|
53
|
-
"@fabrika/canvas-kernel": "0.
|
|
54
|
-
"@fabrika/control-contract": "0.
|
|
55
|
-
"@fabrika/daemon-kit": "0.
|
|
56
|
-
"@fabrika/provider-zerops": "0.
|
|
50
|
+
"@fabrika/annotations": "0.5.0",
|
|
51
|
+
"@fabrika/app": "0.5.0",
|
|
52
|
+
"@fabrika/auth-core": "0.5.0",
|
|
53
|
+
"@fabrika/canvas-kernel": "0.5.0",
|
|
54
|
+
"@fabrika/control-contract": "0.5.0",
|
|
55
|
+
"@fabrika/daemon-kit": "0.5.0",
|
|
56
|
+
"@fabrika/provider-zerops": "0.5.0",
|
|
57
57
|
"preact": "^10.25.0"
|
|
58
58
|
}
|
|
59
59
|
}
|