@fonderie/auth 7.10.0 → 7.11.0

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.d.cts CHANGED
@@ -3,8 +3,8 @@ export { IMfaChallenge, ISession } from './types.cjs';
3
3
  import { IFonderieModule, IAdminDescription, IReadinessProblem, IFonderieApp, IAdminRoute } from '@fonderie/core';
4
4
  import { IStoreAdapter } from '@fonderie/store';
5
5
  import { EventBus } from '@fonderie/events';
6
- import { I as IAuthConfig, a as IRequestLocation } from './session-DU9QTf7f.cjs';
7
- export { A as AUTH_CONFIG_KEYS, b as AuthLimitedRoute, c as AuthMessageKey, d as IAuthRateLimitConfig, e as IAuthRuntimeConfig, f as IAuthSecrets, g as IDataExportContributor, h as ILocationRequest, L as LocationResolver, M as MESSAGE_KEYS, i as buildAuthAccountLimiter, j as buildAuthIpLimiter, r as resolveLocation, s as sanitizeLocation, w as withSession } from './session-DU9QTf7f.cjs';
6
+ import { I as IAuthConfig, a as IRequestLocation } from './session-BBF5t-3Y.cjs';
7
+ export { A as AUTH_CONFIG_KEYS, b as AuthLimitedRoute, c as AuthMessageKey, d as IAuthRateLimitConfig, e as IAuthRuntimeConfig, f as IAuthSecrets, g as IDataExportContributor, h as ILocationRequest, L as LocationResolver, M as MESSAGE_KEYS, i as buildAuthAccountLimiter, j as buildAuthIpLimiter, r as resolveLocation, s as sanitizeLocation, w as withSession } from './session-BBF5t-3Y.cjs';
8
8
  import { IUserDTO } from './dtos/user.cjs';
9
9
  export { toUserDTO } from './dtos/user.cjs';
10
10
  export { requireAuth, validate } from '@fonderie/core/middlewares';
package/dist/index.d.ts CHANGED
@@ -3,8 +3,8 @@ export { IMfaChallenge, ISession } from './types.js';
3
3
  import { IFonderieModule, IAdminDescription, IReadinessProblem, IFonderieApp, IAdminRoute } from '@fonderie/core';
4
4
  import { IStoreAdapter } from '@fonderie/store';
5
5
  import { EventBus } from '@fonderie/events';
6
- import { I as IAuthConfig, a as IRequestLocation } from './session-DU9QTf7f.js';
7
- export { A as AUTH_CONFIG_KEYS, b as AuthLimitedRoute, c as AuthMessageKey, d as IAuthRateLimitConfig, e as IAuthRuntimeConfig, f as IAuthSecrets, g as IDataExportContributor, h as ILocationRequest, L as LocationResolver, M as MESSAGE_KEYS, i as buildAuthAccountLimiter, j as buildAuthIpLimiter, r as resolveLocation, s as sanitizeLocation, w as withSession } from './session-DU9QTf7f.js';
6
+ import { I as IAuthConfig, a as IRequestLocation } from './session-BBF5t-3Y.js';
7
+ export { A as AUTH_CONFIG_KEYS, b as AuthLimitedRoute, c as AuthMessageKey, d as IAuthRateLimitConfig, e as IAuthRuntimeConfig, f as IAuthSecrets, g as IDataExportContributor, h as ILocationRequest, L as LocationResolver, M as MESSAGE_KEYS, i as buildAuthAccountLimiter, j as buildAuthIpLimiter, r as resolveLocation, s as sanitizeLocation, w as withSession } from './session-BBF5t-3Y.js';
8
8
  import { IUserDTO } from './dtos/user.js';
9
9
  export { toUserDTO } from './dtos/user.js';
10
10
  export { requireAuth, validate } from '@fonderie/core/middlewares';
package/dist/index.js CHANGED
@@ -862,6 +862,10 @@ function radius(v) {
862
862
  if (typeof v !== "number" || !Number.isFinite(v) || v <= 0 || v > 2e4) return null;
863
863
  return Math.round(v);
864
864
  }
865
+ function placeId(v) {
866
+ const n = typeof v === "string" && /^\d{1,10}$/.test(v) ? Number(v) : v;
867
+ return typeof n === "number" && Number.isInteger(n) && n > 0 && n <= 2147483647 ? n : null;
868
+ }
865
869
  function sanitizeLocation(input) {
866
870
  if (!input || typeof input !== "object") return null;
867
871
  const i = input;
@@ -877,6 +881,7 @@ function sanitizeLocation(input) {
877
881
  latitude: coord(i["latitude"], 90),
878
882
  longitude: coord(i["longitude"], 180),
879
883
  accuracyRadius: radius(i["accuracyRadius"]),
884
+ geonameId: placeId(i["geonameId"]),
880
885
  isp: str(i["isp"]),
881
886
  org: str(i["org"]),
882
887
  asn: upperCode(i["asn"], /^AS\d{1,10}$/i),
@@ -3463,7 +3468,7 @@ var AuthModule = class {
3463
3468
  name = "@fonderie/auth";
3464
3469
  // Baked in at build time by tsup.base, so the operator's Modules page can
3465
3470
  // say what is actually deployed rather than 'not reported'.
3466
- version = "7.10.0";
3471
+ version = "7.11.0";
3467
3472
  // Users, sessions, login history, suspend — only through @fonderie/admin.
3468
3473
  describeAdmin() {
3469
3474
  return { routes: describeAuthAdminRoutes(this.store) };