banca / client / deps.edn
 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{;; Exact pins — the Closure compiler version rides on these two (the same
 ;; known-good pair as the kits and game1); half of the deterministic-build
 ;; story (dev/docs/CLJS.md).
 ;;
 ;; Relative paths only — never :local/root, never an absolute path: the idpat
 ;; publish gate scans every decompressed git object for local path fragments.
 ;;
 ;; THE RULE, one line: OUR OWN KITS ARE CLOJURESCRIPT LIBRARIES AND ARE
 ;; CONSUMED AS SOURCE. Every ardegazu-* kit this app depends on puts its `src`
 ;; on the classpath below and is required under its real `ardegazu.*` namespace
 ;; names — no `["ardegazu-…-kit" …]` string require anywhere under src/banca.
 ;; FOREIGN packages (@noble/*, @libp2p/*, @chainsafe/*, @orbitdb/*, helia,
 ;; events…) stay string requires: that is ordinary JS interop, not this.
 ;;
 ;; Three things follow, and all three are the point:
 ;;
 ;;  · ONE COMPILED COPY PER BUILD. A dist is a pre-linked bundle carrying its
 ;;    own cljs.core and its own compiled copy of whatever IT consumed. Mixing
 ;;    regimes is what puts several differently-compiled copies of id-kit in one
 ;;    page (banca's own, plus the ones inside social-kit's and wallet-kit's
 ;;    dists). Source consumption yields exactly one — and, in a browser build,
 ;;    DCE against actual use instead of a bundle linked whole.
 ;;  · THE SHA PIN STILL GOVERNS. package.json's git pin is the ONE cross-repo
 ;;    dependency mechanism (dev/docs/CLJS.md) — one bump path, one lockfile,
 ;;    `ardz kit-release` unchanged. These entries only point at what the pin
 ;;    already installed; there is no copy and no rename, so a fix in a kit
 ;;    reaches this app on the next sha bump with nothing to keep in sync.
 ;;  · CONSUMPTION IS TRANSITIVE. The moment a kit on this classpath requires
 ;;    another kit's namespaces, THIS file must carry that kit's src too or the
 ;;    build does not compile. So the full closure is listed, not just what
 ;;    src/banca names directly: rooms-kit and wallet-kit both require
 ;;    ardegazu.id.*, and wallet-kit also requires ardegazu.social.canon.
 ;;    Adding a path is inert on its own — it compiles nothing until something
 ;;    requires those namespaces — which is why a path always lands BEFORE the
 ;;    requires that need it, never after.
 ;;
 ;; ardegazu-rooms-kit carries the shared rooms core — ardegazu.rooms.js and
 ;; ardegazu.rooms.lib.{access,crypto,descriptor,encryption,log,net,
 ;; orbit-identity,protocol,turn}. This app does NOT vendor it. What stays
 ;; app-local is what the kit has no counterpart for: lib/mailbox (offline
 ;; delivery), lib/selftest and stores.cljs (the browser IndexedDB store
 ;; opener — lib/log's open-helia deliberately names no store package, so each
 ;; host supplies its own). Your own LogOp union goes in lib/protocol.cljs.
 ;;
 ;; ardegazu-id-kit owns the suite identity (ardegazu.id.{crypto,identity,
 ;; profile,protocol,xkey} and IdBridge in ardegazu.id.bridge-client). It used
 ;; to be excluded here on the argument that a second `Identity` class would
 ;; break `instanceof` — the argument was backwards: the HYBRID is what
 ;; manufactured the second copy, since rooms-kit, social-kit and wallet-kit all
 ;; compile id-kit from source now. One classpath, one class. (Nothing in the
 ;; suite runs `instanceof` on an Identity in any case: id-kit attaches its
 ;; whole public surface with STRING names so `:advanced` cannot rename it, and
 ;; every consumer duck-types.)
 ;;
 ;; ardegazu-social-kit and ardegazu-wallet-kit are here for the same reason.
 ;; Never require a kit's `index` namespace: those are re-export shims for the
 ;; ESM dist surface (`ardegazu.{id,social,wallet}.index`) and requiring one
 ;; drags every namespace of the kit into the build whether used or not. Bind
 ;; the DEFINING namespace — that is what makes the module split real, and it is
 ;; why `ardegazu.social.join` (the lobby's first-paint chip) costs the main
 ;; chunk nothing but `ardegazu.social.text`.
 ;;
 ;; promesa is the ONE async idiom, and lib/mailbox.cljs — which every rooms app
 ;; carries — requires it. Exact pin for the same reason as the two above: two
 ;; cold builds must be byte-identical or the IPFS/IPNS release flow loses its
 ;; determinism. Its only dependency is org.clojure/clojure, so it drags nothing
 ;; else onto this classpath. Know before you touch it: promesa's ClojureScript
 ;; runtime is NOT js/Promise — it ships its own PromiseImpl, which is thenable
 ;; and assimilated by native code but is not `instanceof Promise`, and an
 ;; unhandled rejection on one does not fire window.onunhandledrejection. End
 ;; every promesa chain in a catch of its own.
 :paths ["src"
         "node_modules/ardegazu-rooms-kit/src"
         "node_modules/ardegazu-id-kit/src"
         "node_modules/ardegazu-social-kit/src"
         "node_modules/ardegazu-wallet-kit/src"]
 :deps {org.clojure/clojurescript {:mvn/version "1.12.134"}
        thheller/shadow-cljs {:mvn/version "3.3.6"}
        funcool/promesa {:mvn/version "12.0.1"}}
 :aliases
 {:dev {:extra-deps {cider/cider-nrepl {:mvn/version "0.59.0"}}}
  ;; cljfmt is a TOOL, not a dependency. :replace-deps keeps it off the build
  ;; classpath (neither shadow-cljs nor clojurescript is loaded to run it) and
  ;; :replace-paths keeps the sources off it too — cljfmt only ever reads the
  ;; files named on the command line. Exact pin, same rule as the two above.
  ;; The config is committed beside this file; both paths are relative, because
  ;; the idpat publish gate aborts on a local filesystem path in any object.
  ;; Wired into `npm test` as the FIRST link of the test script itself, not as
  ;; a `pretest` hook: an npm lifecycle hook is skipped outright under
  ;; `ignore-scripts=true`, which is a gate that passes by not running.
  :cljfmt {:replace-deps {dev.weavejester/cljfmt {:mvn/version "0.13.1"}}
           :replace-paths []
           :main-opts ["-m" "cljfmt.main" "--config" ".cljfmt.edn"]}}}

static mirror of HEAD · about · clone: git clone https://git.ardegazu.ro/banca.git