@foss.global/gitmanager 2.1.0 → 2.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.
Files changed (32) hide show
  1. package/.smartconfig.json +3 -1
  2. package/changelog.md +27 -0
  3. package/dist_rust/rustgitmanager_linux_amd64 +0 -0
  4. package/dist_rust/rustgitmanager_linux_amd64.tsrust-build.json +5 -5
  5. package/dist_rust/rustgitmanager_linux_arm64 +0 -0
  6. package/dist_rust/rustgitmanager_linux_arm64.tsrust-build.json +5 -5
  7. package/dist_ts/00_commitinfo_data.js +1 -1
  8. package/dist_ts/classes.gitmanager.d.ts +10 -2
  9. package/dist_ts/classes.gitmanager.js +41 -1
  10. package/dist_ts/models.d.ts +1 -1
  11. package/dist_ts/rust-gitmanager-bridge.d.ts +3 -2
  12. package/dist_ts/rust-gitmanager-bridge.js +20 -3
  13. package/native-notices/crates/cc-1.8.0/license-apache +201 -0
  14. package/native-notices/crates/cc-1.8.0/license-mit +25 -0
  15. package/native-notices/crates/find-msvc-tools-0.1.14/license-apache +201 -0
  16. package/native-notices/crates/find-msvc-tools-0.1.14/license-mit +25 -0
  17. package/native-notices/crates/shlex-2.0.1/license-apache +13 -0
  18. package/native-notices/crates/shlex-2.0.1/license-mit +21 -0
  19. package/native-notices/crates/tikv-jemalloc-sys-0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8/license-apache +201 -0
  20. package/native-notices/crates/tikv-jemalloc-sys-0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8/license-mit +25 -0
  21. package/native-notices/crates/tikv-jemallocator-0.7.0/license-apache +201 -0
  22. package/native-notices/crates/tikv-jemallocator-0.7.0/license-mit +25 -0
  23. package/native-notices/manifest.json +135 -1
  24. package/native-notices/native/tikv-jemalloc-sys-0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8/jemalloc-5.3.1/jemalloc-copying +27 -0
  25. package/native-notices/readme.md +5 -3
  26. package/package.json +9 -8
  27. package/readme.md +29 -0
  28. package/thirdparty.md +7 -0
  29. package/ts/00_commitinfo_data.ts +1 -1
  30. package/ts/classes.gitmanager.ts +52 -1
  31. package/ts/models.ts +5 -0
  32. package/ts/rust-gitmanager-bridge.ts +28 -4
@@ -23,6 +23,7 @@
23
23
  "base64@0.22.1",
24
24
  "block-buffer@0.10.4",
25
25
  "bytes@1.12.0",
26
+ "cc@1.8.0",
26
27
  "cfg-if@1.0.4",
27
28
  "clap@4.6.1",
28
29
  "clap_builder@4.6.0",
@@ -34,6 +35,7 @@
34
35
  "crypto-common@0.1.7",
35
36
  "digest@0.10.7",
36
37
  "errno@0.3.14",
38
+ "find-msvc-tools@0.1.14",
37
39
  "flate2@1.1.9",
38
40
  "form_urlencoded@1.2.2",
39
41
  "futures-channel@0.3.33",
@@ -83,6 +85,7 @@
83
85
  "serde_urlencoded@0.7.1",
84
86
  "sha2@0.10.9",
85
87
  "sharded-slab@0.1.7",
88
+ "shlex@2.0.1",
86
89
  "signal-hook-registry@1.4.8",
87
90
  "simd-adler32@0.3.10",
88
91
  "slab@0.4.12",
@@ -92,6 +95,8 @@
92
95
  "syn@2.0.118",
93
96
  "sync_wrapper@1.0.2",
94
97
  "thread_local@1.1.9",
98
+ "tikv-jemalloc-sys@0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8",
99
+ "tikv-jemallocator@0.7.0",
95
100
  "tokio-macros@2.7.0",
96
101
  "tokio-stream@0.1.18",
97
102
  "tokio-util@0.7.18",
@@ -133,6 +138,7 @@
133
138
  "base64@0.22.1",
134
139
  "block-buffer@0.10.4",
135
140
  "bytes@1.12.0",
141
+ "cc@1.8.0",
136
142
  "cfg-if@1.0.4",
137
143
  "clap@4.6.1",
138
144
  "clap_builder@4.6.0",
@@ -144,6 +150,7 @@
144
150
  "crypto-common@0.1.7",
145
151
  "digest@0.10.7",
146
152
  "errno@0.3.14",
153
+ "find-msvc-tools@0.1.14",
147
154
  "flate2@1.1.9",
148
155
  "form_urlencoded@1.2.2",
149
156
  "futures-channel@0.3.33",
@@ -193,6 +200,7 @@
193
200
  "serde_urlencoded@0.7.1",
194
201
  "sha2@0.10.9",
195
202
  "sharded-slab@0.1.7",
