@skuba-lib/api 2.3.0 → 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.
- package/lib/buildkite/index.cjs +1 -1
- package/lib/buildkite/index.mjs +1 -1
- package/lib/{buildkite-B0gyBRNS.mjs → buildkite-C7bwlxiU.mjs} +2 -4
- package/lib/{buildkite-CM-xlOq5.cjs → buildkite-z4owathk.cjs} +3 -5
- package/lib/cdk/index.cjs +1 -1
- package/lib/{error-BSBcaHO0.cjs → error-CzNs0bXO.cjs} +1 -1
- package/lib/{exec-Dp89sakg.mjs → exec-Csi1HI7c.mjs} +0 -1
- package/lib/{exec-BGMWpmZ7.cjs → exec-DCUB5Shx.cjs} +2 -3
- package/lib/git/index.cjs +1 -1
- package/lib/{git-BeGqD0KV.cjs → git-C-WnhZPj.cjs} +2 -2
- package/lib/github/index.cjs +2 -2
- package/lib/github/index.mjs +1 -1
- package/lib/{github-C91l-j0Z.cjs → github-v-R9t-n8.cjs} +16 -15
- package/lib/{github-CmHDTIHw.mjs → github-zZjo_m67.mjs} +16 -14
- package/lib/index.cjs +4 -4
- package/lib/index.mjs +3 -3
- package/lib/net/index.cjs +1 -1
- package/lib/net/index.mjs +1 -1
- package/lib/{net-97EvMPiP.mjs → net-Bf2HV_vG.mjs} +1 -1
- package/lib/{net-zrteIHld.cjs → net-HILKQTAq.cjs} +2 -2
- package/lib/{rolldown-runtime-DakpK96I.cjs → rolldown-runtime-C0BPl7ul.cjs} +1 -1
- package/package.json +2 -2
package/lib/buildkite/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_buildkite = require("../buildkite-
|
|
2
|
+
const require_buildkite = require("../buildkite-z4owathk.cjs");
|
|
3
3
|
exports.annotate = require_buildkite.annotate;
|
|
4
4
|
exports.md = require_buildkite.md;
|
package/lib/buildkite/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as md, r as annotate } from "../buildkite-
|
|
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
2
|
import { t as log } from "./logging-BQNEupxh.mjs";
|
|
3
|
-
import { n as exec, r as hasCommand } from "./exec-
|
|
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
|
-
|
|
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-
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
|
|
2
2
|
const require_logging = require("./logging-BqpzZfsF.cjs");
|
|
3
|
-
const require_exec = require("./exec-
|
|
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,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
|
-
|
|
25
|
-
truncatedMarkdown = markdown.slice(0, remainingSpace) + TRUNCATION_WARNING;
|
|
23
|
+
truncatedMarkdown = markdown.slice(0, 1048543) + TRUNCATION_WARNING;
|
|
26
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("|");
|
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-
|
|
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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
2
|
-
const require_error = require("./error-
|
|
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-
|
|
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,5 +1,5 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
2
|
-
const require_error = require("./error-
|
|
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");
|
package/lib/github/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_git = require("../git-
|
|
3
|
-
const require_github = require("../github-
|
|
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;
|
package/lib/github/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
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-
|
|
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-
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
|
|
2
2
|
const require_logging = require("./logging-BqpzZfsF.cjs");
|
|
3
|
-
const require_git = require("./git-
|
|
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");
|
|
@@ -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
|
};
|
|
@@ -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
|
|
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
|
};
|
package/lib/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_buildkite = require("./buildkite-
|
|
2
|
+
const require_buildkite = require("./buildkite-z4owathk.cjs");
|
|
3
3
|
const require_cdk_index = require("./cdk/index.cjs");
|
|
4
|
-
const require_git = require("./git-
|
|
5
|
-
const require_github = require("./github-
|
|
6
|
-
const require_net = require("./net-
|
|
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.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as buildkite_exports } from "./buildkite-
|
|
1
|
+
import { t as buildkite_exports } from "./buildkite-C7bwlxiU.mjs";
|
|
2
2
|
import { t as cdk_exports } from "./cdk/index.mjs";
|
|
3
3
|
import { t as git_exports } from "./git-DyhV01cl.mjs";
|
|
4
|
-
import { t as github_exports } from "./github-
|
|
5
|
-
import { t as net_exports } from "./net-
|
|
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 };
|
package/lib/net/index.cjs
CHANGED
package/lib/net/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as waitFor } from "../net-
|
|
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-
|
|
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-
|
|
2
|
-
const require_exec = require("./exec-
|
|
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.
|
|
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": "^
|
|
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",
|