@vm3jack/mcp-server-azure-devops 1.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/LICENSE +21 -0
- package/README.md +265 -0
- package/dist/clients/azure-devops.d.ts +105 -0
- package/dist/clients/azure-devops.js +501 -0
- package/dist/clients/azure-devops.js.map +1 -0
- package/dist/clients/azure-devops.spec.unit.d.ts +1 -0
- package/dist/clients/azure-devops.spec.unit.js +42 -0
- package/dist/clients/azure-devops.spec.unit.js.map +1 -0
- package/dist/features/organizations/__test__/test-helpers.d.ts +13 -0
- package/dist/features/organizations/__test__/test-helpers.js +38 -0
- package/dist/features/organizations/__test__/test-helpers.js.map +1 -0
- package/dist/features/organizations/index.d.ts +13 -0
- package/dist/features/organizations/index.js +63 -0
- package/dist/features/organizations/index.js.map +1 -0
- package/dist/features/organizations/index.spec.unit.d.ts +1 -0
- package/dist/features/organizations/index.spec.unit.js +106 -0
- package/dist/features/organizations/index.spec.unit.js.map +1 -0
- package/dist/features/organizations/list-organizations/feature.d.ts +13 -0
- package/dist/features/organizations/list-organizations/feature.js +101 -0
- package/dist/features/organizations/list-organizations/feature.js.map +1 -0
- package/dist/features/organizations/list-organizations/feature.spec.int.d.ts +1 -0
- package/dist/features/organizations/list-organizations/feature.spec.int.js +34 -0
- package/dist/features/organizations/list-organizations/feature.spec.int.js.map +1 -0
- package/dist/features/organizations/list-organizations/feature.spec.unit.d.ts +1 -0
- package/dist/features/organizations/list-organizations/feature.spec.unit.js +115 -0
- package/dist/features/organizations/list-organizations/feature.spec.unit.js.map +1 -0
- package/dist/features/organizations/list-organizations/index.d.ts +2 -0
- package/dist/features/organizations/list-organizations/index.js +19 -0
- package/dist/features/organizations/list-organizations/index.js.map +1 -0
- package/dist/features/organizations/list-organizations/schema.d.ts +2 -0
- package/dist/features/organizations/list-organizations/schema.js +6 -0
- package/dist/features/organizations/list-organizations/schema.js.map +1 -0
- package/dist/features/organizations/schemas.d.ts +6 -0
- package/dist/features/organizations/schemas.js +10 -0
- package/dist/features/organizations/schemas.js.map +1 -0
- package/dist/features/organizations/tool-definitions.d.ts +5 -0
- package/dist/features/organizations/tool-definitions.js +16 -0
- package/dist/features/organizations/tool-definitions.js.map +1 -0
- package/dist/features/organizations/types.d.ts +21 -0
- package/dist/features/organizations/types.js +8 -0
- package/dist/features/organizations/types.js.map +1 -0
- package/dist/features/pipelines/artifacts.d.ts +11 -0
- package/dist/features/pipelines/artifacts.js +288 -0
- package/dist/features/pipelines/artifacts.js.map +1 -0
- package/dist/features/pipelines/artifacts.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/artifacts.spec.unit.js +103 -0
- package/dist/features/pipelines/artifacts.spec.unit.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.d.ts +3 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.js +222 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.spec.unit.js +65 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/index.d.ts +2 -0
- package/dist/features/pipelines/download-pipeline-artifact/index.js +19 -0
- package/dist/features/pipelines/download-pipeline-artifact/index.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/schema.d.ts +17 -0
- package/dist/features/pipelines/download-pipeline-artifact/schema.js +23 -0
- package/dist/features/pipelines/download-pipeline-artifact/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/feature.d.ts +10 -0
- package/dist/features/pipelines/get-pipeline/feature.js +46 -0
- package/dist/features/pipelines/get-pipeline/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/feature.spec.int.d.ts +1 -0
- package/dist/features/pipelines/get-pipeline/feature.spec.int.js +54 -0
- package/dist/features/pipelines/get-pipeline/feature.spec.int.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/get-pipeline/feature.spec.unit.js +89 -0
- package/dist/features/pipelines/get-pipeline/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline/index.js +19 -0
- package/dist/features/pipelines/get-pipeline/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/schema.d.ts +17 -0
- package/dist/features/pipelines/get-pipeline/schema.js +29 -0
- package/dist/features/pipelines/get-pipeline/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/feature.d.ts +3 -0
- package/dist/features/pipelines/get-pipeline-log/feature.js +57 -0
- package/dist/features/pipelines/get-pipeline-log/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/get-pipeline-log/feature.spec.unit.js +81 -0
- package/dist/features/pipelines/get-pipeline-log/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-log/index.js +19 -0
- package/dist/features/pipelines/get-pipeline-log/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/schema.d.ts +26 -0
- package/dist/features/pipelines/get-pipeline-log/schema.js +40 -0
- package/dist/features/pipelines/get-pipeline-log/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/feature.d.ts +3 -0
- package/dist/features/pipelines/get-pipeline-run/feature.js +76 -0
- package/dist/features/pipelines/get-pipeline-run/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/get-pipeline-run/feature.spec.unit.js +156 -0
- package/dist/features/pipelines/get-pipeline-run/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-run/index.js +19 -0
- package/dist/features/pipelines/get-pipeline-run/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/schema.d.ts +14 -0
- package/dist/features/pipelines/get-pipeline-run/schema.js +19 -0
- package/dist/features/pipelines/get-pipeline-run/schema.js.map +1 -0
- package/dist/features/pipelines/helpers.d.ts +3 -0
- package/dist/features/pipelines/helpers.js +29 -0
- package/dist/features/pipelines/helpers.js.map +1 -0
- package/dist/features/pipelines/index.d.ts +19 -0
- package/dist/features/pipelines/index.js +156 -0
- package/dist/features/pipelines/index.js.map +1 -0
- package/dist/features/pipelines/index.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/index.spec.unit.js +223 -0
- package/dist/features/pipelines/index.spec.unit.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.d.ts +3 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.js +98 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.spec.unit.js +148 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/index.d.ts +2 -0
- package/dist/features/pipelines/list-pipeline-runs/index.js +19 -0
- package/dist/features/pipelines/list-pipeline-runs/index.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/schema.d.ts +35 -0
- package/dist/features/pipelines/list-pipeline-runs/schema.js +50 -0
- package/dist/features/pipelines/list-pipeline-runs/schema.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/feature.d.ts +10 -0
- package/dist/features/pipelines/list-pipelines/feature.js +42 -0
- package/dist/features/pipelines/list-pipelines/feature.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/feature.spec.int.d.ts +1 -0
- package/dist/features/pipelines/list-pipelines/feature.spec.int.js +36 -0
- package/dist/features/pipelines/list-pipelines/feature.spec.int.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/list-pipelines/feature.spec.unit.js +91 -0
- package/dist/features/pipelines/list-pipelines/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/index.d.ts +2 -0
- package/dist/features/pipelines/list-pipelines/index.js +19 -0
- package/dist/features/pipelines/list-pipelines/index.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/schema.d.ts +17 -0
- package/dist/features/pipelines/list-pipelines/schema.js +23 -0
- package/dist/features/pipelines/list-pipelines/schema.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/feature.d.ts +3 -0
- package/dist/features/pipelines/pipeline-timeline/feature.js +95 -0
- package/dist/features/pipelines/pipeline-timeline/feature.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/pipeline-timeline/feature.spec.unit.js +100 -0
- package/dist/features/pipelines/pipeline-timeline/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/index.d.ts +2 -0
- package/dist/features/pipelines/pipeline-timeline/index.js +19 -0
- package/dist/features/pipelines/pipeline-timeline/index.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/schema.d.ts +23 -0
- package/dist/features/pipelines/pipeline-timeline/schema.js +51 -0
- package/dist/features/pipelines/pipeline-timeline/schema.js.map +1 -0
- package/dist/features/pipelines/tool-definitions.d.ts +5 -0
- package/dist/features/pipelines/tool-definitions.js +66 -0
- package/dist/features/pipelines/tool-definitions.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/feature.d.ts +10 -0
- package/dist/features/pipelines/trigger-pipeline/feature.js +65 -0
- package/dist/features/pipelines/trigger-pipeline/feature.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/feature.spec.int.d.ts +1 -0
- package/dist/features/pipelines/trigger-pipeline/feature.spec.int.js +85 -0
- package/dist/features/pipelines/trigger-pipeline/feature.spec.int.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/trigger-pipeline/feature.spec.unit.js +112 -0
- package/dist/features/pipelines/trigger-pipeline/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/index.d.ts +2 -0
- package/dist/features/pipelines/trigger-pipeline/index.js +8 -0
- package/dist/features/pipelines/trigger-pipeline/index.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/schema.d.ts +41 -0
- package/dist/features/pipelines/trigger-pipeline/schema.js +45 -0
- package/dist/features/pipelines/trigger-pipeline/schema.js.map +1 -0
- package/dist/features/pipelines/types.d.ts +122 -0
- package/dist/features/pipelines/types.js +3 -0
- package/dist/features/pipelines/types.js.map +1 -0
- package/dist/features/projects/__test__/test-helpers.d.ts +13 -0
- package/dist/features/projects/__test__/test-helpers.js +35 -0
- package/dist/features/projects/__test__/test-helpers.js.map +1 -0
- package/dist/features/projects/get-project/feature.d.ts +11 -0
- package/dist/features/projects/get-project/feature.js +29 -0
- package/dist/features/projects/get-project/feature.js.map +1 -0
- package/dist/features/projects/get-project/feature.spec.int.d.ts +1 -0
- package/dist/features/projects/get-project/feature.spec.int.js +39 -0
- package/dist/features/projects/get-project/feature.spec.int.js.map +1 -0
- package/dist/features/projects/get-project/feature.spec.unit.d.ts +1 -0
- package/dist/features/projects/get-project/feature.spec.unit.js +41 -0
- package/dist/features/projects/get-project/feature.spec.unit.js.map +1 -0
- package/dist/features/projects/get-project/index.d.ts +2 -0
- package/dist/features/projects/get-project/index.js +19 -0
- package/dist/features/projects/get-project/index.js.map +1 -0
- package/dist/features/projects/get-project/schema.d.ts +2 -0
- package/dist/features/projects/get-project/schema.js +6 -0
- package/dist/features/projects/get-project/schema.js.map +1 -0
- package/dist/features/projects/get-project-details/feature.d.ts +78 -0
- package/dist/features/projects/get-project-details/feature.js +185 -0
- package/dist/features/projects/get-project-details/feature.js.map +1 -0
- package/dist/features/projects/get-project-details/feature.spec.int.d.ts +1 -0
- package/dist/features/projects/get-project-details/feature.spec.int.js +120 -0
- package/dist/features/projects/get-project-details/feature.spec.int.js.map +1 -0
- package/dist/features/projects/get-project-details/feature.spec.unit.d.ts +1 -0
- package/dist/features/projects/get-project-details/feature.spec.unit.js +379 -0
- package/dist/features/projects/get-project-details/feature.spec.unit.js.map +1 -0
- package/dist/features/projects/get-project-details/index.d.ts +2 -0
- package/dist/features/projects/get-project-details/index.js +8 -0
- package/dist/features/projects/get-project-details/index.js.map +1 -0
- package/dist/features/projects/get-project-details/schema.d.ts +2 -0
- package/dist/features/projects/get-project-details/schema.js +6 -0
- package/dist/features/projects/get-project-details/schema.js.map +1 -0
- package/dist/features/projects/index.d.ts +15 -0
- package/dist/features/projects/index.js +80 -0
- package/dist/features/projects/index.js.map +1 -0
- package/dist/features/projects/index.spec.unit.d.ts +1 -0
- package/dist/features/projects/index.spec.unit.js +131 -0
- package/dist/features/projects/index.spec.unit.js.map +1 -0
- package/dist/features/projects/list-projects/feature.d.ts +10 -0
- package/dist/features/projects/list-projects/feature.js +25 -0
- package/dist/features/projects/list-projects/feature.js.map +1 -0
- package/dist/features/projects/list-projects/feature.spec.int.d.ts +1 -0
- package/dist/features/projects/list-projects/feature.spec.int.js +54 -0
- package/dist/features/projects/list-projects/feature.spec.int.js.map +1 -0
- package/dist/features/projects/list-projects/index.d.ts +2 -0
- package/dist/features/projects/list-projects/index.js +19 -0
- package/dist/features/projects/list-projects/index.js.map +1 -0
- package/dist/features/projects/list-projects/schema.d.ts +2 -0
- package/dist/features/projects/list-projects/schema.js +6 -0
- package/dist/features/projects/list-projects/schema.js.map +1 -0
- package/dist/features/projects/schemas.d.ts +64 -0
- package/dist/features/projects/schemas.js +76 -0
- package/dist/features/projects/schemas.js.map +1 -0
- package/dist/features/projects/tool-definitions.d.ts +5 -0
- package/dist/features/projects/tool-definitions.js +26 -0
- package/dist/features/projects/tool-definitions.js.map +1 -0
- package/dist/features/projects/types.d.ts +11 -0
- package/dist/features/projects/types.js +3 -0
- package/dist/features/projects/types.js.map +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.d.ts +13 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.js +130 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.js.map +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.spec.int.d.ts +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.spec.int.js +186 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.spec.int.js.map +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.spec.unit.js +259 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/index.d.ts +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/index.js +18 -0
- package/dist/features/pull-requests/add-pull-request-comment/index.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/feature.d.ts +12 -0
- package/dist/features/pull-requests/create-pull-request/feature.js +99 -0
- package/dist/features/pull-requests/create-pull-request/feature.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/feature.spec.int.d.ts +1 -0
- package/dist/features/pull-requests/create-pull-request/feature.spec.int.js +111 -0
- package/dist/features/pull-requests/create-pull-request/feature.spec.int.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/create-pull-request/feature.spec.unit.js +112 -0
- package/dist/features/pull-requests/create-pull-request/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/index.d.ts +2 -0
- package/dist/features/pull-requests/create-pull-request/index.js +19 -0
- package/dist/features/pull-requests/create-pull-request/index.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/schema.d.ts +2 -0
- package/dist/features/pull-requests/create-pull-request/schema.js +6 -0
- package/dist/features/pull-requests/create-pull-request/schema.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/feature.d.ts +6 -0
- package/dist/features/pull-requests/get-pull-request/feature.js +22 -0
- package/dist/features/pull-requests/get-pull-request/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/feature.spec.int.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request/feature.spec.int.js +109 -0
- package/dist/features/pull-requests/get-pull-request/feature.spec.int.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request/feature.spec.unit.js +37 -0
- package/dist/features/pull-requests/get-pull-request/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/index.d.ts +2 -0
- package/dist/features/pull-requests/get-pull-request/index.js +19 -0
- package/dist/features/pull-requests/get-pull-request/index.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/schema.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request/schema.js +6 -0
- package/dist/features/pull-requests/get-pull-request/schema.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.d.ts +22 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.js +60 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.spec.unit.js +77 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/index.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/index.js +18 -0
- package/dist/features/pull-requests/get-pull-request-changes/index.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.d.ts +51 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.js +259 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.spec.unit.js +138 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/index.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/index.js +18 -0
- package/dist/features/pull-requests/get-pull-request-checks/index.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.d.ts +13 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.js +88 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.spec.int.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.spec.int.js +216 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.spec.int.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.spec.unit.js +340 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/index.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/index.js +18 -0
- package/dist/features/pull-requests/get-pull-request-comments/index.js.map +1 -0
- package/dist/features/pull-requests/index.d.ts +20 -0
- package/dist/features/pull-requests/index.js +157 -0
- package/dist/features/pull-requests/index.js.map +1 -0
- package/dist/features/pull-requests/index.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/index.spec.unit.js +261 -0
- package/dist/features/pull-requests/index.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/feature.d.ts +17 -0
- package/dist/features/pull-requests/list-pull-requests/feature.js +81 -0
- package/dist/features/pull-requests/list-pull-requests/feature.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/feature.spec.int.d.ts +1 -0
- package/dist/features/pull-requests/list-pull-requests/feature.spec.int.js +124 -0
- package/dist/features/pull-requests/list-pull-requests/feature.spec.int.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/list-pull-requests/feature.spec.unit.js +180 -0
- package/dist/features/pull-requests/list-pull-requests/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/index.d.ts +2 -0
- package/dist/features/pull-requests/list-pull-requests/index.js +19 -0
- package/dist/features/pull-requests/list-pull-requests/index.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/schema.d.ts +1 -0
- package/dist/features/pull-requests/list-pull-requests/schema.js +6 -0
- package/dist/features/pull-requests/list-pull-requests/schema.js.map +1 -0
- package/dist/features/pull-requests/schemas.d.ts +318 -0
- package/dist/features/pull-requests/schemas.js +283 -0
- package/dist/features/pull-requests/schemas.js.map +1 -0
- package/dist/features/pull-requests/tool-definitions.d.ts +5 -0
- package/dist/features/pull-requests/tool-definitions.js +55 -0
- package/dist/features/pull-requests/tool-definitions.js.map +1 -0
- package/dist/features/pull-requests/types.d.ts +100 -0
- package/dist/features/pull-requests/types.js +3 -0
- package/dist/features/pull-requests/types.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request/feature.d.ts +9 -0
- package/dist/features/pull-requests/update-pull-request/feature.js +250 -0
- package/dist/features/pull-requests/update-pull-request/feature.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request/feature.spec.int.d.ts +1 -0
- package/dist/features/pull-requests/update-pull-request/feature.spec.int.js +162 -0
- package/dist/features/pull-requests/update-pull-request/feature.spec.int.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/update-pull-request/feature.spec.unit.js +280 -0
- package/dist/features/pull-requests/update-pull-request/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request/index.d.ts +1 -0
- package/dist/features/pull-requests/update-pull-request/index.js +18 -0
- package/dist/features/pull-requests/update-pull-request/index.js.map +1 -0
- package/dist/features/releases/create-release/feature.d.ts +3 -0
- package/dist/features/releases/create-release/feature.js +51 -0
- package/dist/features/releases/create-release/feature.js.map +1 -0
- package/dist/features/releases/create-release/index.d.ts +2 -0
- package/dist/features/releases/create-release/index.js +19 -0
- package/dist/features/releases/create-release/index.js.map +1 -0
- package/dist/features/releases/create-release/schema.d.ts +20 -0
- package/dist/features/releases/create-release/schema.js +24 -0
- package/dist/features/releases/create-release/schema.js.map +1 -0
- package/dist/features/releases/deploy-release-stage/feature.d.ts +9 -0
- package/dist/features/releases/deploy-release-stage/feature.js +38 -0
- package/dist/features/releases/deploy-release-stage/feature.js.map +1 -0
- package/dist/features/releases/deploy-release-stage/index.d.ts +2 -0
- package/dist/features/releases/deploy-release-stage/index.js +19 -0
- package/dist/features/releases/deploy-release-stage/index.js.map +1 -0
- package/dist/features/releases/deploy-release-stage/schema.d.ts +17 -0
- package/dist/features/releases/deploy-release-stage/schema.js +20 -0
- package/dist/features/releases/deploy-release-stage/schema.js.map +1 -0
- package/dist/features/releases/get-release/feature.d.ts +3 -0
- package/dist/features/releases/get-release/feature.js +34 -0
- package/dist/features/releases/get-release/feature.js.map +1 -0
- package/dist/features/releases/get-release/index.d.ts +2 -0
- package/dist/features/releases/get-release/index.js +19 -0
- package/dist/features/releases/get-release/index.js.map +1 -0
- package/dist/features/releases/get-release/schema.d.ts +11 -0
- package/dist/features/releases/get-release/schema.js +13 -0
- package/dist/features/releases/get-release/schema.js.map +1 -0
- package/dist/features/releases/get-release-definition/feature.d.ts +3 -0
- package/dist/features/releases/get-release-definition/feature.js +34 -0
- package/dist/features/releases/get-release-definition/feature.js.map +1 -0
- package/dist/features/releases/get-release-definition/index.d.ts +2 -0
- package/dist/features/releases/get-release-definition/index.js +19 -0
- package/dist/features/releases/get-release-definition/index.js.map +1 -0
- package/dist/features/releases/get-release-definition/schema.d.ts +11 -0
- package/dist/features/releases/get-release-definition/schema.js +13 -0
- package/dist/features/releases/get-release-definition/schema.js.map +1 -0
- package/dist/features/releases/index.d.ts +11 -0
- package/dist/features/releases/index.js +121 -0
- package/dist/features/releases/index.js.map +1 -0
- package/dist/features/releases/list-release-definitions/feature.d.ts +3 -0
- package/dist/features/releases/list-release-definitions/feature.js +31 -0
- package/dist/features/releases/list-release-definitions/feature.js.map +1 -0
- package/dist/features/releases/list-release-definitions/index.d.ts +2 -0
- package/dist/features/releases/list-release-definitions/index.js +19 -0
- package/dist/features/releases/list-release-definitions/index.js.map +1 -0
- package/dist/features/releases/list-release-definitions/schema.d.ts +17 -0
- package/dist/features/releases/list-release-definitions/schema.js +24 -0
- package/dist/features/releases/list-release-definitions/schema.js.map +1 -0
- package/dist/features/releases/list-releases/feature.d.ts +3 -0
- package/dist/features/releases/list-releases/feature.js +31 -0
- package/dist/features/releases/list-releases/feature.js.map +1 -0
- package/dist/features/releases/list-releases/index.d.ts +2 -0
- package/dist/features/releases/list-releases/index.js +19 -0
- package/dist/features/releases/list-releases/index.js.map +1 -0
- package/dist/features/releases/list-releases/schema.d.ts +26 -0
- package/dist/features/releases/list-releases/schema.js +30 -0
- package/dist/features/releases/list-releases/schema.js.map +1 -0
- package/dist/features/releases/tool-definitions.d.ts +2 -0
- package/dist/features/releases/tool-definitions.js +49 -0
- package/dist/features/releases/tool-definitions.js.map +1 -0
- package/dist/features/releases/types.d.ts +32 -0
- package/dist/features/releases/types.js +3 -0
- package/dist/features/releases/types.js.map +1 -0
- package/dist/features/repositories/__test__/test-helpers.d.ts +13 -0
- package/dist/features/repositories/__test__/test-helpers.js +35 -0
- package/dist/features/repositories/__test__/test-helpers.js.map +1 -0
- package/dist/features/repositories/create-branch/feature.d.ts +6 -0
- package/dist/features/repositories/create-branch/feature.js +33 -0
- package/dist/features/repositories/create-branch/feature.js.map +1 -0
- package/dist/features/repositories/create-branch/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/create-branch/feature.spec.unit.js +36 -0
- package/dist/features/repositories/create-branch/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/create-branch/index.d.ts +1 -0
- package/dist/features/repositories/create-branch/index.js +18 -0
- package/dist/features/repositories/create-branch/index.js.map +1 -0
- package/dist/features/repositories/create-commit/feature.d.ts +6 -0
- package/dist/features/repositories/create-commit/feature.js +122 -0
- package/dist/features/repositories/create-commit/feature.js.map +1 -0
- package/dist/features/repositories/create-commit/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/create-commit/feature.spec.unit.js +157 -0
- package/dist/features/repositories/create-commit/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/create-commit/index.d.ts +1 -0
- package/dist/features/repositories/create-commit/index.js +18 -0
- package/dist/features/repositories/create-commit/index.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.d.ts +22 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.js +303 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.spec.int.d.ts +1 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.spec.int.js +89 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.spec.int.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.spec.unit.js +391 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/index.d.ts +2 -0
- package/dist/features/repositories/get-all-repositories-tree/index.js +19 -0
- package/dist/features/repositories/get-all-repositories-tree/index.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/schema.d.ts +2 -0
- package/dist/features/repositories/get-all-repositories-tree/schema.js +6 -0
- package/dist/features/repositories/get-all-repositories-tree/schema.js.map +1 -0
- package/dist/features/repositories/get-file-content/feature.d.ts +23 -0
- package/dist/features/repositories/get-file-content/feature.js +96 -0
- package/dist/features/repositories/get-file-content/feature.js.map +1 -0
- package/dist/features/repositories/get-file-content/feature.spec.int.d.ts +1 -0
- package/dist/features/repositories/get-file-content/feature.spec.int.js +86 -0
- package/dist/features/repositories/get-file-content/feature.spec.int.js.map +1 -0
- package/dist/features/repositories/get-file-content/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/get-file-content/feature.spec.unit.js +128 -0
- package/dist/features/repositories/get-file-content/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/get-file-content/index.d.ts +2 -0
- package/dist/features/repositories/get-file-content/index.js +19 -0
- package/dist/features/repositories/get-file-content/index.js.map +1 -0
- package/dist/features/repositories/get-file-content/schema.d.ts +2 -0
- package/dist/features/repositories/get-file-content/schema.js +6 -0
- package/dist/features/repositories/get-file-content/schema.js.map +1 -0
- package/dist/features/repositories/get-repository/feature.d.ts +12 -0
- package/dist/features/repositories/get-repository/feature.js +30 -0
- package/dist/features/repositories/get-repository/feature.js.map +1 -0
- package/dist/features/repositories/get-repository/feature.spec.int.d.ts +1 -0
- package/dist/features/repositories/get-repository/feature.spec.int.js +44 -0
- package/dist/features/repositories/get-repository/feature.spec.int.js.map +1 -0
- package/dist/features/repositories/get-repository/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/get-repository/feature.spec.unit.js +41 -0
- package/dist/features/repositories/get-repository/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/get-repository/index.d.ts +2 -0
- package/dist/features/repositories/get-repository/index.js +19 -0
- package/dist/features/repositories/get-repository/index.js.map +1 -0
- package/dist/features/repositories/get-repository/schema.d.ts +2 -0
- package/dist/features/repositories/get-repository/schema.js +6 -0
- package/dist/features/repositories/get-repository/schema.js.map +1 -0
- package/dist/features/repositories/get-repository-details/feature.d.ts +11 -0
- package/dist/features/repositories/get-repository-details/feature.js +67 -0
- package/dist/features/repositories/get-repository-details/feature.js.map +1 -0
- package/dist/features/repositories/get-repository-details/feature.spec.int.d.ts +1 -0
- package/dist/features/repositories/get-repository-details/feature.spec.int.js +119 -0
- package/dist/features/repositories/get-repository-details/feature.spec.int.js.map +1 -0
- package/dist/features/repositories/get-repository-details/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/get-repository-details/feature.spec.unit.js +255 -0
- package/dist/features/repositories/get-repository-details/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/get-repository-details/index.d.ts +2 -0
- package/dist/features/repositories/get-repository-details/index.js +19 -0
- package/dist/features/repositories/get-repository-details/index.js.map +1 -0
- package/dist/features/repositories/get-repository-details/schema.d.ts +2 -0
- package/dist/features/repositories/get-repository-details/schema.js +6 -0
- package/dist/features/repositories/get-repository-details/schema.js.map +1 -0
- package/dist/features/repositories/get-repository-tree/feature.d.ts +6 -0
- package/dist/features/repositories/get-repository-tree/feature.js +65 -0
- package/dist/features/repositories/get-repository-tree/feature.js.map +1 -0
- package/dist/features/repositories/get-repository-tree/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/get-repository-tree/feature.spec.unit.js +69 -0
- package/dist/features/repositories/get-repository-tree/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/get-repository-tree/index.d.ts +1 -0
- package/dist/features/repositories/get-repository-tree/index.js +18 -0
- package/dist/features/repositories/get-repository-tree/index.js.map +1 -0
- package/dist/features/repositories/index.d.ts +21 -0
- package/dist/features/repositories/index.js +179 -0
- package/dist/features/repositories/index.js.map +1 -0
- package/dist/features/repositories/index.spec.unit.d.ts +1 -0
- package/dist/features/repositories/index.spec.unit.js +291 -0
- package/dist/features/repositories/index.spec.unit.js.map +1 -0
- package/dist/features/repositories/list-commits/feature.d.ts +6 -0
- package/dist/features/repositories/list-commits/feature.js +75 -0
- package/dist/features/repositories/list-commits/feature.js.map +1 -0
- package/dist/features/repositories/list-commits/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/list-commits/feature.spec.unit.js +58 -0
- package/dist/features/repositories/list-commits/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/list-commits/index.d.ts +1 -0
- package/dist/features/repositories/list-commits/index.js +18 -0
- package/dist/features/repositories/list-commits/index.js.map +1 -0
- package/dist/features/repositories/list-repositories/feature.d.ts +10 -0
- package/dist/features/repositories/list-repositories/feature.js +25 -0
- package/dist/features/repositories/list-repositories/feature.js.map +1 -0
- package/dist/features/repositories/list-repositories/feature.spec.int.d.ts +1 -0
- package/dist/features/repositories/list-repositories/feature.spec.int.js +56 -0
- package/dist/features/repositories/list-repositories/feature.spec.int.js.map +1 -0
- package/dist/features/repositories/list-repositories/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/list-repositories/feature.spec.unit.js +59 -0
- package/dist/features/repositories/list-repositories/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/list-repositories/index.d.ts +2 -0
- package/dist/features/repositories/list-repositories/index.js +19 -0
- package/dist/features/repositories/list-repositories/index.js.map +1 -0
- package/dist/features/repositories/list-repositories/schema.d.ts +2 -0
- package/dist/features/repositories/list-repositories/schema.js +6 -0
- package/dist/features/repositories/list-repositories/schema.js.map +1 -0
- package/dist/features/repositories/schemas.d.ts +237 -0
- package/dist/features/repositories/schemas.js +306 -0
- package/dist/features/repositories/schemas.js.map +1 -0
- package/dist/features/repositories/tool-definitions.d.ts +5 -0
- package/dist/features/repositories/tool-definitions.js +94 -0
- package/dist/features/repositories/tool-definitions.js.map +1 -0
- package/dist/features/repositories/types.d.ts +167 -0
- package/dist/features/repositories/types.js +3 -0
- package/dist/features/repositories/types.js.map +1 -0
- package/dist/features/search/index.d.ts +15 -0
- package/dist/features/search/index.js +65 -0
- package/dist/features/search/index.js.map +1 -0
- package/dist/features/search/index.spec.unit.d.ts +1 -0
- package/dist/features/search/index.spec.unit.js +143 -0
- package/dist/features/search/index.spec.unit.js.map +1 -0
- package/dist/features/search/schemas.d.ts +171 -0
- package/dist/features/search/schemas.js +159 -0
- package/dist/features/search/schemas.js.map +1 -0
- package/dist/features/search/schemas.spec.unit.d.ts +1 -0
- package/dist/features/search/schemas.spec.unit.js +39 -0
- package/dist/features/search/schemas.spec.unit.js.map +1 -0
- package/dist/features/search/search-code/feature.d.ts +10 -0
- package/dist/features/search/search-code/feature.js +177 -0
- package/dist/features/search/search-code/feature.js.map +1 -0
- package/dist/features/search/search-code/feature.spec.int.d.ts +1 -0
- package/dist/features/search/search-code/feature.spec.int.js +192 -0
- package/dist/features/search/search-code/feature.spec.int.js.map +1 -0
- package/dist/features/search/search-code/feature.spec.unit.d.ts +1 -0
- package/dist/features/search/search-code/feature.spec.unit.js +968 -0
- package/dist/features/search/search-code/feature.spec.unit.js.map +1 -0
- package/dist/features/search/search-code/index.d.ts +2 -0
- package/dist/features/search/search-code/index.js +19 -0
- package/dist/features/search/search-code/index.js.map +1 -0
- package/dist/features/search/search-wiki/feature.d.ts +10 -0
- package/dist/features/search/search-wiki/feature.js +132 -0
- package/dist/features/search/search-wiki/feature.js.map +1 -0
- package/dist/features/search/search-wiki/feature.spec.int.d.ts +1 -0
- package/dist/features/search/search-wiki/feature.spec.int.js +67 -0
- package/dist/features/search/search-wiki/feature.spec.int.js.map +1 -0
- package/dist/features/search/search-wiki/feature.spec.unit.d.ts +1 -0
- package/dist/features/search/search-wiki/feature.spec.unit.js +176 -0
- package/dist/features/search/search-wiki/feature.spec.unit.js.map +1 -0
- package/dist/features/search/search-wiki/index.d.ts +1 -0
- package/dist/features/search/search-wiki/index.js +18 -0
- package/dist/features/search/search-wiki/index.js.map +1 -0
- package/dist/features/search/search-work-items/feature.d.ts +10 -0
- package/dist/features/search/search-work-items/feature.js +118 -0
- package/dist/features/search/search-work-items/feature.js.map +1 -0
- package/dist/features/search/search-work-items/feature.spec.int.d.ts +1 -0
- package/dist/features/search/search-work-items/feature.spec.int.js +150 -0
- package/dist/features/search/search-work-items/feature.spec.int.js.map +1 -0
- package/dist/features/search/search-work-items/feature.spec.unit.d.ts +1 -0
- package/dist/features/search/search-work-items/feature.spec.unit.js +342 -0
- package/dist/features/search/search-work-items/feature.spec.unit.js.map +1 -0
- package/dist/features/search/search-work-items/index.d.ts +1 -0
- package/dist/features/search/search-work-items/index.js +18 -0
- package/dist/features/search/search-work-items/index.js.map +1 -0
- package/dist/features/search/tool-definitions.d.ts +5 -0
- package/dist/features/search/tool-definitions.js +26 -0
- package/dist/features/search/tool-definitions.js.map +1 -0
- package/dist/features/search/types.d.ts +537 -0
- package/dist/features/search/types.js +3 -0
- package/dist/features/search/types.js.map +1 -0
- package/dist/features/users/get-me/feature.d.ts +12 -0
- package/dist/features/users/get-me/feature.js +96 -0
- package/dist/features/users/get-me/feature.js.map +1 -0
- package/dist/features/users/get-me/feature.spec.int.d.ts +1 -0
- package/dist/features/users/get-me/feature.spec.int.js +33 -0
- package/dist/features/users/get-me/feature.spec.int.js.map +1 -0
- package/dist/features/users/get-me/feature.spec.unit.d.ts +1 -0
- package/dist/features/users/get-me/feature.spec.unit.js +164 -0
- package/dist/features/users/get-me/feature.spec.unit.js.map +1 -0
- package/dist/features/users/get-me/index.d.ts +2 -0
- package/dist/features/users/get-me/index.js +19 -0
- package/dist/features/users/get-me/index.js.map +1 -0
- package/dist/features/users/get-me/schema.d.ts +2 -0
- package/dist/features/users/get-me/schema.js +6 -0
- package/dist/features/users/get-me/schema.js.map +1 -0
- package/dist/features/users/index.d.ts +17 -0
- package/dist/features/users/index.js +52 -0
- package/dist/features/users/index.js.map +1 -0
- package/dist/features/users/index.spec.unit.d.ts +1 -0
- package/dist/features/users/index.spec.unit.js +71 -0
- package/dist/features/users/index.spec.unit.js.map +1 -0
- package/dist/features/users/schemas.d.ts +5 -0
- package/dist/features/users/schemas.js +9 -0
- package/dist/features/users/schemas.js.map +1 -0
- package/dist/features/users/tool-definitions.d.ts +5 -0
- package/dist/features/users/tool-definitions.js +16 -0
- package/dist/features/users/tool-definitions.js.map +1 -0
- package/dist/features/users/types.d.ts +17 -0
- package/dist/features/users/types.js +3 -0
- package/dist/features/users/types.js.map +1 -0
- package/dist/features/wikis/create-wiki/feature.d.ts +49 -0
- package/dist/features/wikis/create-wiki/feature.js +56 -0
- package/dist/features/wikis/create-wiki/feature.js.map +1 -0
- package/dist/features/wikis/create-wiki/feature.spec.int.d.ts +1 -0
- package/dist/features/wikis/create-wiki/feature.spec.int.js +44 -0
- package/dist/features/wikis/create-wiki/feature.spec.int.js.map +1 -0
- package/dist/features/wikis/create-wiki/feature.spec.unit.d.ts +1 -0
- package/dist/features/wikis/create-wiki/feature.spec.unit.js +168 -0
- package/dist/features/wikis/create-wiki/feature.spec.unit.js.map +1 -0
- package/dist/features/wikis/create-wiki/index.d.ts +2 -0
- package/dist/features/wikis/create-wiki/index.js +9 -0
- package/dist/features/wikis/create-wiki/index.js.map +1 -0
- package/dist/features/wikis/create-wiki/schema.d.ts +53 -0
- package/dist/features/wikis/create-wiki/schema.js +60 -0
- package/dist/features/wikis/create-wiki/schema.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/feature.d.ts +18 -0
- package/dist/features/wikis/create-wiki-page/feature.js +95 -0
- package/dist/features/wikis/create-wiki-page/feature.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/feature.spec.int.d.ts +1 -0
- package/dist/features/wikis/create-wiki-page/feature.spec.int.js +274 -0
- package/dist/features/wikis/create-wiki-page/feature.spec.int.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/feature.spec.unit.d.ts +1 -0
- package/dist/features/wikis/create-wiki-page/feature.spec.unit.js +141 -0
- package/dist/features/wikis/create-wiki-page/feature.spec.unit.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/index.d.ts +2 -0
- package/dist/features/wikis/create-wiki-page/index.js +8 -0
- package/dist/features/wikis/create-wiki-page/index.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/schema.d.ts +26 -0
- package/dist/features/wikis/create-wiki-page/schema.js +36 -0
- package/dist/features/wikis/create-wiki-page/schema.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/feature.d.ts +33 -0
- package/dist/features/wikis/get-wiki-page/feature.js +68 -0
- package/dist/features/wikis/get-wiki-page/feature.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/feature.spec.int.d.ts +1 -0
- package/dist/features/wikis/get-wiki-page/feature.spec.int.js +58 -0
- package/dist/features/wikis/get-wiki-page/feature.spec.int.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/feature.spec.unit.d.ts +1 -0
- package/dist/features/wikis/get-wiki-page/feature.spec.unit.js +121 -0
- package/dist/features/wikis/get-wiki-page/feature.spec.unit.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/index.d.ts +2 -0
- package/dist/features/wikis/get-wiki-page/index.js +8 -0
- package/dist/features/wikis/get-wiki-page/index.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/schema.d.ts +20 -0
- package/dist/features/wikis/get-wiki-page/schema.js +23 -0
- package/dist/features/wikis/get-wiki-page/schema.js.map +1 -0
- package/dist/features/wikis/get-wikis/feature.d.ts +25 -0
- package/dist/features/wikis/get-wikis/feature.js +37 -0
- package/dist/features/wikis/get-wikis/feature.js.map +1 -0
- package/dist/features/wikis/get-wikis/feature.spec.int.d.ts +1 -0
- package/dist/features/wikis/get-wikis/feature.spec.int.js +34 -0
- package/dist/features/wikis/get-wikis/feature.spec.int.js.map +1 -0
- package/dist/features/wikis/get-wikis/feature.spec.unit.d.ts +1 -0
- package/dist/features/wikis/get-wikis/feature.spec.unit.js +83 -0
- package/dist/features/wikis/get-wikis/feature.spec.unit.js.map +1 -0
- package/dist/features/wikis/get-wikis/index.d.ts +2 -0
- package/dist/features/wikis/get-wikis/index.js +8 -0
- package/dist/features/wikis/get-wikis/index.js.map +1 -0
- package/dist/features/wikis/get-wikis/schema.d.ts +14 -0
- package/dist/features/wikis/get-wikis/schema.js +21 -0
- package/dist/features/wikis/get-wikis/schema.js.map +1 -0
- package/dist/features/wikis/index.d.ts +16 -0
- package/dist/features/wikis/index.js +141 -0
- package/dist/features/wikis/index.js.map +1 -0
- package/dist/features/wikis/index.spec.unit.d.ts +1 -0
- package/dist/features/wikis/index.spec.unit.js +214 -0
- package/dist/features/wikis/index.spec.unit.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/feature.d.ts +20 -0
- package/dist/features/wikis/list-wiki-pages/feature.js +79 -0
- package/dist/features/wikis/list-wiki-pages/feature.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/feature.spec.int.d.ts +1 -0
- package/dist/features/wikis/list-wiki-pages/feature.spec.int.js +230 -0
- package/dist/features/wikis/list-wiki-pages/feature.spec.int.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/feature.spec.unit.d.ts +1 -0
- package/dist/features/wikis/list-wiki-pages/feature.spec.unit.js +427 -0
- package/dist/features/wikis/list-wiki-pages/feature.spec.unit.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/index.d.ts +2 -0
- package/dist/features/wikis/list-wiki-pages/index.js +8 -0
- package/dist/features/wikis/list-wiki-pages/index.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/schema.d.ts +18 -0
- package/dist/features/wikis/list-wiki-pages/schema.js +22 -0
- package/dist/features/wikis/list-wiki-pages/schema.js.map +1 -0
- package/dist/features/wikis/tool-definitions.d.ts +5 -0
- package/dist/features/wikis/tool-definitions.js +46 -0
- package/dist/features/wikis/tool-definitions.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/feature.d.ts +12 -0
- package/dist/features/wikis/update-wiki-page/feature.js +63 -0
- package/dist/features/wikis/update-wiki-page/feature.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/feature.spec.int.d.ts +1 -0
- package/dist/features/wikis/update-wiki-page/feature.spec.int.js +39 -0
- package/dist/features/wikis/update-wiki-page/feature.spec.int.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/index.d.ts +2 -0
- package/dist/features/wikis/update-wiki-page/index.js +8 -0
- package/dist/features/wikis/update-wiki-page/index.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/schema.d.ts +26 -0
- package/dist/features/wikis/update-wiki-page/schema.js +32 -0
- package/dist/features/wikis/update-wiki-page/schema.js.map +1 -0
- package/dist/features/work-items/__test__/fixtures.d.ts +9 -0
- package/dist/features/work-items/__test__/fixtures.js +28 -0
- package/dist/features/work-items/__test__/fixtures.js.map +1 -0
- package/dist/features/work-items/__test__/test-helpers.d.ts +13 -0
- package/dist/features/work-items/__test__/test-helpers.js +35 -0
- package/dist/features/work-items/__test__/test-helpers.js.map +1 -0
- package/dist/features/work-items/__test__/test-utils.d.ts +17 -0
- package/dist/features/work-items/__test__/test-utils.js +39 -0
- package/dist/features/work-items/__test__/test-utils.js.map +1 -0
- package/dist/features/work-items/create-work-item/feature.d.ts +12 -0
- package/dist/features/work-items/create-work-item/feature.js +99 -0
- package/dist/features/work-items/create-work-item/feature.js.map +1 -0
- package/dist/features/work-items/create-work-item/feature.spec.int.d.ts +1 -0
- package/dist/features/work-items/create-work-item/feature.spec.int.js +105 -0
- package/dist/features/work-items/create-work-item/feature.spec.int.js.map +1 -0
- package/dist/features/work-items/create-work-item/feature.spec.unit.d.ts +1 -0
- package/dist/features/work-items/create-work-item/feature.spec.unit.js +46 -0
- package/dist/features/work-items/create-work-item/feature.spec.unit.js.map +1 -0
- package/dist/features/work-items/create-work-item/index.d.ts +2 -0
- package/dist/features/work-items/create-work-item/index.js +19 -0
- package/dist/features/work-items/create-work-item/index.js.map +1 -0
- package/dist/features/work-items/create-work-item/schema.d.ts +2 -0
- package/dist/features/work-items/create-work-item/schema.js +6 -0
- package/dist/features/work-items/create-work-item/schema.js.map +1 -0
- package/dist/features/work-items/get-work-item/feature.d.ts +12 -0
- package/dist/features/work-items/get-work-item/feature.js +69 -0
- package/dist/features/work-items/get-work-item/feature.js.map +1 -0
- package/dist/features/work-items/get-work-item/feature.spec.int.d.ts +1 -0
- package/dist/features/work-items/get-work-item/feature.spec.int.js +138 -0
- package/dist/features/work-items/get-work-item/feature.spec.int.js.map +1 -0
- package/dist/features/work-items/get-work-item/feature.spec.unit.d.ts +1 -0
- package/dist/features/work-items/get-work-item/feature.spec.unit.js +31 -0
- package/dist/features/work-items/get-work-item/feature.spec.unit.js.map +1 -0
- package/dist/features/work-items/get-work-item/index.d.ts +2 -0
- package/dist/features/work-items/get-work-item/index.js +19 -0
- package/dist/features/work-items/get-work-item/index.js.map +1 -0
- package/dist/features/work-items/get-work-item/schema.d.ts +2 -0
- package/dist/features/work-items/get-work-item/schema.js +6 -0
- package/dist/features/work-items/get-work-item/schema.js.map +1 -0
- package/dist/features/work-items/index.d.ts +17 -0
- package/dist/features/work-items/index.js +122 -0
- package/dist/features/work-items/index.js.map +1 -0
- package/dist/features/work-items/index.spec.unit.d.ts +1 -0
- package/dist/features/work-items/index.spec.unit.js +232 -0
- package/dist/features/work-items/index.spec.unit.js.map +1 -0
- package/dist/features/work-items/list-work-items/feature.d.ts +10 -0
- package/dist/features/work-items/list-work-items/feature.js +89 -0
- package/dist/features/work-items/list-work-items/feature.js.map +1 -0
- package/dist/features/work-items/list-work-items/feature.spec.int.d.ts +1 -0
- package/dist/features/work-items/list-work-items/feature.spec.int.js +103 -0
- package/dist/features/work-items/list-work-items/feature.spec.int.js.map +1 -0
- package/dist/features/work-items/list-work-items/feature.spec.unit.d.ts +1 -0
- package/dist/features/work-items/list-work-items/feature.spec.unit.js +95 -0
- package/dist/features/work-items/list-work-items/feature.spec.unit.js.map +1 -0
- package/dist/features/work-items/list-work-items/index.d.ts +2 -0
- package/dist/features/work-items/list-work-items/index.js +19 -0
- package/dist/features/work-items/list-work-items/index.js.map +1 -0
- package/dist/features/work-items/list-work-items/schema.d.ts +2 -0
- package/dist/features/work-items/list-work-items/schema.js +6 -0
- package/dist/features/work-items/list-work-items/schema.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/feature.d.ts +24 -0
- package/dist/features/work-items/manage-work-item-link/feature.js +76 -0
- package/dist/features/work-items/manage-work-item-link/feature.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/feature.spec.int.d.ts +1 -0
- package/dist/features/work-items/manage-work-item-link/feature.spec.int.js +75 -0
- package/dist/features/work-items/manage-work-item-link/feature.spec.int.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/feature.spec.unit.d.ts +1 -0
- package/dist/features/work-items/manage-work-item-link/feature.spec.unit.js +137 -0
- package/dist/features/work-items/manage-work-item-link/feature.spec.unit.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/index.d.ts +2 -0
- package/dist/features/work-items/manage-work-item-link/index.js +8 -0
- package/dist/features/work-items/manage-work-item-link/index.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/schema.d.ts +2 -0
- package/dist/features/work-items/manage-work-item-link/schema.js +6 -0
- package/dist/features/work-items/manage-work-item-link/schema.js.map +1 -0
- package/dist/features/work-items/schemas.d.ts +147 -0
- package/dist/features/work-items/schemas.js +134 -0
- package/dist/features/work-items/schemas.js.map +1 -0
- package/dist/features/work-items/tool-definitions.d.ts +5 -0
- package/dist/features/work-items/tool-definitions.js +36 -0
- package/dist/features/work-items/tool-definitions.js.map +1 -0
- package/dist/features/work-items/types.d.ts +39 -0
- package/dist/features/work-items/types.js +3 -0
- package/dist/features/work-items/types.js.map +1 -0
- package/dist/features/work-items/update-work-item/feature.d.ts +12 -0
- package/dist/features/work-items/update-work-item/feature.js +103 -0
- package/dist/features/work-items/update-work-item/feature.js.map +1 -0
- package/dist/features/work-items/update-work-item/feature.spec.int.d.ts +1 -0
- package/dist/features/work-items/update-work-item/feature.spec.int.js +84 -0
- package/dist/features/work-items/update-work-item/feature.spec.int.js.map +1 -0
- package/dist/features/work-items/update-work-item/feature.spec.unit.d.ts +1 -0
- package/dist/features/work-items/update-work-item/feature.spec.unit.js +38 -0
- package/dist/features/work-items/update-work-item/feature.spec.unit.js.map +1 -0
- package/dist/features/work-items/update-work-item/index.d.ts +2 -0
- package/dist/features/work-items/update-work-item/index.js +19 -0
- package/dist/features/work-items/update-work-item/index.js.map +1 -0
- package/dist/features/work-items/update-work-item/schema.d.ts +2 -0
- package/dist/features/work-items/update-work-item/schema.js +6 -0
- package/dist/features/work-items/update-work-item/schema.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +99 -0
- package/dist/index.js.map +1 -0
- package/dist/index.spec.unit.d.ts +1 -0
- package/dist/index.spec.unit.js +83 -0
- package/dist/index.spec.unit.js.map +1 -0
- package/dist/server.d.ts +21 -0
- package/dist/server.js +382 -0
- package/dist/server.js.map +1 -0
- package/dist/server.spec.e2e.d.ts +1 -0
- package/dist/server.spec.e2e.js +229 -0
- package/dist/server.spec.e2e.js.map +1 -0
- package/dist/setup-env.spec.unit.d.ts +1 -0
- package/dist/setup-env.spec.unit.js +146 -0
- package/dist/setup-env.spec.unit.js.map +1 -0
- package/dist/shared/api/client.d.ts +91 -0
- package/dist/shared/api/client.js +242 -0
- package/dist/shared/api/client.js.map +1 -0
- package/dist/shared/api/index.d.ts +1 -0
- package/dist/shared/api/index.js +18 -0
- package/dist/shared/api/index.js.map +1 -0
- package/dist/shared/auth/auth-factory.d.ts +43 -0
- package/dist/shared/auth/auth-factory.js +140 -0
- package/dist/shared/auth/auth-factory.js.map +1 -0
- package/dist/shared/auth/auth-factory.spec.unit.d.ts +1 -0
- package/dist/shared/auth/auth-factory.spec.unit.js +38 -0
- package/dist/shared/auth/auth-factory.spec.unit.js.map +1 -0
- package/dist/shared/auth/client-factory.d.ts +109 -0
- package/dist/shared/auth/client-factory.js +272 -0
- package/dist/shared/auth/client-factory.js.map +1 -0
- package/dist/shared/auth/index.d.ts +11 -0
- package/dist/shared/auth/index.js +18 -0
- package/dist/shared/auth/index.js.map +1 -0
- package/dist/shared/azure-devops-url.d.ts +17 -0
- package/dist/shared/azure-devops-url.js +120 -0
- package/dist/shared/azure-devops-url.js.map +1 -0
- package/dist/shared/azure-devops-url.spec.unit.d.ts +1 -0
- package/dist/shared/azure-devops-url.spec.unit.js +103 -0
- package/dist/shared/azure-devops-url.spec.unit.js.map +1 -0
- package/dist/shared/config/index.d.ts +1 -0
- package/dist/shared/config/index.js +18 -0
- package/dist/shared/config/index.js.map +1 -0
- package/dist/shared/config/version.d.ts +4 -0
- package/dist/shared/config/version.js +8 -0
- package/dist/shared/config/version.js.map +1 -0
- package/dist/shared/enums/index.d.ts +40 -0
- package/dist/shared/enums/index.js +87 -0
- package/dist/shared/enums/index.js.map +1 -0
- package/dist/shared/enums/index.spec.unit.d.ts +1 -0
- package/dist/shared/enums/index.spec.unit.js +75 -0
- package/dist/shared/enums/index.spec.unit.js.map +1 -0
- package/dist/shared/errors/azure-devops-errors.d.ts +107 -0
- package/dist/shared/errors/azure-devops-errors.js +161 -0
- package/dist/shared/errors/azure-devops-errors.js.map +1 -0
- package/dist/shared/errors/handle-request-error.d.ts +31 -0
- package/dist/shared/errors/handle-request-error.js +98 -0
- package/dist/shared/errors/handle-request-error.js.map +1 -0
- package/dist/shared/errors/index.d.ts +1 -0
- package/dist/shared/errors/index.js +18 -0
- package/dist/shared/errors/index.js.map +1 -0
- package/dist/shared/test/test-helpers.d.ts +20 -0
- package/dist/shared/test/test-helpers.js +57 -0
- package/dist/shared/test/test-helpers.js.map +1 -0
- package/dist/shared/types/config.d.ts +27 -0
- package/dist/shared/types/config.js +3 -0
- package/dist/shared/types/config.js.map +1 -0
- package/dist/shared/types/index.d.ts +1 -0
- package/dist/shared/types/index.js +18 -0
- package/dist/shared/types/index.js.map +1 -0
- package/dist/shared/types/request-handler.d.ts +21 -0
- package/dist/shared/types/request-handler.js +3 -0
- package/dist/shared/types/request-handler.js.map +1 -0
- package/dist/shared/types/tool-definition.d.ts +10 -0
- package/dist/shared/types/tool-definition.js +3 -0
- package/dist/shared/types/tool-definition.js.map +1 -0
- package/dist/shared/utils/serialize.d.ts +5 -0
- package/dist/shared/utils/serialize.js +15 -0
- package/dist/shared/utils/serialize.js.map +1 -0
- package/dist/utils/environment.d.ts +15 -0
- package/dist/utils/environment.js +52 -0
- package/dist/utils/environment.js.map +1 -0
- package/dist/utils/environment.spec.unit.d.ts +1 -0
- package/dist/utils/environment.spec.unit.js +64 -0
- package/dist/utils/environment.spec.unit.js.map +1 -0
- package/docs/SOLUTION_SUMMARY.md +145 -0
- package/docs/authentication.md +267 -0
- package/docs/azure-identity-authentication.md +187 -0
- package/docs/ci-setup.md +61 -0
- package/docs/examples/README.md +33 -0
- package/docs/examples/azure-cli-authentication.env +25 -0
- package/docs/examples/azure-identity-authentication.env +33 -0
- package/docs/examples/pat-authentication.env +24 -0
- package/docs/important-knowledge/azure-devops-rest-api-research.md +88 -0
- package/docs/important-knowledge/llm-tldr-cli.md +37 -0
- package/docs/npm-trusted-publishers-migration.md +142 -0
- package/docs/release-troubleshooting.md +153 -0
- package/docs/testing/README.md +140 -0
- package/docs/testing/setup.md +72 -0
- package/docs/tools/README.md +73 -0
- package/docs/tools/core-navigation.md +114 -0
- package/docs/tools/organizations.md +73 -0
- package/docs/tools/pipelines.md +532 -0
- package/docs/tools/projects.md +114 -0
- package/docs/tools/pull-requests.md +1108 -0
- package/docs/tools/repositories.md +610 -0
- package/docs/tools/resources.md +133 -0
- package/docs/tools/search.md +165 -0
- package/docs/tools/user-tools.md +39 -0
- package/docs/tools/wiki.md +192 -0
- package/docs/tools/work-items.md +182 -0
- package/package.json +125 -0
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const GitInterfaces_1 = require("azure-devops-node-api/interfaces/GitInterfaces");
|
|
4
|
+
const feature_1 = require("./feature");
|
|
5
|
+
// Mock the Azure DevOps API
|
|
6
|
+
jest.mock('azure-devops-node-api');
|
|
7
|
+
describe('getAllRepositoriesTree', () => {
|
|
8
|
+
// Sample repositories
|
|
9
|
+
const mockRepos = [
|
|
10
|
+
{
|
|
11
|
+
id: 'repo1-id',
|
|
12
|
+
name: 'repo1',
|
|
13
|
+
defaultBranch: 'refs/heads/main',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: 'repo2-id',
|
|
17
|
+
name: 'repo2',
|
|
18
|
+
defaultBranch: 'refs/heads/master',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: 'repo3-id',
|
|
22
|
+
name: 'repo3-api',
|
|
23
|
+
defaultBranch: null, // No default branch
|
|
24
|
+
},
|
|
25
|
+
];
|
|
26
|
+
// Sample files/folders for repo1 at root level
|
|
27
|
+
const mockRepo1RootItems = [
|
|
28
|
+
{
|
|
29
|
+
path: '/',
|
|
30
|
+
gitObjectType: GitInterfaces_1.GitObjectType.Tree,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
path: '/README.md',
|
|
34
|
+
isFolder: false,
|
|
35
|
+
gitObjectType: GitInterfaces_1.GitObjectType.Blob,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
path: '/src',
|
|
39
|
+
isFolder: true,
|
|
40
|
+
gitObjectType: GitInterfaces_1.GitObjectType.Tree,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
path: '/package.json',
|
|
44
|
+
isFolder: false,
|
|
45
|
+
gitObjectType: GitInterfaces_1.GitObjectType.Blob,
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
// Sample files/folders for repo1 - src folder
|
|
49
|
+
const mockRepo1SrcItems = [
|
|
50
|
+
{
|
|
51
|
+
path: '/src',
|
|
52
|
+
isFolder: true,
|
|
53
|
+
gitObjectType: GitInterfaces_1.GitObjectType.Tree,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
path: '/src/index.ts',
|
|
57
|
+
isFolder: false,
|
|
58
|
+
gitObjectType: GitInterfaces_1.GitObjectType.Blob,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
path: '/src/utils',
|
|
62
|
+
isFolder: true,
|
|
63
|
+
gitObjectType: GitInterfaces_1.GitObjectType.Tree,
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
// Sample files/folders for repo1 with unlimited depth (what server would return for Full recursion)
|
|
67
|
+
const mockRepo1FullRecursionItems = [
|
|
68
|
+
{
|
|
69
|
+
path: '/',
|
|
70
|
+
gitObjectType: GitInterfaces_1.GitObjectType.Tree,
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
path: '/README.md',
|
|
74
|
+
isFolder: false,
|
|
75
|
+
gitObjectType: GitInterfaces_1.GitObjectType.Blob,
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
path: '/src',
|
|
79
|
+
isFolder: true,
|
|
80
|
+
gitObjectType: GitInterfaces_1.GitObjectType.Tree,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
path: '/package.json',
|
|
84
|
+
isFolder: false,
|
|
85
|
+
gitObjectType: GitInterfaces_1.GitObjectType.Blob,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
path: '/src/index.ts',
|
|
89
|
+
isFolder: false,
|
|
90
|
+
gitObjectType: GitInterfaces_1.GitObjectType.Blob,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
path: '/src/utils',
|
|
94
|
+
isFolder: true,
|
|
95
|
+
gitObjectType: GitInterfaces_1.GitObjectType.Tree,
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
path: '/src/utils/helper.ts',
|
|
99
|
+
isFolder: false,
|
|
100
|
+
gitObjectType: GitInterfaces_1.GitObjectType.Blob,
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
path: '/src/utils/constants.ts',
|
|
104
|
+
isFolder: false,
|
|
105
|
+
gitObjectType: GitInterfaces_1.GitObjectType.Blob,
|
|
106
|
+
},
|
|
107
|
+
];
|
|
108
|
+
// Sample files/folders for repo2
|
|
109
|
+
const mockRepo2RootItems = [
|
|
110
|
+
{
|
|
111
|
+
path: '/',
|
|
112
|
+
gitObjectType: GitInterfaces_1.GitObjectType.Tree,
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
path: '/README.md',
|
|
116
|
+
isFolder: false,
|
|
117
|
+
gitObjectType: GitInterfaces_1.GitObjectType.Blob,
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
path: '/data.json',
|
|
121
|
+
isFolder: false,
|
|
122
|
+
gitObjectType: GitInterfaces_1.GitObjectType.Blob,
|
|
123
|
+
},
|
|
124
|
+
];
|
|
125
|
+
let mockConnection;
|
|
126
|
+
let mockGitApi;
|
|
127
|
+
beforeEach(() => {
|
|
128
|
+
// Clear mocks
|
|
129
|
+
jest.clearAllMocks();
|
|
130
|
+
// Create mock GitApi
|
|
131
|
+
mockGitApi = {
|
|
132
|
+
getRepositories: jest.fn().mockResolvedValue(mockRepos),
|
|
133
|
+
getItems: jest
|
|
134
|
+
.fn()
|
|
135
|
+
.mockImplementation((repoId, _projectId, path, recursionLevel) => {
|
|
136
|
+
if (repoId === 'repo1-id') {
|
|
137
|
+
if (recursionLevel === GitInterfaces_1.VersionControlRecursionType.Full) {
|
|
138
|
+
return Promise.resolve(mockRepo1FullRecursionItems);
|
|
139
|
+
}
|
|
140
|
+
else if (path === '/') {
|
|
141
|
+
return Promise.resolve(mockRepo1RootItems);
|
|
142
|
+
}
|
|
143
|
+
else if (path === '/src') {
|
|
144
|
+
return Promise.resolve(mockRepo1SrcItems);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
else if (repoId === 'repo2-id') {
|
|
148
|
+
if (recursionLevel === GitInterfaces_1.VersionControlRecursionType.Full) {
|
|
149
|
+
return Promise.resolve(mockRepo2RootItems);
|
|
150
|
+
}
|
|
151
|
+
else if (path === '/') {
|
|
152
|
+
return Promise.resolve(mockRepo2RootItems);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return Promise.resolve([]);
|
|
156
|
+
}),
|
|
157
|
+
};
|
|
158
|
+
// Create mock connection
|
|
159
|
+
mockConnection = {
|
|
160
|
+
getGitApi: jest.fn().mockResolvedValue(mockGitApi),
|
|
161
|
+
};
|
|
162
|
+
});
|
|
163
|
+
it('should return tree structures for multiple repositories with limited depth', async () => {
|
|
164
|
+
// Arrange
|
|
165
|
+
const options = {
|
|
166
|
+
organizationId: 'testOrg',
|
|
167
|
+
projectId: 'testProject',
|
|
168
|
+
depth: 2, // Limited depth
|
|
169
|
+
};
|
|
170
|
+
// Act
|
|
171
|
+
const result = await (0, feature_1.getAllRepositoriesTree)(mockConnection, options);
|
|
172
|
+
// Assert
|
|
173
|
+
expect(mockGitApi.getRepositories).toHaveBeenCalledWith('testProject');
|
|
174
|
+
expect(result.repositories.length).toBe(3);
|
|
175
|
+
// Verify repo1 tree
|
|
176
|
+
const repo1 = result.repositories.find((r) => r.name === 'repo1');
|
|
177
|
+
expect(repo1).toBeDefined();
|
|
178
|
+
expect(repo1?.tree.length).toBeGreaterThan(0);
|
|
179
|
+
expect(repo1?.stats.directories).toBeGreaterThan(0);
|
|
180
|
+
expect(repo1?.stats.files).toBeGreaterThan(0);
|
|
181
|
+
// Verify repo2 tree
|
|
182
|
+
const repo2 = result.repositories.find((r) => r.name === 'repo2');
|
|
183
|
+
expect(repo2).toBeDefined();
|
|
184
|
+
expect(repo2?.tree.length).toBeGreaterThan(0);
|
|
185
|
+
// Verify repo3 has error (no default branch)
|
|
186
|
+
const repo3 = result.repositories.find((r) => r.name === 'repo3-api');
|
|
187
|
+
expect(repo3).toBeDefined();
|
|
188
|
+
expect(repo3?.error).toContain('No default branch found');
|
|
189
|
+
// Verify recursion level was set correctly
|
|
190
|
+
expect(mockGitApi.getItems).toHaveBeenCalledWith('repo1-id', 'testProject', '/', GitInterfaces_1.VersionControlRecursionType.OneLevel, expect.anything(), expect.anything(), expect.anything(), expect.anything(), expect.anything());
|
|
191
|
+
});
|
|
192
|
+
it('should return tree structures with max depth using Full recursion', async () => {
|
|
193
|
+
// Arrange
|
|
194
|
+
const options = {
|
|
195
|
+
organizationId: 'testOrg',
|
|
196
|
+
projectId: 'testProject',
|
|
197
|
+
depth: 0, // Max depth
|
|
198
|
+
};
|
|
199
|
+
// Act
|
|
200
|
+
const result = await (0, feature_1.getAllRepositoriesTree)(mockConnection, options);
|
|
201
|
+
// Assert
|
|
202
|
+
expect(mockGitApi.getRepositories).toHaveBeenCalledWith('testProject');
|
|
203
|
+
expect(result.repositories.length).toBe(3);
|
|
204
|
+
// Verify repo1 tree
|
|
205
|
+
const repo1 = result.repositories.find((r) => r.name === 'repo1');
|
|
206
|
+
expect(repo1).toBeDefined();
|
|
207
|
+
expect(repo1?.tree.length).toBeGreaterThan(0);
|
|
208
|
+
// Should include all items, including nested ones
|
|
209
|
+
expect(repo1?.tree.length).toBe(mockRepo1FullRecursionItems.length - 1); // -1 for root folder
|
|
210
|
+
// Verify recursion level was set correctly
|
|
211
|
+
expect(mockGitApi.getItems).toHaveBeenCalledWith('repo1-id', 'testProject', '/', GitInterfaces_1.VersionControlRecursionType.Full, expect.anything(), expect.anything(), expect.anything(), expect.anything(), expect.anything());
|
|
212
|
+
// Verify all levels are represented
|
|
213
|
+
if (repo1) {
|
|
214
|
+
const level1Items = repo1.tree.filter((item) => item.level === 1);
|
|
215
|
+
const level2Items = repo1.tree.filter((item) => item.level === 2);
|
|
216
|
+
const level3Items = repo1.tree.filter((item) => item.level === 3);
|
|
217
|
+
// Verify we have items at level 1
|
|
218
|
+
expect(level1Items.length).toBeGreaterThan(0);
|
|
219
|
+
// Verify we have items at level 2 (src/something)
|
|
220
|
+
expect(level2Items.length).toBeGreaterThan(0);
|
|
221
|
+
// Check for level 3 items if they exist in our mock data
|
|
222
|
+
if (mockRepo1FullRecursionItems.some((item) => {
|
|
223
|
+
const pathSegments = item.path.split('/').filter(Boolean);
|
|
224
|
+
return pathSegments.length >= 3;
|
|
225
|
+
})) {
|
|
226
|
+
expect(level3Items.length).toBeGreaterThan(0);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
it('should filter repositories by pattern', async () => {
|
|
231
|
+
// Arrange
|
|
232
|
+
const options = {
|
|
233
|
+
organizationId: 'testOrg',
|
|
234
|
+
projectId: 'testProject',
|
|
235
|
+
repositoryPattern: '*api*',
|
|
236
|
+
depth: 1,
|
|
237
|
+
};
|
|
238
|
+
// Act
|
|
239
|
+
const result = await (0, feature_1.getAllRepositoriesTree)(mockConnection, options);
|
|
240
|
+
// Assert
|
|
241
|
+
expect(mockGitApi.getRepositories).toHaveBeenCalledWith('testProject');
|
|
242
|
+
expect(result.repositories.length).toBe(1);
|
|
243
|
+
expect(result.repositories[0].name).toBe('repo3-api');
|
|
244
|
+
});
|
|
245
|
+
it('should format repository tree correctly', () => {
|
|
246
|
+
// Arrange
|
|
247
|
+
const treeItems = [
|
|
248
|
+
{ name: 'src', path: '/src', isFolder: true, level: 1 },
|
|
249
|
+
{ name: 'index.ts', path: '/src/index.ts', isFolder: false, level: 2 },
|
|
250
|
+
{ name: 'README.md', path: '/README.md', isFolder: false, level: 1 },
|
|
251
|
+
];
|
|
252
|
+
const stats = { directories: 1, files: 2 };
|
|
253
|
+
// Act
|
|
254
|
+
const formatted = (0, feature_1.formatRepositoryTree)('test-repo', treeItems, stats);
|
|
255
|
+
// Assert
|
|
256
|
+
expect(formatted).toMatchSnapshot();
|
|
257
|
+
});
|
|
258
|
+
it('should format complex repository tree structures correctly', () => {
|
|
259
|
+
// Arrange
|
|
260
|
+
const treeItems = [
|
|
261
|
+
// Root level files
|
|
262
|
+
{ name: 'README.md', path: '/README.md', isFolder: false, level: 1 },
|
|
263
|
+
{
|
|
264
|
+
name: 'package.json',
|
|
265
|
+
path: '/package.json',
|
|
266
|
+
isFolder: false,
|
|
267
|
+
level: 1,
|
|
268
|
+
},
|
|
269
|
+
{ name: '.gitignore', path: '/.gitignore', isFolder: false, level: 1 },
|
|
270
|
+
// Multiple folders at root level
|
|
271
|
+
{ name: 'src', path: '/src', isFolder: true, level: 1 },
|
|
272
|
+
{ name: 'tests', path: '/tests', isFolder: true, level: 1 },
|
|
273
|
+
{ name: 'docs', path: '/docs', isFolder: true, level: 1 },
|
|
274
|
+
// Nested src folder structure
|
|
275
|
+
{ name: 'components', path: '/src/components', isFolder: true, level: 2 },
|
|
276
|
+
{ name: 'utils', path: '/src/utils', isFolder: true, level: 2 },
|
|
277
|
+
{ name: 'index.ts', path: '/src/index.ts', isFolder: false, level: 2 },
|
|
278
|
+
// Deeply nested components
|
|
279
|
+
{
|
|
280
|
+
name: 'Button',
|
|
281
|
+
path: '/src/components/Button',
|
|
282
|
+
isFolder: true,
|
|
283
|
+
level: 3,
|
|
284
|
+
},
|
|
285
|
+
{ name: 'Card', path: '/src/components/Card', isFolder: true, level: 3 },
|
|
286
|
+
{
|
|
287
|
+
name: 'Button.tsx',
|
|
288
|
+
path: '/src/components/Button/Button.tsx',
|
|
289
|
+
isFolder: false,
|
|
290
|
+
level: 4,
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
name: 'Button.styles.ts',
|
|
294
|
+
path: '/src/components/Button/Button.styles.ts',
|
|
295
|
+
isFolder: false,
|
|
296
|
+
level: 4,
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
name: 'Button.test.tsx',
|
|
300
|
+
path: '/src/components/Button/Button.test.tsx',
|
|
301
|
+
isFolder: false,
|
|
302
|
+
level: 4,
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
name: 'index.ts',
|
|
306
|
+
path: '/src/components/Button/index.ts',
|
|
307
|
+
isFolder: false,
|
|
308
|
+
level: 4,
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
name: 'Card.tsx',
|
|
312
|
+
path: '/src/components/Card/Card.tsx',
|
|
313
|
+
isFolder: false,
|
|
314
|
+
level: 4,
|
|
315
|
+
},
|
|
316
|
+
// Utils with files
|
|
317
|
+
{
|
|
318
|
+
name: 'helpers.ts',
|
|
319
|
+
path: '/src/utils/helpers.ts',
|
|
320
|
+
isFolder: false,
|
|
321
|
+
level: 3,
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
name: 'constants.ts',
|
|
325
|
+
path: '/src/utils/constants.ts',
|
|
326
|
+
isFolder: false,
|
|
327
|
+
level: 3,
|
|
328
|
+
},
|
|
329
|
+
// Empty folder
|
|
330
|
+
{ name: 'assets', path: '/src/assets', isFolder: true, level: 2 },
|
|
331
|
+
// Files with special characters
|
|
332
|
+
{
|
|
333
|
+
name: 'file-with-dashes.js',
|
|
334
|
+
path: '/src/file-with-dashes.js',
|
|
335
|
+
isFolder: false,
|
|
336
|
+
level: 2,
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
name: 'file_with_underscores.js',
|
|
340
|
+
path: '/src/file_with_underscores.js',
|
|
341
|
+
isFolder: false,
|
|
342
|
+
level: 2,
|
|
343
|
+
},
|
|
344
|
+
// Folders in test directory
|
|
345
|
+
{ name: 'unit', path: '/tests/unit', isFolder: true, level: 2 },
|
|
346
|
+
{
|
|
347
|
+
name: 'integration',
|
|
348
|
+
path: '/tests/integration',
|
|
349
|
+
isFolder: true,
|
|
350
|
+
level: 2,
|
|
351
|
+
},
|
|
352
|
+
// Files in test directories
|
|
353
|
+
{ name: 'setup.js', path: '/tests/setup.js', isFolder: false, level: 2 },
|
|
354
|
+
{
|
|
355
|
+
name: 'example.test.js',
|
|
356
|
+
path: '/tests/unit/example.test.js',
|
|
357
|
+
isFolder: false,
|
|
358
|
+
level: 3,
|
|
359
|
+
},
|
|
360
|
+
// Files in docs
|
|
361
|
+
{ name: 'API.md', path: '/docs/API.md', isFolder: false, level: 2 },
|
|
362
|
+
{
|
|
363
|
+
name: 'CONTRIBUTING.md',
|
|
364
|
+
path: '/docs/CONTRIBUTING.md',
|
|
365
|
+
isFolder: false,
|
|
366
|
+
level: 2,
|
|
367
|
+
},
|
|
368
|
+
];
|
|
369
|
+
const stats = { directories: 10, files: 18 };
|
|
370
|
+
// Act
|
|
371
|
+
const formatted = (0, feature_1.formatRepositoryTree)('complex-repo', treeItems, stats);
|
|
372
|
+
// Assert
|
|
373
|
+
expect(formatted).toMatchSnapshot();
|
|
374
|
+
});
|
|
375
|
+
it('should handle repository errors gracefully', async () => {
|
|
376
|
+
// Arrange
|
|
377
|
+
mockGitApi.getItems = jest.fn().mockRejectedValue(new Error('API error'));
|
|
378
|
+
const options = {
|
|
379
|
+
organizationId: 'testOrg',
|
|
380
|
+
projectId: 'testProject',
|
|
381
|
+
depth: 1,
|
|
382
|
+
};
|
|
383
|
+
// Act
|
|
384
|
+
const result = await (0, feature_1.getAllRepositoriesTree)(mockConnection, options);
|
|
385
|
+
// Assert
|
|
386
|
+
expect(result.repositories.length).toBe(3);
|
|
387
|
+
const repo1 = result.repositories.find((r) => r.name === 'repo1');
|
|
388
|
+
expect(repo1?.error).toBeDefined();
|
|
389
|
+
});
|
|
390
|
+
});
|
|
391
|
+
//# sourceMappingURL=feature.spec.unit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.spec.unit.js","sourceRoot":"","sources":["../../../../src/features/repositories/get-all-repositories-tree/feature.spec.unit.ts"],"names":[],"mappings":";;AACA,kFAGwD;AACxD,uCAAyE;AAGzE,4BAA4B;AAC5B,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;AAEnC,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,sBAAsB;IACtB,MAAM,SAAS,GAAG;QAChB;YACE,EAAE,EAAE,UAAU;YACd,IAAI,EAAE,OAAO;YACb,aAAa,EAAE,iBAAiB;SACjC;QACD;YACE,EAAE,EAAE,UAAU;YACd,IAAI,EAAE,OAAO;YACb,aAAa,EAAE,mBAAmB;SACnC;QACD;YACE,EAAE,EAAE,UAAU;YACd,IAAI,EAAE,WAAW;YACjB,aAAa,EAAE,IAAI,EAAE,oBAAoB;SAC1C;KACF,CAAC;IAEF,+CAA+C;IAC/C,MAAM,kBAAkB,GAAG;QACzB;YACE,IAAI,EAAE,GAAG;YACT,aAAa,EAAE,6BAAa,CAAC,IAAI;SAClC;QACD;YACE,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE,KAAK;YACf,aAAa,EAAE,6BAAa,CAAC,IAAI;SAClC;QACD;YACE,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,IAAI;YACd,aAAa,EAAE,6BAAa,CAAC,IAAI;SAClC;QACD;YACE,IAAI,EAAE,eAAe;YACrB,QAAQ,EAAE,KAAK;YACf,aAAa,EAAE,6BAAa,CAAC,IAAI;SAClC;KACF,CAAC;IAEF,8CAA8C;IAC9C,MAAM,iBAAiB,GAAG;QACxB;YACE,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,IAAI;YACd,aAAa,EAAE,6BAAa,CAAC,IAAI;SAClC;QACD;YACE,IAAI,EAAE,eAA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|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./schema"), exports);
|
|
18
|
+
__exportStar(require("./feature"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/repositories/get-all-repositories-tree/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,4CAA0B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetAllRepositoriesTreeSchema = void 0;
|
|
4
|
+
const schemas_1 = require("../schemas");
|
|
5
|
+
Object.defineProperty(exports, "GetAllRepositoriesTreeSchema", { enumerable: true, get: function () { return schemas_1.GetAllRepositoriesTreeSchema; } });
|
|
6
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/features/repositories/get-all-repositories-tree/schema.ts"],"names":[],"mappings":";;;AAAA,wCAA0D;AAGjD,6GAHA,sCAA4B,OAGA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { WebApi } from 'azure-devops-node-api';
|
|
2
|
+
import { GitVersionType } from 'azure-devops-node-api/interfaces/GitInterfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Response format for file content
|
|
5
|
+
*/
|
|
6
|
+
export interface FileContentResponse {
|
|
7
|
+
content: string;
|
|
8
|
+
isDirectory: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Get content of a file or directory from a repository
|
|
12
|
+
*
|
|
13
|
+
* @param connection - Azure DevOps WebApi connection
|
|
14
|
+
* @param projectId - Project ID or name
|
|
15
|
+
* @param repositoryId - Repository ID or name
|
|
16
|
+
* @param path - Path to file or directory
|
|
17
|
+
* @param versionDescriptor - Optional version descriptor for retrieving file at specific commit/branch/tag
|
|
18
|
+
* @returns Content of the file or list of items if path is a directory
|
|
19
|
+
*/
|
|
20
|
+
export declare function getFileContent(connection: WebApi, projectId: string, repositoryId: string, path?: string, versionDescriptor?: {
|
|
21
|
+
versionType: GitVersionType;
|
|
22
|
+
version: string;
|
|
23
|
+
}): Promise<FileContentResponse>;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFileContent = getFileContent;
|
|
4
|
+
const GitInterfaces_1 = require("azure-devops-node-api/interfaces/GitInterfaces");
|
|
5
|
+
const errors_1 = require("../../../shared/errors");
|
|
6
|
+
/**
|
|
7
|
+
* Get content of a file or directory from a repository
|
|
8
|
+
*
|
|
9
|
+
* @param connection - Azure DevOps WebApi connection
|
|
10
|
+
* @param projectId - Project ID or name
|
|
11
|
+
* @param repositoryId - Repository ID or name
|
|
12
|
+
* @param path - Path to file or directory
|
|
13
|
+
* @param versionDescriptor - Optional version descriptor for retrieving file at specific commit/branch/tag
|
|
14
|
+
* @returns Content of the file or list of items if path is a directory
|
|
15
|
+
*/
|
|
16
|
+
async function getFileContent(connection, projectId, repositoryId, path = '/', versionDescriptor) {
|
|
17
|
+
try {
|
|
18
|
+
const gitApi = await connection.getGitApi();
|
|
19
|
+
// Create version descriptor for API requests
|
|
20
|
+
const gitVersionDescriptor = versionDescriptor
|
|
21
|
+
? {
|
|
22
|
+
version: versionDescriptor.version,
|
|
23
|
+
versionType: versionDescriptor.versionType,
|
|
24
|
+
versionOptions: undefined,
|
|
25
|
+
}
|
|
26
|
+
: undefined;
|
|
27
|
+
// First, try to get items using the path to determine if it's a directory
|
|
28
|
+
let isDirectory = false;
|
|
29
|
+
let items = [];
|
|
30
|
+
try {
|
|
31
|
+
items = await gitApi.getItems(repositoryId, projectId, path, GitInterfaces_1.VersionControlRecursionType.OneLevel, undefined, undefined, undefined, undefined, gitVersionDescriptor);
|
|
32
|
+
// If multiple items are returned or the path ends with /, it's a directory
|
|
33
|
+
isDirectory = items.length > 1 || (path !== '/' && path.endsWith('/'));
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
// If getItems fails, try to get file content directly
|
|
37
|
+
isDirectory = false;
|
|
38
|
+
}
|
|
39
|
+
if (isDirectory) {
|
|
40
|
+
// For directories, return a formatted list of the items
|
|
41
|
+
return {
|
|
42
|
+
content: JSON.stringify(items, null, 2),
|
|
43
|
+
isDirectory: true,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
// For files, get the actual content
|
|
48
|
+
try {
|
|
49
|
+
// Get file content using the Git API
|
|
50
|
+
const contentStream = await gitApi.getItemContent(repositoryId, path, projectId, undefined, undefined, undefined, undefined, false, gitVersionDescriptor, true);
|
|
51
|
+
// Convert the stream to a string
|
|
52
|
+
if (contentStream) {
|
|
53
|
+
const chunks = [];
|
|
54
|
+
// Listen for data events to collect chunks
|
|
55
|
+
contentStream.on('data', (chunk) => {
|
|
56
|
+
chunks.push(Buffer.from(chunk));
|
|
57
|
+
});
|
|
58
|
+
// Use a promise to wait for the stream to finish
|
|
59
|
+
const content = await new Promise((resolve, reject) => {
|
|
60
|
+
contentStream.on('end', () => {
|
|
61
|
+
// Concatenate all chunks and convert to string
|
|
62
|
+
const buffer = Buffer.concat(chunks);
|
|
63
|
+
resolve(buffer.toString('utf8'));
|
|
64
|
+
});
|
|
65
|
+
contentStream.on('error', (err) => {
|
|
66
|
+
reject(err);
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
return {
|
|
70
|
+
content,
|
|
71
|
+
isDirectory: false,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
throw new Error('No content returned from API');
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
// If it's a 404 or similar error, throw a ResourceNotFoundError
|
|
78
|
+
if (error instanceof Error &&
|
|
79
|
+
(error.message.includes('not found') ||
|
|
80
|
+
error.message.includes('does not exist'))) {
|
|
81
|
+
throw new errors_1.AzureDevOpsResourceNotFoundError(`Path '${path}' not found in repository '${repositoryId}' of project '${projectId}'`);
|
|
82
|
+
}
|
|
83
|
+
throw error;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
// If it's already an AzureDevOpsResourceNotFoundError, rethrow it
|
|
89
|
+
if (error instanceof errors_1.AzureDevOpsResourceNotFoundError) {
|
|
90
|
+
throw error;
|
|
91
|
+
}
|
|
92
|
+
// Otherwise, wrap it in a ResourceNotFoundError
|
|
93
|
+
throw new errors_1.AzureDevOpsResourceNotFoundError(`Failed to get content for path '${path}': ${error instanceof Error ? error.message : String(error)}`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.js","sourceRoot":"","sources":["../../../../src/features/repositories/get-file-content/feature.ts"],"names":[],"mappings":";;AA2BA,wCAyHC;AAnJD,kFAKwD;AACxD,mDAA0E;AAU1E;;;;;;;;;GASG;AACI,KAAK,UAAU,cAAc,CAClC,UAAkB,EAClB,SAAiB,EACjB,YAAo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