mcp-server-azure-devops 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +265 -0
- package/dist/clients/azure-devops.d.ts +105 -0
- package/dist/clients/azure-devops.js +492 -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 +37 -0
- package/dist/clients/azure-devops.spec.unit.js.map +1 -0
- package/dist/extension.d.ts +3 -0
- package/dist/extension.js +93 -0
- package/dist/extension.js.map +1 -0
- package/dist/features/organizations/__test__/test-helpers.d.ts +13 -0
- package/dist/features/organizations/__test__/test-helpers.js +34 -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 +44 -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 +71 -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 +95 -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 +32 -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 +110 -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 +3 -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 +3 -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 +7 -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 +13 -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 +5 -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 +280 -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 +98 -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 +216 -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 +63 -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 +3 -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 +20 -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 +43 -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 +52 -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 +87 -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 +3 -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 +26 -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 +54 -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 +79 -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 +3 -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 +37 -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 +73 -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 +154 -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 +3 -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 +16 -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 +25 -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 +137 -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 +221 -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 +95 -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 +146 -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 +3 -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 +47 -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 +39 -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 +34 -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 +89 -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 +3 -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 +20 -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 +92 -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 +98 -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 +3 -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 +48 -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 +63 -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 +62 -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 +83 -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 +110 -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 +3 -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 +42 -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 +2 -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 +31 -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 +26 -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 +37 -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 +39 -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 +3 -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 +3 -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 +182 -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 +118 -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 +377 -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 +3 -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 +3 -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 +61 -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 +129 -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 +22 -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 +52 -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 +3 -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 +3 -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 +73 -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 +23 -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 +2 -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 +127 -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 +184 -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 +257 -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 +2 -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 +96 -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 +109 -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 +110 -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 +3 -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 +3 -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 +19 -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 +107 -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 +35 -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 +3 -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 +2 -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 +57 -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 +75 -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 +2 -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 +256 -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 +136 -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 +2 -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 +85 -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 +214 -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 +338 -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 +2 -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 +138 -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 +259 -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 +78 -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 +122 -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 +178 -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 +3 -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 +2 -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 +280 -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 +52 -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 +2 -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 +246 -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 +160 -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 +278 -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 +2 -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 +48 -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 +3 -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 +21 -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 +35 -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 +3 -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 +17 -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 +31 -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 +3 -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 +10 -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 +31 -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 +3 -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 +10 -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 +102 -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 +28 -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 +3 -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 +21 -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 +28 -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 +3 -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 +27 -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 +46 -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 +2 -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 +31 -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 +30 -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 +34 -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 +2 -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 +119 -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 +155 -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 +2 -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 +299 -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 +87 -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 +389 -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 +3 -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 +4 -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 +93 -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 +84 -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 +126 -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 +3 -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 +4 -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 +27 -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 +42 -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 +39 -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 +3 -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 +3 -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 +64 -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 +117 -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 +253 -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 +3 -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 +3 -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 +62 -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 +67 -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 +2 -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 +160 -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 +289 -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 +72 -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 +56 -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 +2 -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 +22 -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 +54 -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 +57 -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 +3 -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 +3 -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 +303 -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 +91 -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 +2 -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 +46 -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 +141 -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 +156 -0
- package/dist/features/search/schemas.js.map +1 -0
- package/dist/features/search/schemas.spec.unit.d.ts +0 -0
- package/dist/features/search/schemas.spec.unit.js +38 -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 +171 -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 +190 -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 +963 -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 +3 -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 +126 -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 +65 -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 +171 -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 +2 -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 +112 -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 +148 -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 +337 -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 +2 -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 +23 -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 +2 -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 +90 -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 +31 -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 +159 -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 +3 -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 +3 -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 +33 -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 +69 -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 +6 -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 +13 -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 +2 -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 +53 -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 +42 -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 +166 -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 +3 -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 +57 -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 +58 -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 +272 -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 +139 -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 +3 -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 +33 -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 +32 -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 +56 -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 +86 -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 +3 -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 +20 -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 +34 -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 +32 -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 +81 -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 +3 -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 +18 -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 +109 -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 +212 -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 +43 -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 +228 -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 +392 -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 +3 -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 +19 -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 +43 -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 +27 -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 +37 -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 +3 -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 +29 -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 +23 -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 +31 -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 +35 -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 +96 -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 +103 -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 +44 -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 +3 -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 +3 -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 +66 -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 +136 -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 +29 -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 +3 -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 +3 -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 +103 -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 +197 -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 +86 -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 +101 -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 +93 -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 +3 -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 +3 -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 +73 -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 +73 -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 +135 -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 +3 -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 +3 -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 +131 -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 +33 -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 +2 -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 +100 -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 +82 -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 +36 -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 +3 -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 +3 -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 +127931 -0
- package/dist/index.js.map +1 -0
- package/dist/index.spec.unit.d.ts +1 -0
- package/dist/index.spec.unit.js +81 -0
- package/dist/index.spec.unit.js.map +1 -0
- package/dist/server.d.ts +21 -0
- package/dist/server.js +378 -0
- package/dist/server.js.map +1 -0
- package/dist/server.spec.e2e.d.ts +1 -0
- package/dist/server.spec.e2e.js +224 -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 +144 -0
- package/dist/setup-env.spec.unit.js.map +1 -0
- package/dist/setup.d.ts +6 -0
- package/dist/setup.js +124 -0
- package/dist/setup.js.map +1 -0
- package/dist/shared/api/client.d.ts +91 -0
- package/dist/shared/api/client.js +238 -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 +2 -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 +136 -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 +36 -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 +268 -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 +12 -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 +116 -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 +101 -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 +2 -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 +5 -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 +81 -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 +73 -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 +150 -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 +91 -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 +2 -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 +52 -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 +2 -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 +2 -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 +2 -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 +2 -0
- package/dist/shared/types/tool-definition.js.map +1 -0
- package/dist/shared/utils/serialize.d.ts +7 -0
- package/dist/shared/utils/serialize.js +21 -0
- package/dist/shared/utils/serialize.js.map +1 -0
- package/dist/utils/environment.d.ts +15 -0
- package/dist/utils/environment.js +45 -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 +62 -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 +129 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { AzureDevOpsError, AzureDevOpsResourceNotFoundError, AzureDevOpsValidationError, AzureDevOpsPermissionError, } from '../../../shared/errors';
|
|
2
|
+
import { createWiki } from './feature';
|
|
3
|
+
import { WikiType } from './schema';
|
|
4
|
+
import { getWikiClient } from '../../../clients/azure-devops';
|
|
5
|
+
// Mock the WikiClient
|
|
6
|
+
jest.mock('../../../clients/azure-devops');
|
|
7
|
+
describe('createWiki unit', () => {
|
|
8
|
+
// Mock WikiClient
|
|
9
|
+
const mockWikiClient = {
|
|
10
|
+
createWiki: jest.fn(),
|
|
11
|
+
};
|
|
12
|
+
// Mock WebApi connection (kept for backward compatibility)
|
|
13
|
+
const mockConnection = {};
|
|
14
|
+
beforeEach(() => {
|
|
15
|
+
// Clear mock calls between tests
|
|
16
|
+
jest.clearAllMocks();
|
|
17
|
+
// Setup mock response for getWikiClient
|
|
18
|
+
getWikiClient.mockResolvedValue(mockWikiClient);
|
|
19
|
+
});
|
|
20
|
+
test('should create a project wiki', async () => {
|
|
21
|
+
// Mock data
|
|
22
|
+
const mockWiki = {
|
|
23
|
+
id: 'wiki1',
|
|
24
|
+
name: 'Project Wiki',
|
|
25
|
+
projectId: 'project1',
|
|
26
|
+
remoteUrl: 'https://example.com/wiki1',
|
|
27
|
+
url: 'https://dev.azure.com/org/project/_wiki/wikis/wiki1',
|
|
28
|
+
type: 'projectWiki',
|
|
29
|
+
repositoryId: 'repo1',
|
|
30
|
+
mappedPath: '/',
|
|
31
|
+
};
|
|
32
|
+
// Setup mock response
|
|
33
|
+
mockWikiClient.createWiki.mockResolvedValue(mockWiki);
|
|
34
|
+
// Call the function
|
|
35
|
+
const result = await createWiki(mockConnection, {
|
|
36
|
+
name: 'Project Wiki',
|
|
37
|
+
projectId: 'project1',
|
|
38
|
+
});
|
|
39
|
+
// Assertions
|
|
40
|
+
expect(getWikiClient).toHaveBeenCalledWith({
|
|
41
|
+
organizationId: undefined,
|
|
42
|
+
projectId: 'project1',
|
|
43
|
+
});
|
|
44
|
+
expect(mockWikiClient.createWiki).toHaveBeenCalledWith('project1', {
|
|
45
|
+
name: 'Project Wiki',
|
|
46
|
+
projectId: 'project1',
|
|
47
|
+
type: WikiType.ProjectWiki,
|
|
48
|
+
});
|
|
49
|
+
expect(result).toEqual(mockWiki);
|
|
50
|
+
});
|
|
51
|
+
test('should create a code wiki', async () => {
|
|
52
|
+
// Mock data
|
|
53
|
+
const mockWiki = {
|
|
54
|
+
id: 'wiki2',
|
|
55
|
+
name: 'Code Wiki',
|
|
56
|
+
projectId: 'project1',
|
|
57
|
+
repositoryId: 'repo1',
|
|
58
|
+
mappedPath: '/docs',
|
|
59
|
+
remoteUrl: 'https://example.com/wiki2',
|
|
60
|
+
url: 'https://dev.azure.com/org/project/_wiki/wikis/wiki2',
|
|
61
|
+
type: 'codeWiki',
|
|
62
|
+
};
|
|
63
|
+
// Setup mock response
|
|
64
|
+
mockWikiClient.createWiki.mockResolvedValue(mockWiki);
|
|
65
|
+
// Call the function
|
|
66
|
+
const result = await createWiki(mockConnection, {
|
|
67
|
+
name: 'Code Wiki',
|
|
68
|
+
projectId: 'project1',
|
|
69
|
+
type: WikiType.CodeWiki,
|
|
70
|
+
repositoryId: 'repo1',
|
|
71
|
+
mappedPath: '/docs',
|
|
72
|
+
});
|
|
73
|
+
// Assertions
|
|
74
|
+
expect(getWikiClient).toHaveBeenCalledWith({
|
|
75
|
+
organizationId: undefined,
|
|
76
|
+
projectId: 'project1',
|
|
77
|
+
});
|
|
78
|
+
expect(mockWikiClient.createWiki).toHaveBeenCalledWith('project1', {
|
|
79
|
+
name: 'Code Wiki',
|
|
80
|
+
projectId: 'project1',
|
|
81
|
+
type: WikiType.CodeWiki,
|
|
82
|
+
repositoryId: 'repo1',
|
|
83
|
+
mappedPath: '/docs',
|
|
84
|
+
version: {
|
|
85
|
+
version: 'main',
|
|
86
|
+
versionType: 'branch',
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
expect(result).toEqual(mockWiki);
|
|
90
|
+
});
|
|
91
|
+
test('should throw validation error when repository ID is missing for code wiki', async () => {
|
|
92
|
+
// Call the function and expect it to throw
|
|
93
|
+
await expect(createWiki(mockConnection, {
|
|
94
|
+
name: 'Code Wiki',
|
|
95
|
+
projectId: 'project1',
|
|
96
|
+
type: WikiType.CodeWiki,
|
|
97
|
+
// repositoryId is missing
|
|
98
|
+
})).rejects.toThrow(AzureDevOpsValidationError);
|
|
99
|
+
// Assertions
|
|
100
|
+
expect(getWikiClient).not.toHaveBeenCalled();
|
|
101
|
+
expect(mockWikiClient.createWiki).not.toHaveBeenCalled();
|
|
102
|
+
});
|
|
103
|
+
test('should handle project not found error', async () => {
|
|
104
|
+
// Setup mock to throw an error
|
|
105
|
+
mockWikiClient.createWiki.mockRejectedValue(new AzureDevOpsResourceNotFoundError('Project not found'));
|
|
106
|
+
// Call the function and expect it to throw
|
|
107
|
+
await expect(createWiki(mockConnection, {
|
|
108
|
+
name: 'Project Wiki',
|
|
109
|
+
projectId: 'nonExistentProject',
|
|
110
|
+
})).rejects.toThrow(AzureDevOpsResourceNotFoundError);
|
|
111
|
+
// Assertions
|
|
112
|
+
expect(getWikiClient).toHaveBeenCalledWith({
|
|
113
|
+
organizationId: undefined,
|
|
114
|
+
projectId: 'nonExistentProject',
|
|
115
|
+
});
|
|
116
|
+
expect(mockWikiClient.createWiki).toHaveBeenCalled();
|
|
117
|
+
});
|
|
118
|
+
test('should handle repository not found error', async () => {
|
|
119
|
+
// Setup mock to throw an error
|
|
120
|
+
mockWikiClient.createWiki.mockRejectedValue(new AzureDevOpsResourceNotFoundError('Repository not found'));
|
|
121
|
+
// Call the function and expect it to throw
|
|
122
|
+
await expect(createWiki(mockConnection, {
|
|
123
|
+
name: 'Code Wiki',
|
|
124
|
+
projectId: 'project1',
|
|
125
|
+
type: WikiType.CodeWiki,
|
|
126
|
+
repositoryId: 'nonExistentRepo',
|
|
127
|
+
})).rejects.toThrow(AzureDevOpsResourceNotFoundError);
|
|
128
|
+
// Assertions
|
|
129
|
+
expect(getWikiClient).toHaveBeenCalledWith({
|
|
130
|
+
organizationId: undefined,
|
|
131
|
+
projectId: 'project1',
|
|
132
|
+
});
|
|
133
|
+
expect(mockWikiClient.createWiki).toHaveBeenCalled();
|
|
134
|
+
});
|
|
135
|
+
test('should handle permission error', async () => {
|
|
136
|
+
// Setup mock to throw an error
|
|
137
|
+
mockWikiClient.createWiki.mockRejectedValue(new AzureDevOpsPermissionError('You do not have permission'));
|
|
138
|
+
// Call the function and expect it to throw
|
|
139
|
+
await expect(createWiki(mockConnection, {
|
|
140
|
+
name: 'Project Wiki',
|
|
141
|
+
projectId: 'project1',
|
|
142
|
+
})).rejects.toThrow(AzureDevOpsPermissionError);
|
|
143
|
+
// Assertions
|
|
144
|
+
expect(getWikiClient).toHaveBeenCalledWith({
|
|
145
|
+
organizationId: undefined,
|
|
146
|
+
projectId: 'project1',
|
|
147
|
+
});
|
|
148
|
+
expect(mockWikiClient.createWiki).toHaveBeenCalled();
|
|
149
|
+
});
|
|
150
|
+
test('should handle generic errors', async () => {
|
|
151
|
+
// Setup mock to throw an error
|
|
152
|
+
mockWikiClient.createWiki.mockRejectedValue(new Error('Unknown error'));
|
|
153
|
+
// Call the function and expect it to throw
|
|
154
|
+
await expect(createWiki(mockConnection, {
|
|
155
|
+
name: 'Project Wiki',
|
|
156
|
+
projectId: 'project1',
|
|
157
|
+
})).rejects.toThrow(AzureDevOpsError);
|
|
158
|
+
// Assertions
|
|
159
|
+
expect(getWikiClient).toHaveBeenCalledWith({
|
|
160
|
+
organizationId: undefined,
|
|
161
|
+
projectId: 'project1',
|
|
162
|
+
});
|
|
163
|
+
expect(mockWikiClient.createWiki).toHaveBeenCalled();
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
//# sourceMappingURL=feature.spec.unit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.spec.unit.js","sourceRoot":"","sources":["../../../../src/features/wikis/create-wiki/feature.spec.unit.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,gCAAgC,EAChC,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,sBAAsB;AACtB,IAAI,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;AAE3C,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,kBAAkB;IAClB,MAAM,cAAc,GAAG;QACrB,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE;KACtB,CAAC;IAEF,2DAA2D;IAC3D,MAAM,cAAc,GAAG,EAAY,CAAC;IAEpC,UAAU,CAAC,GAAG,EAAE;QACd,iCAAiC;QACjC,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,wCAAwC;QACvC,aAA2B,CAAC,iBAAiB,CAAC,cAAc,C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/wikis/create-wiki/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Wiki types for creating wiki
|
|
4
|
+
*/
|
|
5
|
+
export declare enum WikiType {
|
|
6
|
+
/**
|
|
7
|
+
* The wiki is published from a git repository
|
|
8
|
+
*/
|
|
9
|
+
CodeWiki = "codeWiki",
|
|
10
|
+
/**
|
|
11
|
+
* The wiki is provisioned for the team project
|
|
12
|
+
*/
|
|
13
|
+
ProjectWiki = "projectWiki"
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Schema for creating a wiki in an Azure DevOps project
|
|
17
|
+
*/
|
|
18
|
+
export declare const CreateWikiSchema: z.ZodEffects<z.ZodObject<{
|
|
19
|
+
organizationId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
20
|
+
projectId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof WikiType>>>;
|
|
23
|
+
repositoryId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
24
|
+
mappedPath: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
name: string;
|
|
27
|
+
type: WikiType;
|
|
28
|
+
mappedPath: string | null;
|
|
29
|
+
projectId?: string | null | undefined;
|
|
30
|
+
organizationId?: string | null | undefined;
|
|
31
|
+
repositoryId?: string | null | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
name: string;
|
|
34
|
+
type?: WikiType | undefined;
|
|
35
|
+
projectId?: string | null | undefined;
|
|
36
|
+
organizationId?: string | null | undefined;
|
|
37
|
+
repositoryId?: string | null | undefined;
|
|
38
|
+
mappedPath?: string | null | undefined;
|
|
39
|
+
}>, {
|
|
40
|
+
name: string;
|
|
41
|
+
type: WikiType;
|
|
42
|
+
mappedPath: string | null;
|
|
43
|
+
projectId?: string | null | undefined;
|
|
44
|
+
organizationId?: string | null | undefined;
|
|
45
|
+
repositoryId?: string | null | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
name: string;
|
|
48
|
+
type?: WikiType | undefined;
|
|
49
|
+
projectId?: string | null | undefined;
|
|
50
|
+
organizationId?: string | null | undefined;
|
|
51
|
+
repositoryId?: string | null | undefined;
|
|
52
|
+
mappedPath?: string | null | undefined;
|
|
53
|
+
}>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defaultProject, defaultOrg } from '../../../utils/environment';
|
|
3
|
+
/**
|
|
4
|
+
* Wiki types for creating wiki
|
|
5
|
+
*/
|
|
6
|
+
export var WikiType;
|
|
7
|
+
(function (WikiType) {
|
|
8
|
+
/**
|
|
9
|
+
* The wiki is published from a git repository
|
|
10
|
+
*/
|
|
11
|
+
WikiType["CodeWiki"] = "codeWiki";
|
|
12
|
+
/**
|
|
13
|
+
* The wiki is provisioned for the team project
|
|
14
|
+
*/
|
|
15
|
+
WikiType["ProjectWiki"] = "projectWiki";
|
|
16
|
+
})(WikiType || (WikiType = {}));
|
|
17
|
+
/**
|
|
18
|
+
* Schema for creating a wiki in an Azure DevOps project
|
|
19
|
+
*/
|
|
20
|
+
export const CreateWikiSchema = z
|
|
21
|
+
.object({
|
|
22
|
+
organizationId: z
|
|
23
|
+
.string()
|
|
24
|
+
.optional()
|
|
25
|
+
.nullable()
|
|
26
|
+
.describe(`The ID or name of the organization (Default: ${defaultOrg})`),
|
|
27
|
+
projectId: z
|
|
28
|
+
.string()
|
|
29
|
+
.optional()
|
|
30
|
+
.nullable()
|
|
31
|
+
.describe(`The ID or name of the project (Default: ${defaultProject})`),
|
|
32
|
+
name: z.string().describe('The name of the new wiki'),
|
|
33
|
+
type: z
|
|
34
|
+
.nativeEnum(WikiType)
|
|
35
|
+
.optional()
|
|
36
|
+
.default(WikiType.ProjectWiki)
|
|
37
|
+
.describe('Type of wiki to create (projectWiki or codeWiki)'),
|
|
38
|
+
repositoryId: z
|
|
39
|
+
.string()
|
|
40
|
+
.optional()
|
|
41
|
+
.nullable()
|
|
42
|
+
.describe('The ID of the repository to associate with the wiki (required for codeWiki)'),
|
|
43
|
+
mappedPath: z
|
|
44
|
+
.string()
|
|
45
|
+
.optional()
|
|
46
|
+
.nullable()
|
|
47
|
+
.default('/')
|
|
48
|
+
.describe('Folder path inside repository which is shown as Wiki (only for codeWiki)'),
|
|
49
|
+
})
|
|
50
|
+
.refine((data) => {
|
|
51
|
+
// If type is codeWiki, then repositoryId is required
|
|
52
|
+
return data.type !== WikiType.CodeWiki || !!data.repositoryId;
|
|
53
|
+
}, {
|
|
54
|
+
message: 'repositoryId is required when type is codeWiki',
|
|
55
|
+
path: ['repositoryId'],
|
|
56
|
+
});
|
|
57
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/features/wikis/create-wiki/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExE;;GAEG;AACH,MAAM,CAAN,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB;;OAEG;IACH,iCAAqB,CAAA;IAErB;;OAEG;IACH,uCAA2B,CAAA;AAC7B,CAAC,EAVW,QAAQ,KAAR,QAAQ,QAUnB;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC;KAC9B,MAAM,CAAC;IACN,cAAc,EAAE,CAAC;SACd,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,EAAE;SACV,QAAQ,CAAC,gDAAgD,UAAU,GAAG,CAAC;IAC1E,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,EAAE;SACV,QAAQ,CAAC,2CAA2C,cAAc,GAAG,CAAC;IACzE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;IACrD,IAAI,EAAE,CAAC;SACJ,UAAU,CAAC,QAAQ,CAAC;SACpB,QAAQ,EAAE;SACV,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC;SAC7B,QAAQ,CAAC,kDAAkD,CAAC;IAC/D,YAAY,EAAE,CAAC;SACZ,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,EAAE;SACV,QAAQ,CACP,6EAA6E,CAC9E;IACH,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,EAAE;SACV,OAAO,CAAC,GAAG,CAAC;SACZ,QAAQ,CACP,0EAA0E,CAC3E;CACJ,CAAC;KACD,MAAM,CACL,CAAC,IAAI,EAAE,EAAE;IACP,qDAAqD;IACrD,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,QAAQ,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC;AAChE,CAAC,EACD;IACE,OAAO,EAAE,gDAAgD;IACzD,IAAI,EAAE,CAAC,cAAc,CAAC;CACvB,CACF,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { CreateWikiPageSchema } from './schema';
|
|
3
|
+
/**
|
|
4
|
+
* Creates a new wiki page in Azure DevOps.
|
|
5
|
+
* If a page already exists at the specified path, it will be updated.
|
|
6
|
+
*
|
|
7
|
+
* @param {z.infer<typeof CreateWikiPageSchema>} params - The parameters for creating the wiki page.
|
|
8
|
+
* @returns {Promise<any>} A promise that resolves with the API response.
|
|
9
|
+
*/
|
|
10
|
+
export declare const createWikiPage: (params: z.infer<typeof CreateWikiPageSchema>, client?: {
|
|
11
|
+
defaults?: {
|
|
12
|
+
organizationId?: string;
|
|
13
|
+
projectId?: string;
|
|
14
|
+
};
|
|
15
|
+
put: (url: string, data: Record<string, unknown>) => Promise<{
|
|
16
|
+
data: unknown;
|
|
17
|
+
}>;
|
|
18
|
+
}) => Promise<any>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as azureDevOpsClient from '../../../clients/azure-devops';
|
|
2
|
+
import { handleRequestError } from '../../../shared/errors/handle-request-error';
|
|
3
|
+
import { defaultOrg, defaultProject } from '../../../utils/environment';
|
|
4
|
+
/**
|
|
5
|
+
* Creates a new wiki page in Azure DevOps.
|
|
6
|
+
* If a page already exists at the specified path, it will be updated.
|
|
7
|
+
*
|
|
8
|
+
* @param {z.infer<typeof CreateWikiPageSchema>} params - The parameters for creating the wiki page.
|
|
9
|
+
* @returns {Promise<any>} A promise that resolves with the API response.
|
|
10
|
+
*/
|
|
11
|
+
export const createWikiPage = async (params, client) => {
|
|
12
|
+
try {
|
|
13
|
+
const { organizationId, projectId, wikiId, pagePath, content, comment } = params;
|
|
14
|
+
// For testing mode, use the client's defaults
|
|
15
|
+
if (client && client.defaults) {
|
|
16
|
+
const org = organizationId ?? client.defaults.organizationId;
|
|
17
|
+
const project = projectId ?? client.defaults.projectId;
|
|
18
|
+
if (!org) {
|
|
19
|
+
throw new Error('Organization ID is not defined. Please provide it or set a default.');
|
|
20
|
+
}
|
|
21
|
+
// This branch is for testing only
|
|
22
|
+
const apiUrl = `${org}/${project ? `${project}/` : ''}_apis/wiki/wikis/${wikiId}/pages?path=${encodeURIComponent(pagePath ?? '/')}&api-version=7.1-preview.1`;
|
|
23
|
+
// Prepare the request body
|
|
24
|
+
const requestBody = { content };
|
|
25
|
+
if (comment) {
|
|
26
|
+
requestBody.comment = comment;
|
|
27
|
+
}
|
|
28
|
+
// Make the API request
|
|
29
|
+
const response = await client.put(apiUrl, requestBody);
|
|
30
|
+
return response.data;
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
// Use default organization and project if not provided
|
|
34
|
+
const org = organizationId ?? defaultOrg;
|
|
35
|
+
const project = projectId ?? defaultProject;
|
|
36
|
+
if (!org) {
|
|
37
|
+
throw new Error('Organization ID is not defined. Please provide it or set a default.');
|
|
38
|
+
}
|
|
39
|
+
// Create the client
|
|
40
|
+
const wikiClient = await azureDevOpsClient.getWikiClient({
|
|
41
|
+
organizationId: org,
|
|
42
|
+
projectId: project,
|
|
43
|
+
});
|
|
44
|
+
// Prepare the wiki page content
|
|
45
|
+
const wikiPageContent = {
|
|
46
|
+
content,
|
|
47
|
+
};
|
|
48
|
+
// This is the real implementation
|
|
49
|
+
return await wikiClient.updatePage(wikiPageContent, project, wikiId, pagePath ?? '/', {
|
|
50
|
+
comment: comment ?? undefined,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
throw await handleRequestError(error, 'Failed to create or update wiki page');
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.js","sourceRoot":"","sources":["../../../../src/features/wikis/create-wiki-page/feature.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,iBAAiB,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AAEjF,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAExE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EACjC,MAA4C,EAC5C,MAMC,EACD,EAAE;IACF,IAAI,CAAC;QACH,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,GACrE,MAAM,CAAC;QAET,8CAA8C;QAC9C,IAAI,MAAM,IAA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UAAU,CAAC,UAAU,CAChC,eAAe,EACf,OAAO,EACP,MAAM,EACN,QAAQ,IAAI,GAAG,EACf;gBACE,OAAO,EAAE,OAAO,IAAI,SAAS;aAC9B,CACF,CAAC;QACJ,CAAC;IACH,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,MAAM,MAAM,kBAAkB,CAC5B,KAAK,EACL,sCAAsC,CACvC,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { createWikiPage } from './feature';
|
|
2
|
+
import { getWikiPage } from '../get-wiki-page/feature';
|
|
3
|
+
import { getWikis } from '../get-wikis/feature';
|
|
4
|
+
import { getTestConnection, shouldSkipIntegrationTest, } from '@/shared/test/test-helpers';
|
|
5
|
+
import { getOrgNameFromUrl } from '@/utils/environment';
|
|
6
|
+
import { AzureDevOpsError } from '@/shared/errors/azure-devops-errors';
|
|
7
|
+
// Ensure environment variables are set for testing
|
|
8
|
+
process.env.AZURE_DEVOPS_DEFAULT_PROJECT =
|
|
9
|
+
process.env.AZURE_DEVOPS_DEFAULT_PROJECT || 'default-project';
|
|
10
|
+
const shouldSkip = shouldSkipIntegrationTest();
|
|
11
|
+
const describeOrSkip = shouldSkip ? describe.skip : describe;
|
|
12
|
+
describeOrSkip('createWikiPage Integration Tests', () => {
|
|
13
|
+
let connection;
|
|
14
|
+
let projectName;
|
|
15
|
+
let orgUrl;
|
|
16
|
+
let organizationId;
|
|
17
|
+
const testPagePath = '/IntegrationTestPage';
|
|
18
|
+
const testPagePathSub = '/IntegrationTestPage/SubPage';
|
|
19
|
+
const testPagePathDefault = '/DefaultPathPage';
|
|
20
|
+
const testPagePathComment = '/CommentTestPage';
|
|
21
|
+
beforeAll(async () => {
|
|
22
|
+
// Mock the required environment variable for testing
|
|
23
|
+
process.env.AZURE_DEVOPS_ORG_URL =
|
|
24
|
+
process.env.AZURE_DEVOPS_ORG_URL || 'https://example.visualstudio.com';
|
|
25
|
+
// Get and validate required environment variables
|
|
26
|
+
const envProjectName = process.env.AZURE_DEVOPS_DEFAULT_PROJECT;
|
|
27
|
+
if (!envProjectName) {
|
|
28
|
+
throw new Error('AZURE_DEVOPS_DEFAULT_PROJECT environment variable is required');
|
|
29
|
+
}
|
|
30
|
+
projectName = envProjectName;
|
|
31
|
+
const envOrgUrl = process.env.AZURE_DEVOPS_ORG_URL;
|
|
32
|
+
if (!envOrgUrl) {
|
|
33
|
+
throw new Error('AZURE_DEVOPS_ORG_URL environment variable is required');
|
|
34
|
+
}
|
|
35
|
+
orgUrl = envOrgUrl;
|
|
36
|
+
organizationId = getOrgNameFromUrl(orgUrl);
|
|
37
|
+
// Get a real connection using environment variables
|
|
38
|
+
const testConnection = await getTestConnection();
|
|
39
|
+
if (!testConnection) {
|
|
40
|
+
throw new Error('Connection should be available when integration tests are enabled');
|
|
41
|
+
}
|
|
42
|
+
connection = testConnection;
|
|
43
|
+
});
|
|
44
|
+
// Helper function to get a valid wiki ID
|
|
45
|
+
async function getValidWikiId() {
|
|
46
|
+
const wikis = await getWikis(connection, { projectId: projectName });
|
|
47
|
+
if (wikis.length === 0) {
|
|
48
|
+
throw new Error('No wikis available in the project');
|
|
49
|
+
}
|
|
50
|
+
const wiki = wikis[0];
|
|
51
|
+
if (!wiki.name) {
|
|
52
|
+
throw new Error('Wiki name is undefined');
|
|
53
|
+
}
|
|
54
|
+
return wiki.name;
|
|
55
|
+
}
|
|
56
|
+
test('should create a new wiki page at the root', async () => {
|
|
57
|
+
// Get a valid wiki ID
|
|
58
|
+
const wikiId = await getValidWikiId();
|
|
59
|
+
const params = {
|
|
60
|
+
organizationId,
|
|
61
|
+
projectId: projectName,
|
|
62
|
+
wikiId,
|
|
63
|
+
pagePath: testPagePath,
|
|
64
|
+
content: 'This is content for the integration test page (root).',
|
|
65
|
+
};
|
|
66
|
+
try {
|
|
67
|
+
// Create the wiki page
|
|
68
|
+
const createdPage = await createWikiPage(params);
|
|
69
|
+
// Verify the result
|
|
70
|
+
expect(createdPage).toBeDefined();
|
|
71
|
+
expect(createdPage.path).toBe(testPagePath);
|
|
72
|
+
expect(createdPage.content).toBe(params.content);
|
|
73
|
+
// Verify by fetching the page
|
|
74
|
+
const fetchedPage = await getWikiPage({
|
|
75
|
+
organizationId,
|
|
76
|
+
projectId: projectName,
|
|
77
|
+
wikiId,
|
|
78
|
+
pagePath: testPagePath,
|
|
79
|
+
});
|
|
80
|
+
expect(fetchedPage).toBeDefined();
|
|
81
|
+
expect(typeof fetchedPage).toBe('string');
|
|
82
|
+
expect(fetchedPage).toContain(params.content);
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
console.error('Error in test:', error);
|
|
86
|
+
throw error;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
test('should create a new wiki sub-page', async () => {
|
|
90
|
+
// Get a valid wiki ID
|
|
91
|
+
const wikiId = await getValidWikiId();
|
|
92
|
+
// First, ensure the parent page exists
|
|
93
|
+
const parentParams = {
|
|
94
|
+
organizationId,
|
|
95
|
+
projectId: projectName,
|
|
96
|
+
wikiId,
|
|
97
|
+
pagePath: testPagePath,
|
|
98
|
+
content: 'This is the parent page for the sub-page test.',
|
|
99
|
+
};
|
|
100
|
+
try {
|
|
101
|
+
// Create the parent page
|
|
102
|
+
await createWikiPage(parentParams);
|
|
103
|
+
// Now create the sub-page
|
|
104
|
+
const subPageParams = {
|
|
105
|
+
organizationId,
|
|
106
|
+
projectId: projectName,
|
|
107
|
+
wikiId,
|
|
108
|
+
pagePath: testPagePathSub,
|
|
109
|
+
content: 'This is content for the integration test sub-page.',
|
|
110
|
+
};
|
|
111
|
+
const createdSubPage = await createWikiPage(subPageParams);
|
|
112
|
+
// Verify the result
|
|
113
|
+
expect(createdSubPage).toBeDefined();
|
|
114
|
+
expect(createdSubPage.path).toBe(testPagePathSub);
|
|
115
|
+
expect(createdSubPage.content).toBe(subPageParams.content);
|
|
116
|
+
// Verify by fetching the sub-page
|
|
117
|
+
const fetchedSubPage = await getWikiPage({
|
|
118
|
+
organizationId,
|
|
119
|
+
projectId: projectName,
|
|
120
|
+
wikiId,
|
|
121
|
+
pagePath: testPagePathSub,
|
|
122
|
+
});
|
|
123
|
+
expect(fetchedSubPage).toBeDefined();
|
|
124
|
+
expect(typeof fetchedSubPage).toBe('string');
|
|
125
|
+
expect(fetchedSubPage).toContain(subPageParams.content);
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
console.error('Error in test:', error);
|
|
129
|
+
throw error;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
test('should update an existing wiki page if path already exists', async () => {
|
|
133
|
+
// Get a valid wiki ID
|
|
134
|
+
const wikiId = await getValidWikiId();
|
|
135
|
+
try {
|
|
136
|
+
// First create a page with initial content
|
|
137
|
+
const initialParams = {
|
|
138
|
+
organizationId,
|
|
139
|
+
projectId: projectName,
|
|
140
|
+
wikiId,
|
|
141
|
+
pagePath: testPagePath,
|
|
142
|
+
content: 'Initial content.',
|
|
143
|
+
};
|
|
144
|
+
await createWikiPage(initialParams);
|
|
145
|
+
// Now update the page with new content
|
|
146
|
+
const updatedParams = {
|
|
147
|
+
...initialParams,
|
|
148
|
+
content: 'Updated content for the page.',
|
|
149
|
+
};
|
|
150
|
+
const updatedPage = await createWikiPage(updatedParams);
|
|
151
|
+
// Verify the result
|
|
152
|
+
expect(updatedPage).toBeDefined();
|
|
153
|
+
expect(updatedPage.path).toBe(testPagePath);
|
|
154
|
+
expect(updatedPage.content).toBe(updatedParams.content);
|
|
155
|
+
// Verify by fetching the page
|
|
156
|
+
const fetchedPage = await getWikiPage({
|
|
157
|
+
organizationId,
|
|
158
|
+
projectId: projectName,
|
|
159
|
+
wikiId,
|
|
160
|
+
pagePath: testPagePath,
|
|
161
|
+
});
|
|
162
|
+
expect(fetchedPage).toBeDefined();
|
|
163
|
+
expect(typeof fetchedPage).toBe('string');
|
|
164
|
+
expect(fetchedPage).toContain(updatedParams.content);
|
|
165
|
+
}
|
|
166
|
+
catch (error) {
|
|
167
|
+
console.error('Error in test:', error);
|
|
168
|
+
throw error;
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
test('should create a page with a default path if specified', async () => {
|
|
172
|
+
// Get a valid wiki ID
|
|
173
|
+
const wikiId = await getValidWikiId();
|
|
174
|
+
try {
|
|
175
|
+
const params = {
|
|
176
|
+
organizationId,
|
|
177
|
+
projectId: projectName,
|
|
178
|
+
wikiId,
|
|
179
|
+
pagePath: testPagePathDefault,
|
|
180
|
+
content: 'Content for page created with default path.',
|
|
181
|
+
};
|
|
182
|
+
const createdPage = await createWikiPage(params);
|
|
183
|
+
// Verify the result
|
|
184
|
+
expect(createdPage).toBeDefined();
|
|
185
|
+
expect(createdPage.path).toBe(testPagePathDefault);
|
|
186
|
+
expect(createdPage.content).toBe(params.content);
|
|
187
|
+
// Verify by fetching the page
|
|
188
|
+
const fetchedPage = await getWikiPage({
|
|
189
|
+
organizationId,
|
|
190
|
+
projectId: projectName,
|
|
191
|
+
wikiId,
|
|
192
|
+
pagePath: testPagePathDefault,
|
|
193
|
+
});
|
|
194
|
+
expect(fetchedPage).toBeDefined();
|
|
195
|
+
expect(typeof fetchedPage).toBe('string');
|
|
196
|
+
expect(fetchedPage).toContain(params.content);
|
|
197
|
+
}
|
|
198
|
+
catch (error) {
|
|
199
|
+
console.error('Error in test:', error);
|
|
200
|
+
throw error;
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
test('should include comment in the wiki page creation when provided', async () => {
|
|
204
|
+
// Get a valid wiki ID
|
|
205
|
+
const wikiId = await getValidWikiId();
|
|
206
|
+
try {
|
|
207
|
+
const params = {
|
|
208
|
+
organizationId,
|
|
209
|
+
projectId: projectName,
|
|
210
|
+
wikiId,
|
|
211
|
+
pagePath: testPagePathComment,
|
|
212
|
+
content: 'Content with comment.',
|
|
213
|
+
comment: 'This is a test comment for the wiki page creation',
|
|
214
|
+
};
|
|
215
|
+
const createdPage = await createWikiPage(params);
|
|
216
|
+
// Verify the result
|
|
217
|
+
expect(createdPage).toBeDefined();
|
|
218
|
+
expect(createdPage.path).toBe(testPagePathComment);
|
|
219
|
+
expect(createdPage.content).toBe(params.content);
|
|
220
|
+
// Verify by fetching the page
|
|
221
|
+
const fetchedPage = await getWikiPage({
|
|
222
|
+
organizationId,
|
|
223
|
+
projectId: projectName,
|
|
224
|
+
wikiId,
|
|
225
|
+
pagePath: testPagePathComment,
|
|
226
|
+
});
|
|
227
|
+
expect(fetchedPage).toBeDefined();
|
|
228
|
+
expect(typeof fetchedPage).toBe('string');
|
|
229
|
+
expect(fetchedPage).toContain(params.content);
|
|
230
|
+
// Note: The API might not return the comment in the response
|
|
231
|
+
// This test primarily verifies that including a comment doesn't break the API call
|
|
232
|
+
}
|
|
233
|
+
catch (error) {
|
|
234
|
+
console.error('Error in test:', error);
|
|
235
|
+
throw error;
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
test('should handle error when wiki does not exist', async () => {
|
|
239
|
+
const nonExistentWikiId = 'non-existent-wiki-12345';
|
|
240
|
+
const params = {
|
|
241
|
+
organizationId,
|
|
242
|
+
projectId: projectName,
|
|
243
|
+
wikiId: nonExistentWikiId,
|
|
244
|
+
pagePath: '/test-page',
|
|
245
|
+
content: 'This should fail.',
|
|
246
|
+
};
|
|
247
|
+
await expect(createWikiPage(params)).rejects.toThrow(AzureDevOpsError);
|
|
248
|
+
});
|
|
249
|
+
test('should handle error when project does not exist', async () => {
|
|
250
|
+
const nonExistentProjectId = 'non-existent-project-12345';
|
|
251
|
+
const params = {
|
|
252
|
+
organizationId,
|
|
253
|
+
projectId: nonExistentProjectId,
|
|
254
|
+
wikiId: 'any-wiki',
|
|
255
|
+
pagePath: '/test-page',
|
|
256
|
+
content: 'This should fail.',
|
|
257
|
+
};
|
|
258
|
+
await expect(createWikiPage(params)).rejects.toThrow(AzureDevOpsError);
|
|
259
|
+
});
|
|
260
|
+
test('should handle error when organization does not exist', async () => {
|
|
261
|
+
const nonExistentOrgId = 'non-existent-org-12345';
|
|
262
|
+
const params = {
|
|
263
|
+
organizationId: nonExistentOrgId,
|
|
264
|
+
projectId: projectName,
|
|
265
|
+
wikiId: 'any-wiki',
|
|
266
|
+
pagePath: '/test-page',
|
|
267
|
+
content: 'This should fail.',
|
|
268
|
+
};
|
|
269
|
+
await expect(createWikiPage(params)).rejects.toThrow(AzureDevOpsError);
|
|
270
|
+
});
|
|
271
|
+
});
|
|
272
|
+
//# sourceMappingURL=feature.spec.int.js.map
|