@kigo-dev/sindri 0.1.8 → 0.1.10

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 CHANGED
@@ -13,7 +13,7 @@ names, parameters and this document are English. The contract lives in
13
13
 
14
14
  | Tool | Arguments | What it does |
15
15
  |---|---|---|
16
- | `setup` | – | Installs Node LTS and pnpm under the user's home with [fnm](https://github.com/Schniz/fnm) (no sudo), creates `~/Sindri`. Reuses an existing Node ≥ 20 + pnpm. Idempotent. |
16
+ | `setup` | – | Installs Node LTS and pnpm under the user's home, no sudo or admin: macOS/Linux with [fnm](https://github.com/Schniz/fnm); Windows from the official nodejs.org zip (sha256 checked against `SHASUMS256.txt`, unpacked with Windows' own `tar.exe`) into `%LOCALAPPDATA%\Sindri\node`. pnpm comes from the npm bundled with that Node (Node 25+ no longer ships corepack). Creates `~/Sindri`. macOS/Linux reuse an existing Node ≥ 20 + pnpm; Windows only uses its own. Idempotent. |
17
17
  | `login` | – | OAuth 2.0 authorization code + PKCE (S256) with a loopback redirect, Vercel-CLI style: listens on `http://127.0.0.1:<random>/callback`, opens Identity's `authorization_endpoint` (client `sindri-connector`, public, `audience=sindri-api`), validates `state`, exchanges the code with the verifier, shows "Listo, ya entraste a Sindri" and closes. Waits up to 5 minutes. Device flow only as a fallback when no browser can be opened and discovery advertises the device grant. Tokens go to the macOS keychain (service `sindri`) or `~/.sindri/credentials.json` (0600). Refreshes silently. |
18
18
  | `create_app` | `name`, `description` | `POST /v1/apps`, downloads the personalised template into `~/Sindri/<name>`, `pnpm install`, migrates and seeds the local database. |
19
19
  | `preview` | `app` | `pnpm db:migrate` (and seed on first run), then `pnpm dev --port <free>` detached with `KIGO_ENV=local` (PGlite), waits for `/healthz`, opens the browser. Reuses a healthy preview. |
@@ -75,8 +75,27 @@ npx @kigo-dev/sindri status '{"app":"visitas"}'
75
75
  | `SINDRI_HOME` | `~/Sindri` | Where app folders live |
76
76
  | `SINDRI_STATE_DIR` | `~/.sindri` | Credentials fallback, preview registry |
77
77
  | `SINDRI_CREDENTIAL_STORE` | keychain on macOS, file elsewhere | `file` forces the JSON file |
78
- | `SINDRI_FNM_DIR` | `~/.local/share/fnm` | Where `setup` installs Node |
79
- | `SINDRI_OPENER` | `open` / `xdg-open` | Browser opener; empty disables |
78
+ | `SINDRI_FNM_DIR` | `~/.local/share/fnm`; Windows `%LOCALAPPDATA%\Sindri\node` | Where `setup` installs Node |
79
+ | `SINDRI_OPENER` | `open` / `xdg-open`; Windows `rundll32 url.dll,FileProtocolHandler` | Browser opener; empty disables |
80
+
81
+ ## Windows
82
+
83
+ Native, no WSL. What changes against macOS/Linux, all in this package:
84
+
85
+ - **Node and pnpm** live under `%LOCALAPPDATA%\Sindri\node\node-versions\<v>\installation` (fnm's
86
+ layout, without fnm or bash). pnpm runs as `node.exe …\node_modules\pnpm\bin\pnpm.mjs`: Node refuses to
87
+ `execFile` a `.cmd` shim without a shell. A Node already on PATH is not reused.
88
+ - **Scripts** run with pnpm's shell emulator (`--config.shell-emulator=true`), so the template's POSIX
89
+ scripts (`--port ${PORT:-3000}`) work the same as on macOS.
90
+ - **Processes** start hidden (`windowsHide`); stopping a preview uses `taskkill /T /F` (no process groups).
91
+ - **System binaries** (`tar.exe`, `taskkill.exe`, `rundll32.exe`) are called by absolute path under
92
+ `%SystemRoot%\System32`, so Git for Windows' GNU tar on PATH never wins.
93
+ - **The design skill link** at the root is a junction (absolute target) because symlinks need admin.
94
+ - **Credentials** go to `%USERPROFILE%\.sindri\credentials.json`; the user profile's ACL protects it (the
95
+ `0600` mode is a no-op on Windows).
96
+
97
+ `test/smoke.test.ts` exercises all of that on a real machine (it downloads Node), only with
98
+ `SINDRI_SMOKE=1`; CI runs it on Windows, Linux and macOS.
80
99
 
81
100
  ## Development
82
101