fimo 2.1.0 → 2.2.0-staging.1
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/assets/agent-templates/content-translator/scripts/translate-entries.ts +1 -1
- package/assets/agent-templates/post-deploy-check/scripts/check-logs.ts +1 -1
- package/assets/agent-templates/seo-audit/scripts/list-routes.ts +3 -3
- package/assets/skills/fimo-cli/SKILL.md +1 -1
- package/assets/skills/fimo-cli/references/branches.md +1 -1
- package/assets/skills/fimo-cli/references/preview.md +5 -3
- package/assets/skills/fimo-migration/SKILL.md +3 -3
- package/dist/cli/bundle.json +1 -1
- package/dist/cli/index.js +58 -58
- package/dist/runtime/astro/server-runtime.js +7 -3
- package/dist/runtime/paths/get-fimo-paths.js +7 -3
- package/dist/runtime/shared/branch-identity.d.ts +56 -0
- package/dist/runtime/shared/{env-identity.js → branch-identity.js} +40 -27
- package/dist/runtime/shared/local-runtime-env.d.ts +2 -2
- package/dist/runtime/shared/local-runtime-env.js +12 -10
- package/package.json +7 -7
- package/release.json +2 -2
- package/templates/astro/package.json +2 -2
- package/templates/nextjs/package.json +3 -3
- package/templates/react-router/package.json +4 -4
- package/templates/sveltekit/package.json +2 -2
- package/templates/vite/package.json +4 -4
- package/dist/runtime/shared/env-identity.d.ts +0 -43
|
@@ -38,7 +38,7 @@ async function translate(text: string, _to: string): Promise<string> {
|
|
|
38
38
|
|
|
39
39
|
async function writeBack(_entry: Entry, _locale: string, _value: string): Promise<void> {
|
|
40
40
|
// Stub — create/update the target locale entry via
|
|
41
|
-
// `/api/
|
|
41
|
+
// `/api/tenant/:projectId/branches/:branch/entries/:type`.
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
async function main(): Promise<void> {
|
|
@@ -17,7 +17,7 @@ async function main(): Promise<void> {
|
|
|
17
17
|
const base = process.env.FIMO_API_URL ?? 'http://localhost:3000';
|
|
18
18
|
|
|
19
19
|
const since = new Date(Date.now() - minutes * 60_000).toISOString();
|
|
20
|
-
const url = `${base}/api/management/projects/${projectId}/
|
|
20
|
+
const url = `${base}/api/management/projects/${projectId}/branches/${encodeURIComponent(env)}/logs?since=${encodeURIComponent(since)}&level=error`;
|
|
21
21
|
|
|
22
22
|
try {
|
|
23
23
|
const res = await fetch(url, { credentials: 'include' });
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Enumerate every public route in the project via the Fimo management
|
|
5
5
|
* API. Returns paths the audit walks one-by-one through `fetch-page`.
|
|
6
6
|
*
|
|
7
|
-
* Inputs (
|
|
7
|
+
* Inputs (branch):
|
|
8
8
|
* - FIMO_PROJECT_ID — provided by the runtime (M16 sandbox adapter)
|
|
9
|
-
* - FIMO_ENV — provided by the runtime
|
|
9
|
+
* - FIMO_ENV — provided by the runtime (legacy runtime selector)
|
|
10
10
|
* - FIMO_API_URL — provided by the runtime
|
|
11
11
|
*
|
|
12
12
|
* Outputs (stdout JSON):
|
|
@@ -28,7 +28,7 @@ async function main(): Promise<void> {
|
|
|
28
28
|
process.exit(1);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
const url = `${base}/api/management/projects/${projectId}/
|
|
31
|
+
const url = `${base}/api/management/projects/${projectId}/branches/${encodeURIComponent(env)}/routes`;
|
|
32
32
|
const res = await fetch(url, { credentials: 'include' });
|
|
33
33
|
if (!res.ok) {
|
|
34
34
|
console.error(`Failed to list routes: ${res.status} ${res.statusText}`);
|
|
@@ -44,7 +44,7 @@ A Fimo project is identified by `.fimo/project.json`, written by `fimo init`. Th
|
|
|
44
44
|
|
|
45
45
|
## Critical: commands target the Branch matching the current git branch
|
|
46
46
|
|
|
47
|
-
A project can have multiple **Branches** — each is a git branch _plus_ its own DB, sandbox, preview, and assets. Project-scoped commands (`deploy`, `status`, `entries`, `diff`, …) operate on the Branch matching the **current git branch**, and print a one-line banner saying which one. New projects start on `main`. Override for a single command with the canonical `--branch <name>` flag; the legacy `--env <name>` spelling
|
|
47
|
+
A project can have multiple **Branches** — each is a git branch _plus_ its own DB, sandbox, preview, and assets. Project-scoped commands (`deploy`, `status`, `entries`, `diff`, …) operate on the Branch matching the **current git branch**, and print a one-line banner saying which one. New projects start on `main`. Override for a single command with the canonical `--branch <name>` flag; the legacy `--env <name>` spelling still works, but passing both with different values fails (`BRANCH_OPTION_CONFLICT`) instead of picking one. Never edit the link file to switch. The full git-shaped workflow (`branch` / `checkout` / `switch` / `pull` / `diff` / `merge` / `status` / `publish`) lives in `references/branches.md`.
|
|
48
48
|
|
|
49
49
|
## Quick Start
|
|
50
50
|
|
|
@@ -15,7 +15,7 @@ fimo --branch <name> <command> # peek at another Branch for one command (does n
|
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
- **`--branch <name>`** is the canonical global override. `fimo --branch main status` inspects `main` while you stay checked out on your feature Branch.
|
|
18
|
-
- **`--env <name>`** remains a
|
|
18
|
+
- **`--env <name>`** remains a deprecated alias for `--branch`. Passing both with **different** values fails with `BRANCH_OPTION_CONFLICT` rather than picking a winner; passing both with the same value is fine.
|
|
19
19
|
- Git-changing commands use the current branch; cross-branch status only reports the mismatch.
|
|
20
20
|
- If the git branch maps to no Fimo Branch, the CLI errors with a hint (`fimo branch` to list, `fimo branch <name>` to create) rather than guessing.
|
|
21
21
|
- **`main`** is the default Branch and cannot be deleted.
|
|
@@ -14,7 +14,7 @@ fimo preview url --all # print every destination a
|
|
|
14
14
|
curl -L "$(fimo preview url)" # fetch the raw sandbox preview
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
`--env <name>` remains a
|
|
17
|
+
`--env <name>` remains a deprecated alias for `--branch <name>`; the two disagreeing is an error, not a precedence rule. The JSON envelope carries `branch` and keeps `env` as a duplicate of it. Studio deep links still use the `/env/` path, which redirects to `/branch/`.
|
|
18
18
|
|
|
19
19
|
## Human and machine behavior
|
|
20
20
|
|
|
@@ -30,12 +30,14 @@ curl -L "$(fimo preview url)" # fetch the raw sandbox pre
|
|
|
30
30
|
"status": "ok",
|
|
31
31
|
"data": {
|
|
32
32
|
"project_id": "prj_abc",
|
|
33
|
+
"branch": "main",
|
|
34
|
+
"env": "main",
|
|
33
35
|
"env": "main",
|
|
34
36
|
"preview_url": "https://fimo.ai/preview/prj_abc/main",
|
|
35
37
|
"sandbox_url": "https://preview.provider.example/session",
|
|
36
38
|
"sandbox_expires_at": "2026-08-20T18:42:00.000Z",
|
|
37
|
-
"studio_url": "https://fimo.ai/app/projects/prj_abc/
|
|
38
|
-
"dashboard_url": "https://fimo.ai/app/projects/prj_abc/
|
|
39
|
+
"studio_url": "https://fimo.ai/app/projects/prj_abc/branch/main/preview",
|
|
40
|
+
"dashboard_url": "https://fimo.ai/app/projects/prj_abc/branch/main/preview"
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
43
|
```
|
|
@@ -71,7 +71,7 @@ artifact, and record which one.
|
|
|
71
71
|
|
|
72
72
|
Before workers start, the root process must establish a real Fimo project and
|
|
73
73
|
environment, link the migration checkout to it, and prove the data plane is
|
|
74
|
-
reachable with a read such as `fimo schemas list -C <target> --
|
|
74
|
+
reachable with a read such as `fimo schemas list -C <target> --branch <branch>` using
|
|
75
75
|
the selected pinned CLI. Give workers the project id, environment, exact CLI
|
|
76
76
|
invocation, and verification command. Generated `.fimo` JSON without a
|
|
77
77
|
successful platform read is not initialization.
|
|
@@ -79,8 +79,8 @@ successful platform read is not initialization.
|
|
|
79
79
|
Pick the setup path from the evidence:
|
|
80
80
|
|
|
81
81
|
- **Source-backed, same framework** — copy or `git worktree` the source into the
|
|
82
|
-
target directory first, then run `fimo link -C <target> --
|
|
83
|
-
(`fimo link <project-id> -C <target> --
|
|
82
|
+
target directory first, then run `fimo link -C <target> --branch <branch>`
|
|
83
|
+
(`fimo link <project-id> -C <target> --branch <branch>` when the owner supplied an
|
|
84
84
|
id). Link creates or selects the project, keeps the source's code, framework,
|
|
85
85
|
git history, and `origin`, initializes a repository when the copy has none,
|
|
86
86
|
and adds only the Fimo dependency, `.fimo/project.json`, the `fimo` remote,
|