@caplets/pi 0.3.0 → 0.4.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 +16 -8
- package/dist/index.js +55999 -19
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -40,9 +40,10 @@ By default the extension uses the local Caplets native service. To connect Pi to
|
|
|
40
40
|
especially the password:
|
|
41
41
|
|
|
42
42
|
```sh
|
|
43
|
-
export
|
|
44
|
-
export
|
|
45
|
-
export
|
|
43
|
+
export CAPLETS_MODE="remote"
|
|
44
|
+
export CAPLETS_SERVER_URL="https://caplets.example.com/caplets"
|
|
45
|
+
export CAPLETS_SERVER_USER="caplets"
|
|
46
|
+
export CAPLETS_SERVER_PASSWORD="..." # or load from your shell/secret manager
|
|
46
47
|
```
|
|
47
48
|
|
|
48
49
|
Pi currently calls extension factories with the Pi API only, so this extension reads its remote
|
|
@@ -54,10 +55,13 @@ options are supplied:
|
|
|
54
55
|
"packages": ["npm:@caplets/pi"],
|
|
55
56
|
"caplets": {
|
|
56
57
|
"mode": "remote",
|
|
57
|
-
"
|
|
58
|
-
"url": "https://caplets.example.com/
|
|
58
|
+
"server": {
|
|
59
|
+
"url": "https://caplets.example.com/caplets",
|
|
59
60
|
"user": "caplets"
|
|
60
61
|
},
|
|
62
|
+
"remote": {
|
|
63
|
+
"pollIntervalMs": 5000
|
|
64
|
+
},
|
|
61
65
|
"statusWidget": true,
|
|
62
66
|
"nerdFontIcons": true
|
|
63
67
|
}
|
|
@@ -79,13 +83,17 @@ import { createCapletsPiExtension } from "@caplets/pi";
|
|
|
79
83
|
export default createCapletsPiExtension({
|
|
80
84
|
args: {
|
|
81
85
|
mode: "remote",
|
|
82
|
-
|
|
83
|
-
url: "https://caplets.example.com/
|
|
86
|
+
server: {
|
|
87
|
+
url: "https://caplets.example.com/caplets",
|
|
84
88
|
user: "caplets",
|
|
85
89
|
},
|
|
90
|
+
remote: {
|
|
91
|
+
pollIntervalMs: 5_000,
|
|
92
|
+
},
|
|
86
93
|
},
|
|
87
94
|
});
|
|
88
95
|
```
|
|
89
96
|
|
|
90
|
-
|
|
97
|
+
The explicit config shape is `{ mode, server: { url, user }, remote: { pollIntervalMs } }`.
|
|
98
|
+
Prefer environment variables for `CAPLETS_SERVER_PASSWORD` rather than storing passwords in
|
|
91
99
|
settings files or source code.
|