@trebired/git-host 1.7.0 → 2.0.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 +15 -0
- package/LICENSE +661 -21
- package/README.md +149 -0
- package/dist/internal/api/forge/actions.d.ts +17 -0
- package/dist/internal/api/forge/actions.d.ts.map +1 -0
- package/dist/internal/api/forge/actions.js +317 -0
- package/dist/internal/api/forge/actions.js.map +1 -0
- package/dist/internal/api/forge/archives.d.ts +5 -0
- package/dist/internal/api/forge/archives.d.ts.map +1 -0
- package/dist/internal/api/forge/archives.js +63 -0
- package/dist/internal/api/forge/archives.js.map +1 -0
- package/dist/internal/api/forge/handler.d.ts +6 -0
- package/dist/internal/api/forge/handler.d.ts.map +1 -0
- package/dist/internal/api/forge/handler.js +23 -0
- package/dist/internal/api/forge/handler.js.map +1 -0
- package/dist/internal/api/forge/route.d.ts +73 -0
- package/dist/internal/api/forge/route.d.ts.map +1 -0
- package/dist/internal/api/forge/route.js +106 -0
- package/dist/internal/api/forge/route.js.map +1 -0
- package/dist/internal/api/forge/runtime.d.ts +5 -0
- package/dist/internal/api/forge/runtime.d.ts.map +1 -0
- package/dist/internal/api/forge/runtime.js +181 -0
- package/dist/internal/api/forge/runtime.js.map +1 -0
- package/dist/internal/api/forge/socket.d.ts +6 -0
- package/dist/internal/api/forge/socket.d.ts.map +1 -0
- package/dist/internal/api/forge/socket.js +193 -0
- package/dist/internal/api/forge/socket.js.map +1 -0
- package/dist/internal/api/handler/action.d.ts +5 -0
- package/dist/internal/api/handler/action.d.ts.map +1 -0
- package/dist/internal/api/handler/action.js +103 -0
- package/dist/internal/api/handler/action.js.map +1 -0
- package/dist/internal/api/handler/archive.d.ts +43 -0
- package/dist/internal/api/handler/archive.d.ts.map +1 -0
- package/dist/internal/api/handler/archive.js +185 -0
- package/dist/internal/api/handler/archive.js.map +1 -0
- package/dist/internal/api/handler/response.d.ts.map +1 -0
- package/dist/internal/api/handler/response.js +100 -0
- package/dist/internal/api/handler/response.js.map +1 -0
- package/dist/internal/api/handler/route.d.ts +26 -0
- package/dist/internal/api/handler/route.d.ts.map +1 -0
- package/dist/internal/api/handler/route.js +54 -0
- package/dist/internal/api/handler/route.js.map +1 -0
- package/dist/internal/api/handler/runtime.d.ts +5 -0
- package/dist/internal/api/handler/runtime.d.ts.map +1 -0
- package/dist/internal/api/handler/runtime.js +187 -0
- package/dist/internal/api/handler/runtime.js.map +1 -0
- package/dist/internal/api/handler.d.ts +6 -0
- package/dist/internal/api/handler.d.ts.map +1 -0
- package/dist/internal/api/handler.js +23 -0
- package/dist/internal/api/handler.js.map +1 -0
- package/dist/internal/api/routing.d.ts +9 -0
- package/dist/internal/api/routing.d.ts.map +1 -0
- package/dist/internal/api/routing.js +35 -0
- package/dist/internal/api/routing.js.map +1 -0
- package/dist/internal/api/socket/events.d.ts +11 -0
- package/dist/internal/api/socket/events.d.ts.map +1 -0
- package/dist/internal/api/socket/events.js +11 -0
- package/dist/internal/api/socket/events.js.map +1 -0
- package/dist/internal/api/socket/server.d.ts +6 -0
- package/dist/internal/api/socket/server.d.ts.map +1 -0
- package/dist/internal/api/socket/server.js +164 -0
- package/dist/internal/api/socket/server.js.map +1 -0
- package/dist/internal/backend/utils/normalize.d.ts +2 -0
- package/dist/internal/backend/utils/normalize.d.ts.map +1 -0
- package/dist/internal/backend/utils/normalize.js +4 -0
- package/dist/internal/backend/utils/normalize.js.map +1 -0
- package/dist/internal/backend/utils/object.d.ts +3 -0
- package/dist/internal/backend/utils/object.d.ts.map +1 -0
- package/dist/internal/backend/utils/object.js +12 -0
- package/dist/internal/backend/utils/object.js.map +1 -0
- package/dist/internal/backend/utils/time.d.ts +3 -0
- package/dist/internal/backend/utils/time.d.ts.map +1 -0
- package/dist/internal/backend/utils/time.js +7 -0
- package/dist/internal/backend/utils/time.js.map +1 -0
- package/dist/internal/browser/index.d.ts +78 -0
- package/dist/internal/browser/index.d.ts.map +1 -0
- package/dist/internal/browser/index.js +1365 -0
- package/dist/internal/browser/index.js.map +1 -0
- package/dist/internal/constants.d.ts.map +1 -0
- package/dist/internal/constants.js.map +1 -0
- package/dist/internal/core/activity.d.ts +11 -0
- package/dist/internal/core/activity.d.ts.map +1 -0
- package/dist/internal/core/activity.js +206 -0
- package/dist/internal/core/activity.js.map +1 -0
- package/dist/internal/core/archive.d.ts +22 -0
- package/dist/internal/core/archive.d.ts.map +1 -0
- package/dist/internal/core/archive.js +563 -0
- package/dist/internal/core/archive.js.map +1 -0
- package/dist/internal/core/archive_cache_filesystem.d.ts +8 -0
- package/dist/internal/core/archive_cache_filesystem.d.ts.map +1 -0
- package/dist/internal/core/archive_cache_filesystem.js.map +1 -0
- package/dist/internal/core/create/git/forge.d.ts +4 -0
- package/dist/internal/core/create/git/forge.d.ts.map +1 -0
- package/dist/internal/core/create/git/forge.js +614 -0
- package/dist/internal/core/create/git/forge.js.map +1 -0
- package/dist/internal/core/create/git/host.d.ts +4 -0
- package/dist/internal/core/create/git/host.d.ts.map +1 -0
- package/dist/internal/core/create/git/host.js +182 -0
- package/dist/internal/core/create/git/host.js.map +1 -0
- package/dist/internal/core/create_git_host/branch_methods.d.ts +5 -0
- package/dist/internal/core/create_git_host/branch_methods.d.ts.map +1 -0
- package/dist/internal/core/create_git_host/branch_methods.js +223 -0
- package/dist/internal/core/create_git_host/branch_methods.js.map +1 -0
- package/dist/internal/core/create_git_host/content_methods.d.ts +5 -0
- package/dist/internal/core/create_git_host/content_methods.d.ts.map +1 -0
- package/dist/internal/core/create_git_host/content_methods.js +72 -0
- package/dist/internal/core/create_git_host/content_methods.js.map +1 -0
- package/dist/internal/core/create_git_host/remote_methods.d.ts +5 -0
- package/dist/internal/core/create_git_host/remote_methods.d.ts.map +1 -0
- package/dist/internal/core/create_git_host/remote_methods.js +108 -0
- package/dist/internal/core/create_git_host/remote_methods.js.map +1 -0
- package/dist/internal/core/create_git_host/shared.d.ts +23 -0
- package/dist/internal/core/create_git_host/shared.d.ts.map +1 -0
- package/dist/internal/core/create_git_host/shared.js +17 -0
- package/dist/internal/core/create_git_host/shared.js.map +1 -0
- package/dist/internal/core/create_git_host/working_tree_methods.d.ts +5 -0
- package/dist/internal/core/create_git_host/working_tree_methods.d.ts.map +1 -0
- package/dist/internal/core/create_git_host/working_tree_methods.js +84 -0
- package/dist/internal/core/create_git_host/working_tree_methods.js.map +1 -0
- package/dist/internal/core/forge_actions.d.ts +36 -0
- package/dist/internal/core/forge_actions.d.ts.map +1 -0
- package/dist/internal/core/forge_actions.js +730 -0
- package/dist/internal/core/forge_actions.js.map +1 -0
- package/dist/internal/core/git_forge/storage_memory.d.ts +4 -0
- package/dist/internal/core/git_forge/storage_memory.d.ts.map +1 -0
- package/dist/internal/core/git_forge/storage_memory.js +329 -0
- package/dist/internal/core/git_forge/storage_memory.js.map +1 -0
- package/dist/internal/core/inspect/helpers.d.ts +27 -0
- package/dist/internal/core/inspect/helpers.d.ts.map +1 -0
- package/dist/internal/core/inspect/helpers.js +86 -0
- package/dist/internal/core/inspect/helpers.js.map +1 -0
- package/dist/internal/core/inspect/icon_theme.d.ts +4 -0
- package/dist/internal/core/inspect/icon_theme.d.ts.map +1 -0
- package/dist/internal/core/inspect/icon_theme.js +72 -0
- package/dist/internal/core/inspect/icon_theme.js.map +1 -0
- package/dist/internal/core/inspect/linguist_progress.d.ts +14 -0
- package/dist/internal/core/inspect/linguist_progress.d.ts.map +1 -0
- package/dist/internal/core/inspect/linguist_progress.js +92 -0
- package/dist/internal/core/inspect/linguist_progress.js.map +1 -0
- package/dist/internal/core/inspect.d.ts +47 -0
- package/dist/internal/core/inspect.d.ts.map +1 -0
- package/dist/internal/core/inspect.js +547 -0
- package/dist/internal/core/inspect.js.map +1 -0
- package/dist/internal/core/inspection.d.ts +11 -0
- package/dist/internal/core/inspection.d.ts.map +1 -0
- package/dist/internal/core/inspection.js +593 -0
- package/dist/internal/core/inspection.js.map +1 -0
- package/dist/internal/core/locks.d.ts.map +1 -0
- package/dist/internal/core/locks.js.map +1 -0
- package/dist/internal/core/operation_state.d.ts +4 -0
- package/dist/internal/core/operation_state.d.ts.map +1 -0
- package/dist/internal/core/operation_state.js.map +1 -0
- package/dist/internal/core/remote.d.ts +13 -0
- package/dist/internal/core/remote.d.ts.map +1 -0
- package/dist/internal/core/remote.js +187 -0
- package/dist/internal/core/remote.js.map +1 -0
- package/dist/internal/core/repository/parsers.d.ts +13 -0
- package/dist/internal/core/repository/parsers.d.ts.map +1 -0
- package/dist/internal/core/repository/parsers.js +204 -0
- package/dist/internal/core/repository/parsers.js.map +1 -0
- package/dist/internal/core/repository.d.ts +13 -0
- package/dist/internal/core/repository.d.ts.map +1 -0
- package/dist/internal/core/repository.js +136 -0
- package/dist/internal/core/repository.js.map +1 -0
- package/dist/internal/core/run_git/env.d.ts +7 -0
- package/dist/internal/core/run_git/env.d.ts.map +1 -0
- package/dist/internal/core/run_git/env.js +18 -0
- package/dist/internal/core/run_git/env.js.map +1 -0
- package/dist/internal/core/run_git/process.d.ts +13 -0
- package/dist/internal/core/run_git/process.d.ts.map +1 -0
- package/dist/internal/core/run_git/process.js +96 -0
- package/dist/internal/core/run_git/process.js.map +1 -0
- package/dist/internal/core/run_git/repository_setup.d.ts +20 -0
- package/dist/internal/core/run_git/repository_setup.d.ts.map +1 -0
- package/dist/internal/core/run_git/repository_setup.js +116 -0
- package/dist/internal/core/run_git/repository_setup.js.map +1 -0
- package/dist/internal/core/run_git.d.ts +6 -0
- package/dist/internal/core/run_git.d.ts.map +1 -0
- package/dist/internal/core/run_git.js +6 -0
- package/dist/internal/core/run_git.js.map +1 -0
- package/dist/internal/core/working_tree/mutate.d.ts +12 -0
- package/dist/internal/core/working_tree/mutate.d.ts.map +1 -0
- package/dist/internal/core/working_tree/mutate.js +266 -0
- package/dist/internal/core/working_tree/mutate.js.map +1 -0
- package/dist/internal/core/working_tree/read.d.ts +6 -0
- package/dist/internal/core/working_tree/read.d.ts.map +1 -0
- package/dist/internal/core/working_tree/read.js +108 -0
- package/dist/internal/core/working_tree/read.js.map +1 -0
- package/dist/internal/core/working_tree/shared.d.ts +20 -0
- package/dist/internal/core/working_tree/shared.d.ts.map +1 -0
- package/dist/internal/core/working_tree/shared.js +87 -0
- package/dist/internal/core/working_tree/shared.js.map +1 -0
- package/dist/internal/core/working_tree.d.ts.map +1 -0
- package/dist/internal/core/working_tree.js.map +1 -0
- package/dist/internal/errors.d.ts.map +1 -0
- package/dist/internal/errors.js.map +1 -0
- package/dist/internal/frontend/js/utils/text.d.ts +2 -0
- package/dist/internal/frontend/js/utils/text.d.ts.map +1 -0
- package/dist/internal/frontend/js/utils/text.js +4 -0
- package/dist/internal/frontend/js/utils/text.js.map +1 -0
- package/dist/internal/http/handler/helpers.d.ts +35 -0
- package/dist/internal/http/handler/helpers.d.ts.map +1 -0
- package/dist/internal/http/handler/helpers.js +146 -0
- package/dist/internal/http/handler/helpers.js.map +1 -0
- package/dist/internal/http/handler.d.ts +6 -0
- package/dist/internal/http/handler.d.ts.map +1 -0
- package/dist/internal/http/handler.js +220 -0
- package/dist/internal/http/handler.js.map +1 -0
- package/dist/internal/index.d.ts +28 -0
- package/dist/internal/index.d.ts.map +1 -0
- package/dist/internal/index.js +25 -0
- package/dist/internal/index.js.map +1 -0
- package/dist/internal/logging.d.ts.map +1 -0
- package/dist/internal/logging.js.map +1 -0
- package/dist/internal/react/client/error.d.ts.map +1 -0
- package/dist/internal/react/client/error.js.map +1 -0
- package/dist/internal/react/client/helpers.d.ts.map +1 -0
- package/dist/internal/react/client/helpers.js.map +1 -0
- package/dist/internal/react/client/types.d.ts +275 -0
- package/dist/internal/react/client/types.d.ts.map +1 -0
- package/dist/internal/react/client/types.js.map +1 -0
- package/dist/internal/react/client.d.ts +6 -0
- package/dist/internal/react/client.d.ts.map +1 -0
- package/dist/internal/react/client.js +744 -0
- package/dist/internal/react/client.js.map +1 -0
- package/dist/internal/react/components.d.ts +44412 -0
- package/dist/internal/react/components.d.ts.map +1 -0
- package/dist/internal/react/components.js +759 -0
- package/dist/internal/react/components.js.map +1 -0
- package/dist/internal/react/hooks/query.d.ts +14 -0
- package/dist/internal/react/hooks/query.d.ts.map +1 -0
- package/dist/internal/react/hooks/query.js +139 -0
- package/dist/internal/react/hooks/query.js.map +1 -0
- package/dist/internal/react/hooks/resources.d.ts +116 -0
- package/dist/internal/react/hooks/resources.d.ts.map +1 -0
- package/dist/internal/react/hooks/resources.js +600 -0
- package/dist/internal/react/hooks/resources.js.map +1 -0
- package/dist/internal/react/hooks/types.d.ts +86 -0
- package/dist/internal/react/hooks/types.d.ts.map +1 -0
- package/dist/internal/react/hooks/types.js.map +1 -0
- package/dist/internal/react/hooks.d.ts +4 -0
- package/dist/internal/react/hooks.d.ts.map +1 -0
- package/dist/internal/react/hooks.js +3 -0
- package/dist/internal/react/hooks.js.map +1 -0
- package/dist/internal/react/index.d.ts +8 -0
- package/dist/internal/react/index.d.ts.map +1 -0
- package/dist/internal/react/index.js +5 -0
- package/dist/internal/react/index.js.map +1 -0
- package/dist/internal/react/ui/context.d.ts +1918 -0
- package/dist/internal/react/ui/context.d.ts.map +1 -0
- package/dist/internal/react/ui/context.js +192 -0
- package/dist/internal/react/ui/context.js.map +1 -0
- package/dist/internal/ssh/keys.d.ts.map +1 -0
- package/dist/internal/ssh/keys.js +41 -0
- package/dist/internal/ssh/keys.js.map +1 -0
- package/dist/internal/ssh/server/audit.d.ts +5 -0
- package/dist/internal/ssh/server/audit.d.ts.map +1 -0
- package/dist/internal/ssh/server/audit.js.map +1 -0
- package/dist/internal/ssh/server/shared.d.ts +30 -0
- package/dist/internal/ssh/server/shared.d.ts.map +1 -0
- package/dist/internal/ssh/server/shared.js +93 -0
- package/dist/internal/ssh/server/shared.js.map +1 -0
- package/dist/internal/ssh/server.d.ts +5 -0
- package/dist/internal/ssh/server.d.ts.map +1 -0
- package/dist/internal/ssh/server.js +277 -0
- package/dist/internal/ssh/server.js.map +1 -0
- package/dist/internal/types/common.d.ts.map +1 -0
- package/dist/internal/types/common.js.map +1 -0
- package/dist/internal/types/forge.d.ts +481 -0
- package/dist/internal/types/forge.d.ts.map +1 -0
- package/dist/internal/types/forge.js.map +1 -0
- package/dist/internal/types/host/archive.d.ts +98 -0
- package/dist/internal/types/host/archive.d.ts.map +1 -0
- package/dist/internal/types/host/archive.js +2 -0
- package/dist/internal/types/host/archive.js.map +1 -0
- package/dist/internal/types/host/options.d.ts +203 -0
- package/dist/internal/types/host/options.d.ts.map +1 -0
- package/dist/internal/types/host/options.js +2 -0
- package/dist/internal/types/host/options.js.map +1 -0
- package/dist/internal/types/host/service.d.ts +54 -0
- package/dist/internal/types/host/service.d.ts.map +1 -0
- package/dist/internal/types/host/service.js +2 -0
- package/dist/internal/types/host/service.js.map +1 -0
- package/dist/internal/types/host.d.ts +4 -0
- package/dist/internal/types/host.d.ts.map +1 -0
- package/dist/internal/types/host.js.map +1 -0
- package/dist/internal/types/index.d.ts +6 -0
- package/dist/internal/types/index.d.ts.map +1 -0
- package/dist/internal/types/index.js.map +1 -0
- package/dist/internal/types/repository/archive.d.ts +37 -0
- package/dist/internal/types/repository/archive.d.ts.map +1 -0
- package/dist/internal/types/repository/archive.js +2 -0
- package/dist/internal/types/repository/archive.js.map +1 -0
- package/dist/internal/types/repository/core.d.ts +255 -0
- package/dist/internal/types/repository/core.d.ts.map +1 -0
- package/dist/internal/types/repository/core.js +2 -0
- package/dist/internal/types/repository/core.js.map +1 -0
- package/dist/internal/types/repository/inspection.d.ts +118 -0
- package/dist/internal/types/repository/inspection.d.ts.map +1 -0
- package/dist/internal/types/repository/inspection.js +2 -0
- package/dist/internal/types/repository/inspection.js.map +1 -0
- package/dist/internal/types/repository.d.ts +4 -0
- package/dist/internal/types/repository.d.ts.map +1 -0
- package/dist/internal/types/repository.js.map +1 -0
- package/dist/internal/types/transports.d.ts +169 -0
- package/dist/internal/types/transports.d.ts.map +1 -0
- package/dist/internal/types/transports.js.map +1 -0
- package/dist/internal/types.d.ts.map +1 -0
- package/dist/internal/types.js.map +1 -0
- package/dist/internal/utils/paths.d.ts.map +1 -0
- package/dist/internal/utils/paths.js +51 -0
- package/dist/internal/utils/paths.js.map +1 -0
- package/dist/internal/utils/text.d.ts +3 -0
- package/dist/internal/utils/text.d.ts.map +1 -0
- package/dist/internal/utils/text.js +9 -0
- package/dist/internal/utils/text.js.map +1 -0
- package/dist/src/api/forge/handler.d.ts +2 -0
- package/dist/src/api/forge/handler.d.ts.map +1 -0
- package/dist/src/api/forge/handler.js +2 -0
- package/dist/src/api/forge/handler.js.map +1 -0
- package/dist/src/api/forge/route.d.ts +2 -0
- package/dist/src/api/forge/route.d.ts.map +1 -0
- package/dist/src/api/forge/route.js +2 -0
- package/dist/src/api/forge/route.js.map +1 -0
- package/dist/src/api/handler/action.d.ts +2 -0
- package/dist/src/api/handler/action.d.ts.map +1 -0
- package/dist/src/api/handler/action.js +2 -0
- package/dist/src/api/handler/action.js.map +1 -0
- package/dist/src/api/handler/archive.d.ts +2 -0
- package/dist/src/api/handler/archive.d.ts.map +1 -0
- package/dist/src/api/handler/archive.js +2 -0
- package/dist/src/api/handler/archive.js.map +1 -0
- package/dist/src/api/handler/response.d.ts +2 -0
- package/dist/src/api/handler/response.d.ts.map +1 -0
- package/dist/src/api/handler/response.js +2 -0
- package/dist/src/api/handler/response.js.map +1 -0
- package/dist/src/api/handler/route.d.ts +2 -0
- package/dist/src/api/handler/route.d.ts.map +1 -0
- package/dist/src/api/handler/route.js +2 -0
- package/dist/src/api/handler/route.js.map +1 -0
- package/dist/src/api/handler.d.ts +2 -0
- package/dist/src/api/handler.d.ts.map +1 -0
- package/dist/src/api/handler.js +2 -0
- package/dist/src/api/handler.js.map +1 -0
- package/dist/src/api/socket/events.d.ts +2 -0
- package/dist/src/api/socket/events.d.ts.map +1 -0
- package/dist/src/api/socket/events.js +2 -0
- package/dist/src/api/socket/events.js.map +1 -0
- package/dist/src/api/socket/server.d.ts +2 -0
- package/dist/src/api/socket/server.d.ts.map +1 -0
- package/dist/src/api/socket/server.js +2 -0
- package/dist/src/api/socket/server.js.map +1 -0
- package/dist/src/backend/utils/normalize.d.ts +2 -0
- package/dist/src/backend/utils/normalize.d.ts.map +1 -0
- package/dist/src/backend/utils/normalize.js +4 -0
- package/dist/src/backend/utils/normalize.js.map +1 -0
- package/dist/src/backend/utils/object.d.ts +3 -0
- package/dist/src/backend/utils/object.d.ts.map +1 -0
- package/dist/src/backend/utils/object.js +12 -0
- package/dist/src/backend/utils/object.js.map +1 -0
- package/dist/src/backend/utils/time.d.ts +3 -0
- package/dist/src/backend/utils/time.d.ts.map +1 -0
- package/dist/src/backend/utils/time.js +7 -0
- package/dist/src/backend/utils/time.js.map +1 -0
- package/dist/src/browser/index.d.ts +2 -0
- package/dist/src/browser/index.d.ts.map +1 -0
- package/dist/src/browser/index.js +2 -0
- package/dist/src/browser/index.js.map +1 -0
- package/dist/src/constants.d.ts +2 -0
- package/dist/src/constants.d.ts.map +1 -0
- package/dist/src/constants.js +2 -0
- package/dist/src/constants.js.map +1 -0
- package/dist/src/core/archive.d.ts +2 -0
- package/dist/src/core/archive.d.ts.map +1 -0
- package/dist/src/core/archive.js +2 -0
- package/dist/src/core/archive.js.map +1 -0
- package/dist/src/core/archive_cache_filesystem.d.ts +2 -0
- package/dist/src/core/archive_cache_filesystem.d.ts.map +1 -0
- package/dist/src/core/archive_cache_filesystem.js +2 -0
- package/dist/src/core/archive_cache_filesystem.js.map +1 -0
- package/dist/src/core/create/git/forge.d.ts +2 -0
- package/dist/src/core/create/git/forge.d.ts.map +1 -0
- package/dist/src/core/create/git/forge.js +2 -0
- package/dist/src/core/create/git/forge.js.map +1 -0
- package/dist/src/core/create/git/host.d.ts +2 -0
- package/dist/src/core/create/git/host.d.ts.map +1 -0
- package/dist/src/core/create/git/host.js +2 -0
- package/dist/src/core/create/git/host.js.map +1 -0
- package/dist/src/core/create_git_host/branch_methods.d.ts +2 -0
- package/dist/src/core/create_git_host/branch_methods.d.ts.map +1 -0
- package/dist/src/core/create_git_host/branch_methods.js +2 -0
- package/dist/src/core/create_git_host/branch_methods.js.map +1 -0
- package/dist/src/core/create_git_host/content_methods.d.ts +2 -0
- package/dist/src/core/create_git_host/content_methods.d.ts.map +1 -0
- package/dist/src/core/create_git_host/content_methods.js +2 -0
- package/dist/src/core/create_git_host/content_methods.js.map +1 -0
- package/dist/src/core/create_git_host/remote_methods.d.ts +2 -0
- package/dist/src/core/create_git_host/remote_methods.d.ts.map +1 -0
- package/dist/src/core/create_git_host/remote_methods.js +2 -0
- package/dist/src/core/create_git_host/remote_methods.js.map +1 -0
- package/dist/src/core/create_git_host/shared.d.ts +2 -0
- package/dist/src/core/create_git_host/shared.d.ts.map +1 -0
- package/dist/src/core/create_git_host/shared.js +2 -0
- package/dist/src/core/create_git_host/shared.js.map +1 -0
- package/dist/src/core/create_git_host/working_tree_methods.d.ts +2 -0
- package/dist/src/core/create_git_host/working_tree_methods.d.ts.map +1 -0
- package/dist/src/core/create_git_host/working_tree_methods.js +2 -0
- package/dist/src/core/create_git_host/working_tree_methods.js.map +1 -0
- package/dist/src/core/git_forge/storage_memory.d.ts +2 -0
- package/dist/src/core/git_forge/storage_memory.d.ts.map +1 -0
- package/dist/src/core/git_forge/storage_memory.js +2 -0
- package/dist/src/core/git_forge/storage_memory.js.map +1 -0
- package/dist/src/core/inspect/helpers.d.ts +2 -0
- package/dist/src/core/inspect/helpers.d.ts.map +1 -0
- package/dist/src/core/inspect/helpers.js +2 -0
- package/dist/src/core/inspect/helpers.js.map +1 -0
- package/dist/src/core/inspect/icon_theme.d.ts +2 -0
- package/dist/src/core/inspect/icon_theme.d.ts.map +1 -0
- package/dist/src/core/inspect/icon_theme.js +2 -0
- package/dist/src/core/inspect/icon_theme.js.map +1 -0
- package/dist/src/core/inspect/linguist_progress.d.ts +2 -0
- package/dist/src/core/inspect/linguist_progress.d.ts.map +1 -0
- package/dist/src/core/inspect/linguist_progress.js +2 -0
- package/dist/src/core/inspect/linguist_progress.js.map +1 -0
- package/dist/src/core/inspect.d.ts +2 -0
- package/dist/src/core/inspect.d.ts.map +1 -0
- package/dist/src/core/inspect.js +2 -0
- package/dist/src/core/inspect.js.map +1 -0
- package/dist/src/core/inspection.d.ts +2 -0
- package/dist/src/core/inspection.d.ts.map +1 -0
- package/dist/src/core/inspection.js +2 -0
- package/dist/src/core/inspection.js.map +1 -0
- package/dist/src/core/locks.d.ts +2 -0
- package/dist/src/core/locks.d.ts.map +1 -0
- package/dist/src/core/locks.js +2 -0
- package/dist/src/core/locks.js.map +1 -0
- package/dist/src/core/operation_state.d.ts +2 -0
- package/dist/src/core/operation_state.d.ts.map +1 -0
- package/dist/src/core/operation_state.js +2 -0
- package/dist/src/core/operation_state.js.map +1 -0
- package/dist/src/core/remote.d.ts +2 -0
- package/dist/src/core/remote.d.ts.map +1 -0
- package/dist/src/core/remote.js +2 -0
- package/dist/src/core/remote.js.map +1 -0
- package/dist/src/core/repository/parsers.d.ts +2 -0
- package/dist/src/core/repository/parsers.d.ts.map +1 -0
- package/dist/src/core/repository/parsers.js +2 -0
- package/dist/src/core/repository/parsers.js.map +1 -0
- package/dist/src/core/repository.d.ts +2 -0
- package/dist/src/core/repository.d.ts.map +1 -0
- package/dist/src/core/repository.js +2 -0
- package/dist/src/core/repository.js.map +1 -0
- package/dist/src/core/run_git/env.d.ts +2 -0
- package/dist/src/core/run_git/env.d.ts.map +1 -0
- package/dist/src/core/run_git/env.js +2 -0
- package/dist/src/core/run_git/env.js.map +1 -0
- package/dist/src/core/run_git/process.d.ts +2 -0
- package/dist/src/core/run_git/process.d.ts.map +1 -0
- package/dist/src/core/run_git/process.js +2 -0
- package/dist/src/core/run_git/process.js.map +1 -0
- package/dist/src/core/run_git/repository_setup.d.ts +2 -0
- package/dist/src/core/run_git/repository_setup.d.ts.map +1 -0
- package/dist/src/core/run_git/repository_setup.js +2 -0
- package/dist/src/core/run_git/repository_setup.js.map +1 -0
- package/dist/src/core/run_git.d.ts +2 -0
- package/dist/src/core/run_git.d.ts.map +1 -0
- package/dist/src/core/run_git.js +2 -0
- package/dist/src/core/run_git.js.map +1 -0
- package/dist/src/core/working_tree/mutate.d.ts +2 -0
- package/dist/src/core/working_tree/mutate.d.ts.map +1 -0
- package/dist/src/core/working_tree/mutate.js +2 -0
- package/dist/src/core/working_tree/mutate.js.map +1 -0
- package/dist/src/core/working_tree/read.d.ts +2 -0
- package/dist/src/core/working_tree/read.d.ts.map +1 -0
- package/dist/src/core/working_tree/read.js +2 -0
- package/dist/src/core/working_tree/read.js.map +1 -0
- package/dist/src/core/working_tree/shared.d.ts +2 -0
- package/dist/src/core/working_tree/shared.d.ts.map +1 -0
- package/dist/src/core/working_tree/shared.js +2 -0
- package/dist/src/core/working_tree/shared.js.map +1 -0
- package/dist/src/core/working_tree.d.ts +2 -0
- package/dist/src/core/working_tree.d.ts.map +1 -0
- package/dist/src/core/working_tree.js +2 -0
- package/dist/src/core/working_tree.js.map +1 -0
- package/dist/src/errors.d.ts +2 -0
- package/dist/src/errors.d.ts.map +1 -0
- package/dist/src/errors.js +2 -0
- package/dist/src/errors.js.map +1 -0
- package/dist/src/frontend/js/utils/text.d.ts +2 -0
- package/dist/src/frontend/js/utils/text.d.ts.map +1 -0
- package/dist/src/frontend/js/utils/text.js +4 -0
- package/dist/src/frontend/js/utils/text.js.map +1 -0
- package/dist/src/http/handler/helpers.d.ts +2 -0
- package/dist/src/http/handler/helpers.d.ts.map +1 -0
- package/dist/src/http/handler/helpers.js +2 -0
- package/dist/src/http/handler/helpers.js.map +1 -0
- package/dist/src/http/handler.d.ts +2 -0
- package/dist/src/http/handler.d.ts.map +1 -0
- package/dist/src/http/handler.js +2 -0
- package/dist/src/http/handler.js.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/logging.d.ts +2 -0
- package/dist/src/logging.d.ts.map +1 -0
- package/dist/src/logging.js +2 -0
- package/dist/src/logging.js.map +1 -0
- package/dist/src/react/client/error.d.ts +2 -0
- package/dist/src/react/client/error.d.ts.map +1 -0
- package/dist/src/react/client/error.js +2 -0
- package/dist/src/react/client/error.js.map +1 -0
- package/dist/src/react/client/helpers.d.ts +2 -0
- package/dist/src/react/client/helpers.d.ts.map +1 -0
- package/dist/src/react/client/helpers.js +2 -0
- package/dist/src/react/client/helpers.js.map +1 -0
- package/dist/src/react/client/types.d.ts +2 -0
- package/dist/src/react/client/types.d.ts.map +1 -0
- package/dist/src/react/client/types.js +2 -0
- package/dist/src/react/client/types.js.map +1 -0
- package/dist/src/react/client.d.ts +2 -0
- package/dist/src/react/client.d.ts.map +1 -0
- package/dist/src/react/client.js +2 -0
- package/dist/src/react/client.js.map +1 -0
- package/dist/src/react/components.d.ts +2 -0
- package/dist/src/react/components.d.ts.map +1 -0
- package/dist/src/react/components.js +2 -0
- package/dist/src/react/components.js.map +1 -0
- package/dist/src/react/hooks/query.d.ts +2 -0
- package/dist/src/react/hooks/query.d.ts.map +1 -0
- package/dist/src/react/hooks/query.js +2 -0
- package/dist/src/react/hooks/query.js.map +1 -0
- package/dist/src/react/hooks/resources.d.ts +2 -0
- package/dist/src/react/hooks/resources.d.ts.map +1 -0
- package/dist/src/react/hooks/resources.js +2 -0
- package/dist/src/react/hooks/resources.js.map +1 -0
- package/dist/src/react/hooks/types.d.ts +2 -0
- package/dist/src/react/hooks/types.d.ts.map +1 -0
- package/dist/src/react/hooks/types.js +2 -0
- package/dist/src/react/hooks/types.js.map +1 -0
- package/dist/src/react/hooks.d.ts +2 -0
- package/dist/src/react/hooks.d.ts.map +1 -0
- package/dist/src/react/hooks.js +2 -0
- package/dist/src/react/hooks.js.map +1 -0
- package/dist/src/react/index.d.ts +2 -0
- package/dist/src/react/index.d.ts.map +1 -0
- package/dist/src/react/index.js +2 -0
- package/dist/src/react/index.js.map +1 -0
- package/dist/src/react/ui/context.d.ts +2 -0
- package/dist/src/react/ui/context.d.ts.map +1 -0
- package/dist/src/react/ui/context.js +2 -0
- package/dist/src/react/ui/context.js.map +1 -0
- package/dist/src/ssh/keys.d.ts +2 -0
- package/dist/src/ssh/keys.d.ts.map +1 -0
- package/dist/src/ssh/keys.js +2 -0
- package/dist/src/ssh/keys.js.map +1 -0
- package/dist/src/ssh/server/audit.d.ts +2 -0
- package/dist/src/ssh/server/audit.d.ts.map +1 -0
- package/dist/src/ssh/server/audit.js +2 -0
- package/dist/src/ssh/server/audit.js.map +1 -0
- package/dist/src/ssh/server/shared.d.ts +2 -0
- package/dist/src/ssh/server/shared.d.ts.map +1 -0
- package/dist/src/ssh/server/shared.js +2 -0
- package/dist/src/ssh/server/shared.js.map +1 -0
- package/dist/src/ssh/server.d.ts +2 -0
- package/dist/src/ssh/server.d.ts.map +1 -0
- package/dist/src/ssh/server.js +2 -0
- package/dist/src/ssh/server.js.map +1 -0
- package/dist/src/types/common.d.ts +2 -0
- package/dist/src/types/common.d.ts.map +1 -0
- package/dist/src/types/common.js +2 -0
- package/dist/src/types/common.js.map +1 -0
- package/dist/src/types/forge.d.ts +2 -0
- package/dist/src/types/forge.d.ts.map +1 -0
- package/dist/src/types/forge.js +2 -0
- package/dist/src/types/forge.js.map +1 -0
- package/dist/src/types/host.d.ts +2 -0
- package/dist/src/types/host.d.ts.map +1 -0
- package/dist/src/types/host.js +2 -0
- package/dist/src/types/host.js.map +1 -0
- package/dist/src/types/index.d.ts +2 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/src/types/index.js +2 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/types/repository.d.ts +2 -0
- package/dist/src/types/repository.d.ts.map +1 -0
- package/dist/src/types/repository.js +2 -0
- package/dist/src/types/repository.js.map +1 -0
- package/dist/src/types/transports.d.ts +2 -0
- package/dist/src/types/transports.d.ts.map +1 -0
- package/dist/src/types/transports.js +2 -0
- package/dist/src/types/transports.js.map +1 -0
- package/dist/src/types.d.ts +2 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +2 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/utils/paths.d.ts +2 -0
- package/dist/src/utils/paths.d.ts.map +1 -0
- package/dist/src/utils/paths.js +2 -0
- package/dist/src/utils/paths.js.map +1 -0
- package/dist/src/utils/text.d.ts +2 -0
- package/dist/src/utils/text.d.ts.map +1 -0
- package/dist/src/utils/text.js +2 -0
- package/dist/src/utils/text.js.map +1 -0
- package/package.json +227 -63
- package/dist/api/forge/handler.d.ts +0 -6
- package/dist/api/forge/handler.d.ts.map +0 -1
- package/dist/api/forge/handler.js +0 -339
- package/dist/api/forge/handler.js.map +0 -1
- package/dist/api/forge/route.d.ts +0 -34
- package/dist/api/forge/route.d.ts.map +0 -1
- package/dist/api/forge/route.js +0 -94
- package/dist/api/forge/route.js.map +0 -1
- package/dist/api/handler/action.d.ts +0 -5
- package/dist/api/handler/action.d.ts.map +0 -1
- package/dist/api/handler/action.js +0 -91
- package/dist/api/handler/action.js.map +0 -1
- package/dist/api/handler/archive.d.ts +0 -14
- package/dist/api/handler/archive.d.ts.map +0 -1
- package/dist/api/handler/archive.js +0 -61
- package/dist/api/handler/archive.js.map +0 -1
- package/dist/api/handler/response.d.ts.map +0 -1
- package/dist/api/handler/response.js +0 -100
- package/dist/api/handler/response.js.map +0 -1
- package/dist/api/handler/route.d.ts +0 -39
- package/dist/api/handler/route.d.ts.map +0 -1
- package/dist/api/handler/route.js +0 -79
- package/dist/api/handler/route.js.map +0 -1
- package/dist/api/handler.d.ts +0 -6
- package/dist/api/handler.d.ts.map +0 -1
- package/dist/api/handler.js +0 -153
- package/dist/api/handler.js.map +0 -1
- package/dist/api/socket_events.d.ts +0 -7
- package/dist/api/socket_events.d.ts.map +0 -1
- package/dist/api/socket_events.js +0 -7
- package/dist/api/socket_events.js.map +0 -1
- package/dist/api/socket_server.d.ts +0 -6
- package/dist/api/socket_server.d.ts.map +0 -1
- package/dist/api/socket_server.js +0 -164
- package/dist/api/socket_server.js.map +0 -1
- package/dist/browser/index.d.ts +0 -65
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/browser/index.js +0 -797
- package/dist/browser/index.js.map +0 -1
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js.map +0 -1
- package/dist/core/archive.d.ts +0 -25
- package/dist/core/archive.d.ts.map +0 -1
- package/dist/core/archive.js +0 -419
- package/dist/core/archive.js.map +0 -1
- package/dist/core/archive_cache_filesystem.d.ts +0 -8
- package/dist/core/archive_cache_filesystem.d.ts.map +0 -1
- package/dist/core/archive_cache_filesystem.js.map +0 -1
- package/dist/core/create_git_forge.d.ts +0 -4
- package/dist/core/create_git_forge.d.ts.map +0 -1
- package/dist/core/create_git_forge.js +0 -481
- package/dist/core/create_git_forge.js.map +0 -1
- package/dist/core/create_git_host/branch_methods.d.ts +0 -5
- package/dist/core/create_git_host/branch_methods.d.ts.map +0 -1
- package/dist/core/create_git_host/branch_methods.js +0 -223
- package/dist/core/create_git_host/branch_methods.js.map +0 -1
- package/dist/core/create_git_host/content_methods.d.ts +0 -5
- package/dist/core/create_git_host/content_methods.d.ts.map +0 -1
- package/dist/core/create_git_host/content_methods.js +0 -72
- package/dist/core/create_git_host/content_methods.js.map +0 -1
- package/dist/core/create_git_host/remote_methods.d.ts +0 -5
- package/dist/core/create_git_host/remote_methods.d.ts.map +0 -1
- package/dist/core/create_git_host/remote_methods.js +0 -48
- package/dist/core/create_git_host/remote_methods.js.map +0 -1
- package/dist/core/create_git_host/shared.d.ts +0 -23
- package/dist/core/create_git_host/shared.d.ts.map +0 -1
- package/dist/core/create_git_host/shared.js +0 -17
- package/dist/core/create_git_host/shared.js.map +0 -1
- package/dist/core/create_git_host/working_tree_methods.d.ts +0 -5
- package/dist/core/create_git_host/working_tree_methods.d.ts.map +0 -1
- package/dist/core/create_git_host/working_tree_methods.js +0 -84
- package/dist/core/create_git_host/working_tree_methods.js.map +0 -1
- package/dist/core/create_git_host.d.ts +0 -4
- package/dist/core/create_git_host.d.ts.map +0 -1
- package/dist/core/create_git_host.js +0 -182
- package/dist/core/create_git_host.js.map +0 -1
- package/dist/core/git_forge/storage_memory.d.ts +0 -4
- package/dist/core/git_forge/storage_memory.d.ts.map +0 -1
- package/dist/core/git_forge/storage_memory.js +0 -140
- package/dist/core/git_forge/storage_memory.js.map +0 -1
- package/dist/core/inspect/helpers.d.ts +0 -27
- package/dist/core/inspect/helpers.d.ts.map +0 -1
- package/dist/core/inspect/helpers.js +0 -86
- package/dist/core/inspect/helpers.js.map +0 -1
- package/dist/core/inspect/icon_theme.d.ts +0 -4
- package/dist/core/inspect/icon_theme.d.ts.map +0 -1
- package/dist/core/inspect/icon_theme.js +0 -72
- package/dist/core/inspect/icon_theme.js.map +0 -1
- package/dist/core/inspect/linguist_progress.d.ts +0 -14
- package/dist/core/inspect/linguist_progress.d.ts.map +0 -1
- package/dist/core/inspect/linguist_progress.js +0 -92
- package/dist/core/inspect/linguist_progress.js.map +0 -1
- package/dist/core/inspect.d.ts +0 -47
- package/dist/core/inspect.d.ts.map +0 -1
- package/dist/core/inspect.js +0 -547
- package/dist/core/inspect.js.map +0 -1
- package/dist/core/inspection.d.ts +0 -11
- package/dist/core/inspection.d.ts.map +0 -1
- package/dist/core/inspection.js +0 -593
- package/dist/core/inspection.js.map +0 -1
- package/dist/core/locks.d.ts.map +0 -1
- package/dist/core/locks.js.map +0 -1
- package/dist/core/operation_state.d.ts +0 -4
- package/dist/core/operation_state.d.ts.map +0 -1
- package/dist/core/operation_state.js.map +0 -1
- package/dist/core/remote.d.ts +0 -13
- package/dist/core/remote.d.ts.map +0 -1
- package/dist/core/remote.js +0 -187
- package/dist/core/remote.js.map +0 -1
- package/dist/core/repository/parsers.d.ts +0 -13
- package/dist/core/repository/parsers.d.ts.map +0 -1
- package/dist/core/repository/parsers.js +0 -204
- package/dist/core/repository/parsers.js.map +0 -1
- package/dist/core/repository.d.ts +0 -13
- package/dist/core/repository.d.ts.map +0 -1
- package/dist/core/repository.js +0 -136
- package/dist/core/repository.js.map +0 -1
- package/dist/core/run_git/env.d.ts +0 -7
- package/dist/core/run_git/env.d.ts.map +0 -1
- package/dist/core/run_git/env.js +0 -18
- package/dist/core/run_git/env.js.map +0 -1
- package/dist/core/run_git/process.d.ts +0 -13
- package/dist/core/run_git/process.d.ts.map +0 -1
- package/dist/core/run_git/process.js +0 -96
- package/dist/core/run_git/process.js.map +0 -1
- package/dist/core/run_git/repository_setup.d.ts +0 -20
- package/dist/core/run_git/repository_setup.d.ts.map +0 -1
- package/dist/core/run_git/repository_setup.js +0 -116
- package/dist/core/run_git/repository_setup.js.map +0 -1
- package/dist/core/run_git.d.ts +0 -6
- package/dist/core/run_git.d.ts.map +0 -1
- package/dist/core/run_git.js +0 -6
- package/dist/core/run_git.js.map +0 -1
- package/dist/core/working_tree/mutate.d.ts +0 -12
- package/dist/core/working_tree/mutate.d.ts.map +0 -1
- package/dist/core/working_tree/mutate.js +0 -266
- package/dist/core/working_tree/mutate.js.map +0 -1
- package/dist/core/working_tree/read.d.ts +0 -6
- package/dist/core/working_tree/read.d.ts.map +0 -1
- package/dist/core/working_tree/read.js +0 -108
- package/dist/core/working_tree/read.js.map +0 -1
- package/dist/core/working_tree/shared.d.ts +0 -20
- package/dist/core/working_tree/shared.d.ts.map +0 -1
- package/dist/core/working_tree/shared.js +0 -87
- package/dist/core/working_tree/shared.js.map +0 -1
- package/dist/core/working_tree.d.ts.map +0 -1
- package/dist/core/working_tree.js.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/http/handler/helpers.d.ts +0 -35
- package/dist/http/handler/helpers.d.ts.map +0 -1
- package/dist/http/handler/helpers.js +0 -146
- package/dist/http/handler/helpers.js.map +0 -1
- package/dist/http/handler.d.ts +0 -6
- package/dist/http/handler.d.ts.map +0 -1
- package/dist/http/handler.js +0 -216
- package/dist/http/handler.js.map +0 -1
- package/dist/index.d.ts +0 -24
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -21
- package/dist/index.js.map +0 -1
- package/dist/logging.d.ts.map +0 -1
- package/dist/logging.js.map +0 -1
- package/dist/react/client/error.d.ts.map +0 -1
- package/dist/react/client/error.js.map +0 -1
- package/dist/react/client/helpers.d.ts.map +0 -1
- package/dist/react/client/helpers.js.map +0 -1
- package/dist/react/client/types.d.ts +0 -178
- package/dist/react/client/types.d.ts.map +0 -1
- package/dist/react/client/types.js.map +0 -1
- package/dist/react/client.d.ts +0 -6
- package/dist/react/client.d.ts.map +0 -1
- package/dist/react/client.js +0 -470
- package/dist/react/client.js.map +0 -1
- package/dist/react/components.d.ts +0 -44412
- package/dist/react/components.d.ts.map +0 -1
- package/dist/react/components.js +0 -758
- package/dist/react/components.js.map +0 -1
- package/dist/react/hooks/query.d.ts +0 -14
- package/dist/react/hooks/query.d.ts.map +0 -1
- package/dist/react/hooks/query.js +0 -139
- package/dist/react/hooks/query.js.map +0 -1
- package/dist/react/hooks/resources.d.ts +0 -64
- package/dist/react/hooks/resources.d.ts.map +0 -1
- package/dist/react/hooks/resources.js +0 -438
- package/dist/react/hooks/resources.js.map +0 -1
- package/dist/react/hooks/types.d.ts +0 -80
- package/dist/react/hooks/types.d.ts.map +0 -1
- package/dist/react/hooks/types.js.map +0 -1
- package/dist/react/hooks.d.ts +0 -4
- package/dist/react/hooks.d.ts.map +0 -1
- package/dist/react/hooks.js +0 -3
- package/dist/react/hooks.js.map +0 -1
- package/dist/react/index.d.ts +0 -8
- package/dist/react/index.d.ts.map +0 -1
- package/dist/react/index.js +0 -5
- package/dist/react/index.js.map +0 -1
- package/dist/react/ui/context.d.ts +0 -1907
- package/dist/react/ui/context.d.ts.map +0 -1
- package/dist/react/ui/context.js +0 -186
- package/dist/react/ui/context.js.map +0 -1
- package/dist/ssh/keys.d.ts.map +0 -1
- package/dist/ssh/keys.js +0 -41
- package/dist/ssh/keys.js.map +0 -1
- package/dist/ssh/server/audit.d.ts +0 -5
- package/dist/ssh/server/audit.d.ts.map +0 -1
- package/dist/ssh/server/audit.js.map +0 -1
- package/dist/ssh/server/shared.d.ts +0 -30
- package/dist/ssh/server/shared.d.ts.map +0 -1
- package/dist/ssh/server/shared.js +0 -93
- package/dist/ssh/server/shared.js.map +0 -1
- package/dist/ssh/server.d.ts +0 -5
- package/dist/ssh/server.d.ts.map +0 -1
- package/dist/ssh/server.js +0 -273
- package/dist/ssh/server.js.map +0 -1
- package/dist/types/common.d.ts.map +0 -1
- package/dist/types/common.js.map +0 -1
- package/dist/types/forge.d.ts +0 -221
- package/dist/types/forge.d.ts.map +0 -1
- package/dist/types/forge.js.map +0 -1
- package/dist/types/host.d.ts +0 -300
- package/dist/types/host.d.ts.map +0 -1
- package/dist/types/host.js.map +0 -1
- package/dist/types/index.d.ts +0 -6
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/types/repository.d.ts +0 -401
- package/dist/types/repository.d.ts.map +0 -1
- package/dist/types/repository.js.map +0 -1
- package/dist/types/transports.d.ts +0 -166
- package/dist/types/transports.d.ts.map +0 -1
- package/dist/types/transports.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/utils/paths.d.ts.map +0 -1
- package/dist/utils/paths.js +0 -51
- package/dist/utils/paths.js.map +0 -1
- package/dist/utils/text.d.ts +0 -4
- package/dist/utils/text.d.ts.map +0 -1
- package/dist/utils/text.js +0 -10
- package/dist/utils/text.js.map +0 -1
- /package/dist/{api → internal/api}/handler/response.d.ts +0 -0
- /package/dist/{constants.d.ts → internal/constants.d.ts} +0 -0
- /package/dist/{constants.js → internal/constants.js} +0 -0
- /package/dist/{core → internal/core}/archive_cache_filesystem.js +0 -0
- /package/dist/{core → internal/core}/locks.d.ts +0 -0
- /package/dist/{core → internal/core}/locks.js +0 -0
- /package/dist/{core → internal/core}/operation_state.js +0 -0
- /package/dist/{core → internal/core}/working_tree.d.ts +0 -0
- /package/dist/{core → internal/core}/working_tree.js +0 -0
- /package/dist/{errors.d.ts → internal/errors.d.ts} +0 -0
- /package/dist/{errors.js → internal/errors.js} +0 -0
- /package/dist/{logging.d.ts → internal/logging.d.ts} +0 -0
- /package/dist/{logging.js → internal/logging.js} +0 -0
- /package/dist/{react → internal/react}/client/error.d.ts +0 -0
- /package/dist/{react → internal/react}/client/error.js +0 -0
- /package/dist/{react → internal/react}/client/helpers.d.ts +0 -0
- /package/dist/{react → internal/react}/client/helpers.js +0 -0
- /package/dist/{react → internal/react}/client/types.js +0 -0
- /package/dist/{react → internal/react}/hooks/types.js +0 -0
- /package/dist/{ssh → internal/ssh}/keys.d.ts +0 -0
- /package/dist/{ssh → internal/ssh}/server/audit.js +0 -0
- /package/dist/{types → internal/types}/common.d.ts +0 -0
- /package/dist/{types → internal/types}/common.js +0 -0
- /package/dist/{types → internal/types}/forge.js +0 -0
- /package/dist/{types → internal/types}/host.js +0 -0
- /package/dist/{types → internal/types}/index.js +0 -0
- /package/dist/{types → internal/types}/repository.js +0 -0
- /package/dist/{types → internal/types}/transports.js +0 -0
- /package/dist/{types.d.ts → internal/types.d.ts} +0 -0
- /package/dist/{types.js → internal/types.js} +0 -0
- /package/dist/{utils → internal/utils}/paths.d.ts +0 -0
|
@@ -0,0 +1,730 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { spawn } from "node:child_process";
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
import os from "node:os";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import { GitHostError } from "#8974ac53d713";
|
|
7
|
+
import { text } from "#sy81xkgkmoa0";
|
|
8
|
+
import { runGit } from "./run_git.js";
|
|
9
|
+
const ACTIVITY_LISTENER_SYMBOL = Symbol.for("@trebired/git-host/actions-activity-listeners");
|
|
10
|
+
const ACTIVITY_WRAPPED_SYMBOL = Symbol.for("@trebired/git-host/actions-activity-wrapped");
|
|
11
|
+
const OUTPUT_PREVIEW_LIMIT = 4000;
|
|
12
|
+
const DEFAULT_HEARTBEAT_INTERVAL_MS = 1000;
|
|
13
|
+
const TERMINAL_RUN_STATUSES = new Set(["cancelled", "failed", "skipped", "success"]);
|
|
14
|
+
function nowIso() {
|
|
15
|
+
return new Date().toISOString();
|
|
16
|
+
}
|
|
17
|
+
function slugify(value) {
|
|
18
|
+
const next = text(value)
|
|
19
|
+
.toLowerCase()
|
|
20
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
21
|
+
.replace(/^-+|-+$/g, "");
|
|
22
|
+
return next || "workflow";
|
|
23
|
+
}
|
|
24
|
+
function normalizeEnv(value) {
|
|
25
|
+
if (!value || typeof value !== "object")
|
|
26
|
+
return undefined;
|
|
27
|
+
const next = Object.fromEntries(Object.entries(value)
|
|
28
|
+
.map(([key, entry]) => [text(key), text(entry)])
|
|
29
|
+
.filter(([key, entry]) => key && entry));
|
|
30
|
+
return Object.keys(next).length ? next : undefined;
|
|
31
|
+
}
|
|
32
|
+
function normalizeSteps(steps) {
|
|
33
|
+
return (Array.isArray(steps) ? steps : []).map((step) => ({
|
|
34
|
+
env: normalizeEnv(step.env),
|
|
35
|
+
id: text(step.id, randomUUID()),
|
|
36
|
+
kind: "shell",
|
|
37
|
+
name: text(step.name, "Step"),
|
|
38
|
+
run: text(step.run),
|
|
39
|
+
shell: text(step.shell),
|
|
40
|
+
})).filter((step) => step.run);
|
|
41
|
+
}
|
|
42
|
+
function appendOutputPreview(current, chunk) {
|
|
43
|
+
const next = `${current}${chunk}`;
|
|
44
|
+
return next.length <= OUTPUT_PREVIEW_LIMIT ? next : next.slice(-OUTPUT_PREVIEW_LIMIT);
|
|
45
|
+
}
|
|
46
|
+
function toDateSortValue(value) {
|
|
47
|
+
return text(value);
|
|
48
|
+
}
|
|
49
|
+
function matchesWorkflowTrigger(workflow, triggerKind, context) {
|
|
50
|
+
if (!workflow.enabled || text(workflow.trigger) !== text(triggerKind))
|
|
51
|
+
return false;
|
|
52
|
+
const branches = Array.isArray(workflow.source?.branches) ? workflow.source?.branches.map((entry) => text(entry)).filter(Boolean) : [];
|
|
53
|
+
const tags = Array.isArray(workflow.source?.tags) ? workflow.source?.tags.map((entry) => text(entry)).filter(Boolean) : [];
|
|
54
|
+
const branch = text(context.branch);
|
|
55
|
+
const tag = text(context.tag_name, text(context.tag));
|
|
56
|
+
if (branches.length && !branches.includes(branch))
|
|
57
|
+
return false;
|
|
58
|
+
if (tags.length && !tags.includes(tag))
|
|
59
|
+
return false;
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
function isTerminalRunStatus(status) {
|
|
63
|
+
return TERMINAL_RUN_STATUSES.has(status);
|
|
64
|
+
}
|
|
65
|
+
function ensureActionsStorage(storage) {
|
|
66
|
+
if (!storage) {
|
|
67
|
+
throw new GitHostError("forge_actions_not_configured", "Actions storage is required to use repository workflows.");
|
|
68
|
+
}
|
|
69
|
+
return storage;
|
|
70
|
+
}
|
|
71
|
+
function normalizeRunner(options) {
|
|
72
|
+
const runner = options?.runner || {};
|
|
73
|
+
return {
|
|
74
|
+
capabilities: Array.isArray(runner.capabilities) ? runner.capabilities.map((entry) => text(entry)).filter(Boolean) : ["shell", "snapshot", "streaming-logs"],
|
|
75
|
+
host: text(runner.host, os.hostname()),
|
|
76
|
+
id: text(runner.id, `local-${os.hostname()}`),
|
|
77
|
+
kind: text(runner.kind, "local-host"),
|
|
78
|
+
platform_version: text(runner.platform_version, "@trebired/git-host"),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function createGitForgeActionsRuntime(options) {
|
|
82
|
+
const storage = ensureActionsStorage(options.storage);
|
|
83
|
+
const runListeners = new Map();
|
|
84
|
+
const runSequences = new Map();
|
|
85
|
+
const queuedRuns = [];
|
|
86
|
+
const activeRuns = new Map();
|
|
87
|
+
const runner = normalizeRunner(options.actions);
|
|
88
|
+
let processing = false;
|
|
89
|
+
async function nextRunSequence(runId) {
|
|
90
|
+
const current = runSequences.get(runId);
|
|
91
|
+
if (Number.isFinite(current)) {
|
|
92
|
+
const next = Number(current) + 1;
|
|
93
|
+
runSequences.set(runId, next);
|
|
94
|
+
return next;
|
|
95
|
+
}
|
|
96
|
+
const existing = await storage.listWorkflowRunEvents(runId);
|
|
97
|
+
const next = existing.length + 1;
|
|
98
|
+
runSequences.set(runId, next);
|
|
99
|
+
return next;
|
|
100
|
+
}
|
|
101
|
+
async function emitRunEvent(run, input) {
|
|
102
|
+
const event = await storage.appendWorkflowRunEvent({
|
|
103
|
+
...input,
|
|
104
|
+
created_at: nowIso(),
|
|
105
|
+
id: randomUUID(),
|
|
106
|
+
repository_id: run.repository_id,
|
|
107
|
+
run_id: run.id,
|
|
108
|
+
sequence: await nextRunSequence(run.id),
|
|
109
|
+
workflow_id: run.workflow_id,
|
|
110
|
+
});
|
|
111
|
+
const listeners = Array.from(runListeners.get(run.id) || []);
|
|
112
|
+
await Promise.all(listeners.map(async (listener) => {
|
|
113
|
+
try {
|
|
114
|
+
await listener(event);
|
|
115
|
+
}
|
|
116
|
+
catch { }
|
|
117
|
+
}));
|
|
118
|
+
return event;
|
|
119
|
+
}
|
|
120
|
+
async function readRepositoryPath(repositoryId) {
|
|
121
|
+
const summary = await options.gitHost.readSummary(repositoryId);
|
|
122
|
+
return summary.repository.path;
|
|
123
|
+
}
|
|
124
|
+
async function resolveCommit(repositoryPath, refInput) {
|
|
125
|
+
const ref = text(refInput, "HEAD");
|
|
126
|
+
const res = await runGit(["rev-parse", ref], { cwd: repositoryPath });
|
|
127
|
+
if (!res.ok) {
|
|
128
|
+
throw new GitHostError("git_command_failed", text(res.stderr, `Failed to resolve ref "${ref}".`), {
|
|
129
|
+
ref,
|
|
130
|
+
repositoryPath,
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
return text(res.stdout);
|
|
134
|
+
}
|
|
135
|
+
async function resolveRunTarget(repositoryId, input) {
|
|
136
|
+
const summary = await options.gitHost.readSummary(repositoryId);
|
|
137
|
+
const repositoryPath = summary.repository.path;
|
|
138
|
+
const branch = text(input.branch, summary.repository.current_branch) || null;
|
|
139
|
+
const ref = text(input.ref, branch || "HEAD");
|
|
140
|
+
const commitHash = text(input.commitHash) || await resolveCommit(repositoryPath, ref);
|
|
141
|
+
return {
|
|
142
|
+
branch,
|
|
143
|
+
commitHash,
|
|
144
|
+
ref,
|
|
145
|
+
repositoryPath,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
async function materializeRunWorkspace(run) {
|
|
149
|
+
const repositoryPath = await readRepositoryPath(run.repository_id);
|
|
150
|
+
const root = path.join(text(options.actions?.workspaceRoot, path.join(os.tmpdir(), "@trebired-git-host-actions")), text(run.repository_id), run.id);
|
|
151
|
+
const workspacePath = path.join(root, "workspace");
|
|
152
|
+
fs.rmSync(root, { force: true, recursive: true });
|
|
153
|
+
fs.mkdirSync(root, { recursive: true });
|
|
154
|
+
const cloneRes = await runGit(["clone", "--no-checkout", repositoryPath, workspacePath], { cwd: root });
|
|
155
|
+
if (!cloneRes.ok) {
|
|
156
|
+
throw new GitHostError("git_command_failed", text(cloneRes.stderr, "Failed to materialize workflow workspace."), {
|
|
157
|
+
repositoryId: run.repository_id,
|
|
158
|
+
runId: run.id,
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
const checkoutRes = await runGit(["checkout", "--detach", run.commit_hash], { cwd: workspacePath });
|
|
162
|
+
if (!checkoutRes.ok) {
|
|
163
|
+
throw new GitHostError("git_command_failed", text(checkoutRes.stderr, "Failed to check out workflow commit."), {
|
|
164
|
+
commitHash: run.commit_hash,
|
|
165
|
+
repositoryId: run.repository_id,
|
|
166
|
+
runId: run.id,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
return workspacePath;
|
|
170
|
+
}
|
|
171
|
+
async function readRequiredWorkflow(repositoryId, workflowId) {
|
|
172
|
+
const workflow = await storage.readWorkflow(repositoryId, workflowId);
|
|
173
|
+
if (!workflow) {
|
|
174
|
+
throw new GitHostError("forge_resource_not_found", `Workflow "${workflowId}" was not found.`, {
|
|
175
|
+
repositoryId,
|
|
176
|
+
workflowId,
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
return workflow;
|
|
180
|
+
}
|
|
181
|
+
async function readRequiredRun(repositoryId, runId) {
|
|
182
|
+
const run = await storage.readWorkflowRun(repositoryId, runId);
|
|
183
|
+
if (!run) {
|
|
184
|
+
throw new GitHostError("forge_resource_not_found", `Workflow run "${runId}" was not found.`, {
|
|
185
|
+
repositoryId,
|
|
186
|
+
runId,
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
return run;
|
|
190
|
+
}
|
|
191
|
+
async function updateRun(repositoryId, runId, input) {
|
|
192
|
+
const run = await storage.updateWorkflowRun(repositoryId, runId, input);
|
|
193
|
+
if (!run) {
|
|
194
|
+
throw new GitHostError("forge_resource_not_found", `Workflow run "${runId}" was not found.`, {
|
|
195
|
+
repositoryId,
|
|
196
|
+
runId,
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
return run;
|
|
200
|
+
}
|
|
201
|
+
async function updateRunStep(runId, stepId, input) {
|
|
202
|
+
const step = await storage.updateWorkflowRunStep(runId, stepId, input);
|
|
203
|
+
if (!step) {
|
|
204
|
+
throw new GitHostError("forge_resource_not_found", `Workflow run step "${stepId}" was not found.`, {
|
|
205
|
+
runId,
|
|
206
|
+
stepId,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
return step;
|
|
210
|
+
}
|
|
211
|
+
function scheduleQueueProcessing() {
|
|
212
|
+
if (processing)
|
|
213
|
+
return;
|
|
214
|
+
queueMicrotask(() => {
|
|
215
|
+
void processQueue();
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
async function markQueuedSteps(runId, fromIndex, status) {
|
|
219
|
+
const steps = await storage.listWorkflowRunSteps(runId);
|
|
220
|
+
const now = nowIso();
|
|
221
|
+
await Promise.all(steps
|
|
222
|
+
.filter((step) => step.index > fromIndex && step.status === "queued")
|
|
223
|
+
.map((step) => storage.updateWorkflowRunStep(runId, step.id, {
|
|
224
|
+
finished_at: now,
|
|
225
|
+
status,
|
|
226
|
+
})));
|
|
227
|
+
}
|
|
228
|
+
async function finalizeRun(run, input) {
|
|
229
|
+
const finished = await updateRun(run.repository_id, run.id, {
|
|
230
|
+
current_step: input.currentStep === undefined ? null : input.currentStep,
|
|
231
|
+
current_step_index: input.currentStepIndex === undefined ? null : input.currentStepIndex,
|
|
232
|
+
finished_at: nowIso(),
|
|
233
|
+
status: input.status,
|
|
234
|
+
summary: input.summary,
|
|
235
|
+
});
|
|
236
|
+
await emitRunEvent(finished, {
|
|
237
|
+
status: input.status,
|
|
238
|
+
summary: input.summary,
|
|
239
|
+
type: input.eventType,
|
|
240
|
+
});
|
|
241
|
+
return finished;
|
|
242
|
+
}
|
|
243
|
+
async function runShellStep(run, workflow, step, workspacePath) {
|
|
244
|
+
const active = activeRuns.get(run.id);
|
|
245
|
+
if (!active) {
|
|
246
|
+
throw new GitHostError("git_command_failed", "Workflow run is not active.", {
|
|
247
|
+
runId: run.id,
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
const startedStep = await updateRunStep(run.id, step.id, {
|
|
251
|
+
started_at: nowIso(),
|
|
252
|
+
status: "running",
|
|
253
|
+
});
|
|
254
|
+
const updatedRun = await updateRun(run.repository_id, run.id, {
|
|
255
|
+
current_step: startedStep.name,
|
|
256
|
+
current_step_index: startedStep.index,
|
|
257
|
+
status: "running",
|
|
258
|
+
summary: `Running ${startedStep.name}.`,
|
|
259
|
+
});
|
|
260
|
+
await emitRunEvent(updatedRun, {
|
|
261
|
+
command: startedStep.command,
|
|
262
|
+
status: "running",
|
|
263
|
+
step_id: startedStep.id,
|
|
264
|
+
step_index: startedStep.index,
|
|
265
|
+
step_name: startedStep.name,
|
|
266
|
+
type: "step.started",
|
|
267
|
+
});
|
|
268
|
+
let outputPreview = startedStep.output_preview;
|
|
269
|
+
const shell = text(workflow.steps[startedStep.index]?.shell, text(options.actions?.shell, "bash"));
|
|
270
|
+
const env = {
|
|
271
|
+
...process.env,
|
|
272
|
+
...(options.actions?.env || {}),
|
|
273
|
+
...(workflow.env || {}),
|
|
274
|
+
...(workflow.source?.env || {}),
|
|
275
|
+
...(workflow.steps[startedStep.index]?.env || {}),
|
|
276
|
+
GIT_HOST_ACTIONS_REPOSITORY_ID: run.repository_id,
|
|
277
|
+
GIT_HOST_ACTIONS_RUN_ID: run.id,
|
|
278
|
+
GIT_HOST_ACTIONS_TRIGGER: text(run.trigger_kind),
|
|
279
|
+
GIT_HOST_ACTIONS_WORKFLOW_ID: workflow.id,
|
|
280
|
+
GIT_HOST_ACTIONS_COMMIT: run.commit_hash,
|
|
281
|
+
GIT_HOST_ACTIONS_REF: run.ref,
|
|
282
|
+
GIT_HOST_ACTIONS_BRANCH: text(run.branch),
|
|
283
|
+
GIT_HOST_ACTIONS_RELEASE_ID: text(run.release_id),
|
|
284
|
+
};
|
|
285
|
+
const child = spawn(shell, ["-lc", startedStep.command], {
|
|
286
|
+
cwd: workspacePath,
|
|
287
|
+
env,
|
|
288
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
289
|
+
});
|
|
290
|
+
active.child = child;
|
|
291
|
+
active.heartbeat = setInterval(() => {
|
|
292
|
+
void emitRunEvent(updatedRun, {
|
|
293
|
+
status: "running",
|
|
294
|
+
step_id: startedStep.id,
|
|
295
|
+
step_index: startedStep.index,
|
|
296
|
+
step_name: startedStep.name,
|
|
297
|
+
type: "step.heartbeat",
|
|
298
|
+
});
|
|
299
|
+
}, Math.max(250, Number(options.actions?.heartbeatIntervalMs) || DEFAULT_HEARTBEAT_INTERVAL_MS));
|
|
300
|
+
async function handleChunk(stream, chunk) {
|
|
301
|
+
let textChunk = typeof chunk === "string" ? chunk : chunk.toString("utf8");
|
|
302
|
+
if (options.actions?.redactOutput) {
|
|
303
|
+
textChunk = await options.actions.redactOutput({
|
|
304
|
+
chunk: textChunk,
|
|
305
|
+
run: updatedRun,
|
|
306
|
+
step: startedStep,
|
|
307
|
+
stream,
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
outputPreview = appendOutputPreview(outputPreview, textChunk);
|
|
311
|
+
await emitRunEvent(updatedRun, {
|
|
312
|
+
chunk: textChunk,
|
|
313
|
+
status: "running",
|
|
314
|
+
step_id: startedStep.id,
|
|
315
|
+
step_index: startedStep.index,
|
|
316
|
+
step_name: startedStep.name,
|
|
317
|
+
stream,
|
|
318
|
+
type: "step.output",
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
const exitCode = await new Promise((resolve, reject) => {
|
|
322
|
+
child.stdout.on("data", (chunk) => {
|
|
323
|
+
void handleChunk("stdout", chunk);
|
|
324
|
+
});
|
|
325
|
+
child.stderr.on("data", (chunk) => {
|
|
326
|
+
void handleChunk("stderr", chunk);
|
|
327
|
+
});
|
|
328
|
+
child.on("error", reject);
|
|
329
|
+
child.on("close", (code) => resolve(Number(code) || 0));
|
|
330
|
+
});
|
|
331
|
+
if (active.heartbeat)
|
|
332
|
+
clearInterval(active.heartbeat);
|
|
333
|
+
active.child = undefined;
|
|
334
|
+
active.heartbeat = undefined;
|
|
335
|
+
const cancelled = active.cancelRequested === true;
|
|
336
|
+
const finalStatus = cancelled
|
|
337
|
+
? "cancelled"
|
|
338
|
+
: (exitCode === 0 ? "success" : "failed");
|
|
339
|
+
const finishedStep = await updateRunStep(run.id, startedStep.id, {
|
|
340
|
+
exit_code: exitCode,
|
|
341
|
+
finished_at: nowIso(),
|
|
342
|
+
output_preview: outputPreview,
|
|
343
|
+
status: finalStatus,
|
|
344
|
+
});
|
|
345
|
+
await emitRunEvent(updatedRun, {
|
|
346
|
+
command: finishedStep.command,
|
|
347
|
+
metadata: {
|
|
348
|
+
exit_code: exitCode,
|
|
349
|
+
},
|
|
350
|
+
status: finalStatus,
|
|
351
|
+
step_id: finishedStep.id,
|
|
352
|
+
step_index: finishedStep.index,
|
|
353
|
+
step_name: finishedStep.name,
|
|
354
|
+
summary: finalStatus === "success" ? `${finishedStep.name} completed.` : `${finishedStep.name} ${cancelled ? "cancelled" : "failed"}.`,
|
|
355
|
+
type: "step.finished",
|
|
356
|
+
});
|
|
357
|
+
return {
|
|
358
|
+
cancelled,
|
|
359
|
+
exitCode,
|
|
360
|
+
status: finalStatus,
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
async function executeRun(repositoryId, runId) {
|
|
364
|
+
let run = await readRequiredRun(repositoryId, runId);
|
|
365
|
+
if (isTerminalRunStatus(run.status))
|
|
366
|
+
return run;
|
|
367
|
+
run = await updateRun(repositoryId, runId, {
|
|
368
|
+
runner,
|
|
369
|
+
started_at: nowIso(),
|
|
370
|
+
status: "starting",
|
|
371
|
+
summary: "Preparing workflow workspace.",
|
|
372
|
+
});
|
|
373
|
+
await emitRunEvent(run, {
|
|
374
|
+
metadata: {
|
|
375
|
+
runner,
|
|
376
|
+
},
|
|
377
|
+
status: "starting",
|
|
378
|
+
summary: run.summary,
|
|
379
|
+
type: "run.status",
|
|
380
|
+
});
|
|
381
|
+
const workflow = await readRequiredWorkflow(repositoryId, run.workflow_id);
|
|
382
|
+
const steps = await storage.listWorkflowRunSteps(run.id);
|
|
383
|
+
const activeState = {
|
|
384
|
+
cancelRequested: false,
|
|
385
|
+
};
|
|
386
|
+
activeRuns.set(run.id, activeState);
|
|
387
|
+
try {
|
|
388
|
+
activeState.workspacePath = await materializeRunWorkspace(run);
|
|
389
|
+
run = await updateRun(repositoryId, run.id, {
|
|
390
|
+
status: "running",
|
|
391
|
+
summary: "Workflow run started.",
|
|
392
|
+
});
|
|
393
|
+
await emitRunEvent(run, {
|
|
394
|
+
status: "running",
|
|
395
|
+
summary: run.summary,
|
|
396
|
+
type: "run.status",
|
|
397
|
+
});
|
|
398
|
+
for (const step of steps.sort((left, right) => left.index - right.index)) {
|
|
399
|
+
if (activeState.cancelRequested) {
|
|
400
|
+
await markQueuedSteps(run.id, step.index - 1, "cancelled");
|
|
401
|
+
return await finalizeRun(run, {
|
|
402
|
+
eventType: "run.cancelled",
|
|
403
|
+
status: "cancelled",
|
|
404
|
+
summary: "Workflow run cancelled.",
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
const result = await runShellStep(run, workflow, step, activeState.workspacePath);
|
|
408
|
+
if (result.cancelled) {
|
|
409
|
+
await markQueuedSteps(run.id, step.index, "cancelled");
|
|
410
|
+
return await finalizeRun(run, {
|
|
411
|
+
eventType: "run.cancelled",
|
|
412
|
+
status: "cancelled",
|
|
413
|
+
summary: "Workflow run cancelled.",
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
if (result.exitCode !== 0) {
|
|
417
|
+
await markQueuedSteps(run.id, step.index, "skipped");
|
|
418
|
+
return await finalizeRun(run, {
|
|
419
|
+
eventType: "run.failed",
|
|
420
|
+
status: "failed",
|
|
421
|
+
summary: `Workflow run failed in step ${step.name}.`,
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
return await finalizeRun(run, {
|
|
426
|
+
eventType: "run.finished",
|
|
427
|
+
status: "success",
|
|
428
|
+
summary: "Workflow run completed successfully.",
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
catch (error) {
|
|
432
|
+
await markQueuedSteps(run.id, -1, "skipped");
|
|
433
|
+
return await finalizeRun(run, {
|
|
434
|
+
eventType: activeState.cancelRequested ? "run.cancelled" : "run.failed",
|
|
435
|
+
status: activeState.cancelRequested ? "cancelled" : "failed",
|
|
436
|
+
summary: activeState.cancelRequested
|
|
437
|
+
? "Workflow run cancelled."
|
|
438
|
+
: (error instanceof Error ? error.message : "Workflow run failed."),
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
finally {
|
|
442
|
+
if (activeState.heartbeat)
|
|
443
|
+
clearInterval(activeState.heartbeat);
|
|
444
|
+
if (activeState.child && !activeState.child.killed) {
|
|
445
|
+
try {
|
|
446
|
+
activeState.child.kill("SIGKILL");
|
|
447
|
+
}
|
|
448
|
+
catch { }
|
|
449
|
+
}
|
|
450
|
+
activeRuns.delete(run.id);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
async function processQueue() {
|
|
454
|
+
if (processing)
|
|
455
|
+
return;
|
|
456
|
+
processing = true;
|
|
457
|
+
try {
|
|
458
|
+
while (queuedRuns.length) {
|
|
459
|
+
const next = queuedRuns.shift();
|
|
460
|
+
if (!next)
|
|
461
|
+
continue;
|
|
462
|
+
const run = await storage.readWorkflowRun(next.repositoryId, next.runId);
|
|
463
|
+
if (!run || isTerminalRunStatus(run.status))
|
|
464
|
+
continue;
|
|
465
|
+
await executeRun(next.repositoryId, next.runId);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
finally {
|
|
469
|
+
processing = false;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
async function queueWorkflowRun(repositoryId, workflow, input) {
|
|
473
|
+
const target = await resolveRunTarget(repositoryId, input);
|
|
474
|
+
const createdAt = nowIso();
|
|
475
|
+
const createdBy = text(input.actor.id, text(input.actor.name, "system"));
|
|
476
|
+
const run = await storage.createWorkflowRun({
|
|
477
|
+
branch: target.branch,
|
|
478
|
+
commit_hash: target.commitHash,
|
|
479
|
+
created_at: createdAt,
|
|
480
|
+
created_by: createdBy,
|
|
481
|
+
current_step: null,
|
|
482
|
+
current_step_index: null,
|
|
483
|
+
finished_at: null,
|
|
484
|
+
id: randomUUID(),
|
|
485
|
+
ref: target.ref,
|
|
486
|
+
release_id: input.releaseId == null ? null : text(input.releaseId),
|
|
487
|
+
repository_id: repositoryId,
|
|
488
|
+
runner: null,
|
|
489
|
+
started_at: null,
|
|
490
|
+
status: "queued",
|
|
491
|
+
summary: "Workflow run queued.",
|
|
492
|
+
trigger_context: input.triggerContext,
|
|
493
|
+
trigger_kind: input.triggerKind,
|
|
494
|
+
workflow_id: workflow.id,
|
|
495
|
+
});
|
|
496
|
+
await Promise.all(workflow.steps.map(async (step, index) => {
|
|
497
|
+
await storage.createWorkflowRunStep({
|
|
498
|
+
command: step.run,
|
|
499
|
+
exit_code: null,
|
|
500
|
+
finished_at: null,
|
|
501
|
+
id: randomUUID(),
|
|
502
|
+
index,
|
|
503
|
+
kind: "shell",
|
|
504
|
+
metadata: step.env ? { env: step.env, shell: text(step.shell) } : (text(step.shell) ? { shell: text(step.shell) } : undefined),
|
|
505
|
+
name: text(step.name, `Step ${index + 1}`),
|
|
506
|
+
output_preview: "",
|
|
507
|
+
run_id: run.id,
|
|
508
|
+
started_at: null,
|
|
509
|
+
status: "queued",
|
|
510
|
+
});
|
|
511
|
+
}));
|
|
512
|
+
await emitRunEvent(run, {
|
|
513
|
+
metadata: {
|
|
514
|
+
branch: run.branch,
|
|
515
|
+
ref: run.ref,
|
|
516
|
+
},
|
|
517
|
+
status: "queued",
|
|
518
|
+
summary: run.summary,
|
|
519
|
+
type: "run.accepted",
|
|
520
|
+
});
|
|
521
|
+
queuedRuns.push({
|
|
522
|
+
repositoryId,
|
|
523
|
+
runId: run.id,
|
|
524
|
+
});
|
|
525
|
+
scheduleQueueProcessing();
|
|
526
|
+
return run;
|
|
527
|
+
}
|
|
528
|
+
async function enqueueWorkflowsForTrigger(repositoryId, triggerKind, actor, context) {
|
|
529
|
+
const workflows = await storage.listWorkflows(repositoryId, {
|
|
530
|
+
enabled: true,
|
|
531
|
+
trigger: triggerKind,
|
|
532
|
+
});
|
|
533
|
+
const createdRuns = [];
|
|
534
|
+
for (const workflow of workflows) {
|
|
535
|
+
if (!matchesWorkflowTrigger(workflow, triggerKind, context))
|
|
536
|
+
continue;
|
|
537
|
+
createdRuns.push(await queueWorkflowRun(repositoryId, workflow, {
|
|
538
|
+
actor,
|
|
539
|
+
branch: text(context.branch),
|
|
540
|
+
commitHash: text(context.commit_hash, text(context.head_commit)),
|
|
541
|
+
ref: text(context.ref, text(context.tag_name, text(context.branch, "HEAD"))),
|
|
542
|
+
releaseId: text(context.release_id) || null,
|
|
543
|
+
triggerContext: context,
|
|
544
|
+
triggerKind,
|
|
545
|
+
}));
|
|
546
|
+
}
|
|
547
|
+
return createdRuns;
|
|
548
|
+
}
|
|
549
|
+
async function handleActivity(entry) {
|
|
550
|
+
const actor = {
|
|
551
|
+
id: text(entry.actor_id, text(entry.actor_label, "system")),
|
|
552
|
+
name: text(entry.actor_label, entry.actor_id),
|
|
553
|
+
};
|
|
554
|
+
if (entry.kind === "repository.push") {
|
|
555
|
+
await enqueueWorkflowsForTrigger(entry.repository_id, "push", actor, {
|
|
556
|
+
...(entry.metadata || {}),
|
|
557
|
+
activity_id: entry.id,
|
|
558
|
+
});
|
|
559
|
+
return;
|
|
560
|
+
}
|
|
561
|
+
if (entry.kind === "release.create" || entry.kind === "release.update") {
|
|
562
|
+
const releaseId = text(entry.metadata?.release_id);
|
|
563
|
+
const release = releaseId ? await options.releases.readRelease(entry.repository_id, releaseId) : null;
|
|
564
|
+
const targetRef = text(release?.target_ref);
|
|
565
|
+
const repositoryPath = await readRepositoryPath(entry.repository_id);
|
|
566
|
+
const commitHash = targetRef ? await resolveCommit(repositoryPath, targetRef) : "";
|
|
567
|
+
await enqueueWorkflowsForTrigger(entry.repository_id, entry.kind, actor, {
|
|
568
|
+
...(entry.metadata || {}),
|
|
569
|
+
activity_id: entry.id,
|
|
570
|
+
commit_hash: commitHash,
|
|
571
|
+
ref: text(release?.tag_name, targetRef),
|
|
572
|
+
release_id: release?.id,
|
|
573
|
+
tag_name: text(release?.tag_name, text(entry.metadata?.tag_name)),
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
function bindActivityStorage(activityStorage) {
|
|
578
|
+
const store = activityStorage;
|
|
579
|
+
if (!store[ACTIVITY_LISTENER_SYMBOL]) {
|
|
580
|
+
store[ACTIVITY_LISTENER_SYMBOL] = new Set();
|
|
581
|
+
}
|
|
582
|
+
store[ACTIVITY_LISTENER_SYMBOL].add(async (entry) => {
|
|
583
|
+
await handleActivity(entry);
|
|
584
|
+
});
|
|
585
|
+
if (store[ACTIVITY_WRAPPED_SYMBOL])
|
|
586
|
+
return;
|
|
587
|
+
store[ACTIVITY_WRAPPED_SYMBOL] = true;
|
|
588
|
+
const original = activityStorage.createActivity.bind(activityStorage);
|
|
589
|
+
activityStorage.createActivity = async (input) => {
|
|
590
|
+
const entry = await original(input);
|
|
591
|
+
const listeners = Array.from(store[ACTIVITY_LISTENER_SYMBOL] || []);
|
|
592
|
+
await Promise.all(listeners.map(async (listener) => {
|
|
593
|
+
try {
|
|
594
|
+
await listener(entry);
|
|
595
|
+
}
|
|
596
|
+
catch { }
|
|
597
|
+
}));
|
|
598
|
+
return entry;
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
return {
|
|
602
|
+
bindActivityStorage,
|
|
603
|
+
async createWorkflow(repositoryId, input) {
|
|
604
|
+
const workflow = await storage.createWorkflow({
|
|
605
|
+
created_at: nowIso(),
|
|
606
|
+
created_by: text(input.actor.id),
|
|
607
|
+
enabled: input.enabled !== false,
|
|
608
|
+
env: normalizeEnv(input.env),
|
|
609
|
+
id: randomUUID(),
|
|
610
|
+
name: text(input.name),
|
|
611
|
+
repository_id: repositoryId,
|
|
612
|
+
slug: text(input.slug, slugify(input.name)),
|
|
613
|
+
source: input.source ? {
|
|
614
|
+
branches: Array.isArray(input.source.branches) ? input.source.branches.map((entry) => text(entry)).filter(Boolean) : undefined,
|
|
615
|
+
env: normalizeEnv(input.source.env),
|
|
616
|
+
tags: Array.isArray(input.source.tags) ? input.source.tags.map((entry) => text(entry)).filter(Boolean) : undefined,
|
|
617
|
+
} : undefined,
|
|
618
|
+
steps: normalizeSteps(input.steps),
|
|
619
|
+
trigger: text(input.trigger),
|
|
620
|
+
updated_at: nowIso(),
|
|
621
|
+
updated_by: text(input.actor.id),
|
|
622
|
+
});
|
|
623
|
+
return workflow;
|
|
624
|
+
},
|
|
625
|
+
async updateWorkflow(repositoryId, workflowId, input) {
|
|
626
|
+
const current = await readRequiredWorkflow(repositoryId, workflowId);
|
|
627
|
+
const updated = await storage.updateWorkflow(repositoryId, workflowId, {
|
|
628
|
+
...(input.enabled != null ? { enabled: input.enabled === true } : {}),
|
|
629
|
+
...(input.env !== undefined ? { env: normalizeEnv(input.env) } : {}),
|
|
630
|
+
...(input.name !== undefined ? { name: text(input.name) } : {}),
|
|
631
|
+
...(input.slug !== undefined ? { slug: text(input.slug, current.slug) } : {}),
|
|
632
|
+
...(input.source !== undefined ? {
|
|
633
|
+
source: {
|
|
634
|
+
branches: Array.isArray(input.source?.branches) ? input.source?.branches.map((entry) => text(entry)).filter(Boolean) : undefined,
|
|
635
|
+
env: normalizeEnv(input.source?.env),
|
|
636
|
+
tags: Array.isArray(input.source?.tags) ? input.source?.tags.map((entry) => text(entry)).filter(Boolean) : undefined,
|
|
637
|
+
},
|
|
638
|
+
} : {}),
|
|
639
|
+
...(input.steps !== undefined ? { steps: normalizeSteps(input.steps) } : {}),
|
|
640
|
+
...(input.trigger !== undefined ? { trigger: text(input.trigger) } : {}),
|
|
641
|
+
updated_at: nowIso(),
|
|
642
|
+
updated_by: text(input.actor.id),
|
|
643
|
+
});
|
|
644
|
+
if (!updated) {
|
|
645
|
+
throw new GitHostError("forge_resource_not_found", `Workflow "${workflowId}" was not found.`, {
|
|
646
|
+
repositoryId,
|
|
647
|
+
workflowId,
|
|
648
|
+
});
|
|
649
|
+
}
|
|
650
|
+
return updated;
|
|
651
|
+
},
|
|
652
|
+
async listWorkflows(repositoryId, filters) {
|
|
653
|
+
const entries = await storage.listWorkflows(repositoryId, filters);
|
|
654
|
+
return Array.from(entries).sort((left, right) => text(left.name).localeCompare(text(right.name)) || text(left.slug).localeCompare(text(right.slug)));
|
|
655
|
+
},
|
|
656
|
+
async readWorkflow(repositoryId, workflowId) {
|
|
657
|
+
return await readRequiredWorkflow(repositoryId, workflowId);
|
|
658
|
+
},
|
|
659
|
+
async runWorkflow(repositoryId, workflowId, input) {
|
|
660
|
+
const workflow = await readRequiredWorkflow(repositoryId, workflowId);
|
|
661
|
+
return await queueWorkflowRun(repositoryId, workflow, {
|
|
662
|
+
...input,
|
|
663
|
+
triggerKind: "manual",
|
|
664
|
+
});
|
|
665
|
+
},
|
|
666
|
+
async cancelWorkflowRun(repositoryId, runId, actor) {
|
|
667
|
+
const run = await readRequiredRun(repositoryId, runId);
|
|
668
|
+
if (isTerminalRunStatus(run.status))
|
|
669
|
+
return run;
|
|
670
|
+
const active = activeRuns.get(run.id);
|
|
671
|
+
if (active) {
|
|
672
|
+
active.cancelRequested = true;
|
|
673
|
+
if (active.child && !active.child.killed) {
|
|
674
|
+
try {
|
|
675
|
+
active.child.kill("SIGTERM");
|
|
676
|
+
}
|
|
677
|
+
catch { }
|
|
678
|
+
}
|
|
679
|
+
return await updateRun(repositoryId, runId, {
|
|
680
|
+
summary: `Cancellation requested by ${text(actor.id)}.`,
|
|
681
|
+
});
|
|
682
|
+
}
|
|
683
|
+
const cancelled = await updateRun(repositoryId, runId, {
|
|
684
|
+
finished_at: nowIso(),
|
|
685
|
+
status: "cancelled",
|
|
686
|
+
summary: `Cancelled by ${text(actor.id)}.`,
|
|
687
|
+
});
|
|
688
|
+
await emitRunEvent(cancelled, {
|
|
689
|
+
status: "cancelled",
|
|
690
|
+
summary: cancelled.summary,
|
|
691
|
+
type: "run.cancelled",
|
|
692
|
+
});
|
|
693
|
+
return cancelled;
|
|
694
|
+
},
|
|
695
|
+
async listWorkflowRuns(repositoryId, filters) {
|
|
696
|
+
return await storage.listWorkflowRuns(repositoryId, filters);
|
|
697
|
+
},
|
|
698
|
+
async readWorkflowRun(repositoryId, runId) {
|
|
699
|
+
return await readRequiredRun(repositoryId, runId);
|
|
700
|
+
},
|
|
701
|
+
async listWorkflowRunSteps(repositoryId, runId) {
|
|
702
|
+
await readRequiredRun(repositoryId, runId);
|
|
703
|
+
return await storage.listWorkflowRunSteps(runId);
|
|
704
|
+
},
|
|
705
|
+
async listWorkflowRunEvents(repositoryId, runId, filters) {
|
|
706
|
+
await readRequiredRun(repositoryId, runId);
|
|
707
|
+
return await storage.listWorkflowRunEvents(runId, filters);
|
|
708
|
+
},
|
|
709
|
+
subscribeWorkflowRun(repositoryId, runId, listener) {
|
|
710
|
+
const key = `${repositoryId}:${runId}`;
|
|
711
|
+
void key;
|
|
712
|
+
let listeners = runListeners.get(runId);
|
|
713
|
+
if (!listeners) {
|
|
714
|
+
listeners = new Set();
|
|
715
|
+
runListeners.set(runId, listeners);
|
|
716
|
+
}
|
|
717
|
+
listeners.add(listener);
|
|
718
|
+
return {
|
|
719
|
+
close() {
|
|
720
|
+
listeners?.delete(listener);
|
|
721
|
+
if (listeners && listeners.size === 0) {
|
|
722
|
+
runListeners.delete(runId);
|
|
723
|
+
}
|
|
724
|
+
},
|
|
725
|
+
};
|
|
726
|
+
},
|
|
727
|
+
};
|
|
728
|
+
}
|
|
729
|
+
export { createGitForgeActionsRuntime, isTerminalRunStatus };
|
|
730
|
+
//# sourceMappingURL=forge_actions.js.map
|