@fairmint/captable-ai 0.1.19 → 0.1.20

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -21229,9 +21229,13 @@ async function runOnboardingSetup(args) {
21229
21229
  EXIT.SERVER_ERROR
21230
21230
  );
21231
21231
  }
21232
- if (result.data.session.action === ONBOARDING_SESSION_ACTIONS.REFRESH) {
21233
- const refreshed = await refreshSession();
21234
- const withPortals = await refreshPortalsIfStale(refreshed, true);
21232
+ const { action } = result.data.session;
21233
+ if (action === ONBOARDING_SESSION_ACTIONS.REFRESH || action === ONBOARDING_SESSION_ACTIONS.NONE) {
21234
+ const current = action === ONBOARDING_SESSION_ACTIONS.REFRESH ? await refreshSession() : await readCredentials();
21235
+ if (!current) {
21236
+ exitWithError("Not logged in. Run: captable-ai login", "AUTH_REQUIRED", void 0, EXIT.AUTH);
21237
+ }
21238
+ const withPortals = await refreshPortalsIfStale(current, true);
21235
21239
  const portal = withPortals.portals.find(({ id }) => id === result.data.portalId);
21236
21240
  if (!portal) {
21237
21241
  exitWithError(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fairmint/captable-ai",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "description": "Agent-native CLI for Captable AI — manage companies, upload documents, run OCF extraction, and commit cap tables from the terminal.",
5
5
  "keywords": [
6
6
  "captable",