@trebired/git-host 2.0.0 → 2.2.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 +20 -0
- package/README.md +394 -988
- 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/api/forge/actions.d.ts +20 -0
- package/dist/api/forge/actions.d.ts.map +1 -0
- package/dist/api/forge/actions.js +308 -0
- package/dist/api/forge/actions.js.map +1 -0
- package/dist/api/forge/archives.d.ts +5 -0
- package/dist/api/forge/archives.d.ts.map +1 -0
- package/dist/api/forge/archives.js +63 -0
- package/dist/api/forge/archives.js.map +1 -0
- package/dist/api/forge/handler.d.ts +6 -0
- package/dist/api/forge/handler.d.ts.map +1 -0
- package/dist/api/forge/handler.js +23 -0
- package/dist/api/forge/handler.js.map +1 -0
- package/dist/api/forge/route.d.ts +83 -0
- package/dist/api/forge/route.d.ts.map +1 -0
- package/dist/api/forge/route.js +112 -0
- package/dist/api/forge/route.js.map +1 -0
- package/dist/api/forge/runtime.d.ts +5 -0
- package/dist/api/forge/runtime.d.ts.map +1 -0
- package/dist/api/forge/runtime.js +181 -0
- package/dist/api/forge/runtime.js.map +1 -0
- package/dist/api/forge/socket.d.ts +6 -0
- package/dist/api/forge/socket.d.ts.map +1 -0
- package/dist/api/forge/socket.js +49 -0
- package/dist/api/forge/socket.js.map +1 -0
- package/dist/api/forge/socket_subscription.d.ts +10 -0
- package/dist/api/forge/socket_subscription.d.ts.map +1 -0
- package/dist/api/forge/socket_subscription.js +202 -0
- package/dist/api/forge/socket_subscription.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/api/handler/action.js +109 -0
- package/dist/api/handler/action.js.map +1 -0
- package/dist/api/handler/archive.d.ts +43 -0
- 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/api/handler/response.js +100 -0
- package/dist/api/handler/response.js.map +1 -0
- package/dist/api/handler/route.d.ts.map +1 -0
- package/dist/api/handler/route.js +54 -0
- package/dist/api/handler/route.js.map +1 -0
- package/dist/api/handler/runtime.d.ts +5 -0
- package/dist/api/handler/runtime.d.ts.map +1 -0
- package/dist/api/handler/runtime.js +187 -0
- package/dist/api/handler/runtime.js.map +1 -0
- package/dist/api/handler.d.ts +6 -0
- 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/api/routing.js +35 -0
- 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/api/socket/linguist_connection.d.ts +9 -0
- package/dist/api/socket/linguist_connection.d.ts.map +1 -0
- package/dist/api/socket/linguist_connection.js +167 -0
- package/dist/api/socket/linguist_connection.js.map +1 -0
- package/dist/api/socket/server.d.ts +6 -0
- package/dist/api/socket/server.d.ts.map +1 -0
- package/dist/api/socket/server.js +49 -0
- 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/artifacts.d.ts +21 -0
- package/dist/core/actions/artifacts.d.ts.map +1 -0
- package/dist/core/actions/artifacts.js +121 -0
- package/dist/core/actions/artifacts.js.map +1 -0
- package/dist/core/actions/expressions.d.ts +15 -0
- package/dist/core/actions/expressions.d.ts.map +1 -0
- package/dist/core/actions/expressions.js +279 -0
- package/dist/core/actions/expressions.js.map +1 -0
- package/dist/core/actions/go_runner.d.ts +6 -0
- package/dist/core/actions/go_runner.d.ts.map +1 -0
- package/dist/core/actions/go_runner.js +106 -0
- package/dist/core/actions/go_runner.js.map +1 -0
- package/dist/core/actions/local_runner.d.ts +28 -0
- package/dist/core/actions/local_runner.d.ts.map +1 -0
- package/dist/core/actions/local_runner.js +121 -0
- package/dist/core/actions/local_runner.js.map +1 -0
- package/dist/core/actions/node_runner.d.ts +4 -0
- package/dist/core/actions/node_runner.d.ts.map +1 -0
- package/dist/core/actions/node_runner.js +175 -0
- package/dist/core/actions/node_runner.js.map +1 -0
- package/dist/core/actions/normalize.d.ts +7 -0
- package/dist/core/actions/normalize.d.ts.map +1 -0
- package/dist/core/actions/normalize.js +401 -0
- package/dist/core/actions/normalize.js.map +1 -0
- package/dist/core/actions/planner.d.ts +13 -0
- package/dist/core/actions/planner.d.ts.map +1 -0
- package/dist/core/actions/planner.js +106 -0
- package/dist/core/actions/planner.js.map +1 -0
- package/dist/core/actions/redaction.d.ts +5 -0
- package/dist/core/actions/redaction.d.ts.map +1 -0
- package/dist/core/actions/redaction.js +28 -0
- package/dist/core/actions/redaction.js.map +1 -0
- package/dist/core/actions/release_assets.d.ts +31 -0
- package/dist/core/actions/release_assets.d.ts.map +1 -0
- package/dist/core/actions/release_assets.js +114 -0
- package/dist/core/actions/release_assets.js.map +1 -0
- package/dist/core/actions/runner/launch.d.ts +5 -0
- package/dist/core/actions/runner/launch.d.ts.map +1 -0
- package/dist/core/actions/runner/launch.js +100 -0
- package/dist/core/actions/runner/launch.js.map +1 -0
- package/dist/core/actions/runner/protocol.d.ts +7 -0
- package/dist/core/actions/runner/protocol.d.ts.map +1 -0
- package/dist/core/actions/runner/protocol.js +66 -0
- package/dist/core/actions/runner/protocol.js.map +1 -0
- package/dist/core/actions/runner.d.ts +6 -0
- package/dist/core/actions/runner.d.ts.map +1 -0
- package/dist/core/actions/runner.js +13 -0
- package/dist/core/actions/runner.js.map +1 -0
- package/dist/core/actions/types.d.ts +90 -0
- package/dist/core/actions/types.d.ts.map +1 -0
- package/dist/core/actions/types.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 +158 -0
- package/dist/core/actions/workflows.js.map +1 -0
- package/dist/core/actions/workspace.d.ts +7 -0
- package/dist/core/actions/workspace.d.ts.map +1 -0
- package/dist/core/actions/workspace.js +47 -0
- package/dist/core/actions/workspace.js.map +1 -0
- package/dist/core/activity.d.ts +11 -0
- package/dist/core/activity.d.ts.map +1 -0
- package/dist/core/activity.js +224 -0
- package/dist/core/activity.js.map +1 -0
- package/dist/core/archive.d.ts +22 -0
- package/dist/core/archive.d.ts.map +1 -0
- package/dist/core/archive.js +563 -0
- package/dist/core/archive.js.map +1 -0
- package/dist/core/archive_cache_filesystem.d.ts +8 -0
- package/dist/core/archive_cache_filesystem.d.ts.map +1 -0
- package/dist/core/archive_cache_filesystem.js +164 -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/core/create/git/forge.js +600 -0
- 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/core/create/git/host.js +182 -0
- package/dist/core/create/git/host.js.map +1 -0
- package/dist/core/create_git_host/branch_methods.d.ts +5 -0
- package/dist/core/create_git_host/branch_methods.d.ts.map +1 -0
- package/dist/core/create_git_host/branch_methods.js +223 -0
- package/dist/core/create_git_host/branch_methods.js.map +1 -0
- package/dist/core/create_git_host/content_methods.d.ts +5 -0
- package/dist/core/create_git_host/content_methods.d.ts.map +1 -0
- package/dist/core/create_git_host/content_methods.js +72 -0
- package/dist/core/create_git_host/content_methods.js.map +1 -0
- package/dist/core/create_git_host/remote_methods.d.ts +5 -0
- package/dist/core/create_git_host/remote_methods.d.ts.map +1 -0
- package/dist/core/create_git_host/remote_methods.js +108 -0
- package/dist/core/create_git_host/remote_methods.js.map +1 -0
- package/dist/core/create_git_host/shared.d.ts +23 -0
- package/dist/core/create_git_host/shared.d.ts.map +1 -0
- package/dist/core/create_git_host/shared.js +17 -0
- package/dist/core/create_git_host/shared.js.map +1 -0
- package/dist/core/create_git_host/working_tree_methods.d.ts +5 -0
- package/dist/core/create_git_host/working_tree_methods.d.ts.map +1 -0
- package/dist/core/create_git_host/working_tree_methods.js +84 -0
- package/dist/core/create_git_host/working_tree_methods.js.map +1 -0
- package/dist/core/forge_actions.d.ts +33 -0
- package/dist/core/forge_actions.d.ts.map +1 -0
- package/dist/core/forge_actions.js +1470 -0
- package/dist/core/forge_actions.js.map +1 -0
- package/dist/core/git_forge/storage_memory.d.ts +4 -0
- package/dist/core/git_forge/storage_memory.d.ts.map +1 -0
- package/dist/core/git_forge/storage_memory.js +353 -0
- package/dist/core/git_forge/storage_memory.js.map +1 -0
- package/dist/core/inspect/helpers.d.ts +27 -0
- package/dist/core/inspect/helpers.d.ts.map +1 -0
- package/dist/core/inspect/helpers.js +86 -0
- package/dist/core/inspect/helpers.js.map +1 -0
- package/dist/core/inspect/icon_theme.d.ts +4 -0
- package/dist/core/inspect/icon_theme.d.ts.map +1 -0
- package/dist/core/inspect/icon_theme.js +72 -0
- package/dist/core/inspect/icon_theme.js.map +1 -0
- package/dist/core/inspect/linguist_progress.d.ts +14 -0
- package/dist/core/inspect/linguist_progress.d.ts.map +1 -0
- package/dist/core/inspect/linguist_progress.js +92 -0
- package/dist/core/inspect/linguist_progress.js.map +1 -0
- package/dist/core/inspect.d.ts +47 -0
- package/dist/core/inspect.d.ts.map +1 -0
- package/dist/core/inspect.js +547 -0
- package/dist/core/inspect.js.map +1 -0
- package/dist/core/inspection.d.ts +11 -0
- package/dist/core/inspection.d.ts.map +1 -0
- package/dist/core/inspection.js +593 -0
- 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/core/operation_state.d.ts +4 -0
- package/dist/core/operation_state.d.ts.map +1 -0
- package/dist/core/operation_state.js.map +1 -0
- package/dist/core/remote.d.ts +13 -0
- package/dist/core/remote.d.ts.map +1 -0
- package/dist/core/remote.js +187 -0
- package/dist/core/remote.js.map +1 -0
- package/dist/core/repository/parsers.d.ts +13 -0
- package/dist/core/repository/parsers.d.ts.map +1 -0
- package/dist/core/repository/parsers.js +217 -0
- package/dist/core/repository/parsers.js.map +1 -0
- package/dist/core/repository.d.ts +13 -0
- package/dist/core/repository.d.ts.map +1 -0
- package/dist/core/repository.js +136 -0
- package/dist/core/repository.js.map +1 -0
- package/dist/core/run_git/env.d.ts +7 -0
- package/dist/core/run_git/env.d.ts.map +1 -0
- package/dist/core/run_git/env.js +18 -0
- package/dist/core/run_git/env.js.map +1 -0
- package/dist/core/run_git/process.d.ts +13 -0
- package/dist/core/run_git/process.d.ts.map +1 -0
- package/dist/core/run_git/process.js +97 -0
- package/dist/core/run_git/process.js.map +1 -0
- package/dist/core/run_git/repository_setup.d.ts +20 -0
- package/dist/core/run_git/repository_setup.d.ts.map +1 -0
- package/dist/core/run_git/repository_setup.js +116 -0
- package/dist/core/run_git/repository_setup.js.map +1 -0
- package/dist/core/run_git.d.ts +6 -0
- package/dist/core/run_git.d.ts.map +1 -0
- package/dist/core/run_git.js +6 -0
- package/dist/core/run_git.js.map +1 -0
- package/dist/core/working_tree/mutate.d.ts +12 -0
- package/dist/core/working_tree/mutate.d.ts.map +1 -0
- package/dist/core/working_tree/mutate.js +266 -0
- package/dist/core/working_tree/mutate.js.map +1 -0
- package/dist/core/working_tree/read.d.ts +6 -0
- package/dist/core/working_tree/read.d.ts.map +1 -0
- package/dist/core/working_tree/read.js +102 -0
- package/dist/core/working_tree/read.js.map +1 -0
- package/dist/core/working_tree/shared.d.ts +20 -0
- package/dist/core/working_tree/shared.d.ts.map +1 -0
- package/dist/core/working_tree/shared.js +87 -0
- 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/http/handler/helpers.d.ts +35 -0
- package/dist/http/handler/helpers.d.ts.map +1 -0
- package/dist/http/handler/helpers.js +146 -0
- package/dist/http/handler/helpers.js.map +1 -0
- package/dist/http/handler.d.ts +6 -0
- package/dist/http/handler.d.ts.map +1 -0
- package/dist/http/handler.js +220 -0
- package/dist/http/handler.js.map +1 -0
- package/dist/index.d.ts +28 -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/ssh/keys.js +41 -0
- package/dist/ssh/keys.js.map +1 -0
- package/dist/ssh/server/audit.d.ts +5 -0
- package/dist/ssh/server/audit.d.ts.map +1 -0
- package/dist/ssh/server/audit.js.map +1 -0
- package/dist/ssh/server/shared.d.ts +30 -0
- package/dist/ssh/server/shared.d.ts.map +1 -0
- package/dist/ssh/server/shared.js +93 -0
- package/dist/ssh/server/shared.js.map +1 -0
- package/dist/ssh/server.d.ts +5 -0
- package/dist/ssh/server.d.ts.map +1 -0
- package/dist/ssh/server.js +277 -0
- package/dist/ssh/server.js.map +1 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/common.js.map +1 -0
- package/dist/types/forge/activity.d.ts +52 -0
- package/dist/types/forge/activity.d.ts.map +1 -0
- package/dist/types/forge/activity.js +2 -0
- package/dist/types/forge/activity.js.map +1 -0
- package/dist/types/forge/api.d.ts +116 -0
- package/dist/types/forge/api.d.ts.map +1 -0
- package/dist/types/forge/api.js +2 -0
- package/dist/types/forge/api.js.map +1 -0
- package/dist/types/forge/releases.d.ts +98 -0
- package/dist/types/forge/releases.d.ts.map +1 -0
- package/dist/types/forge/releases.js +2 -0
- package/dist/types/forge/releases.js.map +1 -0
- package/dist/types/forge/social_forks.d.ts +51 -0
- package/dist/types/forge/social_forks.d.ts.map +1 -0
- package/dist/types/forge/social_forks.js +2 -0
- package/dist/types/forge/social_forks.js.map +1 -0
- package/dist/types/forge/workflows.d.ts +332 -0
- package/dist/types/forge/workflows.d.ts.map +1 -0
- package/dist/types/forge/workflows.js +2 -0
- package/dist/types/forge/workflows.js.map +1 -0
- package/dist/types/forge.d.ts +6 -0
- package/dist/types/forge.d.ts.map +1 -0
- package/dist/types/forge.js.map +1 -0
- 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/types/host.js.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js.map +1 -0
- 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/types.d.ts.map +1 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +51 -0
- 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 +163 -184
- package/dist/browser/styles.css +0 -317
- package/dist/internal/api/forge/actions.d.ts +0 -17
- package/dist/internal/api/forge/actions.d.ts.map +0 -1
- package/dist/internal/api/forge/actions.js +0 -317
- package/dist/internal/api/forge/actions.js.map +0 -1
- package/dist/internal/api/forge/archives.d.ts +0 -5
- package/dist/internal/api/forge/archives.d.ts.map +0 -1
- package/dist/internal/api/forge/archives.js +0 -63
- package/dist/internal/api/forge/archives.js.map +0 -1
- package/dist/internal/api/forge/handler.d.ts +0 -6
- package/dist/internal/api/forge/handler.d.ts.map +0 -1
- package/dist/internal/api/forge/handler.js +0 -23
- package/dist/internal/api/forge/handler.js.map +0 -1
- package/dist/internal/api/forge/route.d.ts +0 -73
- package/dist/internal/api/forge/route.d.ts.map +0 -1
- package/dist/internal/api/forge/route.js +0 -106
- package/dist/internal/api/forge/route.js.map +0 -1
- package/dist/internal/api/forge/runtime.d.ts +0 -5
- package/dist/internal/api/forge/runtime.d.ts.map +0 -1
- package/dist/internal/api/forge/runtime.js +0 -181
- package/dist/internal/api/forge/runtime.js.map +0 -1
- package/dist/internal/api/forge/socket.d.ts +0 -6
- package/dist/internal/api/forge/socket.d.ts.map +0 -1
- package/dist/internal/api/forge/socket.js +0 -193
- 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 +0 -103
- package/dist/internal/api/handler/action.js.map +0 -1
- package/dist/internal/api/handler/archive.d.ts +0 -43
- 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 +0 -100
- 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 +0 -54
- package/dist/internal/api/handler/route.js.map +0 -1
- package/dist/internal/api/handler/runtime.d.ts +0 -5
- package/dist/internal/api/handler/runtime.d.ts.map +0 -1
- package/dist/internal/api/handler/runtime.js +0 -187
- package/dist/internal/api/handler/runtime.js.map +0 -1
- package/dist/internal/api/handler.d.ts +0 -6
- 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 +0 -35
- 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 +0 -6
- package/dist/internal/api/socket/server.d.ts.map +0 -1
- package/dist/internal/api/socket/server.js +0 -164
- 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 +0 -11
- package/dist/internal/core/activity.d.ts.map +0 -1
- package/dist/internal/core/activity.js +0 -206
- package/dist/internal/core/activity.js.map +0 -1
- package/dist/internal/core/archive.d.ts +0 -22
- package/dist/internal/core/archive.d.ts.map +0 -1
- package/dist/internal/core/archive.js +0 -563
- package/dist/internal/core/archive.js.map +0 -1
- package/dist/internal/core/archive_cache_filesystem.d.ts +0 -8
- package/dist/internal/core/archive_cache_filesystem.d.ts.map +0 -1
- package/dist/internal/core/archive_cache_filesystem.js +0 -158
- 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 +0 -614
- 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 +0 -182
- package/dist/internal/core/create/git/host.js.map +0 -1
- package/dist/internal/core/create_git_host/branch_methods.d.ts +0 -5
- package/dist/internal/core/create_git_host/branch_methods.d.ts.map +0 -1
- package/dist/internal/core/create_git_host/branch_methods.js +0 -223
- package/dist/internal/core/create_git_host/branch_methods.js.map +0 -1
- package/dist/internal/core/create_git_host/content_methods.d.ts +0 -5
- package/dist/internal/core/create_git_host/content_methods.d.ts.map +0 -1
- package/dist/internal/core/create_git_host/content_methods.js +0 -72
- package/dist/internal/core/create_git_host/content_methods.js.map +0 -1
- package/dist/internal/core/create_git_host/remote_methods.d.ts +0 -5
- package/dist/internal/core/create_git_host/remote_methods.d.ts.map +0 -1
- package/dist/internal/core/create_git_host/remote_methods.js +0 -108
- package/dist/internal/core/create_git_host/remote_methods.js.map +0 -1
- package/dist/internal/core/create_git_host/shared.d.ts +0 -23
- package/dist/internal/core/create_git_host/shared.d.ts.map +0 -1
- package/dist/internal/core/create_git_host/shared.js +0 -17
- package/dist/internal/core/create_git_host/shared.js.map +0 -1
- package/dist/internal/core/create_git_host/working_tree_methods.d.ts +0 -5
- 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 +0 -84
- package/dist/internal/core/create_git_host/working_tree_methods.js.map +0 -1
- package/dist/internal/core/forge_actions.d.ts +0 -36
- package/dist/internal/core/forge_actions.d.ts.map +0 -1
- package/dist/internal/core/forge_actions.js +0 -730
- package/dist/internal/core/forge_actions.js.map +0 -1
- package/dist/internal/core/git_forge/storage_memory.d.ts +0 -4
- package/dist/internal/core/git_forge/storage_memory.d.ts.map +0 -1
- package/dist/internal/core/git_forge/storage_memory.js +0 -329
- package/dist/internal/core/git_forge/storage_memory.js.map +0 -1
- package/dist/internal/core/inspect/helpers.d.ts +0 -27
- package/dist/internal/core/inspect/helpers.d.ts.map +0 -1
- package/dist/internal/core/inspect/helpers.js +0 -86
- package/dist/internal/core/inspect/helpers.js.map +0 -1
- package/dist/internal/core/inspect/icon_theme.d.ts +0 -4
- package/dist/internal/core/inspect/icon_theme.d.ts.map +0 -1
- package/dist/internal/core/inspect/icon_theme.js +0 -72
- package/dist/internal/core/inspect/icon_theme.js.map +0 -1
- package/dist/internal/core/inspect/linguist_progress.d.ts +0 -14
- package/dist/internal/core/inspect/linguist_progress.d.ts.map +0 -1
- package/dist/internal/core/inspect/linguist_progress.js +0 -92
- package/dist/internal/core/inspect/linguist_progress.js.map +0 -1
- package/dist/internal/core/inspect.d.ts +0 -47
- package/dist/internal/core/inspect.d.ts.map +0 -1
- package/dist/internal/core/inspect.js +0 -547
- package/dist/internal/core/inspect.js.map +0 -1
- package/dist/internal/core/inspection.d.ts +0 -11
- package/dist/internal/core/inspection.d.ts.map +0 -1
- package/dist/internal/core/inspection.js +0 -593
- 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 +0 -4
- 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 +0 -13
- package/dist/internal/core/remote.d.ts.map +0 -1
- package/dist/internal/core/remote.js +0 -187
- package/dist/internal/core/remote.js.map +0 -1
- package/dist/internal/core/repository/parsers.d.ts +0 -13
- package/dist/internal/core/repository/parsers.d.ts.map +0 -1
- package/dist/internal/core/repository/parsers.js +0 -204
- package/dist/internal/core/repository/parsers.js.map +0 -1
- package/dist/internal/core/repository.d.ts +0 -13
- package/dist/internal/core/repository.d.ts.map +0 -1
- package/dist/internal/core/repository.js +0 -136
- package/dist/internal/core/repository.js.map +0 -1
- package/dist/internal/core/run_git/env.d.ts +0 -7
- package/dist/internal/core/run_git/env.d.ts.map +0 -1
- package/dist/internal/core/run_git/env.js +0 -18
- package/dist/internal/core/run_git/env.js.map +0 -1
- package/dist/internal/core/run_git/process.d.ts +0 -13
- package/dist/internal/core/run_git/process.d.ts.map +0 -1
- package/dist/internal/core/run_git/process.js +0 -96
- package/dist/internal/core/run_git/process.js.map +0 -1
- package/dist/internal/core/run_git/repository_setup.d.ts +0 -20
- package/dist/internal/core/run_git/repository_setup.d.ts.map +0 -1
- package/dist/internal/core/run_git/repository_setup.js +0 -116
- package/dist/internal/core/run_git/repository_setup.js.map +0 -1
- package/dist/internal/core/run_git.d.ts +0 -6
- package/dist/internal/core/run_git.d.ts.map +0 -1
- package/dist/internal/core/run_git.js +0 -6
- package/dist/internal/core/run_git.js.map +0 -1
- package/dist/internal/core/working_tree/mutate.d.ts +0 -12
- package/dist/internal/core/working_tree/mutate.d.ts.map +0 -1
- package/dist/internal/core/working_tree/mutate.js +0 -266
- package/dist/internal/core/working_tree/mutate.js.map +0 -1
- package/dist/internal/core/working_tree/read.d.ts +0 -6
- package/dist/internal/core/working_tree/read.d.ts.map +0 -1
- package/dist/internal/core/working_tree/read.js +0 -108
- package/dist/internal/core/working_tree/read.js.map +0 -1
- package/dist/internal/core/working_tree/shared.d.ts +0 -20
- package/dist/internal/core/working_tree/shared.d.ts.map +0 -1
- package/dist/internal/core/working_tree/shared.js +0 -87
- 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 +0 -35
- package/dist/internal/http/handler/helpers.d.ts.map +0 -1
- package/dist/internal/http/handler/helpers.js +0 -146
- package/dist/internal/http/handler/helpers.js.map +0 -1
- package/dist/internal/http/handler.d.ts +0 -6
- package/dist/internal/http/handler.d.ts.map +0 -1
- package/dist/internal/http/handler.js +0 -220
- package/dist/internal/http/handler.js.map +0 -1
- package/dist/internal/index.d.ts +0 -28
- 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.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 +0 -41
- package/dist/internal/ssh/keys.js.map +0 -1
- package/dist/internal/ssh/server/audit.d.ts +0 -5
- 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 +0 -30
- package/dist/internal/ssh/server/shared.d.ts.map +0 -1
- package/dist/internal/ssh/server/shared.js +0 -93
- package/dist/internal/ssh/server/shared.js.map +0 -1
- package/dist/internal/ssh/server.d.ts +0 -5
- package/dist/internal/ssh/server.d.ts.map +0 -1
- package/dist/internal/ssh/server.js +0 -277
- package/dist/internal/ssh/server.js.map +0 -1
- package/dist/internal/types/common.d.ts.map +0 -1
- package/dist/internal/types/common.js.map +0 -1
- package/dist/internal/types/forge.d.ts +0 -481
- package/dist/internal/types/forge.d.ts.map +0 -1
- package/dist/internal/types/forge.js.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/host.js.map +0 -1
- package/dist/internal/types/index.d.ts +0 -6
- package/dist/internal/types/index.d.ts.map +0 -1
- package/dist/internal/types/index.js.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 +0 -51
- 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.d.ts.map +0 -1
- 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/react/client → core/actions}/types.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.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.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/hooks/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:
|
|
21
|
+
Runtime support:
|
|
22
|
+
|
|
23
|
+
- Node.js 18+
|
|
24
|
+
- Bun 1+
|
|
25
|
+
- `git` available on the host
|
|
23
26
|
|
|
24
27
|
```sh
|
|
25
28
|
npm install @trebired/git-host
|
|
26
29
|
```
|
|
27
30
|
|
|
28
|
-
|
|
29
|
-
npm install @trebired/logger
|
|
30
|
-
```
|
|
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.
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
```sh
|
|
35
|
-
npm install react
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Optional browser pages:
|
|
39
|
-
|
|
40
|
-
```sh
|
|
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,492 @@ 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
|
-
|
|
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.
|
|
170
78
|
|
|
171
|
-
|
|
172
|
-
import { createServer } from "node:http";
|
|
173
|
-
import { createGitHost, createGitHttpHandler } from "@trebired/git-host";
|
|
174
|
-
import { createLog } from "@trebired/logger";
|
|
79
|
+
### Workflow File
|
|
175
80
|
|
|
176
|
-
|
|
177
|
-
console: true,
|
|
178
|
-
quiet: true,
|
|
179
|
-
save: false,
|
|
180
|
-
});
|
|
81
|
+
`git-host` now supports two workflow formats:
|
|
181
82
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
return {
|
|
185
|
-
id: repositoryId,
|
|
186
|
-
path: `/srv/git-workspaces/${repositoryId}/workspace`,
|
|
187
|
-
};
|
|
188
|
-
},
|
|
189
|
-
});
|
|
83
|
+
- legacy flat shell workflows for backward compatibility
|
|
84
|
+
- a documented GitHub-Actions-inspired subset for multi-job CI and publish pipelines
|
|
190
85
|
|
|
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
|
-
}));
|
|
86
|
+
Legacy workflows still work:
|
|
201
87
|
|
|
202
|
-
|
|
88
|
+
```yaml
|
|
89
|
+
name: Build and test
|
|
90
|
+
trigger: push
|
|
91
|
+
source:
|
|
92
|
+
branches:
|
|
93
|
+
- main
|
|
94
|
+
steps:
|
|
95
|
+
- name: Install
|
|
96
|
+
run: bun install
|
|
97
|
+
- name: Test
|
|
98
|
+
run: bun test
|
|
99
|
+
- name: Build
|
|
100
|
+
run: bun run build
|
|
203
101
|
```
|
|
204
102
|
|
|
205
|
-
|
|
103
|
+
Supported trigger values in v1:
|
|
104
|
+
|
|
105
|
+
- `push`
|
|
106
|
+
- `release.create`
|
|
107
|
+
- `release.update`
|
|
108
|
+
- `manual`
|
|
109
|
+
|
|
110
|
+
The richer subset uses `on`, `jobs`, `needs`, matrix strategy, expressions, built-in `uses:` adapters, artifacts, and concurrency:
|
|
111
|
+
|
|
112
|
+
```yaml
|
|
113
|
+
name: Package publish
|
|
114
|
+
on:
|
|
115
|
+
workflow_dispatch:
|
|
116
|
+
inputs:
|
|
117
|
+
publish:
|
|
118
|
+
type: boolean
|
|
119
|
+
default: false
|
|
120
|
+
target_ref:
|
|
121
|
+
type: string
|
|
122
|
+
required: true
|
|
123
|
+
push:
|
|
124
|
+
tags:
|
|
125
|
+
- v*
|
|
126
|
+
env:
|
|
127
|
+
BUILD_DIR: dist
|
|
128
|
+
concurrency:
|
|
129
|
+
group: publish-${{ github.ref }}
|
|
130
|
+
cancel-in-progress: true
|
|
131
|
+
permissions:
|
|
132
|
+
contents: read
|
|
133
|
+
packages: write
|
|
134
|
+
jobs:
|
|
135
|
+
build:
|
|
136
|
+
runs-on: ubuntu-latest
|
|
137
|
+
strategy:
|
|
138
|
+
matrix:
|
|
139
|
+
target:
|
|
140
|
+
- linux
|
|
141
|
+
- darwin
|
|
142
|
+
steps:
|
|
143
|
+
- uses: actions/checkout@v4
|
|
144
|
+
- uses: oven-sh/setup-bun@v2
|
|
145
|
+
- run: bun install --frozen-lockfile
|
|
146
|
+
- run: |
|
|
147
|
+
mkdir -p "${BUILD_DIR}"
|
|
148
|
+
printf '%s\n' "${{ matrix.target }}" > "${BUILD_DIR}/${{ matrix.target }}.txt"
|
|
149
|
+
- uses: actions/upload-artifact@v4
|
|
150
|
+
with:
|
|
151
|
+
name: build-${{ matrix.target }}
|
|
152
|
+
path: dist/${{ matrix.target }}.txt
|
|
153
|
+
|
|
154
|
+
publish:
|
|
155
|
+
needs: build
|
|
156
|
+
runs-on: ubuntu-latest
|
|
157
|
+
if: ${{ needs.build.result == 'success' }}
|
|
158
|
+
steps:
|
|
159
|
+
- uses: actions/download-artifact@v4
|
|
160
|
+
with:
|
|
161
|
+
name: build-linux
|
|
162
|
+
path: publish-assets
|
|
163
|
+
- name: Publish
|
|
164
|
+
env:
|
|
165
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
166
|
+
run: |
|
|
167
|
+
test -n "${NPM_TOKEN}"
|
|
168
|
+
ls -R publish-assets
|
|
169
|
+
printf 'publishing from %s\n' "${{ github.ref }}"
|
|
170
|
+
- uses: actions/publish-release-asset@v1
|
|
171
|
+
with:
|
|
172
|
+
name: mytool-linux-x64
|
|
173
|
+
path: publish-assets
|
|
174
|
+
format: tar.gz
|
|
175
|
+
```
|
|
206
176
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
177
|
+
Supported subset:
|
|
178
|
+
|
|
179
|
+
- top-level `name`, `on`, `env`, `permissions`, and `concurrency`
|
|
180
|
+
- `on.workflow_dispatch.inputs` with `string` and `boolean` types, defaults, and required flags
|
|
181
|
+
- `on.push.branches` and `on.push.tags` with exact matches or `*` wildcards
|
|
182
|
+
- multiple `jobs`
|
|
183
|
+
- per-job `name`, `runs-on`, `needs`, `if`, `env`, `strategy.matrix`, and `steps`
|
|
184
|
+
- shell steps with `run`
|
|
185
|
+
- built-in `uses:` handlers for:
|
|
186
|
+
- `actions/checkout@v4`
|
|
187
|
+
- `actions/setup-node@v4`
|
|
188
|
+
- `oven-sh/setup-bun@v2`
|
|
189
|
+
- `actions/upload-artifact@v4`
|
|
190
|
+
- `actions/download-artifact@v4`
|
|
191
|
+
- `actions/publish-release-asset@v1` (no GitHub equivalent — see below)
|
|
192
|
+
- expressions in common places such as env values, `if`, shell commands, concurrency groups, and built-in action `with` values
|
|
193
|
+
- expression contexts:
|
|
194
|
+
- `github.ref`
|
|
195
|
+
- `github.ref_name`
|
|
196
|
+
- `github.event_name`
|
|
197
|
+
- `github.event.inputs.<name>`
|
|
198
|
+
- `matrix.<name>`
|
|
199
|
+
- `secrets.<name>`
|
|
200
|
+
- `env.<name>`
|
|
201
|
+
- `job.status`
|
|
202
|
+
- `needs.<job>.result`
|
|
203
|
+
|
|
204
|
+
### Publishing Release Assets
|
|
205
|
+
|
|
206
|
+
`actions/publish-release-asset@v1` compresses a downloaded/checked-out path into a real
|
|
207
|
+
`.tar.gz` or `.zip` and attaches it to a release as a `GitForgeReleaseAsset` with a
|
|
208
|
+
`storage_pointer` your host's `releaseAssetStore.openAssetDownload()` resolves at
|
|
209
|
+
download time — the same asset shape and download path the release API already
|
|
210
|
+
serves. GitHub Actions has no built-in equivalent for this (you'd reach for a
|
|
211
|
+
marketplace action like `softprops/action-gh-release`); this is an intentional
|
|
212
|
+
Operlorn-only addition, not an attempt to mirror GitHub syntax for something GitHub
|
|
213
|
+
doesn't ship itself.
|
|
214
|
+
|
|
215
|
+
```yaml
|
|
216
|
+
- uses: actions/publish-release-asset@v1
|
|
217
|
+
with:
|
|
218
|
+
name: mytool-linux-x64 # required; archive extension is added automatically
|
|
219
|
+
path: dist/linux # required; file or directory, relative to the workspace
|
|
220
|
+
format: tar.gz # optional, "tar.gz" (default) or "zip"
|
|
221
|
+
tag: v1.2.3 # optional; defaults to github.ref_name
|
|
210
222
|
```
|
|
211
223
|
|
|
212
|
-
|
|
224
|
+
The target release must already exist — this step does not create one. Resolution
|
|
225
|
+
order: `with.tag` if given, else the run's `release_id` (set automatically when the
|
|
226
|
+
workflow was triggered by `release.create`), else a release matching `with.tag`/
|
|
227
|
+
`github.ref_name` by `tag_name`. If none is found, the step fails with a clear error
|
|
228
|
+
rather than guessing at release metadata (author, target ref, draft state) that
|
|
229
|
+
belongs to the proper release-creation flow. Successful publishes emit a
|
|
230
|
+
`release_asset.published` run event.
|
|
213
231
|
|
|
214
|
-
|
|
215
|
-
import { createGitSshServer } from "@trebired/git-host";
|
|
216
|
-
import { createLog } from "@trebired/logger";
|
|
232
|
+
Intentional differences from GitHub Actions:
|
|
217
233
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
234
|
+
- this is not a full marketplace runner
|
|
235
|
+
- only the built-in `uses:` adapters above are supported
|
|
236
|
+
- unsupported `runs-on` labels fail clearly instead of pretending to be available
|
|
237
|
+
- matrix jobs run sequentially on the local runner in v1
|
|
238
|
+
- secrets are injected for expressions and runtime env, then redacted from streamed and persisted logs
|
|
239
|
+
- service containers and arbitrary marketplace actions are not supported in v1
|
|
223
240
|
|
|
224
|
-
|
|
225
|
-
hostKeys: [hostPrivateKeyPem],
|
|
226
|
-
logger: log,
|
|
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
|
-
};
|
|
236
|
-
},
|
|
237
|
-
resolveRepository(repositoryKey) {
|
|
238
|
-
return {
|
|
239
|
-
id: repositoryKey,
|
|
240
|
-
path: `/srv/git-workspaces/${repositoryKey}/workspace`,
|
|
241
|
-
};
|
|
242
|
-
},
|
|
243
|
-
});
|
|
241
|
+
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:
|
|
244
242
|
|
|
245
|
-
|
|
243
|
+
```text
|
|
244
|
+
.git-host/workflows/build.yml
|
|
246
245
|
```
|
|
247
246
|
|
|
248
|
-
|
|
247
|
+
### Custom Workflow Root
|
|
249
248
|
|
|
250
|
-
|
|
251
|
-
git clone ssh://git@127.0.0.1:2222/demo.git
|
|
252
|
-
git push
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
JSON API hosting:
|
|
249
|
+
The root folder is configurable. The folder name does not have to stay `.git-host`.
|
|
256
250
|
|
|
257
251
|
```ts
|
|
258
|
-
import {
|
|
259
|
-
import { createGitApiHandler, createGitApiSocketServer, createGitHost } from "@trebired/git-host";
|
|
260
|
-
import { createLog } from "@trebired/logger";
|
|
252
|
+
import { createGitForge } from "@trebired/git-host";
|
|
261
253
|
|
|
262
|
-
const
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
})
|
|
267
|
-
|
|
268
|
-
const gitHost = createGitHost({
|
|
269
|
-
resolveRepository(repositoryId) {
|
|
254
|
+
const forge = createGitForge({
|
|
255
|
+
actions: {
|
|
256
|
+
workflowRoot: ".ci",
|
|
257
|
+
},
|
|
258
|
+
createForkRepository({ upstreamRepositoryId }) {
|
|
270
259
|
return {
|
|
271
|
-
id:
|
|
272
|
-
path:
|
|
260
|
+
id: `${upstreamRepositoryId}-fork`,
|
|
261
|
+
path: resolveRepositoryPath({
|
|
262
|
+
rootDir: repositoriesRoot,
|
|
263
|
+
repositoryPath: `${upstreamRepositoryId}-fork/workspace`,
|
|
264
|
+
}),
|
|
273
265
|
};
|
|
274
266
|
},
|
|
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);
|
|
283
|
-
},
|
|
284
|
-
}));
|
|
285
|
-
|
|
286
|
-
createGitApiSocketServer({
|
|
287
|
-
basePath: "/api/git",
|
|
288
267
|
gitHost,
|
|
289
|
-
|
|
290
|
-
logger: log,
|
|
291
|
-
authorize({ action, repositoryId }) {
|
|
292
|
-
return canReadRepository(repositoryId, action);
|
|
293
|
-
},
|
|
268
|
+
storage,
|
|
294
269
|
});
|
|
295
|
-
|
|
296
|
-
apiServer.listen(3100);
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
Then apps can use routes like:
|
|
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
270
|
```
|
|
319
271
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
git-host now exposes GitHub-style source archive downloads for branches, tags, commit SHAs, and forge releases.
|
|
323
|
-
|
|
324
|
-
- `zipball/:ref` streams a `zip` archive.
|
|
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.
|
|
328
|
-
|
|
329
|
-
Archives are always generated from Git objects with `git archive`, never from the checked-out working tree.
|
|
330
|
-
|
|
331
|
-
- Branch and tag downloads resolve to the current target commit first, then use a SHA-based cache key.
|
|
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.
|
|
335
|
-
|
|
336
|
-
Default behavior:
|
|
272
|
+
That makes the workflow layout:
|
|
337
273
|
|
|
338
|
-
```
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
console.log(archive.file_name);
|
|
345
|
-
// demo-main.zip
|
|
346
|
-
|
|
347
|
-
const links = gitHost.resolveArchiveLinks("demo", {
|
|
348
|
-
basePath: "/api/git",
|
|
349
|
-
ref: "main",
|
|
350
|
-
});
|
|
351
|
-
|
|
352
|
-
console.log(links.zip.href);
|
|
353
|
-
// /api/git/repositories/demo/zipball/main
|
|
274
|
+
```text
|
|
275
|
+
<repository-worktree>/
|
|
276
|
+
.ci/
|
|
277
|
+
workflows/
|
|
278
|
+
build.yml
|
|
354
279
|
```
|
|
355
280
|
|
|
356
|
-
|
|
281
|
+
You can also resolve the workflow root per repository:
|
|
357
282
|
|
|
358
283
|
```ts
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
const label = repository.id === "demo" ? "customer-demo" : repository.id;
|
|
363
|
-
const shortSha = resolvedCommit.slice(0, 8);
|
|
364
|
-
return format === "zip"
|
|
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) {
|
|
373
|
-
return {
|
|
374
|
-
id: repositoryId,
|
|
375
|
-
path: `/srv/git-workspaces/${repositoryId}/workspace`,
|
|
376
|
-
};
|
|
284
|
+
actions: {
|
|
285
|
+
async resolveWorkflowRoot(repositoryId) {
|
|
286
|
+
return repositoryId.startsWith("legacy-") ? ".ci" : ".git-host";
|
|
377
287
|
},
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
const preview = await gitHost.resolveArchive("demo", {
|
|
381
|
-
format: "tar.gz",
|
|
382
|
-
ref: "v1",
|
|
383
|
-
});
|
|
384
|
-
|
|
385
|
-
console.log(preview.file_name);
|
|
386
|
-
console.log(preview.root_directory);
|
|
387
|
-
```
|
|
388
|
-
|
|
389
|
-
You can also override the outer filename or root directory per call without changing host defaults:
|
|
390
|
-
|
|
391
|
-
```ts
|
|
392
|
-
const releaseZip = await gitHost.openArchive("demo", {
|
|
393
|
-
fileName: "demo-release.zip",
|
|
394
|
-
format: "zip",
|
|
395
|
-
ref: "v1",
|
|
396
|
-
rootDirectory: "demo-release/",
|
|
397
|
-
});
|
|
288
|
+
}
|
|
398
289
|
```
|
|
399
290
|
|
|
400
|
-
|
|
291
|
+
## Actions Execution
|
|
292
|
+
|
|
293
|
+
Workflow runs are persistent and repository-owned:
|
|
294
|
+
|
|
295
|
+
- workflows are loaded from the triggering ref/commit
|
|
296
|
+
- each run materializes an exact snapshot for that ref/commit
|
|
297
|
+
- jobs and matrix children execute from staged snapshot workspaces, never from a dirty live working tree
|
|
298
|
+
- jobs honor `needs` ordering
|
|
299
|
+
- steps run sequentially inside each job
|
|
300
|
+
- stdout and stderr are captured and persisted
|
|
301
|
+
- host-provided env and secrets can be merged into the execution context
|
|
302
|
+
- named artifacts can be uploaded in one job and downloaded in dependent jobs
|
|
303
|
+
- live run events are streamed over Socket.IO
|
|
304
|
+
- queued/running runs can be cancelled
|
|
305
|
+
- workflow concurrency groups can block or cancel overlapping runs
|
|
306
|
+
|
|
307
|
+
The runtime emits persisted run events such as:
|
|
308
|
+
|
|
309
|
+
- `run.accepted`
|
|
310
|
+
- `run.cancellation_requested`
|
|
311
|
+
- `run.status`
|
|
312
|
+
- `job.started`
|
|
313
|
+
- `job.output`
|
|
314
|
+
- `job.heartbeat`
|
|
315
|
+
- `job.finished`
|
|
316
|
+
- `step.started`
|
|
317
|
+
- `step.output`
|
|
318
|
+
- `step.heartbeat`
|
|
319
|
+
- `step.finished`
|
|
320
|
+
- `artifact.uploaded`
|
|
321
|
+
- `artifact.downloaded`
|
|
322
|
+
- `release_asset.published`
|
|
323
|
+
- `run.finished`
|
|
324
|
+
- `run.failed`
|
|
325
|
+
- `run.cancelled`
|
|
326
|
+
|
|
327
|
+
### Host Context And Redaction
|
|
328
|
+
|
|
329
|
+
Hosts can inject per-repository execution context through `actions.resolveExecutionContext()`:
|
|
401
330
|
|
|
402
331
|
```ts
|
|
403
|
-
const
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
332
|
+
const forge = createGitForge({
|
|
333
|
+
actions: {
|
|
334
|
+
async resolveExecutionContext({ repositoryId, triggerKind, workflow }) {
|
|
335
|
+
return {
|
|
336
|
+
actor: {
|
|
337
|
+
id: "ci-bot",
|
|
338
|
+
},
|
|
339
|
+
env: {
|
|
340
|
+
CI: "true",
|
|
341
|
+
REPOSITORY_ID: repositoryId,
|
|
342
|
+
},
|
|
343
|
+
metadata: {
|
|
344
|
+
trigger_kind: triggerKind,
|
|
345
|
+
workflow_name: workflow.name,
|
|
346
|
+
},
|
|
347
|
+
secrets: {
|
|
348
|
+
NPM_TOKEN: process.env.NPM_TOKEN || "",
|
|
349
|
+
},
|
|
350
|
+
};
|
|
408
351
|
},
|
|
409
352
|
},
|
|
410
|
-
|
|
353
|
+
createForkRepository({ upstreamRepositoryId }) {
|
|
411
354
|
return {
|
|
412
|
-
id:
|
|
413
|
-
path:
|
|
355
|
+
id: `${upstreamRepositoryId}-fork`,
|
|
356
|
+
path: resolveRepositoryPath({
|
|
357
|
+
rootDir: repositoriesRoot,
|
|
358
|
+
repositoryPath: `${upstreamRepositoryId}-fork/workspace`,
|
|
359
|
+
}),
|
|
414
360
|
};
|
|
415
361
|
},
|
|
362
|
+
gitHost,
|
|
363
|
+
storage,
|
|
416
364
|
});
|
|
417
|
-
|
|
418
|
-
const links = gitHost.resolveArchiveLinks("acme/demo", {
|
|
419
|
-
ref: "release/v1",
|
|
420
|
-
});
|
|
421
|
-
|
|
422
|
-
console.log(links.tar_gz.href);
|
|
423
|
-
// /projects/acme%2Fdemo/refs/release%2Fv1/source.tar.gz
|
|
424
365
|
```
|
|
425
366
|
|
|
426
|
-
|
|
367
|
+
Runtime env merge order:
|
|
427
368
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
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
|
-
```
|
|
369
|
+
- base process env
|
|
370
|
+
- static `actions.env`
|
|
371
|
+
- host-provided execution env
|
|
372
|
+
- workflow `env`
|
|
373
|
+
- job `env`
|
|
374
|
+
- step `env`
|
|
464
375
|
|
|
465
|
-
|
|
376
|
+
Secrets are available to expressions and the runtime env, but their values are redacted from:
|
|
466
377
|
|
|
467
|
-
|
|
378
|
+
- live socket output
|
|
379
|
+
- persisted event payloads
|
|
380
|
+
- step output previews
|
|
468
381
|
|
|
469
|
-
|
|
382
|
+
### Workflow APIs
|
|
470
383
|
|
|
471
|
-
|
|
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`.
|
|
384
|
+
The forge API exposes:
|
|
475
385
|
|
|
476
|
-
|
|
386
|
+
- list workflows
|
|
387
|
+
- read a workflow definition
|
|
388
|
+
- manually run a workflow with `inputs`, `env`, `secrets`, and trigger context
|
|
389
|
+
- cancel a workflow run
|
|
390
|
+
- list workflow runs
|
|
391
|
+
- read a workflow run
|
|
392
|
+
- list job runs
|
|
393
|
+
- list step runs
|
|
394
|
+
- list run artifacts
|
|
395
|
+
- list run events
|
|
396
|
+
- subscribe to live run events over Socket.IO
|
|
477
397
|
|
|
478
|
-
|
|
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.
|
|
398
|
+
The HTTP API keeps the existing routes and adds run sub-collections such as:
|
|
481
399
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
});
|
|
400
|
+
- `GET /repositories/:repositoryKey/actions/runs/:runId/jobs`
|
|
401
|
+
- `GET /repositories/:repositoryKey/actions/runs/:runId/steps`
|
|
402
|
+
- `GET /repositories/:repositoryKey/actions/runs/:runId/artifacts`
|
|
486
403
|
|
|
487
|
-
|
|
404
|
+
## Activity Integration
|
|
488
405
|
|
|
489
|
-
|
|
490
|
-
repositoryKey: "acme/demo",
|
|
491
|
-
});
|
|
492
|
-
```
|
|
406
|
+
Repository activity is normalized and repository-owned. Activity entries are returned through the repository activity API and can be used to trigger workflows.
|
|
493
407
|
|
|
494
|
-
|
|
408
|
+
Examples of normalized kinds:
|
|
495
409
|
|
|
496
|
-
|
|
410
|
+
- `repository.push`
|
|
411
|
+
- `repository.pull`
|
|
412
|
+
- `repository.fetch`
|
|
413
|
+
- `release.create`
|
|
414
|
+
- `release.update`
|
|
415
|
+
- `release.delete`
|
|
416
|
+
- `repository.fork.create`
|
|
417
|
+
- `repository.fork.sync`
|
|
418
|
+
- `repository.star`
|
|
419
|
+
- `repository.unstar`
|
|
420
|
+
- `repository.watch`
|
|
421
|
+
- `repository.unwatch`
|
|
497
422
|
|
|
498
|
-
-
|
|
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.
|
|
423
|
+
Push-triggered Actions can be created from:
|
|
503
424
|
|
|
504
|
-
|
|
425
|
+
- smart HTTP pushes
|
|
426
|
+
- SSH pushes
|
|
427
|
+
- programmatic host/forge push operations
|
|
505
428
|
|
|
506
|
-
|
|
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.
|
|
429
|
+
## Smart HTTP And SSH
|
|
510
430
|
|
|
511
|
-
|
|
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.
|
|
431
|
+
### HTTP
|
|
538
432
|
|
|
539
433
|
```ts
|
|
540
|
-
import {
|
|
541
|
-
|
|
542
|
-
createGitRepositoryRouteAdapter,
|
|
543
|
-
} from "@trebired/git-host/browser";
|
|
434
|
+
import { createServer } from "node:http";
|
|
435
|
+
import { createGitHttpHandler } from "@trebired/git-host";
|
|
544
436
|
|
|
545
|
-
const
|
|
546
|
-
|
|
547
|
-
|
|
437
|
+
const server = createServer(createGitHttpHandler({
|
|
438
|
+
basePath: "/git",
|
|
439
|
+
resolveRepository(repositoryKey) {
|
|
440
|
+
return {
|
|
441
|
+
id: repositoryKey,
|
|
442
|
+
path: `/srv/git-workspaces/${repositoryKey}/workspace`,
|
|
443
|
+
};
|
|
444
|
+
},
|
|
445
|
+
}));
|
|
548
446
|
|
|
549
|
-
|
|
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
|
-
}
|
|
447
|
+
server.listen(3000);
|
|
585
448
|
```
|
|
586
449
|
|
|
587
|
-
###
|
|
588
|
-
|
|
589
|
-
Use `@trebired/git-host/react` when your app owns the outer chrome but git-host should own the repository section UI patterns:
|
|
450
|
+
### SSH
|
|
590
451
|
|
|
591
452
|
```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
|
-
});
|
|
453
|
+
import { createGitSshServer } from "@trebired/git-host";
|
|
607
454
|
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
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
|
-
}
|
|
455
|
+
const server = createGitSshServer({
|
|
456
|
+
hostKeys: [process.env.GIT_HOST_SSH_KEY || ""],
|
|
457
|
+
resolveRepository(repositoryKey) {
|
|
458
|
+
return {
|
|
459
|
+
id: repositoryKey,
|
|
460
|
+
path: `/srv/git-workspaces/${repositoryKey}/workspace`,
|
|
461
|
+
};
|
|
462
|
+
},
|
|
463
|
+
});
|
|
630
464
|
|
|
631
|
-
|
|
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
|
-
}
|
|
465
|
+
server.listen(2222);
|
|
651
466
|
```
|
|
652
467
|
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
Use the typed client, hooks, diagnostics, route adapter, and low-level models when you want full control over the page structure:
|
|
468
|
+
## Forge Layer
|
|
656
469
|
|
|
657
|
-
|
|
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
|
-
```
|
|
679
|
-
|
|
680
|
-
## Frontend Surface
|
|
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`
|
|
470
|
+
Use `createGitForge()` when you want repository releases, forks, activity, social state, and Actions on top of the Git host:
|
|
738
471
|
|
|
739
472
|
```ts
|
|
740
473
|
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
|
|
474
|
+
createGitForge,
|
|
475
|
+
createGitForgeActivityRecorder,
|
|
476
|
+
createInMemoryGitForgeStorageAdapter,
|
|
477
|
+
createGitHost,
|
|
478
|
+
} from "@trebired/git-host";
|
|
778
479
|
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
import { createGitRepositoryRouteAdapter } from "@trebired/git-host/react";
|
|
783
|
-
|
|
784
|
-
const routes = createGitRepositoryRouteAdapter({
|
|
785
|
-
repositoryBasePath: "/repos",
|
|
480
|
+
const storage = createInMemoryGitForgeStorageAdapter();
|
|
481
|
+
const activity = createGitForgeActivityRecorder({
|
|
482
|
+
storage: storage.activity,
|
|
786
483
|
});
|
|
787
484
|
|
|
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",
|
|
485
|
+
const gitHost = createGitHost({
|
|
486
|
+
activity,
|
|
487
|
+
resolveRepository(repositoryId) {
|
|
488
|
+
return {
|
|
489
|
+
id: repositoryId,
|
|
490
|
+
path: `/srv/git-workspaces/${repositoryId}/workspace`,
|
|
491
|
+
};
|
|
492
|
+
},
|
|
819
493
|
});
|
|
820
494
|
|
|
821
|
-
const
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
495
|
+
const forge = createGitForge({
|
|
496
|
+
actions: {
|
|
497
|
+
workflowRoot: ".git-host",
|
|
498
|
+
workspaceRoot: "/srv/git-actions-workspaces",
|
|
499
|
+
// Separate from workspaceRoot: published release assets must outlive the run
|
|
500
|
+
// (and any per-run workspace cleanup) that produced them.
|
|
501
|
+
releaseAssetsRoot: "/srv/git-release-assets",
|
|
825
502
|
},
|
|
826
|
-
|
|
827
|
-
|
|
503
|
+
createForkRepository({ upstreamRepositoryId }) {
|
|
504
|
+
return {
|
|
505
|
+
id: `${upstreamRepositoryId}-fork`,
|
|
506
|
+
path: `/srv/git-workspaces/${upstreamRepositoryId}-fork/workspace`,
|
|
507
|
+
};
|
|
828
508
|
},
|
|
509
|
+
gitHost,
|
|
510
|
+
storage,
|
|
829
511
|
});
|
|
830
|
-
|
|
831
|
-
await socket.completed;
|
|
832
512
|
```
|
|
833
513
|
|
|
834
|
-
##
|
|
514
|
+
## JSON API And Live Sockets
|
|
835
515
|
|
|
836
|
-
The package
|
|
516
|
+
The package exposes backend API helpers:
|
|
837
517
|
|
|
838
|
-
- `createGitHost()`
|
|
839
|
-
- `createGitForge()`
|
|
840
|
-
- `resolveRepositoryPath()`
|
|
841
|
-
- `runGit()`
|
|
842
|
-
- `buildGitEnv()`
|
|
843
|
-
- `RepositoryLockManager`
|
|
844
518
|
- `createGitApiHandler()`
|
|
845
519
|
- `createGitForgeApiHandler()`
|
|
846
520
|
- `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.
|
|
521
|
+
- `createGitForgeSocketServer()`
|
|
1026
522
|
|
|
1027
|
-
The
|
|
523
|
+
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
524
|
|
|
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
|
-
```
|
|
525
|
+
## Packaging
|
|
1124
526
|
|
|
1125
|
-
|
|
527
|
+
The npm package ships:
|
|
1126
528
|
|
|
1127
|
-
|
|
529
|
+
- the backend TypeScript runtime
|
|
530
|
+
- packaged Actions runner binaries under `bin/`
|
|
531
|
+
- no browser or React entrypoints
|
|
1128
532
|
|
|
1129
|
-
|
|
533
|
+
Repository Actions workflow binaries are built in CI for:
|
|
1130
534
|
|
|
1131
|
-
-
|
|
1132
|
-
-
|
|
535
|
+
- Linux x64 GNU
|
|
536
|
+
- Linux arm64 GNU
|
|
537
|
+
- macOS x64
|
|
538
|
+
- macOS arm64
|
|
1133
539
|
|
|
1134
|
-
##
|
|
540
|
+
## License
|
|
1135
541
|
|
|
1136
|
-
|
|
542
|
+
MIT
|