@frontfriend/sdk 1.0.0 → 1.1.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/README.md +14 -3
- package/dist/cli.js +154 -154
- package/dist/lib/core/adoption.js +1 -1
- package/dist/lib/core/api-client.js +1 -1
- package/dist/lib/core/application-adoption.js +1 -1
- package/dist/lib/core/credentials.js +2 -2
- package/dist/lib/core/token-artifact-client.js +6 -6
- package/dist/lib/core/token-artifact.d.ts +12 -0
- package/dist/lib/core/token-artifact.js +1 -1
- package/dist/mcp.cjs +3 -3
- package/dist/next.js +1 -1
- package/dist/package.json +1 -1
- package/dist/vite.js +1 -1
- package/package.json +13 -15
package/README.md
CHANGED
|
@@ -315,15 +315,26 @@ See [Troubleshooting](https://frontfriend.dev/docs/troubleshooting/) for more he
|
|
|
315
315
|
|
|
316
316
|
## Token availability
|
|
317
317
|
|
|
318
|
-
`frontfriend init`
|
|
318
|
+
`frontfriend init` requires a login (`frontfriend login` or `FF_AUTH_TOKEN`) and reads tokens from Studio. It uses the token Release in `frontfriend.lock.json`; you can also select a Release or tag:
|
|
319
319
|
|
|
320
320
|
```sh
|
|
321
321
|
npx frontfriend init --version <release-id>
|
|
322
322
|
npx frontfriend init --tag <tag-name-or-id>
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
`--version` takes a Release ID, not an SDK version. A Studio refusal, such as a missing login or no access to the Design System, stops initialization.
|
|
326
|
+
|
|
327
|
+
Every online `init` keeps a verified copy of the selected tokens in `.frontfriend/artifacts`. When Studio is unreachable (network failure, timeout or server error), a signed-in `init` restores that copy. A first install during an outage has no copy to restore.
|
|
328
|
+
|
|
329
|
+
### Offline tokens
|
|
330
|
+
|
|
331
|
+
Offline tokens are a Workspace capability that Frontfriend enables on request; no plan includes them by default. With it, an online `init` also stores the Workspace's signed offline license next to the verified copies in `.frontfriend/artifacts`. Commit that directory to build and deploy without calling Frontfriend:
|
|
332
|
+
|
|
333
|
+
```sh
|
|
323
334
|
npx frontfriend init --offline
|
|
324
335
|
```
|
|
325
336
|
|
|
326
|
-
`--
|
|
337
|
+
`--offline` makes no network request and needs no login: it verifies the license and the copy locally. The license does not expire; the next online `init` replaces it, or removes it if the Workspace no longer has offline tokens. With the capability, an `init` during a Studio outage also tries the token CDN before the local copy, so a first install can succeed with an explicit Release or tag. Without the capability, `--offline` fails and the CDN is never read.
|
|
327
338
|
|
|
328
339
|
The default API uses the production token CDN automatically. For a custom API, set `token-cdn-url`, `FF_TOKEN_CDN_URL`, or `--token-cdn-url`. Set `token-cdn-url: false` to disable CDN delivery.
|
|
329
340
|
|
|
@@ -331,7 +342,7 @@ Downloads validate artifact identity and integrity. Access refusals and invalid
|
|
|
331
342
|
|
|
332
343
|
## CI authentication
|
|
333
344
|
|
|
334
|
-
Set `FF_AUTH_TOKEN` through your CI secret store for commands that need access to your workspace. Do not commit it to project configuration or print it in build logs.
|
|
345
|
+
Set `FF_AUTH_TOKEN` through your CI secret store for commands that need access to your workspace. Do not commit it to project configuration or print it in build logs. Online token delivery, private components and design rules require it; `init --offline` does not.
|
|
335
346
|
|
|
336
347
|
## Existing Tailwind clients
|
|
337
348
|
|