203
+ "shlex@2.0.1",
196
204
  "signal-hook-registry@1.4.8",
197
205
  "simd-adler32@0.3.10",
198
206
  "slab@0.4.12",
@@ -202,6 +210,8 @@
202
210
  "syn@2.0.118",
203
211
  "sync_wrapper@1.0.2",
204
212
  "thread_local@1.1.9",
213
+ "tikv-jemalloc-sys@0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8",
214
+ "tikv-jemallocator@0.7.0",
205
215
  "tokio-macros@2.7.0",
206
216
  "tokio-stream@0.1.18",
207
217
  "tokio-util@0.7.18",
@@ -485,6 +495,26 @@
485
495
  }
486
496
  ]
487
497
  },
498
+ {
499
+ "name": "cc",
500
+ "version": "1.8.0",
501
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
502
+ "license": "MIT OR Apache-2.0",
503
+ "files": [
504
+ {
505
+ "path": "crates/cc-1.8.0/license-apache",
506
+ "licenses": [
507
+ "Apache-2.0"
508
+ ]
509
+ },
510
+ {
511
+ "path": "crates/cc-1.8.0/license-mit",
512
+ "licenses": [
513
+ "MIT"
514
+ ]
515
+ }
516
+ ]
517
+ },
488
518
  {
489
519
  "name": "cfg-if",
490
520
  "version": "1.0.4",
@@ -705,6 +735,26 @@
705
735
  }
706
736
  ]
707
737
  },
738
+ {
739
+ "name": "find-msvc-tools",
740
+ "version": "0.1.14",
741
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
742
+ "license": "MIT OR Apache-2.0",
743
+ "files": [
744
+ {
745
+ "path": "crates/find-msvc-tools-0.1.14/license-apache",
746
+ "licenses": [
747
+ "Apache-2.0"
748
+ ]
749
+ },
750
+ {
751
+ "path": "crates/find-msvc-tools-0.1.14/license-mit",
752
+ "licenses": [
753
+ "MIT"
754
+ ]
755
+ }
756
+ ]
757
+ },
708
758
  {
709
759
  "name": "flate2",
710
760
  "version": "1.1.9",
@@ -1647,6 +1697,24 @@
1647
1697
  }
1648
1698
  ]
1649
1699
  },
1700
+ {
1701
+ "name": "shlex",
1702
+ "version": "2.0.1",
1703
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
1704
+ "license": "MIT OR Apache-2.0",
1705
+ "files": [
1706
+ {
1707
+ "path": "crates/shlex-2.0.1/license-apache",
1708
+ "licenses": []
1709
+ },
1710
+ {
1711
+ "path": "crates/shlex-2.0.1/license-mit",
1712
+ "licenses": [
1713
+ "MIT"
1714
+ ]
1715
+ }
1716
+ ]
1717
+ },
1650
1718
  {
1651
1719
  "name": "signal-hook-registry",
1652
1720
  "version": "1.4.8",
@@ -1803,6 +1871,61 @@
1803
1871
  }
1804
1872
  ]
1805
1873
  },
