recappi 0.1.66 → 0.1.67
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/index.js +27 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -22633,19 +22633,43 @@ async function runCli(deps = {}) {
|
|
|
22633
22633
|
renderSuccess("version", { version: CLI_VERSION }, render3);
|
|
22634
22634
|
return 0;
|
|
22635
22635
|
}
|
|
22636
|
-
|
|
22636
|
+
let auth = await resolveAuthContext({
|
|
22637
22637
|
origin: parsed.options.origin,
|
|
22638
22638
|
env: deps.env,
|
|
22639
22639
|
homeDir: deps.homeDir
|
|
22640
22640
|
});
|
|
22641
|
-
|
|
22641
|
+
let client = new RecappiApiClient(auth, {
|
|
22642
22642
|
fetchImpl: deps.fetchImpl,
|
|
22643
22643
|
sleep: deps.sleep,
|
|
22644
22644
|
env: deps.env,
|
|
22645
22645
|
homeDir: deps.homeDir
|
|
22646
22646
|
});
|
|
22647
22647
|
if (parsed.kind === "dashboard") {
|
|
22648
|
-
|
|
22648
|
+
let status = await client.authStatus();
|
|
22649
|
+
if (!status.loggedIn) {
|
|
22650
|
+
await loginWithDeviceCode({
|
|
22651
|
+
origin: auth.origin,
|
|
22652
|
+
homeDir: deps.homeDir,
|
|
22653
|
+
onPrompt: (message) => stderr(message),
|
|
22654
|
+
deps: {
|
|
22655
|
+
fetchImpl: deps.fetchImpl,
|
|
22656
|
+
openUrl: deps.openUrl,
|
|
22657
|
+
sleep: deps.sleep
|
|
22658
|
+
}
|
|
22659
|
+
});
|
|
22660
|
+
auth = await resolveAuthContext({
|
|
22661
|
+
origin: parsed.options.origin,
|
|
22662
|
+
env: deps.env,
|
|
22663
|
+
homeDir: deps.homeDir
|
|
22664
|
+
});
|
|
22665
|
+
client = new RecappiApiClient(auth, {
|
|
22666
|
+
fetchImpl: deps.fetchImpl,
|
|
22667
|
+
sleep: deps.sleep,
|
|
22668
|
+
env: deps.env,
|
|
22669
|
+
homeDir: deps.homeDir
|
|
22670
|
+
});
|
|
22671
|
+
status = await client.authStatus();
|
|
22672
|
+
}
|
|
22649
22673
|
const account = status.loggedIn && status.userId ? { backendOrigin: auth.origin, userId: status.userId } : null;
|
|
22650
22674
|
const recordingAudio = createRecordingAudioRuntime(client, {
|
|
22651
22675
|
account,
|