@skuba-lib/api 2.2.0 → 3.0.0-add-cdk-NodejsFunction-20260620003026

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.
Files changed (47) hide show
  1. package/buildkite/package.json +1 -2
  2. package/cdk/nodejsFunction/package.json +5 -0
  3. package/cdk/package.json +1 -2
  4. package/git/package.json +1 -2
  5. package/github/package.json +1 -2
  6. package/lib/buildkite/index.mjs +1 -1
  7. package/lib/{buildkite-DdGh6ljO.mjs → buildkite-DCSmKf_B.mjs} +1 -1
  8. package/lib/cdk/bridges/rolldown.mjs +50 -0
  9. package/lib/cdk/index.d.mts +13 -5
  10. package/lib/cdk/index.mjs +18 -4
  11. package/lib/cdk/nodejsFunction/index.d.mts +2 -0
  12. package/lib/cdk/nodejsFunction/index.mjs +334 -0
  13. package/lib/git/index.mjs +1 -1
  14. package/lib/{git-CmP3a9Z9.mjs → git-BHbneN9r.mjs} +1 -1
  15. package/lib/github/index.mjs +2 -2
  16. package/lib/{github-BUEZ_y2Y.mjs → github-Buehx6Xt.mjs} +2 -2
  17. package/lib/index-DnMMX6Ji.d.mts +32 -0
  18. package/lib/index.d.mts +4 -5
  19. package/lib/index.mjs +5 -6
  20. package/lib/net/index.mjs +1 -1
  21. package/lib/{net-Bi0PXcTy.mjs → net-CbEVAvJj.mjs} +1 -1
  22. package/lib/{rolldown-runtime-D7D4PA-g.mjs → rolldown-runtime-8H4AJuhK.mjs} +1 -0
  23. package/net/package.json +1 -2
  24. package/package.json +28 -29
  25. package/lib/buildkite/index.cjs +0 -4
  26. package/lib/buildkite/index.d.cts +0 -2
  27. package/lib/buildkite-_FU8d_a-.cjs +0 -62
  28. package/lib/cdk/index.cjs +0 -13
  29. package/lib/cdk/index.d.cts +0 -6
  30. package/lib/error-BnrwrJEG.cjs +0 -62
  31. package/lib/exec-Da3EoDZ1.cjs +0 -82
  32. package/lib/git/index.cjs +0 -14
  33. package/lib/git/index.d.cts +0 -2
  34. package/lib/git-D98vomnD.cjs +0 -460
  35. package/lib/github/index.cjs +0 -12
  36. package/lib/github/index.d.cts +0 -2
  37. package/lib/github-D12IboDc.cjs +0 -296
  38. package/lib/index-C9WMO_Y9.d.cts +0 -278
  39. package/lib/index-CNxgBJm_.d.cts +0 -39
  40. package/lib/index-D4JUiy2k.d.cts +0 -259
  41. package/lib/index-Kyp8ZCwF.d.cts +0 -38
  42. package/lib/index.cjs +0 -36
  43. package/lib/index.d.cts +0 -6
  44. package/lib/net/index.cjs +0 -3
  45. package/lib/net/index.d.cts +0 -2
  46. package/lib/net-4Ly1AB2r.cjs +0 -79
  47. package/lib/rolldown-runtime-DakpK96I.cjs +0 -43
