@winding-labs/zest 0.3.0 → 2.0.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.
Files changed (3) hide show
  1. package/README.md +3 -2
  2. package/bin/zest.js +18 -16
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -13,10 +13,11 @@ In a terminal it runs as a short guided setup: pick your tools (the ones found o
13
13
 
14
14
  It works on macOS, Linux and Windows (x64) and needs Node.js 18 or newer for the installer only. The CLI itself is a standalone binary in `~/.zest/bin/zest` (`%USERPROFILE%\.zest\bin\zest.exe` on Windows, added to your user PATH — open a new terminal afterwards), verified against SHA256 checksums shipped in the npm package.
15
15
 
16
- Each plugin signs in once inside its tool; the installer prints the command. Only sessions started after setup are collected.
16
+ Then it opens your browser with a sign-in code filled in: one Approve signs in every plugin it installed. Without a terminal it prints `zest login` instead, which does the same. Only sessions started after setup are collected.
17
17
 
18
18
  - `zest status` — your Zest plugins per tool: sign-in, sync, last sync and errors; `--watch` keeps it live, `--json` prints it as JSON
19
- - `zest update` — install the latest release
19
+ - `zest login` — sign in once, for the CLI and every installed plugin that is not signed in yet
20
+ - `zest update` — install the newest release
20
21
  - `zest pause` / `zest resume` — stop or restart uploads
21
22
  - `zest logout` — sign this device out, also on the Zest server; the web app, your plugins and other devices stay signed in
22
23
  - `npx @winding-labs/zest --uninstall` — stop collecting, remove the hooks, shims and the binary and sign out; the Zest plugins stay installed (it offers to turn back on any plugin the CLI replaced)
package/bin/zest.js CHANGED
@@ -34,11 +34,20 @@ import {
34
34
  writeFileSync
35
35
  } from "node:fs";
36
36
  import { homedir } from "node:os";
37
- import { dirname, join, resolve, sep, win32 } from "node:path";
37
+ import { dirname, join as join2, resolve, sep, win32 } from "node:path";
38
38
  import { pipeline } from "node:stream/promises";
39
39
  import { createGunzip } from "node:zlib";
40
+
41
+ // ../../packages/plugin-common/src/utils/processes.ts
42
+ import { join } from "node:path";
43
+ function windowsSystemBinary(...parts) {
44
+ return join(process.env.SystemRoot || "C:\\Windows", "System32", ...parts);
45
+ }
46
+ var windowsPowerShell = () => windowsSystemBinary("WindowsPowerShell", "v1.0", "powershell.exe");
47
+
48
+ // ../../packages/plugin-common/release/prefetch.ts
40
49
  function getCacheBase(namespace) {
41
- return join(homedir(), ".zest", "bin", namespace);
50
+ return join2(homedir(), ".zest", "bin", namespace);
42
51
  }
43
52
  var DOWNLOAD_TIMEOUT_MS = 5 * 60000;
44
53
  function getPlatformKey() {
@@ -84,8 +93,8 @@ function extractZipToFile(zipPath, destPath) {
84
93
  }
85
94
  async function downloadAndVerify(url, expectedSha, destDir, binName, fetchFn = fetch, userAgent = "zest-daemon") {
86
95
  mkdirSync(destDir, { recursive: true });
87
- const tempDl = join(destDir, `.download.${process.pid}`);
88
- const tempBin = join(destDir, `.bin.${process.pid}`);
96
+ const tempDl = join2(destDir, `.download.${process.pid}`);
97
+ const tempBin = join2(destDir, `.bin.${process.pid}`);
89
98
  try {
90
99
  const controller = new AbortController;
91
100
  const timer = setTimeout(() => controller.abort(), DOWNLOAD_TIMEOUT_MS);
@@ -116,7 +125,7 @@ async function downloadAndVerify(url, expectedSha, destDir, binName, fetchFn = f
116
125
  rmSync(tempBin, { force: true });
117
126
  throw new Error(`SHA256 mismatch: expected ${expectedSha}, got ${actual}`);
118
127
  }
119
- const finalPath = join(destDir, binName);
128
+ const finalPath = join2(destDir, binName);
120
129
  renameSync(tempBin, finalPath);
121
130
  chmodSync(finalPath, 493);
122
131
  } catch (err) {
@@ -135,8 +144,8 @@ function gc(cacheBase, pinnedVersion, prefetchedVersion, currentVersion, logFn)
135
144
  continue;
136
145
  if (keep.has(entry.name))
137
146
  continue;
138
- const versionDir = join(cacheBase, entry.name);
139
- if (existsSync(join(versionDir, ".download-lock")))
147
+ const versionDir = join2(cacheBase, entry.name);
148
+ if (existsSync(join2(versionDir, ".download-lock")))
140
149
  continue;
141
150
  rmSync(versionDir, { recursive: true, force: true });
142
151
  }
@@ -145,13 +154,6 @@ function gc(cacheBase, pinnedVersion, prefetchedVersion, currentVersion, logFn)
145
154
  }
146
155
  }
147
156
 
148
- // ../../packages/plugin-common/src/utils/processes.ts
149
- import { join as join2 } from "node:path";
150
- function windowsSystemBinary(...parts) {
151
- return join2(process.env.SystemRoot || "C:\\Windows", "System32", ...parts);
152
- }
153
- var windowsPowerShell = () => windowsSystemBinary("WindowsPowerShell", "v1.0", "powershell.exe");
154
-
155
157
  // ../../packages/plugin-common/src/utils/spawn-hidden.ts
156
158
  var HIDDEN_LAUNCHER_FILENAME = "launch-hidden.vbs";
157
159
  var HIDDEN_LAUNCHER_VBS = [
@@ -198,8 +200,8 @@ var addToUserPath = (dir, first = false) => editUserPath(dir, true, first);
198
200
 
199
201
  // src/bootstrap.ts
200
202
  var REPO = "Winding-Labs/zest-cli";
201
- var VERSION = "0.3.0";
202
- var ASSETS = JSON.parse('{"darwin-arm64":{"file":"zest-darwin-arm64.gz","sha256":"69ad1570df038f75032e4f1b5cdaf3036f54c6c1d591a0bbc0ed8f0775f3ead5"},"darwin-x64":{"file":"zest-darwin-x64.gz","sha256":"cf912c47ee278f2b055b57e51eefc16b8b38061fc8d893cc72a681e6f078b4cb"},"linux-arm64":{"file":"zest-linux-arm64.gz","sha256":"6416a959fe372e422628c9578334f1f8de85c343930a60df1f4debbdf17f47a4"},"linux-x64":{"file":"zest-linux-x64.gz","sha256":"13aba0a5ad64475c725590eaa1050035b3dfd4eade15c823a116d860b5df2db4"},"win-x64":{"file":"zest-win-x64.exe.zip","sha256":"851f887fb976a07ed1d652b6147641d546731c23ee013f82bd49613625a8bbc3"}}');
203
+ var VERSION = "2.0.0";
204
+ var ASSETS = JSON.parse('{"darwin-arm64":{"file":"zest-darwin-arm64.gz","sha256":"bcd4624180a179be0bcf3d430914045d9373c5168f7d4d252a37bf33d58bfe85"},"darwin-x64":{"file":"zest-darwin-x64.gz","sha256":"78b794050e19ab02edb441d1b9ba8df7c94cef52aacd6fc499fc88574a91b972"},"linux-arm64":{"file":"zest-linux-arm64.gz","sha256":"323746cf595fcee652c294a2ade2a1cf620090fd24b3757c8ecd787926d2b9e7"},"linux-x64":{"file":"zest-linux-x64.gz","sha256":"f323d11854f6f7b2b3dd49a60ede50b353a0f30916a28da0c2a117315da5e1d1"},"win-x64":{"file":"zest-win-x64.exe.zip","sha256":"a40757910d26b849f1b8c5247b3831258f7989f6fa47a9810b7bb65cec8fc78d"}}');
203
205
  function linkOnPath(target) {
204
206
  const dir = join3(homedir2(), ".local", "bin");
205
207
  const link = join3(dir, "zest");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@winding-labs/zest",
3
- "version": "0.3.0",
3
+ "version": "2.0.0",
4
4
  "description": "Measure your AI coding sessions with Zest",
5
5
  "type": "module",
6
6
  "bin": {