@withstudiocms/auth-kit 0.1.0-beta.2 → 0.1.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/config.js CHANGED
@@ -22,7 +22,7 @@ function makePasswordModConfig({
22
22
  throw new Error(`CMS_ENCRYPTION_KEY must decode to 16 bytes, got ${raw.byteLength}`);
23
23
  }
24
24
  const clamp = (v, min, max) => Number.isSafeInteger(v) ? Math.min(max, Math.max(min, v)) : min;
25
- const env = (k) => typeof process !== "undefined" && process.env ? process.env[k] : void 0;
25
+ const env = (k) => process?.env?.[k];
26
26
  const parsedN = Number.parseInt(env("SCRYPT_N") ?? "", 10);
27
27
  const parsedR = Number.parseInt(env("SCRYPT_R") ?? "", 10);
28
28
  const parsedP = Number.parseInt(env("SCRYPT_P") ?? "", 10);
@@ -14,7 +14,7 @@ interface UserIdentity {
14
14
  hash: string | null;
15
15
  domain: string | null;
16
16
  }
17
- type TargetComponents = [string | null, number | null];
17
+ export type TargetComponents = [string | null, number | null];
18
18
  /**
19
19
  * Return the right (target, port) pair from a list of SRV records.
20
20
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@withstudiocms/auth-kit",
3
- "version": "0.1.0-beta.2",
3
+ "version": "0.1.0-beta.3",
4
4
  "description": "Utilities for managing authentication",
5
5
  "author": {
6
6
  "name": "withstudiocms",
@@ -59,7 +59,7 @@
59
59
  "@oslojs/binary": "^1.0.0",
60
60
  "@oslojs/crypto": "^1.0.1",
61
61
  "@oslojs/encoding": "^1.1.0",
62
- "@withstudiocms/effect": "0.1.0-beta.3"
62
+ "@withstudiocms/effect": "0.1.0-beta.4"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@types/node": "^22.0.0"