openhome-cli 0.1.0 → 0.1.2
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/dist/{chunk-Q4UKUXDB.js → chunk-OAKGNZQM.js} +11 -1
- package/dist/cli.js +1116 -1005
- package/dist/{store-DR7EKQ5T.js → store-USDMWKXY.js} +7 -3
- package/package.json +1 -1
- package/src/api/client.ts +76 -25
- package/src/api/contracts.ts +21 -0
- package/src/api/endpoints.ts +1 -2
- package/src/cli.ts +11 -9
- package/src/commands/assign.ts +11 -4
- package/src/commands/delete.ts +11 -4
- package/src/commands/init.ts +14 -2
- package/src/commands/list.ts +11 -4
- package/src/commands/login.ts +1 -1
- package/src/commands/set-jwt.ts +40 -0
- package/src/commands/status.ts +4 -3
- package/src/commands/toggle.ts +11 -4
- package/src/config/store.ts +11 -1
|
@@ -152,6 +152,14 @@ function saveApiKey(key) {
|
|
|
152
152
|
saveConfig(config);
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
+
function getJwt() {
|
|
156
|
+
return getConfig().jwt ?? null;
|
|
157
|
+
}
|
|
158
|
+
function saveJwt(jwt) {
|
|
159
|
+
const config = getConfig();
|
|
160
|
+
config.jwt = jwt;
|
|
161
|
+
saveConfig(config);
|
|
162
|
+
}
|
|
155
163
|
|
|
156
164
|
export {
|
|
157
165
|
keychainDelete,
|
|
@@ -160,5 +168,7 @@ export {
|
|
|
160
168
|
getApiKey,
|
|
161
169
|
registerAbility,
|
|
162
170
|
getTrackedAbilities,
|
|
163
|
-
saveApiKey
|
|
171
|
+
saveApiKey,
|
|
172
|
+
getJwt,
|
|
173
|
+
saveJwt
|
|
164
174
|
};
|