snoutdata 0.21.0 → 0.22.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.
package/README.md CHANGED
@@ -96,7 +96,8 @@ snoutdata link --ref R # point this folder at an existing project
96
96
  **Auth**
97
97
 
98
98
  ```bash
99
- snoutdata login # through a browser
99
+ snoutdata login # a sign-in page: Google, GitHub or your work email
100
+ snoutdata login --provider github # straight to one provider
100
101
  snoutdata login --sso # your company's identity provider; asks for a work email
101
102
  snoutdata login --sso --domain acme.com # or name the domain and skip the question
102
103
  snoutdata login --device # print a code to type into a browser anywhere
@@ -116,6 +117,8 @@ snoutdata projects list
116
117
  snoutdata projects create --name X [--region R] [--no-wait]
117
118
  snoutdata projects pause|resume|delete [--ref R]
118
119
  snoutdata usage [--ref R] [--days 30] [--history]
120
+ snoutdata usage --tables [--limit 20] # and the largest tables
121
+ snoutdata metrics [--ref R] [--node REF] [--window hour|day|week]
119
122
  snoutdata teams
120
123
  ```
121
124
 
@@ -124,7 +127,10 @@ snoutdata teams
124
127
  ```bash
125
128
  snoutdata db url [--ref R] # a connection string
126
129
  snoutdata db psql [--ref R] [-- ...] # opens psql, no password typed
127
- snoutdata db reset-password [--ref R]
130
+ snoutdata db query "SQL" [--ref R] # run SQL, no psql needed; rows as a table
131
+ snoutdata db run FILE.sql [--ref R] # a file in one transaction, no psql needed
132
+ snoutdata db slow [--limit 10] # the statements that took the most time
133
+ snoutdata db reset-password [--grace 60] # new password, other owner login; old one works 60 min
128
134
  snoutdata db access [--ref R] # who signs in as themselves (Postgres 18)
129
135
  snoutdata db access grant EMAIL [--level full|read] # prints their connection string
130
136
  snoutdata db access revoke EMAIL|ROLE
@@ -133,12 +139,13 @@ snoutdata db push [--dir migrations] [--dry-run] # run the .sql files, once eac
133
139
  snoutdata db restore --file DUMP [--force]
134
140
  ```
135
141
 
136
- `db push` needs nothing installed: it connects to the database itself and sends each file a
137
- statement at a time, cut where `psql` would cut it. A file holding a `psql` command (`\i`, `\set`)
138
- is refused before anything runs. `db psql`, `db restore` and `gen types` use the Postgres client
139
- tools.
142
+ `db push`, `db query`, `db run` and `db slow` need nothing installed: they connect to the database
143
+ themselves and send SQL a statement at a time, cut where `psql` would cut it. A file holding a
144
+ `psql` command (`\i`, `\set`) is refused before anything runs. `db run`, and a `db query` with
145
+ several statements, runs them in one transaction: the first that fails rolls it all back and the
146
+ error names it. `db psql`, `db restore` and `gen types` use the Postgres client tools.
140
147
 
141
- `db psql`, `db push`, `db restore` and `gen types` verify the database's certificate
148
+ `db psql`, `db push`, `db query`, `db run`, `db restore` and `gen types` verify the database's certificate
142
149
  (`sslmode=verify-full`, against Node's trusted roots). `SNOUTDATA_DB_SSLMODE=require` turns the
143
150
  check off, for a network that re-signs Postgres traffic.
144
151