@lazco/cli 0.2.0 → 0.2.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/CHANGELOG.md CHANGED
@@ -3,6 +3,13 @@
3
3
  All releases of `@lazco/cli` are in this file.
4
4
  The newest release is at the top.
5
5
 
6
+ ## [0.2.1]
7
+
8
+ ### Fixed
9
+
10
+ - `lazco auth login` with the browser exits after it prints the sign-in.
11
+ It kept running when the browser held a spare connection open to the CLI, though the sign-in was already stored.
12
+
6
13
  ## [0.2.0]
7
14
 
8
15
  ### Added
package/README.md CHANGED
@@ -1,162 +1,292 @@
1
- # Lazco CLI
1
+ <div align="center">
2
2
 
3
- `lazco` is the command line and the local MCP server of [Lazco Cloud](https://lazco.tw).
4
- Its commands come from the API itself, so every API operation is a command as soon as the API ships it.
5
- Output is JSON by default, so scripts and agents can read it.
3
+ # lazco
6
4
 
7
- ## Install
5
+ Lazco Cloud CLI and local MCP server: manage your Lazco Cloud resources from a terminal, a script or an AI agent.
8
6
 
9
- With Node.js 22 or later, run it without installing:
7
+ [![npm](https://img.shields.io/npm/v/@lazco/cli)](https://www.npmjs.com/package/@lazco/cli) [![CI](https://github.com/Lazco-Corporation/cloud-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/Lazco-Corporation/cloud-cli/actions/workflows/ci.yml) [![Node.js](https://img.shields.io/node/v/@lazco/cli)](package.json) [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
10
8
 
11
- ```sh
12
- npx -y @lazco/cli --version
13
- ```
9
+ [Installation](#installation) · [Quick start](#quick-start) · [Sign in](#sign-in) · [Scripts](#use-it-in-a-script) · [Spending](#commands-that-spend) · [MCP](#use-it-from-an-mcp-client)
10
+
11
+ </div>
12
+
13
+ `lazco` is the command line of [Lazco Cloud](https://lazco.tw).
14
+ It runs the operations of the Lazco Cloud API, such as servers, DNS, domains, billing, Lazco Pages and Lazco Artifacts.
14
15
 
15
- Or install it globally:
16
+ ## Highlights
17
+
18
+ - **Every API operation is a command.**
19
+ `lazco` reads the API's spec when it runs, so a new API operation is a command on the day the API ships it, with no update of `lazco`.
20
+ - **Answers in JSON.**
21
+ stdout holds only the answer, and an error is one JSON line on stderr with exit code 1.
22
+ See [Use it in a script](#use-it-in-a-script).
23
+ - **No charge without a quote.**
24
+ A command that spends from your account balance shows the price from the API first, and asks you.
25
+ A retry never charges twice.
26
+ See [Commands that spend](#commands-that-spend).
27
+ - **Credentials in the OS keychain.**
28
+ Sign in in a browser, with a code on another device, or with an API token.
29
+ See [Sign in](#sign-in).
30
+ - **An MCP server for 8 AI clients.**
31
+ `lazco mcp install` adds it to Claude Code, Codex, Cursor and 5 more, with read tools only until you allow writes.
32
+ See [Use it from an MCP client](#use-it-from-an-mcp-client).
33
+ - **Publish a site or a document.**
34
+ Deploy a directory to Lazco Pages and upload only the changed files, or publish an HTML or Markdown file as a Lazco Artifact.
35
+ See [Publish a Lazco Pages site](#publish-a-lazco-pages-site).
36
+
37
+ ## Installation
38
+
39
+ With Node.js 22 or later, install `lazco` from npm:
16
40
 
17
41
  ```sh
18
42
  npm install -g @lazco/cli
19
43
  ```
20
44
 
21
- Or install the binary, which needs no Node.js, on macOS or Linux:
45
+ Check the install:
22
46
 
23
47
  ```sh
24
- curl -fsSL https://raw.githubusercontent.com/Lazco-Corporation/cloud-cli/main/scripts/install.sh | bash -s -- install
48
+ lazco --version
25
49
  ```
26
50
 
27
- The installer puts `lazco` in `~/.local/bin`, or in `$LAZCO_INSTALL_DIR`, and checks the archive against `SHA256SUMS`.
28
- Run it with `update` or `uninstall` later.
29
- Each [release](https://github.com/Lazco-Corporation/cloud-cli/releases) also has the archives for darwin-arm64, darwin-x64, linux-x64, linux-arm64 and windows-x64.
51
+ It prints the version, such as `0.2.0`.
30
52
 
31
- ## Sign in
53
+ To run `lazco` without an install, use `npx -y @lazco/cli <command>`.
32
54
 
33
- Sign in with your Lazco account:
55
+ To install the binary, which needs no Node.js, on macOS or Linux:
34
56
 
35
57
  ```sh
36
- lazco auth login --sso
58
+ curl -fsSL https://raw.githubusercontent.com/Lazco-Corporation/cloud-cli/main/scripts/install.sh \
59
+ | bash -s -- install
37
60
  ```
38
61
 
39
- Your browser opens the Lazco Cloud sign-in. Pick the organization and the access, read only or read and write, and return to the terminal.
40
- Over SSH, on Linux without a display, or with `--device`, `lazco` prints a URL and a code instead. Open the URL on any device and enter the code there, and only there.
62
+ The installer puts `lazco` in `~/.local/bin`, or in `$LAZCO_INSTALL_DIR`, and checks the archive against `SHA256SUMS`.
63
+ Run it again with `update` or `uninstall` in place of `install`.
64
+ When GitHub limits the API rate of your network, the installer fails.
65
+ Set `GH_TOKEN` to a GitHub token and run it again.
66
+
67
+ On Windows, use npm, or download the zip from a [release](https://github.com/Lazco-Corporation/cloud-cli/releases).
68
+ Each release has archives for darwin-arm64, darwin-x64, linux-x64, linux-arm64 and windows-x64.
69
+
70
+ ## Quick start
71
+
72
+ | Use | How | You get |
73
+ |---|---|---|
74
+ | In a terminal | Add `--human` to a command | A table or a list of fields |
75
+ | In a script | Run the command as it is | JSON on stdout, errors as JSON on stderr |
76
+ | From an AI agent | `lazco mcp install --client <client>` | The API operations as MCP tools |
77
+
78
+ 1. Sign in.
79
+ On a terminal, `lazco` asks which way to sign in:
80
+
81
+ ```sh
82
+ lazco auth login
83
+ ```
41
84
 
42
- | Option | Does |
85
+ 2. Check who you are signed in as:
86
+
87
+ ```sh
88
+ lazco whoami --fields organization,role
89
+ ```
90
+
91
+ ```json
92
+ {"organization":{"id":"<organization id>","name":"<organization name>"},"role":"owner"}
93
+ ```
94
+
95
+ 3. List your servers as a table:
96
+
97
+ ```sh
98
+ lazco compute list --human
99
+ ```
100
+
101
+ Find the command you need:
102
+
103
+ | Command | Prints |
43
104
  |---|---|
44
- | `--device` | Prints a URL and a code to sign in on another device, with no browser on this machine |
45
- | `--org <organization id>` | Preselects that organization |
46
- | `--read-only` | Asks for read-only access |
47
- | `--switch` | Picks the organization again, and signs out the previous sign-in of the profile. When that sign-out fails, stderr says so, and the old sign-in stays in the list until you end it there |
105
+ | `lazco --help` | The command groups, such as `compute`, `dns` and `billing` |
106
+ | `lazco compute --help` | The commands of one group |
107
+ | `lazco compute create --help` | The arguments and the flags of one command |
108
+ | `lazco --describe` | Every command, one JSON line each |
109
+ | `lazco --describe compute create` | One command and its input as JSON Schema |
48
110
 
49
- The sign-in renews itself while you use it, and ends after 30 days without use.
50
- You can see and end it in the signed-in products of the Cloud panel's settings.
111
+ ## Sign in
112
+
113
+ | Command | Signs in with |
114
+ |---|---|
115
+ | `lazco auth login --sso` | Your Lazco account, in a browser on this machine |
116
+ | `lazco auth login --device` | Your Lazco account, with a URL and a code that you open on another device |
117
+ | `lazco auth login --with-token` | An API token from stdin, which you create on the API page of the Lazco Cloud panel |
51
118
 
52
- Or sign in with an API token, which you create on the API page of the Lazco Cloud panel.
53
- Without a flag, `lazco auth login` asks on a terminal which way to sign in, and asks for the token without showing it.
54
119
  In a script, pipe the token in:
55
120
 
56
121
  ```sh
57
122
  printf '%s' "$TOKEN" | lazco auth login --with-token
58
123
  ```
59
124
 
60
- Login checks the credential and stores it in the system keychain.
61
- It prints the profile, the method, the API URL, the organization, the access and where the credential is stored:
125
+ With `--sso`, your browser opens the Lazco Cloud sign-in.
126
+ Pick the organization and the access, read only or read and write, then go back to the terminal.
127
+ Over SSH, or on Linux with no display, `--sso` prints a URL and a code, the same as `--device`.
128
+ Enter the code only on the page that the URL opens.
62
129
 
63
- ```json
64
- {"profile":"default","method":"sso","apiUrl":"https://api.lazco.tw/v1","organization":{"id":"<uuid>","name":"<name>"},"scope":"read_write","store":"keychain","current":true}
65
- ```
130
+ | Flag | Does |
131
+ |---|---|
132
+ | `--org <organization id>` | Preselects that organization |
133
+ | `--read-only` | Asks for read-only access |
134
+ | `--switch` | Picks the organization again, and signs out the previous sign-in of the profile |
66
135
 
67
- When there is no keychain, the credential goes into the config file with mode 0600, `store` is `file`, and `path` names the file.
136
+ An SSO sign-in renews itself while you use it, and ends after 30 days without use.
137
+ You can see and end it in the signed-in products of the Cloud panel's settings.
68
138
 
69
- | Command | Prints |
139
+ `lazco` stores the credential in the OS keychain.
140
+ When there is no keychain, it stores the credential in its config file with mode 0600, and says so on stderr.
141
+
142
+ | Command | Does |
70
143
  |---|---|
71
- | `lazco auth status` | `profile`, `method`, `apiUrl`, `store`, `organization`, `role`, `scope` and `expiresAt` |
72
- | `lazco auth logout` | `{"profile":"<name>","loggedOut":true}`. It ends an SSO sign-in. When it cannot reach the API, it still forgets the profile, but exits with `CLI_NETWORK`, and the sign-in stays in the list until you end it there or it is unused for 30 days. An API token stays valid until you revoke it in the panel, and stderr names the page |
73
- | `lazco profile list` | One line per profile, never its credential |
144
+ | `lazco auth status` | Prints the profile, the method, the organization, the role, the access and the expiry |
145
+ | `lazco auth logout` | Signs out and forgets the credential. An API token stays valid until you revoke it in the panel |
146
+ | `lazco profile list` | Prints one line per profile, never its credential |
74
147
  | `lazco profile use <name>` | Makes a profile the current one |
75
148
 
76
- `--profile <name>` signs in or uses another profile, for example one organization each.
77
- A profile name is 1 to 64 letters, digits, `.`, `_` or `-`, and starts with a letter or a digit.
78
- Without `--profile`, the profile is `default`.
79
- `LAZCO_TOKEN` overrides every profile, and `LAZCO_PROFILE` picks one.
149
+ A profile is one stored sign-in, for example one for each organization.
150
+ Add `--profile <name>` to any command to sign in to or use another profile.
151
+ Without it, `lazco` uses the current profile, which starts as `default`.
152
+
153
+ ## Use it in a script
80
154
 
81
- ## Use it
155
+ - stdout holds only the answer: one JSON object, or one JSON object per line for a list with pages.
156
+ - An error is one line `{"error":{"code":"...","message":"..."}}` on stderr, and the exit code is 1.
157
+ A code that starts with `CLI_` comes from `lazco`.
158
+ Any other code comes from the API.
159
+ - Every other line on stderr starts with `lazco: `, such as a warning or the progress of a task.
160
+ - A command that starts a task, such as a deploy, waits until the task ends.
161
+
162
+ | Flag | Does |
163
+ |---|---|
164
+ | `--json <payload>` | Gives the whole input as JSON. `--json -` reads it from stdin |
165
+ | `--fields <a,b>` | Keeps only these top-level fields of each record |
166
+ | `--page-all` | Follows every page of a list |
167
+ | `--dry-run` | Checks the input and prints the request, and sends nothing |
168
+ | `--yes` | Confirms a command that deletes or spends, with no question |
169
+ | `--no-wait` | Prints the accepted task at once, and does not wait for it |
170
+ | `--timeout <seconds>` | Sets how long to wait for a task. The default is 600 |
171
+ | `--human` | Prints readable text instead of JSON |
172
+
173
+ | Environment variable | Does |
174
+ |---|---|
175
+ | `LAZCO_TOKEN` | Uses this API token, and ignores every profile |
176
+ | `LAZCO_PROFILE` | Picks the profile |
177
+ | `NO_COLOR` | Turns off the color of `--human` |
178
+
179
+ For example, check a new server's input before you send it:
82
180
 
83
181
  ```sh
84
- lazco compute list
85
- lazco compute get <server-id>
86
- lazco --describe compute create # the command and its input as JSON Schema
87
- lazco compute create --json - < server.json --dry-run
182
+ lazco compute create --json - --dry-run < server.json
88
183
  ```
89
184
 
90
- `lazco --help` lists the command groups, and `lazco --describe` lists every command.
91
-
92
- - stdout holds the answer only: one JSON object, or one JSON object per line for a list.
93
- - An error is one line `{"error":{"code":"...","message":"...",...}}` on stderr, and the exit code is 1. A code starting with `CLI_` comes from `lazco`, and any other code from the API.
94
- - Every other line on stderr starts with `lazco: `, such as a warning or the flag that gets the next page.
95
- - `--human` prints a table instead. `NO_COLOR` turns its color off.
96
- - `--page-all` follows every page of a list.
97
- - A command that deletes or spends asks first on a terminal. `--yes` confirms without asking, and a command that needs the resource's name still needs it in its field.
98
- - A command that spends asks the API for a quote first, and shows it on stderr: the amount it takes from the account balance, each line, the period, the recurring charge, and when the quote expires.
99
- It then asks, or needs `--yes`, and spends exactly the quoted amount.
100
- Without a yes it exits 1 with `CLI_CONFIRM_REQUIRED`, and the error's `details.quote` holds the quote.
101
- - `--dry-run` of a command that spends asks for its quote, which charges nothing, and prints the request it would send with the quote in `body` and in `quote`.
102
- `--quote-id <id>` with `--expected-amount <amount>` spends with a quote you already have, such as the one of a dry run, and asks for no new one.
103
- A quote is good for 10 minutes and for one spend.
104
- When the API refuses a quote, `lazco` never asks for a new one by itself, because that is a price nobody saw.
105
- - A command that spends sends an `Idempotency-Key`, so a retry after a lost answer never charges twice.
106
- `--idempotency-key <key>` chooses the key: run the same command again with the same key, within 24 hours, to get the first result instead of a second charge.
107
- - A task such as a deploy is waited for. `--no-wait` prints the accepted task at once.
108
-
109
- ### Publish a Lazco Pages site
185
+ A command that deletes asks first on a terminal.
186
+ Some delete commands also need a confirm field, such as `--confirm` of `lazco compute delete`, and `--yes` does not replace it.
187
+
188
+ ## Commands that spend
189
+
190
+ A command that spends from your account balance, such as `lazco compute create`, follows these steps:
191
+
192
+ 1. It asks the API for a quote, which charges nothing.
193
+ 2. It shows the quote on stderr: the amount, each line, the period, the recurring charge and when the quote expires.
194
+ 3. It asks you, or needs `--yes`.
195
+ Without a yes, it exits with `CLI_CONFIRM_REQUIRED`, and `details.quote` of the error holds the quote.
196
+ 4. It spends exactly the quoted amount.
197
+
198
+ `--dry-run` gets the quote and prints the request that it would send, with the quote in `quote`.
199
+ To spend with a quote that you already have, add `--quote-id <id>` and `--expected-amount <amount>`.
200
+ A quote is good for 10 minutes and for one spend.
201
+ When the API refuses a quote, `lazco` does not get a new one by itself, because nobody saw that price.
202
+
203
+ Each spend sends an idempotency key, so a retry after a lost answer never charges twice.
204
+ To pick the key, add `--idempotency-key <key>`.
205
+ Run the same command with the same key within 24 hours to get the first result, not a second charge.
206
+
207
+ ## Publish a Lazco Pages site
110
208
 
111
209
  ```sh
112
210
  lazco labs pages deployments create <site-id> ./dist
113
- lazco labs pages deployments create <site-id> ./dist --dry-run
114
211
  ```
115
212
 
116
- The directory is the site's root, and every file in it becomes public.
117
- Paths with a segment that starts with a dot, `__MACOSX` and `node_modules` are skipped, so a `.env` next to a build is never published.
118
- A link, a zip archive or a single file is refused: unpack an archive first.
119
- The command checks the API's limits before it sends anything, uploads only the files that changed since the live deploy, and waits until the deployment is live, for 600 seconds or `--timeout`.
120
- A failed or interrupted upload cancels the deployment, so the next deploy can start at once.
121
- `--dry-run` reads the limits and the site, and prints the manifest it would send.
213
+ The directory becomes the root of the site, and every file in it becomes public.
214
+ `lazco` skips each path with a segment that starts with a dot, `__MACOSX` or `node_modules`, so a `.env` next to your build is never published.
215
+ It refuses a link, a zip archive or a single file.
216
+ Unpack an archive first.
217
+
218
+ The command checks the limits of the API before it sends anything.
219
+ It uploads only the files that changed since the live deploy, and waits until the new deploy is live.
220
+ A failed or stopped upload cancels the deploy, so the next deploy can start at once.
221
+ Add `--dry-run` to print the file list that it would send.
122
222
 
123
- ### Publish a Lazco Artifact
223
+ ## Publish a Lazco Artifact
224
+
225
+ A Lazco Artifact is a document or a web page with a permanent link.
124
226
 
125
227
  ```sh
126
228
  lazco labs artifacts publish ./report.md --region <region> --title "<title>"
127
- lazco labs artifacts publish ./report --region <region> --title "<title>"
128
- lazco labs artifacts update <artifact-id> ./report
229
+ lazco labs artifacts update <artifact-id> ./report.md
129
230
  ```
130
231
 
131
- The path is one HTML or Markdown file, or a directory with one entry file and the images, CSS and fonts it uses.
132
- Anyone with the link the answer holds in `url` can open it.
133
- In a directory, every file or directory whose name starts with a dot is skipped, so a `.env` is never published.
134
- The command refuses a file type a publish may not hold, more than 100 files and more than 5 MiB before it sends anything.
135
- The answer's `warnings` lists what the page loads from outside, misses or runs, which will not work.
136
- An update reads the current version first and sends it as `If-Match`, unless `--if-match` gives it, so a change made since then fails instead of being overwritten.
232
+ The path is one HTML or Markdown file, or a directory with one entry file and the images, CSS and fonts that it uses.
233
+ Anyone with the link in `url` of the answer can open it.
234
+ In a directory, `lazco` skips each file or directory whose name starts with a dot.
235
+
236
+ `lazco` refuses a file type that an artifact cannot hold, more than 100 files, or more than 5 MiB, before it sends anything.
237
+ `warnings` in the answer lists what the page loads from outside, misses or runs, because those parts will not work.
238
+
239
+ An update fails when someone changed the artifact after `lazco` read it, so it never overwrites that change.
240
+ `lazco labs artifacts delete <artifact-id>` stops the link at once.
137
241
 
138
242
  ## Use it from an MCP client
139
243
 
140
- `lazco mcp` is a local MCP server with the same sign-in, and it renews an SSO sign-in as it runs.
141
- Add it to a client with:
244
+ `lazco mcp` is a local MCP server that uses the same sign-in as the commands.
245
+ Add it to your client:
142
246
 
143
247
  ```sh
144
248
  lazco mcp install --client <client>
145
249
  ```
146
250
 
147
251
  `<client>` is one of `claude-code`, `claude-desktop`, `codex`, `cursor`, `devin`, `gemini`, `pi` or `vscode`.
252
+ Add `--dry-run` to see the entry without writing it.
148
253
  The entry holds the command only, never a credential.
149
- `--profile <name>`, `--allow-writes` and `--allow-spend` go into the entry, and `--dry-run` shows the entry without writing it.
150
254
 
151
- Without `--allow-writes` the server offers read tools only.
152
- With it, the server adds the tools that change things, and the deleting ones that need the resource's name.
153
- With `--allow-spend` too, it adds the tools that spend from the account balance, each with its quote tool.
154
- A spend tool needs a quote from its quote tool, and its description tells the model to show the quote and get your yes first.
155
- When the client can ask you itself (MCP elicitation), the server shows you the quote from the API and spends only after you accept.
156
- A read-only token gets read tools only.
255
+ | Flag | The server offers |
256
+ |---|---|
257
+ | None | Read tools only |
258
+ | `--allow-writes` | Also the tools that change things, and the delete tools that need the resource's name |
259
+ | `--allow-spend` | With `--allow-writes`, also the tools that spend from the account balance, each with its quote tool |
260
+
261
+ A spend tool needs a quote from its quote tool.
262
+ Its description tells the model to show you the quote and get your yes first.
263
+ When the client can ask you itself (MCP elicitation), the server shows you the quote and spends only after you accept.
264
+ A read-only sign-in gets read tools only.
265
+ `--profile <name>` picks the profile that the server uses.
266
+
267
+ For a desktop client, install `lazco` globally first, so the entry names its full path.
268
+
269
+ ## Limitations
270
+
271
+ - **Commands follow your organization.**
272
+ `--help` and `--describe` hide the commands of a product that your organization has not turned on.
273
+ - **It needs the API to start.**
274
+ `lazco` reads the spec from the API and keeps a copy for 10 minutes.
275
+ With no network and no copy, the API commands do not run.
276
+ - **`--human` is for people.**
277
+ Its columns follow the API's answer.
278
+ Parse the JSON in a script.
279
+
280
+ ## Contributing
281
+
282
+ Report a bug or ask for a feature in [GitHub issues](https://github.com/Lazco-Corporation/cloud-cli/issues).
283
+ For a question about your account or a bill, write to `support@lazco.tw`.
284
+ Report a vulnerability to `security@lazco.tw`, not in an issue.
157
285
 
158
- For a desktop client, install `lazco` globally first, so the entry names it by its full path.
286
+ The changes of each release are in [CHANGELOG.md](CHANGELOG.md).
287
+ The build and test commands are in [AGENTS.md](AGENTS.md), and [docs/](docs/) explains how the code works.
159
288
 
160
289
  ## License
161
290
 
162
- MIT. The binaries carry the notices of the code compiled into them in `THIRD_PARTY_NOTICES.txt`.
291
+ [MIT](LICENSE).
292
+ Each binary carries the notices of the code compiled into it in `THIRD_PARTY_NOTICES.txt`.
package/dist/cli.js CHANGED
@@ -17,7 +17,7 @@ async function readAll(stream) {
17
17
  // package.json
18
18
  var package_default = {
19
19
  name: "@lazco/cli",
20
- version: "0.2.0",
20
+ version: "0.2.1",
21
21
  description: "Lazco Cloud CLI and local MCP server",
22
22
  type: "module",
23
23
  license: "MIT",
@@ -1174,6 +1174,7 @@ async function startLoopback(hosts = LOOPBACK_HOSTS) {
1174
1174
  let settle;
1175
1175
  let received;
1176
1176
  let answered = false;
1177
+ const sockets = new Set;
1177
1178
  const server = createServer((request, response) => {
1178
1179
  const url = requestUrl(request.url);
1179
1180
  if (url === undefined || answered || request.method !== "GET" || url.pathname !== CALLBACK_PATH) {
@@ -1195,6 +1196,10 @@ async function startLoopback(hosts = LOOPBACK_HOSTS) {
1195
1196
  settle?.(received);
1196
1197
  });
1197
1198
  });
1199
+ server.on("connection", (socket) => {
1200
+ sockets.add(socket);
1201
+ socket.once("close", () => sockets.delete(socket));
1202
+ });
1198
1203
  let redirectUri;
1199
1204
  let lastError;
1200
1205
  for (const host of hosts) {
@@ -1210,15 +1215,16 @@ async function startLoopback(hosts = LOOPBACK_HOSTS) {
1210
1215
  }
1211
1216
  const close = () => {
1212
1217
  server.close();
1213
- server.closeIdleConnections();
1218
+ for (const socket of sockets) {
1219
+ socket.destroy();
1220
+ }
1214
1221
  };
1215
1222
  return {
1216
1223
  redirectUri,
1217
1224
  close,
1218
1225
  callback: (timeoutMs) => new Promise((resolve, reject) => {
1219
1226
  const timer = setTimeout(() => {
1220
- server.close();
1221
- server.closeAllConnections();
1227
+ close();
1222
1228
  reject(new CliError("CLI_TIMEOUT", `The browser sign-in did not come back within ${Math.round(timeoutMs / 60000)} minutes`));
1223
1229
  }, timeoutMs);
1224
1230
  settle = (query) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazco/cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Lazco Cloud CLI and local MCP server",
5
5
  "type": "module",
6
6
  "license": "MIT",