@@ -1,296 +0,0 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-DakpK96I.cjs");
2
- const require_error = require("./error-BnrwrJEG.cjs");
3
- const require_git = require("./git-D98vomnD.cjs");
4
- let fs_extra = require("fs-extra");
5
- fs_extra = require_rolldown_runtime.__toESM(fs_extra, 1);
6
- let path = require("path");
7
- path = require_rolldown_runtime.__toESM(path, 1);
8
- //#region src/github/octokit.ts
9
- const createRestClient = async (options) => new (await (import("@octokit/rest"))).Octokit(options);
10
- const graphql = async (query, parameters) => (await import("@octokit/graphql")).graphql(query, parameters);
11
- //#endregion
12
- //#region src/github/checkRun.ts
13
- const GITHUB_MAX_ANNOTATIONS = 50;
14
- /**
15
- * Suffixes the title with the number of annotations added, e.g.
16
- *
17
- * ```text
18
- * Build #12 failed (24 annotations added)
19
- * ```
20
- */
21
- const suffixTitle = (title, inputAnnotations) => {
22
- return `${title} (${require_error.pluralise(inputAnnotations > GITHUB_MAX_ANNOTATIONS ? GITHUB_MAX_ANNOTATIONS : inputAnnotations, "annotation")} added)`;
23
- };
24
- /**
25
- * Enriches the summary with more context about the check run.
26
- */
27
- const createEnrichedSummary = (summary, inputAnnotations) => [summary, ...inputAnnotations > GITHUB_MAX_ANNOTATIONS ? [`${inputAnnotations} annotations were provided, but only the first ${GITHUB_MAX_ANNOTATIONS} are visible in GitHub.`] : []].join("\n\n");
28
- /**
29
- * Asynchronously creates a GitHub check run with annotations.
30
- *
31
- * The first 50 `annotations` are written in full to GitHub.
32
- *
33
- * A `GITHUB_API_TOKEN` or `GITHUB_TOKEN` with the `checks:write` permission
34
- * must be present on the environment.
35
- */
36
- const createCheckRun = async ({ annotations, conclusion, name, summary, text, title }) => {
37
- const dir = process.cwd();
38
- const [commitId, { owner, repo }] = await Promise.all([require_git.getHeadCommitId({ dir }), require_git.getOwnerAndRepo({ dir })]);
39
- await (await createRestClient({ auth: require_git.apiTokenFromEnvironment() })).checks.create({
40
- conclusion,
41
- head_sha: commitId,
42
- name,
43
- output: {
44
- annotations: annotations.slice(0, GITHUB_MAX_ANNOTATIONS),
45
- summary: createEnrichedSummary(summary, annotations.length),
46
- text,
47
- title: suffixTitle(title, annotations.length)
48
- },
49
- owner,
50
- repo
51
- });
52
- };
53
- //#endregion
54
- //#region src/github/pullRequest.ts
55
- /**
56
- * Gets the number of the current pull request.
57
- *
58
- * This tries to extract the pull request from common CI environment variables,
59
- * and falls back to querying the GitHub Repos API for the latest pull request
60
- * associated with the head commit. An error is thrown if there are no
61
- * associated pull requests, or if they are all closed or locked.
62
- */
63
- const getPullRequestNumber = async (params = {}) => {
64
- const env = params.env ?? process.env;
65
- const dir = process.cwd();
66
- const number = Number(env.BUILDKITE_PULL_REQUEST ?? env.GITHUB_REF?.replace(/^refs\/pull\/(\d+)\/.*$/, "$1"));
67
- if (Number.isSafeInteger(number)) return number;
68
- const client = params.client ?? await createRestClient({ auth: require_git.apiTokenFromEnvironment() });
69
- const [commitId, { owner, repo }] = await Promise.all([require_git.getHeadCommitId({
70
- dir,
71
- env
72
- }), require_git.getOwnerAndRepo({ dir })]);
73
- const pullRequestData = (await client.repos.listPullRequestsAssociatedWithCommit({
74
- commit_sha: commitId,
75
- owner,
76
- repo
77
- })).data.filter((pr) => pr.state === "open" && !pr.locked).sort((a, b) => b.updated_at.localeCompare(a.updated_at))[0];
78
- if (!pullRequestData) throw new Error(`Commit ${commitId} is not associated with an open GitHub pull request`);
79
- return pullRequestData.number;
80
- };
81
- //#endregion
82
- //#region src/github/issueComment.ts
83
- const getUserId = async (client) => {
84
- const { data } = await client.users.getAuthenticated();
85
- return data.id;
86
- };
87
- /**
88
- * Asynchronously creates or updates a GitHub issue comment.
89
- *
90
- * This emulates `put` behaviour by overwriting the first existing comment by
91
- * the same author on the issue, enabling use cases like a persistent bot
92
- * comment at the top of the pull request that reflects the current status of a
93
- * CI check.
94
- *
95
- * A `GITHUB_API_TOKEN` or `GITHUB_TOKEN` with write permissions must be present
96
- * on the environment.
97
- */
98
- const putIssueComment = async (params) => {
99
- if (params.body === null && !params.internalId) throw new Error("Cannot remove comment without an internalId");
100
- const env = params.env ?? process.env;
101
- const dir = process.cwd();
102
- const { owner, repo } = await require_git.getOwnerAndRepo({ dir });
103
- const client = await createRestClient({ auth: require_git.apiTokenFromEnvironment() });
104
- const issueNumber = params.issueNumber ?? await getPullRequestNumber({
105
- client,
106
- env
107
- });
108
- if (!issueNumber) throw new Error("Failed to infer an issue number");
109
- const comments = await client.issues.listComments({
110
- issue_number: issueNumber,
111
- owner,
112
- repo
113
- });
114
- const userId = params.userId === "seek-build-agency" ? 87109344 : params.userId ?? await getUserId(client);
115
- const commentId = comments.data.find((comment) => comment.user?.id === userId && (params.internalId ? comment.body?.endsWith(`\n\n<!-- ${params.internalId} -->`) : true))?.id;
116
- if (params.body === null) {
117
- if (commentId) await client.issues.deleteComment({
118
- comment_id: commentId,
119
- owner,
120
- repo
121
- });
122
- return null;
123
- }
124
- const body = params.internalId ? [params.body.trim(), `<!-- ${params.internalId} -->`].join("\n\n") : params.body.trim();
125
- return { id: (await (commentId ? client.issues.updateComment({
126
- body,
127
- comment_id: commentId,
128
- issue_number: issueNumber,
129
- owner,
130
- repo
131
- }) : client.issues.createComment({
132
- body,
133
- issue_number: issueNumber,
134
- owner,
135
- repo
136
- }))).data.id };
137
- };
138
- //#endregion
139
- //#region src/github/push.ts
140
- /**
141
- * Retrieves all file changes from the local Git repository using
142
- * `getChangedFiles`, then uploads the changes to a specified GitHub branch
143
- * using `uploadFileChanges`.
144
- *
145
- * Returns the commit ID, or `undefined` if there are no changes to commit.
146
- *
147
- * The file changes will appear as verified commits on GitHub.
148
- *
149
- * This will not update the local Git repository unless `updateLocal` is
150
- * specified.
151
- */
152
- const uploadAllFileChanges = async ({ branch, dir, messageHeadline, ignore, messageBody, updateLocal = false }) => {
153
- const changedFiles = await require_git.getChangedFiles({
154
- dir,
155
- ignore
156
- });
157
- if (!changedFiles.length) return;
158
- const fileChanges = await readFileChanges(dir, changedFiles);
159
- const commitId = await uploadFileChanges({
160
- dir,
161
- branch,
162
- messageHeadline,
163
- messageBody,
164
- fileChanges
165
- });
166
- if (updateLocal) {
167
- await Promise.all([...fileChanges.additions, ...fileChanges.deletions].map((file) => fs_extra.default.rm(file.path)));
168
- await require_git.fastForwardBranch({
169
- ref: branch,
170
- auth: { type: "gitHubApp" },
171
- dir
172
- });
173
- }
174
- return commitId;
175
- };
176
- /**
177
- * Takes a list of `ChangedFiles`, reads them from the file system, and maps
178
- * them to GitHub GraphQL `FileChanges`.
179
- *
180
- * https://docs.github.com/en/graphql/reference/input-objects#filechanges
181
- */
182
- const readFileChanges = async (dir, changedFiles) => {
183
- const { added, deleted } = changedFiles.reduce((files, changedFile) => {
184
- const filePath = changedFile.path;
185
- if (changedFile.state === "deleted") files.deleted.push(filePath);
186
- else files.added.push(filePath);
187
- return files;
188
- }, {
189
- added: [],
190
- deleted: []
191
- });
192
- const gitRoot = await require_git.findRoot({ dir });
193
- const toRootPath = (filePath) => {
194
- if (!gitRoot) return filePath;
195
- return path.default.resolve(gitRoot, filePath);
196
- };
197
- return {
198
- additions: await Promise.all(added.map(async (filePath) => ({
199
- path: filePath,
200
- contents: await fs_extra.default.promises.readFile(toRootPath(filePath), { encoding: "base64" })
201
- }))),
202
- deletions: deleted.map((filePath) => ({ path: filePath }))
203
- };
204
- };
205
- /**
206
- * Uploads file changes from the local workspace to a specified GitHub branch.
207
- *
208
- * The file changes will appear as verified commits on GitHub.
209
- *
210
- * This will not update the local Git repository.
211
- */
212
- const uploadFileChanges = async ({ dir, branch, messageHeadline, messageBody, fileChanges }) => {
213
- const authToken = require_git.apiTokenFromEnvironment();
214
- if (!authToken) throw new Error("Could not read a GitHub API token from the environment. Please set GITHUB_API_TOKEN or GITHUB_TOKEN.");
215
- const [{ owner, repo }, headCommitId] = await Promise.all([require_git.getOwnerAndRepo({ dir }), require_git.getHeadCommitId({ dir })]);
216
- return (await graphql(`
217
- mutation Mutation($input: CreateCommitOnBranchInput!) {
218
- createCommitOnBranch(input: $input) {
219
- commit {
220
- oid
221
- }
222
- }
223
- }
224
- `, {
225
- input: {
226
- branch: {
227
- repositoryNameWithOwner: `${owner}/${repo}`,
228
- branchName: branch
229
- },
230
- message: {
231
- headline: messageHeadline,
232
- body: messageBody
233
- },
234
- expectedHeadOid: headCommitId,
235
- clientMutationId: "skuba",
236
- fileChanges
237
- },
238
- headers: { authorization: `Bearer ${authToken}` }
239
- })).createCommitOnBranch.commit.oid;
240
- };
241
- //#endregion
242
- //#region src/github/index.ts
243
- var github_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
244
- apiTokenFromEnvironment: () => require_git.apiTokenFromEnvironment,
245
- buildNameFromEnvironment: () => require_git.buildNameFromEnvironment,
246
- createCheckRun: () => createCheckRun,
247
- enabledFromEnvironment: () => require_git.enabledFromEnvironment,
248
- getPullRequestNumber: () => getPullRequestNumber,
249
- putIssueComment: () => putIssueComment,
250
- readFileChanges: () => readFileChanges,
251
- uploadAllFileChanges: () => uploadAllFileChanges,
252
- uploadFileChanges: () => uploadFileChanges
253
- });
254
- //#endregion
255
- Object.defineProperty(exports, "createCheckRun", {
256
- enumerable: true,
257
- get: function() {
258
- return createCheckRun;
259
- }
260
- });
261
- Object.defineProperty(exports, "getPullRequestNumber", {
262
- enumerable: true,
263
- get: function() {
264
- return getPullRequestNumber;
265
- }
266
- });
267
- Object.defineProperty(exports, "github_exports", {
268
- enumerable: true,
269
- get: function() {
270
- return github_exports;
271
- }
272
- });
273
- Object.defineProperty(exports, "putIssueComment", {
274
- enumerable: true,
275
- get: function() {
276
- return putIssueComment;
277
- }
278
- });
279
- Object.defineProperty(exports, "readFileChanges", {
280
- enumerable: true,
281
- get: function() {
282
- return readFileChanges;
283
- }
284
- });
285
- Object.defineProperty(exports, "uploadAllFileChanges", {
286
- enumerable: true,
287
- get: function() {
288
- return uploadAllFileChanges;
289
- }
290
- });
291
- Object.defineProperty(exports, "uploadFileChanges", {
292
- enumerable: true,
293
- get: function() {
294
- return uploadFileChanges;
295
- }
296
- });
@@ -1,278 +0,0 @@
1
- //#region src/git/commit.d.ts
2
- interface Identity {
3
- email?: string;
4
- name?: string;
5
- }
6
- interface CommitParameters {
7
- author?: Identity;
8
- committer?: Identity;
9
- dir: string;
10
- message: string;
11
- }
12
- /**
13
- * Writes a commit to the local Git repository.
14
- */
15
- declare const commit: ({
16
- author,
17
- committer,
18
- dir,
19
- message
20
- }: CommitParameters) => Promise<string>;
21
- //#endregion
22
- //#region src/git/getChangedFiles.d.ts
23
- type ChangedFileState = 'added' | 'modified' | 'deleted';
24
- interface ChangedFile {
25
- path: string;
26
- state: ChangedFileState;
27
- }
28
- interface ChangedFilesParameters {
29
- dir: string;
30
- /**
31
- * File changes to exclude from the result.
32
- *
33
- * Defaults to `[]` (no exclusions).
34
- */
35
- ignore?: ChangedFile[];
36
- }
37
- /**
38
- * Returns all the files which have been added, modified or deleted in the
39
- * working directory of the local Git repository since the last commit.
40
- */
41
- declare const getChangedFiles: ({
42
- dir,
43
- ignore
44
- }: ChangedFilesParameters) => Promise<ChangedFile[]>;
45
- //#endregion
46
- //#region src/git/commitAllChanges.d.ts
47
- interface CommitAllParameters {
48
- dir: string;
49
- message: string;
50
- author?: Identity;
51
- committer?: Identity;
52
- /**
53
- * File changes to exclude from the commit.
54
- *
55
- * Defaults to `[]` (no exclusions).
56
- */
57
- ignore?: ChangedFile[];
58
- }
59
- /**
60
- * Stages all changes and writes a commit to the local Git repository.
61
- */
62
- declare const commitAllChanges: ({
63
- dir,
64
- message,
65
- author,
66
- committer,
67
- ignore
68
- }: CommitAllParameters) => Promise<string | undefined>;
69
- //#endregion
70
- //#region src/git/currentBranch.d.ts
71
- interface CurrentBranchParameters {
72
- dir?: string;
73
- env?: Record<string, string | undefined>;
74
- }
75
- /**
76
- * Tries to return a Git branch name from CI environment variables, falling back
77
- * to the local Git repository when the current working `dir` is supplied.
78
- */
79
- declare const currentBranch: ({
80
- dir,
81
- env
82
- }?: CurrentBranchParameters) => Promise<string | undefined>;
83
- //#endregion
84
- //#region src/git/findRoot.d.ts
85
- interface FindRootParameters {
86
- dir: string;
87
- }
88
- /**
89
- * Returns the first Git root directory encountered walking up from the provided
90
- * `dir`.
91
- */
92
- declare const findRoot: ({
93
- dir
94
- }: FindRootParameters) => Promise<string | null>;
95
- //#endregion
96
- //#region src/git/log.d.ts
97
- interface GetHeadCommitParameters {
98
- dir: string;
99
- env?: Record<string, string | undefined>;
100
- }
101
- /**
102
- * Gets the object ID of the head commit.
103
- *
104
- * This tries to extract the commit ID from common CI environment variables,
105
- * and falls back to the local Git repository log.
106
- */
107
- declare const getHeadCommitId: ({
108
- dir,
109
- env
110
- }: GetHeadCommitParameters) => Promise<string>;
111
- /**
112
- * Gets the message of the head commit.
113
- *
114
- * This tries to extract the message from common CI environment variables,
115
- * and falls back to the local Git repository log.
116
- */
117
- declare const getHeadCommitMessage: ({
118
- dir,
119
- env
120
- }: GetHeadCommitParameters) => Promise<string>;
121
- //#endregion
122
- //#region src/git/remote.d.ts
123
- interface GetOwnerAndRepoParameters {
124
- dir: string;
125
- env?: Record<string, string | undefined>;
126
- }
127
- /**
128
- * Extracts the owner and repository names from CI environment variables,
129
- * falling back to local Git remotes.
130
- *
131
- * Currently, only GitHub repository URLs are supported:
132
- *
133
- * ```console
134
- * git@github.com:seek-oss/skuba.git
135
- * https://github.com/seek-oss/skuba.git
136
- * ```
137
- */
138
- declare const getOwnerAndRepo: ({
139
- dir,
140
- env
141
- }: GetOwnerAndRepoParameters) => Promise<{
142
- owner: string;
143
- repo: string;
144
- }>;
145
- //#endregion
146
- //#region src/git/push.d.ts
147
- /**
148
- * Use a GitHub app token to auth the Git push.
149
- *
150
- * This defaults to the `GITHUB_API_TOKEN` and `GITHUB_TOKEN` environment
151
- * variables if `token` is not provided.
152
- */
153
- interface GitHubAppAuth$1 {
154
- type: 'gitHubApp';
155
- token?: string;
156
- }
157
- interface PushParameters {
158
- /**
159
- * The auth mechanism for the push.
160
- *
161
- * Currently, only GitHub app tokens are supported.
162
- */
163
- auth: GitHubAppAuth$1;
164
- dir: string;
165
- /**
166
- * The reference to push to the remote.
167
- *
168
- * This may be a commit, branch or tag in the local repository.
169
- */
170
- ref: string;
171
- remote?: string;
172
- /**
173
- * The destination branch or tag on the remote.
174
- *
175
- * This defaults to `ref`.
176
- */
177
- remoteRef?: string;
178
- /**
179
- * Forcefully override any conflicts.
180
- *
181
- * This defaults to `false`.
182
- */
183
- force?: boolean;
184
- }
185
- interface PushResult {
186
- ok: boolean;
187
- error: string | null;
188
- refs: Record<string, {
189
- ok: boolean;
190
- error: string;
191
- }>;
192
- headers?: Record<string, string> | undefined;
193
- }
194
- /**
195
- * Pushes the specified `ref` from the local Git repository to a remote.
196
- */
197
- declare const push: ({
198
- auth,
199
- dir,
200
- ref,
201
- remote,
202
- remoteRef,
203
- force
204
- }: PushParameters) => Promise<PushResult>;
205
- //#endregion
206
- //#region src/git/pull.d.ts
207
- /**
208
- * Use a GitHub app token to auth the Git push.
209
- *
210
- * This defaults to the `GITHUB_API_TOKEN` and `GITHUB_TOKEN` environment
211
- * variables if `token` is not provided.
212
- */
213
- interface GitHubAppAuth {
214
- type: 'gitHubApp';
215
- token?: string;
216
- }
217
- interface PullParameters {
218
- /**
219
- * The auth mechanism for the push.
220
- *
221
- * Currently, only GitHub app tokens are supported.
222
- */
223
- auth: GitHubAppAuth;
224
- dir: string;
225
- /**
226
- * The local branch to fast forward.
227
- */
228
- ref: string;
229
- remote?: string;
230
- /**
231
- * The branch or tag on the remote to reference.
232
- *
233
- * This defaults to `ref`.
234
- */
235
- remoteRef?: string;
236
- }
237
- /**
238
- * Fast forwards the specified `ref` on the local Git repository to match the remote branch.
239
- */
240
- declare const fastForwardBranch: ({
241
- auth,
242
- dir,
243
- ref,
244
- remote,
245
- remoteRef
246
- }: PullParameters) => Promise<void>;
247
- //#endregion
248
- //#region src/git/reset.d.ts
249
- interface ResetParameters {
250
- dir: string;
251
- branch: string;
252
- commitId: string;
253
- hard?: boolean;
254
- }
255
- /**
256
- * Resets the specified branch in the local Git repository to a particular
257
- * commit.
258
- */
259
- declare const reset: ({
260
- dir,
261
- branch,
262
- commitId,
263
- hard
264
- }: ResetParameters) => Promise<void>;
265
- //#endregion
266
- //#region src/git/isFileGitIgnored.d.ts
267
- declare const isFileGitIgnored: ({
268
- absolutePath,
269
- gitRoot
270
- }: {
271
- absolutePath: string;
272
- gitRoot: string;
273
- }) => Promise<boolean>;
274
- declare namespace index_d_exports {
275
- export { ChangedFile, commit, commitAllChanges, currentBranch, fastForwardBranch, findRoot, getChangedFiles, getHeadCommitId, getHeadCommitMessage, getOwnerAndRepo, isFileGitIgnored, push, reset };
276
- }
277
- //#endregion
278
- export { push as a, getHeadCommitMessage as c, commitAllChanges as d, ChangedFile as f, fastForwardBranch as i, findRoot as l, commit as m, isFileGitIgnored as n, getOwnerAndRepo as o, getChangedFiles as p, reset as r, getHeadCommitId as s, index_d_exports as t, currentBranch as u };
@@ -1,39 +0,0 @@
1
- //#region src/buildkite/annotate.d.ts
2
- type AnnotationStyle = 'success' | 'info' | 'warning' | 'error';
3
- interface AnnotationOptions {
4
- context?: string;
5
- /**
6
- * Scopes an annotation's context to the Buildkite step ID.
7
- *
8
- * This lets you emit distinct annotations per step, and only takes effect if
9
- * the `BUILDKITE_STEP_ID` environment variable is present.
10
- */
11
- scopeContextToStep?: boolean;
12
- style?: AnnotationStyle;
13
- }
14
- /**
15
- * Asynchronously uploads a Buildkite annotation.
16
- *
17
- * If the following environment variables are not present,
18
- * the function will silently return without attempting to annotate:
19
- *
20
- * - `BUILDKITE`
21
- * - `BUILDKITE_AGENT_ACCESS_TOKEN`
22
- * - `BUILDKITE_JOB_ID`
23
- *
24
- * The `buildkite-agent` binary must also be on your `PATH`.
25
- */
26
- declare const annotate: (markdown: string, opts?: AnnotationOptions) => Promise<void>;
27
- //#endregion
28
- //#region src/buildkite/md.d.ts
29
- /**
30
- * @internal
31
- */
32
- declare const md: {
33
- terminal: (code: string) => string;
34
- };
35
- declare namespace index_d_exports {
36
- export { AnnotationStyle, annotate, md };
37
- }
38
- //#endregion
39
- export { annotate as i, md as n, AnnotationStyle as r, index_d_exports as t };