@skuba-lib/api 2.3.0-unwind-datadog-lambda-hacks-20260716065331 → 2.3.1-sam-test-20260818032125

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 (41) hide show
  1. package/lib/buildkite/index.cjs +1 -1
  2. package/lib/buildkite/index.mjs +1 -1
  3. package/lib/{buildkite-DdGh6ljO.mjs → buildkite-C7bwlxiU.mjs} +3 -5
  4. package/lib/{buildkite-_FU8d_a-.cjs → buildkite-z4owathk.cjs} +5 -7
  5. package/lib/cdk/index.cjs +1 -1
  6. package/lib/error-CxiNRw9A.mjs +15 -0
  7. package/lib/error-CzNs0bXO.cjs +23 -0
  8. package/lib/{exec-CbhqWxN4.mjs → exec-Csi1HI7c.mjs} +1 -2
  9. package/lib/{exec-Da3EoDZ1.cjs → exec-DCUB5Shx.cjs} +2 -3
  10. package/lib/git/index.cjs +1 -1
  11. package/lib/git/index.d.cts +1 -1
  12. package/lib/git/index.d.mts +1 -1
  13. package/lib/git/index.mjs +1 -1
  14. package/lib/{git-BRIEV0SC.cjs → git-C-WnhZPj.cjs} +2 -2
  15. package/lib/{git-Bjs0WQcc.mjs → git-DyhV01cl.mjs} +1 -1
  16. package/lib/github/index.cjs +2 -2
  17. package/lib/github/index.d.cts +1 -1
  18. package/lib/github/index.d.mts +1 -1
  19. package/lib/github/index.mjs +2 -2
  20. package/lib/{github-CMoF4jl9.cjs → github-v-R9t-n8.cjs} +18 -17
  21. package/lib/{github-C4q0zf6K.mjs → github-zZjo_m67.mjs} +18 -16
  22. package/lib/{index-Kyp8ZCwF.d.cts → index-C9lVo3vU.d.cts} +1 -6
  23. package/lib/{index-Kyp8ZCwF.d.mts → index-C9lVo3vU.d.mts} +1 -6
  24. package/lib/{index-CyA0bI1V.d.mts → index-CLEYcnJY.d.cts} +12 -63
  25. package/lib/{index-CyA0bI1V.d.cts → index-CLEYcnJY.d.mts} +12 -63
  26. package/lib/{index-Dsnw8lVr.d.mts → index-CPm5rAMy.d.cts} +4 -25
  27. package/lib/{index-Disq-dHD.d.cts → index-CwdiFn_m.d.mts} +4 -25
  28. package/lib/index.cjs +4 -4
  29. package/lib/index.d.cts +3 -3
  30. package/lib/index.d.mts +3 -3
  31. package/lib/index.mjs +4 -4
  32. package/lib/{error-BYLsj5YU.mjs → logging-BQNEupxh.mjs} +1 -15
  33. package/lib/{error-BnrwrJEG.cjs → logging-BqpzZfsF.cjs} +0 -23
  34. package/lib/net/index.cjs +1 -1
  35. package/lib/net/index.d.cts +1 -1
  36. package/lib/net/index.d.mts +1 -1
  37. package/lib/net/index.mjs +1 -1
  38. package/lib/{net-Bi0PXcTy.mjs → net-Bf2HV_vG.mjs} +1 -1
  39. package/lib/{net-4Ly1AB2r.cjs → net-HILKQTAq.cjs} +2 -2
  40. package/lib/{rolldown-runtime-DakpK96I.cjs → rolldown-runtime-C0BPl7ul.cjs} +1 -1
  41. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_buildkite = require("../buildkite-_FU8d_a-.cjs");
2
+ const require_buildkite = require("../buildkite-z4owathk.cjs");
3
3
  exports.annotate = require_buildkite.annotate;
4
4
  exports.md = require_buildkite.md;
@@ -1,2 +1,2 @@
1
- import { n as md, r as annotate } from "../buildkite-DdGh6ljO.mjs";
1
+ import { n as md, r as annotate } from "../buildkite-C7bwlxiU.mjs";
2
2
  export { annotate, md };
@@ -1,9 +1,8 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
- import { n as log } from "./error-BYLsj5YU.mjs";
3
- import { n as exec, r as hasCommand } from "./exec-CbhqWxN4.mjs";
2
+ import { t as log } from "./logging-BQNEupxh.mjs";
3
+ import { n as exec, r as hasCommand } from "./exec-Csi1HI7c.mjs";
4
4
  //#region src/buildkite/annotate.ts
5
5
  const isAnnotationEnabled = async () => Boolean(process.env.BUILDKITE && process.env.BUILDKITE_AGENT_ACCESS_TOKEN && process.env.BUILDKITE_JOB_ID && await hasCommand("buildkite-agent"));
6
- const MAX_SIZE = 1024 * 1024;
7
6
  const TRUNCATION_WARNING = "... [Truncated due to size limit]";
