From d6a8fff0d5179ff70742216bdb101d0ed3506a1c Mon Sep 17 00:00:00 2001 From: caumond Date: Tue, 1 Apr 2025 08:21:55 +0200 Subject: [PATCH 1/4] url-parsing --- bb.edn | 4 +- src/cljc/auto_core/http/url.cljc | 39 +++++--- test/cljc/auto_core/http/url_test.cljc | 129 +++++++++++++++++-------- 3 files changed, 114 insertions(+), 58 deletions(-) diff --git a/bb.edn b/bb.edn index db36342..5abce1e 100644 --- a/bb.edn +++ b/bb.edn @@ -1,5 +1,5 @@ -{:deps {com.github.hephaistox/auto-build {:git/sha "6e9a158ebf50ed9d0291f05c767b056c24508ca5"}} - :paths ["src"] +{:deps {com.github.hephaistox/auto-build {:git/sha "12a7e7ba0d08e8d5fe45b59964abd6fe2a7e3899"}} + :paths [] :tasks {:requires [[auto-build.os.exit-codes] [auto-build.os.exiting :refer [exit]]] bp {:doc "Before push" diff --git a/src/cljc/auto_core/http/url.cljc b/src/cljc/auto_core/http/url.cljc index b3e0b7e..4ae3cb8 100644 --- a/src/cljc/auto_core/http/url.cljc +++ b/src/cljc/auto_core/http/url.cljc @@ -1,5 +1,5 @@ (ns auto-core.http.url - "Url management + "Parse url See [lambdaisland.uri](https://cljdoc.org/d/lambdaisland/uri/1.15.125/doc/readme) for useful functions And see the [RFC](https://www.ietf.org/rfc/rfc3986.txt) for references" @@ -14,13 +14,6 @@ ; :fragment nil} ) -(defn extract-tld-from-host - "Extract the tld of an host from an `url`" - [url] - (some->> url - (re-find #".*(?:\.([a-zA-Z]\w{1,2}))(?::\d{1,4})?$") - second)) - (def url-delims "According to [RFC3986 page 12](https://www.ietf.org/rfc/rfc3986.txt): gen-delims = : / ? # [ ] @ @@ -28,15 +21,31 @@ {:gen-delims [":" "/" "?" "#" "[" "]" "@"] :sub-delims ["!" "$" "&" "'" "(" ")" "*" "+" "," ";" "="]}) -(defn compare-locations - "Are `url` from the same location? (apparent server)" - [& urls] - (apply = (map (comp (juxt :path :query) lambda-uri/uri) urls))) +(defn parse + "Destructuring the `url` into this map: + * `user` + * `password` + * `host` + * `port` + * `path` + * `query` + * `fragment`" + [url] + (lambda-uri/uri url)) (defn parse-queries "Parse queries to get the parameters from `url`" - [url] - (-> url - lambda-uri/uri + [parsed-url] + (-> parsed-url :query lambda-uri/query-string->map)) + +(defn extract-tld + "Extract the tld from the `url` + + The tld is the top level domain, which is `com` in `hephaistox.com`" + [parsed-url] + (some->> parsed-url + :host + (re-find #".*(?:\.([a-zA-Z]\w{1,2}))(?::\d{1,4})?$") + second)) diff --git a/test/cljc/auto_core/http/url_test.cljc b/test/cljc/auto_core/http/url_test.cljc index 915179b..b2cbb4b 100644 --- a/test/cljc/auto_core/http/url_test.cljc +++ b/test/cljc/auto_core/http/url_test.cljc @@ -4,47 +4,94 @@ #?@(:clj [[clojure.test :refer [deftest is testing]]] :cljs [[cljs.test :refer [deftest is testing] :include-macros true]]))) -(deftest extract-tld-from-host-test - (testing "Find existing tld" - (is (= "com" (sut/extract-tld-from-host "http://hephaistox.com"))) - (is (= "fr" (sut/extract-tld-from-host "http://hephaistox.fr"))) - (is (= "fr" (sut/extract-tld-from-host "hephaistox.fr")))) - (testing "Compatible with ports" - (is (nil? (sut/extract-tld-from-host "localhost:3000"))) - (is (= "com" (sut/extract-tld-from-host "http://hephaistox.com:3000"))) - (is (= "uk" (sut/extract-tld-from-host "hephaistox.co.uk"))) - (is (= "fr" (sut/extract-tld-from-host "http://hephaistox.fr")))) - (testing "Compatible with multiple domaines" - (is (= "fr" (sut/extract-tld-from-host "http://www.subdomain.hephaistox.fr")))) - (testing "Localhost are compatible" - (is (nil? (sut/extract-tld-from-host "localhost"))) - (is (nil? (sut/extract-tld-from-host "192.168.0.01"))))) - -(deftest compare-locations-test - (testing "Exact same are accepted" - (is (sut/compare-locations "http://www.hephaistox.com/foo'bar?lang=en" - "http://www.hephaistox.com/foo'bar?lang=en")) - (is (sut/compare-locations "http://www.hephaistox.com/foo'bar?lang=en" - "http://www.hephaistox.com/foo'bar?lang=en" - "http://www.hephaistox.com/foo'bar?lang=en"))) - (testing "Exact same are discarded" - (is (not (sut/compare-locations "http://www.hephaistox.com/foo'bar?lang=en" - "http://www.hephaistox.com/foo'bar?lang=fr" - "http://www.hephaistox.com/foo'bar?lang=en")))) - (testing "Compare relative and fullpath" - (is (sut/compare-locations "http://www.hephaistox.com/foo'bar?lang=en" "/foo'bar?lang=en")))) +(deftest parse-test + (is (= {:scheme "http" + :user nil + :password nil + :host "www.auto-core.com" + :port nil + :path "/foo'bar" + :query "lang=fr" + :fragment nil} + (into {} (sut/parse "http://www.auto-core.com/foo'bar?lang=fr")))) + (is (= {:scheme "http" + :user nil + :password nil + :host "www.auto-core.com" + :port nil + :path nil + :query nil + :fragment nil} + (into {} (sut/parse "http://www.auto-core.com"))))) (deftest parse-queries-test - (testing "Simple params" - (is (= {:par "foo" - :bar "barfoo"} - (sut/parse-queries "?par=foo&bar=barfoo"))) - (is (= {:par ""} (sut/parse-queries "?par=")))) + (is (= {:par "foo" + :bar "barfoo"} + (-> "http://auto-core.com?par=foo&bar=barfoo" + sut/parse + sut/parse-queries)) + "Simple params") + (is (= {:par ""} + (-> "?par=" + sut/parse + sut/parse-queries)) + "Emtpy param") (testing "No params" - (is (nil? (sut/parse-queries "?"))) - (is (nil? (sut/parse-queries ""))) - (is (nil? (sut/parse-queries nil)))) - (testing "Complete url analysis" - (is (= {:par "foo" - :bar "barfoo"} - (sut/parse-queries "http://hephaistox.com:3000?par=foo&bar=barfoo#foobar"))))) + (is (nil? (-> "?" + sut/parse + sut/parse-queries))) + (is (nil? (-> "" + sut/parse + sut/parse-queries))) + (is (nil? (-> nil + sut/parse + sut/parse-queries)))) + (is (= {:par "foo" + :bar "barfoo"} + (-> "http://auto-core.com:3000?par=foo&bar=barfoo#foobar" + sut/parse + sut/parse-queries)) + "Complete url analysis")) + +(deftest extract-tld-test + (testing "Find existing tld" + (is (= "com" + (-> "http://auto-core.com" + sut/parse + sut/extract-tld))) + (is (= "fr" + (-> "http://auto-core.fr" + sut/parse + sut/extract-tld))) + (is (= "fr" + (-> "http://auto-core.fr" + sut/parse + sut/extract-tld)))) + (testing "Compatible with ports" + (is (nil? (-> "localhost:3000" + sut/parse + sut/extract-tld))) + (is (= "com" + (-> "http://auto-core.com:3000" + sut/parse + sut/extract-tld))) + (is (= "uk" + (-> "https://auto-core.co.uk" + sut/parse + sut/extract-tld))) + (is (= "fr" + (-> "http://auto-core.fr" + sut/parse + sut/extract-tld)))) + (testing "Compatible with multiple domaines" + (is (= "fr" + (-> "http://www.subdomain.auto-core.fr" + sut/parse + sut/extract-tld)))) + (testing "Localhosts have no tld" + (is (nil? (-> "localhost" + sut/parse + sut/extract-tld))) + (is (nil? (-> "192.168.0.01" + sut/parse + sut/extract-tld))))) From b35e98d666e93fae694557cc3fe74d2fdc980cfc Mon Sep 17 00:00:00 2001 From: caumond Date: Wed, 9 Apr 2025 10:39:09 +0200 Subject: [PATCH 2/4] version update --- .github/workflows/commit_validation.yml | 4 ++-- bb.edn | 2 +- deps.edn | 4 ++-- package-lock.json | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/commit_validation.yml b/.github/workflows/commit_validation.yml index 91090b0..df15af2 100644 --- a/.github/workflows/commit_validation.yml +++ b/.github/workflows/commit_validation.yml @@ -31,7 +31,7 @@ jobs: with: cli: 1.12.0.1530 bb: 1.12.197 - clj-kondo: 2025.02.20 + clj-kondo: 2025.04.07 zprint: 1.2.9 - name: Lint run: bb lint -v @@ -51,7 +51,7 @@ jobs: run: git diff - name: Pushed code should already be formatted # See https://github.com/CatChen/check-git-status-action - uses: CatChen/check-git-status-action@fb60fe626b56d5a4adcb227327ba4d24326a873a #v1.4.4 + uses: CatChen/check-git-status-action@7ff019ee29f2307dca95397ae225037aa88eb4c7 with: fail-if-not-clean: true request-changes-if-not-clean: false diff --git a/bb.edn b/bb.edn index 5abce1e..d22eb82 100644 --- a/bb.edn +++ b/bb.edn @@ -1,4 +1,4 @@ -{:deps {com.github.hephaistox/auto-build {:git/sha "12a7e7ba0d08e8d5fe45b59964abd6fe2a7e3899"}} +{:deps {com.github.hephaistox/auto-build {:local/root "../auto_build"}} :paths [] :tasks {:requires [[auto-build.os.exit-codes] [auto-build.os.exiting :refer [exit]]] diff --git a/deps.edn b/deps.edn index f1c56f6..700328e 100644 --- a/deps.edn +++ b/deps.edn @@ -5,7 +5,7 @@ :extra-deps {com.cognitect/test-runner {:git/url "https://github.com/cognitect-labs/test-runner" :sha "3f288f1f16d167723ad87cc35b1dfee3c1681e10"}}} - :cljs-deps {:extra-deps {thheller/shadow-cljs {:mvn/version "2.28.21"}} + :cljs-deps {:extra-deps {thheller/shadow-cljs {:mvn/version "2.28.23"}} :extra-paths ["src/cljc" "test/cljc" "test/cljs" "test/resources"]} :codox {:exec-args {:description "`auto-core` is about core technical functionalities" @@ -20,7 +20,7 @@ :main-opts ["-m" "cognitect.test-runner" "-r" ".*-test.*" "-d" "test/clj" "test/cljc"]}} :deps {babashka/fs {:mvn/version "0.5.24"} - babashka/process {:mvn/version "0.5.22"} + babashka/process {:mvn/version "0.6.23"} com.taoensso/tempura {:mvn/version "1.5.4"} com.yetanalytics/colossal-squuid {:mvn/version "0.1.5"} danlentz/clj-uuid {:mvn/version "0.2.0"} diff --git a/package-lock.json b/package-lock.json index 55e2800..13a291d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1125,9 +1125,9 @@ } }, "node_modules/shadow-cljs": { - "version": "2.28.21", - "resolved": "https://registry.npmjs.org/shadow-cljs/-/shadow-cljs-2.28.21.tgz", - "integrity": "sha512-O5VUJkTh0bWqPBSKoWnQwEe/jfvbxHkzCA7SEx8f1Eavb7nDFcoNFDkgGjJtaAyaaSw/cmABrT2EeksnXw/25g==", + "version": "2.28.23", + "resolved": "https://registry.npmjs.org/shadow-cljs/-/shadow-cljs-2.28.23.tgz", + "integrity": "sha512-SM7LeLctZLLCm6Y3NxWOH4GvHqHDZ6Jz9bUgfpJrk1jMADqIp3rliD6Rrd12gLX2b9/oEh6UyD7X+yw6O1++sw==", "dev": true, "license": "ISC", "dependencies": { From a96f0144c8b6f779ef3e826230d4b1ca246bb82a Mon Sep 17 00:00:00 2001 From: caumond Date: Sun, 13 Apr 2025 14:31:34 +0200 Subject: [PATCH 3/4] version update --- bb.edn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bb.edn b/bb.edn index d22eb82..ed4bb5f 100644 --- a/bb.edn +++ b/bb.edn @@ -1,4 +1,4 @@ -{:deps {com.github.hephaistox/auto-build {:local/root "../auto_build"}} +{:deps {com.github.hephaistox/auto-build {:git/sha "319337735ac9f23be4b4dabdc610b5b0095b5ed2"}} :paths [] :tasks {:requires [[auto-build.os.exit-codes] [auto-build.os.exiting :refer [exit]]] From f4336a445be1827b88638d8f81182530a507ad3d Mon Sep 17 00:00:00 2001 From: caumond Date: Sun, 10 Aug 2025 18:42:43 +0200 Subject: [PATCH 4/4] version update --- .github/workflows/commit_validation.yml | 10 +- bb.edn | 4 +- deps.edn | 12 +- package-lock.json | 256 ++++++++++++++++++++---- 4 files changed, 235 insertions(+), 47 deletions(-) diff --git a/.github/workflows/commit_validation.yml b/.github/workflows/commit_validation.yml index df15af2..029763a 100644 --- a/.github/workflows/commit_validation.yml +++ b/.github/workflows/commit_validation.yml @@ -27,12 +27,12 @@ jobs: check-latest: true - name: Install clojure tools # See https://github.com/DeLaGuardo/setup-clojure/commits/main/ - uses: DeLaGuardo/setup-clojure@ada62bb3282a01a296659d48378b812b8e097360 #v13.2 + uses: DeLaGuardo/setup-clojure@3fe9b3ae632c6758d0b7757b0838606ef4287b08 #v13.2 with: - cli: 1.12.0.1530 - bb: 1.12.197 - clj-kondo: 2025.04.07 - zprint: 1.2.9 + cli: 1.12.1.1550 + bb: 1.12.207 + clj-kondo: 2025.07.28 + zprint: 1.3.0 - name: Lint run: bb lint -v - name: Setup zprint diff --git a/bb.edn b/bb.edn index ed4bb5f..fee0d5f 100644 --- a/bb.edn +++ b/bb.edn @@ -1,4 +1,4 @@ -{:deps {com.github.hephaistox/auto-build {:git/sha "319337735ac9f23be4b4dabdc610b5b0095b5ed2"}} +{:deps {com.github.hephaistox/auto-build {:git/sha "58d0992fdf43313238153f369f1a6d8f27e26189"}} :paths [] :tasks {:requires [[auto-build.os.exit-codes] [auto-build.os.exiting :refer [exit]]] @@ -72,4 +72,4 @@ :override-builtin true :requires [[auto-build.tasks.repl :as build-repl] [auto-build.echo :refer [level1-header]]] :task (-> (build-repl/repl level1-header "." (current-task) [:cljs-deps :test-clj] 7002) - exit)}}} \ No newline at end of file + exit)}}} diff --git a/deps.edn b/deps.edn index 700328e..b71bb89 100644 --- a/deps.edn +++ b/deps.edn @@ -5,7 +5,7 @@ :extra-deps {com.cognitect/test-runner {:git/url "https://github.com/cognitect-labs/test-runner" :sha "3f288f1f16d167723ad87cc35b1dfee3c1681e10"}}} - :cljs-deps {:extra-deps {thheller/shadow-cljs {:mvn/version "2.28.23"}} + :cljs-deps {:extra-deps {thheller/shadow-cljs {:mvn/version "3.1.8"}} :extra-paths ["src/cljc" "test/cljc" "test/cljs" "test/resources"]} :codox {:exec-args {:description "`auto-core` is about core technical functionalities" @@ -19,17 +19,17 @@ :test-clj {:extra-paths ["test/clj" "test/cljc" "test/resources"] :main-opts ["-m" "cognitect.test-runner" "-r" ".*-test.*" "-d" "test/clj" "test/cljc"]}} - :deps {babashka/fs {:mvn/version "0.5.24"} + :deps {babashka/fs {:mvn/version "0.5.26"} babashka/process {:mvn/version "0.6.23"} com.taoensso/tempura {:mvn/version "1.5.4"} com.yetanalytics/colossal-squuid {:mvn/version "0.1.5"} danlentz/clj-uuid {:mvn/version "0.2.0"} http-kit/http-kit {:mvn/version "2.8.0"} lambdaisland/uri {:mvn/version "1.19.155"} - metosin/malli {:mvn/version "0.17.0"} - org.apache.logging.log4j/log4j-api {:mvn/version "2.24.3"} - org.apache.logging.log4j/log4j-core {:mvn/version "2.24.3"} - org.apache.logging.log4j/log4j-slf4j2-impl {:mvn/version "2.24.3"} + metosin/malli {:mvn/version "0.19.1"} + org.apache.logging.log4j/log4j-api {:mvn/version "2.25.1"} + org.apache.logging.log4j/log4j-core {:mvn/version "2.25.1"} + org.apache.logging.log4j/log4j-slf4j2-impl {:mvn/version "2.25.1"} org.clojure/tools.cli {:mvn/version "1.1.230"} org.clojure/tools.logging {:mvn/version "1.3.0"}} :paths ["src/cljc" "src/clj"]} diff --git a/package-lock.json b/package-lock.json index 13a291d..f073bcf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,9 +26,9 @@ } }, "node_modules/asn1.js/node_modules/bn.js": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", - "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==", + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", "dev": true, "license": "MIT" }, @@ -60,6 +60,22 @@ "inherits": "2.0.3" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -82,9 +98,9 @@ "license": "MIT" }, "node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz", + "integrity": "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==", "dev": true, "license": "MIT" }, @@ -311,9 +327,9 @@ } }, "node_modules/create-ecdh/node_modules/bn.js": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", - "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==", + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", "dev": true, "license": "MIT" }, @@ -433,9 +449,9 @@ } }, "node_modules/diffie-hellman/node_modules/bn.js": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", - "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==", + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", "dev": true, "license": "MIT" }, @@ -482,9 +498,9 @@ } }, "node_modules/elliptic/node_modules/bn.js": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", - "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==", + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", "dev": true, "license": "MIT" }, @@ -542,6 +558,22 @@ "safe-buffer": "^5.1.1" } }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -630,6 +662,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/hash-base": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.5.tgz", @@ -715,6 +763,35 @@ "dev": true, "license": "ISC" }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -766,9 +843,9 @@ } }, "node_modules/miller-rabin/node_modules/bn.js": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", - "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==", + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", "dev": true, "license": "MIT" }, @@ -902,22 +979,67 @@ "license": "MIT" }, "node_modules/pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.3.tgz", + "integrity": "sha512-wfRLBZ0feWRhCIkoMB6ete7czJcnNnqRpcoWQBLqatqXXmelSRqfdDK4F3u9T2s2cXas/hQJcryI/4lAL+XTlA==", "dev": true, "license": "MIT", "dependencies": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "create-hash": "~1.1.3", + "create-hmac": "^1.1.7", + "ripemd160": "=2.0.1", + "safe-buffer": "^5.2.1", + "sha.js": "^2.4.11", + "to-buffer": "^1.2.0" }, "engines": { "node": ">=0.12" } }, + "node_modules/pbkdf2/node_modules/create-hash": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", + "integrity": "sha512-snRpch/kwQhcdlnZKYanNF1m0RDlrCdSKQaH87w1FCFPVPNCQ/Il9QJKAX2jVBZddRdaHBMC+zXa9Gw9tmkNUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "sha.js": "^2.4.0" + } + }, + "node_modules/pbkdf2/node_modules/hash-base": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", + "integrity": "sha512-0TROgQ1/SxE6KmxWSvXHvRj90/Xo1JvZShofnYF+f6ZsGtR4eES7WfrQzPalmyagfKZCXpVnitiRebZulWsbiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1" + } + }, + "node_modules/pbkdf2/node_modules/ripemd160": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", + "integrity": "sha512-J7f4wutN8mdbV08MJnXibYpCOPHR+yzy+iQ/AsjMv2j8cLavQ8VGagDFUwwTAdF8FmRKVeNpbTTEwNHCW1g94w==", + "dev": true, + "license": "MIT", + "dependencies": { + "hash-base": "^2.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -951,9 +1073,9 @@ } }, "node_modules/public-encrypt/node_modules/bn.js": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", - "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==", + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", "dev": true, "license": "MIT" }, @@ -1111,17 +1233,24 @@ "license": "MIT" }, "node_modules/sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "version": "2.4.12", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz", + "integrity": "sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==", "dev": true, "license": "(MIT AND BSD-3-Clause)", "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1", + "to-buffer": "^1.2.0" }, "bin": { "sha.js": "bin.js" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/shadow-cljs": { @@ -1324,6 +1453,28 @@ "dev": true, "license": "MIT" }, + "node_modules/to-buffer": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.1.tgz", + "integrity": "sha512-tB82LpAIWjhLYbqjx3X4zEeHN6M8CiuOEy2JY8SEQVdYRe3CCHOFaqrBW1doLDrfpWhplcW7BL+bO3/6S3pcDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "isarray": "^2.0.5", + "safe-buffer": "^5.2.1", + "typed-array-buffer": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/to-buffer/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT" + }, "node_modules/tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", @@ -1331,6 +1482,21 @@ "dev": true, "license": "MIT" }, + "node_modules/typed-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/url": { "version": "0.11.4", "resolved": "https://registry.npmjs.org/url/-/url-0.11.4.tgz", @@ -1389,6 +1555,28 @@ "which": "bin/which" } }, + "node_modules/which-typed-array": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", + "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/ws": { "version": "7.5.10", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz",