@skuba-lib/api 3.0.1 → 3.1.0-handle-test-envs-better-20261028234113

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 (63) hide show
  1. package/lib/buildkite/index.cjs +1 -1
  2. package/lib/buildkite/index.d.cts +1 -1
  3. package/lib/buildkite/index.d.mts +1 -1
  4. package/lib/buildkite/index.mjs +1 -2
  5. package/lib/{buildkite-D6oioQR_.mjs → buildkite-ChVcxGm7.mjs} +6 -9
  6. package/lib/{buildkite-Br2Fyde2.cjs → buildkite-ClGGPaJV.cjs} +6 -9
  7. package/lib/cdk/index.cjs +2 -12
  8. package/lib/cdk/index.d.cts +2 -6
  9. package/lib/cdk/index.d.mts +2 -6
  10. package/lib/cdk/index.mjs +1 -7
  11. package/lib/cdk-BvLDfu0E.cjs +16 -0
  12. package/lib/cdk-BzLbww9n.mjs +6 -0
  13. package/lib/{error-UWg8a0Ma.mjs → error-B7tbxXTQ.mjs} +2 -4
  14. package/lib/{error-C1BybmHW.cjs → error-CG8rNpOB.cjs} +2 -4
  15. package/lib/{exec-DqBpB5Vp.cjs → exec-BIvSnwhj.cjs} +11 -9
  16. package/lib/{exec-GeacTdU5.mjs → exec-DC-QAW0e.mjs} +10 -8
  17. package/lib/{fs-Cjt5C6XD.mjs → fs-Bac0LYeg.mjs} +2 -3
  18. package/lib/{fs-CuSraRTN.cjs → fs-DF1Qj2xv.cjs} +3 -4
  19. package/lib/git/index.cjs +1 -1
  20. package/lib/git/index.d.cts +1 -1
  21. package/lib/git/index.d.mts +1 -1
  22. package/lib/git/index.mjs +1 -2
  23. package/lib/{git-CSGc8r3Q.cjs → git-BOuG-9aF.cjs} +18 -32
  24. package/lib/{git-BygvGOZr.mjs → git-DsCvTj_4.mjs} +16 -30
  25. package/lib/github/index.cjs +2 -2
  26. package/lib/github/index.d.cts +1 -1
  27. package/lib/github/index.d.mts +1 -1
  28. package/lib/github/index.mjs +2 -2
  29. package/lib/{github-BLyV25Ac.mjs → github-B_q9oeR0.mjs} +11 -16
  30. package/lib/{github-CuWb88m1.cjs → github-CY8WyO3R.cjs} +11 -16
  31. package/lib/{index-J0PI37zH.d.mts → index-BIoXUgOB.d.mts} +8 -12
  32. package/lib/{index-BKHTGdUP.d.cts → index-BWrOiE96.d.cts} +5 -2
  33. package/lib/{index-BKHTGdUP.d.mts → index-BWrOiE96.d.mts} +5 -2
  34. package/lib/{index-CLEYcnJY.d.cts → index-CX5l1M9F.d.cts} +0 -22
  35. package/lib/{index-CLEYcnJY.d.mts → index-CX5l1M9F.d.mts} +0 -22
  36. package/lib/{index-CNxgBJm_.d.cts → index-DhV1vmV_.d.cts} +0 -4
  37. package/lib/{index-CNxgBJm_.d.mts → index-DhV1vmV_.d.mts} +0 -4
  38. package/lib/index-i7y5Qwvk.d.cts +5 -0
  39. package/lib/index-i7y5Qwvk.d.mts +5 -0
  40. package/lib/{index--hWvZI6b.d.cts → index-ozhcNkrB.d.cts} +8 -12
  41. package/lib/{index-C9lVo3vU.d.cts → index-tjm5vla2.d.cts} +0 -4
  42. package/lib/{index-C9lVo3vU.d.mts → index-tjm5vla2.d.mts} +0 -4
  43. package/lib/index.cjs +7 -7
  44. package/lib/index.d.cts +6 -6
  45. package/lib/index.d.mts +6 -6
  46. package/lib/index.mjs +6 -6
  47. package/lib/{logging-BQNEupxh.mjs → logging-BnwLxc05.mjs} +1 -2
  48. package/lib/{logging-BqpzZfsF.cjs → logging-DlMiOLHo.cjs} +1 -2
  49. package/lib/net/index.cjs +1 -1
  50. package/lib/net/index.d.cts +1 -1
  51. package/lib/net/index.d.mts +1 -1
  52. package/lib/net/index.mjs +1 -2
  53. package/lib/{net-BONidEnf.cjs → net-B0uYVMTV.cjs} +6 -10
  54. package/lib/{net-BxPK6QHR.mjs → net-Biz58RYT.mjs} +6 -10
  55. package/lib/rolldown/index.cjs +1 -1
  56. package/lib/rolldown/index.d.cts +1 -1
  57. package/lib/rolldown/index.d.mts +1 -1
  58. package/lib/rolldown/index.mjs +1 -2
  59. package/lib/{rolldown-B47lAoi7.cjs → rolldown-CR7S2KPn.cjs} +55 -12
  60. package/lib/{rolldown-runtime-C0BPl7ul.cjs → rolldown-runtime-BW-eSwOZ.cjs} +1 -2
  61. package/lib/{rolldown-runtime-D7D4PA-g.mjs → rolldown-runtime-D8jQpDG7.mjs} +1 -2
  62. package/lib/{rolldown-CHdN4G5F.mjs → rolldown-rxuJncaa.mjs} +55 -12
  63. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_buildkite = require("../buildkite-Br2Fyde2.cjs");
