@trebired/git-host 2.0.0 → 2.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.
- package/CHANGELOG.md +8 -0
- package/README.md +184 -1007
- package/bin/.gitkeep +1 -0
- package/bin/git-host-actions-runner-darwin-arm64 +0 -0
- package/bin/git-host-actions-runner-darwin-x64 +0 -0
- package/bin/git-host-actions-runner-linux-arm64-gnu +0 -0
- package/bin/git-host-actions-runner-linux-x64-gnu +0 -0
- package/dist/{internal/api → api}/forge/actions.d.ts +2 -2
- package/dist/api/forge/actions.d.ts.map +1 -0
- package/dist/{internal/api → api}/forge/actions.js +11 -56
- package/dist/{internal/api → api}/forge/actions.js.map +1 -1
- package/dist/{internal/api → api}/forge/archives.d.ts +1 -1
- package/dist/api/forge/archives.d.ts.map +1 -0
- package/dist/{internal/api → api}/forge/archives.js +3 -3
- package/dist/api/forge/archives.js.map +1 -0
- package/dist/{internal/api → api}/forge/handler.d.ts +1 -1
- package/dist/api/forge/handler.d.ts.map +1 -0
- package/dist/{internal/api → api}/forge/handler.js +1 -1
- package/dist/api/forge/handler.js.map +1 -0
- package/dist/{internal/api → api}/forge/route.d.ts +1 -1
- package/dist/api/forge/route.d.ts.map +1 -0
- package/dist/{internal/api → api}/forge/route.js +2 -2
- package/dist/api/forge/route.js.map +1 -0
- package/dist/{internal/api → api}/forge/runtime.d.ts +1 -1
- package/dist/api/forge/runtime.d.ts.map +1 -0
- package/dist/{internal/api → api}/forge/runtime.js +5 -5
- package/dist/api/forge/runtime.js.map +1 -0
- package/dist/{internal/api → api}/forge/socket.d.ts +1 -1
- package/dist/api/forge/socket.d.ts.map +1 -0
- package/dist/{internal/api → api}/forge/socket.js +3 -3
- package/dist/api/forge/socket.js.map +1 -0
- package/dist/api/handler/action.d.ts +5 -0
- package/dist/api/handler/action.d.ts.map +1 -0
- package/dist/{internal/api → api}/handler/action.js +2 -2
- package/dist/api/handler/action.js.map +1 -0
- package/dist/{internal/api → api}/handler/archive.d.ts +1 -1
- package/dist/api/handler/archive.d.ts.map +1 -0
- package/dist/api/handler/archive.js.map +1 -0
- package/dist/api/handler/response.d.ts.map +1 -0
- package/dist/{internal/api → api}/handler/response.js +2 -2
- package/dist/api/handler/response.js.map +1 -0
- package/dist/api/handler/route.d.ts.map +1 -0
- package/dist/{internal/api → api}/handler/route.js +1 -1
- package/dist/api/handler/route.js.map +1 -0
- package/dist/{internal/api → api}/handler/runtime.d.ts +1 -1
- package/dist/api/handler/runtime.d.ts.map +1 -0
- package/dist/{internal/api → api}/handler/runtime.js +2 -2
- package/dist/api/handler/runtime.js.map +1 -0
- package/dist/{internal/api → api}/handler.d.ts +1 -1
- package/dist/api/handler.d.ts.map +1 -0
- package/dist/api/handler.js.map +1 -0
- package/dist/api/routing.d.ts.map +1 -0
- package/dist/{internal/api → api}/routing.js +1 -1
- package/dist/api/routing.js.map +1 -0
- package/dist/api/socket/events.d.ts.map +1 -0
- package/dist/api/socket/events.js.map +1 -0
- package/dist/{internal/api → api}/socket/server.d.ts +1 -1
- package/dist/api/socket/server.d.ts.map +1 -0
- package/dist/{internal/api → api}/socket/server.js +3 -3
- package/dist/api/socket/server.js.map +1 -0
- package/dist/backend/utils/normalize.d.ts.map +1 -0
- package/dist/backend/utils/normalize.js.map +1 -0
- package/dist/backend/utils/object.d.ts.map +1 -0
- package/dist/backend/utils/object.js.map +1 -0
- package/dist/backend/utils/time.d.ts.map +1 -0
- package/dist/backend/utils/time.js.map +1 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js.map +1 -0
- package/dist/core/actions_runner.d.ts +58 -0
- package/dist/core/actions_runner.d.ts.map +1 -0
- package/dist/core/actions_runner.js +414 -0
- package/dist/core/actions_runner.js.map +1 -0
- package/dist/core/actions_workflows.d.ts +22 -0
- package/dist/core/actions_workflows.d.ts.map +1 -0
- package/dist/core/actions_workflows.js +218 -0
- package/dist/core/actions_workflows.js.map +1 -0
- package/dist/{internal/core → core}/activity.d.ts +1 -1
- package/dist/core/activity.d.ts.map +1 -0
- package/dist/{internal/core → core}/activity.js +1 -1
- package/dist/core/activity.js.map +1 -0
- package/dist/{internal/core → core}/archive.d.ts +1 -1
- package/dist/core/archive.d.ts.map +1 -0
- package/dist/{internal/core → core}/archive.js +2 -2
- package/dist/core/archive.js.map +1 -0
- package/dist/{internal/core → core}/archive_cache_filesystem.d.ts +1 -1
- package/dist/core/archive_cache_filesystem.d.ts.map +1 -0
- package/dist/core/archive_cache_filesystem.js.map +1 -0
- package/dist/core/create/git/forge.d.ts +4 -0
- package/dist/core/create/git/forge.d.ts.map +1 -0
- package/dist/{internal/core → core}/create/git/forge.js +5 -29
- package/dist/core/create/git/forge.js.map +1 -0
- package/dist/core/create/git/host.d.ts +4 -0
- package/dist/core/create/git/host.d.ts.map +1 -0
- package/dist/{internal/core → core}/create/git/host.js +15 -15
- package/dist/core/create/git/host.js.map +1 -0
- package/dist/{internal/core → core}/create_git_host/branch_methods.d.ts +1 -1
- package/dist/core/create_git_host/branch_methods.d.ts.map +1 -0
- package/dist/{internal/core → core}/create_git_host/branch_methods.js +5 -5
- package/dist/core/create_git_host/branch_methods.js.map +1 -0
- package/dist/{internal/core → core}/create_git_host/content_methods.d.ts +1 -1
- package/dist/core/create_git_host/content_methods.d.ts.map +1 -0
- package/dist/{internal/core → core}/create_git_host/content_methods.js +2 -2
- package/dist/core/create_git_host/content_methods.js.map +1 -0
- package/dist/{internal/core → core}/create_git_host/remote_methods.d.ts +1 -1
- package/dist/core/create_git_host/remote_methods.d.ts.map +1 -0
- package/dist/{internal/core → core}/create_git_host/remote_methods.js +2 -2
- package/dist/core/create_git_host/remote_methods.js.map +1 -0
- package/dist/{internal/core → core}/create_git_host/shared.d.ts +4 -4
- package/dist/core/create_git_host/shared.d.ts.map +1 -0
- package/dist/{internal/core → core}/create_git_host/shared.js +3 -3
- package/dist/core/create_git_host/shared.js.map +1 -0
- package/dist/{internal/core → core}/create_git_host/working_tree_methods.d.ts +1 -1
- package/dist/core/create_git_host/working_tree_methods.d.ts.map +1 -0
- package/dist/{internal/core → core}/create_git_host/working_tree_methods.js +2 -2
- package/dist/core/create_git_host/working_tree_methods.js.map +1 -0
- package/dist/{internal/core → core}/forge_actions.d.ts +1 -12
- package/dist/core/forge_actions.d.ts.map +1 -0
- package/dist/{internal/core → core}/forge_actions.js +215 -320
- package/dist/core/forge_actions.js.map +1 -0
- package/dist/{internal/core → core}/git_forge/storage_memory.d.ts +1 -1
- package/dist/core/git_forge/storage_memory.d.ts.map +1 -0
- package/dist/{internal/core → core}/git_forge/storage_memory.js +1 -47
- package/dist/core/git_forge/storage_memory.js.map +1 -0
- package/dist/{internal/core → core}/inspect/helpers.d.ts +1 -1
- package/dist/core/inspect/helpers.d.ts.map +1 -0
- package/dist/{internal/core → core}/inspect/helpers.js +3 -3
- package/dist/core/inspect/helpers.js.map +1 -0
- package/dist/{internal/core → core}/inspect/icon_theme.d.ts +1 -1
- package/dist/core/inspect/icon_theme.d.ts.map +1 -0
- package/dist/{internal/core → core}/inspect/icon_theme.js +1 -1
- package/dist/core/inspect/icon_theme.js.map +1 -0
- package/dist/{internal/core → core}/inspect/linguist_progress.d.ts +1 -1
- package/dist/core/inspect/linguist_progress.d.ts.map +1 -0
- package/dist/{internal/core → core}/inspect/linguist_progress.js +1 -1
- package/dist/core/inspect/linguist_progress.js.map +1 -0
- package/dist/{internal/core → core}/inspect.d.ts +1 -1
- package/dist/core/inspect.d.ts.map +1 -0
- package/dist/{internal/core → core}/inspect.js +3 -3
- package/dist/core/inspect.js.map +1 -0
- package/dist/{internal/core → core}/inspection.d.ts +1 -1
- package/dist/core/inspection.d.ts.map +1 -0
- package/dist/{internal/core → core}/inspection.js +3 -3
- package/dist/core/inspection.js.map +1 -0
- package/dist/core/locks.d.ts.map +1 -0
- package/dist/core/locks.js.map +1 -0
- package/dist/{internal/core → core}/operation_state.d.ts +1 -1
- package/dist/core/operation_state.d.ts.map +1 -0
- package/dist/core/operation_state.js.map +1 -0
- package/dist/{internal/core → core}/remote.d.ts +1 -1
- package/dist/core/remote.d.ts.map +1 -0
- package/dist/{internal/core → core}/remote.js +2 -2
- package/dist/core/remote.js.map +1 -0
- package/dist/{internal/core → core}/repository/parsers.d.ts +1 -1
- package/dist/core/repository/parsers.d.ts.map +1 -0
- package/dist/{internal/core → core}/repository/parsers.js +1 -1
- package/dist/core/repository/parsers.js.map +1 -0
- package/dist/{internal/core → core}/repository.d.ts +1 -1
- package/dist/core/repository.d.ts.map +1 -0
- package/dist/{internal/core → core}/repository.js +3 -3
- package/dist/core/repository.js.map +1 -0
- package/dist/{internal/core → core}/run_git/env.d.ts +1 -1
- package/dist/core/run_git/env.d.ts.map +1 -0
- package/dist/{internal/core → core}/run_git/env.js +2 -2
- package/dist/core/run_git/env.js.map +1 -0
- package/dist/{internal/core → core}/run_git/process.d.ts +1 -1
- package/dist/core/run_git/process.d.ts.map +1 -0
- package/dist/{internal/core → core}/run_git/process.js +1 -1
- package/dist/core/run_git/process.js.map +1 -0
- package/dist/{internal/core → core}/run_git/repository_setup.d.ts +1 -1
- package/dist/core/run_git/repository_setup.d.ts.map +1 -0
- package/dist/{internal/core → core}/run_git/repository_setup.js +2 -2
- package/dist/core/run_git/repository_setup.js.map +1 -0
- package/dist/{internal/core → core}/run_git.d.ts +1 -1
- package/dist/core/run_git.d.ts.map +1 -0
- package/dist/{internal/core → core}/run_git.js +1 -1
- package/dist/core/run_git.js.map +1 -0
- package/dist/{internal/core → core}/working_tree/mutate.d.ts +1 -1
- package/dist/core/working_tree/mutate.d.ts.map +1 -0
- package/dist/{internal/core → core}/working_tree/mutate.js +5 -5
- package/dist/core/working_tree/mutate.js.map +1 -0
- package/dist/{internal/core → core}/working_tree/read.d.ts +1 -1
- package/dist/core/working_tree/read.d.ts.map +1 -0
- package/dist/{internal/core → core}/working_tree/read.js +4 -4
- package/dist/core/working_tree/read.js.map +1 -0
- package/dist/{internal/core → core}/working_tree/shared.d.ts +1 -1
- package/dist/core/working_tree/shared.d.ts.map +1 -0
- package/dist/{internal/core → core}/working_tree/shared.js +4 -4
- package/dist/core/working_tree/shared.js.map +1 -0
- package/dist/core/working_tree.d.ts.map +1 -0
- package/dist/core/working_tree.js.map +1 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js.map +1 -0
- package/dist/frontend/js/utils/text.d.ts.map +1 -0
- package/dist/frontend/js/utils/text.js.map +1 -0
- package/dist/{internal/http → http}/handler/helpers.d.ts +1 -1
- package/dist/http/handler/helpers.d.ts.map +1 -0
- package/dist/{internal/http → http}/handler/helpers.js +2 -2
- package/dist/http/handler/helpers.js.map +1 -0
- package/dist/{internal/http → http}/handler.d.ts +1 -1
- package/dist/http/handler.d.ts.map +1 -0
- package/dist/{internal/http → http}/handler.js +2 -2
- package/dist/http/handler.js.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/logging.d.ts.map +1 -0
- package/dist/logging.js.map +1 -0
- package/dist/ssh/keys.d.ts.map +1 -0
- package/dist/{internal/ssh → ssh}/keys.js +2 -2
- package/dist/ssh/keys.js.map +1 -0
- package/dist/{internal/ssh → ssh}/server/audit.d.ts +2 -2
- package/dist/ssh/server/audit.d.ts.map +1 -0
- package/dist/ssh/server/audit.js.map +1 -0
- package/dist/{internal/ssh → ssh}/server/shared.d.ts +2 -2
- package/dist/ssh/server/shared.d.ts.map +1 -0
- package/dist/{internal/ssh → ssh}/server/shared.js +2 -2
- package/dist/ssh/server/shared.js.map +1 -0
- package/dist/{internal/ssh → ssh}/server.d.ts +1 -1
- package/dist/ssh/server.d.ts.map +1 -0
- package/dist/{internal/ssh → ssh}/server.js +2 -2
- package/dist/ssh/server.js.map +1 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/{internal/types → types}/common.js.map +1 -1
- package/dist/{internal/types → types}/forge.d.ts +5 -10
- package/dist/types/forge.d.ts.map +1 -0
- package/dist/{internal/types → types}/forge.js.map +1 -1
- package/dist/types/host/archive.d.ts.map +1 -0
- package/dist/types/host/archive.js.map +1 -0
- package/dist/types/host/options.d.ts.map +1 -0
- package/dist/types/host/options.js.map +1 -0
- package/dist/types/host/service.d.ts.map +1 -0
- package/dist/types/host/service.js.map +1 -0
- package/dist/types/host.d.ts.map +1 -0
- package/dist/{internal/types → types}/host.js.map +1 -1
- package/dist/types/index.d.ts.map +1 -0
- package/dist/{internal/types → types}/index.js.map +1 -1
- package/dist/types/repository/archive.d.ts.map +1 -0
- package/dist/types/repository/archive.js.map +1 -0
- package/dist/types/repository/core.d.ts.map +1 -0
- package/dist/types/repository/core.js.map +1 -0
- package/dist/types/repository/inspection.d.ts.map +1 -0
- package/dist/types/repository/inspection.js.map +1 -0
- package/dist/types/repository.d.ts.map +1 -0
- package/dist/types/repository.js.map +1 -0
- package/dist/types/transports.d.ts.map +1 -0
- package/dist/types/transports.js.map +1 -0
- package/dist/{src/types.d.ts.map → types.d.ts.map} +1 -1
- package/dist/types.js.map +1 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/{internal/utils → utils}/paths.js +1 -1
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/text.d.ts.map +1 -0
- package/dist/utils/text.js.map +1 -0
- package/package.json +136 -186
- package/dist/browser/styles.css +0 -317
- package/dist/internal/api/forge/actions.d.ts.map +0 -1
- package/dist/internal/api/forge/archives.d.ts.map +0 -1
- package/dist/internal/api/forge/archives.js.map +0 -1
- package/dist/internal/api/forge/handler.d.ts.map +0 -1
- package/dist/internal/api/forge/handler.js.map +0 -1
- package/dist/internal/api/forge/route.d.ts.map +0 -1
- package/dist/internal/api/forge/route.js.map +0 -1
- package/dist/internal/api/forge/runtime.d.ts.map +0 -1
- package/dist/internal/api/forge/runtime.js.map +0 -1
- package/dist/internal/api/forge/socket.d.ts.map +0 -1
- package/dist/internal/api/forge/socket.js.map +0 -1
- package/dist/internal/api/handler/action.d.ts +0 -5
- package/dist/internal/api/handler/action.d.ts.map +0 -1
- package/dist/internal/api/handler/action.js.map +0 -1
- package/dist/internal/api/handler/archive.d.ts.map +0 -1
- package/dist/internal/api/handler/archive.js.map +0 -1
- package/dist/internal/api/handler/response.d.ts.map +0 -1
- package/dist/internal/api/handler/response.js.map +0 -1
- package/dist/internal/api/handler/route.d.ts.map +0 -1
- package/dist/internal/api/handler/route.js.map +0 -1
- package/dist/internal/api/handler/runtime.d.ts.map +0 -1
- package/dist/internal/api/handler/runtime.js.map +0 -1
- package/dist/internal/api/handler.d.ts.map +0 -1
- package/dist/internal/api/handler.js.map +0 -1
- package/dist/internal/api/routing.d.ts.map +0 -1
- package/dist/internal/api/routing.js.map +0 -1
- package/dist/internal/api/socket/events.d.ts.map +0 -1
- package/dist/internal/api/socket/events.js.map +0 -1
- package/dist/internal/api/socket/server.d.ts.map +0 -1
- package/dist/internal/api/socket/server.js.map +0 -1
- package/dist/internal/backend/utils/normalize.d.ts.map +0 -1
- package/dist/internal/backend/utils/normalize.js.map +0 -1
- package/dist/internal/backend/utils/object.d.ts.map +0 -1
- package/dist/internal/backend/utils/object.js.map +0 -1
- package/dist/internal/backend/utils/time.d.ts.map +0 -1
- package/dist/internal/backend/utils/time.js.map +0 -1
- package/dist/internal/browser/index.d.ts +0 -78
- package/dist/internal/browser/index.d.ts.map +0 -1
- package/dist/internal/browser/index.js +0 -1365
- package/dist/internal/browser/index.js.map +0 -1
- package/dist/internal/constants.d.ts.map +0 -1
- package/dist/internal/constants.js.map +0 -1
- package/dist/internal/core/activity.d.ts.map +0 -1
- package/dist/internal/core/activity.js.map +0 -1
- package/dist/internal/core/archive.d.ts.map +0 -1
- package/dist/internal/core/archive.js.map +0 -1
- package/dist/internal/core/archive_cache_filesystem.d.ts.map +0 -1
- package/dist/internal/core/archive_cache_filesystem.js.map +0 -1
- package/dist/internal/core/create/git/forge.d.ts +0 -4
- package/dist/internal/core/create/git/forge.d.ts.map +0 -1
- package/dist/internal/core/create/git/forge.js.map +0 -1
- package/dist/internal/core/create/git/host.d.ts +0 -4
- package/dist/internal/core/create/git/host.d.ts.map +0 -1
- package/dist/internal/core/create/git/host.js.map +0 -1
- package/dist/internal/core/create_git_host/branch_methods.d.ts.map +0 -1
- package/dist/internal/core/create_git_host/branch_methods.js.map +0 -1
- package/dist/internal/core/create_git_host/content_methods.d.ts.map +0 -1
- package/dist/internal/core/create_git_host/content_methods.js.map +0 -1
- package/dist/internal/core/create_git_host/remote_methods.d.ts.map +0 -1
- package/dist/internal/core/create_git_host/remote_methods.js.map +0 -1
- package/dist/internal/core/create_git_host/shared.d.ts.map +0 -1
- package/dist/internal/core/create_git_host/shared.js.map +0 -1
- package/dist/internal/core/create_git_host/working_tree_methods.d.ts.map +0 -1
- package/dist/internal/core/create_git_host/working_tree_methods.js.map +0 -1
- package/dist/internal/core/forge_actions.d.ts.map +0 -1
- package/dist/internal/core/forge_actions.js.map +0 -1
- package/dist/internal/core/git_forge/storage_memory.d.ts.map +0 -1
- package/dist/internal/core/git_forge/storage_memory.js.map +0 -1
- package/dist/internal/core/inspect/helpers.d.ts.map +0 -1
- package/dist/internal/core/inspect/helpers.js.map +0 -1
- package/dist/internal/core/inspect/icon_theme.d.ts.map +0 -1
- package/dist/internal/core/inspect/icon_theme.js.map +0 -1
- package/dist/internal/core/inspect/linguist_progress.d.ts.map +0 -1
- package/dist/internal/core/inspect/linguist_progress.js.map +0 -1
- package/dist/internal/core/inspect.d.ts.map +0 -1
- package/dist/internal/core/inspect.js.map +0 -1
- package/dist/internal/core/inspection.d.ts.map +0 -1
- package/dist/internal/core/inspection.js.map +0 -1
- package/dist/internal/core/locks.d.ts.map +0 -1
- package/dist/internal/core/locks.js.map +0 -1
- package/dist/internal/core/operation_state.d.ts.map +0 -1
- package/dist/internal/core/operation_state.js.map +0 -1
- package/dist/internal/core/remote.d.ts.map +0 -1
- package/dist/internal/core/remote.js.map +0 -1
- package/dist/internal/core/repository/parsers.d.ts.map +0 -1
- package/dist/internal/core/repository/parsers.js.map +0 -1
- package/dist/internal/core/repository.d.ts.map +0 -1
- package/dist/internal/core/repository.js.map +0 -1
- package/dist/internal/core/run_git/env.d.ts.map +0 -1
- package/dist/internal/core/run_git/env.js.map +0 -1
- package/dist/internal/core/run_git/process.d.ts.map +0 -1
- package/dist/internal/core/run_git/process.js.map +0 -1
- package/dist/internal/core/run_git/repository_setup.d.ts.map +0 -1
- package/dist/internal/core/run_git/repository_setup.js.map +0 -1
- package/dist/internal/core/run_git.d.ts.map +0 -1
- package/dist/internal/core/run_git.js.map +0 -1
- package/dist/internal/core/working_tree/mutate.d.ts.map +0 -1
- package/dist/internal/core/working_tree/mutate.js.map +0 -1
- package/dist/internal/core/working_tree/read.d.ts.map +0 -1
- package/dist/internal/core/working_tree/read.js.map +0 -1
- package/dist/internal/core/working_tree/shared.d.ts.map +0 -1
- package/dist/internal/core/working_tree/shared.js.map +0 -1
- package/dist/internal/core/working_tree.d.ts.map +0 -1
- package/dist/internal/core/working_tree.js.map +0 -1
- package/dist/internal/errors.d.ts.map +0 -1
- package/dist/internal/errors.js.map +0 -1
- package/dist/internal/frontend/js/utils/text.d.ts.map +0 -1
- package/dist/internal/frontend/js/utils/text.js.map +0 -1
- package/dist/internal/http/handler/helpers.d.ts.map +0 -1
- package/dist/internal/http/handler/helpers.js.map +0 -1
- package/dist/internal/http/handler.d.ts.map +0 -1
- package/dist/internal/http/handler.js.map +0 -1
- package/dist/internal/index.d.ts.map +0 -1
- package/dist/internal/index.js.map +0 -1
- package/dist/internal/logging.d.ts.map +0 -1
- package/dist/internal/logging.js.map +0 -1
- package/dist/internal/react/client/error.d.ts +0 -14
- package/dist/internal/react/client/error.d.ts.map +0 -1
- package/dist/internal/react/client/error.js +0 -32
- package/dist/internal/react/client/error.js.map +0 -1
- package/dist/internal/react/client/helpers.d.ts +0 -12
- package/dist/internal/react/client/helpers.d.ts.map +0 -1
- package/dist/internal/react/client/helpers.js +0 -45
- package/dist/internal/react/client/helpers.js.map +0 -1
- package/dist/internal/react/client/types.d.ts +0 -275
- package/dist/internal/react/client/types.d.ts.map +0 -1
- package/dist/internal/react/client/types.js.map +0 -1
- package/dist/internal/react/client.d.ts +0 -6
- package/dist/internal/react/client.d.ts.map +0 -1
- package/dist/internal/react/client.js +0 -744
- package/dist/internal/react/client.js.map +0 -1
- package/dist/internal/react/components.d.ts +0 -44412
- package/dist/internal/react/components.d.ts.map +0 -1
- package/dist/internal/react/components.js +0 -759
- package/dist/internal/react/components.js.map +0 -1
- package/dist/internal/react/hooks/query.d.ts +0 -14
- package/dist/internal/react/hooks/query.d.ts.map +0 -1
- package/dist/internal/react/hooks/query.js +0 -139
- package/dist/internal/react/hooks/query.js.map +0 -1
- package/dist/internal/react/hooks/resources.d.ts +0 -116
- package/dist/internal/react/hooks/resources.d.ts.map +0 -1
- package/dist/internal/react/hooks/resources.js +0 -600
- package/dist/internal/react/hooks/resources.js.map +0 -1
- package/dist/internal/react/hooks/types.d.ts +0 -86
- package/dist/internal/react/hooks/types.d.ts.map +0 -1
- package/dist/internal/react/hooks/types.js +0 -2
- package/dist/internal/react/hooks/types.js.map +0 -1
- package/dist/internal/react/hooks.d.ts +0 -4
- package/dist/internal/react/hooks.d.ts.map +0 -1
- package/dist/internal/react/hooks.js +0 -3
- package/dist/internal/react/hooks.js.map +0 -1
- package/dist/internal/react/index.d.ts +0 -8
- package/dist/internal/react/index.d.ts.map +0 -1
- package/dist/internal/react/index.js +0 -5
- package/dist/internal/react/index.js.map +0 -1
- package/dist/internal/react/ui/context.d.ts +0 -1918
- package/dist/internal/react/ui/context.d.ts.map +0 -1
- package/dist/internal/react/ui/context.js +0 -192
- package/dist/internal/react/ui/context.js.map +0 -1
- package/dist/internal/ssh/keys.d.ts.map +0 -1
- package/dist/internal/ssh/keys.js.map +0 -1
- package/dist/internal/ssh/server/audit.d.ts.map +0 -1
- package/dist/internal/ssh/server/audit.js.map +0 -1
- package/dist/internal/ssh/server/shared.d.ts.map +0 -1
- package/dist/internal/ssh/server/shared.js.map +0 -1
- package/dist/internal/ssh/server.d.ts.map +0 -1
- package/dist/internal/ssh/server.js.map +0 -1
- package/dist/internal/types/common.d.ts.map +0 -1
- package/dist/internal/types/forge.d.ts.map +0 -1
- package/dist/internal/types/host/archive.d.ts.map +0 -1
- package/dist/internal/types/host/archive.js.map +0 -1
- package/dist/internal/types/host/options.d.ts.map +0 -1
- package/dist/internal/types/host/options.js.map +0 -1
- package/dist/internal/types/host/service.d.ts.map +0 -1
- package/dist/internal/types/host/service.js.map +0 -1
- package/dist/internal/types/host.d.ts.map +0 -1
- package/dist/internal/types/index.d.ts.map +0 -1
- package/dist/internal/types/repository/archive.d.ts.map +0 -1
- package/dist/internal/types/repository/archive.js.map +0 -1
- package/dist/internal/types/repository/core.d.ts.map +0 -1
- package/dist/internal/types/repository/core.js.map +0 -1
- package/dist/internal/types/repository/inspection.d.ts.map +0 -1
- package/dist/internal/types/repository/inspection.js.map +0 -1
- package/dist/internal/types/repository.d.ts.map +0 -1
- package/dist/internal/types/repository.js.map +0 -1
- package/dist/internal/types/transports.d.ts.map +0 -1
- package/dist/internal/types/transports.js.map +0 -1
- package/dist/internal/types.d.ts.map +0 -1
- package/dist/internal/types.js +0 -2
- package/dist/internal/types.js.map +0 -1
- package/dist/internal/utils/paths.d.ts.map +0 -1
- package/dist/internal/utils/paths.js.map +0 -1
- package/dist/internal/utils/text.d.ts.map +0 -1
- package/dist/internal/utils/text.js.map +0 -1
- package/dist/src/api/forge/handler.d.ts +0 -2
- package/dist/src/api/forge/handler.d.ts.map +0 -1
- package/dist/src/api/forge/handler.js +0 -2
- package/dist/src/api/forge/handler.js.map +0 -1
- package/dist/src/api/forge/route.d.ts +0 -2
- package/dist/src/api/forge/route.d.ts.map +0 -1
- package/dist/src/api/forge/route.js +0 -2
- package/dist/src/api/forge/route.js.map +0 -1
- package/dist/src/api/handler/action.d.ts +0 -2
- package/dist/src/api/handler/action.d.ts.map +0 -1
- package/dist/src/api/handler/action.js +0 -2
- package/dist/src/api/handler/action.js.map +0 -1
- package/dist/src/api/handler/archive.d.ts +0 -2
- package/dist/src/api/handler/archive.d.ts.map +0 -1
- package/dist/src/api/handler/archive.js +0 -2
- package/dist/src/api/handler/archive.js.map +0 -1
- package/dist/src/api/handler/response.d.ts +0 -2
- package/dist/src/api/handler/response.d.ts.map +0 -1
- package/dist/src/api/handler/response.js +0 -2
- package/dist/src/api/handler/response.js.map +0 -1
- package/dist/src/api/handler/route.d.ts +0 -2
- package/dist/src/api/handler/route.d.ts.map +0 -1
- package/dist/src/api/handler/route.js +0 -2
- package/dist/src/api/handler/route.js.map +0 -1
- package/dist/src/api/handler.d.ts +0 -2
- package/dist/src/api/handler.d.ts.map +0 -1
- package/dist/src/api/handler.js +0 -2
- package/dist/src/api/handler.js.map +0 -1
- package/dist/src/api/socket/events.d.ts +0 -2
- package/dist/src/api/socket/events.d.ts.map +0 -1
- package/dist/src/api/socket/events.js +0 -2
- package/dist/src/api/socket/events.js.map +0 -1
- package/dist/src/api/socket/server.d.ts +0 -2
- package/dist/src/api/socket/server.d.ts.map +0 -1
- package/dist/src/api/socket/server.js +0 -2
- package/dist/src/api/socket/server.js.map +0 -1
- package/dist/src/backend/utils/normalize.d.ts +0 -2
- package/dist/src/backend/utils/normalize.d.ts.map +0 -1
- package/dist/src/backend/utils/normalize.js +0 -4
- package/dist/src/backend/utils/normalize.js.map +0 -1
- package/dist/src/backend/utils/object.d.ts +0 -3
- package/dist/src/backend/utils/object.d.ts.map +0 -1
- package/dist/src/backend/utils/object.js +0 -12
- package/dist/src/backend/utils/object.js.map +0 -1
- package/dist/src/backend/utils/time.d.ts +0 -3
- package/dist/src/backend/utils/time.d.ts.map +0 -1
- package/dist/src/backend/utils/time.js +0 -7
- package/dist/src/backend/utils/time.js.map +0 -1
- package/dist/src/browser/index.d.ts +0 -2
- package/dist/src/browser/index.d.ts.map +0 -1
- package/dist/src/browser/index.js +0 -2
- package/dist/src/browser/index.js.map +0 -1
- package/dist/src/constants.d.ts +0 -2
- package/dist/src/constants.d.ts.map +0 -1
- package/dist/src/constants.js +0 -2
- package/dist/src/constants.js.map +0 -1
- package/dist/src/core/archive.d.ts +0 -2
- package/dist/src/core/archive.d.ts.map +0 -1
- package/dist/src/core/archive.js +0 -2
- package/dist/src/core/archive.js.map +0 -1
- package/dist/src/core/archive_cache_filesystem.d.ts +0 -2
- package/dist/src/core/archive_cache_filesystem.d.ts.map +0 -1
- package/dist/src/core/archive_cache_filesystem.js +0 -2
- package/dist/src/core/archive_cache_filesystem.js.map +0 -1
- package/dist/src/core/create/git/forge.d.ts +0 -2
- package/dist/src/core/create/git/forge.d.ts.map +0 -1
- package/dist/src/core/create/git/forge.js +0 -2
- package/dist/src/core/create/git/forge.js.map +0 -1
- package/dist/src/core/create/git/host.d.ts +0 -2
- package/dist/src/core/create/git/host.d.ts.map +0 -1
- package/dist/src/core/create/git/host.js +0 -2
- package/dist/src/core/create/git/host.js.map +0 -1
- package/dist/src/core/create_git_host/branch_methods.d.ts +0 -2
- package/dist/src/core/create_git_host/branch_methods.d.ts.map +0 -1
- package/dist/src/core/create_git_host/branch_methods.js +0 -2
- package/dist/src/core/create_git_host/branch_methods.js.map +0 -1
- package/dist/src/core/create_git_host/content_methods.d.ts +0 -2
- package/dist/src/core/create_git_host/content_methods.d.ts.map +0 -1
- package/dist/src/core/create_git_host/content_methods.js +0 -2
- package/dist/src/core/create_git_host/content_methods.js.map +0 -1
- package/dist/src/core/create_git_host/remote_methods.d.ts +0 -2
- package/dist/src/core/create_git_host/remote_methods.d.ts.map +0 -1
- package/dist/src/core/create_git_host/remote_methods.js +0 -2
- package/dist/src/core/create_git_host/remote_methods.js.map +0 -1
- package/dist/src/core/create_git_host/shared.d.ts +0 -2
- package/dist/src/core/create_git_host/shared.d.ts.map +0 -1
- package/dist/src/core/create_git_host/shared.js +0 -2
- package/dist/src/core/create_git_host/shared.js.map +0 -1
- package/dist/src/core/create_git_host/working_tree_methods.d.ts +0 -2
- package/dist/src/core/create_git_host/working_tree_methods.d.ts.map +0 -1
- package/dist/src/core/create_git_host/working_tree_methods.js +0 -2
- package/dist/src/core/create_git_host/working_tree_methods.js.map +0 -1
- package/dist/src/core/git_forge/storage_memory.d.ts +0 -2
- package/dist/src/core/git_forge/storage_memory.d.ts.map +0 -1
- package/dist/src/core/git_forge/storage_memory.js +0 -2
- package/dist/src/core/git_forge/storage_memory.js.map +0 -1
- package/dist/src/core/inspect/helpers.d.ts +0 -2
- package/dist/src/core/inspect/helpers.d.ts.map +0 -1
- package/dist/src/core/inspect/helpers.js +0 -2
- package/dist/src/core/inspect/helpers.js.map +0 -1
- package/dist/src/core/inspect/icon_theme.d.ts +0 -2
- package/dist/src/core/inspect/icon_theme.d.ts.map +0 -1
- package/dist/src/core/inspect/icon_theme.js +0 -2
- package/dist/src/core/inspect/icon_theme.js.map +0 -1
- package/dist/src/core/inspect/linguist_progress.d.ts +0 -2
- package/dist/src/core/inspect/linguist_progress.d.ts.map +0 -1
- package/dist/src/core/inspect/linguist_progress.js +0 -2
- package/dist/src/core/inspect/linguist_progress.js.map +0 -1
- package/dist/src/core/inspect.d.ts +0 -2
- package/dist/src/core/inspect.d.ts.map +0 -1
- package/dist/src/core/inspect.js +0 -2
- package/dist/src/core/inspect.js.map +0 -1
- package/dist/src/core/inspection.d.ts +0 -2
- package/dist/src/core/inspection.d.ts.map +0 -1
- package/dist/src/core/inspection.js +0 -2
- package/dist/src/core/inspection.js.map +0 -1
- package/dist/src/core/locks.d.ts +0 -2
- package/dist/src/core/locks.d.ts.map +0 -1
- package/dist/src/core/locks.js +0 -2
- package/dist/src/core/locks.js.map +0 -1
- package/dist/src/core/operation_state.d.ts +0 -2
- package/dist/src/core/operation_state.d.ts.map +0 -1
- package/dist/src/core/operation_state.js +0 -2
- package/dist/src/core/operation_state.js.map +0 -1
- package/dist/src/core/remote.d.ts +0 -2
- package/dist/src/core/remote.d.ts.map +0 -1
- package/dist/src/core/remote.js +0 -2
- package/dist/src/core/remote.js.map +0 -1
- package/dist/src/core/repository/parsers.d.ts +0 -2
- package/dist/src/core/repository/parsers.d.ts.map +0 -1
- package/dist/src/core/repository/parsers.js +0 -2
- package/dist/src/core/repository/parsers.js.map +0 -1
- package/dist/src/core/repository.d.ts +0 -2
- package/dist/src/core/repository.d.ts.map +0 -1
- package/dist/src/core/repository.js +0 -2
- package/dist/src/core/repository.js.map +0 -1
- package/dist/src/core/run_git/env.d.ts +0 -2
- package/dist/src/core/run_git/env.d.ts.map +0 -1
- package/dist/src/core/run_git/env.js +0 -2
- package/dist/src/core/run_git/env.js.map +0 -1
- package/dist/src/core/run_git/process.d.ts +0 -2
- package/dist/src/core/run_git/process.d.ts.map +0 -1
- package/dist/src/core/run_git/process.js +0 -2
- package/dist/src/core/run_git/process.js.map +0 -1
- package/dist/src/core/run_git/repository_setup.d.ts +0 -2
- package/dist/src/core/run_git/repository_setup.d.ts.map +0 -1
- package/dist/src/core/run_git/repository_setup.js +0 -2
- package/dist/src/core/run_git/repository_setup.js.map +0 -1
- package/dist/src/core/run_git.d.ts +0 -2
- package/dist/src/core/run_git.d.ts.map +0 -1
- package/dist/src/core/run_git.js +0 -2
- package/dist/src/core/run_git.js.map +0 -1
- package/dist/src/core/working_tree/mutate.d.ts +0 -2
- package/dist/src/core/working_tree/mutate.d.ts.map +0 -1
- package/dist/src/core/working_tree/mutate.js +0 -2
- package/dist/src/core/working_tree/mutate.js.map +0 -1
- package/dist/src/core/working_tree/read.d.ts +0 -2
- package/dist/src/core/working_tree/read.d.ts.map +0 -1
- package/dist/src/core/working_tree/read.js +0 -2
- package/dist/src/core/working_tree/read.js.map +0 -1
- package/dist/src/core/working_tree/shared.d.ts +0 -2
- package/dist/src/core/working_tree/shared.d.ts.map +0 -1
- package/dist/src/core/working_tree/shared.js +0 -2
- package/dist/src/core/working_tree/shared.js.map +0 -1
- package/dist/src/core/working_tree.d.ts +0 -2
- package/dist/src/core/working_tree.d.ts.map +0 -1
- package/dist/src/core/working_tree.js +0 -2
- package/dist/src/core/working_tree.js.map +0 -1
- package/dist/src/errors.d.ts +0 -2
- package/dist/src/errors.d.ts.map +0 -1
- package/dist/src/errors.js +0 -2
- package/dist/src/errors.js.map +0 -1
- package/dist/src/frontend/js/utils/text.d.ts +0 -2
- package/dist/src/frontend/js/utils/text.d.ts.map +0 -1
- package/dist/src/frontend/js/utils/text.js +0 -4
- package/dist/src/frontend/js/utils/text.js.map +0 -1
- package/dist/src/http/handler/helpers.d.ts +0 -2
- package/dist/src/http/handler/helpers.d.ts.map +0 -1
- package/dist/src/http/handler/helpers.js +0 -2
- package/dist/src/http/handler/helpers.js.map +0 -1
- package/dist/src/http/handler.d.ts +0 -2
- package/dist/src/http/handler.d.ts.map +0 -1
- package/dist/src/http/handler.js +0 -2
- package/dist/src/http/handler.js.map +0 -1
- package/dist/src/index.d.ts +0 -2
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -2
- package/dist/src/index.js.map +0 -1
- package/dist/src/logging.d.ts +0 -2
- package/dist/src/logging.d.ts.map +0 -1
- package/dist/src/logging.js +0 -2
- package/dist/src/logging.js.map +0 -1
- package/dist/src/react/client/error.d.ts +0 -2
- package/dist/src/react/client/error.d.ts.map +0 -1
- package/dist/src/react/client/error.js +0 -2
- package/dist/src/react/client/error.js.map +0 -1
- package/dist/src/react/client/helpers.d.ts +0 -2
- package/dist/src/react/client/helpers.d.ts.map +0 -1
- package/dist/src/react/client/helpers.js +0 -2
- package/dist/src/react/client/helpers.js.map +0 -1
- package/dist/src/react/client/types.d.ts +0 -2
- package/dist/src/react/client/types.d.ts.map +0 -1
- package/dist/src/react/client/types.js +0 -2
- package/dist/src/react/client/types.js.map +0 -1
- package/dist/src/react/client.d.ts +0 -2
- package/dist/src/react/client.d.ts.map +0 -1
- package/dist/src/react/client.js +0 -2
- package/dist/src/react/client.js.map +0 -1
- package/dist/src/react/components.d.ts +0 -2
- package/dist/src/react/components.d.ts.map +0 -1
- package/dist/src/react/components.js +0 -2
- package/dist/src/react/components.js.map +0 -1
- package/dist/src/react/hooks/query.d.ts +0 -2
- package/dist/src/react/hooks/query.d.ts.map +0 -1
- package/dist/src/react/hooks/query.js +0 -2
- package/dist/src/react/hooks/query.js.map +0 -1
- package/dist/src/react/hooks/resources.d.ts +0 -2
- package/dist/src/react/hooks/resources.d.ts.map +0 -1
- package/dist/src/react/hooks/resources.js +0 -2
- package/dist/src/react/hooks/resources.js.map +0 -1
- package/dist/src/react/hooks/types.d.ts +0 -2
- package/dist/src/react/hooks/types.d.ts.map +0 -1
- package/dist/src/react/hooks/types.js +0 -2
- package/dist/src/react/hooks/types.js.map +0 -1
- package/dist/src/react/hooks.d.ts +0 -2
- package/dist/src/react/hooks.d.ts.map +0 -1
- package/dist/src/react/hooks.js +0 -2
- package/dist/src/react/hooks.js.map +0 -1
- package/dist/src/react/index.d.ts +0 -2
- package/dist/src/react/index.d.ts.map +0 -1
- package/dist/src/react/index.js +0 -2
- package/dist/src/react/index.js.map +0 -1
- package/dist/src/react/ui/context.d.ts +0 -2
- package/dist/src/react/ui/context.d.ts.map +0 -1
- package/dist/src/react/ui/context.js +0 -2
- package/dist/src/react/ui/context.js.map +0 -1
- package/dist/src/ssh/keys.d.ts +0 -2
- package/dist/src/ssh/keys.d.ts.map +0 -1
- package/dist/src/ssh/keys.js +0 -2
- package/dist/src/ssh/keys.js.map +0 -1
- package/dist/src/ssh/server/audit.d.ts +0 -2
- package/dist/src/ssh/server/audit.d.ts.map +0 -1
- package/dist/src/ssh/server/audit.js +0 -2
- package/dist/src/ssh/server/audit.js.map +0 -1
- package/dist/src/ssh/server/shared.d.ts +0 -2
- package/dist/src/ssh/server/shared.d.ts.map +0 -1
- package/dist/src/ssh/server/shared.js +0 -2
- package/dist/src/ssh/server/shared.js.map +0 -1
- package/dist/src/ssh/server.d.ts +0 -2
- package/dist/src/ssh/server.d.ts.map +0 -1
- package/dist/src/ssh/server.js +0 -2
- package/dist/src/ssh/server.js.map +0 -1
- package/dist/src/types/common.d.ts +0 -2
- package/dist/src/types/common.d.ts.map +0 -1
- package/dist/src/types/common.js +0 -2
- package/dist/src/types/common.js.map +0 -1
- package/dist/src/types/forge.d.ts +0 -2
- package/dist/src/types/forge.d.ts.map +0 -1
- package/dist/src/types/forge.js +0 -2
- package/dist/src/types/forge.js.map +0 -1
- package/dist/src/types/host.d.ts +0 -2
- package/dist/src/types/host.d.ts.map +0 -1
- package/dist/src/types/host.js +0 -2
- package/dist/src/types/host.js.map +0 -1
- package/dist/src/types/index.d.ts +0 -2
- package/dist/src/types/index.d.ts.map +0 -1
- package/dist/src/types/index.js +0 -2
- package/dist/src/types/index.js.map +0 -1
- package/dist/src/types/repository.d.ts +0 -2
- package/dist/src/types/repository.d.ts.map +0 -1
- package/dist/src/types/repository.js +0 -2
- package/dist/src/types/repository.js.map +0 -1
- package/dist/src/types/transports.d.ts +0 -2
- package/dist/src/types/transports.d.ts.map +0 -1
- package/dist/src/types/transports.js +0 -2
- package/dist/src/types/transports.js.map +0 -1
- package/dist/src/types.d.ts +0 -2
- package/dist/src/types.js +0 -2
- package/dist/src/types.js.map +0 -1
- package/dist/src/utils/paths.d.ts +0 -2
- package/dist/src/utils/paths.d.ts.map +0 -1
- package/dist/src/utils/paths.js +0 -2
- package/dist/src/utils/paths.js.map +0 -1
- package/dist/src/utils/text.d.ts +0 -2
- package/dist/src/utils/text.d.ts.map +0 -1
- package/dist/src/utils/text.js +0 -2
- package/dist/src/utils/text.js.map +0 -1
- /package/dist/{internal/api → api}/handler/archive.js +0 -0
- /package/dist/{internal/api → api}/handler/response.d.ts +0 -0
- /package/dist/{internal/api → api}/handler/route.d.ts +0 -0
- /package/dist/{internal/api → api}/handler.js +0 -0
- /package/dist/{internal/api → api}/routing.d.ts +0 -0
- /package/dist/{internal/api → api}/socket/events.d.ts +0 -0
- /package/dist/{internal/api → api}/socket/events.js +0 -0
- /package/dist/{internal/backend → backend}/utils/normalize.d.ts +0 -0
- /package/dist/{internal/backend → backend}/utils/normalize.js +0 -0
- /package/dist/{internal/backend → backend}/utils/object.d.ts +0 -0
- /package/dist/{internal/backend → backend}/utils/object.js +0 -0
- /package/dist/{internal/backend → backend}/utils/time.d.ts +0 -0
- /package/dist/{internal/backend → backend}/utils/time.js +0 -0
- /package/dist/{internal/constants.d.ts → constants.d.ts} +0 -0
- /package/dist/{internal/constants.js → constants.js} +0 -0
- /package/dist/{internal/core → core}/archive_cache_filesystem.js +0 -0
- /package/dist/{internal/core → core}/locks.d.ts +0 -0
- /package/dist/{internal/core → core}/locks.js +0 -0
- /package/dist/{internal/core → core}/operation_state.js +0 -0
- /package/dist/{internal/core → core}/working_tree.d.ts +0 -0
- /package/dist/{internal/core → core}/working_tree.js +0 -0
- /package/dist/{internal/errors.d.ts → errors.d.ts} +0 -0
- /package/dist/{internal/errors.js → errors.js} +0 -0
- /package/dist/{internal/frontend → frontend}/js/utils/text.d.ts +0 -0
- /package/dist/{internal/frontend → frontend}/js/utils/text.js +0 -0
- /package/dist/{internal/index.d.ts → index.d.ts} +0 -0
- /package/dist/{internal/index.js → index.js} +0 -0
- /package/dist/{internal/logging.d.ts → logging.d.ts} +0 -0
- /package/dist/{internal/logging.js → logging.js} +0 -0
- /package/dist/{internal/ssh → ssh}/keys.d.ts +0 -0
- /package/dist/{internal/ssh → ssh}/server/audit.js +0 -0
- /package/dist/{internal/types → types}/common.d.ts +0 -0
- /package/dist/{internal/types → types}/common.js +0 -0
- /package/dist/{internal/types → types}/forge.js +0 -0
- /package/dist/{internal/types → types}/host/archive.d.ts +0 -0
- /package/dist/{internal/types → types}/host/archive.js +0 -0
- /package/dist/{internal/types → types}/host/options.d.ts +0 -0
- /package/dist/{internal/types → types}/host/options.js +0 -0
- /package/dist/{internal/types → types}/host/service.d.ts +0 -0
- /package/dist/{internal/types → types}/host/service.js +0 -0
- /package/dist/{internal/types → types}/host.d.ts +0 -0
- /package/dist/{internal/types → types}/host.js +0 -0
- /package/dist/{internal/types → types}/index.d.ts +0 -0
- /package/dist/{internal/types → types}/index.js +0 -0
- /package/dist/{internal/types → types}/repository/archive.d.ts +0 -0
- /package/dist/{internal/types → types}/repository/archive.js +0 -0
- /package/dist/{internal/types → types}/repository/core.d.ts +0 -0
- /package/dist/{internal/types → types}/repository/core.js +0 -0
- /package/dist/{internal/types → types}/repository/inspection.d.ts +0 -0
- /package/dist/{internal/types → types}/repository/inspection.js +0 -0
- /package/dist/{internal/types → types}/repository.d.ts +0 -0
- /package/dist/{internal/types → types}/repository.js +0 -0
- /package/dist/{internal/types → types}/transports.d.ts +0 -0
- /package/dist/{internal/types → types}/transports.js +0 -0
- /package/dist/{internal/types.d.ts → types.d.ts} +0 -0
- /package/dist/{internal/react/client/types.js → types.js} +0 -0
- /package/dist/{internal/utils → utils}/paths.d.ts +0 -0
- /package/dist/{internal/utils → utils}/text.d.ts +0 -0
- /package/dist/{internal/utils → utils}/text.js +0 -0
package/README.md
CHANGED
|
@@ -1,60 +1,43 @@
|
|
|
1
1
|
# @trebired/git-host
|
|
2
2
|
|
|
3
|
-
Embeddable Git forge for Node.js and Bun apps with real Git CLI execution, smart HTTP and SSH transports, repository
|
|
3
|
+
Embeddable Git host and forge for Node.js and Bun apps with real Git CLI execution, smart HTTP and SSH transports, repository APIs, normalized repository activity, and repository-owned Actions workflows.
|
|
4
4
|
|
|
5
|
-
`@trebired/git-host`
|
|
5
|
+
`@trebired/git-host` is meant for larger self-hosted products that already own users, permissions, storage, and UI, but do not want to keep rebuilding the Git and forge layer underneath them.
|
|
6
6
|
|
|
7
|
-
It is
|
|
7
|
+
It is:
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
- a reusable Git host/runtime layer for your app
|
|
10
|
+
- a forge layer with releases, forks, social state, activity, and Actions
|
|
11
|
+
- built on the real `git` binary
|
|
10
12
|
|
|
11
|
-
It
|
|
13
|
+
It is not:
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
- it is not a full hosted SaaS product with built-in accounts, billing, or platform ownership
|
|
17
|
-
- it is not a reimplementation of Git
|
|
18
|
-
- it uses the real `git` binary for the hard parts
|
|
15
|
+
- a hosted SaaS
|
|
16
|
+
- a fake in-memory Git implementation
|
|
17
|
+
- a frontend/UI package
|
|
19
18
|
|
|
20
19
|
## Install
|
|
21
20
|
|
|
22
|
-
Runtime support:
|
|
23
|
-
|
|
24
|
-
```sh
|
|
25
|
-
npm install @trebired/git-host
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
```sh
|
|
29
|
-
npm install @trebired/logger
|
|
30
|
-
```
|
|
21
|
+
Runtime support:
|
|
31
22
|
|
|
32
|
-
|
|
23
|
+
- Node.js 18+
|
|
24
|
+
- Bun 1+
|
|
25
|
+
- `git` available on the host
|
|
33
26
|
|
|
34
27
|
```sh
|
|
35
|
-
npm install
|
|
28
|
+
npm install @trebired/git-host
|
|
36
29
|
```
|
|
37
30
|
|
|
38
|
-
|
|
31
|
+
For the packaged Actions runner binaries, the npm package ships Linux GNU and macOS builds. If you are working locally from source, the runtime can also fall back to the TypeScript runner path when a packaged binary is not present.
|
|
39
32
|
|
|
40
|
-
|
|
41
|
-
npm install react
|
|
42
|
-
```
|
|
33
|
+
## Quick Start
|
|
43
34
|
|
|
44
35
|
```ts
|
|
45
36
|
import { createGitHost, resolveRepositoryPath } from "@trebired/git-host";
|
|
46
|
-
import { createLog } from "@trebired/logger";
|
|
47
|
-
|
|
48
|
-
const log = createLog({
|
|
49
|
-
console: true,
|
|
50
|
-
quiet: true,
|
|
51
|
-
save: false,
|
|
52
|
-
});
|
|
53
37
|
|
|
54
38
|
const repositoriesRoot = "/srv/git-workspaces";
|
|
55
39
|
|
|
56
40
|
const gitHost = createGitHost({
|
|
57
|
-
logger: log,
|
|
58
41
|
resolveRepository(repositoryId) {
|
|
59
42
|
return {
|
|
60
43
|
id: repositoryId,
|
|
@@ -68,1069 +51,263 @@ const gitHost = createGitHost({
|
|
|
68
51
|
|
|
69
52
|
await gitHost.ensureRepository("demo", {
|
|
70
53
|
actor: {
|
|
71
|
-
name: "Alice",
|
|
72
54
|
email: "alice@example.com",
|
|
55
|
+
name: "Alice",
|
|
73
56
|
},
|
|
74
57
|
});
|
|
75
58
|
|
|
76
59
|
const summary = await gitHost.readSummary("demo");
|
|
77
60
|
console.log(summary.repository.current_branch);
|
|
61
|
+
```
|
|
78
62
|
|
|
79
|
-
|
|
80
|
-
ref: "main",
|
|
81
|
-
onProgress(event) {
|
|
82
|
-
console.log(event.stage, event.percent);
|
|
83
|
-
},
|
|
84
|
-
});
|
|
85
|
-
console.log(linguist.languages.results);
|
|
86
|
-
|
|
87
|
-
const tree = await gitHost.listTree("demo", {
|
|
88
|
-
ref: "main",
|
|
89
|
-
recursive: true,
|
|
90
|
-
linguist: true,
|
|
91
|
-
icons: true,
|
|
92
|
-
});
|
|
93
|
-
console.log(tree[0]?.language, Boolean(tree[0]?.icon));
|
|
94
|
-
|
|
95
|
-
const tags = await gitHost.listTags("demo");
|
|
96
|
-
const blame = await gitHost.readBlame("demo", {
|
|
97
|
-
ref: "main",
|
|
98
|
-
path: "src/app.ts",
|
|
99
|
-
});
|
|
100
|
-
const search = await gitHost.search("demo", {
|
|
101
|
-
ref: "main",
|
|
102
|
-
path: "src",
|
|
103
|
-
query: "value",
|
|
104
|
-
});
|
|
105
|
-
const archive = await gitHost.readArchive("demo", {
|
|
106
|
-
ref: "main",
|
|
107
|
-
format: "tar.gz",
|
|
108
|
-
});
|
|
109
|
-
const archiveLinks = gitHost.resolveArchiveLinks("demo", {
|
|
110
|
-
basePath: "/api/git",
|
|
111
|
-
ref: "main",
|
|
112
|
-
});
|
|
113
|
-
console.log(tags.length, blame.lines[0]?.author_name, search.match_count, archive.file_name, archiveLinks.zip.href);
|
|
114
|
-
|
|
115
|
-
const inspectionTarget = await gitHost.resolveInspectionTarget("demo", {
|
|
116
|
-
ref: "auto",
|
|
117
|
-
});
|
|
118
|
-
console.log(inspectionTarget.state, inspectionTarget.resolved_ref);
|
|
119
|
-
|
|
120
|
-
const treeSnapshot = await gitHost.readTree("demo", {
|
|
121
|
-
ref: "auto",
|
|
122
|
-
recursive: true,
|
|
123
|
-
nested: true,
|
|
124
|
-
ascii: true,
|
|
125
|
-
icons: true,
|
|
126
|
-
linguist: true,
|
|
127
|
-
});
|
|
128
|
-
console.log(treeSnapshot.ascii);
|
|
129
|
-
|
|
130
|
-
const directorySnapshot = await gitHost.readDirectory("demo", {
|
|
131
|
-
path: "src",
|
|
132
|
-
ref: "auto",
|
|
133
|
-
icons: true,
|
|
134
|
-
linguist: true,
|
|
135
|
-
includeLineCounts: true,
|
|
136
|
-
});
|
|
137
|
-
console.log(directorySnapshot.kind);
|
|
63
|
+
## Actions Model
|
|
138
64
|
|
|
139
|
-
|
|
140
|
-
path: "src/app.ts",
|
|
141
|
-
ref: "auto",
|
|
142
|
-
includeLanguage: true,
|
|
143
|
-
includeIcon: true,
|
|
144
|
-
});
|
|
145
|
-
console.log(fileSnapshot.language, fileSnapshot.icon?.name);
|
|
146
|
-
|
|
147
|
-
const repositoryAnalysis = await gitHost.readRepositoryAnalysis("demo", {
|
|
148
|
-
ref: "auto",
|
|
149
|
-
icons: true,
|
|
150
|
-
nested: true,
|
|
151
|
-
ascii: true,
|
|
152
|
-
onProgress(event) {
|
|
153
|
-
console.log(event.phase, event.percent);
|
|
154
|
-
},
|
|
155
|
-
});
|
|
156
|
-
console.log(repositoryAnalysis.linguist.languages.results);
|
|
65
|
+
Repository Actions are repository-owned. Workflows are discovered from files committed inside the repository itself, not from top-level global records.
|
|
157
66
|
|
|
158
|
-
|
|
159
|
-
console.log(workingTree.unstaged_entries);
|
|
67
|
+
Default layout:
|
|
160
68
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
69
|
+
```text
|
|
70
|
+
<repository-worktree>/
|
|
71
|
+
.git-host/
|
|
72
|
+
workflows/
|
|
73
|
+
build.yml
|
|
74
|
+
release.yml
|
|
167
75
|
```
|
|
168
76
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
77
|
+
The `workflows/` directory is intentional. It keeps the model familiar and gives you room to add more package-owned repository metadata under the configurable root later.
|
|
78
|
+
|
|
79
|
+
### Workflow File
|
|
80
|
+
|
|
81
|
+
Example workflow file:
|
|
82
|
+
|
|
83
|
+
```yaml
|
|
84
|
+
name: Build and test
|
|
85
|
+
trigger: push
|
|
86
|
+
source:
|
|
87
|
+
branches:
|
|
88
|
+
- main
|
|
89
|
+
steps:
|
|
90
|
+
- name: Install
|
|
91
|
+
run: bun install
|
|
92
|
+
- name: Test
|
|
93
|
+
run: bun test
|
|
94
|
+
- name: Build
|
|
95
|
+
run: bun run build
|
|
96
|
+
```
|
|
175
97
|
|
|
176
|
-
|
|
177
|
-
console: true,
|
|
178
|
-
quiet: true,
|
|
179
|
-
save: false,
|
|
180
|
-
});
|
|
98
|
+
Supported trigger values in v1:
|
|
181
99
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
path: `/srv/git-workspaces/${repositoryId}/workspace`,
|
|
187
|
-
};
|
|
188
|
-
},
|
|
189
|
-
});
|
|
100
|
+
- `push`
|
|
101
|
+
- `release.create`
|
|
102
|
+
- `release.update`
|
|
103
|
+
- `manual`
|
|
190
104
|
|
|
191
|
-
|
|
192
|
-
basePath: "/git",
|
|
193
|
-
logger: log,
|
|
194
|
-
resolveRepository(repositoryKey) {
|
|
195
|
-
return {
|
|
196
|
-
id: repositoryKey,
|
|
197
|
-
path: `/srv/git-workspaces/${repositoryKey}/workspace`,
|
|
198
|
-
};
|
|
199
|
-
},
|
|
200
|
-
}));
|
|
105
|
+
Each workflow file is exposed through the forge API as a repository-owned workflow record. The stable workflow id is the repository-relative definition path, for example:
|
|
201
106
|
|
|
202
|
-
|
|
107
|
+
```text
|
|
108
|
+
.git-host/workflows/build.yml
|
|
203
109
|
```
|
|
204
110
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
```sh
|
|
208
|
-
git clone http://127.0.0.1:3000/git/demo.git
|
|
209
|
-
git push
|
|
210
|
-
```
|
|
111
|
+
### Custom Workflow Root
|
|
211
112
|
|
|
212
|
-
|
|
113
|
+
The root folder is configurable. The folder name does not have to stay `.git-host`.
|
|
213
114
|
|
|
214
115
|
```ts
|
|
215
|
-
import {
|
|
216
|
-
import { createLog } from "@trebired/logger";
|
|
217
|
-
|
|
218
|
-
const log = createLog({
|
|
219
|
-
console: true,
|
|
220
|
-
quiet: true,
|
|
221
|
-
save: false,
|
|
222
|
-
});
|
|
116
|
+
import { createGitForge } from "@trebired/git-host";
|
|
223
117
|
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
authenticate({ publicKey, username }) {
|
|
228
|
-
if (username !== "git") return null;
|
|
229
|
-
const account = findAccountBySshPublicKey(publicKey);
|
|
230
|
-
if (!account) return null;
|
|
231
|
-
return {
|
|
232
|
-
publicKey: account.publicKey,
|
|
233
|
-
remoteUser: account.username,
|
|
234
|
-
identity: account,
|
|
235
|
-
};
|
|
118
|
+
const forge = createGitForge({
|
|
119
|
+
actions: {
|
|
120
|
+
workflowRoot: ".ci",
|
|
236
121
|
},
|
|
237
|
-
|
|
122
|
+
createForkRepository({ upstreamRepositoryId }) {
|
|
238
123
|
return {
|
|
239
|
-
id:
|
|
240
|
-
path:
|
|
124
|
+
id: `${upstreamRepositoryId}-fork`,
|
|
125
|
+
path: resolveRepositoryPath({
|
|
126
|
+
rootDir: repositoriesRoot,
|
|
127
|
+
repositoryPath: `${upstreamRepositoryId}-fork/workspace`,
|
|
128
|
+
}),
|
|
241
129
|
};
|
|
242
130
|
},
|
|
131
|
+
gitHost,
|
|
132
|
+
storage,
|
|
243
133
|
});
|
|
244
|
-
|
|
245
|
-
sshServer.listen(2222, "0.0.0.0");
|
|
246
134
|
```
|
|
247
135
|
|
|
248
|
-
|
|
136
|
+
That makes the workflow layout:
|
|
249
137
|
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
|
|
138
|
+
```text
|
|
139
|
+
<repository-worktree>/
|
|
140
|
+
.ci/
|
|
141
|
+
workflows/
|
|
142
|
+
build.yml
|
|
253
143
|
```
|
|
254
144
|
|
|
255
|
-
|
|
145
|
+
You can also resolve the workflow root per repository:
|
|
256
146
|
|
|
257
147
|
```ts
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
const log = createLog({
|
|
263
|
-
console: true,
|
|
264
|
-
quiet: true,
|
|
265
|
-
save: false,
|
|
266
|
-
});
|
|
267
|
-
|
|
268
|
-
const gitHost = createGitHost({
|
|
269
|
-
resolveRepository(repositoryId) {
|
|
270
|
-
return {
|
|
271
|
-
id: repositoryId,
|
|
272
|
-
path: `/srv/git-workspaces/${repositoryId}/workspace`,
|
|
273
|
-
};
|
|
274
|
-
},
|
|
275
|
-
});
|
|
276
|
-
|
|
277
|
-
const apiServer = createServer(createGitApiHandler({
|
|
278
|
-
basePath: "/api/git",
|
|
279
|
-
gitHost,
|
|
280
|
-
logger: log,
|
|
281
|
-
authorize({ action, repositoryId }) {
|
|
282
|
-
return canReadRepository(repositoryId, action);
|
|
148
|
+
actions: {
|
|
149
|
+
async resolveWorkflowRoot(repositoryId) {
|
|
150
|
+
return repositoryId.startsWith("legacy-") ? ".ci" : ".git-host";
|
|
283
151
|
},
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
createGitApiSocketServer({
|
|
287
|
-
basePath: "/api/git",
|
|
288
|
-
gitHost,
|
|
289
|
-
httpServer: apiServer,
|
|
290
|
-
logger: log,
|
|
291
|
-
authorize({ action, repositoryId }) {
|
|
292
|
-
return canReadRepository(repositoryId, action);
|
|
293
|
-
},
|
|
294
|
-
});
|
|
295
|
-
|
|
296
|
-
apiServer.listen(3100);
|
|
152
|
+
}
|
|
297
153
|
```
|
|
298
154
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
```txt
|
|
302
|
-
GET /api/git/repositories/demo/summary
|
|
303
|
-
GET /api/git/repositories/demo/branches
|
|
304
|
-
GET /api/git/repositories/demo/commits?limit=20&ref=main&path=src/app.ts
|
|
305
|
-
GET /api/git/repositories/demo/commits/<commit-ref>
|
|
306
|
-
GET /api/git/repositories/demo/tags
|
|
307
|
-
GET /api/git/repositories/demo/tags/v1
|
|
308
|
-
GET /api/git/repositories/demo/tree?ref=HEAD&path=src&linguist=true&icons=true
|
|
309
|
-
GET /api/git/repositories/demo/linguist?ref=HEAD
|
|
310
|
-
GET /api/git/repositories/demo/blame?ref=HEAD&path=src/app.ts
|
|
311
|
-
GET /api/git/repositories/demo/search?ref=HEAD&path=src&query=value
|
|
312
|
-
GET /api/git/repositories/demo/archive?ref=HEAD&format=zip
|
|
313
|
-
GET /api/git/repositories/demo/archive?ref=HEAD&format=tar.gz
|
|
314
|
-
GET /api/git/repositories/demo/zipball/main
|
|
315
|
-
GET /api/git/repositories/demo/tarball/v1
|
|
316
|
-
GET /api/git/repositories/demo/blob?ref=HEAD&path=README.md
|
|
317
|
-
GET /api/git/repositories/demo/diff?baseRef=main&headRef=feature%2Fx&path=src
|
|
318
|
-
```
|
|
155
|
+
## Actions Execution
|
|
319
156
|
|
|
320
|
-
|
|
157
|
+
Workflow runs are persistent and repository-owned:
|
|
321
158
|
|
|
322
|
-
|
|
159
|
+
- workflows are loaded from the triggering ref/commit
|
|
160
|
+
- each run materializes an exact snapshot for that ref/commit
|
|
161
|
+
- steps run sequentially
|
|
162
|
+
- stdout and stderr are captured and persisted
|
|
163
|
+
- live run events are streamed over Socket.IO
|
|
164
|
+
- queued/running runs can be cancelled
|
|
323
165
|
|
|
324
|
-
|
|
325
|
-
- `tarball/:ref` streams a `tar.gz` archive.
|
|
326
|
-
- `readArchive()` still returns a base64 payload for JSON-first consumers.
|
|
327
|
-
- `resolveArchiveLinks()` builds typed download URLs for branches, tags, releases, and commit SHAs.
|
|
166
|
+
The runtime emits persisted run events such as:
|
|
328
167
|
|
|
329
|
-
|
|
168
|
+
- `run.accepted`
|
|
169
|
+
- `run.status`
|
|
170
|
+
- `step.started`
|
|
171
|
+
- `step.output`
|
|
172
|
+
- `step.heartbeat`
|
|
173
|
+
- `step.finished`
|
|
174
|
+
- `run.finished`
|
|
175
|
+
- `run.failed`
|
|
176
|
+
- `run.cancelled`
|
|
330
177
|
|
|
331
|
-
|
|
332
|
-
- Commit SHA downloads are the stable choice when you need predictable contents.
|
|
333
|
-
- The extracted root directory is commit-based, so the inner folder stays stable for a fixed commit even if the request came from a branch or tag name.
|
|
334
|
-
- The outer archive bytes are streamed and cached, but git-host does not promise byte-for-byte identical compression output forever unless you choose to enforce that at the cache/backend layer.
|
|
178
|
+
## Activity Integration
|
|
335
179
|
|
|
336
|
-
|
|
180
|
+
Repository activity is normalized and repository-owned. Activity entries are returned through the repository activity API and can be used to trigger workflows.
|
|
337
181
|
|
|
338
|
-
|
|
339
|
-
const archive = await gitHost.readArchive("demo", {
|
|
340
|
-
format: "zip",
|
|
341
|
-
ref: "main",
|
|
342
|
-
});
|
|
182
|
+
Examples of normalized kinds:
|
|
343
183
|
|
|
344
|
-
|
|
345
|
-
|
|
184
|
+
- `repository.push`
|
|
185
|
+
- `repository.pull`
|
|
186
|
+
- `repository.fetch`
|
|
187
|
+
- `release.create`
|
|
188
|
+
- `release.update`
|
|
189
|
+
- `release.delete`
|
|
190
|
+
- `repository.fork.create`
|
|
191
|
+
- `repository.fork.sync`
|
|
192
|
+
- `repository.star`
|
|
193
|
+
- `repository.unstar`
|
|
194
|
+
- `repository.watch`
|
|
195
|
+
- `repository.unwatch`
|
|
346
196
|
|
|
347
|
-
|
|
348
|
-
basePath: "/api/git",
|
|
349
|
-
ref: "main",
|
|
350
|
-
});
|
|
197
|
+
Push-triggered Actions can be created from:
|
|
351
198
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
199
|
+
- smart HTTP pushes
|
|
200
|
+
- SSH pushes
|
|
201
|
+
- programmatic host/forge push operations
|
|
355
202
|
|
|
356
|
-
|
|
203
|
+
## Smart HTTP And SSH
|
|
204
|
+
|
|
205
|
+
### HTTP
|
|
357
206
|
|
|
358
207
|
```ts
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
? `${label}-${ref}-${shortSha}.zip`
|
|
366
|
-
: `${label}-${ref}-${shortSha}.tar.gz`;
|
|
367
|
-
},
|
|
368
|
-
resolveRootDirectory({ repository, resolvedCommit }) {
|
|
369
|
-
return `${repository.id}-src-${resolvedCommit.slice(0, 12)}/`;
|
|
370
|
-
},
|
|
371
|
-
},
|
|
372
|
-
resolveRepository(repositoryId) {
|
|
208
|
+
import { createServer } from "node:http";
|
|
209
|
+
import { createGitHttpHandler } from "@trebired/git-host";
|
|
210
|
+
|
|
211
|
+
const server = createServer(createGitHttpHandler({
|
|
212
|
+
basePath: "/git",
|
|
213
|
+
resolveRepository(repositoryKey) {
|
|
373
214
|
return {
|
|
374
|
-
id:
|
|
375
|
-
path: `/srv/git-workspaces/${
|
|
215
|
+
id: repositoryKey,
|
|
216
|
+
path: `/srv/git-workspaces/${repositoryKey}/workspace`,
|
|
376
217
|
};
|
|
377
218
|
},
|
|
378
|
-
});
|
|
379
|
-
|
|
380
|
-
const preview = await gitHost.resolveArchive("demo", {
|
|
381
|
-
format: "tar.gz",
|
|
382
|
-
ref: "v1",
|
|
383
|
-
});
|
|
219
|
+
}));
|
|
384
220
|
|
|
385
|
-
|
|
386
|
-
console.log(preview.root_directory);
|
|
221
|
+
server.listen(3000);
|
|
387
222
|
```
|
|
388
223
|
|
|
389
|
-
|
|
224
|
+
### SSH
|
|
390
225
|
|
|
391
226
|
```ts
|
|
392
|
-
|
|
393
|
-
fileName: "demo-release.zip",
|
|
394
|
-
format: "zip",
|
|
395
|
-
ref: "v1",
|
|
396
|
-
rootDirectory: "demo-release/",
|
|
397
|
-
});
|
|
398
|
-
```
|
|
399
|
-
|
|
400
|
-
Custom archive URL generation for host-owned routes:
|
|
227
|
+
import { createGitSshServer } from "@trebired/git-host";
|
|
401
228
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
buildUrl({ format, ref, repositoryKey }) {
|
|
406
|
-
const route = format === "zip" ? "source.zip" : "source.tar.gz";
|
|
407
|
-
return `/projects/${encodeURIComponent(repositoryKey)}/refs/${encodeURIComponent(ref)}/${route}`;
|
|
408
|
-
},
|
|
409
|
-
},
|
|
410
|
-
resolveRepository(repositoryId) {
|
|
229
|
+
const server = createGitSshServer({
|
|
230
|
+
hostKeys: [process.env.GIT_HOST_SSH_KEY || ""],
|
|
231
|
+
resolveRepository(repositoryKey) {
|
|
411
232
|
return {
|
|
412
|
-
id:
|
|
413
|
-
path: `/srv/git-workspaces/${
|
|
233
|
+
id: repositoryKey,
|
|
234
|
+
path: `/srv/git-workspaces/${repositoryKey}/workspace`,
|
|
414
235
|
};
|
|
415
236
|
},
|
|
416
237
|
});
|
|
417
238
|
|
|
418
|
-
|
|
419
|
-
ref: "release/v1",
|
|
420
|
-
});
|
|
421
|
-
|
|
422
|
-
console.log(links.tar_gz.href);
|
|
423
|
-
// /projects/acme%2Fdemo/refs/release%2Fv1/source.tar.gz
|
|
424
|
-
```
|
|
425
|
-
|
|
426
|
-
Host-owned download route with the exported response helper:
|
|
427
|
-
|
|
428
|
-
```ts
|
|
429
|
-
import express from "express";
|
|
430
|
-
import { writeGitArchiveResponse } from "@trebired/git-host";
|
|
431
|
-
|
|
432
|
-
const app = express();
|
|
433
|
-
|
|
434
|
-
app.get("/projects/:owner/:repo/archive/:ref.zip", async (req, res, next) => {
|
|
435
|
-
try {
|
|
436
|
-
const repositoryId = `${req.params.owner}/${req.params.repo}`;
|
|
437
|
-
const archive = await gitHost.openArchive(repositoryId, {
|
|
438
|
-
fileName: `${req.params.repo}-${req.params.ref}.zip`,
|
|
439
|
-
format: "zip",
|
|
440
|
-
ref: req.params.ref,
|
|
441
|
-
repositoryKey: repositoryId,
|
|
442
|
-
});
|
|
443
|
-
await writeGitArchiveResponse(req, res, { archive });
|
|
444
|
-
} catch (error) {
|
|
445
|
-
next(error);
|
|
446
|
-
}
|
|
447
|
-
});
|
|
448
|
-
|
|
449
|
-
app.head("/projects/:owner/:repo/archive/:ref.zip", async (req, res, next) => {
|
|
450
|
-
try {
|
|
451
|
-
const repositoryId = `${req.params.owner}/${req.params.repo}`;
|
|
452
|
-
const archive = await gitHost.openArchive(repositoryId, {
|
|
453
|
-
fileName: `${req.params.repo}-${req.params.ref}.zip`,
|
|
454
|
-
format: "zip",
|
|
455
|
-
ref: req.params.ref,
|
|
456
|
-
repositoryKey: repositoryId,
|
|
457
|
-
});
|
|
458
|
-
await writeGitArchiveResponse(req, res, { archive });
|
|
459
|
-
} catch (error) {
|
|
460
|
-
next(error);
|
|
461
|
-
}
|
|
462
|
-
});
|
|
463
|
-
```
|
|
464
|
-
|
|
465
|
-
`writeGitArchiveResponse()` applies the correct `content-type`, `content-disposition`, `content-length` when known, redirect handling, and `HEAD` semantics for either `readArchive()` or `openArchive()` results.
|
|
466
|
-
|
|
467
|
-
### Releases, Tags, and Assets
|
|
468
|
-
|
|
469
|
-
A forge release is metadata attached to a Git tag. Its automatic source archives are not uploaded assets.
|
|
470
|
-
|
|
471
|
-
- `release.assets` remains your uploaded files.
|
|
472
|
-
- `release.source_archives.zip` and `release.source_archives.tar_gz` point at the automatic downloads for the tagged source.
|
|
473
|
-
- Tag list/detail responses also expose `source_archives`.
|
|
474
|
-
- If a release points at a missing tag, the forge API returns `release_tag_not_found`.
|
|
475
|
-
|
|
476
|
-
Uploaded release assets have matching host ergonomics:
|
|
477
|
-
|
|
478
|
-
- `forge.resolveReleaseAssetLink()` returns typed host-owned metadata for an asset download URL.
|
|
479
|
-
- `forge.openReleaseAsset()` returns a stream or redirect download shape without assuming a storage backend.
|
|
480
|
-
- `writeGitReleaseAssetResponse()` applies headers and `HEAD` behavior for custom host routes.
|
|
481
|
-
|
|
482
|
-
```ts
|
|
483
|
-
const assetLink = await forge.resolveReleaseAssetLink("demo", release.id, asset.id, {
|
|
484
|
-
repositoryKey: "acme/demo",
|
|
485
|
-
});
|
|
486
|
-
|
|
487
|
-
console.log(assetLink.href);
|
|
488
|
-
|
|
489
|
-
const assetDownload = await forge.openReleaseAsset("demo", release.id, asset.id, {
|
|
490
|
-
repositoryKey: "acme/demo",
|
|
491
|
-
});
|
|
492
|
-
```
|
|
493
|
-
|
|
494
|
-
### Cache Behavior
|
|
495
|
-
|
|
496
|
-
The built-in archive service prefers on-demand generation plus cache.
|
|
497
|
-
|
|
498
|
-
- Cache keys include repository id, resolved commit SHA, archive format, and the configured archive cache key version.
|
|
499
|
-
- Moving a tag or branch to a different commit produces a new cache key automatically.
|
|
500
|
-
- The default cache backend is filesystem-backed under the system temp directory.
|
|
501
|
-
- You can inject your own `archive.cache` backend, including future object-storage implementations.
|
|
502
|
-
- Cached entries carry TTL metadata and the filesystem backend performs periodic expired-entry cleanup.
|
|
503
|
-
|
|
504
|
-
### Security Notes
|
|
505
|
-
|
|
506
|
-
- Public repositories can expose `zipball` and `tarball` routes without auth.
|
|
507
|
-
- Private repositories should authorize before archive generation just like any other read route.
|
|
508
|
-
- The API handlers authorize archive downloads before they resolve refs or touch the cache.
|
|
509
|
-
- Cache backends can optionally mint redirect URLs for object storage, but the default filesystem backend streams directly from git-host.
|
|
510
|
-
|
|
511
|
-
## Frontend Integration
|
|
512
|
-
|
|
513
|
-
The package now supports three frontend integration modes.
|
|
514
|
-
|
|
515
|
-
### 1. Full Browser Pages
|
|
516
|
-
|
|
517
|
-
Use `@trebired/git-host/browser` when you want git-host to own the whole repository area:
|
|
518
|
-
|
|
519
|
-
- repository shell
|
|
520
|
-
- tabs and navigation behavior
|
|
521
|
-
- stats, actions, and social controls
|
|
522
|
-
- loading, error, retry, and empty states
|
|
523
|
-
- code browsing, blame, compare, releases, forks, activity, branches, tags, and search pages
|
|
524
|
-
|
|
525
|
-
Host apps mostly provide:
|
|
526
|
-
|
|
527
|
-
- auth
|
|
528
|
-
- API base URL
|
|
529
|
-
- repository key
|
|
530
|
-
- route adapter
|
|
531
|
-
- theme tokens
|
|
532
|
-
- optional policy and diagnostics hooks
|
|
533
|
-
|
|
534
|
-
Default styling is optional.
|
|
535
|
-
|
|
536
|
-
- If you want the package look, import `@trebired/git-host/browser/styles.css`.
|
|
537
|
-
- If you want package-owned structure with your own design system, skip that stylesheet and pass theme slots/classes.
|
|
538
|
-
|
|
539
|
-
```ts
|
|
540
|
-
import {
|
|
541
|
-
GitRepositoryOverviewPage,
|
|
542
|
-
createGitRepositoryRouteAdapter,
|
|
543
|
-
} from "@trebired/git-host/browser";
|
|
544
|
-
|
|
545
|
-
const routeAdapter = createGitRepositoryRouteAdapter({
|
|
546
|
-
repositoryBasePath: "/workspaces",
|
|
547
|
-
});
|
|
548
|
-
|
|
549
|
-
function RepositoryScreen() {
|
|
550
|
-
return (
|
|
551
|
-
<GitRepositoryOverviewPage
|
|
552
|
-
baseUrl="/api/git"
|
|
553
|
-
repositoryKey="demo"
|
|
554
|
-
routeAdapter={routeAdapter}
|
|
555
|
-
branding={{
|
|
556
|
-
getCloneUrl(repositoryKey) {
|
|
557
|
-
return `https://git.example.com/${repositoryKey}.git`;
|
|
558
|
-
},
|
|
559
|
-
}}
|
|
560
|
-
unstyled
|
|
561
|
-
theme={{
|
|
562
|
-
classNames: {
|
|
563
|
-
page: "repo-page",
|
|
564
|
-
header: "repo-header",
|
|
565
|
-
title: "repo-title",
|
|
566
|
-
tabs: "repo-tabs",
|
|
567
|
-
"tab-link": "repo-tab",
|
|
568
|
-
card: "repo-card",
|
|
569
|
-
button: "repo-button",
|
|
570
|
-
},
|
|
571
|
-
slots: {
|
|
572
|
-
page: {
|
|
573
|
-
attributes: {
|
|
574
|
-
"data-repository-surface": "git-host",
|
|
575
|
-
},
|
|
576
|
-
},
|
|
577
|
-
},
|
|
578
|
-
variables: {
|
|
579
|
-
"--git-browser-accent": "#0a7f5a",
|
|
580
|
-
},
|
|
581
|
-
}}
|
|
582
|
-
/>
|
|
583
|
-
);
|
|
584
|
-
}
|
|
585
|
-
```
|
|
586
|
-
|
|
587
|
-
### 2. Hybrid Shell + Package Sections
|
|
588
|
-
|
|
589
|
-
Use `@trebired/git-host/react` when your app owns the outer chrome but git-host should own the repository section UI patterns:
|
|
590
|
-
|
|
591
|
-
```ts
|
|
592
|
-
import {
|
|
593
|
-
GitApiClientProvider,
|
|
594
|
-
GitCommitList,
|
|
595
|
-
GitRepositoryShell,
|
|
596
|
-
GitRepositoryUiProvider,
|
|
597
|
-
createGitApiClient,
|
|
598
|
-
createGitRepositoryRouteAdapter,
|
|
599
|
-
useGitCommits,
|
|
600
|
-
useGitOverview,
|
|
601
|
-
} from "@trebired/git-host/react";
|
|
602
|
-
|
|
603
|
-
const client = createGitApiClient({ baseUrl: "/api/git" });
|
|
604
|
-
const routes = createGitRepositoryRouteAdapter({
|
|
605
|
-
repositoryBasePath: "/app/repos",
|
|
606
|
-
});
|
|
607
|
-
|
|
608
|
-
function RepositoryCommitsSection({ repositoryKey }: { repositoryKey: string }) {
|
|
609
|
-
const overview = useGitOverview(repositoryKey);
|
|
610
|
-
const commits = useGitCommits(repositoryKey, {
|
|
611
|
-
ref: overview.data?.repository.repository.current_branch,
|
|
612
|
-
});
|
|
613
|
-
|
|
614
|
-
return (
|
|
615
|
-
<GitRepositoryShell
|
|
616
|
-
page="commits"
|
|
617
|
-
repositoryKey={repositoryKey}
|
|
618
|
-
loading={overview.loading || commits.loading}
|
|
619
|
-
error={overview.error || commits.error}
|
|
620
|
-
social={overview.data?.social}
|
|
621
|
-
stats={[
|
|
622
|
-
{ label: "Branch", value: overview.data?.repository.repository.current_branch || "-" },
|
|
623
|
-
{ label: "Forks", value: String(overview.data?.fork_count || 0) },
|
|
624
|
-
]}
|
|
625
|
-
>
|
|
626
|
-
<GitCommitList commits={commits.data || []} repositoryKey={repositoryKey} />
|
|
627
|
-
</GitRepositoryShell>
|
|
628
|
-
);
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
function App() {
|
|
632
|
-
return (
|
|
633
|
-
<GitApiClientProvider client={client}>
|
|
634
|
-
<GitRepositoryUiProvider
|
|
635
|
-
routeAdapter={routes}
|
|
636
|
-
theme={{
|
|
637
|
-
unstyled: true,
|
|
638
|
-
classNames: {
|
|
639
|
-
page: "repo-surface",
|
|
640
|
-
header: "repo-shell-header",
|
|
641
|
-
card: "repo-panel",
|
|
642
|
-
button: "repo-action",
|
|
643
|
-
},
|
|
644
|
-
}}
|
|
645
|
-
>
|
|
646
|
-
<RepositoryCommitsSection repositoryKey="demo" />
|
|
647
|
-
</GitRepositoryUiProvider>
|
|
648
|
-
</GitApiClientProvider>
|
|
649
|
-
);
|
|
650
|
-
}
|
|
239
|
+
server.listen(2222);
|
|
651
240
|
```
|
|
652
241
|
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
Use the typed client, hooks, diagnostics, route adapter, and low-level models when you want full control over the page structure:
|
|
656
|
-
|
|
657
|
-
```ts
|
|
658
|
-
import {
|
|
659
|
-
GitApiClientProvider,
|
|
660
|
-
createGitApiClient,
|
|
661
|
-
useGitOverview,
|
|
662
|
-
useGitSearch,
|
|
663
|
-
} from "@trebired/git-host/react";
|
|
664
|
-
|
|
665
|
-
const client = createGitApiClient({ baseUrl: "/api/git" });
|
|
666
|
-
|
|
667
|
-
function CustomRepositorySearch({ repositoryKey }: { repositoryKey: string }) {
|
|
668
|
-
const overview = useGitOverview(repositoryKey);
|
|
669
|
-
const search = useGitSearch(repositoryKey, {
|
|
670
|
-
query: "value",
|
|
671
|
-
ref: overview.data?.repository.repository.current_branch,
|
|
672
|
-
});
|
|
673
|
-
|
|
674
|
-
if (search.loading) return "Searching...";
|
|
675
|
-
if (search.error) return search.error.message;
|
|
676
|
-
return JSON.stringify(search.data?.files || []);
|
|
677
|
-
}
|
|
678
|
-
```
|
|
242
|
+
## Forge Layer
|
|
679
243
|
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
`@trebired/git-host/browser` ships package-owned repository pages for:
|
|
683
|
-
|
|
684
|
-
- overview
|
|
685
|
-
- code/tree/blob
|
|
686
|
-
- commits
|
|
687
|
-
- commit detail
|
|
688
|
-
- releases
|
|
689
|
-
- release detail
|
|
690
|
-
- forks
|
|
691
|
-
- activity
|
|
692
|
-
- blame
|
|
693
|
-
- diff/compare
|
|
694
|
-
- branches
|
|
695
|
-
- tags
|
|
696
|
-
- search
|
|
697
|
-
|
|
698
|
-
`@trebired/git-host/react` now ships reusable repository primitives such as:
|
|
699
|
-
|
|
700
|
-
- `GitRepositoryUiProvider`
|
|
701
|
-
- `GitRepositoryShell`
|
|
702
|
-
- `GitRepositoryHeader`
|
|
703
|
-
- `GitRepositoryTabs`
|
|
704
|
-
- `GitRepositoryStats`
|
|
705
|
-
- `GitRepositoryActionBar`
|
|
706
|
-
- `GitRepositorySocialButtons`
|
|
707
|
-
- `GitCommitList`
|
|
708
|
-
- `GitReleaseList`
|
|
709
|
-
- `GitForkList`
|
|
710
|
-
- `GitBranchList`
|
|
711
|
-
- `GitTagList`
|
|
712
|
-
- `GitTreeView`
|
|
713
|
-
- `GitBlobView`
|
|
714
|
-
- `GitBlameView`
|
|
715
|
-
- `GitDiffView`
|
|
716
|
-
- `GitSearchResults`
|
|
717
|
-
- `GitBranchSelector`
|
|
718
|
-
- `GitTagSelector`
|
|
719
|
-
- `GitEmptyState`
|
|
720
|
-
- `GitErrorState`
|
|
721
|
-
- `GitLoadingState`
|
|
722
|
-
|
|
723
|
-
### Styling And Skinning
|
|
724
|
-
|
|
725
|
-
The package is designed around three frontend ownership levels:
|
|
726
|
-
|
|
727
|
-
- full package UI: import `@trebired/git-host/browser/styles.css` and use the browser pages directly
|
|
728
|
-
- package structure + app styling: skip the stylesheet and pass `theme.unstyled`, `theme.classNames`, and `theme.slots`
|
|
729
|
-
- package logic + app rendering: use the typed hooks, mutations, diagnostics, and route adapter with fully custom host rendering
|
|
730
|
-
|
|
731
|
-
The package now treats styling as optional rather than required:
|
|
732
|
-
|
|
733
|
-
- no browser page requires `@trebired/git-host/browser/styles.css` to function
|
|
734
|
-
- structural components expose stable `data-slot` markers for host CSS targeting
|
|
735
|
-
- `GitRepositoryUiProvider` accepts `theme.classNames` and `theme.slots` for slot-level class and attribute overrides
|
|
736
|
-
- `GitBrowserProvider` and browser pages accept `unstyled` as a shortcut for `theme.unstyled: true`
|
|
737
|
-
- render-state components can be replaced through `components.LoadingState`, `components.ErrorState`, and `components.EmptyState`
|
|
244
|
+
Use `createGitForge()` when you want repository releases, forks, activity, social state, and Actions on top of the Git host:
|
|
738
245
|
|
|
739
246
|
```ts
|
|
740
247
|
import {
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
<GitRepositoryUiProvider
|
|
747
|
-
theme={{
|
|
748
|
-
unstyled: true,
|
|
749
|
-
classNames: {
|
|
750
|
-
page: "nativeRepoPage",
|
|
751
|
-
header: "nativeRepoHeader",
|
|
752
|
-
card: "nativeCard",
|
|
753
|
-
list: "nativeList",
|
|
754
|
-
"list-item": "nativeListItem",
|
|
755
|
-
button: "nativeButton",
|
|
756
|
-
},
|
|
757
|
-
slots: {
|
|
758
|
-
page: {
|
|
759
|
-
attributes: {
|
|
760
|
-
"data-app-surface": "repository",
|
|
761
|
-
},
|
|
762
|
-
},
|
|
763
|
-
},
|
|
764
|
-
}}
|
|
765
|
-
components={{
|
|
766
|
-
EmptyState({ title, message }) {
|
|
767
|
-
return <section className="nativeEmpty">{title}: {message}</section>;
|
|
768
|
-
},
|
|
769
|
-
}}
|
|
770
|
-
>
|
|
771
|
-
<GitRepositoryShell page="commits" repositoryKey="demo">
|
|
772
|
-
<GitCommitList commits={commits} repositoryKey="demo" />
|
|
773
|
-
</GitRepositoryShell>
|
|
774
|
-
</GitRepositoryUiProvider>;
|
|
775
|
-
```
|
|
776
|
-
|
|
777
|
-
### Route Adapter
|
|
778
|
-
|
|
779
|
-
Both `browser` and `react` use a package-owned route adapter:
|
|
780
|
-
|
|
781
|
-
```ts
|
|
782
|
-
import { createGitRepositoryRouteAdapter } from "@trebired/git-host/react";
|
|
248
|
+
createGitForge,
|
|
249
|
+
createGitForgeActivityRecorder,
|
|
250
|
+
createInMemoryGitForgeStorageAdapter,
|
|
251
|
+
createGitHost,
|
|
252
|
+
} from "@trebired/git-host";
|
|
783
253
|
|
|
784
|
-
const
|
|
785
|
-
|
|
254
|
+
const storage = createInMemoryGitForgeStorageAdapter();
|
|
255
|
+
const activity = createGitForgeActivityRecorder({
|
|
256
|
+
storage: storage.activity,
|
|
786
257
|
});
|
|
787
258
|
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
Repository UIs are brittle, so the package also exposes lifecycle diagnostics through `GitRepositoryUiProvider`:
|
|
798
|
-
|
|
799
|
-
- `onNavigate`
|
|
800
|
-
- `onViewMount`
|
|
801
|
-
- `onFetchStart`
|
|
802
|
-
- `onFetchSuccess`
|
|
803
|
-
- `onFetchError`
|
|
804
|
-
- `onActionStart`
|
|
805
|
-
- `onActionSuccess`
|
|
806
|
-
- `onActionError`
|
|
807
|
-
- `onEmptyState`
|
|
808
|
-
- `onRenderStateChange`
|
|
809
|
-
|
|
810
|
-
### Initial Data
|
|
811
|
-
|
|
812
|
-
Browser pages and hybrid sections can take a stable `initialData` shape through `GitRepositoryFrontEndInitialData`, so host apps do not need to invent per-page bootstrap payloads.
|
|
813
|
-
|
|
814
|
-
For long-running repository scans, the typed client still exposes a live Socket.IO linguist stream:
|
|
815
|
-
|
|
816
|
-
```ts
|
|
817
|
-
const gitClient = createGitApiClient({
|
|
818
|
-
baseUrl: "/api/git",
|
|
259
|
+
const gitHost = createGitHost({
|
|
260
|
+
activity,
|
|
261
|
+
resolveRepository(repositoryId) {
|
|
262
|
+
return {
|
|
263
|
+
id: repositoryId,
|
|
264
|
+
path: `/srv/git-workspaces/${repositoryId}/workspace`,
|
|
265
|
+
};
|
|
266
|
+
},
|
|
819
267
|
});
|
|
820
268
|
|
|
821
|
-
const
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
269
|
+
const forge = createGitForge({
|
|
270
|
+
actions: {
|
|
271
|
+
workflowRoot: ".git-host",
|
|
272
|
+
workspaceRoot: "/srv/git-actions-workspaces",
|
|
825
273
|
},
|
|
826
|
-
|
|
827
|
-
|
|
274
|
+
createForkRepository({ upstreamRepositoryId }) {
|
|
275
|
+
return {
|
|
276
|
+
id: `${upstreamRepositoryId}-fork`,
|
|
277
|
+
path: `/srv/git-workspaces/${upstreamRepositoryId}-fork/workspace`,
|
|
278
|
+
};
|
|
828
279
|
},
|
|
280
|
+
gitHost,
|
|
281
|
+
storage,
|
|
829
282
|
});
|
|
830
|
-
|
|
831
|
-
await socket.completed;
|
|
832
283
|
```
|
|
833
284
|
|
|
834
|
-
##
|
|
285
|
+
## JSON API And Live Sockets
|
|
835
286
|
|
|
836
|
-
The package
|
|
287
|
+
The package exposes backend API helpers:
|
|
837
288
|
|
|
838
|
-
- `createGitHost()`
|
|
839
|
-
- `createGitForge()`
|
|
840
|
-
- `resolveRepositoryPath()`
|
|
841
|
-
- `runGit()`
|
|
842
|
-
- `buildGitEnv()`
|
|
843
|
-
- `RepositoryLockManager`
|
|
844
289
|
- `createGitApiHandler()`
|
|
845
290
|
- `createGitForgeApiHandler()`
|
|
846
291
|
- `createGitApiSocketServer()`
|
|
847
|
-
- `
|
|
848
|
-
- `generateSshKeyPair()`
|
|
849
|
-
- `normalizeSshPublicKey()`
|
|
850
|
-
- `compareSshPublicKeys()`
|
|
851
|
-
- `fingerprintSshPublicKey()`
|
|
852
|
-
- `createGitSshServer()`
|
|
853
|
-
- `@trebired/git-host/react`
|
|
854
|
-
- `@trebired/git-host/browser`
|
|
855
|
-
|
|
856
|
-
And the main host instance methods:
|
|
857
|
-
|
|
858
|
-
- `ensureRepository()`
|
|
859
|
-
- `readSummary()`
|
|
860
|
-
- `listBranches()`
|
|
861
|
-
- `listCommits()`
|
|
862
|
-
- `listTags()`
|
|
863
|
-
- `listTree()`
|
|
864
|
-
- `readLinguist()`
|
|
865
|
-
- `readBlame()`
|
|
866
|
-
- `search()`
|
|
867
|
-
- `readArchive()`
|
|
868
|
-
- `readBlob()`
|
|
869
|
-
- `readCommit()`
|
|
870
|
-
- `readTag()`
|
|
871
|
-
- `diff()`
|
|
872
|
-
- `readWorkingTree()`
|
|
873
|
-
- `readStagedFile()`
|
|
874
|
-
- `readUnstagedFile()`
|
|
875
|
-
- `createBranch()`
|
|
876
|
-
- `createTag()`
|
|
877
|
-
- `checkoutBranch()`
|
|
878
|
-
- `checkoutRef()`
|
|
879
|
-
- `deleteBranch()`
|
|
880
|
-
- `deleteTag()`
|
|
881
|
-
- `stagePaths()`
|
|
882
|
-
- `unstagePaths()`
|
|
883
|
-
- `discardPaths()`
|
|
884
|
-
- `commit()`
|
|
885
|
-
- `merge()`
|
|
886
|
-
- `rebase()`
|
|
887
|
-
- `cherryPick()`
|
|
888
|
-
- `continueOperation()`
|
|
889
|
-
- `abortOperation()`
|
|
890
|
-
- `fetch()`
|
|
891
|
-
- `pull()`
|
|
892
|
-
- `push()`
|
|
893
|
-
- `withRepositoryLock()`
|
|
894
|
-
|
|
895
|
-
The React entry now exports:
|
|
896
|
-
|
|
897
|
-
- `createGitApiClient()`
|
|
898
|
-
- `GitApiClientProvider`
|
|
899
|
-
- `GitRepositoryUiProvider`
|
|
900
|
-
- `createGitRepositoryRouteAdapter()`
|
|
901
|
-
- `openLinguistSocket()` through the typed client instance
|
|
902
|
-
- `useGitRepositorySummary()`
|
|
903
|
-
- `useGitOverview()`
|
|
904
|
-
- `useGitSocialState()`
|
|
905
|
-
- `useGitBranches()`
|
|
906
|
-
- `useGitCommits()`
|
|
907
|
-
- `useGitCommit()`
|
|
908
|
-
- `useGitTags()`
|
|
909
|
-
- `useGitTag()`
|
|
910
|
-
- `useGitTree()`
|
|
911
|
-
- `useGitLinguist()`
|
|
912
|
-
- `useGitBlame()`
|
|
913
|
-
- `useGitSearch()`
|
|
914
|
-
- `useGitArchive()`
|
|
915
|
-
- `useGitBlob()`
|
|
916
|
-
- `useGitDiff()`
|
|
917
|
-
- `useGitApiQuery()`
|
|
918
|
-
- `GitRepositoryShell`
|
|
919
|
-
- `GitRepositoryHeader`
|
|
920
|
-
- `GitRepositoryTabs`
|
|
921
|
-
- `GitRepositoryStats`
|
|
922
|
-
- `GitRepositoryActionBar`
|
|
923
|
-
- `GitRepositorySocialButtons`
|
|
924
|
-
- `GitCommitList`
|
|
925
|
-
- `GitReleaseList`
|
|
926
|
-
- `GitForkList`
|
|
927
|
-
- `GitBranchList`
|
|
928
|
-
- `GitTagList`
|
|
929
|
-
- `GitTreeView`
|
|
930
|
-
- `GitBlobView`
|
|
931
|
-
- `GitBlameView`
|
|
932
|
-
- `GitDiffView`
|
|
933
|
-
- `GitSearchResults`
|
|
934
|
-
- `GitBranchSelector`
|
|
935
|
-
- `GitTagSelector`
|
|
936
|
-
- `GitStarButton`
|
|
937
|
-
- `GitWatchButton`
|
|
938
|
-
- `GitForkButton`
|
|
939
|
-
- `GitSyncForkButton`
|
|
940
|
-
- `GitCreateReleaseButton`
|
|
941
|
-
- `GitDeleteReleaseButton`
|
|
942
|
-
- `GitCopyCloneUrlButton`
|
|
943
|
-
- `GitDownloadArchiveButton`
|
|
944
|
-
|
|
945
|
-
The browser entry exports full-page repository surfaces such as:
|
|
946
|
-
|
|
947
|
-
- `GitRepositoryOverviewPage`
|
|
948
|
-
- `GitRepositoryCodePage`
|
|
949
|
-
- `GitRepositoryCommitsPage`
|
|
950
|
-
- `GitRepositoryCommitPage`
|
|
951
|
-
- `GitRepositoryReleasesPage`
|
|
952
|
-
- `GitRepositoryReleasePage`
|
|
953
|
-
- `GitRepositoryForksPage`
|
|
954
|
-
- `GitRepositoryActivityPage`
|
|
955
|
-
- `GitRepositoryBranchesPage`
|
|
956
|
-
- `GitRepositoryTagsPage`
|
|
957
|
-
- `GitRepositorySearchPage`
|
|
958
|
-
- `GitRepositoryBlamePage`
|
|
959
|
-
- `GitRepositoryComparePage`
|
|
960
|
-
|
|
961
|
-
## Repository Model
|
|
962
|
-
|
|
963
|
-
This package does not own your app database.
|
|
964
|
-
|
|
965
|
-
Your app resolves a repository id to an absolute repository path. The package then runs Git operations against that path. This keeps repository metadata, permissions, tokens, SSH keys, and UI decisions inside the host app where they belong.
|
|
966
|
-
|
|
967
|
-
The repository runtime is still worktree-first, but the frontend surface is intentionally much broader now so host apps can stay thin.
|
|
968
|
-
|
|
969
|
-
Private remotes are still host-owned. The package now helps with the transport plumbing by supporting:
|
|
970
|
-
|
|
971
|
-
- `remoteCredentials` for clone, fetch, pull, and push
|
|
972
|
-
- `httpHeaders` for per-command HTTP headers such as bearer auth
|
|
973
|
-
- `sshCommand` for per-command SSH transport overrides
|
|
974
|
-
|
|
975
|
-
## Why This Package
|
|
976
|
-
|
|
977
|
-
Most alternatives fall into one of three buckets:
|
|
978
|
-
|
|
979
|
-
- full forge products such as GitLab, Gitea, or Forgejo
|
|
980
|
-
- Git implementation libraries that reimplement Git behavior in another runtime
|
|
981
|
-
- one-off app code that shells out to `git` without a reusable boundary
|
|
982
|
-
|
|
983
|
-
`@trebired/git-host` is aiming at the gap between those options.
|
|
984
|
-
|
|
985
|
-
Use it when you want:
|
|
986
|
-
|
|
987
|
-
- your app to keep owning users, permissions, tokens, SSH keys, repository records, and UI
|
|
988
|
-
- your app to keep owning users, permissions, tokens, SSH keys, repository records, branding, auth, and top-level route mounting while git-host owns most repository UI
|
|
989
|
-
- real Git behavior from the system `git` binary
|
|
990
|
-
- clone, fetch, pull, and push over smart HTTP and SSH
|
|
991
|
-
- a reusable Git runtime instead of spreading Git shell calls all over your platform code
|
|
992
|
-
- full browser-ready repository pages or reusable React repository primitives without rebuilding the same repository shell in every host app
|
|
993
|
-
|
|
994
|
-
Do not use it when you want:
|
|
995
|
-
|
|
996
|
-
- a ready-made Git product with issues, pull requests, teams, admin screens, and built-in account management
|
|
997
|
-
- a pure JavaScript Git implementation with no `git` binary dependency
|
|
998
|
-
|
|
999
|
-
That makes it useful for internal developer platforms, product-specific source management, deployment systems, controlled automation environments, and apps that need Git as a capability rather than Git hosting as a separate product.
|
|
1000
|
-
|
|
1001
|
-
## Path Safety
|
|
1002
|
-
|
|
1003
|
-
Repository paths should never come straight from request input.
|
|
1004
|
-
|
|
1005
|
-
The intended flow is:
|
|
1006
|
-
|
|
1007
|
-
```txt
|
|
1008
|
-
request repo id -> host app record lookup -> absolute repository path -> git-host
|
|
1009
|
-
```
|
|
1010
|
-
|
|
1011
|
-
`resolveRepositoryPath()` is provided as a safe join helper when your host app stores repository-relative paths under one known root.
|
|
1012
|
-
|
|
1013
|
-
## Hosted Transport Hooks
|
|
1014
|
-
|
|
1015
|
-
Hosted transports keep identity and permission policy in your app.
|
|
1016
|
-
|
|
1017
|
-
- `createGitHttpHandler()` supports host-owned repository resolution, optional identity resolution, permission checks, and request audit events.
|
|
1018
|
-
- `createGitSshServer()` supports host-owned public key authentication, permission checks, and command audit events.
|
|
1019
|
-
- `createGitApiHandler()` supports host-owned repository id mapping and per-route authorization.
|
|
1020
|
-
- `createGitApiSocketServer()` supports host-owned Socket.IO progress delivery for long-running linguist scans with the same repository mapping and authorization hooks.
|
|
1021
|
-
- `generateSshKeyPair()`, `normalizeSshPublicKey()`, `compareSshPublicKeys()`, and `fingerprintSshPublicKey()` help host apps manage SSH transport setup without owning the parsing details themselves.
|
|
1022
|
-
|
|
1023
|
-
## Platform Fit
|
|
1024
|
-
|
|
1025
|
-
`@trebired/git-host` is a good fit when a larger platform already owns users, permissions, repository records, tokens, SSH keys, and UI, but wants to stop hand-rolling the reusable Git layer.
|
|
292
|
+
- `createGitForgeSocketServer()`
|
|
1026
293
|
|
|
1027
|
-
The
|
|
294
|
+
The forge socket server supports live workflow run viewing with replay from a sequence cursor so disconnected clients can catch up from persisted events.
|
|
1028
295
|
|
|
1029
|
-
|
|
1030
|
-
- repository locking and mutation coordination
|
|
1031
|
-
- repository summary, tree, linguist, blame, search, archive, blob, commit, diff, and working-tree reads
|
|
1032
|
-
- branch, tag, checkout, commit, merge, rebase, cherry-pick, fetch, pull, and push operations
|
|
1033
|
-
- smart HTTP and SSH Git transport handling
|
|
1034
|
-
- thin JSON API route internals around those Git operations
|
|
1035
|
-
|
|
1036
|
-
The host platform should still own:
|
|
1037
|
-
|
|
1038
|
-
- repository and source metadata persistence
|
|
1039
|
-
- permission checks and route authorization policy
|
|
1040
|
-
- access token issuance, revocation, and storage
|
|
1041
|
-
- SSH key ownership, private key storage, and known-host persistence
|
|
1042
|
-
- top-level product chrome, auth flows, branding decisions, and any product-specific features outside the repository area
|
|
1043
|
-
|
|
1044
|
-
That boundary is where the package simplifies a platform the most without turning into a forge product of its own.
|
|
1045
|
-
|
|
1046
|
-
## Logger Support
|
|
1047
|
-
|
|
1048
|
-
`@trebired/git-host` works best with `@trebired/logger`, and that is the recommended logger.
|
|
1049
|
-
|
|
1050
|
-
Why we recommend it:
|
|
1051
|
-
|
|
1052
|
-
- it is simple
|
|
1053
|
-
- it already matches git-host's expected method shape
|
|
1054
|
-
- it keeps application logs and git-host diagnostics in one consistent format
|
|
1055
|
-
|
|
1056
|
-
The logger style:
|
|
1057
|
-
|
|
1058
|
-
```ts
|
|
1059
|
-
log.info("git-host", "initializing repository", { repositoryId: "demo" });
|
|
1060
|
-
```
|
|
1061
|
-
|
|
1062
|
-
comes from `@trebired/logger`.
|
|
1063
|
-
|
|
1064
|
-
The runtime adaptation behind `logger` and `loggerAdapter` is powered by `@trebired/logger-adapter`.
|
|
1065
|
-
|
|
1066
|
-
You can pass that same `log` object into `createGitHost()`, `createGitHttpHandler()`, `createGitSshServer()`, `createGitApiHandler()`, and `createGitApiSocketServer()` through their `logger` option.
|
|
1067
|
-
|
|
1068
|
-
If you do not pass a logger and `@trebired/logger` is installed in the host app, git-host will create a quiet console-only logger automatically before falling back to raw `console`.
|
|
1069
|
-
|
|
1070
|
-
If you also set `verbose: true`, git-host will emit successful lifecycle and transport diagnostics through that logger. Without `verbose`, it stays much quieter and mainly reports rejected or failed operations.
|
|
1071
|
-
|
|
1072
|
-
Custom loggers can also use one of these shapes:
|
|
1073
|
-
|
|
1074
|
-
```ts
|
|
1075
|
-
type Logger = {
|
|
1076
|
-
info(group: string, message: string, metadata?: unknown): void;
|
|
1077
|
-
warn(group: string, message: string, metadata?: unknown): void;
|
|
1078
|
-
error(group: string, message: string, metadata?: unknown): void;
|
|
1079
|
-
fail(group: string, message: string, metadata?: unknown): void;
|
|
1080
|
-
};
|
|
1081
|
-
|
|
1082
|
-
type Event = {
|
|
1083
|
-
level: "info" | "warn" | "error" | "fail";
|
|
1084
|
-
group: string;
|
|
1085
|
-
message: string;
|
|
1086
|
-
metadata?: unknown;
|
|
1087
|
-
};
|
|
1088
|
-
|
|
1089
|
-
type EventLogger = (event: Event) => void;
|
|
1090
|
-
|
|
1091
|
-
type SinkLogger = {
|
|
1092
|
-
log?(event: Event): void;
|
|
1093
|
-
write?(event: Event): void;
|
|
1094
|
-
fatal?(message: string, metadata?: unknown): void;
|
|
1095
|
-
};
|
|
1096
|
-
```
|
|
1097
|
-
|
|
1098
|
-
Common logger objects such as `console`, pino-style level methods, or Winston-style sinks are also adapted as sensibly as possible.
|
|
1099
|
-
|
|
1100
|
-
If you want exact control over the emitted structure, pass `logger` plus `loggerAdapter`:
|
|
1101
|
-
|
|
1102
|
-
```ts
|
|
1103
|
-
const rows: unknown[] = [];
|
|
1104
|
-
|
|
1105
|
-
const host = createGitHost({
|
|
1106
|
-
logger: rows,
|
|
1107
|
-
loggerAdapter(logger, event) {
|
|
1108
|
-
logger.push({
|
|
1109
|
-
when: event.timestamp,
|
|
1110
|
-
scope: event.group,
|
|
1111
|
-
severity: event.level,
|
|
1112
|
-
text: event.message,
|
|
1113
|
-
extra: event.metadata,
|
|
1114
|
-
});
|
|
1115
|
-
},
|
|
1116
|
-
resolveRepository(repositoryId) {
|
|
1117
|
-
return {
|
|
1118
|
-
id: repositoryId,
|
|
1119
|
-
path: `/srv/repos/${repositoryId}`,
|
|
1120
|
-
};
|
|
1121
|
-
},
|
|
1122
|
-
});
|
|
1123
|
-
```
|
|
296
|
+
## Packaging
|
|
1124
297
|
|
|
1125
|
-
|
|
298
|
+
The npm package ships:
|
|
1126
299
|
|
|
1127
|
-
|
|
300
|
+
- the backend TypeScript runtime
|
|
301
|
+
- packaged Actions runner binaries under `bin/`
|
|
302
|
+
- no browser or React entrypoints
|
|
1128
303
|
|
|
1129
|
-
|
|
304
|
+
Repository Actions workflow binaries are built in CI for:
|
|
1130
305
|
|
|
1131
|
-
-
|
|
1132
|
-
-
|
|
306
|
+
- Linux x64 GNU
|
|
307
|
+
- Linux arm64 GNU
|
|
308
|
+
- macOS x64
|
|
309
|
+
- macOS arm64
|
|
1133
310
|
|
|
1134
|
-
##
|
|
311
|
+
## License
|
|
1135
312
|
|
|
1136
|
-
|
|
313
|
+
MIT
|