rooms-kit / src / ardegazu / rooms / index.cljs
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
;; ardegazu-rooms-kit — headless clients for the suite's replicated-log rooms.
;;
;; The package root ("." export): one var per public symbol, re-exported by the
;; :index shadow module as dist/index.js. The list mirrors src/index.ts @ v1.0.0
;; exactly — every value-level export the TypeScript kit had, under the same
;; name, so nothing changes for consumers (the bot's room worker value-imports
;; ChatClient, BoardClient and Identity).
;;
;; `Identity` used to come from src/vendor/id — a hand-maintained TypeScript copy
;; of id-kit. It is now id-kit's OWN `ardegazu.id.identity/Identity`, compiled
;; from the sha-pinned sources on this build's classpath (deps.edn) rather than
;; re-exported from its dist. Not a copy in the src/vendor sense — the same
;; sources, one compile, and the surface a consumer touches (`fromSeed`,
;; `newSeed`, `assert`, `signRaw`, `publicKeyB64`, the `fingerprint` getter) is
;; attached by id-kit under string names, so it survives optimization intact.
;; What travels between implementations is the seed and the signature bytes, not
;; the class object; test/api.test.mjs holds us to that against id-kit's dist.
(ns ardegazu.rooms.index
  (:require [ardegazu.id.identity :as id]
            [ardegazu.rooms.board :as board]
            [ardegazu.rooms.chat :as chat]
            [ardegazu.rooms.node.env :as env]))

;; chat
(def ChatClient chat/ChatClient)
(def new-room-secret chat/new-room-secret)
(def CHAT-SALT chat/CHAT-SALT)

;; board
(def BoardClient board/BoardClient)
(def BOARD-SALT board/BOARD-SALT)

;; node env
(def install-origin env/install-origin)
(def install-browser-globals env/install-browser-globals)

;; identity (id-kit's own class, compiled from its sources — see the ns note)
(def Identity id/Identity)

static mirror of HEAD · about · clone: git clone https://git.ardegazu.ro/rooms-kit.git