2
+ const require_buildkite = require("../buildkite-ClGGPaJV.cjs");
3
3
  exports.annotate = require_buildkite.annotate;
4
4
  exports.md = require_buildkite.md;
@@ -1,2 +1,2 @@
1
- import { i as annotate, n as md, r as AnnotationStyle } from "../index-CNxgBJm_.cjs";
1
+ import { i as annotate, n as md, r as AnnotationStyle } from "../index-DhV1vmV_.cjs";
2
2
  export { type AnnotationStyle, annotate, md };
@@ -1,2 +1,2 @@
1
- import { i as annotate, n as md, r as AnnotationStyle } from "../index-CNxgBJm_.mjs";
1
+ import { i as annotate, n as md, r as AnnotationStyle } from "../index-DhV1vmV_.mjs";
2
2
  export { type AnnotationStyle, annotate, md };
@@ -1,2 +1 @@
1
- import { n as md, r as annotate } from "../buildkite-D6oioQR_.mjs";
2
- export { annotate, md };
1
+ export { r as annotate, n as md } from "../buildkite-ChVcxGm7.mjs";
@@ -1,7 +1,7 @@
1
- import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
- import { t as log } from "./logging-BQNEupxh.mjs";
3
- import { n as exec, r as hasCommand } from "./exec-GeacTdU5.mjs";
4
- //#region src/buildkite/annotate.ts
1
+ import { t as __exportAll } from "./rolldown-runtime-D8jQpDG7.mjs";
2
+ import { t as log } from "./logging-BnwLxc05.mjs";
3
+ import { n as exec, r as hasCommand } from "./exec-DC-QAW0e.mjs";
4
+ // 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
6
  const TRUNCATION_WARNING = "... [Truncated due to size limit]";
7
7
  /**
@@ -27,17 +27,14 @@ const annotate = async (markdown, opts = {}) => {
27
27
  const { style } = opts;
28
28
  await exec("buildkite-agent", "annotate", ...context ? ["--context", context] : [], ...style ? ["--style", style] : [], truncatedMarkdown);
29
29
  };
30
- //#endregion
31
- //#region src/buildkite/md.ts
30
+ // src/buildkite/md.ts
32
31
  /**
33
32
  * @internal
34
33
  */
