@odla-ai/cli 0.36.0 → 0.36.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/dist/bin.cjs +3 -2
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-DBZQIMES.js → chunk-4QJ5NS64.js} +4 -3
- package/dist/chunk-4QJ5NS64.js.map +1 -0
- package/dist/{cli-BN6WLH5O.js → cli-BFGY7F6X.js} +2 -2
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-DBZQIMES.js.map +0 -1
- /package/dist/{cli-BN6WLH5O.js.map → cli-BFGY7F6X.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runCli
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4QJ5NS64.js";
|
|
5
5
|
import {
|
|
6
6
|
exitCodeFor
|
|
7
7
|
} from "./chunk-UKLSRQ5J.js";
|
|
@@ -9,4 +9,4 @@ export {
|
|
|
9
9
|
exitCodeFor,
|
|
10
10
|
runCli
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=cli-
|
|
12
|
+
//# sourceMappingURL=cli-BFGY7F6X.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -287,9 +287,10 @@ async function mintDeviceSession(platformUrl, credential2, doFetch) {
|
|
|
287
287
|
});
|
|
288
288
|
const body = await response2.json().catch(() => ({}));
|
|
289
289
|
if (!response2.ok || typeof body.token !== "string") {
|
|
290
|
-
const
|
|
290
|
+
const revocable = response2.status === 401 || response2.status === 403 || response2.status === 404;
|
|
291
|
+
const detail = body.error?.message ?? (response2.ok ? `registry returned ${response2.status} with no session token` : `registry returned ${response2.status}`);
|
|
291
292
|
throw new Error(
|
|
292
|
-
`device session failed: ${detail} (${response2.status}) \u2014 if this machine's enrollment was revoked or has expired, enroll it again in Studio
|
|
293
|
+
`device session failed: ${detail} (${response2.status})` + (revocable ? " \u2014 if this machine's enrollment was revoked or has expired, enroll it again in Studio" : "")
|
|
293
294
|
);
|
|
294
295
|
}
|
|
295
296
|
return { token: body.token, expiresAt: body.expiresAt ?? Date.now() };
|