@ai-matrx/auth 0.1.0 → 0.1.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/CHANGELOG.md +7 -0
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -8
- package/dist/organizations.cjs +6 -6
- package/dist/organizations.d.cts +1 -1
- package/dist/organizations.d.ts +1 -1
- package/dist/organizations.js +6 -6
- package/dist/react.cjs +6 -6
- package/dist/react.js +6 -6
- package/dist/{session-4rdIyV28.d.cts → session-DhRO4euL.d.cts} +3 -3
- package/dist/{session-4rdIyV28.d.ts → session-DhRO4euL.d.ts} +3 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/auth
|
|
2
2
|
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/auth/v0.1.0..npm/auth/v0.1.1 -- apps/shared/auth`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
3
9
|
## 0.1.0 — 2026-10-09
|
|
4
10
|
|
|
5
11
|
First release. Approved by Arman 2026-10-09 ("auth: sign-in, session, organizations").
|
|
@@ -23,3 +29,4 @@ First release. Approved by Arman 2026-10-09 ("auth: sign-in, session, organizati
|
|
|
23
29
|
|
|
24
30
|
None. Every moved name keeps its old path (`@ai-matrx/data/*`, `@ai-matrx/api/credentials`
|
|
25
31
|
re-export from here). New code imports `@ai-matrx/auth`.
|
|
32
|
+
|
package/dist/index.cjs
CHANGED
|
@@ -43,16 +43,16 @@ module.exports = __toCommonJS(src_exports);
|
|
|
43
43
|
|
|
44
44
|
// src/session.ts
|
|
45
45
|
var SignInError = class extends Error {
|
|
46
|
+
door;
|
|
47
|
+
status;
|
|
48
|
+
code;
|
|
46
49
|
constructor(door, message, status, code) {
|
|
47
50
|
super(`${door}: ${message}`);
|
|
48
|
-
this.door = door;
|
|
49
|
-
this.status = status;
|
|
50
|
-
this.code = code;
|
|
51
51
|
this.name = "SignInError";
|
|
52
|
+
this.door = door;
|
|
53
|
+
if (status !== void 0) this.status = status;
|
|
54
|
+
if (code !== void 0) this.code = code;
|
|
52
55
|
}
|
|
53
|
-
door;
|
|
54
|
-
status;
|
|
55
|
-
code;
|
|
56
56
|
};
|
|
57
57
|
function check(door, data, error) {
|
|
58
58
|
if (error) throw new SignInError(door, error.message, error.status, error.code);
|
|
@@ -115,12 +115,12 @@ async function refreshSession(client) {
|
|
|
115
115
|
|
|
116
116
|
// src/storage.ts
|
|
117
117
|
var StorageUnavailableError = class extends Error {
|
|
118
|
+
storage;
|
|
118
119
|
constructor(storage, reason) {
|
|
119
120
|
super(`${storage} session storage is not available here: ${reason}`);
|
|
120
|
-
this.storage = storage;
|
|
121
121
|
this.name = "StorageUnavailableError";
|
|
122
|
+
this.storage = storage;
|
|
122
123
|
}
|
|
123
|
-
storage;
|
|
124
124
|
};
|
|
125
125
|
function memoryStorage() {
|
|
126
126
|
const items = /* @__PURE__ */ new Map();
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AuthClient, S as SessionSourceLike, a as SignInError, U as UserCredentialsPort, g as getPerson, b as getSession, o as onSessionChange, r as refreshSession, s as sessionCredentials, c as signInWithOAuth, d as signInWithPassword, e as signOut, u as updatePerson, f as userCredentials } from './session-
|
|
1
|
+
export { A as AuthClient, S as SessionSourceLike, a as SignInError, U as UserCredentialsPort, g as getPerson, b as getSession, o as onSessionChange, r as refreshSession, s as sessionCredentials, c as signInWithOAuth, d as signInWithPassword, e as signOut, u as updatePerson, f as userCredentials } from './session-DhRO4euL.cjs';
|
|
2
2
|
import { SupabaseClient } from '@supabase/supabase-js';
|
|
3
3
|
export { AuthChangeEvent, Session, User, UserAttributes } from '@supabase/supabase-js';
|
|
4
4
|
export { CredentialsPort, MatrxCredential, MatrxCredentialKind } from './credentials.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AuthClient, S as SessionSourceLike, a as SignInError, U as UserCredentialsPort, g as getPerson, b as getSession, o as onSessionChange, r as refreshSession, s as sessionCredentials, c as signInWithOAuth, d as signInWithPassword, e as signOut, u as updatePerson, f as userCredentials } from './session-
|
|
1
|
+
export { A as AuthClient, S as SessionSourceLike, a as SignInError, U as UserCredentialsPort, g as getPerson, b as getSession, o as onSessionChange, r as refreshSession, s as sessionCredentials, c as signInWithOAuth, d as signInWithPassword, e as signOut, u as updatePerson, f as userCredentials } from './session-DhRO4euL.js';
|
|
2
2
|
import { SupabaseClient } from '@supabase/supabase-js';
|
|
3
3
|
export { AuthChangeEvent, Session, User, UserAttributes } from '@supabase/supabase-js';
|
|
4
4
|
export { CredentialsPort, MatrxCredential, MatrxCredentialKind } from './credentials.js';
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// src/session.ts
|
|
2
2
|
var SignInError = class extends Error {
|
|
3
|
+
door;
|
|
4
|
+
status;
|
|
5
|
+
code;
|
|
3
6
|
constructor(door, message, status, code) {
|
|
4
7
|
super(`${door}: ${message}`);
|
|
5
|
-
this.door = door;
|
|
6
|
-
this.status = status;
|
|
7
|
-
this.code = code;
|
|
8
8
|
this.name = "SignInError";
|
|
9
|
+
this.door = door;
|
|
10
|
+
if (status !== void 0) this.status = status;
|
|
11
|
+
if (code !== void 0) this.code = code;
|
|
9
12
|
}
|
|
10
|
-
door;
|
|
11
|
-
status;
|
|
12
|
-
code;
|
|
13
13
|
};
|
|
14
14
|
function check(door, data, error) {
|
|
15
15
|
if (error) throw new SignInError(door, error.message, error.status, error.code);
|
|
@@ -72,12 +72,12 @@ async function refreshSession(client) {
|
|
|
72
72
|
|
|
73
73
|
// src/storage.ts
|
|
74
74
|
var StorageUnavailableError = class extends Error {
|
|
75
|
+
storage;
|
|
75
76
|
constructor(storage, reason) {
|
|
76
77
|
super(`${storage} session storage is not available here: ${reason}`);
|
|
77
|
-
this.storage = storage;
|
|
78
78
|
this.name = "StorageUnavailableError";
|
|
79
|
+
this.storage = storage;
|
|
79
80
|
}
|
|
80
|
-
storage;
|
|
81
81
|
};
|
|
82
82
|
function memoryStorage() {
|
|
83
83
|
const items = /* @__PURE__ */ new Map();
|
package/dist/organizations.cjs
CHANGED
|
@@ -167,16 +167,16 @@ function classifyOrganizationRefusal(status, body) {
|
|
|
167
167
|
|
|
168
168
|
// src/session.ts
|
|
169
169
|
var SignInError = class extends Error {
|
|
170
|
+
door;
|
|
171
|
+
status;
|
|
172
|
+
code;
|
|
170
173
|
constructor(door, message, status, code) {
|
|
171
174
|
super(`${door}: ${message}`);
|
|
172
|
-
this.door = door;
|
|
173
|
-
this.status = status;
|
|
174
|
-
this.code = code;
|
|
175
175
|
this.name = "SignInError";
|
|
176
|
+
this.door = door;
|
|
177
|
+
if (status !== void 0) this.status = status;
|
|
178
|
+
if (code !== void 0) this.code = code;
|
|
176
179
|
}
|
|
177
|
-
door;
|
|
178
|
-
status;
|
|
179
|
-
code;
|
|
180
180
|
};
|
|
181
181
|
function check(door, data, error) {
|
|
182
182
|
if (error) throw new SignInError(door, error.message, error.status, error.code);
|
package/dist/organizations.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SupabaseClient } from '@supabase/supabase-js';
|
|
2
|
-
import { A as AuthClient } from './session-
|
|
2
|
+
import { A as AuthClient } from './session-DhRO4euL.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @ai-matrx/auth/organizations (moved from @ai-matrx/data/organizations, 2026-10-09) — THE active-organization ladder and the account's organization
|
package/dist/organizations.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SupabaseClient } from '@supabase/supabase-js';
|
|
2
|
-
import { A as AuthClient } from './session-
|
|
2
|
+
import { A as AuthClient } from './session-DhRO4euL.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @ai-matrx/auth/organizations (moved from @ai-matrx/data/organizations, 2026-10-09) — THE active-organization ladder and the account's organization
|
package/dist/organizations.js
CHANGED
|
@@ -123,16 +123,16 @@ function classifyOrganizationRefusal(status, body) {
|
|
|
123
123
|
|
|
124
124
|
// src/session.ts
|
|
125
125
|
var SignInError = class extends Error {
|
|
126
|
+
door;
|
|
127
|
+
status;
|
|
128
|
+
code;
|
|
126
129
|
constructor(door, message, status, code) {
|
|
127
130
|
super(`${door}: ${message}`);
|
|
128
|
-
this.door = door;
|
|
129
|
-
this.status = status;
|
|
130
|
-
this.code = code;
|
|
131
131
|
this.name = "SignInError";
|
|
132
|
+
this.door = door;
|
|
133
|
+
if (status !== void 0) this.status = status;
|
|
134
|
+
if (code !== void 0) this.code = code;
|
|
132
135
|
}
|
|
133
|
-
door;
|
|
134
|
-
status;
|
|
135
|
-
code;
|
|
136
136
|
};
|
|
137
137
|
function check(door, data, error) {
|
|
138
138
|
if (error) throw new SignInError(door, error.message, error.status, error.code);
|
package/dist/react.cjs
CHANGED
|
@@ -31,16 +31,16 @@ var import_react = require("react");
|
|
|
31
31
|
|
|
32
32
|
// src/session.ts
|
|
33
33
|
var SignInError = class extends Error {
|
|
34
|
+
door;
|
|
35
|
+
status;
|
|
36
|
+
code;
|
|
34
37
|
constructor(door, message, status, code) {
|
|
35
38
|
super(`${door}: ${message}`);
|
|
36
|
-
this.door = door;
|
|
37
|
-
this.status = status;
|
|
38
|
-
this.code = code;
|
|
39
39
|
this.name = "SignInError";
|
|
40
|
+
this.door = door;
|
|
41
|
+
if (status !== void 0) this.status = status;
|
|
42
|
+
if (code !== void 0) this.code = code;
|
|
40
43
|
}
|
|
41
|
-
door;
|
|
42
|
-
status;
|
|
43
|
-
code;
|
|
44
44
|
};
|
|
45
45
|
function check(door, data, error) {
|
|
46
46
|
if (error) throw new SignInError(door, error.message, error.status, error.code);
|
package/dist/react.js
CHANGED
|
@@ -6,16 +6,16 @@ import { useEffect, useRef, useState, useSyncExternalStore } from "react";
|
|
|
6
6
|
|
|
7
7
|
// src/session.ts
|
|
8
8
|
var SignInError = class extends Error {
|
|
9
|
+
door;
|
|
10
|
+
status;
|
|
11
|
+
code;
|
|
9
12
|
constructor(door, message, status, code) {
|
|
10
13
|
super(`${door}: ${message}`);
|
|
11
|
-
this.door = door;
|
|
12
|
-
this.status = status;
|
|
13
|
-
this.code = code;
|
|
14
14
|
this.name = "SignInError";
|
|
15
|
+
this.door = door;
|
|
16
|
+
if (status !== void 0) this.status = status;
|
|
17
|
+
if (code !== void 0) this.code = code;
|
|
15
18
|
}
|
|
16
|
-
door;
|
|
17
|
-
status;
|
|
18
|
-
code;
|
|
19
19
|
};
|
|
20
20
|
function check(door, data, error) {
|
|
21
21
|
if (error) throw new SignInError(door, error.message, error.status, error.code);
|
|
@@ -25,9 +25,9 @@ type AuthClient = Pick<SupabaseClient<any, any, any>, "auth">;
|
|
|
25
25
|
/** A refusal from the auth server — its own message, plus status/code when it sent them. */
|
|
26
26
|
declare class SignInError extends Error {
|
|
27
27
|
readonly door: string;
|
|
28
|
-
readonly status?: number
|
|
29
|
-
readonly code?: string
|
|
30
|
-
constructor(door: string, message: string, status?: number
|
|
28
|
+
readonly status?: number;
|
|
29
|
+
readonly code?: string;
|
|
30
|
+
constructor(door: string, message: string, status?: number, code?: string);
|
|
31
31
|
}
|
|
32
32
|
/** The stored session (no network unless a refresh is due), or null when signed out. */
|
|
33
33
|
declare function getSession(client: AuthClient): Promise<Session | null>;
|
|
@@ -25,9 +25,9 @@ type AuthClient = Pick<SupabaseClient<any, any, any>, "auth">;
|
|
|
25
25
|
/** A refusal from the auth server — its own message, plus status/code when it sent them. */
|
|
26
26
|
declare class SignInError extends Error {
|
|
27
27
|
readonly door: string;
|
|
28
|
-
readonly status?: number
|
|
29
|
-
readonly code?: string
|
|
30
|
-
constructor(door: string, message: string, status?: number
|
|
28
|
+
readonly status?: number;
|
|
29
|
+
readonly code?: string;
|
|
30
|
+
constructor(door: string, message: string, status?: number, code?: string);
|
|
31
31
|
}
|
|
32
32
|
/** The stored session (no network unless a refresh is due), or null when signed out. */
|
|
33
33
|
declare function getSession(client: AuthClient): Promise<Session | null>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/auth",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
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",
|
|
@@ -191,5 +191,5 @@
|
|
|
191
191
|
"test": "vitest run",
|
|
192
192
|
"verify:tarball": "node ./scripts/verify-tarball.mjs"
|
|
193
193
|
},
|
|
194
|
-
"gitHead": "
|
|
194
|
+
"gitHead": "5f0051127241f42fc01a8ed53b3eaf493f543126"
|
|
195
195
|
}
|