35
34
  const md = { terminal: (code) => `\`\`\`term\n${code.replace(/```/g, "\\`\\`\\`")}\n\`\`\`` };
36
- //#endregion
37
- //#region src/buildkite/index.ts
35
+ // src/buildkite/index.ts
38
36
  var buildkite_exports = /* @__PURE__ */ __exportAll({
39
37
  annotate: () => annotate,
40
38
  md: () => md
41
39
  });
42
- //#endregion
43
40
  export { md as n, annotate as r, buildkite_exports as t };
@@ -1,7 +1,7 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
2
- const require_logging = require("./logging-BqpzZfsF.cjs");
3
- const require_exec = require("./exec-DqBpB5Vp.cjs");
4
- //#region src/buildkite/annotate.ts
1
+ const require_rolldown_runtime = require("./rolldown-runtime-BW-eSwOZ.cjs");
2
+ const require_logging = require("./logging-DlMiOLHo.cjs");
3
+ const require_exec = require("./exec-BIvSnwhj.cjs");
4
+ // 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
6
  const TRUNCATION_WARNING = "... [Truncated due to size limit]";
7
7
  /**
@@ -27,19 +27,16 @@ const annotate = async (markdown, opts = {}) => {
27
27
  const { style } = opts;
28
28
  await require_exec.exec("buildkite-agent", "annotate", ...context ? ["--context", context] : [], ...style ? ["--style", style] : [], truncatedMarkdown);
29
29
  };
30
- //#endregion
31
- //#region src/buildkite/md.ts
30
+ // src/buildkite/md.ts
32
31
  /**
33
32
  * @internal
34
33
  */
35
34
  const md = { terminal: (code) => `\`\`\`term\n${code.replace(/```/g, "\\`\\`\\`")}\n\`\`\`` };
36
- //#endregion
37
- //#region src/buildkite/index.ts
35
+ // src/buildkite/index.ts
38
36
  var buildkite_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
39
37
  annotate: () => annotate,
40
38
  md: () => md
41
39
  });
