@newhomestar/sdk 0.8.7 → 0.8.9

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 CHANGED
@@ -682,8 +682,10 @@ export function runHttpServer(def, opts = {}) {
682
682
  tokenSigningAlg: 'RS256',
683
683
  });
684
684
  // Apply JWKS middleware to all routes EXCEPT public paths
685
+ // Exact match OR prefix match (paths ending with '/' act as prefix matchers)
685
686
  app.use((req, res, next) => {
686
- if (publicPaths.has(req.path)) {
687
+ if (publicPaths.has(req.path) ||
688
+ [...publicPaths].some(p => p.endsWith('/') && req.path.startsWith(p))) {
687
689
  return next();
688
690
  }
689
691
  return jwtCheck(req, res, next);
@@ -936,7 +938,7 @@ export function runHttpServer(def, opts = {}) {
936
938
  Object.entries(def.actions).forEach(([actionName, actionDef]) => {
937
939
  const method = (actionDef.method || 'POST').toUpperCase();
938
940
  const path = actionDef.path || `/${def.name}/${actionName}`;
939
- const isPublic = publicPaths.has(path) ? ' 🔓' : ' 🔐';
941
+ const isPublic = (publicPaths.has(path) || [...publicPaths].some(p => p.endsWith('/') && path.startsWith(p))) ? ' 🔓' : ' 🔐';
940
942
  console.log(`[nova] ${method} ${path} -> ${actionName}${isPublic}`);
941
943
  });
942
944
  });
@@ -10,6 +10,18 @@ export interface UserProfile {
10
10
  last_name: string | null;
11
11
  avatar_url: string | null;
12
12
  external_id: number | null;
13
+ /** Full app_metadata blob from Supabase auth.users.raw_app_meta_data. Future-proof pass-through. */
14
+ app_metadata: Record<string, unknown> | null;
15
+ /** User's job title (from profiles table or app_metadata). */
16
+ title: string | null;
17
+ /** Derived active/inactive status. */
18
+ status: 'active' | 'inactive';
19
+ /** Raw active flag from app_metadata (1=active, 0=inactive). */
20
+ active: number;
21
+ /** User's legacy role string (from profiles table). */
22
+ rolez: string | null;
23
+ /** Whether the user has a verified TOTP 2FA factor. */
24
+ has_2fa: boolean;
13
25
  }
14
26
  export interface UserCacheOptions {
15
27
  /** Auth Service base URL. Defaults to AUTH_ISSUER_BASE_URL env var. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newhomestar/sdk",
3
- "version": "0.8.7",
3
+ "version": "0.8.9",
4
4
  "description": "Type-safe SDK for building Nova pipelines (workers & functions)",
5
5
  "homepage": "https://github.com/newhomestar/nova-node-sdk#readme",
6
6
  "bugs": {