@theholocron/holocron-plugin-1password 2.0.0-alpha.0 → 2.0.0-alpha.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/README.md +36 -22
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,7 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
1Password plugin for [Holocron](../cli). Implements the **required**
|
|
4
4
|
`vault` capability via shell-out to the `op` CLI
|
|
5
|
-
(https://developer.1password.com/docs/cli).
|
|
5
|
+
(<https://developer.1password.com/docs/cli>).
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm add -D @theholocron/holocron-plugin-1password@alpha
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Requires the `op` binary on PATH (see [Prerequisite](#prerequisite) below).
|
|
6
14
|
|
|
7
15
|
## Why shell-out, not REST
|
|
8
16
|
|
|
@@ -12,7 +20,7 @@ solo / small-team workflow, that's overkill. The `op` CLI is what every
|
|
|
12
20
|
developer already has installed and uses for hand-debugging anyway, so:
|
|
13
21
|
|
|
14
22
|
- **Local dev:** developer's signed-in `op` CLI (biometric unlock via
|
|
15
|
-
|
|
23
|
+
the desktop app)
|
|
16
24
|
- **CI:** `OP_SERVICE_ACCOUNT_TOKEN` env var; `op` auto-detects it
|
|
17
25
|
- **Either way:** same binary, same commands, same code path
|
|
18
26
|
|
|
@@ -34,36 +42,42 @@ found.
|
|
|
34
42
|
|
|
35
43
|
```jsonc
|
|
36
44
|
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
45
|
+
"providers": {
|
|
46
|
+
"vault": [
|
|
47
|
+
"1password",
|
|
48
|
+
{
|
|
49
|
+
"vault": "rando", // 1P vault name
|
|
50
|
+
"account": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", // optional: 1P account UUID
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
43
54
|
}
|
|
44
55
|
```
|
|
45
56
|
|
|
46
57
|
- `vault` (required) — the 1Password vault name items live in.
|
|
47
58
|
- `account` (optional) — 1P account UUID. Passes `--account <UUID>` on
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
59
|
+
every `op` call so the integration targets a specific account even
|
|
60
|
+
when the developer has multiple signed in (e.g., work + personal).
|
|
61
|
+
Find via `op account list`.
|
|
51
62
|
|
|
52
63
|
## What's implemented
|
|
53
64
|
|
|
54
|
-
| Method
|
|
55
|
-
|
|
|
56
|
-
| `read(reference)`
|
|
57
|
-
| `write(reference, v)`
|
|
58
|
-
| `list()`
|
|
59
|
-
| `environments()`
|
|
60
|
-
| `readEnvironment(id)`
|
|
61
|
-
| `whoami()` (via doctor)| `op whoami --format=json` — tolerates the JSON-shape drift across CLI versions and auth modes. |
|
|
65
|
+
| Method | What it does |
|
|
66
|
+
| ----------------------- | ---------------------------------------------------------------------------------------------- |
|
|
67
|
+
| `read(reference)` | `op read <reference>` — resolves `op://Vault/Item/field`. `--no-newline`. |
|
|
68
|
+
| `write(reference, v)` | Probe + `op item edit` if exists, else `op item create --category=API Credential`. |
|
|
69
|
+
| `list()` | `op item list --vault=<vault> --format=json` — names of items in the vault. |
|
|
70
|
+
| `environments()` | `op environment list --format=json` — names of 1P Environments. |
|
|
71
|
+
| `readEnvironment(id)` | `op environment read <id>` — parses KEY=VALUE lines into a record. |
|
|
72
|
+
| `whoami()` (via doctor) | `op whoami --format=json` — tolerates the JSON-shape drift across CLI versions and auth modes. |
|
|
62
73
|
|
|
63
74
|
## Status
|
|
64
75
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
76
|
+
**`v2.0.0-alpha.0`** — published on npm under the `alpha` dist-tag.
|
|
77
|
+
[Release notes](https://github.com/theholocron/holocron/releases/tag/v2.0.0-alpha.0).
|
|
78
|
+
APIs may still shift before stable v2.0.0.
|
|
79
|
+
|
|
80
|
+
Implementation note: the stdio shape (`['inherit', 'pipe', 'pipe']`)
|
|
81
|
+
is critical — it gives `op` a TTY signal so it can fire the desktop
|
|
68
82
|
biometric unlock dialog when running locally. CI runs see no TTY and
|
|
69
83
|
fall back to whatever auth mode the env var configures.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/holocron-plugin-1password",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.1",
|
|
4
4
|
"description": "Holocron plugin for 1Password. Implements the vault capability via shell-out to the `op` CLI (https://developer.1password.com/docs/cli).",
|
|
5
5
|
"homepage": "https://github.com/theholocron/holocron/tree/main/packages/holocron-plugin-1password#readme",
|
|
6
6
|
"bugs": "https://github.com/theholocron/holocron/issues",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@theholocron/cli": "2.0.0-alpha.
|
|
24
|
+
"@theholocron/cli": "2.0.0-alpha.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@theholocron/tsconfig": "^4.1.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"typescript": "^5.9.3",
|
|
33
33
|
"vitest": "^3.2.6",
|
|
34
34
|
"tsdown": "^0.22.3",
|
|
35
|
-
"@theholocron/cli": "2.0.0-alpha.
|
|
35
|
+
"@theholocron/cli": "2.0.0-alpha.1"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|