cursedauth 0.2.0 → 0.3.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.ts CHANGED
@@ -21,5 +21,5 @@ export { DEFAULT_GATE_PATH, type GatedMountPlan, gatedMountReport, type Mounter,
21
21
  export { type CensusCounter, countingCensus, sharedCensus } from "./contentCensus";
22
22
  export { LOCAL_AUTH_URL, STAGE_IDENTITY_ENV, stageIdentityIsLocal, } from "./stageIdentity";
23
23
  export type { ContentCensus, ContentCensusUser } from "./sso";
24
- export { getSessionClaims, SESSION_CLAIMS_KEY, type SessionClaims } from "./auth.server";
24
+ export { bearerToken, createDevRequireSession, createRequireSession, DEV_REQUIRE_SESSION_IN_PRODUCTION, DEV_SESSION_CLAIMS, getSessionClaims, type RequireSession, SESSION_CLAIMS_KEY, type SessionClaims, type SessionVerifier, } from "./auth.server";
25
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EACN,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,OAAO,GACZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,sBAAsB,EACtB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,GAC5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,iBAAiB,EACjB,KAAK,cAAc,EACnB,gBAAgB,EAChB,KAAK,OAAO,EACZ,aAAa,EACb,KAAK,WAAW,GAChB,MAAM,iBAAiB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EACjC,kBAAkB,EAClB,gBAAgB,EAChB,KAAK,cAAc,EACnB,kBAAkB,EAClB,KAAK,aAAa,EAClB,KAAK,eAAe,GACpB,MAAM,eAAe,CAAC"}
package/dist/index.js CHANGED
@@ -20,5 +20,17 @@ export { createUserSessionStore, } from "./userSessions";
20
20
  export { DEFAULT_GATE_PATH, gatedMountReport, mountGatedApp, } from "./mountGatedApp";
21
21
  export { countingCensus, sharedCensus } from "./contentCensus";
22
22
  export { LOCAL_AUTH_URL, STAGE_IDENTITY_ENV, stageIdentityIsLocal, } from "./stageIdentity";
23
- export { getSessionClaims, SESSION_CLAIMS_KEY } from "./auth.server";
23
+ /*
24
+ * The bearer-token half of the boundary. `getSessionClaims` was the only piece this
25
+ * barrel published until 2026-09-15, because the four apps graduated before `roms`
26
+ * all gate whole ROUTE TREES (`mountGatedApp`) and never needed the middleware
27
+ * itself. `roms` gates individual routes — it hands `RequireSession` to
28
+ * `createRomsRoutes` — and the pieces that make one were already in this file,
29
+ * imported by this barrel, and simply not re-exported.
30
+ *
31
+ * 🔴 The alternative was copying `auth.server.ts` into the app, which is the exact
32
+ * duplication rule 1 exists to stop: an app-local copy of a middleware that decides
33
+ * whether a stranger is let in would then drift from the one every other app uses.
34
+ */
35
+ export { bearerToken, createDevRequireSession, createRequireSession, DEV_REQUIRE_SESSION_IN_PRODUCTION, DEV_SESSION_CLAIMS, getSessionClaims, SESSION_CLAIMS_KEY, } from "./auth.server";
24
36
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EACN,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,cAAc,GAId,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,sBAAsB,GAOtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,iBAAiB,EAEjB,gBAAgB,EAEhB,aAAa,GAEb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAsB,cAAc,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,EACN,cAAc,EACd,kBAAkB,EAClB,oBAAoB,GACpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAsB,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EACN,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,cAAc,GAId,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,sBAAsB,GAOtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,iBAAiB,EAEjB,gBAAgB,EAEhB,aAAa,GAEb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAsB,cAAc,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,EACN,cAAc,EACd,kBAAkB,EAClB,oBAAoB,GACpB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;;GAWG;AACH,OAAO,EACN,WAAW,EACX,uBAAuB,EACvB,oBAAoB,EACpB,iCAAiC,EACjC,kBAAkB,EAClB,gBAAgB,EAEhB,kBAAkB,GAGlB,MAAM,eAAe,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cursedauth",
3
- "version": "0.2.0",
4
- "description": "The app side of fleet SSO \u2014 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.",
3
+ "version": "0.3.0",
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",
7
7
  "exports": {
package/src/index.ts CHANGED
@@ -55,4 +55,27 @@ export {
55
55
  stageIdentityIsLocal,
56
56
  } from "./stageIdentity";
57
57
  export type { ContentCensus, ContentCensusUser } from "./sso";
58
- export { getSessionClaims, SESSION_CLAIMS_KEY, type SessionClaims } from "./auth.server";
58
+ /*
59
+ * The bearer-token half of the boundary. `getSessionClaims` was the only piece this
60
+ * barrel published until 2026-09-15, because the four apps graduated before `roms`
61
+ * all gate whole ROUTE TREES (`mountGatedApp`) and never needed the middleware
62
+ * itself. `roms` gates individual routes — it hands `RequireSession` to
63
+ * `createRomsRoutes` — and the pieces that make one were already in this file,
64
+ * imported by this barrel, and simply not re-exported.
65
+ *
66
+ * 🔴 The alternative was copying `auth.server.ts` into the app, which is the exact
67
+ * duplication rule 1 exists to stop: an app-local copy of a middleware that decides
68
+ * whether a stranger is let in would then drift from the one every other app uses.
69
+ */
70
+ export {
71
+ bearerToken,
72
+ createDevRequireSession,
73
+ createRequireSession,
74
+ DEV_REQUIRE_SESSION_IN_PRODUCTION,
75
+ DEV_SESSION_CLAIMS,
76
+ getSessionClaims,
77
+ type RequireSession,
78
+ SESSION_CLAIMS_KEY,
79
+ type SessionClaims,
80
+ type SessionVerifier,
81
+ } from "./auth.server";