@leitwerk-dev/gitlab 0.0.0-bootstrap.0 → 0.2.1
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/README.md +57 -1
- package/dist/LICENSE +13 -0
- package/dist/capability.d.ts +14 -0
- package/dist/capability.d.ts.map +1 -0
- package/dist/chunk-64FNBSKH.js +605 -0
- package/dist/chunk-64FNBSKH.js.map +1 -0
- package/dist/client.d.ts +336 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/external.d.ts +53 -0
- package/dist/external.d.ts.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +107 -0
- package/dist/index.js.map +1 -0
- package/dist/merge-request.test-fixture.d.ts +3 -0
- package/dist/merge-request.test-fixture.d.ts.map +1 -0
- package/dist/selection.d.ts +27 -0
- package/dist/selection.d.ts.map +1 -0
- package/dist/setup.d.ts +11 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/testing.d.ts +56 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +219 -0
- package/dist/testing.js.map +1 -0
- package/dist/tools.d.ts +57 -0
- package/dist/tools.d.ts.map +1 -0
- package/package.json +54 -14
- package/src/capability.ts +28 -0
- package/src/client.ts +702 -0
- package/src/external.ts +180 -0
- package/src/index.ts +67 -0
- package/src/merge-request.test-fixture.ts +16 -0
- package/src/selection.ts +77 -0
- package/src/setup.ts +20 -0
- package/src/testing.ts +254 -0
- package/src/tools.ts +208 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createCapabilityToken,
|
|
3
|
+
type RepositoryCredentialProject,
|
|
4
|
+
type RepositoryCredentialRequirement,
|
|
5
|
+
} from "@leitwerk-dev/process-sdk";
|
|
6
|
+
import type { GitLabClientLike } from "./client.js";
|
|
7
|
+
/** @public */
|
|
8
|
+
export interface GitLabIntegration {
|
|
9
|
+
/** @public */
|
|
10
|
+
profiles(): readonly string[];
|
|
11
|
+
/** @public */
|
|
12
|
+
client(profile: string): GitLabClientLike;
|
|
13
|
+
}
|
|
14
|
+
/** @public */
|
|
15
|
+
export const gitlabIntegration = createCapabilityToken<GitLabIntegration>(
|
|
16
|
+
"@leitwerk-dev/gitlab.integration",
|
|
17
|
+
);
|
|
18
|
+
/** Internal references are derived from the same profile as API access. @public */
|
|
19
|
+
export function gitlabRepositoryCredentials(
|
|
20
|
+
profile: string,
|
|
21
|
+
projects: readonly RepositoryCredentialProject[],
|
|
22
|
+
): RepositoryCredentialRequirement[] {
|
|
23
|
+
return projects.map((project) => ({
|
|
24
|
+
projectKey: project.key,
|
|
25
|
+
kind: "git_https",
|
|
26
|
+
credentialRef: `gitlab:${profile}`,
|
|
27
|
+
}));
|
|
28
|
+
}
|