@trebired/git-host 0.1.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 (212) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/LICENSE +21 -0
  3. package/README.md +451 -0
  4. package/dist/api/handler/action.d.ts +5 -0
  5. package/dist/api/handler/action.d.ts.map +1 -0
  6. package/dist/api/handler/action.js +47 -0
  7. package/dist/api/handler/action.js.map +1 -0
  8. package/dist/api/handler/response.d.ts +34 -0
  9. package/dist/api/handler/response.d.ts.map +1 -0
  10. package/dist/api/handler/response.js +87 -0
  11. package/dist/api/handler/response.js.map +1 -0
  12. package/dist/api/handler/route.d.ts +15 -0
  13. package/dist/api/handler/route.d.ts.map +1 -0
  14. package/dist/api/handler/route.js +51 -0
  15. package/dist/api/handler/route.js.map +1 -0
  16. package/dist/api/handler.d.ts +6 -0
  17. package/dist/api/handler.d.ts.map +1 -0
  18. package/dist/api/handler.js +117 -0
  19. package/dist/api/handler.js.map +1 -0
  20. package/dist/constants.d.ts +8 -0
  21. package/dist/constants.d.ts.map +1 -0
  22. package/dist/constants.js +16 -0
  23. package/dist/constants.js.map +1 -0
  24. package/dist/core/create_git_host/branch_methods.d.ts +5 -0
  25. package/dist/core/create_git_host/branch_methods.d.ts.map +1 -0
  26. package/dist/core/create_git_host/branch_methods.js +137 -0
  27. package/dist/core/create_git_host/branch_methods.js.map +1 -0
  28. package/dist/core/create_git_host/content_methods.d.ts +5 -0
  29. package/dist/core/create_git_host/content_methods.d.ts.map +1 -0
  30. package/dist/core/create_git_host/content_methods.js +24 -0
  31. package/dist/core/create_git_host/content_methods.js.map +1 -0
  32. package/dist/core/create_git_host/remote_methods.d.ts +5 -0
  33. package/dist/core/create_git_host/remote_methods.d.ts.map +1 -0
  34. package/dist/core/create_git_host/remote_methods.js +48 -0
  35. package/dist/core/create_git_host/remote_methods.js.map +1 -0
  36. package/dist/core/create_git_host/shared.d.ts +21 -0
  37. package/dist/core/create_git_host/shared.d.ts.map +1 -0
  38. package/dist/core/create_git_host/shared.js +17 -0
  39. package/dist/core/create_git_host/shared.js.map +1 -0
  40. package/dist/core/create_git_host/working_tree_methods.d.ts +5 -0
  41. package/dist/core/create_git_host/working_tree_methods.d.ts.map +1 -0
  42. package/dist/core/create_git_host/working_tree_methods.js +63 -0
  43. package/dist/core/create_git_host/working_tree_methods.js.map +1 -0
  44. package/dist/core/create_git_host.d.ts +4 -0
  45. package/dist/core/create_git_host.d.ts.map +1 -0
  46. package/dist/core/create_git_host.js +167 -0
  47. package/dist/core/create_git_host.js.map +1 -0
  48. package/dist/core/inspect/helpers.d.ts +27 -0
  49. package/dist/core/inspect/helpers.d.ts.map +1 -0
  50. package/dist/core/inspect/helpers.js +86 -0
  51. package/dist/core/inspect/helpers.js.map +1 -0
  52. package/dist/core/inspect.d.ts +17 -0
  53. package/dist/core/inspect.d.ts.map +1 -0
  54. package/dist/core/inspect.js +174 -0
  55. package/dist/core/inspect.js.map +1 -0
  56. package/dist/core/locks.d.ts +5 -0
  57. package/dist/core/locks.d.ts.map +1 -0
  58. package/dist/core/locks.js +27 -0
  59. package/dist/core/locks.js.map +1 -0
  60. package/dist/core/operation_state.d.ts +4 -0
  61. package/dist/core/operation_state.d.ts.map +1 -0
  62. package/dist/core/operation_state.js +51 -0
  63. package/dist/core/operation_state.js.map +1 -0
  64. package/dist/core/remote.d.ts +13 -0
  65. package/dist/core/remote.d.ts.map +1 -0
  66. package/dist/core/remote.js +187 -0
  67. package/dist/core/remote.js.map +1 -0
  68. package/dist/core/repository/parsers.d.ts +12 -0
  69. package/dist/core/repository/parsers.d.ts.map +1 -0
  70. package/dist/core/repository/parsers.js +181 -0
  71. package/dist/core/repository/parsers.js.map +1 -0
  72. package/dist/core/repository.d.ts +11 -0
  73. package/dist/core/repository.d.ts.map +1 -0
  74. package/dist/core/repository.js +81 -0
  75. package/dist/core/repository.js.map +1 -0
  76. package/dist/core/run_git/env.d.ts +7 -0
  77. package/dist/core/run_git/env.d.ts.map +1 -0
  78. package/dist/core/run_git/env.js +18 -0
  79. package/dist/core/run_git/env.js.map +1 -0
  80. package/dist/core/run_git/process.d.ts +13 -0
  81. package/dist/core/run_git/process.d.ts.map +1 -0
  82. package/dist/core/run_git/process.js +96 -0
  83. package/dist/core/run_git/process.js.map +1 -0
  84. package/dist/core/run_git/repository_setup.d.ts +20 -0
  85. package/dist/core/run_git/repository_setup.d.ts.map +1 -0
  86. package/dist/core/run_git/repository_setup.js +116 -0
  87. package/dist/core/run_git/repository_setup.js.map +1 -0
  88. package/dist/core/run_git.d.ts +6 -0
  89. package/dist/core/run_git.d.ts.map +1 -0
  90. package/dist/core/run_git.js +6 -0
  91. package/dist/core/run_git.js.map +1 -0
  92. package/dist/core/working_tree/mutate.d.ts +9 -0
  93. package/dist/core/working_tree/mutate.d.ts.map +1 -0
  94. package/dist/core/working_tree/mutate.js +159 -0
  95. package/dist/core/working_tree/mutate.js.map +1 -0
  96. package/dist/core/working_tree/read.d.ts +6 -0
  97. package/dist/core/working_tree/read.d.ts.map +1 -0
  98. package/dist/core/working_tree/read.js +108 -0
  99. package/dist/core/working_tree/read.js.map +1 -0
  100. package/dist/core/working_tree/shared.d.ts +20 -0
  101. package/dist/core/working_tree/shared.d.ts.map +1 -0
  102. package/dist/core/working_tree/shared.js +87 -0
  103. package/dist/core/working_tree/shared.js.map +1 -0
  104. package/dist/core/working_tree.d.ts +3 -0
  105. package/dist/core/working_tree.d.ts.map +1 -0
  106. package/dist/core/working_tree.js +3 -0
  107. package/dist/core/working_tree.js.map +1 -0
  108. package/dist/errors.d.ts +10 -0
  109. package/dist/errors.d.ts.map +1 -0
  110. package/dist/errors.js +13 -0
  111. package/dist/errors.js.map +1 -0
  112. package/dist/http/handler/helpers.d.ts +35 -0
  113. package/dist/http/handler/helpers.d.ts.map +1 -0
  114. package/dist/http/handler/helpers.js +146 -0
  115. package/dist/http/handler/helpers.js.map +1 -0
  116. package/dist/http/handler.d.ts +6 -0
  117. package/dist/http/handler.d.ts.map +1 -0
  118. package/dist/http/handler.js +208 -0
  119. package/dist/http/handler.js.map +1 -0
  120. package/dist/index.d.ts +18 -0
  121. package/dist/index.d.ts.map +1 -0
  122. package/dist/index.js +15 -0
  123. package/dist/index.js.map +1 -0
  124. package/dist/logging.d.ts +4 -0
  125. package/dist/logging.d.ts.map +1 -0
  126. package/dist/logging.js +134 -0
  127. package/dist/logging.js.map +1 -0
  128. package/dist/react/client/error.d.ts +14 -0
  129. package/dist/react/client/error.d.ts.map +1 -0
  130. package/dist/react/client/error.js +32 -0
  131. package/dist/react/client/error.js.map +1 -0
  132. package/dist/react/client/helpers.d.ts +12 -0
  133. package/dist/react/client/helpers.d.ts.map +1 -0
  134. package/dist/react/client/helpers.js +45 -0
  135. package/dist/react/client/helpers.js.map +1 -0
  136. package/dist/react/client/types.d.ts +61 -0
  137. package/dist/react/client/types.d.ts.map +1 -0
  138. package/dist/react/client/types.js +2 -0
  139. package/dist/react/client/types.js.map +1 -0
  140. package/dist/react/client.d.ts +6 -0
  141. package/dist/react/client.d.ts.map +1 -0
  142. package/dist/react/client.js +115 -0
  143. package/dist/react/client.js.map +1 -0
  144. package/dist/react/hooks/query.d.ts +10 -0
  145. package/dist/react/hooks/query.d.ts.map +1 -0
  146. package/dist/react/hooks/query.js +74 -0
  147. package/dist/react/hooks/query.js.map +1 -0
  148. package/dist/react/hooks/resources.d.ts +11 -0
  149. package/dist/react/hooks/resources.d.ts.map +1 -0
  150. package/dist/react/hooks/resources.js +113 -0
  151. package/dist/react/hooks/resources.js.map +1 -0
  152. package/dist/react/hooks/types.d.ts +40 -0
  153. package/dist/react/hooks/types.d.ts.map +1 -0
  154. package/dist/react/hooks/types.js +2 -0
  155. package/dist/react/hooks/types.js.map +1 -0
  156. package/dist/react/hooks.d.ts +4 -0
  157. package/dist/react/hooks.d.ts.map +1 -0
  158. package/dist/react/hooks.js +3 -0
  159. package/dist/react/hooks.js.map +1 -0
  160. package/dist/react/index.d.ts +5 -0
  161. package/dist/react/index.d.ts.map +1 -0
  162. package/dist/react/index.js +3 -0
  163. package/dist/react/index.js.map +1 -0
  164. package/dist/ssh/keys.d.ts +18 -0
  165. package/dist/ssh/keys.d.ts.map +1 -0
  166. package/dist/ssh/keys.js +41 -0
  167. package/dist/ssh/keys.js.map +1 -0
  168. package/dist/ssh/server/audit.d.ts +5 -0
  169. package/dist/ssh/server/audit.d.ts.map +1 -0
  170. package/dist/ssh/server/audit.js +21 -0
  171. package/dist/ssh/server/audit.js.map +1 -0
  172. package/dist/ssh/server/shared.d.ts +30 -0
  173. package/dist/ssh/server/shared.d.ts.map +1 -0
  174. package/dist/ssh/server/shared.js +93 -0
  175. package/dist/ssh/server/shared.js.map +1 -0
  176. package/dist/ssh/server.d.ts +5 -0
  177. package/dist/ssh/server.d.ts.map +1 -0
  178. package/dist/ssh/server.js +265 -0
  179. package/dist/ssh/server.js.map +1 -0
  180. package/dist/types/common.d.ts +32 -0
  181. package/dist/types/common.d.ts.map +1 -0
  182. package/dist/types/common.js +2 -0
  183. package/dist/types/common.js.map +1 -0
  184. package/dist/types/host.d.ts +142 -0
  185. package/dist/types/host.d.ts.map +1 -0
  186. package/dist/types/host.js +2 -0
  187. package/dist/types/host.js.map +1 -0
  188. package/dist/types/index.d.ts +5 -0
  189. package/dist/types/index.d.ts.map +1 -0
  190. package/dist/types/index.js +2 -0
  191. package/dist/types/index.js.map +1 -0
  192. package/dist/types/repository.d.ts +163 -0
  193. package/dist/types/repository.d.ts.map +1 -0
  194. package/dist/types/repository.js +2 -0
  195. package/dist/types/repository.js.map +1 -0
  196. package/dist/types/transports.d.ts +156 -0
  197. package/dist/types/transports.d.ts.map +1 -0
  198. package/dist/types/transports.js +2 -0
  199. package/dist/types/transports.js.map +1 -0
  200. package/dist/types.d.ts +2 -0
  201. package/dist/types.d.ts.map +1 -0
  202. package/dist/types.js +2 -0
  203. package/dist/types.js.map +1 -0
  204. package/dist/utils/paths.d.ts +10 -0
  205. package/dist/utils/paths.d.ts.map +1 -0
  206. package/dist/utils/paths.js +51 -0
  207. package/dist/utils/paths.js.map +1 -0
  208. package/dist/utils/text.d.ts +4 -0
  209. package/dist/utils/text.d.ts.map +1 -0
  210. package/dist/utils/text.js +10 -0
  211. package/dist/utils/text.js.map +1 -0
  212. package/package.json +81 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/react/hooks/query.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,aAAa,EACb,eAAe,EACf,UAAU,EACV,SAAS,EACT,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AAKf,MAAM,mBAAmB,GAAG,aAAa,CAAsB,IAAI,CAAC,CAAC;AAErE,SAAS,oBAAoB,CAAC,KAAgC;IAC5D,OAAO,aAAa,CAAC,mBAAmB,CAAC,QAAQ,EAAE;QACjD,KAAK,EAAE,KAAK,CAAC,MAAM;QACnB,QAAQ,EAAE,KAAK,CAAC,QAAQ;KACzB,CAAC,CAAC;AACL,CAAC;AAED,SAAS,eAAe,CAAC,MAAqB;IAC5C,MAAM,aAAa,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IACtD,MAAM,cAAc,GAAG,MAAM,IAAI,aAAa,CAAC;IAC/C,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,mFAAmF,CAAC,CAAC;IACvG,CAAC;IACD,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAgB;IACzC,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,cAAc,CACrB,KAGC;IAED,MAAM,MAAM,GAAG,eAAe,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,KAAK,KAAK,CAAC;IACxC,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;I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O;YAC1E,eAAe,CAAC,GAAG,EAAE;gBACnB,QAAQ,CAAC,SAAS,YAAY,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;gBAChF,UAAU,CAAC,KAAK,CAAC,CAAC;YACpB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEL,OAAO,GAAG,EAAE;YACV,QAAQ,GAAG,IAAI,CAAC;YAChB,UAAU,CAAC,KAAK,EAAE,CAAC;QACrB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;IAE7C,OAAO;QACL,IAAI;QACJ,KAAK;QACL,OAAO;QACP,MAAM;YACJ,cAAc,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QACvC,CAAC;KACF,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { GitBlob, GitBranchSummary, GitCommitDetail, GitCommitSummary, GitCompareSummary, GitRepositorySummary, GitTreeEntry } from "../../types.js";
