@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.js CHANGED
@@ -174,7 +174,7 @@ function absoluteEntryPath(entryPath) {
174
174
 
175
175
  // src/bin.ts
176
176
  var argv = process.argv.slice(2);
177
- requireCurrentCliForProvision(argv).then(() => requireCoherentProvisionRuntime(argv)).then(async () => (await import("./cli-BN6WLH5O.js")).runCli()).catch((err) => {
177
+ requireCurrentCliForProvision(argv).then(() => requireCoherentProvisionRuntime(argv)).then(async () => (await import("./cli-BFGY7F6X.js")).runCli()).catch((err) => {
178
178
  console.error(redactSecrets(`odla-ai: ${err instanceof Error ? err.message : String(err)}`));
179
179
  process.exitCode = exitCodeFor(err);
180
180
  });
@@ -200,9 +200,10 @@ async function mintDeviceSession(platformUrl, credential2, doFetch) {
200
200
  });
201
201
  const body = await response2.json().catch(() => ({}));
202
202
  if (!response2.ok || typeof body.token !== "string") {
203
- const detail = body.error?.message ?? `registry returned ${response2.status}`;
203
+ const revocable = response2.status === 401 || response2.status === 403 || response2.status === 404;
204
+ const detail = body.error?.message ?? (response2.ok ? `registry returned ${response2.status} with no session token` : `registry returned ${response2.status}`);
204
205
  throw new Error(
205
- `device session failed: ${detail} (${response2.status}) \u2014 if this machine's enrollment was revoked or has expired, enroll it again in Studio`
206
+ `device session failed: ${detail} (${response2.status})` + (revocable ? " \u2014 if this machine's enrollment was revoked or has expired, enroll it again in Studio" : "")
206
207
  );
207
208
  }
208
209
  return { token: body.token, expiresAt: body.expiresAt ?? Date.now() };
@@ -15265,4 +15266,4 @@ export {
15265
15266
  isTerminalHostedSecurityStatus,
15266
15267
  runCli
15267
15268
  };
15268
- //# sourceMappingURL=chunk-DBZQIMES.js.map
15269
+ //# sourceMappingURL=chunk-4QJ5NS64.js.map