@zgeoff/imp-client 0.26.2 → 0.27.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 +21 -0
- package/dist/index.d.ts +948 -0
- package/dist/index.js +13 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -188,6 +188,27 @@ if (isDefinedError(error) && error.code === 'RAM_BUDGET_EXCEEDED') {
|
|
|
188
188
|
|
|
189
189
|
A 401 means the token is wrong.
|
|
190
190
|
|
|
191
|
+
## Features
|
|
192
|
+
|
|
193
|
+
An older impd drops an input field it does not know, and the call succeeds without it. Check
|
|
194
|
+
`system.info().features` before you send a field that a later impd added:
|
|
195
|
+
|
|
196
|
+
| Field | Feature | Since |
|
|
197
|
+
| ------------------------------------- | ----------------- | ------ |
|
|
198
|
+
| `grantable` on `tokens.create` | `grantableTokens` | 0.27.0 |
|
|
199
|
+
| `rebind` on `secrets.add` (`replace`) | `secretRebind` | 0.27.0 |
|
|
200
|
+
|
|
201
|
+
```ts
|
|
202
|
+
const info = await imp.system.info();
|
|
203
|
+
|
|
204
|
+
if (info.features?.grantableTokens !== true) {
|
|
205
|
+
throw new Error('this impd makes tokens without a grantable list');
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Without the `secretRebind` feature, a `replace` that changes the hosts keeps every grant. With it,
|
|
210
|
+
it fails with `CONFLICT` and `data.reason: 'binding_changed'` unless `rebind` is set.
|
|
211
|
+
|
|
191
212
|
## Versions
|
|
192
213
|
|
|
193
214
|
The client and impd are released together with the same version. `imp.checkServer()` tells whether
|