@fonderie/auth 7.10.0 → 7.11.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/brain/signatures.md +1 -0
- package/dist/index.cjs +6 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/middlewares/index.cjs +5 -0
- package/dist/middlewares/index.cjs.map +1 -1
- package/dist/middlewares/index.d.cts +1 -1
- package/dist/middlewares/index.d.ts +1 -1
- package/dist/middlewares/index.js +5 -0
- package/dist/middlewares/index.js.map +1 -1
- package/dist/{session-DU9QTf7f.d.cts → session-BBF5t-3Y.d.cts} +4 -0
- package/dist/{session-DU9QTf7f.d.ts → session-BBF5t-3Y.d.ts} +4 -0
- package/package.json +3 -3
package/brain/signatures.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -907,6 +907,10 @@ function radius(v) {
|
|
|
907
907
|
if (typeof v !== "number" || !Number.isFinite(v) || v <= 0 || v > 2e4) return null;
|
|
908
908
|
return Math.round(v);
|
|
909
909
|
}
|
|
910
|
+
function placeId(v) {
|
|
911
|
+
const n = typeof v === "string" && /^\d{1,10}$/.test(v) ? Number(v) : v;
|
|
912
|
+
return typeof n === "number" && Number.isInteger(n) && n > 0 && n <= 2147483647 ? n : null;
|
|
913
|
+
}
|
|
910
914
|
function sanitizeLocation(input) {
|
|
911
915
|
if (!input || typeof input !== "object") return null;
|
|
912
916
|
const i = input;
|
|
@@ -922,6 +926,7 @@ function sanitizeLocation(input) {
|
|
|
922
926
|
latitude: coord(i["latitude"], 90),
|
|
923
927
|
longitude: coord(i["longitude"], 180),
|
|
924
928
|
accuracyRadius: radius(i["accuracyRadius"]),
|
|
929
|
+
geonameId: placeId(i["geonameId"]),
|
|
925
930
|
isp: str(i["isp"]),
|
|
926
931
|
org: str(i["org"]),
|
|
927
932
|
asn: upperCode(i["asn"], /^AS\d{1,10}$/i),
|
|
@@ -3508,7 +3513,7 @@ var AuthModule = class {
|
|
|
3508
3513
|
name = "@fonderie/auth";
|
|
3509
3514
|
// Baked in at build time by tsup.base, so the operator's Modules page can
|
|
3510
3515
|
// say what is actually deployed rather than 'not reported'.
|
|
3511
|
-
version = "7.
|
|
3516
|
+
version = "7.11.1";
|
|
3512
3517
|
// Users, sessions, login history, suspend — only through @fonderie/admin.
|
|
3513
3518
|
describeAdmin() {
|
|
3514
3519
|
return { routes: describeAuthAdminRoutes(this.store) };
|