@diafunc/cli 0.12.0 → 0.13.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 +16 -16
- package/dist/bin/diafunc.js +3 -3
- package/dist/{chunk-4NQYIRPF.js → chunk-EJLRB75G.js} +420 -210
- package/dist/chunk-EJLRB75G.js.map +1 -0
- package/dist/{chunk-BUHZT6MT.js → chunk-GOEDVSWO.js} +3 -3
- package/dist/{chunk-BUHZT6MT.js.map → chunk-GOEDVSWO.js.map} +1 -1
- package/dist/{chunk-A4VM56MK.js → chunk-TWJWXUZL.js} +3 -3
- package/dist/chunk-TWJWXUZL.js.map +1 -0
- package/dist/src/index.js +2 -2
- package/dist/update-check-V23VUFO4.js +8 -0
- package/package.json +2 -2
- package/dist/chunk-4NQYIRPF.js.map +0 -1
- package/dist/chunk-A4VM56MK.js.map +0 -1
- package/dist/update-check-SNH7P32S.js +0 -8
- /package/dist/{update-check-SNH7P32S.js.map → update-check-V23VUFO4.js.map} +0 -0
package/README.md
CHANGED
|
@@ -22,8 +22,8 @@ Drops a single self-contained binary at `~/.local/bin/diafunc` (Linux/macOS) or
|
|
|
22
22
|
|
|
23
23
|
Environment variables:
|
|
24
24
|
|
|
25
|
-
- `DIAFUNC_CLI_VERSION
|
|
26
|
-
- `DIAFUNC_CLI_INSTALL_DIR
|
|
25
|
+
- `DIAFUNC_CLI_VERSION`: pin to a specific version (must match the latest release; older versions are available via npm only).
|
|
26
|
+
- `DIAFUNC_CLI_INSTALL_DIR`: override the install directory.
|
|
27
27
|
|
|
28
28
|
### npm (if you already have Node.js 20+)
|
|
29
29
|
|
|
@@ -42,12 +42,12 @@ diafunc update # upgrade to the latest release
|
|
|
42
42
|
diafunc uninstall # remove the binary (and optionally ~/.diafunc/)
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
`diafunc update` uses the same install path as the original install
|
|
45
|
+
`diafunc update` uses the same install path as the original install: shell installer (or PowerShell installer on Windows) in place, npm-installed CLIs are pointed at `npm install -g @diafunc/cli@latest`. On Windows the running `.exe` is renamed aside before the new one is dropped in; the old file is cleaned up the next time `diafunc` runs.
|
|
46
46
|
|
|
47
47
|
## Quick Start
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
|
-
# Log in via the browser (OIDC device-code flow
|
|
50
|
+
# Log in via the browser (OIDC device-code flow, the default)
|
|
51
51
|
diafunc auth login
|
|
52
52
|
|
|
53
53
|
# Set a default project
|
|
@@ -73,7 +73,7 @@ diafunc analyze watch
|
|
|
73
73
|
`diafunc auth login` supports three modes:
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
|
-
# OIDC device-code flow (default)
|
|
76
|
+
# OIDC device-code flow (default): prints a URL and a short user code,
|
|
77
77
|
# you approve in the browser, tokens are cached locally.
|
|
78
78
|
# Uses auth.<your-endpoint> (e.g. auth.diafunc.com for the default endpoint).
|
|
79
79
|
diafunc auth login
|
|
@@ -188,10 +188,10 @@ Nothing is asked when stdin or stdout is not a terminal, with `--output json`, o
|
|
|
188
188
|
| `diafunc schedule` | Schedule function execution and list/stop scheduled runs |
|
|
189
189
|
| `diafunc chat` | AI chat REPL (default), plus `send` / `stream` / `upload`, `usage`, and `session list/show/rename/delete` |
|
|
190
190
|
| `diafunc search` | Search entities across projects |
|
|
191
|
-
| `diafunc analyze` |
|
|
191
|
+
| `diafunc analyze` | Run an automatic analysis on a data file and follow it live (interactive when run from a terminal), plus `list`, `get`, `watch`, `open`, `runs`, `cancel`, `presets`, `triggers` (see [doc/analyze.md](./doc/analyze.md)) |
|
|
192
192
|
| `diafunc subscription` | View your current and upcoming subscription, plus available plans |
|
|
193
193
|
| `diafunc invoice` | List and download invoices |
|
|
194
|
-
| `diafunc utilization` | Show current credit utilization and
|
|
194
|
+
| `diafunc utilization` | Show current credit utilization, and with `history` what each day of the billing cycle cost |
|
|
195
195
|
| `diafunc status` | Platform health: summary, per-component status, incidents |
|
|
196
196
|
| `diafunc admin` | User management, subscription, settings, backups, index rebuild, permission inspection |
|
|
197
197
|
| `diafunc completion` | Generate shell completions |
|
|
@@ -201,10 +201,10 @@ Run `diafunc <command> --help` for detailed usage of any command.
|
|
|
201
201
|
## Shell Completions
|
|
202
202
|
|
|
203
203
|
```bash
|
|
204
|
-
# Bash
|
|
204
|
+
# Bash: add to ~/.bashrc
|
|
205
205
|
eval "$(diafunc completion bash)"
|
|
206
206
|
|
|
207
|
-
# Zsh
|
|
207
|
+
# Zsh: add to ~/.zshrc
|
|
208
208
|
eval "$(diafunc completion zsh)"
|
|
209
209
|
|
|
210
210
|
# Fish
|
|
@@ -223,7 +223,7 @@ npm run lint # TypeScript type check
|
|
|
223
223
|
|
|
224
224
|
## Releasing to npm
|
|
225
225
|
|
|
226
|
-
Publishing is fully automated via GitLab CI using [npm trusted publishing](https://docs.npmjs.com/trusted-publishers/) over OIDC
|
|
226
|
+
Publishing is fully automated via GitLab CI using [npm trusted publishing](https://docs.npmjs.com/trusted-publishers/) over OIDC, so no long-lived tokens are stored anywhere.
|
|
227
227
|
|
|
228
228
|
### One-time setup on npmjs.com
|
|
229
229
|
|
|
@@ -241,24 +241,24 @@ The first publish must be done manually (run `npm publish` locally) to create th
|
|
|
241
241
|
|
|
242
242
|
### Cutting a release
|
|
243
243
|
|
|
244
|
-
**Option A
|
|
244
|
+
**Option A, from the terminal:**
|
|
245
245
|
|
|
246
246
|
```bash
|
|
247
|
-
npm version patch # or minor / major
|
|
247
|
+
npm version patch # or minor / major; bumps package.json, commits, creates tag
|
|
248
248
|
git push origin main --follow-tags
|
|
249
249
|
```
|
|
250
250
|
|
|
251
|
-
**Option B
|
|
251
|
+
**Option B, from the GitLab UI:**
|
|
252
252
|
|
|
253
253
|
1. First bump `package.json` `version` via a small MR (or direct commit to `main`).
|
|
254
254
|
2. Go to https://gitlab.com/diafunc/cli/-/releases/new and create a new release with tag `v<version>` from `main`.
|
|
255
255
|
|
|
256
256
|
Either way, pushing a `vX.Y.Z` tag triggers two CI jobs:
|
|
257
|
-
- `publish
|
|
258
|
-
- `gitlab-release
|
|
257
|
+
- `publish`: builds and publishes to npm via OIDC trusted publishing (npm generates [provenance attestations](https://docs.npmjs.com/generating-provenance-statements) automatically)
|
|
258
|
+
- `gitlab-release`: creates a GitLab Release entry linking to the npm package
|
|
259
259
|
|
|
260
260
|
No manual steps after the tag push.
|
|
261
261
|
|
|
262
262
|
## License
|
|
263
263
|
|
|
264
|
-
Apache License 2.0
|
|
264
|
+
Apache License 2.0; see [LICENSE](./LICENSE).
|
package/dist/bin/diafunc.js
CHANGED
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
PromptCancelled,
|
|
5
5
|
createProgram,
|
|
6
6
|
handleError
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-EJLRB75G.js";
|
|
8
8
|
import {
|
|
9
9
|
getUpdateNotice
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-GOEDVSWO.js";
|
|
11
11
|
import {
|
|
12
12
|
package_default
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-TWJWXUZL.js";
|
|
14
14
|
|
|
15
15
|
// bin/diafunc.ts
|
|
16
16
|
import chalk2 from "chalk";
|