@rome-os/node-core 0.1.3 → 0.1.4

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 CHANGED
@@ -190,7 +190,9 @@ await running;
190
190
  ```
191
191
 
192
192
  `showAuthorizationUrl` and `updateApplicationState` are application callbacks.
193
- A custom credential store implements `load`, `save`, and `clear`. The built-in
193
+ A custom credential store implements `load`, `save`, and `clear`. A stored token
194
+ is either a computer credential from `loginDevice` or `loginDeviceCode`, or the
195
+ Rome desktop app's own Rome Cloud sign-in. The built-in
194
196
  login adapter uses a temporary loopback callback listener. Applications can
195
197
  supply their own authorization function returning a device session.
196
198
 
package/dist/connect.js CHANGED
@@ -15,7 +15,7 @@ export async function connectHost(options) {
15
15
  let session = isRecord(stored) &&
16
16
  stored.cloudUrl === cloudUrl &&
17
17
  typeof stored.token === "string" &&
18
- /^romedev_[A-Za-z0-9_-]{43}$/.test(stored.token) &&
18
+ /^(?:romedev|romemob)_[A-Za-z0-9_-]{43}$/.test(stored.token) &&
19
19
  validId(stored.deviceId) &&
20
20
  typeof stored.name === "string"
21
21
  ? { cloudUrl, token: stored.token, deviceId: stored.deviceId, name: stored.name }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rome-os/node-core",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "JavaScript APIs for Rome device hosts and shared caller daemons",
5
5
  "license": "MIT",
6
6
  "type": "module",