@tailglow/cli 0.8.1 → 0.9.4
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 +6 -7
- package/package.json +2 -2
- package/src/commands.generated.js +21 -4
- package/src/config.js +8 -1
- package/src/docs.generated.js +9 -9
- package/src/import-command.js +2 -13
- package/src/import-options.js +0 -1
- package/src/import-worker.generated.js +23 -41
- package/src/import.generated.d.ts +0 -5
- package/src/import.generated.js +60 -86
- package/src/index.js +14 -0
- package/src/request.js +12 -4
- package/src/update-check.js +137 -0
package/README.md
CHANGED
|
@@ -10,7 +10,9 @@ tglow login
|
|
|
10
10
|
tglow projects list
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Node 22 or newer. `bun add -g` and `pnpm add -g` work the same way.
|
|
13
|
+
Node 22 or newer. `bun add -g` and `pnpm add -g` work the same way. Update with
|
|
14
|
+
`npm install -g @tailglow/cli@latest`. When a newer version is out, `tglow` says so in one line on
|
|
15
|
+
stderr; it asks npm at most once a day.
|
|
14
16
|
|
|
15
17
|
Prefer a shorter name? Alias it rather than installing over one:
|
|
16
18
|
|
|
@@ -151,7 +153,7 @@ Scan and validate locally without credentials:
|
|
|
151
153
|
```bash
|
|
152
154
|
tglow import scan export.xml
|
|
153
155
|
tglow import scan export.xml --record-path /HealthData/Record --full
|
|
154
|
-
tglow import validate events.jsonl
|
|
156
|
+
tglow import validate events.jsonl
|
|
155
157
|
```
|
|
156
158
|
|
|
157
159
|
Content detection supports XML, JSONL, JSON, CSV and TSV; use `--format` to resolve ambiguity.
|
|
@@ -194,11 +196,8 @@ graceful Ctrl-C. A cleanup failure is reported separately as `cleanup_error` and
|
|
|
194
196
|
not change delivery status or acknowledged counts. Changes to the original after copying do not change the uploaded bytes. A failed
|
|
195
197
|
full check sends no rows; successful checking cannot prevent a later delivery failure.
|
|
196
198
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
values fail validation. Selected dates must be between 1970-01-01 UTC and the current time, since earlier or future ingest timestamps cannot be preserved by the server. No timestamp field is selected automatically. Batches split whenever
|
|
200
|
-
the exact parsed timestamp changes, which can produce one request per row, and otherwise stay
|
|
201
|
-
within 500 rows and 1 MiB.
|
|
199
|
+
Records keep their own fields, including their dates; Tailglow records when each batch arrived.
|
|
200
|
+
Batches stay within 500 rows and 1 MiB.
|
|
202
201
|
|
|
203
202
|
Only HTTP 202 acknowledges a batch. Upload stops on rejection or uncertain delivery and never
|
|
204
203
|
retries automatically. The report includes `accepted_count` and the affected batch's inclusive
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailglow/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The Tailglow command line. Every command is generated from the Tailglow API reference, so the CLI and the documentation can never describe different APIs.",
|
|
6
6
|
"bin": {
|
|
@@ -35,6 +35,6 @@
|
|
|
35
35
|
"@clack/prompts": "^1.2.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@types/bun": "^1.3
|
|
38
|
+
"@types/bun": "^1.4.3"
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -7432,10 +7432,10 @@ export const CLI_COMMANDS = [
|
|
|
7432
7432
|
"notes": [
|
|
7433
7433
|
"Teams cannot be created with an API key. Use a signed-in user session.",
|
|
7434
7434
|
"`name` defaults to `Team` and `billing_email` defaults to the authenticated user's email address when they are omitted.",
|
|
7435
|
+
"`billing_email` cannot use the `@tailglow.io` domain.",
|
|
7435
7436
|
"The team starts on the `pro_v1` plan with a generated logo. `billing_plan`, `status`, `logo_url`, `is_mfa_required`, `billing_address`, and `max_servers_per_project` are ignored on create. Send them to the update endpoint instead.",
|
|
7436
7437
|
"There is a maximum number of teams a single user can create.",
|
|
7437
7438
|
"The authenticated user is added to the new team as its Owner.",
|
|
7438
|
-
"`billing_email` cannot use the `@tailglow.io` domain.",
|
|
7439
7439
|
"`logo_url` must be a JPEG or PNG base64 data URI of at most 5 MB."
|
|
7440
7440
|
],
|
|
7441
7441
|
"path_params": [],
|
|
@@ -7587,7 +7587,7 @@ export const CLI_COMMANDS = [
|
|
|
7587
7587
|
"Teams cannot be updated with an API key. Use a signed-in user session.",
|
|
7588
7588
|
"At least one field must be provided.",
|
|
7589
7589
|
"Only team Owners can change billing, security, or account settings. Other members can update `name` and `logo_url` only.",
|
|
7590
|
-
"`status`, `max_servers_per_project`, and `deleted_at` are managed by Tailglow and cannot be set by team members.",
|
|
7590
|
+
"`status`, `max_servers_per_project`, and `deleted_at` are managed by Tailglow and cannot be set by team members, with one exception: an Owner restores a team scheduled for deletion by sending only `deleted_at` set to null.",
|
|
7591
7591
|
"`status` requires `expected_status`, the status you loaded; the change is refused with a conflict if the team's status has changed since.",
|
|
7592
7592
|
"Changing `is_mfa_required` requires a recently verified multi-factor sign-in.",
|
|
7593
7593
|
"Moving to a plan that bills a payment method requires a valid payment method on the team.",
|
|
@@ -7761,7 +7761,7 @@ export const CLI_COMMANDS = [
|
|
|
7761
7761
|
"name": "deleted_at",
|
|
7762
7762
|
"type": "ISODateString | null",
|
|
7763
7763
|
"required": false,
|
|
7764
|
-
"description": "
|
|
7764
|
+
"description": "Set to null, as the only field, to restore a team scheduled for deletion. Only Tailglow can set a date. Optional.",
|
|
7765
7765
|
"allowed_values": [],
|
|
7766
7766
|
"deprecated": null
|
|
7767
7767
|
}
|
|
@@ -7781,7 +7781,8 @@ export const CLI_COMMANDS = [
|
|
|
7781
7781
|
"Teams cannot be deleted with an API key. Use a signed-in user session.",
|
|
7782
7782
|
"Only the team Owner can delete a team.",
|
|
7783
7783
|
"The team must be active. Contact support to delete a suspended or blocked team.",
|
|
7784
|
-
"Deletion is scheduled, not immediate. Permanent removal happens 40 days later
|
|
7784
|
+
"Deletion is scheduled, not immediate. Permanent removal happens 40 days later. The team's API keys are deleted, its ingest keys are revoked, and its servers are scaled to zero.",
|
|
7785
|
+
"Members lose access to the team at once but stay signed in to their other teams. Until permanent removal, an Owner can restore the team by updating it with `deleted_at` set to null."
|
|
7785
7786
|
],
|
|
7786
7787
|
"path_params": [
|
|
7787
7788
|
{
|
|
@@ -9254,6 +9255,9 @@ export const CLI_COMMANDS = [
|
|
|
9254
9255
|
"notes": [
|
|
9255
9256
|
"A server is a dedicated machine that receives and processes the project's data. Every project runs its own fleet.",
|
|
9256
9257
|
"A server that is still coming up is returned with a status of `provisioning`, and a server on its way out with a status of `terminating`.",
|
|
9258
|
+
"During a platform update, the server being replaced is returned with a status of `upgrading`. The `status` filter matches the status stored before the update, so it finds that server under `active`.",
|
|
9259
|
+
"A platform update also adds a temporary server that takes each server's records while that server is replaced. It is not billed and is left out of this list; `is_deploy_surge=true` lists it instead.",
|
|
9260
|
+
"`is_deploy_surge` accepts `true`, `false`, `1` or `0`.",
|
|
9257
9261
|
"`after` and `before` are mutually exclusive."
|
|
9258
9262
|
],
|
|
9259
9263
|
"path_params": [
|
|
@@ -9293,6 +9297,19 @@ export const CLI_COMMANDS = [
|
|
|
9293
9297
|
],
|
|
9294
9298
|
"deprecated": null
|
|
9295
9299
|
},
|
|
9300
|
+
{
|
|
9301
|
+
"name": "is_deploy_surge",
|
|
9302
|
+
"type": "string",
|
|
9303
|
+
"required": false,
|
|
9304
|
+
"description": "Set true to list the temporary server a platform update adds instead of the project's own servers. Optional.",
|
|
9305
|
+
"allowed_values": [
|
|
9306
|
+
"true",
|
|
9307
|
+
"false",
|
|
9308
|
+
"1",
|
|
9309
|
+
"0"
|
|
9310
|
+
],
|
|
9311
|
+
"deprecated": null
|
|
9312
|
+
},
|
|
9296
9313
|
{
|
|
9297
9314
|
"name": "limit",
|
|
9298
9315
|
"type": "number",
|
package/src/config.js
CHANGED
|
@@ -17,7 +17,14 @@ export const CLI_CONFIGS = {
|
|
|
17
17
|
DIRECTORY_MODE: 0o700,
|
|
18
18
|
LOCK_RETRY_MS: 50,
|
|
19
19
|
// The lock covers one small read and write, so waiting this long means its holder stopped.
|
|
20
|
-
LOCK_TIMEOUT_MS: 10_000
|
|
20
|
+
LOCK_TIMEOUT_MS: 10_000,
|
|
21
|
+
UPDATE_CHECK_URL: "https://registry.npmjs.org/@tailglow/cli/latest",
|
|
22
|
+
UPDATE_CHECK_PATH: join(homedir(), ".tailglow", "update-check.json"),
|
|
23
|
+
UPDATE_CHECK_INTERVAL_MS: 24 * 60 * 60 * 1_000,
|
|
24
|
+
// The check runs alongside the command, so this only delays a command that finishes sooner.
|
|
25
|
+
UPDATE_CHECK_TIMEOUT_MS: 1_500,
|
|
26
|
+
// Caps the stored check and npm's answer, which is about 2 KB.
|
|
27
|
+
UPDATE_CHECK_MAX_BYTES: 65_536
|
|
21
28
|
};
|
|
22
29
|
|
|
23
30
|
export const LOGIN_CONFIGS = {
|