2
+ import type { GitApiQueryOptions, GitApiQueryResult, UseGitBlobOptions, UseGitCommitsOptions, UseGitDiffOptions, UseGitRepositorySummaryOptions, UseGitTreeOptions } from "./types.js";
3
+ declare function useGitRepositorySummary(repositoryKey: string, options?: UseGitRepositorySummaryOptions): GitApiQueryResult<GitRepositorySummary>;
4
+ declare function useGitBranches(repositoryKey: string, options?: GitApiQueryOptions<GitBranchSummary[]>): GitApiQueryResult<GitBranchSummary[]>;
5
+ declare function useGitCommits(repositoryKey: string, options?: UseGitCommitsOptions): GitApiQueryResult<GitCommitSummary[]>;
6
+ declare function useGitCommit(repositoryKey: string, commitRef: string, options?: GitApiQueryOptions<GitCommitDetail>): GitApiQueryResult<GitCommitDetail>;
7
+ declare function useGitTree(repositoryKey: string, options?: UseGitTreeOptions): GitApiQueryResult<GitTreeEntry[]>;
8
+ declare function useGitBlob(repositoryKey: string, options: UseGitBlobOptions): GitApiQueryResult<GitBlob>;
9
+ declare function useGitDiff(repositoryKey: string, options: UseGitDiffOptions): GitApiQueryResult<GitCompareSummary>;
10
+ export { useGitBlob, useGitBranches, useGitCommit, useGitCommits, useGitDiff, useGitRepositorySummary, useGitTree, };
11
+ //# sourceMappingURL=resources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE1J,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,8BAA8B,EAC9B,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAEpB,iBAAS,uBAAuB,CAC9B,aAAa,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE,8BAA8B,GACvC,iBAAiB,CAAC,oBAAoB,CAAC,CAczC;AAED,iBAAS,cAAc,CACrB,aAAa,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE,kBAAkB,CAAC,gBAAgB,EAAE,CAAC,GAC/C,iBAAiB,CAAC,gBAAgB,EAAE,CAAC,CAavC;AAED,iBAAS,aAAa,CACpB,aAAa,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,iBAAiB,CAAC,gBAAgB,EAAE,CAAC,CAcvC;AAED,iBAAS,YAAY,CACnB,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,GAC5C,iBAAiB,CAAC,eAAe,CAAC,CAapC;AAED,iBAAS,UAAU,CACjB,aAAa,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,iBAAiB,CAAC,YAAY,EAAE,CAAC,CAgBnC;AAED,iBAAS,UAAU,CACjB,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,iBAAiB,GACzB,iBAAiB,CAAC,OAAO,CAAC,CAe5B;AAED,iBAAS,UAAU,CACjB,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,iBAAiB,GACzB,iBAAiB,CAAC,iBAAiB,CAAC,CAkBtC;AAED,OAAO,EACL,UAAU,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,UAAU,GACX,CAAC"}
@@ -0,0 +1,113 @@
1
+ import { useGitApiQuery } from "./query.js";
2
+ function useGitRepositorySummary(repositoryKey, options) {
3
+ const enabled = (options?.enabled !== false) && Boolean(repositoryKey);
4
+ return useGitApiQuery({
5
+ ...options,
6
+ enabled,
7
+ key: ["summary", repositoryKey, options?.commitLimit ?? null],
8
+ load(client, signal) {
9
+ return client.readSummary(repositoryKey, {
10
+ commitLimit: options?.commitLimit,
11
+ headers: options?.headers,
12
+ signal,
13
+ });
14
+ },
15
+ });
16
+ }
17
+ function useGitBranches(repositoryKey, options) {
18
+ const enabled = (options?.enabled !== false) && Boolean(repositoryKey);
19
+ return useGitApiQuery({
20
+ ...options,
21
+ enabled,
22
+ key: ["branches", repositoryKey],
23
+ load(client, signal) {
24
+ return client.listBranches(repositoryKey, {
25
+ headers: options?.headers,
26
+ signal,
27
+ });
28
+ },
29
+ });
30
+ }
31
+ function useGitCommits(repositoryKey, options) {
32
+ const enabled = (options?.enabled !== false) && Boolean(repositoryKey);
33
+ return useGitApiQuery({
34
+ ...options,
35
+ enabled,
36
+ key: ["commits", repositoryKey, options?.limit ?? null],
37
+ load(client, signal) {
38
+ return client.listCommits(repositoryKey, {
39
+ headers: options?.headers,
40
+ limit: options?.limit,
41
+ signal,
42
+ });
43
+ },
44
+ });
45
+ }
46
+ function useGitCommit(repositoryKey, commitRef, options) {
47
+ const enabled = (options?.enabled !== false) && Boolean(repositoryKey) && Boolean(commitRef);
48
+ return useGitApiQuery({
49
+ ...options,
50
+ enabled,
51
+ key: ["commit", repositoryKey, commitRef],
52
+ load(client, signal) {
53
+ return client.readCommit(repositoryKey, commitRef, {
54
+ headers: options?.headers,
55
+ signal,
56
+ });
57
+ },
58
+ });
59
+ }
60
+ function useGitTree(repositoryKey, options) {
61
+ const enabled = (options?.enabled !== false) && Boolean(repositoryKey);
62
+ return useGitApiQuery({
63
+ ...options,
64
+ enabled,
65
+ key: ["tree", repositoryKey, options?.path ?? "", options?.ref ?? "", options?.recursive === true],
66
+ load(client, signal) {
67
+ return client.listTree(repositoryKey, {
68
+ headers: options?.headers,
69
+ path: options?.path,
70
+ recursive: options?.recursive,
71
+ ref: options?.ref,
72
+ signal,
73
+ });
74
+ },
75
+ });
76
+ }
77
+ function useGitBlob(repositoryKey, options) {
78
+ const enabled = (options.enabled !== false) && Boolean(repositoryKey) && Boolean(options.path);
79
+ return useGitApiQuery({
80
+ ...options,
81
+ enabled,
82
+ key: ["blob", repositoryKey, options.path, options.ref ?? ""],
83
+ load(client, signal) {
84
+ return client.readBlob(repositoryKey, {
85
+ headers: options.headers,
86
+ path: options.path,
87
+ ref: options.ref,
88
+ signal,
89
+ });
90
+ },
91
+ });
92
+ }
93
+ function useGitDiff(repositoryKey, options) {
94
+ const enabled = (options.enabled !== false)
95
+ && Boolean(repositoryKey)
96
+ && Boolean(options.baseRef)
97
+ && Boolean(options.headRef);
98
+ return useGitApiQuery({
99
+ ...options,
100
+ enabled,
101
+ key: ["diff", repositoryKey, options.baseRef, options.headRef],
102
+ load(client, signal) {
103
+ return client.diff(repositoryKey, {
104
+ baseRef: options.baseRef,
105
+ headRef: options.headRef,
106
+ headers: options.headers,
107
+ signal,
108
+ });
109
+ },
110
+ });
111
+ }
112
+ export { useGitBlob, useGitBranches, useGitCommit, useGitCommits, useGitDiff, useGitRepositorySummary, useGitTree, };
113
+ //# sourceMappingURL=resources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.js","sourceRoot":"","sources":["../../../src/react/hooks/resources.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAW5C,SAAS,uBAAuB,CAC9B,aAAqB,EACrB,OAAwC;IAExC,MAAM,OAAO,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,KAAK,CAAC,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC;IACvE,OAAO,cAAc,CAAC;QACpB,GAAG,OAAO;QACV,OAAO;QACP,GAAG,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,IAAI,IAAI,CAAC;QAC7D,IAAI,CAAC,MAAM,EAAE,MAAM;YACjB,OAAO,MAAM,CAAC,WAAW,CAAC,aAAa,EAAE;gBACvC,WAAW,EAAE,OAAO,EAAE,WAAW;gBACjC,OAAO,EAAE,OAAO,EAAE,OAAO;gBACzB,MAAM;aACP,CAAC,CAAC;QACL,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAS,cAAc,CACrB,aAAqB,EACrB,OAAgD;IAEhD,MAAM,OAAO,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,KAAK,CAAC,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC;IACvE,OAAO,cAAc,CAAC;QACpB,GAAG,OAAO;QACV,OAAO;QACP,GAAG,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC;QAChC,IAAI,CAAC,MAAM,EAAE,MAAM;YACjB,OAAO,MAAM,CAAC,YAAY,CAAC,aAAa,EAAE;gBACxC,OAAO,EAAE,OAAO,EAAE,OAAO;gBACzB,MAAM;aACP,CAAC,CAAC;QACL,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAS,aAAa,CACpB,aAAqB,EACrB,OAA8B;IAE9B,MAAM,OAAO,G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9B,OAAO,cAAc,CAAC;QACpB,GAAG,OAAO;QACV,OAAO;QACP,GAAG,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC;QAC9D,IAAI,CAAC,MAAM,EAAE,MAAM;YACjB,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE;gBAChC,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,MAAM;aACP,CAAC,CAAC;QACL,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,OAAO,EACL,UAAU,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,UAAU,GACX,CAAC"}
@@ -0,0 +1,40 @@
1
+ import type { ReactNode } from "react";
2
+ import type { GitBlob, GitBranchSummary, GitCommitDetail, GitCommitSummary, GitCompareSummary, GitRepositorySummary, GitTreeEntry } from "../../types.js";
3
+ import type { GitApiClient, GitApiClientHeaders } from "../client.js";
4
+ type GitApiClientProviderProps = {
5
+ children?: ReactNode;
6
+ client: GitApiClient;
7
+ };
8
+ type GitApiQueryOptions<TData> = {
9
+ client?: GitApiClient;
10
+ enabled?: boolean;
11
+ headers?: GitApiClientHeaders;
12
+ initialData?: TData | null;
13
+ };
14
+ type GitApiQueryResult<TData> = {
15
+ data: TData | null;
16
+ error: Error | null;
17
+ loading: boolean;
18
+ reload: () => void;
19
+ };
20
+ type UseGitRepositorySummaryOptions = GitApiQueryOptions<GitRepositorySummary> & {
21
+ commitLimit?: number;
22
+ };
23
+ type UseGitCommitsOptions = GitApiQueryOptions<GitCommitSummary[]> & {
24
+ limit?: number;
25
+ };
26
+ type UseGitTreeOptions = GitApiQueryOptions<GitTreeEntry[]> & {
27
+ path?: string;
28
+ recursive?: boolean;
29
+ ref?: string;
30
+ };
31
+ type UseGitBlobOptions = GitApiQueryOptions<GitBlob> & {
32
+ path: string;
33
+ ref?: string;
34
+ };
35
+ type UseGitDiffOptions = GitApiQueryOptions<GitCompareSummary> & {
36
+ baseRef: string;
37
+ headRef: string;
38
+ };
39
+ export type { GitApiClientProviderProps, GitApiQueryOptions, GitApiQueryResult, UseGitBlobOptions, UseGitCommitsOptions, UseGitDiffOptions, UseGitRepositorySummaryOptions, UseGitTreeOptions, GitBranchSummary, GitCommitDetail, GitRepositorySummary, GitCommitSummary, GitTreeEntry, GitBlob, GitCompareSummary, };
40
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EACV,OAAO,EACP,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,YAAY,EACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEtE,KAAK,yBAAyB,GAAG;IAC/B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC;AAEF,KAAK,kBAAkB,CAAC,KAAK,IAAI;IAC/B,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,WAAW,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,KAAK,iBAAiB,CAAC,KAAK,IAAI;IAC9B,IAAI,EAAE,KAAK,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,CAAC;AAEF,KAAK,8BAA8B,GAAG,kBAAkB,CAAC,oBAAoB,CAAC,GAAG;IAC/E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,KAAK,oBAAoB,GAAG,kBAAkB,CAAC,gBAAgB,EAAE,CAAC,GAAG;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,iBAAiB,GAAG,kBAAkB,CAAC,YAAY,EAAE,CAAC,GAAG;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,iBAAiB,GAAG,kBAAkB,CAAC,OAAO,CAAC,GAAG;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,iBAAiB,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,GAAG;IAC/D,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,YAAY,EACV,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,8BAA8B,EAC9B,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,YAAY,EACZ,OAAO,EACP,iBAAiB,GAClB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/react/hooks/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export { GitApiClientProvider, useGitApiClient, useGitApiQuery } from "./hooks/query.js";
2
+ export { useGitBlob, useGitBranches, useGitCommit, useGitCommits, useGitDiff, useGitRepositorySummary, useGitTree, } from "./hooks/resources.js";
3
+ export type { GitApiClientProviderProps, GitApiQueryOptions, GitApiQueryResult, UseGitBlobOptions, UseGitCommitsOptions, UseGitDiffOptions, UseGitRepositorySummaryOptions, UseGitTreeOptions, } from "./hooks/types.js";
4
+ //# sourceMappingURL=hooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/react/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACzF,OAAO,EACL,UAAU,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,UAAU,GACX,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACV,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,8BAA8B,EAC9B,iBAAiB,GAClB,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { GitApiClientProvider, useGitApiClient, useGitApiQuery } from "./hooks/query.js";
2
+ export { useGitBlob, useGitBranches, useGitCommit, useGitCommits, useGitDiff, useGitRepositorySummary, useGitTree, } from "./hooks/resources.js";
3
+ //# sourceMappingURL=hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/react/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACzF,OAAO,EACL,UAAU,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,UAAU,GACX,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { GitApiClientError, createGitApiClient } from "./client.js";
2
+ export { GitApiClientProvider, useGitApiClient, useGitApiQuery, useGitBlob, useGitBranches, useGitCommit, useGitCommits, useGitDiff, useGitRepositorySummary, useGitTree, } from "./hooks.js";
3
+ export type { CreateGitApiClientOptions, GitApiClient, GitApiClientFetch, GitApiClientHeaders, GitApiClientRequestOptions, GitApiFailureResponse, GitApiHeaderResolver, GitApiResponse, GitApiSuccessResponse, } from "./client.js";
4
+ export type { GitApiClientProviderProps, GitApiQueryOptions, GitApiQueryResult, UseGitBlobOptions, UseGitCommitsOptions, UseGitDiffOptions, UseGitRepositorySummaryOptions, UseGitTreeOptions, } from "./hooks.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,UAAU,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,UAAU,GACX,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,yBAAyB,EACzB,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,qBAAqB,GACtB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,8BAA8B,EAC9B,iBAAiB,GAClB,MAAM,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { GitApiClientError, createGitApiClient } from "./client.js";
2
+ export { GitApiClientProvider, useGitApiClient, useGitApiQuery, useGitBlob, useGitBranches, useGitCommit, useGitCommits, useGitDiff, useGitRepositorySummary, useGitTree, } from "./hooks.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,UAAU,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,UAAU,GACX,MAAM,YAAY,CAAC"}
@@ -0,0 +1,18 @@
1
+ type GitSshKeyAlgorithm = "ecdsa" | "ed25519" | "rsa";
2
+ type GenerateGitSshKeyPairOptions = {
3
+ algorithm?: GitSshKeyAlgorithm;
4
+ bits?: number;
5
+ comment?: string;
6
+ };
7
+ type GitSshKeyPair = {
8
+ algorithm: GitSshKeyAlgorithm;
9
+ privateKey: string;
10
+ publicKey: string;
11
+ };
12
+ declare function normalizeSshPublicKey(value: unknown): string;
13
+ declare function compareSshPublicKeys(left: unknown, right: unknown): boolean;
14
+ declare function fingerprintSshPublicKey(value: unknown): string;
15
+ declare function generateSshKeyPair(options?: GenerateGitSshKeyPairOptions): GitSshKeyPair;
16
+ export { compareSshPublicKeys, fingerprintSshPublicKey, generateSshKeyPair, normalizeSshPublicKey, };
17
+ export type { GenerateGitSshKeyPairOptions, GitSshKeyAlgorithm, GitSshKeyPair, };
18
+ //# sourceMappingURL=keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../src/ssh/keys.ts"],"names":[],"mappings":"AAOA,KAAK,kBAAkB,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,CAAC;AAEtD,KAAK,4BAA4B,GAAG;IAClC,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,SAAS,EAAE,kBAAkB,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,iBAAS,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAOrD;AAED,iBAAS,oBAAoB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAEpE;AAED,iBAAS,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAUvD;AAED,iBAAS,kBAAkB,CAAC,OAAO,GAAE,4BAAiC,GAAG,aAAa,CAgBrF;AAED,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,GACtB,CAAC;AAEF,YAAY,EACV,4BAA4B,EAC5B,kBAAkB,EAClB,aAAa,GACd,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { createHash } from "node:crypto";
2
+ import { utils as sshUtils } from "ssh2";
3
+ import { GitHostError } from "../errors.js";
4
+ import { text } from "../utils/text.js";
5
+ function normalizeSshPublicKey(value) {
6
+ const parts = text(value).split(/\s+/).filter(Boolean);
7
+ if (parts.length < 2) {
8
+ throw new GitHostError("git_command_failed", "SSH public key must include a key type and body.");
9
+ }
10
+ return `${parts[0]} ${parts[1]}`;
11
+ }
12
+ function compareSshPublicKeys(left, right) {
13
+ return normalizeSshPublicKey(left) === normalizeSshPublicKey(right);
14
+ }
15
+ function fingerprintSshPublicKey(value) {
16
+ const normalized = normalizeSshPublicKey(value);
17
+ const [, base64Body] = normalized.split(/\s+/);
18
+ const keyData = Buffer.from(text(base64Body), "base64");
19
+ if (!keyData.length) {
20
+ throw new GitHostError("git_command_failed", "SSH public key body is invalid.");
21
+ }
22
+ const digest = createHash("sha256").update(keyData).digest("base64").replace(/=+$/g, "");
23
+ return `SHA256:${digest}`;
24
+ }
25
+ function generateSshKeyPair(options = {}) {
26
+ const algorithm = text(options.algorithm, "ed25519");
27
+ if (algorithm !== "ed25519" && algorithm !== "rsa" && algorithm !== "ecdsa") {
28
+ throw new GitHostError("git_command_failed", `Unsupported SSH key algorithm "${algorithm}".`);
29
+ }
30
+ const generated = sshUtils.generateKeyPairSync(algorithm, {
31
+ bits: algorithm === "rsa" ? Math.max(2048, Number(options.bits) || 4096) : undefined,
32
+ comment: text(options.comment),
33
+ });
34
+ return {
35
+ algorithm,
36
+ privateKey: text(generated.private),
37
+ publicKey: text(generated.public),
38
+ };
39
+ }
40
+ export { compareSshPublicKeys, fingerprintSshPublicKey, generateSshKeyPair, normalizeSshPublicKey, };
41
+ //# sourceMappingURL=keys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keys.js","sourceRoot":"","sources":["../../src/ssh/keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAE,MAAM,MAAM,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAgBxC,SAAS,qBAAqB,CAAC,KAAc;IAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACvD,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,YAAY,CAAC,oBAAoB,EAAE,kDAAkD,CAAC,CAAC;IACnG,CAAC;IAED,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AACnC,CAAC;AAED,SAAS,oBAAoB,CAAC,IAAa,EAAE,KAAc;IACzD,OAAO,qBAAqB,CAAC,IAAI,CAAC,KAAK,qBAAqB,CAAC,KAAK,CAAC,CAAC;AACtE,CAAC;AAED,SAAS,uBAAuB,CAAC,KAAc;IAC7C,MAAM,UAAU,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/C,MAAM,OAAO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qBAAqB,GACtB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { resolveLogger } from "../../logging.js";
2
+ import type { CreateGitSshServerOptions, GitSshAuditEvent } from "../../types.js";
3
+ declare function reportSshAuditEvent(options: CreateGitSshServerOptions, logger: ReturnType<typeof resolveLogger>, verbose: boolean, event: GitSshAuditEvent): void;
4
+ export { reportSshAuditEvent };
5
+ //# sourceMappingURL=audit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../src/ssh/server/audit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAUlF,iBAAS,mBAAmB,CAC1B,OAAO,EAAE,yBAAyB,EAClC,MAAM,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,EACxC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,gBAAgB,QAgBxB;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,21 @@
1
+ function emitSshAuditEvent(onAuditEvent, event) {
2
+ if (typeof onAuditEvent !== "function")
3
+ return;
4
+ void Promise.resolve(onAuditEvent(event)).catch(() => { });
5
+ }
6
+ function reportSshAuditEvent(options, logger, verbose, event) {
7
+ emitSshAuditEvent(options.onAuditEvent, event);
8
+ if (event.outcome === "completed") {
9
+ if (!verbose)
10
+ return;
11
+ logger.info("git-host.ssh", "ssh git request completed", event);
12
+ return;
13
+ }
14
+ if (event.outcome === "failed") {
15
+ logger.error("git-host.ssh", "ssh git request failed", event);
16
+ return;
17
+ }
18
+ logger.warn("git-host.ssh", "ssh git request rejected", event);
19
+ }
20
+ export { reportSshAuditEvent };
21
+ //# sourceMappingURL=audit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit.js","sourceRoot":"","sources":["../../../src/ssh/server/audit.ts"],"names":[],"mappings":"AAGA,SAAS,iBAAiB,CACxB,YAAgE,EAChE,KAAuB;IAEvB,IAAI,OAAO,YAAY,KAAK,UAAU;QAAE,OAAO;IAC/C,KAAK,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED,SAAS,mBAAmB,CAC1B,OAAkC,EAClC,MAAwC,EACxC,OAAgB,EAChB,KAAuB;IAEvB,iBAAiB,CAAC,OAAO,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IAE/C,IAAI,KAAK,CAAC,OAAO,KAAK,WAAW,EAAE,CAAC;QAClC,IAAI,CAAC,OAAO;YAAE,OAAO;QACrB,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,2BAA2B,EAAE,KAAK,CAAC,CAAC;QAChE,OAAO;IACT,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;QAC/B,MAAM,CAAC,KAAK,CAAC,cAAc,EAAE,wBAAwB,EAAE,KAAK,CAAC,CAAC;QAC9D,OAAO;IACT,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,0BAA0B,EAAE,KAAK,CAAC,CAAC;AACjE,CAAC;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,30 @@
1
+ import type { CreateGitSshServerOptions, GitSshAuthenticationResult, GitSshAuthorizationResult, GitSshResolvedRepository, GitSshService } from "../../types.js";
2
+ type ParsedGitSshCommand = {
3
+ command: string;
4
+ repositoryKey: string;
5
+ service: GitSshService;
6
+ wantsWrite: boolean;
7
+ };
8
+ type NormalizedSshAuthenticationResult = {
9
+ identity: GitSshAuthenticationResult["identity"];
10
+ publicKey: string;
11
+ remoteUser: string;
12
+ };
13
+ declare function parseGitSshCommand(commandInput: unknown, basePathInput?: unknown): ParsedGitSshCommand | null;
14
+ declare function writeGitSshFailure(channel: any, messageInput: unknown): void;
15
+ declare function normalizeAuthenticationResult(result: GitSshAuthenticationResult): NormalizedSshAuthenticationResult | null;
16
+ declare function normalizeAuthorizationResult(result: GitSshAuthorizationResult | undefined): {
17
+ allowed: boolean;
18
+ message: string;
19
+ remoteUser: string;
20
+ };
21
+ declare function resolveRepositoryResult(options: CreateGitSshServerOptions, repositoryKey: string, input: {
22
+ command: string;
23
+ remoteAddress: string;
24
+ service: GitSshService;
25
+ username: string;
26
+ wantsWrite: boolean;
27
+ }): Promise<GitSshResolvedRepository | null>;
28
+ export { normalizeAuthenticationResult, normalizeAuthorizationResult, parseGitSshCommand, resolveRepositoryResult, writeGitSshFailure, };
29
+ export type { NormalizedSshAuthenticationResult, ParsedGitSshCommand };
30
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/ssh/server/shared.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,aAAa,EACd,MAAM,gBAAgB,CAAC;AAIxB,KAAK,mBAAmB,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,aAAa,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,KAAK,iCAAiC,GAAG;IACvC,QAAQ,EAAE,0BAA0B,CAAC,UAAU,CAAC,CAAC;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAMF,iBAAS,kBAAkB,CAAC,YAAY,EAAE,OAAO,EAAE,aAAa,GAAE,OAAY,GAAG,mBAAmB,GAAG,IAAI,CA0B1G;AAED,iBAAS,kBAAkB,CAAC,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,QAK9D;AAED,iBAAS,6BAA6B,CAAC,MAAM,EAAE,0BAA0B,GAAG,iCAAiC,GAAG,IAAI,CAOnH;AAED,iBAAS,4BAA4B,CAAC,MAAM,EAAE,yBAAyB,GAAG,SAAS;;;;EAWlF;AAED,iBAAe,uBAAuB,CACpC,OAAO,EAAE,yBAAyB,EAClC,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE;IACL,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;CACrB,GACA,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAoB1C;AAED,OAAO,EACL,6BAA6B,EAC7B,4BAA4B,EAC5B,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,GACnB,CAAC;AACF,YAAY,EAAE,iCAAiC,EAAE,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,93 @@
1
+ import { assertAbsoluteRepositoryPath } from "../../utils/paths.js";
2
+ import { text } from "../../utils/text.js";
3
+ function normalizeBasePath(value) {
4
+ return text(value).replace(/^\/+|\/+$/g, "");
5
+ }
6
+ function parseGitSshCommand(commandInput, basePathInput = "") {
7
+ const command = text(commandInput);
8
+ const match = command.match(/^(git-upload-pack|git-receive-pack)\s+['"]?(.+?)['"]?$/);
9
+ if (!match)
10
+ return null;
11
+ const service = text(match[1]);
12
+ const wantsWrite = service === "git-receive-pack";
13
+ const basePath = normalizeBasePath(basePathInput);
14
+ let rawTarget = text(match[2]).replace(/^\/+/, "");
15
+ if (basePath) {
16
+ if (rawTarget === basePath)
17
+ rawTarget = "";
18
+ else if (rawTarget.startsWith(`${basePath}/`))
19
+ rawTarget = rawTarget.slice(basePath.length + 1);
20
+ }
21
+ if (!rawTarget.endsWith(".git"))
22
+ return null;
23
+ const repositoryPath = rawTarget.slice(0, -4);
24
+ let repositoryKey = "";
25
+ try {
26
+ repositoryKey = decodeURIComponent(repositoryPath);
27
+ }
28
+ catch {
29
+ return null;
30
+ }
31
+ if (!repositoryKey)
32
+ return null;
33
+ return { command, repositoryKey, service, wantsWrite };
34
+ }
35
+ function writeGitSshFailure(channel, messageInput) {
36
+ const message = `${text(messageInput, "Git SSH request failed.")}\n`;
37
+ try {
38
+ channel.stderr.write(message);
39
+ }
40
+ catch { }
41
+ try {
42
+ channel.exit(1);
43
+ }
44
+ catch { }
45
+ try {
46
+ channel.close();
47
+ }
48
+ catch { }
49
+ }
50
+ function normalizeAuthenticationResult(result) {
51
+ if (!result || !text(result.publicKey))
52
+ return null;
53
+ return {
54
+ identity: result.identity,
55
+ publicKey: text(result.publicKey),
56
+ remoteUser: text(result.remoteUser, "git"),
57
+ };
58
+ }
59
+ function normalizeAuthorizationResult(result) {
60
+ if (result == null)
61
+ return { allowed: true, message: "", remoteUser: "" };
62
+ if (typeof result === "boolean") {
63
+ return { allowed: result, message: "", remoteUser: "" };
64
+ }
65
+ return {
66
+ allowed: result.allowed === true,
67
+ message: text(result.message),
68
+ remoteUser: text(result.remoteUser),
69
+ };
70
+ }
71
+ async function resolveRepositoryResult(options, repositoryKey, input) {
72
+ const resolved = await options.resolveRepository(repositoryKey, input);
73
+ if (!resolved)
74
+ return null;
75
+ if ("repository" in resolved) {
76
+ return {
77
+ repository: {
78
+ id: text(resolved.repository.id, repositoryKey),
79
+ path: assertAbsoluteRepositoryPath(resolved.repository.path),
80
+ },
81
+ repositoryKey: text(resolved.repositoryKey, repositoryKey),
82
+ };
83
+ }
84
+ return {
85
+ repository: {
86
+ id: text(resolved.id, repositoryKey),
87
+ path: assertAbsoluteRepositoryPath(resolved.path),
88
+ },
89
+ repositoryKey,
90
+ };
91
+ }
92
+ export { normalizeAuthenticationResult, normalizeAuthorizationResult, parseGitSshCommand, resolveRepositoryResult, writeGitSshFailure, };
93
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/ssh/server/shared.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,4BAA4B,E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AE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;IAC1D,CAAC;IAED,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,OAAO,KAAK,IAAI;QAChC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;QAC7B,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC;KACpC,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,uBAAuB,CACpC,OAAkC,EAClC,aAAqB,EACrB,KAMC;IAED,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,iBAAiB,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;IACvE,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC3B,IAAI,YAAY,IAAI,QAAQ,EAAE,CAAC;QAC7B,OAAO;YACL,UAAU,EAAE;gBACV,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,EAAE,aAAa,CAAC;gBAC/C,IAAI,EAAE,4BAA4B,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC;aAC7D;YACD,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;SAC3D,CAAC;IACJ,CAAC;IAED,OAAO;QACL,UAAU,EAAE;YACV,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,aAAa,CAAC;YACpC,IAAI,EAAE,4BAA4B,CAAC,QAAQ,CAAC,IAAI,CAAC;SAClD;QACD,aAAa;KACd,CAAC;AACJ,CAAC;AAED,OAAO,EACL,6BAA6B,EAC7B,4BAA4B,EAC5B,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,GACnB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { CreateGitSshServerOptions } from "../types.js";
2
+ import { parseGitSshCommand } from "./server/shared.js";
3
+ declare function createGitSshServer(options: CreateGitSshServerOptions): any;
4
+ export { createGitSshServer, parseGitSshCommand };
5
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/ssh/server.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAG7D,OAAO,EAGL,kBAAkB,EAGnB,MAAM,oBAAoB,CAAC;AAE5B,iBAAS,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,OA0P7D;AAED,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAC"}