@ai-matrx/auth 0.3.2 → 0.3.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog — @ai-matrx/auth
2
2
 
3
+ ## 0.3.3
4
+
5
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
6
+ `git diff npm/auth/v0.3.2..npm/auth/v0.3.3 -- apps/shared/auth`).
7
+ No source changes intended and no consumer action required.
8
+
3
9
  ## 0.3.2
4
10
  - `clearStaleHeld`: the held choice is read at the START of the read (before the memberships), so a choice made while the read is in
5
11
  flight is never cleared by it. Test: `active-organization.test.ts` (racing choice).
@@ -468,6 +468,7 @@ async function resolveOrganizationWithLink(input) {
468
468
 
469
469
  // src/active-organization.ts
470
470
  var NoActiveOrganizationError = class extends Error {
471
+ reason;
471
472
  constructor(reason, detail) {
472
473
  super(
473
474
  reason === "signed-out" ? "No organization: nobody is signed in." : reason === "no-memberships" ? "No organization: this account is not an active member of any organization." : `No organization: your organizations could not be checked${detail ? ` (${detail})` : ""}.`
@@ -475,15 +476,14 @@ var NoActiveOrganizationError = class extends Error {
475
476
  this.reason = reason;
476
477
  this.name = "NoActiveOrganizationError";
477
478
  }
478
- reason;
479
479
  };
480
480
  var NotAMemberError = class extends Error {
481
+ organizationId;
481
482
  constructor(organizationId) {
482
483
  super(`You are not an active member of organization ${organizationId}.`);
483
484
  this.organizationId = organizationId;
484
485
  this.name = "NotAMemberError";
485
486
  }
486
- organizationId;
487
487
  };
488
488
  var HELD_KEY = "ai-matrx.auth.active-organization";
489
489
  function storageHeldOrganization(storage, key = HELD_KEY) {
@@ -388,6 +388,7 @@ async function resolveOrganizationWithLink(input) {
388
388
 
389
389
  // src/active-organization.ts
390
390
  var NoActiveOrganizationError = class extends Error {
391
+ reason;
391
392
  constructor(reason, detail) {
392
393
  super(
393
394
  reason === "signed-out" ? "No organization: nobody is signed in." : reason === "no-memberships" ? "No organization: this account is not an active member of any organization." : `No organization: your organizations could not be checked${detail ? ` (${detail})` : ""}.`
@@ -395,15 +396,14 @@ var NoActiveOrganizationError = class extends Error {
395
396
  this.reason = reason;
396
397
  this.name = "NoActiveOrganizationError";
397
398
  }
398
- reason;
399
399
  };
400
400
  var NotAMemberError = class extends Error {
401
+ organizationId;
401
402
  constructor(organizationId) {
402
403
  super(`You are not an active member of organization ${organizationId}.`);
403
404
  this.organizationId = organizationId;
404
405
  this.name = "NotAMemberError";
405
406
  }
406
- organizationId;
407
407
  };
408
408
  var HELD_KEY = "ai-matrx.auth.active-organization";
409
409
  function storageHeldOrganization(storage, key = HELD_KEY) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/auth",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "AI Matrx sign-in, session and organizations for every app: sign in/out, session storage and refresh per platform (browser, Next.js, extension, desktop, Node), the current person, their organizations and favourites, the one active organization (held requests, never a list filter), and the credentials @ai-matrx/data and @ai-matrx/api read.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -211,5 +211,5 @@
211
211
  "test": "vitest run",
212
212
  "verify:tarball": "node ./scripts/verify-tarball.mjs"
213
213
  },
214
- "gitHead": "914209baa874d2bf03ffda7b2069c87b2c0b66e1"
214
+ "gitHead": "74ed4eaab1a7c0a791b80979812f1dad0973d4a8"
215
215
  }