42
- //#endregion
43
40
  Object.defineProperty(exports, "annotate", {
44
41
  enumerable: true,
45
42
  get: function() {
package/lib/cdk/index.cjs CHANGED
@@ -1,13 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region src/cdk/index.ts
3
- var cdk_exports = /* @__PURE__ */ require("../rolldown-runtime-C0BPl7ul.cjs").__exportAll({ normaliseTemplate: () => normaliseTemplate });
4
- const normaliseTemplateJsonString = (json) => json.replace(/"S3Key":"([0-9a-f]+)\.zip"/g, (_, hash) => `"S3Key":"${"x".repeat(hash.length)}.zip"`).replace(/CurrentVersion([0-9a-zA-Z]+)"/g, (_, hash) => `CurrentVersion${"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
- const normaliseTemplate = (template) => JSON.parse(normaliseTemplateJsonString(JSON.stringify(template)));
6
- //#endregion
7
- Object.defineProperty(exports, "cdk_exports", {
8
- enumerable: true,
9
- get: function() {
10
- return cdk_exports;
11
- }
12
- });
13
- exports.normaliseTemplate = normaliseTemplate;
2
+ const require_cdk = require("../cdk-BvLDfu0E.cjs");
3
+ exports.normaliseTemplate = require_cdk.normaliseTemplate;
@@ -1,6 +1,2 @@
1
- declare namespace index_d_exports {
2
- export { normaliseTemplate };
3
- }
4
- export declare const normaliseTemplate: (template: object) => unknown;
5
- //#endregion
6
- export { index_d_exports as t };
1
+ import { n as normaliseTemplate } from "../index-i7y5Qwvk.cjs";
2
+ export { normaliseTemplate };
@@ -1,6 +1,2 @@
1
- declare namespace index_d_exports {
2
- export { normaliseTemplate };
3
- }
4
- export declare const normaliseTemplate: (template: object) => unknown;
5
- //#endregion
6
- export { index_d_exports as t };
1
+ import { n as normaliseTemplate } from "../index-i7y5Qwvk.mjs";
2
+ export { normaliseTemplate };
package/lib/cdk/index.mjs CHANGED
@@ -1,7 +1 @@
1
- import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.mjs";
2
- //#region src/cdk/index.ts
3
- var cdk_exports = /* @__PURE__ */ __exportAll({ normaliseTemplate: () => normaliseTemplate });
4
- const normaliseTemplateJsonString = (json) => json.replace(/"S3Key":"([0-9a-f]+)\.zip"/g, (_, hash) => `"S3Key":"${"x".repeat(hash.length)}.zip"`).replace(/CurrentVersion([0-9a-zA-Z]+)"/g, (_, hash) => `CurrentVersion${"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
- const normaliseTemplate = (template) => JSON.parse(normaliseTemplateJsonString(JSON.stringify(template)));
6
- //#endregion
7
- export { normaliseTemplate, cdk_exports as t };
1
+ export { n as normaliseTemplate } from "../cdk-BzLbww9n.mjs";
@@ -0,0 +1,16 @@
1
+ // src/cdk/index.ts
2
+ var cdk_exports = /* @__PURE__ */ require("./rolldown-runtime-BW-eSwOZ.cjs").__exportAll({ normaliseTemplate: () => normaliseTemplate });
3
+ const normaliseTemplateJsonString = (json) => json.replace(/"S3Key":"([0-9a-f]+)\.zip"/g, (_, hash) => `"S3Key":"${"x".repeat(hash.length)}.zip"`).replace(/CurrentVersion([0-9a-zA-Z]+)"/g, (_, hash) => `CurrentVersion${"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`);
4
+ const normaliseTemplate = (template) => JSON.parse(normaliseTemplateJsonString(JSON.stringify(template)));
5
+ Object.defineProperty(exports, "cdk_exports", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return cdk_exports;
9
+ }
10
+ });
11
+ Object.defineProperty(exports, "normaliseTemplate", {
12
+ enumerable: true,
13
+ get: function() {
14
+ return normaliseTemplate;
15
+ }
16
+ });
@@ -0,0 +1,6 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-D8jQpDG7.mjs";
2
+ // src/cdk/index.ts
3
+ var cdk_exports = /* @__PURE__ */ __exportAll({ normaliseTemplate: () => normaliseTemplate });
4
+ const normaliseTemplateJsonString = (json) => json.replace(/"S3Key":"([0-9a-f]+)\.zip"/g, (_, hash) => `"S3Key":"${"x".repeat(hash.length)}.zip"`).replace(/CurrentVersion([0-9a-zA-Z]+)"/g, (_, hash) => `CurrentVersion${"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
+ const normaliseTemplate = (template) => JSON.parse(normaliseTemplateJsonString(JSON.stringify(template)));
6
+ export { normaliseTemplate as n, cdk_exports as t };
@@ -1,8 +1,6 @@
1
- //#region ../../src/utils/validation.ts
1
+ // ../../src/utils/validation.ts
2
2
  const isObject = (value) => typeof value === "object" && value !== null;
3
3
  const hasProp = (value, prop) => isObject(value) && value.hasOwnProperty(prop);
4
- //#endregion
5
- //#region ../../src/utils/error.ts
4
+ // ../../src/utils/error.ts
6
5
  const isErrorWithCode = (err, code) => hasProp(err, "code") && err.code === code;
7
- //#endregion
8
6
  export { isErrorWithCode as t };
@@ -1,11 +1,9 @@
1
1
  require("util");
2
- //#region ../../src/utils/validation.ts
2
+ // ../../src/utils/validation.ts
3
3
  const isObject = (value) => typeof value === "object" && value !== null;
4
4
  const hasProp = (value, prop) => isObject(value) && value.hasOwnProperty(prop);
5
- //#endregion
6
- //#region ../../src/utils/error.ts
5
+ // ../../src/utils/error.ts
7
6
  const isErrorWithCode = (err, code) => hasProp(err, "code") && err.code === code;
8
- //#endregion
9
7
  Object.defineProperty(exports, "isErrorWithCode", {
10
8
  enumerable: true,
11
9
  get: function() {
@@ -1,5 +1,5 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
2
- const require_error = require("./error-C1BybmHW.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-BW-eSwOZ.cjs");
2
+ const require_error = require("./error-CG8rNpOB.cjs");
3
3
  let stream = require("stream");
4
4
  stream = require_rolldown_runtime.__toESM(stream, 1);
5
5
  let util = require("util");
@@ -7,7 +7,7 @@ util = require_rolldown_runtime.__toESM(util, 1);
7
7
  let execa = require("execa");
8
8
  let npm_which = require("npm-which");
9
9
  npm_which = require_rolldown_runtime.__toESM(npm_which, 1);
10
- //#region ../../src/utils/exec.ts
10
+ // ../../src/utils/exec.ts
11
11
  var YarnSpamFilter = class extends stream.default.Transform {
12
12
  silenced = false;
13
13
  _transform(chunk, _encoding, callback) {
@@ -23,13 +23,16 @@ var YarnWarningFilter = class extends stream.default.Transform {
23
23
  callback();
24
24
  }
25
25
  };
26
- const runCommand = (command, args, { streamStdio, ...execaOptions } = {}) => {
27
- const subprocess = (0, execa.execa)(command, args, {
26
+ const runCommand = (command, args, options) => {
27
+ const { streamStdio } = options;
28
+ const execaOptions = {
28
29
  localDir: __dirname,
29
30
  preferLocal: true,
30
31
  stdio: "inherit",
31
- ...execaOptions
32
- });
32
+ ...options
33
+ };
34
+ delete execaOptions.streamStdio;
35
+ const subprocess = (0, execa.execa)(command, args, execaOptions);
33
36
  switch (streamStdio) {
34
37
  case "yarn":
35
38
  const stderrFilter = new YarnWarningFilter();
@@ -47,7 +50,7 @@ const runCommand = (command, args, { streamStdio, ...execaOptions } = {}) => {
47
50
  const whichCallback = (0, npm_which.default)(__dirname);
48
51
  const which = util.default.promisify(whichCallback);
49
52
  const createExec = (opts) => (command, ...args) => runCommand(command, args, opts);
50
- const exec = (command, ...args) => runCommand(command, args);
53
+ const exec = (command, ...args) => runCommand(command, args, {});
51
54
  const hasCommand = async (name) => {
52
55
  try {
53
56
  await which(name);
@@ -57,7 +60,6 @@ const hasCommand = async (name) => {
57
60
  throw err;
58
61
  }
59
62
  };
60
- //#endregion
61
63
  Object.defineProperty(exports, "createExec", {
62
64
  enumerable: true,
63
65
  get: function() {
@@ -1,9 +1,9 @@
1
- import { t as isErrorWithCode } from "./error-UWg8a0Ma.mjs";
1
+ import { t as isErrorWithCode } from "./error-B7tbxXTQ.mjs";
2
2
  import stream from "stream";
3
3
  import util from "util";
4
4
  import { execa } from "execa";
5
5
  import npmWhich from "npm-which";
6
- //#region ../../src/utils/exec.ts
6
+ // ../../src/utils/exec.ts
7
7
  var YarnSpamFilter = class extends stream.Transform {
8
8
  silenced = false;
9
9
  _transform(chunk, _encoding, callback) {
@@ -19,13 +19,16 @@ var YarnWarningFilter = class extends stream.Transform {
19
19
  callback();
20
20
  }
21
21
  };
22
- const runCommand = (command, args, { streamStdio, ...execaOptions } = {}) => {
23
- const subprocess = execa(command, args, {
22
+ const runCommand = (command, args, options) => {
23
+ const { streamStdio } = options;
24
+ const execaOptions = {
24
25
  localDir: import.meta.dirname,
25
26
  preferLocal: true,
26
27
  stdio: "inherit",
27
- ...execaOptions
28
- });
28
+ ...options
29
+ };
30
+ delete execaOptions.streamStdio;
31
+ const subprocess = execa(command, args, execaOptions);
29
32
  switch (streamStdio) {
30
33
  case "yarn":
31
34
  const stderrFilter = new YarnWarningFilter();
@@ -43,7 +46,7 @@ const runCommand = (command, args, { streamStdio, ...execaOptions } = {}) => {
43
46
  const whichCallback = npmWhich(import.meta.dirname);
44
47
  const which = util.promisify(whichCallback);
45
48
  const createExec = (opts) => (command, ...args) => runCommand(command, args, opts);
46
- const exec = (command, ...args) => runCommand(command, args);
49
+ const exec = (command, ...args) => runCommand(command, args, {});
47
50
  const hasCommand = async (name) => {
48
51
  try {
49
52
  await which(name);
@@ -53,5 +56,4 @@ const hasCommand = async (name) => {
53
56
  throw err;
54
57
  }
55
58
  };
56
- //#endregion
57
59
  export { exec as n, hasCommand as r, createExec as t };
@@ -1,6 +1,6 @@
1
- import { t as isErrorWithCode } from "./error-UWg8a0Ma.mjs";
1
+ import { t as isErrorWithCode } from "./error-B7tbxXTQ.mjs";
2
2
  import fs from "fs-extra";
3
- //#region ../../src/utils/fs.ts
3
+ // ../../src/utils/fs.ts
4
4
  const pathExists = async (filePath) => {
5
5
  try {
6
6
  await fs.promises.access(filePath);
@@ -10,5 +10,4 @@ const pathExists = async (filePath) => {
10
10
  throw error;
11
11
  }
12
12
  };
13
- //#endregion
14
13
  export { pathExists as t };
@@ -1,8 +1,8 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
2
- const require_error = require("./error-C1BybmHW.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-BW-eSwOZ.cjs");
2
+ const require_error = require("./error-CG8rNpOB.cjs");
3
3
  let fs_extra = require("fs-extra");
4
4
  fs_extra = require_rolldown_runtime.__toESM(fs_extra, 1);
5
- //#region ../../src/utils/fs.ts
5
+ // ../../src/utils/fs.ts
6
6
  const pathExists = async (filePath) => {
7
7
  try {
8
8
  await fs_extra.default.promises.access(filePath);
@@ -12,7 +12,6 @@ const pathExists = async (filePath) => {
12
12
  throw error;
13
13
  }
14
14
  };
15
- //#endregion
16
15
  Object.defineProperty(exports, "pathExists", {
17
16
  enumerable: true,
18
17
  get: function() {
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-CSGc8r3Q.cjs");
2
+ const require_git = require("../git-BOuG-9aF.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-CLEYcnJY.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-CX5l1M9F.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-CLEYcnJY.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-CX5l1M9F.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 @@
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-BygvGOZr.mjs";
2
- export { commit, commitAllChanges, currentBranch, fastForwardBranch, findRoot, getChangedFiles, getHeadCommitId, getHeadCommitMessage, getOwnerAndRepo, isFileGitIgnored, push, reset };
1
+ export { g as commit, p as commitAllChanges, f as currentBranch, i as fastForwardBranch, h as findRoot, m as getChangedFiles, u as getHeadCommitId, d as getHeadCommitMessage, l as getOwnerAndRepo, n as isFileGitIgnored, a as push, r as reset } from "../git-DsCvTj_4.mjs";
@@ -1,5 +1,5 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
2
- const require_fs = require("./fs-CuSraRTN.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-BW-eSwOZ.cjs");
2
+ const require_fs = require("./fs-DF1Qj2xv.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");
@@ -10,7 +10,7 @@ let ignore = require("ignore");
10
10
  ignore = require_rolldown_runtime.__toESM(ignore, 1);
11
11
  let isomorphic_git_http_node = require("isomorphic-git/http/node");
12
12
  isomorphic_git_http_node = require_rolldown_runtime.__toESM(isomorphic_git_http_node, 1);
13
- //#region src/git/commit.ts
13
+ // src/git/commit.ts
14
14
  /**
15
15
  * Writes a commit to the local Git repository.
16
16
  */
@@ -21,8 +21,7 @@ const commit = async ({ author = { name: "skuba" }, committer = { name: "skuba"
21
21
  fs: fs_extra.default,
22
22
  message
23
23
  });
24
- //#endregion
25
- //#region src/git/findRoot.ts
24
+ // src/git/findRoot.ts
26
25
  /**
27
26
  * Returns the first Git root directory encountered walking up from the provided
28
27
  * `dir`.
@@ -38,8 +37,7 @@ const findRoot$1 = async ({ dir }) => {
38
37
  throw err;
39
38
  }
40
39
  };
41
- //#endregion
42
- //#region src/git/getChangedFiles.ts
40
+ // src/git/getChangedFiles.ts
43
41
  const mapState = (row) => {
44
42
  if (row[1] === 0) return "added";
45
43
  if (row[2] === 2) return "modified";
@@ -52,7 +50,7 @@ const mapState = (row) => {
52
50
  * since the last commit, but can also look at a specific `dst` reference, or
53
51
  * the changes between `src` and `dst` references.
54
52
  */
55
- const getChangedFiles = async ({ dir, src, dst, ignore: ignore$1 = [] }) => {
53
+ const getChangedFiles = async ({ dir, src, dst, ignore = [] }) => {
56
54
  const gitRoot = await (0, isomorphic_git.findRoot)({
57
55
  fs: fs_extra.default,
58
56
  filepath: dir
@@ -63,7 +61,7 @@ const getChangedFiles = async ({ dir, src, dst, ignore: ignore$1 = [] }) => {
63
61
  src,
64
62
  dst
65
63
  }) : getChangedFilesInWorkingDirectory(repoDir), createIsLfsFilter(gitRoot)]);
66
- return allFiles.filter((changedFile) => !ignore$1.some((i) => i.path === changedFile.path && i.state === changedFile.state) && !isLfs(changedFile.path));
64
+ return allFiles.filter((changedFile) => !ignore.some((i) => i.path === changedFile.path && i.state === changedFile.state) && !isLfs(changedFile.path));
67
65
  };
68
66
  const getChangedFilesInWorkingDirectory = async (dir) => {
69
67
  return (await isomorphic_git.default.statusMatrix({
@@ -133,8 +131,7 @@ const createIsLfsFilter = async (gitRoot) => {
133
131
  const filter = (0, ignore.default)().add((await fs_extra.default.promises.readFile(lfsFile, "utf8")).split("\n").map((l) => l.trim()).filter((l) => !l.startsWith("#") && l.includes("filter=lfs")).map((l) => l.split(/\s+/)[0]).flatMap((l) => l ? [l] : []));
134
132
  return (pathname) => filter.ignores(pathname);
135
133
  };
136
- //#endregion
137
- //#region src/git/commitAllChanges.ts
134
+ // src/git/commitAllChanges.ts
138
135
  /**
139
136
  * Stages all changes and writes a commit to the local Git repository.
140
137
  */
@@ -165,8 +162,7 @@ const commitAllChanges = async ({ dir, message, author, committer, ignore }) =>
165
162
  committer
166
163
  });
167
164
  };
168
- //#endregion
169
- //#region src/git/currentBranch.ts
165
+ // src/git/currentBranch.ts
170
166
  /**
171
167
  * Tries to return a Git branch name from CI environment variables.
172
168
  */
@@ -188,8 +184,7 @@ const currentBranch = async ({ dir, env = process.env } = {}) => {
188
184
  fs: fs_extra.default
189
185
  }) ?? void 0;
190
186
  };
191
- //#endregion
192
- //#region src/git/log.ts
187
+ // src/git/log.ts
193
188
  const EMPTY_GIT_LOG_ERROR = /* @__PURE__ */ new Error("Git log does not contain any commits");
194
189
  /**
195
190
  * Gets the object ID of the head commit.
@@ -225,8 +220,7 @@ const getHeadCommitMessage = async ({ dir, env = process.env }) => {
225
220
  if (!headResult) throw EMPTY_GIT_LOG_ERROR;
226
221
  return headResult.commit.message;
227
222
  };
228
- //#endregion
229
- //#region src/git/remote.ts
223
+ // src/git/remote.ts
230
224
  /**
231
225
  * Matches the owner and repository names in a GitHub repository URL.
232
226
  *
@@ -293,14 +287,12 @@ const getOwnerAndRepo = async ({ dir, env = process.env }) => {
293
287
  }
294
288
  throw new Error("Could not find a GitHub remote");
295
289
  };
296
- //#endregion
297
- //#region ../../src/utils/env.ts
290
+ // ../../src/utils/env.ts
298
291
  /**
299
292
  * Whether the code is executing in a CI environment.
300
293
  */
301
294
  const isCiEnv = (env = process.env) => Boolean(env.BUILDKITE || env.CI || env.GITHUB_ACTIONS);
302
- //#endregion
303
- //#region src/github/environment.ts
295
+ // src/github/environment.ts
304
296
  /**
305
297
  * Returns the name of the build as seen in GitHub status checks.
306
298
  *
@@ -322,8 +314,7 @@ const enabledFromEnvironment = (env = process.env) => isCiEnv(env) && Boolean(ap
322
314
  * Tries to return a GitHub API token from the environment.
323
315
  */
324
316
  const apiTokenFromEnvironment = (env = process.env) => env.GITHUB_API_TOKEN ?? env.GITHUB_TOKEN;
325
- //#endregion
326
- //#region src/git/push.ts
317
+ // src/git/push.ts
327
318
  /**
328
319
  * Pushes the specified `ref` from the local Git repository to a remote.
329
320
  */
@@ -345,8 +336,7 @@ const push = async ({ auth, dir, ref, remote, remoteRef, force }) => {
345
336
  force
346
337
  });
347
338
  };
348
- //#endregion
349
- //#region src/git/pull.ts
339
+ // src/git/pull.ts
350
340
  /**
351
341
  * Fast forwards the specified `ref` on the local Git repository to match the remote branch.
352
342
  */
@@ -368,8 +358,7 @@ const fastForwardBranch = async ({ auth, dir, ref, remote, remoteRef }) => {
368
358
  singleBranch: true
369
359
  });
370
360
  };
371
- //#endregion
372
- //#region src/git/reset.ts
361
+ // src/git/reset.ts
373
362
  /**
374
363
  * Resets the specified branch in the local Git repository to a particular
375
364
  * commit.
@@ -390,15 +379,13 @@ const reset = async ({ dir, branch, commitId, hard }) => {
390
379
  });
391
380
  }
392
381
  };
393
- //#endregion
394
- //#region src/git/isFileGitIgnored.ts
382
+ // src/git/isFileGitIgnored.ts
395
383
  const isFileGitIgnored = ({ absolutePath, gitRoot }) => isomorphic_git.default.isIgnored({
396
384
  dir: gitRoot,
397
385
  filepath: path.default.relative(gitRoot, absolutePath),
398
386
  fs: fs_extra.default
399
387
  });
400
- //#endregion
401
- //#region src/git/index.ts
388
+ // src/git/index.ts
402
389
  var git_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
403
390
  commit: () => commit,
404
391
  commitAllChanges: () => commitAllChanges,
@@ -413,7 +400,6 @@ var git_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
413
400
  push: () => push,
414
401
  reset: () => reset
415
402
  });
416
- //#endregion
417
403
  Object.defineProperty(exports, "apiTokenFromEnvironment", {
418
404
  enumerable: true,
419
405
  get: function() {