cursedauth 0.4.0 → 0.5.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/README.md CHANGED
@@ -42,13 +42,22 @@ logins and nothing else. The provider is a separate service reached over HTTPS a
42
42
  | `cursedauth/mount-gated` | server | mount public routes before the gate, gated ones after |
43
43
  | `cursedauth/content-census` | server | answer "what has this account made here?" by COUNT |
44
44
  | `cursedauth/account-slots` | both | several accounts signed in on one browser |
45
+ | `cursedauth/sso` | both | the grant: its wire shape, its claims, its verification |
46
+ | `cursedauth/constant-time` | both | `constantTimeEqual` — compare two secrets without leaking where they differ |
45
47
  | `cursedauth/auth` | browser | `startSsoSignIn`, `useSsoAutoSignIn`, session hooks |
46
48
  | `cursedauth/account-ui` | browser | the account menu |
47
49
  | `cursedauth/account-slot-client` | browser | slot switching in the page |
50
+ | `cursedauth/testing` | server | the grant→callback→cookie harness, for a consumer's own suite |
48
51
 
49
52
  🔴 The barrel reaches `bun:sqlite`. A browser bundle imports the three browser
50
53
  subpaths and never the root.
51
54
 
55
+ 🔴 **This table is a CHECK, not prose** — `src/publishShape.test.ts` fails if an
56
+ export subpath is missing a row. A subpath nobody can find is a subpath every app
57
+ re-implements: `constant-time` shipped on 2026-09-17 after three apps had each
58
+ copied `constantTime.ts` into their own `src/`, because it was on no subpath at
59
+ all. Add the `exports` entry and the row in the same commit.
60
+
52
61
  ## Where it came from, and what was cut
53
62
 
54
63
  Extracted 2026-09-14 from the previous generation's `satellite-kit`, which was the
@@ -21,6 +21,15 @@
21
21
  * runs the longer of the two, and there is no input that makes it exit early. It
22
22
  * also carries no node-builtin dependency, so the contract modules that both a
23
23
  * server and a browser bundle can reach may use it.
24
+ *
25
+ * ## Why it is on its own subpath — `cursedauth/constant-time` (2026-09-17)
26
+ *
27
+ * It sat in this `src/` for a month on no export subpath at all, so no consumer
28
+ * could reach it: `patterns`, `roms` and `vault` each ended up with a
29
+ * byte-identical copy of the file, which is the same three-copies arithmetic the
30
+ * paragraph above was written to stop — one layer out. Its own subpath rather
31
+ * than the root barrel, because the barrel reaches `bun:sqlite` and a caller that
32
+ * wants only this compare must not pull a database driver into its graph.
24
33
  */
25
34
  /**
26
35
  * True when `a` and `b` are the same string, in time that does not depend on
@@ -1 +1 @@
1
- {"version":3,"file":"constantTime.d.ts","sourceRoot":"","sources":["../src/constantTime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAU/D"}
1
+ {"version":3,"file":"constantTime.d.ts","sourceRoot":"","sources":["../src/constantTime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAU/D"}
@@ -21,6 +21,15 @@
21
21
  * runs the longer of the two, and there is no input that makes it exit early. It
22
22
  * also carries no node-builtin dependency, so the contract modules that both a
23
23
  * server and a browser bundle can reach may use it.
24
+ *
25
+ * ## Why it is on its own subpath — `cursedauth/constant-time` (2026-09-17)
26
+ *
27
+ * It sat in this `src/` for a month on no export subpath at all, so no consumer
28
+ * could reach it: `patterns`, `roms` and `vault` each ended up with a
29
+ * byte-identical copy of the file, which is the same three-copies arithmetic the
30
+ * paragraph above was written to stop — one layer out. Its own subpath rather
31
+ * than the root barrel, because the barrel reaches `bun:sqlite` and a caller that
32
+ * wants only this compare must not pull a database driver into its graph.
24
33
  */
25
34
  /**
26
35
  * True when `a` and `b` are the same string, in time that does not depend on
@@ -1 +1 @@
1
- {"version":3,"file":"constantTime.js","sourceRoot":"","sources":["../src/constantTime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;;;;;G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C,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;IAC3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;QAAE,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAClE,OAAO,IAAI,KAAK,CAAC,CAAC;AACnB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cursedauth",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "The app side of fleet SSO — sign in through the accounts service, keep a local snapshot of who signed in, and gate the app on it. Bun + Hono + React, one SQLite file per app.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -71,6 +71,12 @@
71
71
  "source": "./src/ssoTestHarness.ts",
72
72
  "import": "./dist/ssoTestHarness.js"
73
73
  },
74
+ "./constant-time": {
75
+ "types": "./dist/constantTime.d.ts",
76
+ "bun": "./src/constantTime.ts",
77
+ "source": "./src/constantTime.ts",
78
+ "import": "./dist/constantTime.js"
79
+ },
74
80
  "./package.json": "./package.json"
75
81
  },
76
82
  "files": [
@@ -21,6 +21,15 @@
21
21
  * runs the longer of the two, and there is no input that makes it exit early. It
22
22
  * also carries no node-builtin dependency, so the contract modules that both a
23
23
  * server and a browser bundle can reach may use it.
24
+ *
25
+ * ## Why it is on its own subpath — `cursedauth/constant-time` (2026-09-17)
26
+ *
27
+ * It sat in this `src/` for a month on no export subpath at all, so no consumer
28
+ * could reach it: `patterns`, `roms` and `vault` each ended up with a
29
+ * byte-identical copy of the file, which is the same three-copies arithmetic the
30
+ * paragraph above was written to stop — one layer out. Its own subpath rather
31
+ * than the root barrel, because the barrel reaches `bun:sqlite` and a caller that
32
+ * wants only this compare must not pull a database driver into its graph.
24
33
  */
25
34
 
26
35
  /**