1874
+ {
1875
+ "name": "tikv-jemalloc-sys",
1876
+ "version": "0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8",
1877
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
1878
+ "license": "MIT/Apache-2.0",
1879
+ "files": [
1880
+ {
1881
+ "path": "crates/tikv-jemalloc-sys-0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8/license-apache",
1882
+ "licenses": [
1883
+ "Apache-2.0"
1884
+ ]
1885
+ },
1886
+ {
1887
+ "path": "crates/tikv-jemalloc-sys-0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8/license-mit",
1888
+ "licenses": [
1889
+ "MIT"
1890
+ ]
1891
+ }
1892
+ ],
1893
+ "native": [
1894
+ {
1895
+ "name": "jemalloc",
1896
+ "version": "5.3.1",
1897
+ "license": "BSD-2-Clause",
1898
+ "files": [
1899
+ {
1900
+ "path": "native/tikv-jemalloc-sys-0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8/jemalloc-5.3.1/jemalloc-copying",
1901
+ "licenses": [
1902
+ "BSD-2-Clause"
1903
+ ]
1904
+ }
1905
+ ]
1906
+ }
1907
+ ]
1908
+ },
1909
+ {
1910
+ "name": "tikv-jemallocator",
1911
+ "version": "0.7.0",
1912
+ "source": "registry+https://github.com/rust-lang/crates.io-index",
1913
+ "license": "MIT/Apache-2.0",
1914
+ "files": [
1915
+ {
1916
+ "path": "crates/tikv-jemallocator-0.7.0/license-apache",
1917
+ "licenses": [
1918
+ "Apache-2.0"
1919
+ ]
1920
+ },
1921
+ {
1922
+ "path": "crates/tikv-jemallocator-0.7.0/license-mit",
1923
+ "licenses": [
1924
+ "MIT"
1925
+ ]
1926
+ }
1927
+ ]
1928
+ },
1806
1929
  {
1807
1930
  "name": "tokio-macros",
1808
1931
  "version": "2.7.0",
@@ -2270,6 +2393,8 @@
2270
2393
  "crates/block-buffer-0.10.4/license-apache": "a9040321c3712d8fd0b09cf52b17445de04a23a10165049ae187cd39e5c86be5",
2271
2394
  "crates/block-buffer-0.10.4/license-mit": "d5c22aa3118d240e877ad41c5d9fa232f9c77d757d4aac0c2f943afc0a95e0ef",
2272
2395
  "crates/bytes-1.12.0/license": "45f522cacecb1023856e46df79ca625dfc550c94910078bd8aec6e02880b3d42",
2396
+ "crates/cc-1.8.0/license-apache": "a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2",
2397
+ "crates/cc-1.8.0/license-mit": "378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397",
2273
2398
  "crates/cfg-if-1.0.4/license-apache": "a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2",
2274
2399
  "crates/cfg-if-1.0.4/license-mit": "378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397",
2275
2400
  "crates/clap-4.6.1/license-apache": "c6596eb7be8581c18be736c846fb9173b69eccf6ef94c5135893ec56bd92ba08",
@@ -2292,6 +2417,8 @@
2292
2417
  "crates/digest-0.10.7/license-mit": "9e0dfd2dd4173a530e238cb6adb37aa78c34c6bc7444e0e10c1ab5d8881f63ba",
2293
2418
  "crates/errno-0.3.14/license-apache": "a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2",
2294
2419
  "crates/errno-0.3.14/license-mit": "8764a597675778ddfd4e25f81b08a05dbcf089ac05662df7613fe67f150e3aa2",
2420
+ "crates/find-msvc-tools-0.1.14/license-apache": "a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2",
2421
+ "crates/find-msvc-tools-0.1.14/license-mit": "378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397",
2295
2422
  "crates/flate2-1.1.9/license-apache": "a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2",
2296
2423
  "crates/flate2-1.1.9/license-mit": "025436edff4cfcdde17a5811fdea78892d8482efd1abdec5a17872d07a4f2112",
2297
2424
  "crates/form_urlencoded-1.2.2/license-apache": "a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2",
@@ -2384,6 +2511,8 @@
2384
2511
  "crates/sha2-0.10.9/license-apache": "a9040321c3712d8fd0b09cf52b17445de04a23a10165049ae187cd39e5c86be5",
2385
2512
  "crates/sha2-0.10.9/license-mit": "b4eb00df6e2a4d22518fcaa6a2b4646f249b3a3c9814509b22bd2091f1392ff1",
2386
2513
  "crates/sharded-slab-0.1.7/license": "eafbfa606bc005ed7fd2f623d65af17ffe4ef7c017221ac14405bf4140771ea9",
2514
+ "crates/shlex-2.0.1/license-apache": "553fffcd9b1cb158bc3e9edc35da85ca5c3b3d7d2e61c883ebcfa8a65814b583",
2515
+ "crates/shlex-2.0.1/license-mit": "4455bf75a91154108304cb283e0fea9948c14f13e20d60887cf2552449dea3b1",
2387
2516
  "crates/signal-hook-registry-1.4.8/license-apache": "a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2",
2388
2517
  "crates/signal-hook-registry-1.4.8/license-mit": "503558bfefe66ca15e4e3f7955b3cb0ec87fd52f29bf24b336af7bd00e946d5c",
2389
2518
  "crates/simd-adler32-0.3.10/license.md": "42a35170233e83e18856792e748de4c1ce4a63b2afce9a370c89ef3fe23f9f2d",
@@ -2398,6 +2527,10 @@
2398
2527
  "crates/sync_wrapper-1.0.2/license": "0d542e0c8804e39aa7f37eb00da5a762149dc682d7829451287e11b938e94594",
2399
2528
  "crates/thread_local-1.1.9/license-apache": "a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2",
2400
2529
  "crates/thread_local-1.1.9/license-mit": "c9a75f18b9ab2927829a208fc6aa2cf4e63b8420887ba29cdb265d6619ae82d5",
2530
+ "crates/tikv-jemalloc-sys-0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8/license-apache": "a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2",
2531
+ "crates/tikv-jemalloc-sys-0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8/license-mit": "378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397",
2532
+ "crates/tikv-jemallocator-0.7.0/license-apache": "a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2",
2533
+ "crates/tikv-jemallocator-0.7.0/license-mit": "378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397",
2401
2534
  "crates/tokio-1.52.3/license": "253cd04c6714889df2d32f3f64d669179a1c95c76ac43c40882c52eb06bc3552",
2402
2535
  "crates/tokio-macros-2.7.0/license": "0b83dc40cba89b9922bb84b0a9c7d2768ce37c1d7e138b7424fd4549915778c9",
2403
2536
  "crates/tokio-stream-0.1.18/license": "253cd04c6714889df2d32f3f64d669179a1c95c76ac43c40882c52eb06bc3552",
@@ -2421,7 +2554,8 @@
2421
2554
  "crates/version_check-0.9.5/license-apache": "a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2",
2422
2555
  "crates/version_check-0.9.5/license-mit": "b7e650f3fce5c53249d1cdc608b54df156a97edd636cf9d23498d0cfe7aec63e",
2423
2556
  "crates/zmij-1.0.21/license-mit": "23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3",
2424
- "readme.md": "04809ae136a7ad00a51d3c6bf1f89d187f30b29215a331dfc303ab94ebfba0e0",
2557
+ "native/tikv-jemalloc-sys-0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8/jemalloc-5.3.1/jemalloc-copying": "94aa2caa98c25d942f58b956c71dba6a99ff98fc3a31cbc669fe2a4cd0268b53",
2558
+ "readme.md": "81effb0ac33ff0b14d70a6d2deca504acbd941d13aa962744af7890ba6887fb5",
2425
2559
  "runtime/gcc/gpl-3.0.txt": "8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903",
2426
2560
  "runtime/gcc/runtime-library-exception-3.1.txt": "9d6b43ce4d8de0c878bf16b54d8e7a10d9bd42b75178153e3af6a815bdc90f74",
2427
2561
  "runtime/glibc/lgpl-2.1.txt": "dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551",
@@ -0,0 +1,27 @@
1
+ Unless otherwise specified, files in the jemalloc source distribution are
2
+ subject to the following license:
3
+ --------------------------------------------------------------------------------
4
+ Copyright (C) 2002-present Jason Evans <jasone@canonware.com>.
5
+ All rights reserved.
6
+ Copyright (C) 2007-2012 Mozilla Foundation. All rights reserved.
7
+ Copyright (C) 2009-present Facebook, Inc. All rights reserved.
8
+
9
+ Redistribution and use in source and binary forms, with or without
10
+ modification, are permitted provided that the following conditions are met:
11
+ 1. Redistributions of source code must retain the above copyright notice(s),
12
+ this list of conditions and the following disclaimer.
13
+ 2. Redistributions in binary form must reproduce the above copyright notice(s),
14
+ this list of conditions and the following disclaimer in the documentation
15
+ and/or other materials provided with the distribution.
16
+
17
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
18
+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
20
+ EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
21
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
26
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
+ --------------------------------------------------------------------------------
@@ -12,15 +12,17 @@ package's own code is covered by its own license.
12
12
 
13
13
  | Target | Rust target | Linkage | Cargo packages |
14
14
  | --- | --- | --- | --- |
15
- | linux_amd64 | x86_64-unknown-linux-gnu | dynamic glibc | 99 |
16
- | linux_arm64 | aarch64-unknown-linux-gnu | dynamic glibc | 99 |
15
+ | linux_amd64 | x86_64-unknown-linux-gnu | dynamic glibc | 104 |
16
+ | linux_arm64 | aarch64-unknown-linux-gnu | dynamic glibc | 104 |
17
17
 
18
18
  ## Contents
19
19
 
20
- - `crates/`: the license and notice files of the 99 third-party Cargo packages compiled
20
+ - `crates/`: the license and notice files of the 104 third-party Cargo packages compiled
21
21
  for these targets (normal and build dependencies, including procedural macros;
22
22
  development dependencies are excluded), copied verbatim. `manifest.json` records each
23
23
  package's license expression, the texts that cover it, and the targets it is built for.
24
+ - `native/`: the license files of C and C++ libraries that Cargo packages compile into
25
+ the executables.
24
26
  - `rust/`: the Rust standard library copyright inventory and license texts from the
25
27
  toolchain, and compiler-builtins' license.
26
28
  `rust/crates/` holds the license files of 5 standard-library dependencies the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foss.global/gitmanager",
3
- "version": "2.1.0",
3
+ "version": "2.3.0",
4
4
  "private": false,
5
5
  "description": "Headless Git manager for the foss.global Git platform, with a TypeScript API and Rust engine.",
6
6
  "exports": {
@@ -10,17 +10,17 @@
10
10
  "author": "Task Venture Capital GmbH",
11
11
  "license": "MIT",
12
12
  "dependencies": {
13
- "@foss.global/interfaces": "^1.0.0",
13
+ "@foss.global/interfaces": "^2.0.0",
14
14
  "@push.rocks/smartrust": "^1.7.0"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@foss.global/ci-spec": "1.1.1",
18
- "@git.zone/tsbuild": "^5.0.0",
19
- "@git.zone/tsdoc": "^2.2.2",
20
- "@git.zone/tsrun": "^3.0.1",
21
- "@git.zone/tsrust": "^1.15.1",
22
- "@git.zone/tstest": "^6.3.2",
23
- "@types/node": "^26.6.2"
18
+ "@git.zone/tsbuild": "^6.0.2",
19
+ "@git.zone/tsdoc": "^3.0.2",
20
+ "@git.zone/tsrun": "^3.0.3",
21
+ "@git.zone/tsrust": "^4.5.1",
22
+ "@git.zone/tstest": "^7.2.1",
23
+ "@types/node": "^26.6.4"
24
24
  },
25
25
  "files": [
26
26
  "ts/**/*",
@@ -61,6 +61,7 @@
61
61
  "test": "tstest test/ --verbose --logfile --timeout 60",
62
62
  "test:rust": "(cd rust && cargo test)",
63
63
  "build": "(tsbuild tsfolders) && (tsrust)",
64
+ "build:release": "(tsbuild tsfolders) && (tsrust --configured-targets) && (tsrust verify)",
64
65
  "buildDocs": "tsdoc"
65
66
  }
66
67
  }
package/readme.md CHANGED
@@ -104,6 +104,33 @@ const main = await gitManager.listRefs({
104
104
  0.9 s for the complete inventory with packed refs and about 9.5 s with loose
105
105
  refs.
106
106
 
107
+ ## Credentialed mirrors and repository size
108
+
109
+ `importMirror()` and `refreshMirror()` take the transfer options of `IGitManagerRemoteTransferOptions`:
110
+
111
+ ```ts
112
+ const credential = { kind: 'basic' as const, username: 'mirror-reader', password: accessToken };
113
+ await gitManager.importMirror({
114
+ org: 'mirror.org',
115
+ repo: 'interfaces',
116
+ remoteUrl: 'https://forge.example/foss.global/interfaces.git',
117
+ credential,
118
+ caCertificates: [privateCaPem],
119
+ timeoutMs: 30 * 60 * 1000,
120
+ });
121
+ await gitManager.refreshMirror({ org: 'mirror.org', repo: 'interfaces', credential, caCertificates: [privateCaPem] });
122
+
123
+ const size = await gitManager.getRepositorySize({ org: 'mirror.org', repo: 'interfaces' });
124
+ // { org, repo, objectCount, objectBytes, storageBytes }
125
+ ```
126
+
127
+ - The credential reaches Git only through the child process environment (`GIT_CONFIG_COUNT` entries) as an `Authorization: Basic` header. It never appears in the remote URL, on a command line, in the repository's Git config or in an error: error text replaces the remote URL with `<mirror-source>` and every form of the credential with `<redacted>`.
128
+ - A credential requires an `https://` remote URL without user information. While it carries one, Git does not follow redirects and reads no global or system Git config, so `insteadOf` rewrites and credential helpers there cannot take effect.
129
+ - `caCertificates` replaces Git's CA bundle for this transfer. The PEMs are written to a private file in `transferDir` that is removed when the transfer ends.
130
+ - `timeoutMs` is the transfer's wall-clock limit: 120000 by default, at most 21600000 (six hours). The Git process group is killed when it runs out.
131
+ - Both transfers run without credential helpers or hooks, refuse the `ext::` transport and check incoming objects.
132
+ - `getRepositorySize()` counts the distinct objects of the repository's own object database (`objectCount`) and the sum of their uncompressed sizes (`objectBytes`), which does not depend on packing. `storageBytes` is the size of every file below `objects/`. A repository with alternate object stores is refused. Measuring runs for at most 30 minutes.
133
+
107
134
  ## Durable repository bundles
108
135
 
109
136
  GitManager can export a repository as a full Git bundle and atomically restore it under a new managed repository identity. Bundle bytes never pass through JSON IPC: Rust writes or reads a temporary file inside the dedicated `transferDir`, and the caller streams that file to or from durable object storage.
@@ -329,6 +356,8 @@ The metadata is recomputed from the bytes, so compare it with what the sender de
329
356
  - `GitManager.initBareRepository()`: creates an empty local bare repository.
330
357
  - `GitManager.importMirror()`: imports a remote repository with `git clone --mirror`. Supported remote forms are `https://`, `http://`, `ssh://`, `git://`, `file://`, and SCP-like `git@host:org/repo.git` URLs.
331
358
  - `GitManager.refreshMirror()`: atomically fetches and verifies the configured mirror source.
359
+ - `GitManager.importMirror()` and `GitManager.refreshMirror()` accept a `credential`, `caCertificates` and `timeoutMs`; see [Credentialed mirrors and repository size](#credentialed-mirrors-and-repository-size).
360
+ - `GitManager.getRepositorySize()`: returns the exact object count, uncompressed object bytes and on-disk object storage bytes of a repository.
332
361
  - `GitManager.verifyRepository()`: runs a strict full integrity check.
333
362
  - `GitManager.createRepositoryBundle()`: writes a bounded full Git bundle into `transferDir` and returns its temporary path and size.
334
363
  - `GitManager.createRepositoryArchive(request, { signal? })`: writes a bounded deterministic exact-commit `tar.gz` archive into `transferDir` and returns its digest, compressed size, extracted regular-file size, entry count, and temporary path; cancellation settles after Rust process and staging cleanup.
package/thirdparty.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  This package bundles Rust binaries in `dist_rust/`. Those binaries are built from the Rust crates listed below. Each dependency remains licensed by its respective authors under the stated license expression.
4
4
 
5
+ The generated `native-notices/` directory ships the complete license texts, including jemalloc 5.3.1's BSD-2-Clause COPYING bundled by `tikv-jemalloc-sys`, the Rust runtime and platform runtime notices.
6
+
5
7
  | Crate | Version | License |
6
8
  | --- | --- | --- |
7
9
  | adler2 | 2.0.1 | 0BSD OR MIT OR Apache-2.0 |
@@ -19,6 +21,7 @@ This package bundles Rust binaries in `dist_rust/`. Those binaries are built fro
19
21
  | bitflags | 2.13.0 | Apache-2.0 OR MIT |
20
22
  | block-buffer | 0.10.4 | MIT OR Apache-2.0 |
21
23
  | bytes | 1.12.0 | MIT |
24
+ | cc | 1.8.0 | MIT OR Apache-2.0 |
22
25
  | cfg-if | 1.0.4 | Apache-2.0 OR MIT |
23
26
  | clap | 4.6.1 | Apache-2.0 OR MIT |
24
27
  | clap_builder | 4.6.0 | Apache-2.0 OR MIT |
@@ -30,6 +33,7 @@ This package bundles Rust binaries in `dist_rust/`. Those binaries are built fro
30
33
  | crypto-common | 0.1.7 | MIT OR Apache-2.0 |
31
34
  | digest | 0.10.7 | MIT OR Apache-2.0 |
32
35
  | errno | 0.3.14 | Apache-2.0 OR MIT |
36
+ | find-msvc-tools | 0.1.14 | MIT OR Apache-2.0 |
33
37
  | flate2 | 1.1.9 | MIT OR Apache-2.0 |
34
38
  | form_urlencoded | 1.2.2 | Apache-2.0 OR MIT |
35
39
  | futures-channel | 0.3.33 | Apache-2.0 OR MIT |
@@ -81,6 +85,7 @@ This package bundles Rust binaries in `dist_rust/`. Those binaries are built fro
81
85
  | serde_urlencoded | 0.7.1 | Apache-2.0 OR MIT |
82
86
  | sha2 | 0.10.9 | MIT OR Apache-2.0 |
83
87
  | sharded-slab | 0.1.7 | MIT |
88
+ | shlex | 2.0.1 | MIT OR Apache-2.0 |
84
89
  | signal-hook-registry | 1.4.8 | Apache-2.0 OR MIT |
85
90
  | simd-adler32 | 0.3.10 | MIT |
86
91
  | slab | 0.4.12 | MIT |
@@ -90,6 +95,8 @@ This package bundles Rust binaries in `dist_rust/`. Those binaries are built fro
90
95
  | syn | 2.0.118 | Apache-2.0 OR MIT |
91
96
  | sync_wrapper | 1.0.2 | Apache-2.0 |
92
97
  | thread_local | 1.1.9 | Apache-2.0 OR MIT |
98
+ | tikv-jemalloc-sys | 0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8 | MIT OR Apache-2.0 |
99
+ | tikv-jemallocator | 0.7.0 | MIT OR Apache-2.0 |
93
100
  | tokio | 1.52.3 | MIT |
94
101
  | tokio-macros | 2.7.0 | MIT |
95
102
  | tokio-stream | 0.1.18 | MIT |
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@foss.global/gitmanager',
6
- version: '2.1.0',
6
+ version: '2.3.0',
7
7
  description: 'Headless Git manager for the foss.global Git platform, with a TypeScript API and Rust engine.'
8
8
  }
@@ -18,6 +18,8 @@ import type {
18
18
  IGitManagerMergeResult,
19
19
  IGitManagerReadFileRequest,
20
20
  IGitManagerRefRequest,
21
+ IGitManagerRefreshMirrorRequest,
22
+ IGitManagerRemoteTransferOptions,
21
23
  IGitManagerProtectedRefsApplyResult,
22
24
  IGitManagerSmartHttpRepositoryProtectedRefs,
23
25
  IGitManagerRepositoryBundle,
@@ -28,6 +30,7 @@ import type {
28
30
  IGitManagerRepositoryServiceRequest,
29
31
  IGitManagerRepositoryInfo,
30
32
  IGitManagerRepositorySelector,
33
+ IGitManagerRepositorySize,
31
34
  IGitManagerRestoreBundleRequest,
32
35
  IGitManagerSmartHttpRepositoryAccess,
33
36
  IGitManagerSmartHttpRepositoryVisibility,
@@ -49,6 +52,40 @@ import { runArchiveInspection } from './classes.archiveinspection.js';
49
52
 
50
53
  const readinessDefaultTimeoutMs = 2_000;
51
54
  const readinessMaximumTimeoutMs = 30_000;
55
+ const remoteTransferMaximumTimeoutMs = 21_600_000;
56
+
57
+ /**
58
+ * Checks transfer options before they reach the engine, which answers a
59
+ * malformed credential-bearing request with fixed text only. Messages never
60
+ * quote a credential value.
61
+ */
62
+ const assertRemoteTransferOptions = (optionsArg: IGitManagerRemoteTransferOptions): void => {
63
+ const { credential, caCertificates, timeoutMs } = optionsArg;
64
+ if (credential !== undefined) {
65
+ if (
66
+ credential === null
67
+ || typeof credential !== 'object'
68
+ || credential.kind !== 'basic'
69
+ || typeof credential.username !== 'string'
70
+ || typeof credential.password !== 'string'
71
+ || Object.keys(credential).some((key) => !['kind', 'username', 'password'].includes(key))
72
+ ) {
73
+ throw new TypeError('credential must be { kind: "basic", username: string, password: string }');
74
+ }
75
+ }
76
+ if (
77
+ caCertificates !== undefined
78
+ && (!Array.isArray(caCertificates) || caCertificates.some((certificate) => typeof certificate !== 'string'))
79
+ ) {
80
+ throw new TypeError('caCertificates must be an array of PEM strings');
81
+ }
82
+ if (
83
+ timeoutMs !== undefined
84
+ && (!Number.isSafeInteger(timeoutMs) || timeoutMs < 1 || timeoutMs > remoteTransferMaximumTimeoutMs)
85
+ ) {
86
+ throw new RangeError(`timeoutMs must be an integer between 1 and ${remoteTransferMaximumTimeoutMs}`);
87
+ }
88
+ };
52
89
 
53
90
  type TGitManagerReadinessAbortSource = 'caller' | 'deadline';
54
91
  type TGitManagerReadinessProbeOutcome = 'ready' | 'aborted' | 'unavailable';
@@ -339,16 +376,30 @@ export class GitManager extends plugins.EventEmitter {
339
376
  return this.bridge.initBareRepository(requestArg);
340
377
  }
341
378
 
379
+ /**
380
+ * Clones every ref of `remoteUrl` into a new mirror repository. Pass a
381
+ * credential as `credential`, never inside the URL: the engine hands it to
382
+ * Git only through the process environment and removes it from errors.
383
+ */
342
384
  public async importMirror(requestArg: IGitManagerImportMirrorRequest): Promise<IGitManagerRepositoryInfo> {
343
385
  this.assertRunning();
386
+ assertRemoteTransferOptions(requestArg);
344
387
  return this.bridge.importMirror(requestArg);
345
388
  }
346
389
 
347
- public async refreshMirror(requestArg: IGitManagerRepositorySelector): Promise<IGitManagerRepositoryInfo> {
390
+ /** Fetches every ref of an imported mirror's remote again, with the same transfer options as `importMirror`. */
391
+ public async refreshMirror(requestArg: IGitManagerRefreshMirrorRequest): Promise<IGitManagerRepositoryInfo> {
348
392
  this.assertRunning();
393
+ assertRemoteTransferOptions(requestArg);
349
394
  return this.bridge.refreshMirror(requestArg);
350
395
  }
351
396
 
397
+ /** Counts the repository's objects and their exact Git bytes. */
398
+ public async getRepositorySize(requestArg: IGitManagerRepositorySelector): Promise<IGitManagerRepositorySize> {
399
+ this.assertRunning();
400
+ return this.bridge.getRepositorySize(requestArg);
401
+ }
402
+
352
403
  public async verifyRepository(requestArg: IGitManagerRepositorySelector): Promise<IGitManagerRepositoryInfo> {
353
404
  this.assertRunning();
354
405
  return this.bridge.verifyRepository(requestArg);
package/ts/models.ts CHANGED
@@ -317,8 +317,12 @@ export type {
317
317
  IGitManagerRefInventoryPage,
318
318
  IGitManagerRefInventoryStale,
319
319
  IGitManagerRefRequest,
320
+ IGitManagerRefreshMirrorRequest,
321
+ IGitManagerRemoteBasicCredential,
322
+ IGitManagerRemoteTransferOptions,
320
323
  IGitManagerRepositoryInfo,
321
324
  IGitManagerRepositorySelector,
325
+ IGitManagerRepositorySize,
322
326
  IGitManagerTag,
323
327
  IGitManagerTagRequest,
324
328
  IGitManagerTreeEntry,
@@ -330,5 +334,6 @@ export type {
330
334
  TGitManagerObjectType,
331
335
  TGitManagerRefInventoryPagination,
332
336
  TGitManagerRefInventoryResult,
337
+ TGitManagerRemoteCredential,
333
338
  TGitManagerTreeEntryType,
334
339
  } from '@foss.global/interfaces';
@@ -16,6 +16,7 @@ import type {
16
16
  IGitManagerMergeResult,
17
17
  IGitManagerReadFileRequest,
18
18
  IGitManagerRefRequest,
19
+ IGitManagerRefreshMirrorRequest,
19
20
  IGitManagerProtectedRefsApplyResult,
20
21
  IGitManagerSmartHttpRepositoryProtectedRefs,
21
22
  IGitManagerRepositoryBundle,
@@ -26,6 +27,7 @@ import type {
26
27
  IGitManagerRepositoryServiceRequest,
27
28
  IGitManagerRepositoryInfo,
28
29
  IGitManagerRepositorySelector,
30
+ IGitManagerRepositorySize,
29
31
  IGitManagerRestoreBundleRequest,
30
32
  IGitManagerSmartHttpRepositoryAccess,
31
33
  IGitManagerSmartHttpRepositoryVisibility,
@@ -63,8 +65,9 @@ type TGitManagerCommands = {
63
65
  setSmartHttpRepositoryProtectedRefs: { params: IGitManagerSmartHttpRepositoryProtectedRefs; result: IGitManagerProtectedRefsApplyResult };
64
66
  initBareRepository: { params: IGitManagerInitBareRepositoryRequest; result: IGitManagerRepositoryInfo };
65
67
  importMirror: { params: IGitManagerImportMirrorRequest; result: IGitManagerRepositoryInfo };
66
- refreshMirror: { params: IGitManagerRepositorySelector; result: IGitManagerRepositoryInfo };
68
+ refreshMirror: { params: IGitManagerRefreshMirrorRequest; result: IGitManagerRepositoryInfo };
67
69
  verifyRepository: { params: IGitManagerRepositorySelector; result: IGitManagerRepositoryInfo };
70
+ getRepositorySize: { params: IGitManagerRepositorySelector; result: IGitManagerRepositorySize };
68
71
  createRepositoryBundle: { params: IGitManagerRepositorySelector; result: IGitManagerRepositoryBundle };
69
72
  createRepositoryArchive: { params: IRepositoryArchiveOperationRequest; result: IGitManagerRepositoryArchive };
70
73
  cancelRepositoryArchive: { params: IRepositoryArchiveCancelRequest; result: { status: TRepositoryArchiveCancelStatus } };
@@ -84,6 +87,16 @@ type TGitManagerCommands = {
84
87
  getTag: { params: IGitManagerTagRequest; result: IGitManagerTag };
85
88
  };
86
89
 
90
+ /** Engine default for a remote transfer without `timeoutMs`. */
91
+ const defaultRemoteTransferTimeoutMs = 120_000;
92
+
93
+ /**
94
+ * The bridge waits past the engine's own transfer limit, so the engine reports
95
+ * a timeout and cleans up before the request is abandoned.
96
+ */
97
+ const remoteTransferResponseTimeoutMs = (timeoutMsArg: number | undefined): number =>
98
+ (timeoutMsArg ?? defaultRemoteTransferTimeoutMs) + 30_000;
99
+
87
100
  function getPackageRoot(): string {
88
101
  const thisDir = plugins.path.dirname(plugins.url.fileURLToPath(import.meta.url));
89
102
  return plugins.path.resolve(thisDir, '..');
@@ -218,11 +231,22 @@ export class RustGitManagerBridge extends plugins.EventEmitter {
218
231
  }
219
232
 
220
233
  public async importMirror(requestArg: IGitManagerImportMirrorRequest): Promise<IGitManagerRepositoryInfo> {
221
- return this.bridge.sendCommand('importMirror', requestArg);
234
+ return this.bridge.sendCommand('importMirror', requestArg, {
235
+ timeoutMs: remoteTransferResponseTimeoutMs(requestArg.timeoutMs),
236
+ });
222
237
  }
223
238
 
224
- public async refreshMirror(requestArg: IGitManagerRepositorySelector): Promise<IGitManagerRepositoryInfo> {
225
- return this.bridge.sendCommand('refreshMirror', requestArg);
239
+ public async refreshMirror(requestArg: IGitManagerRefreshMirrorRequest): Promise<IGitManagerRepositoryInfo> {
240
+ return this.bridge.sendCommand('refreshMirror', requestArg, {
241
+ timeoutMs: remoteTransferResponseTimeoutMs(requestArg.timeoutMs),
242
+ });
243
+ }
244
+
245
+ public async getRepositorySize(requestArg: IGitManagerRepositorySelector): Promise<IGitManagerRepositorySize> {
246
+ // The engine measures for up to 30 minutes.
247
+ return this.bridge.sendCommand('getRepositorySize', requestArg, {
248
+ timeoutMs: 31 * 60 * 1000,
249
+ });
226
250
  }
227
251
 
228
252
  public async verifyRepository(requestArg: IGitManagerRepositorySelector): Promise<IGitManagerRepositoryInfo> {