@astrale-os/adapter-cloudflare 0.4.4 → 0.4.6
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/dist/codegen/wrangler.js +1 -1
- package/package.json +4 -3
- package/src/codegen/wrangler.ts +1 -1
- package/template/CLAUDE.md +8 -21
- package/template/README.md +30 -107
- package/template/client/__tests__/app.test.tsx +6 -57
- package/template/client/components.json +25 -0
- package/template/client/index.html +1 -1
- package/template/client/package.json +10 -2
- package/template/client/src/app.tsx +42 -33
- package/template/client/src/components/ui/cn.ts +6 -0
- package/template/client/src/styles.css +71 -502
- package/template/client/vite.config.ts +2 -18
- package/template/client/vitest.config.ts +0 -6
- package/template/core/README.md +5 -21
- package/template/deps.ts +2 -20
- package/template/domain.ts +0 -26
- package/template/env.ts +1 -17
- package/template/icons.ts +4 -25
- package/template/integrations/README.md +5 -20
- package/template/package.json +7 -5
- package/template/pnpm-workspace.yaml +2 -0
- package/template/runtime/index.ts +0 -27
- package/template/schema/index.ts +0 -20
- package/template/simulation/README.md +12 -0
- package/template/tsconfig.json +2 -3
- package/template/vitest.config.ts +7 -0
- package/template/.domain-studio/comments.json +0 -4
- package/template/client/README.md +0 -104
- package/template/client/__tests__/harness.ts +0 -230
- package/template/client/__tests__/shell.test.ts +0 -46
- package/template/client/src/shell/client.ts +0 -67
- package/template/client/src/shell/index.ts +0 -21
- package/template/client/src/shell/invoke.ts +0 -35
- package/template/client/src/shell/transformers.ts +0 -75
- package/template/client/src/shell/use-async.ts +0 -59
- package/template/client/src/shell/use-capability.ts +0 -59
- package/template/client/src/shell/use-node.ts +0 -81
- package/template/client/src/shell/use-shell.ts +0 -91
- package/template/client/src/shell/view-router.tsx +0 -97
- package/template/client/src/ui/format.ts +0 -24
- package/template/client/src/ui/index.ts +0 -10
- package/template/client/src/ui/surface.tsx +0 -56
- package/template/client/src/ui/value.tsx +0 -32
- package/template/functions/index.ts +0 -22
- package/template/views/index.ts +0 -19
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/** Inline value renderers — pure presentational. */
|
|
2
|
-
import type { ReactNode } from 'react'
|
|
3
|
-
|
|
4
|
-
/** One label/value row in a `.kv` grid. */
|
|
5
|
-
export function KV({ label, children }: { label: string; children: ReactNode }) {
|
|
6
|
-
return (
|
|
7
|
-
<div className="kv-row">
|
|
8
|
-
<div className="kv-key">{label}</div>
|
|
9
|
-
<div className="kv-val">{children}</div>
|
|
10
|
-
</div>
|
|
11
|
-
)
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/** Monospace inline value with a soft em-dash fallback. */
|
|
15
|
-
export function Mono({ value, title }: { value: string | undefined; title?: string }) {
|
|
16
|
-
if (!value) return <span className="muted">—</span>
|
|
17
|
-
return (
|
|
18
|
-
<span className="mono" title={title ?? value}>
|
|
19
|
-
{value}
|
|
20
|
-
</span>
|
|
21
|
-
)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/** An external link rendered without its scheme, opening in a new tab. */
|
|
25
|
-
export function ExternalLink({ url }: { url: string | undefined }) {
|
|
26
|
-
if (!url) return <span className="muted">—</span>
|
|
27
|
-
return (
|
|
28
|
-
<a className="mono link" href={url} target="_blank" rel="noreferrer noopener" title={url}>
|
|
29
|
-
{url.replace(/^https?:\/\//, '')}
|
|
30
|
-
</a>
|
|
31
|
-
)
|
|
32
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Standalone-function registry — one entry per callable that is NOT a method of
|
|
3
|
-
* a class. Each becomes a first-class domain MEMBER: a `Function` node at
|
|
4
|
-
* `/<origin>/functions/<key>` with an `of_domain` edge (slug `function.<key>`),
|
|
5
|
-
* addressable by the semantic domain path `/:<origin>:function.<key>` on top of
|
|
6
|
-
* its worker route `/functions/<key>`. The map key is the slug.
|
|
7
|
-
*
|
|
8
|
-
* It starts EMPTY. Add a function (e.g. a webhook, or a `postInstall` seed) with
|
|
9
|
-
* `defineRemoteFunction` and list it here; reference it from `domain.ts` (e.g.
|
|
10
|
-
* `postInstall: functions.seed`) so a rename can't leave a stale path string:
|
|
11
|
-
*
|
|
12
|
-
* seed: defineRemoteFunction({
|
|
13
|
-
* inputSchema: z.object({}),
|
|
14
|
-
* outputSchema: z.object({ seeded: z.number().int() }),
|
|
15
|
-
* authorize: async () => undefined,
|
|
16
|
-
* execute: ({ kernel }) => ({ seeded: 0 }),
|
|
17
|
-
* }),
|
|
18
|
-
*
|
|
19
|
-
* A standalone function's `execute` receives the same request context as a
|
|
20
|
-
* method MINUS `self` (it is not node-bound): `{ params, kernel, deps, auth, … }`.
|
|
21
|
-
*/
|
|
22
|
-
export const functions = {}
|
package/template/views/index.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* View registry — one file per view under `views/`, assembled here. Slug = map
|
|
3
|
-
* key; each becomes a View node at `/<origin>/views/<slug>` whose iframe binding
|
|
4
|
-
* the SDK stamps with the worker's live serving URL when it builds the install
|
|
5
|
-
* bundle.
|
|
6
|
-
*
|
|
7
|
-
* It starts EMPTY. Two shapes of view:
|
|
8
|
-
*
|
|
9
|
-
* - Inline HTML, rendered straight from the worker (no client bundle):
|
|
10
|
-
* export const welcome = defineView({ auth: 'public', render: ({ c }) =>
|
|
11
|
-
* c.html('<h1>hello</h1>') })
|
|
12
|
-
* - A `client/` SPA view, mounted under `/ui/<route>` and offered for a class:
|
|
13
|
-
* export const panel = defineView({ auth: 'public', mount: '/ui/panel',
|
|
14
|
-
* viewFor: selfOf(SomeClass) })
|
|
15
|
-
* then register a matching route in `client/src/app.tsx`.
|
|
16
|
-
*
|
|
17
|
-
* Add the view file under `views/`, import it, and list it below (key = slug).
|
|
18
|
-
*/
|
|
19
|
-
export const views = {}
|