8
7
  /**
9
8
  * Asynchronously uploads a Buildkite annotation.
@@ -21,8 +20,7 @@ const annotate = async (markdown, opts = {}) => {
21
20
  if (!await isAnnotationEnabled()) return;
22
21
  let truncatedMarkdown = markdown;
23
22
  if (markdown.length > 1048576) {
24
- const remainingSpace = MAX_SIZE - 33;
25
- truncatedMarkdown = markdown.slice(0, remainingSpace) + TRUNCATION_WARNING;
23
+ truncatedMarkdown = markdown.slice(0, 1048543) + TRUNCATION_WARNING;
26
24
  log.warn(`Annotation truncated, full message is: ${markdown}`);
27
25
  }
28
26
  const context = [opts.scopeContextToStep && process.env.BUILDKITE_STEP_ID, opts.context].filter(Boolean).join("|");
@@ -1,9 +1,8 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-DakpK96I.cjs");
2
- const require_error = require("./error-BnrwrJEG.cjs");
3
- const require_exec = require("./exec-Da3EoDZ1.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
2
+ const require_logging = require("./logging-BqpzZfsF.cjs");
3
+ const require_exec = require("./exec-DCUB5Shx.cjs");
4
4
  //#region src/buildkite/annotate.ts
5
5
  const isAnnotationEnabled = async () => Boolean(process.env.BUILDKITE && process.env.BUILDKITE_AGENT_ACCESS_TOKEN && process.env.BUILDKITE_JOB_ID && await require_exec.hasCommand("buildkite-agent"));
6
- const MAX_SIZE = 1024 * 1024;
7
6
  const TRUNCATION_WARNING = "... [Truncated due to size limit]";
8
7
  /**
9
8
  * Asynchronously uploads a Buildkite annotation.
@@ -21,9 +20,8 @@ const annotate = async (markdown, opts = {}) => {
21
20
  if (!await isAnnotationEnabled()) return;
22
21
  let truncatedMarkdown = markdown;
23
22
  if (markdown.length > 1048576) {
24
- const remainingSpace = MAX_SIZE - 33;
25
- truncatedMarkdown = markdown.slice(0, remainingSpace) + TRUNCATION_WARNING;
26
- require_error.log.warn(`Annotation truncated, full message is: ${markdown}`);
23
+ truncatedMarkdown = markdown.slice(0, 1048543) + TRUNCATION_WARNING;
24
+ require_logging.log.warn(`Annotation truncated, full message is: ${markdown}`);
27
25
  }
28
26
  const context = [opts.scopeContextToStep && process.env.BUILDKITE_STEP_ID, opts.context].filter(Boolean).join("|");
29
27
  const { style } = opts;
package/lib/cdk/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  //#region src/cdk/index.ts
3
- var cdk_exports = /* @__PURE__ */ require("../rolldown-runtime-DakpK96I.cjs").__exportAll({ normaliseTemplate: () => normaliseTemplate });
3
+ var cdk_exports = /* @__PURE__ */ require("../rolldown-runtime-C0BPl7ul.cjs").__exportAll({ normaliseTemplate: () => normaliseTemplate });
4
4
  const normaliseTemplateJsonString = (json) => json.replace(/"S3Key":"([0-9a-f]+)\.zip"/g, (_, hash) => `"S3Key":"${"x".repeat(hash.length)}.zip"`).replace(/workerCurrentVersion([0-9a-zA-Z]+)"/g, (_, hash) => `workerCurrentVersion${"x".repeat(hash.length)}"`).replaceAll(/"Value":"\d+\.\d+\.\d+-([^"]+)"/g, (_, hash) => `"Value": "x.x.x-${"x".repeat(hash.length)}"`).replaceAll(/"Value":"v\d+\.\d+\.\d+"/g, (_) => "\"Value\": \"vx.x.x\"").replace(/"DD_TAGS":"git.commit.sha:([0-9a-f]+),git.repository_url:([^\"]+)",/g, "").replaceAll(/(layer:Datadog-[^-]+-.+?:)\d+/g, (_, layer) => `${layer}x`);
5
5
  const normaliseTemplate = (template) => JSON.parse(normaliseTemplateJsonString(JSON.stringify(template)));
6
6
  //#endregion
@@ -0,0 +1,15 @@
1
+ import * as z from "zod/v4";
2
+ //#region ../../src/utils/validation.ts
3
+ const isObject = (value) => typeof value === "object" && value !== null;
4
+ const hasProp = (value, prop) => isObject(value) && value.hasOwnProperty(prop);
5
+ z.array(z.object({
6
+ command: z.object({
7
+ command: z.string(),
8
+ name: z.string()
9
+ }),
10
+ index: z.number(),
11
+ exitCode: z.number()
12
+ }));
13
+ const isErrorWithCode = (err, code) => hasProp(err, "code") && err.code === code;
14
+ //#endregion
15
+ export { isErrorWithCode as t };
@@ -0,0 +1,23 @@
1
+ const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
2
+ require("util");
3
+ let zod_v4 = require("zod/v4");
4
+ zod_v4 = require_rolldown_runtime.__toESM(zod_v4, 1);
5
+ //#region ../../src/utils/validation.ts
6
+ const isObject = (value) => typeof value === "object" && value !== null;
7
+ const hasProp = (value, prop) => isObject(value) && value.hasOwnProperty(prop);
8
+ zod_v4.array(zod_v4.object({
9
+ command: zod_v4.object({
10
+ command: zod_v4.string(),
11
+ name: zod_v4.string()
12
+ }),
13
+ index: zod_v4.number(),
14
+ exitCode: zod_v4.number()
15
+ }));
16
+ const isErrorWithCode = (err, code) => hasProp(err, "code") && err.code === code;
17
+ //#endregion
18
+ Object.defineProperty(exports, "isErrorWithCode", {
19
+ enumerable: true,
20
+ get: function() {
21
+ return isErrorWithCode;
22
+ }
23
+ });
@@ -1,4 +1,4 @@
1
- import { t as isErrorWithCode } from "./error-BYLsj5YU.mjs";
1
+ import { t as isErrorWithCode } from "./error-CxiNRw9A.mjs";
2
2
  import stream from "stream";
3
3
  import util from "util";
4
4
  import "concurrently";
@@ -40,7 +40,6 @@ const runCommand = (command, args, { streamStdio, ...execaOptions } = {}) => {
40
40
  case true:
41
41
  subprocess.stderr?.pipe(process.stderr);
42
42
  subprocess.stdout?.pipe(process.stdout);
43
- break;
44
43
  }
45
44
  return subprocess;
46
45
  };
@@ -1,5 +1,5 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-DakpK96I.cjs");
2
- const require_error = require("./error-BnrwrJEG.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
2
+ const require_error = require("./error-CzNs0bXO.cjs");
3
3
  let stream = require("stream");
4
4
  stream = require_rolldown_runtime.__toESM(stream, 1);
5
5
  let util = require("util");
@@ -44,7 +44,6 @@ const runCommand = (command, args, { streamStdio, ...execaOptions } = {}) => {
44
44
  case true:
45
45
  subprocess.stderr?.pipe(process.stderr);
46
46
  subprocess.stdout?.pipe(process.stdout);
47
- break;
48
47
  }
49
48
  return subprocess;
50
49
  };
package/lib/git/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_git = require("../git-BRIEV0SC.cjs");
2
+ const require_git = require("../git-C-WnhZPj.cjs");
3
3
  exports.commit = require_git.commit;
4
4
  exports.commitAllChanges = require_git.commitAllChanges;
5
5
  exports.currentBranch = require_git.currentBranch;
@@ -1,2 +1,2 @@
1
- import { a as push, c as getHeadCommitMessage, d as commitAllChanges, f as ChangedFile, i as fastForwardBranch, l as findRoot, m as commit, n as isFileGitIgnored, o as getOwnerAndRepo, p as getChangedFiles, r as reset, s as getHeadCommitId, u as currentBranch } from "../index-CyA0bI1V.cjs";
1
+ import { a as push, c as getHeadCommitMessage, d as commitAllChanges, f as ChangedFile, i as fastForwardBranch, l as findRoot, m as commit, n as isFileGitIgnored, o as getOwnerAndRepo, p as getChangedFiles, r as reset, s as getHeadCommitId, u as currentBranch } from "../index-CLEYcnJY.cjs";
2
2
  export { type ChangedFile, commit, commitAllChanges, currentBranch, fastForwardBranch, findRoot, getChangedFiles, getHeadCommitId, getHeadCommitMessage, getOwnerAndRepo, isFileGitIgnored, push, reset };
@@ -1,2 +1,2 @@
1
- import { a as push, c as getHeadCommitMessage, d as commitAllChanges, f as ChangedFile, i as fastForwardBranch, l as findRoot, m as commit, n as isFileGitIgnored, o as getOwnerAndRepo, p as getChangedFiles, r as reset, s as getHeadCommitId, u as currentBranch } from "../index-CyA0bI1V.mjs";
1
+ import { a as push, c as getHeadCommitMessage, d as commitAllChanges, f as ChangedFile, i as fastForwardBranch, l as findRoot, m as commit, n as isFileGitIgnored, o as getOwnerAndRepo, p as getChangedFiles, r as reset, s as getHeadCommitId, u as currentBranch } from "../index-CLEYcnJY.mjs";
2
2
  export { type ChangedFile, commit, commitAllChanges, currentBranch, fastForwardBranch, findRoot, getChangedFiles, getHeadCommitId, getHeadCommitMessage, getOwnerAndRepo, isFileGitIgnored, push, reset };
package/lib/git/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as push, d as getHeadCommitMessage, f as currentBranch, g as commit, h as findRoot, i as fastForwardBranch, l as getOwnerAndRepo, m as getChangedFiles, n as isFileGitIgnored, p as commitAllChanges, r as reset, u as getHeadCommitId } from "../git-Bjs0WQcc.mjs";
1
+ import { a as push, d as getHeadCommitMessage, f as currentBranch, g as commit, h as findRoot, i as fastForwardBranch, l as getOwnerAndRepo, m as getChangedFiles, n as isFileGitIgnored, p as commitAllChanges, r as reset, u as getHeadCommitId } from "../git-DyhV01cl.mjs";
2
2
  export { commit, commitAllChanges, currentBranch, fastForwardBranch, findRoot, getChangedFiles, getHeadCommitId, getHeadCommitMessage, getOwnerAndRepo, isFileGitIgnored, push, reset };
@@ -1,5 +1,5 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-DakpK96I.cjs");
2
- const require_error = require("./error-BnrwrJEG.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
2
+ const require_error = require("./error-CzNs0bXO.cjs");
3
3
  let fs_extra = require("fs-extra");
4
4
  fs_extra = require_rolldown_runtime.__toESM(fs_extra, 1);
5
5
  let isomorphic_git = require("isomorphic-git");
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
- import { t as isErrorWithCode } from "./error-BYLsj5YU.mjs";
2
+ import { t as isErrorWithCode } from "./error-CxiNRw9A.mjs";
3
3
  import fs from "fs-extra";
4
4
  import git, { findRoot } from "isomorphic-git";
5
5
  import path from "path";
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_git = require("../git-BRIEV0SC.cjs");
3
- const require_github = require("../github-CMoF4jl9.cjs");
2
+ const require_git = require("../git-C-WnhZPj.cjs");
3
+ const require_github = require("../github-v-R9t-n8.cjs");
4
4
  exports.apiTokenFromEnvironment = require_git.apiTokenFromEnvironment;
5
5
  exports.buildNameFromEnvironment = require_git.buildNameFromEnvironment;
6
6
  exports.createCheckRun = require_github.createCheckRun;
@@ -1,2 +1,2 @@
1
- import { a as putIssueComment, c as buildNameFromEnvironment, d as createCheckRun, i as uploadFileChanges, l as enabledFromEnvironment, n as readFileChanges, o as getPullRequestNumber, r as uploadAllFileChanges, s as apiTokenFromEnvironment, u as Annotation } from "../index-Disq-dHD.cjs";
1
+ import { a as putIssueComment, c as buildNameFromEnvironment, d as createCheckRun, i as uploadFileChanges, l as enabledFromEnvironment, n as readFileChanges, o as getPullRequestNumber, r as uploadAllFileChanges, s as apiTokenFromEnvironment, u as Annotation } from "../index-CPm5rAMy.cjs";
2
2
  export { type Annotation, apiTokenFromEnvironment, buildNameFromEnvironment, createCheckRun, enabledFromEnvironment, getPullRequestNumber, putIssueComment, readFileChanges, uploadAllFileChanges, uploadFileChanges };
@@ -1,2 +1,2 @@
1
- import { a as putIssueComment, c as buildNameFromEnvironment, d as createCheckRun, i as uploadFileChanges, l as enabledFromEnvironment, n as readFileChanges, o as getPullRequestNumber, r as uploadAllFileChanges, s as apiTokenFromEnvironment, u as Annotation } from "../index-Dsnw8lVr.mjs";
1
+ import { a as putIssueComment, c as buildNameFromEnvironment, d as createCheckRun, i as uploadFileChanges, l as enabledFromEnvironment, n as readFileChanges, o as getPullRequestNumber, r as uploadAllFileChanges, s as apiTokenFromEnvironment, u as Annotation } from "../index-CwdiFn_m.mjs";
2
2
  export { type Annotation, apiTokenFromEnvironment, buildNameFromEnvironment, createCheckRun, enabledFromEnvironment, getPullRequestNumber, putIssueComment, readFileChanges, uploadAllFileChanges, uploadFileChanges };
@@ -1,3 +1,3 @@
1
- import { c as enabledFromEnvironment, o as apiTokenFromEnvironment, s as buildNameFromEnvironment } from "../git-Bjs0WQcc.mjs";
2
- import { a as putIssueComment, i as uploadFileChanges, n as readFileChanges, o as getPullRequestNumber, r as uploadAllFileChanges, s as createCheckRun } from "../github-C4q0zf6K.mjs";
1
+ import { c as enabledFromEnvironment, o as apiTokenFromEnvironment, s as buildNameFromEnvironment } from "../git-DyhV01cl.mjs";
2
+ import { a as putIssueComment, i as uploadFileChanges, n as readFileChanges, o as getPullRequestNumber, r as uploadAllFileChanges, s as createCheckRun } from "../github-zZjo_m67.mjs";
3
3
  export { apiTokenFromEnvironment, buildNameFromEnvironment, createCheckRun, enabledFromEnvironment, getPullRequestNumber, putIssueComment, readFileChanges, uploadAllFileChanges, uploadFileChanges };
@@ -1,6 +1,6 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-DakpK96I.cjs");
2
- const require_error = require("./error-BnrwrJEG.cjs");
3
- const require_git = require("./git-BRIEV0SC.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
2
+ const require_logging = require("./logging-BqpzZfsF.cjs");
3
+ const require_git = require("./git-C-WnhZPj.cjs");
4
4
  let fs_extra = require("fs-extra");
5
5
  fs_extra = require_rolldown_runtime.__toESM(fs_extra, 1);
6
6
  let path = require("path");
@@ -19,7 +19,7 @@ const GITHUB_MAX_ANNOTATIONS = 50;
19
19
  * ```
20
20
  */
21
21
  const suffixTitle = (title, inputAnnotations) => {
22
- return `${title} (${require_error.pluralise(inputAnnotations > GITHUB_MAX_ANNOTATIONS ? GITHUB_MAX_ANNOTATIONS : inputAnnotations, "annotation")} added)`;
22
+ return `${title} (${require_logging.pluralise(inputAnnotations > GITHUB_MAX_ANNOTATIONS ? GITHUB_MAX_ANNOTATIONS : inputAnnotations, "annotation")} added)`;
23
23
  };
24
24
  /**
25
25
  * Enriches the summary with more context about the check run.
@@ -213,6 +213,19 @@ const uploadFileChanges = async ({ dir, branch, messageHeadline, messageBody, fi
213
213
  const authToken = require_git.apiTokenFromEnvironment();
214
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
215
  const [{ owner, repo }, headCommitId] = await Promise.all([require_git.getOwnerAndRepo({ dir }), require_git.getHeadCommitId({ dir })]);
216
+ const input = {
217
+ branch: {
218
+ repositoryNameWithOwner: `${owner}/${repo}`,
219
+ branchName: branch
220
+ },
221
+ message: {
222
+ headline: messageHeadline,
223
+ body: messageBody
224
+ },
225
+ expectedHeadOid: headCommitId,
226
+ clientMutationId: "skuba",
227
+ fileChanges
228
+ };
216
229
  return (await graphql(`
217
230
  mutation Mutation($input: CreateCommitOnBranchInput!) {
218
231
  createCommitOnBranch(input: $input) {
@@ -222,19 +235,7 @@ const uploadFileChanges = async ({ dir, branch, messageHeadline, messageBody, fi
222
235
  }
223
236
  }
224
237
  `, {
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
+ input,
238
239
  headers: { authorization: `Bearer ${authToken}` }
239
240
  })).createCommitOnBranch.commit.oid;
240
241
  };
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
- import { r as pluralise } from "./error-BYLsj5YU.mjs";
3
- import { c as enabledFromEnvironment, h as findRoot, i as fastForwardBranch, l as getOwnerAndRepo, m as getChangedFiles, o as apiTokenFromEnvironment, s as buildNameFromEnvironment, u as getHeadCommitId } from "./git-Bjs0WQcc.mjs";
2
+ import { n as pluralise } from "./logging-BQNEupxh.mjs";
3
+ import { c as enabledFromEnvironment, h as findRoot, i as fastForwardBranch, l as getOwnerAndRepo, m as getChangedFiles, o as apiTokenFromEnvironment, s as buildNameFromEnvironment, u as getHeadCommitId } from "./git-DyhV01cl.mjs";
4
4
  import fs from "fs-extra";
5
5
  import path from "path";
6
6
  //#region src/github/octokit.ts
@@ -96,7 +96,8 @@ const getUserId = async (client) => {
96
96
  const putIssueComment = async (params) => {
97
97
  if (params.body === null && !params.internalId) throw new Error("Cannot remove comment without an internalId");
98
98
  const env = params.env ?? process.env;
99
- const { owner, repo } = await getOwnerAndRepo({ dir: process.cwd() });
99
+ const dir = process.cwd();
100
+ const { owner, repo } = await getOwnerAndRepo({ dir });
100
101
  const client = await createRestClient({ auth: apiTokenFromEnvironment() });
101
102
  const issueNumber = params.issueNumber ?? await getPullRequestNumber({
102
103
  client,
@@ -210,6 +211,19 @@ const uploadFileChanges = async ({ dir, branch, messageHeadline, messageBody, fi
210
211
  const authToken = apiTokenFromEnvironment();
211
212
  if (!authToken) throw new Error("Could not read a GitHub API token from the environment. Please set GITHUB_API_TOKEN or GITHUB_TOKEN.");
212
213
  const [{ owner, repo }, headCommitId] = await Promise.all([getOwnerAndRepo({ dir }), getHeadCommitId({ dir })]);
214
+ const input = {
215
+ branch: {
216
+ repositoryNameWithOwner: `${owner}/${repo}`,
217
+ branchName: branch
218
+ },
219
+ message: {
220
+ headline: messageHeadline,
221
+ body: messageBody
222
+ },
223
+ expectedHeadOid: headCommitId,
224
+ clientMutationId: "skuba",
225
+ fileChanges
226
+ };
213
227
  return (await graphql(`
214
228
  mutation Mutation($input: CreateCommitOnBranchInput!) {
215
229
  createCommitOnBranch(input: $input) {
@@ -219,19 +233,7 @@ const uploadFileChanges = async ({ dir, branch, messageHeadline, messageBody, fi
219
233
  }
220
234
  }
221
235
  `, {
222
- input: {
223
- branch: {
224
- repositoryNameWithOwner: `${owner}/${repo}`,
225
- branchName: branch
226
- },
227
- message: {
228
- headline: messageHeadline,
229
- body: messageBody
230
- },
231
- expectedHeadOid: headCommitId,
232
- clientMutationId: "skuba",
233
- fileChanges
234
- },
236
+ input,
235
237
  headers: { authorization: `Bearer ${authToken}` }
236
238
  })).createCommitOnBranch.commit.oid;
237
239
  };
@@ -11,12 +11,7 @@ interface SocketAddress {
11
11
  * The socket is polled on an interval until it accepts a connection or the
12
12
  * `timeout` is reached.
13
13
  */
14
- declare const waitFor: ({
15
- host,
16
- port,
17
- resolveCompose,
18
- timeout
19
- }: {
14
+ declare const waitFor: ({ host, port, resolveCompose, timeout }: {
20
15
  host?: string;
21
16
  port: number;
22
17
  /**
@@ -11,12 +11,7 @@ interface SocketAddress {
11
11
  * The socket is polled on an interval until it accepts a connection or the
12
12
  * `timeout` is reached.
13
13
  */
14
- declare const waitFor: ({
15
- host,
16
- port,
17
- resolveCompose,
18
- timeout
19
- }: {
14
+ declare const waitFor: ({ host, port, resolveCompose, timeout }: {
20
15
  host?: string;
21
16
  port: number;
22
17
  /**
@@ -12,12 +12,7 @@ interface CommitParameters {
12
12
  /**
13
13
  * Writes a commit to the local Git repository.
14
14
  */
15
- declare const commit: ({
16
- author,
17
- committer,
18
- dir,
19
- message
20
- }: CommitParameters) => Promise<string>;
15
+ declare const commit: ({ author, committer, dir, message }: CommitParameters) => Promise<string>;
21
16
  //#endregion
22
17
  //#region src/git/getChangedFiles.d.ts
23
18
  type ChangedFileState = 'added' | 'modified' | 'deleted';
@@ -57,12 +52,7 @@ type ChangedFilesParameters = {
57
52
  * since the last commit, but can also look at a specific `dst` reference, or
58
53
  * the changes between `src` and `dst` references.
59
54
  */
60
- declare const getChangedFiles: ({
61
- dir,
62
- src,
63
- dst,
64
- ignore
65
- }: ChangedFilesParameters) => Promise<ChangedFile[]>;
55
+ declare const getChangedFiles: ({ dir, src, dst, ignore }: ChangedFilesParameters) => Promise<ChangedFile[]>;
66
56
  //#endregion
67
57
  //#region src/git/commitAllChanges.d.ts
68
58
  interface CommitAllParameters {
@@ -80,13 +70,7 @@ interface CommitAllParameters {
80
70
  /**
81
71
  * Stages all changes and writes a commit to the local Git repository.
82
72
  */
83
- declare const commitAllChanges: ({
84
- dir,
85
- message,
86
- author,
87
- committer,
88
- ignore
89
- }: CommitAllParameters) => Promise<string | undefined>;
73
+ declare const commitAllChanges: ({ dir, message, author, committer, ignore }: CommitAllParameters) => Promise<string | undefined>;
90
74
  //#endregion
91
75
  //#region src/git/currentBranch.d.ts
92
76
  interface CurrentBranchParameters {
@@ -97,10 +81,7 @@ interface CurrentBranchParameters {
97
81
  * Tries to return a Git branch name from CI environment variables, falling back
98
82
  * to the local Git repository when the current working `dir` is supplied.
99
83
  */
100
- declare const currentBranch: ({
101
- dir,
102
- env
103
- }?: CurrentBranchParameters) => Promise<string | undefined>;
84
+ declare const currentBranch: ({ dir, env }?: CurrentBranchParameters) => Promise<string | undefined>;
104
85
  //#endregion
105
86
  //#region src/git/findRoot.d.ts
106
87
  interface FindRootParameters {
@@ -110,9 +91,7 @@ interface FindRootParameters {
110
91
  * Returns the first Git root directory encountered walking up from the provided
111
92
  * `dir`.
112
93
  */
113
- declare const findRoot: ({
114
- dir
115
- }: FindRootParameters) => Promise<string | null>;
94
+ declare const findRoot: ({ dir }: FindRootParameters) => Promise<string | null>;
116
95
  //#endregion
117
96
  //#region src/git/log.d.ts
118
97
  interface GetHeadCommitParameters {
@@ -125,20 +104,14 @@ interface GetHeadCommitParameters {
125
104
  * This tries to extract the commit ID from common CI environment variables,
126
105
  * and falls back to the local Git repository log.
127
106
  */
128
- declare const getHeadCommitId: ({
129
- dir,
130
- env
131
- }: GetHeadCommitParameters) => Promise<string>;
107
+ declare const getHeadCommitId: ({ dir, env }: GetHeadCommitParameters) => Promise<string>;
132
108
  /**
133
109
  * Gets the message of the head commit.
134
110
  *
135
111
  * This tries to extract the message from common CI environment variables,
136
112
  * and falls back to the local Git repository log.
137
113
  */
138
- declare const getHeadCommitMessage: ({
139
- dir,
140
- env
141
- }: GetHeadCommitParameters) => Promise<string>;
114
+ declare const getHeadCommitMessage: ({ dir, env }: GetHeadCommitParameters) => Promise<string>;
142
115
  //#endregion
143
116
  //#region src/git/remote.d.ts
144
117
  interface GetOwnerAndRepoParameters {
@@ -156,10 +129,7 @@ interface GetOwnerAndRepoParameters {
156
129
  * https://github.com/seek-oss/skuba.git
157
130
  * ```
158
131
  */
159
- declare const getOwnerAndRepo: ({
160
- dir,
161
- env
162
- }: GetOwnerAndRepoParameters) => Promise<{
132
+ declare const getOwnerAndRepo: ({ dir, env }: GetOwnerAndRepoParameters) => Promise<{
163
133
  owner: string;
164
134
  repo: string;
165
135
  }>;
@@ -215,14 +185,7 @@ interface PushResult {
215
185
  /**
216
186
  * Pushes the specified `ref` from the local Git repository to a remote.
217
187
  */
218
- declare const push: ({
219
- auth,
220
- dir,
221
- ref,
222
- remote,
223
- remoteRef,
224
- force
225
- }: PushParameters) => Promise<PushResult>;
188
+ declare const push: ({ auth, dir, ref, remote, remoteRef, force }: PushParameters) => Promise<PushResult>;
226
189
  //#endregion
227
190
  //#region src/git/pull.d.ts
228
191
  /**
@@ -258,13 +221,7 @@ interface PullParameters {
258
221
  /**
259
222
  * Fast forwards the specified `ref` on the local Git repository to match the remote branch.
260
223
  */
261
- declare const fastForwardBranch: ({
262
- auth,
263
- dir,
264
- ref,
265
- remote,
266
- remoteRef
267
- }: PullParameters) => Promise<void>;
224
+ declare const fastForwardBranch: ({ auth, dir, ref, remote, remoteRef }: PullParameters) => Promise<void>;
268
225
  //#endregion
269
226
  //#region src/git/reset.d.ts
270
227
  interface ResetParameters {
@@ -277,18 +234,10 @@ interface ResetParameters {
277
234
  * Resets the specified branch in the local Git repository to a particular
278
235
  * commit.
279
236
  */
280
- declare const reset: ({
281
- dir,
282
- branch,
283
- commitId,
284
- hard
285
- }: ResetParameters) => Promise<void>;
237
+ declare const reset: ({ dir, branch, commitId, hard }: ResetParameters) => Promise<void>;
286
238
  //#endregion
287
239
  //#region src/git/isFileGitIgnored.d.ts
288
- declare const isFileGitIgnored: ({
289
- absolutePath,
290
- gitRoot
291
- }: {
240
+ declare const isFileGitIgnored: ({ absolutePath, gitRoot }: {
292
241
  absolutePath: string;
293
242
  gitRoot: string;
294
243
  }) => Promise<boolean>;
@@ -12,12 +12,7 @@ interface CommitParameters {
12
12
  /**
13
13
  * Writes a commit to the local Git repository.
14
14
  */
15
- declare const commit: ({
16
- author,
17
- committer,
18
- dir,
19
- message
20
- }: CommitParameters) => Promise<string>;
15
+ declare const commit: ({ author, committer, dir, message }: CommitParameters) => Promise<string>;
21
16
  //#endregion
22
17
  //#region src/git/getChangedFiles.d.ts
23
18
  type ChangedFileState = 'added' | 'modified' | 'deleted';
@@ -57,12 +52,7 @@ type ChangedFilesParameters = {
57
52
  * since the last commit, but can also look at a specific `dst` reference, or
58
53
  * the changes between `src` and `dst` references.
59
54
  */
60
- declare const getChangedFiles: ({
61
- dir,
62
- src,
63
- dst,
64
- ignore
65
- }: ChangedFilesParameters) => Promise<ChangedFile[]>;
55
+ declare const getChangedFiles: ({ dir, src, dst, ignore }: ChangedFilesParameters) => Promise<ChangedFile[]>;
66
56
  //#endregion
67
57
  //#region src/git/commitAllChanges.d.ts
68
58
  interface CommitAllParameters {
@@ -80,13 +70,7 @@ interface CommitAllParameters {
80
70
  /**
81
71
  * Stages all changes and writes a commit to the local Git repository.
82
72
  */
83
- declare const commitAllChanges: ({
84
- dir,
85
- message,
86
- author,
87
- committer,
88
- ignore
89
- }: CommitAllParameters) => Promise<string | undefined>;
73
+ declare const commitAllChanges: ({ dir, message, author, committer, ignore }: CommitAllParameters) => Promise<string | undefined>;
90
74
  //#endregion
91
75
  //#region src/git/currentBranch.d.ts
92
76
  interface CurrentBranchParameters {
@@ -97,10 +81,7 @@ interface CurrentBranchParameters {
97
81
  * Tries to return a Git branch name from CI environment variables, falling back
98
82
  * to the local Git repository when the current working `dir` is supplied.
99
83
  */
100
- declare const currentBranch: ({
101
- dir,
102
- env
103
- }?: CurrentBranchParameters) => Promise<string | undefined>;
84
+ declare const currentBranch: ({ dir, env }?: CurrentBranchParameters) => Promise<string | undefined>;
104
85
  //#endregion
105
86
  //#region src/git/findRoot.d.ts
106
87
  interface FindRootParameters {
@@ -110,9 +91,7 @@ interface FindRootParameters {
110
91
  * Returns the first Git root directory encountered walking up from the provided
111
92
  * `dir`.
112
93
  */
113
- declare const findRoot: ({
114
- dir
115
- }: FindRootParameters) => Promise<string | null>;
94
+ declare const findRoot: ({ dir }: FindRootParameters) => Promise<string | null>;
116
95
  //#endregion
117
96
  //#region src/git/log.d.ts
118
97
  interface GetHeadCommitParameters {
@@ -125,20 +104,14 @@ interface GetHeadCommitParameters {
125
104
  * This tries to extract the commit ID from common CI environment variables,
126
105
  * and falls back to the local Git repository log.
127
106
  */
128
- declare const getHeadCommitId: ({
129
- dir,
130
- env
131
- }: GetHeadCommitParameters) => Promise<string>;
107
+ declare const getHeadCommitId: ({ dir, env }: GetHeadCommitParameters) => Promise<string>;
132
108
  /**
133
109
  * Gets the message of the head commit.
134
110
  *
135
111
  * This tries to extract the message from common CI environment variables,
136
112
  * and falls back to the local Git repository log.
137
113
  */
138
- declare const getHeadCommitMessage: ({
139
- dir,
140
- env
141
- }: GetHeadCommitParameters) => Promise<string>;
114
+ declare const getHeadCommitMessage: ({ dir, env }: GetHeadCommitParameters) => Promise<string>;
142
115
  //#endregion
143
116
  //#region src/git/remote.d.ts
144
117
  interface GetOwnerAndRepoParameters {
@@ -156,10 +129,7 @@ interface GetOwnerAndRepoParameters {
156
129
  * https://github.com/seek-oss/skuba.git
157
130
  * ```
158
131
  */
159
- declare const getOwnerAndRepo: ({
160
- dir,
161
- env
162
- }: GetOwnerAndRepoParameters) => Promise<{
132
+ declare const getOwnerAndRepo: ({ dir, env }: GetOwnerAndRepoParameters) => Promise<{
163
133
  owner: string;
164
134
  repo: string;
165
135
  }>;
@@ -215,14 +185,7 @@ interface PushResult {
215
185
  /**
216
186
  * Pushes the specified `ref` from the local Git repository to a remote.
217
187
  */
218
- declare const push: ({
219
- auth,
220
- dir,
221
- ref,
222
- remote,
223
- remoteRef,
224
- force
225
- }: PushParameters) => Promise<PushResult>;
188
+ declare const push: ({ auth, dir, ref, remote, remoteRef, force }: PushParameters) => Promise<PushResult>;
226
189
  //#endregion
227
190
  //#region src/git/pull.d.ts
228
191
  /**
@@ -258,13 +221,7 @@ interface PullParameters {
258
221
  /**
259
222
  * Fast forwards the specified `ref` on the local Git repository to match the remote branch.
260
223
  */
261
- declare const fastForwardBranch: ({
262
- auth,
263
- dir,
264
- ref,
265
- remote,
266
- remoteRef
267
- }: PullParameters) => Promise<void>;
224
+ declare const fastForwardBranch: ({ auth, dir, ref, remote, remoteRef }: PullParameters) => Promise<void>;
268
225
  //#endregion
269
226
  //#region src/git/reset.d.ts
270
227
  interface ResetParameters {
@@ -277,18 +234,10 @@ interface ResetParameters {
277
234
  * Resets the specified branch in the local Git repository to a particular
278
235
  * commit.
279
236
  */
280
- declare const reset: ({
281
- dir,
282
- branch,
283
- commitId,
284
- hard
285
- }: ResetParameters) => Promise<void>;
237
+ declare const reset: ({ dir, branch, commitId, hard }: ResetParameters) => Promise<void>;
286
238
  //#endregion
287
239
  //#region src/git/isFileGitIgnored.d.ts
288
- declare const isFileGitIgnored: ({
289
- absolutePath,
290
- gitRoot
291
- }: {
240
+ declare const isFileGitIgnored: ({ absolutePath, gitRoot }: {
292
241
  absolutePath: string;
293
242
  gitRoot: string;
294
243
  }) => Promise<boolean>;
@@ -1,7 +1,6 @@
1
- import { f as ChangedFile } from "./index-CyA0bI1V.mjs";
1
+ import { f as ChangedFile } from "./index-CLEYcnJY.cjs";
2
2
  import { Endpoints } from "@octokit/types";
3
3
  import { Octokit } from "@octokit/rest";
4
-
5
4
  //#region src/github/checkRun.d.ts
6
5
  type Output = NonNullable<Endpoints['PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}']['parameters']['output']>;
7
6
  type Annotation = NonNullable<Output['annotations']>[number];
@@ -44,14 +43,7 @@ interface CreateCheckRunParameters {
44
43
  * A `GITHUB_API_TOKEN` or `GITHUB_TOKEN` with the `checks:write` permission
45
44
  * must be present on the environment.
46
45
  */
47
- declare const createCheckRun: ({
48
- annotations,
49
- conclusion,
50
- name,
51
- summary,
52
- text,
53
- title
54
- }: CreateCheckRunParameters) => Promise<void>;
46
+ declare const createCheckRun: ({ annotations, conclusion, name, summary, text, title }: CreateCheckRunParameters) => Promise<void>;
55
47
  //#endregion
56
48
  //#region src/github/environment.d.ts
57
49
  /**
@@ -193,14 +185,7 @@ interface UploadAllFileChangesParams {
193
185
  * This will not update the local Git repository unless `updateLocal` is
194
186
  * specified.
195
187
  */
196
- declare const uploadAllFileChanges: ({
197
- branch,
198
- dir,
199
- messageHeadline,
200
- ignore,
201
- messageBody,
202
- updateLocal
203
- }: UploadAllFileChangesParams) => Promise<string | undefined>;
188
+ declare const uploadAllFileChanges: ({ branch, dir, messageHeadline, ignore, messageBody, updateLocal }: UploadAllFileChangesParams) => Promise<string | undefined>;
204
189
  interface FileAddition {
205
190
  contents: unknown;
206
191
  path: string;
@@ -245,13 +230,7 @@ interface UploadFileChangesParams {
245
230
  *
246
231
  * This will not update the local Git repository.
247
232
  */
248
- declare const uploadFileChanges: ({
249
- dir,
250
- branch,
251
- messageHeadline,
252
- messageBody,
253
- fileChanges
254
- }: UploadFileChangesParams) => Promise<string>;
233
+ declare const uploadFileChanges: ({ dir, branch, messageHeadline, messageBody, fileChanges }: UploadFileChangesParams) => Promise<string>;
255
234
  declare namespace index_d_exports {
256
235
  export { Annotation, apiTokenFromEnvironment, buildNameFromEnvironment, createCheckRun, enabledFromEnvironment, getPullRequestNumber, putIssueComment, readFileChanges, uploadAllFileChanges, uploadFileChanges };
257
236
  }
@@ -1,7 +1,6 @@
1
- import { f as ChangedFile } from "./index-CyA0bI1V.cjs";
1
+ import { f as ChangedFile } from "./index-CLEYcnJY.mjs";
2
2
  import { Endpoints } from "@octokit/types";
3
3
  import { Octokit } from "@octokit/rest";
4
-
5
4
  //#region src/github/checkRun.d.ts
6
5
  type Output = NonNullable<Endpoints['PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}']['parameters']['output']>;
7
6
  type Annotation = NonNullable<Output['annotations']>[number];
@@ -44,14 +43,7 @@ interface CreateCheckRunParameters {
44
43
  * A `GITHUB_API_TOKEN` or `GITHUB_TOKEN` with the `checks:write` permission
45
44
  * must be present on the environment.
46
45
  */
47
- declare const createCheckRun: ({
48
- annotations,
49
- conclusion,
50
- name,
51
- summary,
52
- text,
53
- title
54
- }: CreateCheckRunParameters) => Promise<void>;
46
+ declare const createCheckRun: ({ annotations, conclusion, name, summary, text, title }: CreateCheckRunParameters) => Promise<void>;
55
47
  //#endregion
56
48
  //#region src/github/environment.d.ts
57
49
  /**
@@ -193,14 +185,7 @@ interface UploadAllFileChangesParams {
193
185
  * This will not update the local Git repository unless `updateLocal` is
194
186
  * specified.
195
187
  */
196
- declare const uploadAllFileChanges: ({
197
- branch,
198
- dir,
199
- messageHeadline,
200
- ignore,
201
- messageBody,
202
- updateLocal
203
- }: UploadAllFileChangesParams) => Promise<string | undefined>;
188
+ declare const uploadAllFileChanges: ({ branch, dir, messageHeadline, ignore, messageBody, updateLocal }: UploadAllFileChangesParams) => Promise<string | undefined>;
204
189
  interface FileAddition {
205
190
  contents: unknown;
206
191
  path: string;
@@ -245,13 +230,7 @@ interface UploadFileChangesParams {
245
230
  *
246
231
  * This will not update the local Git repository.
247
232
  */
248
- declare const uploadFileChanges: ({
249
- dir,
250
- branch,
251
- messageHeadline,
252
- messageBody,
253
- fileChanges
254
- }: UploadFileChangesParams) => Promise<string>;
233
+ declare const uploadFileChanges: ({ dir, branch, messageHeadline, messageBody, fileChanges }: UploadFileChangesParams) => Promise<string>;
255
234
  declare namespace index_d_exports {
256
235
  export { Annotation, apiTokenFromEnvironment, buildNameFromEnvironment, createCheckRun, enabledFromEnvironment, getPullRequestNumber, putIssueComment, readFileChanges, uploadAllFileChanges, uploadFileChanges };
257
236
  }
package/lib/index.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_buildkite = require("./buildkite-_FU8d_a-.cjs");
2
+ const require_buildkite = require("./buildkite-z4owathk.cjs");
3
3
  const require_cdk_index = require("./cdk/index.cjs");
4
- const require_git = require("./git-BRIEV0SC.cjs");
5
- const require_github = require("./github-CMoF4jl9.cjs");
6
- const require_net = require("./net-4Ly1AB2r.cjs");
4
+ const require_git = require("./git-C-WnhZPj.cjs");
5
+ const require_github = require("./github-v-R9t-n8.cjs");
6
+ const require_net = require("./net-HILKQTAq.cjs");
7
7
  Object.defineProperty(exports, "Buildkite", {
8
8
  enumerable: true,
9
9
  get: function() {
package/lib/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { t as index_d_exports } from "./index-CNxgBJm_.cjs";
2
2
  import { t as index_d_exports$1 } from "./cdk/index.cjs";
3
- import { t as index_d_exports$2 } from "./index-CyA0bI1V.cjs";
4
- import { t as index_d_exports$3 } from "./index-Disq-dHD.cjs";
5
- import { t as index_d_exports$4 } from "./index-Kyp8ZCwF.cjs";
3
+ import { t as index_d_exports$2 } from "./index-CLEYcnJY.cjs";
4
+ import { t as index_d_exports$3 } from "./index-CPm5rAMy.cjs";
5
+ import { t as index_d_exports$4 } from "./index-C9lVo3vU.cjs";
6
6
  export { index_d_exports as Buildkite, index_d_exports$1 as Cdk, index_d_exports$2 as Git, index_d_exports$3 as GitHub, index_d_exports$4 as Net };
package/lib/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { t as index_d_exports } from "./index-CNxgBJm_.mjs";
2
2
  import { t as index_d_exports$1 } from "./cdk/index.mjs";
3
- import { t as index_d_exports$2 } from "./index-CyA0bI1V.mjs";
4
- import { t as index_d_exports$3 } from "./index-Dsnw8lVr.mjs";
5
- import { t as index_d_exports$4 } from "./index-Kyp8ZCwF.mjs";
3
+ import { t as index_d_exports$2 } from "./index-CLEYcnJY.mjs";
4
+ import { t as index_d_exports$3 } from "./index-CwdiFn_m.mjs";
5
+ import { t as index_d_exports$4 } from "./index-C9lVo3vU.mjs";
6
6
  export { index_d_exports as Buildkite, index_d_exports$1 as Cdk, index_d_exports$2 as Git, index_d_exports$3 as GitHub, index_d_exports$4 as Net };
package/lib/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { t as buildkite_exports } from "./buildkite-DdGh6ljO.mjs";
1
+ import { t as buildkite_exports } from "./buildkite-C7bwlxiU.mjs";
2
2
  import { t as cdk_exports } from "./cdk/index.mjs";
3
- import { t as git_exports } from "./git-Bjs0WQcc.mjs";
4
- import { t as github_exports } from "./github-C4q0zf6K.mjs";
5
- import { t as net_exports } from "./net-Bi0PXcTy.mjs";
3
+ import { t as git_exports } from "./git-DyhV01cl.mjs";
4
+ import { t as github_exports } from "./github-zZjo_m67.mjs";
5
+ import { t as net_exports } from "./net-Bf2HV_vG.mjs";
6
6
  export { buildkite_exports as Buildkite, cdk_exports as Cdk, git_exports as Git, github_exports as GitHub, net_exports as Net };
@@ -1,4 +1,3 @@
1
- import * as z from "zod/v4";
2
1
  import { styleText } from "node:util";
3
2
  //#region ../../src/utils/logging.ts
4
3
  const createLogger = ({ debug, prefixes = [], suffixes = [] }) => {
@@ -26,17 +25,4 @@ const createLogger = ({ debug, prefixes = [], suffixes = [] }) => {
26
25
  const log = createLogger({ debug: false });
27
26
  const pluralise = (count, subject) => `${count} ${subject}${count === 1 ? "" : "s"}`;
28
27
  //#endregion
29
- //#region ../../src/utils/validation.ts
30
- const isObject = (value) => typeof value === "object" && value !== null;
31
- const hasProp = (value, prop) => isObject(value) && value.hasOwnProperty(prop);
32
- z.array(z.object({
33
- command: z.object({
34
- command: z.string(),
35
- name: z.string()
36
- }),
37
- index: z.number(),
38
- exitCode: z.number()
39
- }));
40
- const isErrorWithCode = (err, code) => hasProp(err, "code") && err.code === code;
41
- //#endregion
42
- export { log as n, pluralise as r, isErrorWithCode as t };
28
+ export { pluralise as n, log as t };
@@ -1,7 +1,3 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-DakpK96I.cjs");
2
- require("util");
3
- let zod_v4 = require("zod/v4");
4
- zod_v4 = require_rolldown_runtime.__toESM(zod_v4, 1);
5
1
  let node_util = require("node:util");
6
2
  //#region ../../src/utils/logging.ts
7
3
  const createLogger = ({ debug, prefixes = [], suffixes = [] }) => {
@@ -29,25 +25,6 @@ const createLogger = ({ debug, prefixes = [], suffixes = [] }) => {
29
25
  const log = createLogger({ debug: false });
30
26
  const pluralise = (count, subject) => `${count} ${subject}${count === 1 ? "" : "s"}`;
31
27
  //#endregion
32
- //#region ../../src/utils/validation.ts
33
- const isObject = (value) => typeof value === "object" && value !== null;
34
- const hasProp = (value, prop) => isObject(value) && value.hasOwnProperty(prop);
35
- zod_v4.array(zod_v4.object({
36
- command: zod_v4.object({
37
- command: zod_v4.string(),
38
- name: zod_v4.string()
39
- }),
40
- index: zod_v4.number(),
41
- exitCode: zod_v4.number()
42
- }));
43
- const isErrorWithCode = (err, code) => hasProp(err, "code") && err.code === code;
44
- //#endregion
45
- Object.defineProperty(exports, "isErrorWithCode", {
46
- enumerable: true,
47
- get: function() {
48
- return isErrorWithCode;
49
- }
50
- });
51
28
  Object.defineProperty(exports, "log", {
52
29
  enumerable: true,
53
30
  get: function() {
package/lib/net/index.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_net = require("../net-4Ly1AB2r.cjs");
2
+ const require_net = require("../net-HILKQTAq.cjs");
3
3
  exports.waitFor = require_net.waitFor;
@@ -1,2 +1,2 @@
1
- import { n as waitFor } from "../index-Kyp8ZCwF.cjs";
1
+ import { n as waitFor } from "../index-C9lVo3vU.cjs";
2
2
  export { waitFor };
@@ -1,2 +1,2 @@
1
- import { n as waitFor } from "../index-Kyp8ZCwF.mjs";
1
+ import { n as waitFor } from "../index-C9lVo3vU.mjs";
2
2
  export { waitFor };
package/lib/net/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { n as waitFor } from "../net-Bi0PXcTy.mjs";
1
+ import { n as waitFor } from "../net-Bf2HV_vG.mjs";
2
2
  export { waitFor };
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
- import { t as createExec } from "./exec-CbhqWxN4.mjs";
2
+ import { t as createExec } from "./exec-Csi1HI7c.mjs";
3
3
  import net from "net";
4
4
  //#region src/net/compose.ts
5
5
  const portStringToNumber = (portString) => {
@@ -1,5 +1,5 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-DakpK96I.cjs");
2
- const require_exec = require("./exec-Da3EoDZ1.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
2
+ const require_exec = require("./exec-DCUB5Shx.cjs");
3
3
  let net = require("net");
4
4
  net = require_rolldown_runtime.__toESM(net, 1);
5
5
  //#region src/net/compose.ts
@@ -24,7 +24,7 @@ var __copyProps = (to, from, except, desc) => {
24
24
  }
25
25
  return to;
26
26
  };
27
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
27
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
28
28
  value: mod,
29
29
  enumerable: true
30
30
  }) : target, mod));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skuba-lib/api",
3
- "version": "2.3.0-unwind-datadog-lambda-hacks-20260716065331",
3
+ "version": "2.3.1-sam-test-20260818032125",
4
4
  "description": "Node.js development API for skuba",
5
5
  "homepage": "https://github.com/seek-oss/skuba#readme",
6
6
  "bugs": {
@@ -55,7 +55,7 @@
55
55
  "dependencies": {
56
56
  "@octokit/graphql": "^9.0.0",
57
57
  "@octokit/rest": "^22.0.0",
58
- "@octokit/types": "^16.0.0",
58
+ "@octokit/types": "^17.0.0",
59
59
  "concurrently": "^10.0.0",
60
60
  "execa": "^9.6.1",
61
61
  "fs-extra": "^11.0.0",