@hanzo/build 0.2.81 → 0.2.82

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.
@@ -12,7 +12,7 @@
12
12
  * `conflict`, `pending` (not on the forge yet) or `paused` — and is absent when
13
13
  * the forge could not be read, which is not reported as healthy.
14
14
  *
15
- * Every link the sync app holds is also a row of GET /v1/projects (apps/sync
15
+ * Every link the sync app holds is also a row of GET /v1/project (apps/sync
16
16
  * project.go), so this list is the org's linked projects and not a copy of them.
17
17
  */
18
18
  import { type Target } from './call.ts';
package/lib/api/links.js CHANGED
@@ -12,7 +12,7 @@
12
12
  * `conflict`, `pending` (not on the forge yet) or `paused` — and is absent when
13
13
  * the forge could not be read, which is not reported as healthy.
14
14
  *
15
- * Every link the sync app holds is also a row of GET /v1/projects (apps/sync
15
+ * Every link the sync app holds is also a row of GET /v1/project (apps/sync
16
16
  * project.go), so this list is the org's linked projects and not a copy of them.
17
17
  */
18
18
  import { call } from './call.js';
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * The org's projects: what it has built, and where each one is served.
3
3
  *
4
- * GET /v1/projects → Project[]
5
- * PATCH /v1/projects/{slug} rename it, or make it public or private
6
- * DELETE /v1/projects/{slug} delete it and take its site down
7
- * GET /v1/projects/{slug}/deployments → Deployment[], newest first
4
+ * GET /v1/project → Project[]
5
+ * PATCH /v1/project/{slug} rename it, or make it public or private
6
+ * DELETE /v1/project/{slug} delete it and take its site down
7
+ * GET /v1/project/{slug}/deployments → Deployment[], newest first
8
8
  *
9
9
  * `slug` is the one key every surface shares — the address under /dev, the
10
10
  * site's name, the `project` a run is tagged with. A project belongs to the org,
@@ -52,7 +52,7 @@ export function project(raw) {
52
52
  };
53
53
  }
54
54
  export async function projects(t) {
55
- const raw = await call(t, 'GET', '/v1/projects');
55
+ const raw = await call(t, 'GET', '/v1/project');
56
56
  const rows = Array.isArray(raw) ? raw : Array.isArray(raw?.data) ? raw.data : [];
57
57
  return rows
58
58
  .map(project)
@@ -70,11 +70,11 @@ export async function change(t, slug, what) {
70
70
  }
71
71
  if (what.visibility !== undefined)
72
72
  body.visibility = what.visibility;
73
- return project(await call(t, 'PATCH', `/v1/projects/${seg(slug)}`, body));
73
+ return project(await call(t, 'PATCH', `/v1/project/${seg(slug)}`, body));
74
74
  }
75
75
  /** Delete a project. Its site stops answering and its slug is free again. */
76
76
  export async function remove(t, slug) {
77
- await call(t, 'DELETE', `/v1/projects/${seg(slug)}`);
77
+ await call(t, 'DELETE', `/v1/project/${seg(slug)}`);
78
78
  }
79
79
  export function deployment(raw) {
80
80
  const d = (raw && typeof raw === 'object' ? raw : {});
@@ -90,7 +90,7 @@ export function deployment(raw) {
90
90
  }
91
91
  /** A project's deployments, newest first: the first says how its latest build went. */
92
92
  export async function deployments(t, slug) {
93
- const raw = await call(t, 'GET', `/v1/projects/${seg(slug)}/deployments`);
93
+ const raw = await call(t, 'GET', `/v1/project/${seg(slug)}/deployments`);
94
94
  return (Array.isArray(raw) ? raw : [])
95
95
  .map(deployment)
96
96
  .filter((d) => d.id)
@@ -127,7 +127,7 @@ export async function templates(t) {
127
127
  * once, and answers `building` until it is `live` or its build failed.
128
128
  */
129
129
  export async function fork(t, slug) {
130
- return project(await call(t, 'POST', '/v1/projects/fork', { slug }));
130
+ return project(await call(t, 'POST', '/v1/project/fork', { slug }));
131
131
  }
132
132
  /** `owner/name` from a clone URL — its last two path segments, without `.git`. */
133
133
  export function address(clone) {
package/lib/merge.d.ts CHANGED
@@ -42,7 +42,7 @@ export interface Project {
42
42
  synced: string;
43
43
  /** Its link's state: `synced`, `conflict`, `pending`, `paused`, `linked` when its forge copy could not be read; '' with no link. */
44
44
  status: string;
45
- /** The org's project (GET /v1/projects) that builds from it, by slug, or ''. */
45
+ /** The org's project (GET /v1/project) that builds from it, by slug, or ''. */
46
46
  slug: string;
47
47
  /** The name GitHub's listing says it takes on the forge once brought there, or ''. */
48
48
  codebase: string;
@@ -124,7 +124,7 @@ export interface Linked {
124
124
  status: string;
125
125
  branch: string;
126
126
  }
127
- /** One of the org's projects (GET /v1/projects) that builds from a repository. */
127
+ /** One of the org's projects (GET /v1/project) that builds from a repository. */
128
128
  export interface Site {
129
129
  slug: string;
130
130
  /** Its clone address. */
@@ -2,7 +2,7 @@
2
2
  * The plugins the composer offers, from `+` › Plugins and by typing `@`: only
3
3
  * those that run for this person, each on Hanzo's own services.
4
4
  *
5
- * Work in a project the org has a project (GET /v1/projects)
5
+ * Work in a project the org has a project (GET /v1/project)
6
6
  * Deep research signed in: web search, page reading and a Hanzo model, as the person
7
7
  * Sketch always: it draws in the page
8
8
  * Template Creator an org admin: only an admin writes the org's skills
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /**
3
- * Work in a project: pick one of the org's projects (GET /v1/projects). A
3
+ * Work in a project: pick one of the org's projects (GET /v1/project). A
4
4
  * conversation does not belong to a project — work in one is a Dev run tagged
5
5
  * with it — so a message in the composer starts a Dev run on the picked project
6
6
  * (POST /v1/agent/coding, the person's saved model) and opens it; with nothing
package/lib/shelf.js CHANGED
@@ -3,9 +3,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  * Two shelves: the sites this org has deployed (Sites, drawn at the foot of the
4
4
  * Library — library.tsx), and the public starters (Templates).
5
5
  *
6
- * A project is a real row — `/v1/projects`, the same one a deployed site is
6
+ * A project is a real row — `/v1/project`, the same one a deployed site is
7
7
  * served from — so opening one opens its workspace at its own address. A
8
- * starter is taken as a COPY of its own repository (`POST /v1/projects/fork`),
8
+ * starter is taken as a COPY of its own repository (`POST /v1/project/fork`),
9
9
  * so what opens is that template, not a model's imitation of it.
10
10
  */
11
11
  import { SizableText, XStack, YStack } from '@hanzo/gui';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/build",
3
- "version": "0.2.81",
3
+ "version": "0.2.82",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "description": "Hanzo Build — say what you want, watch it built, deployed and running. The builder as a component, mounted by the Hanzo app at hanzo.ai.",