@intelligo-dev/auth 1.0.0-beta.2 → 1.0.0-beta.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/dist/helpers.js +2 -2
- package/dist/impersonation.js +1 -1
- package/dist/index.js +18 -18
- package/dist/onboarding/service.js +3 -3
- package/dist/org-api.js +1 -1
- package/dist/profile/service.js +4 -4
- package/dist/server.js +1 -1
- package/dist/team/service.js +5 -5
- package/dist/workspace/service.js +5 -5
- package/dist/workspace-init.js +1 -1
- package/package.json +3 -3
package/dist/helpers.js
CHANGED
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
15
|
import { headers } from "next/headers";
|
|
16
|
-
import { auth } from "./server";
|
|
16
|
+
import { auth } from "./server.js";
|
|
17
17
|
import { createLogger } from "@intelligo-dev/core/logger";
|
|
18
18
|
import { db } from "@intelligo-dev/core/db";
|
|
19
19
|
import { users } from "@intelligo-dev/core/db/schema";
|
|
20
20
|
import { eq } from "drizzle-orm";
|
|
21
|
-
import { PLATFORM_ADMIN_ROLE } from "./roles";
|
|
21
|
+
import { PLATFORM_ADMIN_ROLE } from "./roles.js";
|
|
22
22
|
const log = createLogger("Auth");
|
|
23
23
|
/**
|
|
24
24
|
* Get current auth session from request headers.
|
package/dist/impersonation.js
CHANGED
|
@@ -14,7 +14,7 @@ import "server-only";
|
|
|
14
14
|
* workspace role.
|
|
15
15
|
*/
|
|
16
16
|
import { headers } from "next/headers";
|
|
17
|
-
import { auth } from "./server";
|
|
17
|
+
import { auth } from "./server.js";
|
|
18
18
|
/** Default matching `impersonationSessionDuration` in server.ts. */
|
|
19
19
|
const FALLBACK_DURATION_MS = 30 * 60000;
|
|
20
20
|
/**
|
package/dist/index.js
CHANGED
|
@@ -4,27 +4,27 @@
|
|
|
4
4
|
* Server-side authentication utilities.
|
|
5
5
|
* For client-side auth, use @intelligo-dev/auth/client
|
|
6
6
|
*/
|
|
7
|
-
export { auth } from "./server";
|
|
8
|
-
export { getAuthSession, requireAuth, getWorkspaceContext, getWorkspaceContextById, requireWorkspace, requireRole, requirePlatformAdmin, } from "./helpers";
|
|
9
|
-
export { ensureUserWorkspace } from "./workspace-init";
|
|
10
|
-
export { PLATFORM_ADMIN_ROLE } from "./roles";
|
|
11
|
-
export { impersonateUser, stopImpersonating, } from "./impersonation";
|
|
7
|
+
export { auth } from "./server.js";
|
|
8
|
+
export { getAuthSession, requireAuth, getWorkspaceContext, getWorkspaceContextById, requireWorkspace, requireRole, requirePlatformAdmin, } from "./helpers.js";
|
|
9
|
+
export { ensureUserWorkspace } from "./workspace-init.js";
|
|
10
|
+
export { PLATFORM_ADMIN_ROLE } from "./roles.js";
|
|
11
|
+
export { impersonateUser, stopImpersonating, } from "./impersonation.js";
|
|
12
12
|
// Typed Better-Auth organization plugin wrapper
|
|
13
|
-
export { orgApi, } from "./org-api";
|
|
13
|
+
export { orgApi, } from "./org-api.js";
|
|
14
14
|
// Team management service (page/registry migration, section C1)
|
|
15
|
-
export { createTeamService, } from "./team/service";
|
|
16
|
-
export { TeamServiceError, isTeamServiceError, } from "./team/errors";
|
|
17
|
-
export { inviteMemberSchema, updateRoleSchema, } from "./team/schemas";
|
|
15
|
+
export { createTeamService, } from "./team/service.js";
|
|
16
|
+
export { TeamServiceError, isTeamServiceError, } from "./team/errors.js";
|
|
17
|
+
export { inviteMemberSchema, updateRoleSchema, } from "./team/schemas.js";
|
|
18
18
|
// Workspace management service (page/registry migration, workspace-settings family)
|
|
19
|
-
export { createWorkspaceService, } from "./workspace/service";
|
|
20
|
-
export { WorkspaceServiceError, isWorkspaceServiceError, } from "./workspace/errors";
|
|
21
|
-
export { createWorkspaceSchema, updateWorkspaceSchema, } from "./workspace/schemas";
|
|
19
|
+
export { createWorkspaceService, } from "./workspace/service.js";
|
|
20
|
+
export { WorkspaceServiceError, isWorkspaceServiceError, } from "./workspace/errors.js";
|
|
21
|
+
export { createWorkspaceSchema, updateWorkspaceSchema, } from "./workspace/schemas.js";
|
|
22
22
|
// Profile management service (page/registry migration, profile-settings family)
|
|
23
|
-
export { createProfileService, } from "./profile/service";
|
|
24
|
-
export { ProfileServiceError, isProfileServiceError, } from "./profile/errors";
|
|
25
|
-
export { updateProfileSchema, } from "./profile/schemas";
|
|
23
|
+
export { createProfileService, } from "./profile/service.js";
|
|
24
|
+
export { ProfileServiceError, isProfileServiceError, } from "./profile/errors.js";
|
|
25
|
+
export { updateProfileSchema, } from "./profile/schemas.js";
|
|
26
26
|
// Onboarding service (page/registry migration, `onboarding` family)
|
|
27
|
-
export { createOnboardingService, } from "./onboarding/service";
|
|
28
|
-
export { OnboardingServiceError, isOnboardingServiceError, } from "./onboarding/errors";
|
|
29
|
-
export { setStepSchema } from "./onboarding/schemas";
|
|
27
|
+
export { createOnboardingService, } from "./onboarding/service.js";
|
|
28
|
+
export { OnboardingServiceError, isOnboardingServiceError, } from "./onboarding/errors.js";
|
|
29
|
+
export { setStepSchema } from "./onboarding/schemas.js";
|
|
30
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
import { eq } from "drizzle-orm";
|
|
56
56
|
import { db } from "@intelligo-dev/core/db";
|
|
57
57
|
import { users } from "@intelligo-dev/core/db/schema";
|
|
58
|
-
import { requireAuth } from "../helpers";
|
|
59
|
-
import { setStepSchema } from "./schemas";
|
|
60
|
-
import { OnboardingServiceError, isOnboardingServiceError } from "./errors";
|
|
58
|
+
import { requireAuth } from "../helpers.js";
|
|
59
|
+
import { setStepSchema } from "./schemas.js";
|
|
60
|
+
import { OnboardingServiceError, isOnboardingServiceError } from "./errors.js";
|
|
61
61
|
function errorMessage(error) {
|
|
62
62
|
return error instanceof Error ? error.message : String(error);
|
|
63
63
|
}
|
package/dist/org-api.js
CHANGED
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
* and its tests) are unaffected — they only ever see the path-keyed
|
|
59
59
|
* shape.
|
|
60
60
|
*/
|
|
61
|
-
import { auth } from "./server";
|
|
61
|
+
import { auth } from "./server.js";
|
|
62
62
|
/**
|
|
63
63
|
* `auth.api`'s organization-plugin methods are typed loosely by
|
|
64
64
|
* Better-Auth (broad `Record<string, unknown>`-ish body/query types
|
package/dist/profile/service.js
CHANGED
|
@@ -47,10 +47,10 @@ import { eq } from "drizzle-orm";
|
|
|
47
47
|
import { createLogger } from "@intelligo-dev/core/logger";
|
|
48
48
|
import { db } from "@intelligo-dev/core/db";
|
|
49
49
|
import { users, sessions } from "@intelligo-dev/core/db/schema";
|
|
50
|
-
import { auth } from "../server";
|
|
51
|
-
import { requireAuth } from "../helpers";
|
|
52
|
-
import { updateProfileSchema } from "./schemas";
|
|
53
|
-
import { ProfileServiceError, isProfileServiceError } from "./errors";
|
|
50
|
+
import { auth } from "../server.js";
|
|
51
|
+
import { requireAuth } from "../helpers.js";
|
|
52
|
+
import { updateProfileSchema } from "./schemas.js";
|
|
53
|
+
import { ProfileServiceError, isProfileServiceError } from "./errors.js";
|
|
54
54
|
const log = createLogger("ProfileService");
|
|
55
55
|
function errorMessage(error) {
|
|
56
56
|
return error instanceof Error ? error.message : String(error);
|
package/dist/server.js
CHANGED
|
@@ -14,7 +14,7 @@ import { drizzleAdapter } from "better-auth/adapters/drizzle";
|
|
|
14
14
|
import { admin, organization } from "better-auth/plugins";
|
|
15
15
|
import { createAccessControl } from "better-auth/plugins/access";
|
|
16
16
|
import { adminAc, defaultStatements, userAc, } from "better-auth/plugins/admin/access";
|
|
17
|
-
import { PLATFORM_ADMIN_ROLE } from "./roles";
|
|
17
|
+
import { PLATFORM_ADMIN_ROLE } from "./roles.js";
|
|
18
18
|
/**
|
|
19
19
|
* Access control for the platform role.
|
|
20
20
|
*
|
package/dist/team/service.js
CHANGED
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
*/
|
|
74
74
|
import { headers } from "next/headers";
|
|
75
75
|
import { createLogger } from "@intelligo-dev/core/logger";
|
|
76
|
-
import { auth } from "../server";
|
|
77
|
-
import { requireAuth, requireRole, requireWorkspace } from "../helpers";
|
|
78
|
-
import { orgApi } from "../org-api";
|
|
79
|
-
import { inviteMemberSchema, updateRoleSchema } from "./schemas";
|
|
80
|
-
import { TeamServiceError, isTeamServiceError } from "./errors";
|
|
76
|
+
import { auth } from "../server.js";
|
|
77
|
+
import { requireAuth, requireRole, requireWorkspace } from "../helpers.js";
|
|
78
|
+
import { orgApi } from "../org-api.js";
|
|
79
|
+
import { inviteMemberSchema, updateRoleSchema } from "./schemas.js";
|
|
80
|
+
import { TeamServiceError, isTeamServiceError } from "./errors.js";
|
|
81
81
|
const log = createLogger("TeamService");
|
|
82
82
|
function errorMessage(error) {
|
|
83
83
|
return error instanceof Error ? error.message : String(error);
|
|
@@ -65,11 +65,11 @@
|
|
|
65
65
|
*/
|
|
66
66
|
import { headers } from "next/headers";
|
|
67
67
|
import { createLogger } from "@intelligo-dev/core/logger";
|
|
68
|
-
import { auth } from "../server";
|
|
69
|
-
import { requireAuth, requireRole, requireWorkspace } from "../helpers";
|
|
70
|
-
import { orgApi } from "../org-api";
|
|
71
|
-
import { createWorkspaceSchema, updateWorkspaceSchema, } from "./schemas";
|
|
72
|
-
import { WorkspaceServiceError, isWorkspaceServiceError } from "./errors";
|
|
68
|
+
import { auth } from "../server.js";
|
|
69
|
+
import { requireAuth, requireRole, requireWorkspace } from "../helpers.js";
|
|
70
|
+
import { orgApi } from "../org-api.js";
|
|
71
|
+
import { createWorkspaceSchema, updateWorkspaceSchema, } from "./schemas.js";
|
|
72
|
+
import { WorkspaceServiceError, isWorkspaceServiceError } from "./errors.js";
|
|
73
73
|
const log = createLogger("WorkspaceService");
|
|
74
74
|
function errorMessage(error) {
|
|
75
75
|
return error instanceof Error ? error.message : String(error);
|
package/dist/workspace-init.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* imports billing.
|
|
17
17
|
* This breaks the auth → billing circular dependency before Phase 43 extraction.
|
|
18
18
|
*/
|
|
19
|
-
import { auth } from "./server";
|
|
19
|
+
import { auth } from "./server.js";
|
|
20
20
|
import { createLogger } from "@intelligo-dev/core/logger";
|
|
21
21
|
const log = createLogger("WorkspaceInit");
|
|
22
22
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intelligo-dev/auth",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"drizzle-orm": "^0.45.1",
|
|
32
32
|
"server-only": "^0.0.1",
|
|
33
33
|
"zod": "^3.24.1",
|
|
34
|
-
"@intelligo-dev/core": "1.0.0-beta.
|
|
34
|
+
"@intelligo-dev/core": "1.0.0-beta.3"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"next": "^15.0.0 || ^16.0.0"
|
|
@@ -53,6 +53,6 @@
|
|
|
53
53
|
"scripts": {
|
|
54
54
|
"type-check": "tsc --noEmit",
|
|
55
55
|
"lint": "eslint .",
|
|
56
|
-
"build": "tsc -p tsconfig.build.json"
|
|
56
|
+
"build": "tsc -p tsconfig.build.json && node ../../scripts/fix-esm-extensions.mjs dist"
|
|
57
57
|
}
|
|
58
58
|
}
|