designsource 0.7.1 → 0.7.2
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 +2 -1
- package/dist/index.js +7 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -130,6 +130,7 @@ npx designsource logout [--api <origin>]
|
|
|
130
130
|
```
|
|
131
131
|
Signing in for /Users/you/acme-app
|
|
132
132
|
Open https://designsource.app/device and enter BCDF-GHJK
|
|
133
|
+
No account yet? Sign up on that page; it's free.
|
|
133
134
|
Waiting for you to approve it in the browser… (Ctrl+C to stop)
|
|
134
135
|
Signed in as you@example.com on this computer.
|
|
135
136
|
Saved the sign-in in the macOS keychain ✓
|
|
@@ -141,7 +142,7 @@ These files hold no token and are safe to commit.
|
|
|
141
142
|
```
|
|
142
143
|
|
|
143
144
|
- **Approving.** The browser opens `designsource.app/device` (signed in, email verified); type the code, check what the page shows (the computer's name, where the request started, how long ago, what it may do) and Approve. Only approve a code you started yourself, just now: designsource never asks for one by email or chat. Your account is emailed when a device is approved. The code lives 10 minutes and works once; `login` prints the account's email so you notice if you signed in to the wrong one.
|
|
144
|
-
- **What it writes.** The sign-in (an account token, `dsa_…`) goes to this computer's private store, as `connect`'s token does: the macOS keychain, the Secret Service on Linux, DPAPI on Windows, else a file readable only by you. The index beside `credentials.json`, `account.json`, holds the account's email, its trusted folders and which design system each folder uses; never the token unless no OS store works, which `login` says. In the project it writes each app's MCP settings with the entry `npx -y designsource@latest mcp`: no `--project`, no token, safe to commit.
|
|
145
|
+
- **What it writes.** The sign-in (an account token, `dsa_…`) goes to this computer's private store, as `connect`'s token does: the macOS keychain, the Secret Service on Linux, DPAPI on Windows, else a file readable only by you. The index beside `credentials.json`, `account.json`, holds the account's email, its trusted folders and which design system each folder uses; never the token unless no OS store works, which `login` says. In the project it writes each app's MCP settings with the entry `npx -y designsource@latest mcp`: no `--project`, no token, safe to commit. Codex reads its project file only once you trust this project in Codex (it asks when you first open the folder), and Gemini CLI skips it when its folder trust is on and the folder is not trusted; `login` says so for each.
|
|
145
146
|
- **Trusted folders.** The account is used only in the exact project folders you ran `login` in: the nearest folder holding `.git` (after symlinks), not merely somewhere inside one, so a repository cloned under a trusted one is not trusted. `login` refuses your home folder, its parents, a filesystem root and a folder that is neither a repository nor a package (one with no `.git` and no `package.json`). Each folder links to one design system: the one your agent last created or picked there. A folder set up earlier with `connect` keeps its `--project` entry: that app stays on the one design system it was connected to and does not use the sign-in, which `login` says, naming the file to remove `--project` from. A second `login` in a terminal on a computer already signed in skips the browser and only trusts the new folder; outside a terminal it always asks for a fresh approval.
|
|
146
147
|
- **The agent's tools.** In a trusted folder, `list_design_systems`, `create_design_system` and `use_design_system` act on your account, and the other tools, `add_ui_kit` included, read the folder's linked design system. Your client asks before `create_design_system` runs. Every result names the account it used.
|
|
147
148
|
- **Revoking.** `logout` revokes this computer's sign-in on the server and removes it, with its trusted folders and links, from this computer (settings files are left; they hold no token). From anywhere, your profile page's **Coding apps** card lists every approved device with its last use and revokes one or all. A password change, unlinking a sign-in method or deleting the account ends every device's sign-in too, and an unused one expires after 90 days. A revoked sign-in stops everything on that computer at once, `add_ui_kit` included: no project token is ever handed out this way.
|
package/dist/index.js
CHANGED
|
@@ -3467,6 +3467,8 @@ function appLines(id, plan) {
|
|
|
3467
3467
|
const why = format === "toml" ? `${head}: it defines designsource another way, so it was not changed. Put this table in its place:` : plan.manualReason === "foreign-entry" ? `${head}: it defines designsource another way, so it was not changed. Put this entry in its place under "${key}":` : `${head}: it has comments or is not plain JSON, so it was not changed. Add this entry under "${key}":`;
|
|
3468
3468
|
return [why, ...entry];
|
|
3469
3469
|
}
|
|
3470
|
+
var CODEX_TRUST_NOTE = "Codex reads it once you trust this project in Codex.";
|
|
3471
|
+
var GEMINI_TRUST_NOTE = "Gemini CLI reads it unless folder trust is on and this folder is not trusted.";
|
|
3470
3472
|
function closingLines(apps, changed) {
|
|
3471
3473
|
const has = (id) => apps.includes(id);
|
|
3472
3474
|
const restart = [changed.includes("cursor") && "Cursor", changed.includes("vscode") && "VS Code"].filter((s) => typeof s === "string");
|
|
@@ -3474,8 +3476,8 @@ function closingLines(apps, changed) {
|
|
|
3474
3476
|
"Done.",
|
|
3475
3477
|
...restart.length > 0 ? [`Restart ${restart.join(" and ")}.`] : [],
|
|
3476
3478
|
...has("claude") ? ["Claude Code asks once to allow the server."] : [],
|
|
3477
|
-
...has("codex") ? [
|
|
3478
|
-
...has("gemini") ? [
|
|
3479
|
+
...has("codex") ? [CODEX_TRUST_NOTE] : [],
|
|
3480
|
+
...has("gemini") ? [GEMINI_TRUST_NOTE] : [],
|
|
3479
3481
|
"Then ask your agent to add the UI kit.",
|
|
3480
3482
|
"These files hold no token and are safe to commit; teammates run npx designsource connect once."
|
|
3481
3483
|
];
|
|
@@ -3905,6 +3907,8 @@ function closingLines2(apps, changed, usesAccount) {
|
|
|
3905
3907
|
return [
|
|
3906
3908
|
...changed.length > 0 ? [`Restart ${listOf(changed.map(labelOf))} so ${changed.length === 1 ? "it loads" : "they load"} designsource.`] : [],
|
|
3907
3909
|
...apps.includes("claude") ? ["Claude Code asks once to allow the server."] : [],
|
|
3910
|
+
...apps.includes("codex") ? [CODEX_TRUST_NOTE] : [],
|
|
3911
|
+
...apps.includes("gemini") ? [GEMINI_TRUST_NOTE] : [],
|
|
3908
3912
|
...usesAccount ? ["Then ask your agent to create a design system for this app."] : [],
|
|
3909
3913
|
"These files hold no token and are safe to commit."
|
|
3910
3914
|
];
|
|
@@ -4023,7 +4027,7 @@ async function runLogout(args, io, deps = defaultLoginDeps(process.env)) {
|
|
|
4023
4027
|
import { homedir as homedir4 } from "node:os";
|
|
4024
4028
|
|
|
4025
4029
|
// src/version.ts
|
|
4026
|
-
var VERSION = true ? "0.7.
|
|
4030
|
+
var VERSION = true ? "0.7.2" : "0.0.0-dev";
|
|
4027
4031
|
|
|
4028
4032
|
// src/mcp/account-session.ts
|
|
4029
4033
|
var NOT_SIGNED_IN_FOR = (root) => `Not signed in on this computer for ${printable(root)}. Ask the user to run npx designsource login in a terminal in that folder, then restart this app.`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "designsource",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "The DS source CLI: add your design system's UI kit to a React app (add), add the design system to any other app (integrate), start a new Next.js project from it (create), or serve it to a coding agent over MCP (mcp) — tokens, every component and your mockup page.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|