@skuba-lib/api 3.0.1 → 3.1.0-add-CDK.ensureAssetPlaceholders-20261027233644
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.d.cts +1 -1
- package/lib/buildkite/index.d.mts +1 -1
- package/lib/buildkite/index.mjs +1 -2
- package/lib/{buildkite-D6oioQR_.mjs → buildkite-ChVcxGm7.mjs} +6 -9
- package/lib/{buildkite-Br2Fyde2.cjs → buildkite-ClGGPaJV.cjs} +6 -9
- package/lib/cdk/index.cjs +3 -12
- package/lib/cdk/index.d.cts +2 -6
- package/lib/cdk/index.d.mts +2 -6
- package/lib/cdk/index.mjs +1 -7
- package/lib/cdk-BSFGwx14.mjs +20 -0
- package/lib/cdk-ByEVlN14.cjs +38 -0
- package/lib/{error-UWg8a0Ma.mjs → error-B7tbxXTQ.mjs} +2 -4
- package/lib/{error-C1BybmHW.cjs → error-CG8rNpOB.cjs} +2 -4
- package/lib/{exec-DqBpB5Vp.cjs → exec-BIvSnwhj.cjs} +11 -9
- package/lib/{exec-GeacTdU5.mjs → exec-DC-QAW0e.mjs} +10 -8
- package/lib/{fs-Cjt5C6XD.mjs → fs-Bac0LYeg.mjs} +2 -3
- package/lib/{fs-CuSraRTN.cjs → fs-DF1Qj2xv.cjs} +3 -4
- package/lib/git/index.cjs +1 -1
- package/lib/git/index.d.cts +1 -1
- package/lib/git/index.d.mts +1 -1
- package/lib/git/index.mjs +1 -2
- package/lib/{git-CSGc8r3Q.cjs → git-BOuG-9aF.cjs} +18 -32
- package/lib/{git-BygvGOZr.mjs → git-DsCvTj_4.mjs} +16 -30
- package/lib/github/index.cjs +2 -2
- package/lib/github/index.d.cts +1 -1
- package/lib/github/index.d.mts +1 -1
- package/lib/github/index.mjs +2 -2
- package/lib/{github-BLyV25Ac.mjs → github-B_q9oeR0.mjs} +11 -16
- package/lib/{github-CuWb88m1.cjs → github-CY8WyO3R.cjs} +11 -16
- package/lib/{index-J0PI37zH.d.mts → index-BIoXUgOB.d.mts} +8 -12
- package/lib/{index-BKHTGdUP.d.cts → index-BqaQKTmE.d.cts} +0 -2
- package/lib/{index-BKHTGdUP.d.mts → index-BqaQKTmE.d.mts} +0 -2
- package/lib/{index-CLEYcnJY.d.cts → index-CX5l1M9F.d.cts} +0 -22
- package/lib/{index-CLEYcnJY.d.mts → index-CX5l1M9F.d.mts} +0 -22
- package/lib/index-DP8zjEgM.d.cts +8 -0
- package/lib/index-DP8zjEgM.d.mts +8 -0
- package/lib/{index-CNxgBJm_.d.cts → index-DhV1vmV_.d.cts} +0 -4
- package/lib/{index-CNxgBJm_.d.mts → index-DhV1vmV_.d.mts} +0 -4
- package/lib/{index--hWvZI6b.d.cts → index-ozhcNkrB.d.cts} +8 -12
- package/lib/{index-C9lVo3vU.d.cts → index-tjm5vla2.d.cts} +0 -4
- package/lib/{index-C9lVo3vU.d.mts → index-tjm5vla2.d.mts} +0 -4
- package/lib/index.cjs +7 -7
- package/lib/index.d.cts +6 -6
- package/lib/index.d.mts +6 -6
- package/lib/index.mjs +6 -6
- package/lib/{logging-BQNEupxh.mjs → logging-BnwLxc05.mjs} +1 -2
- package/lib/{logging-BqpzZfsF.cjs → logging-DlMiOLHo.cjs} +1 -2
- package/lib/net/index.cjs +1 -1
- package/lib/net/index.d.cts +1 -1
- package/lib/net/index.d.mts +1 -1
- package/lib/net/index.mjs +1 -2
- package/lib/{net-BONidEnf.cjs → net-B0uYVMTV.cjs} +6 -10
- package/lib/{net-BxPK6QHR.mjs → net-Biz58RYT.mjs} +6 -10
- package/lib/rolldown/index.cjs +1 -1
- package/lib/rolldown/index.d.cts +1 -1
- package/lib/rolldown/index.d.mts +1 -1
- package/lib/rolldown/index.mjs +1 -2
- package/lib/{rolldown-CHdN4G5F.mjs → rolldown-BT1dfSUF.mjs} +34 -37
- package/lib/{rolldown-runtime-C0BPl7ul.cjs → rolldown-runtime-BW-eSwOZ.cjs} +1 -2
- package/lib/{rolldown-runtime-D7D4PA-g.mjs → rolldown-runtime-D8jQpDG7.mjs} +1 -2
- package/lib/{rolldown-B47lAoi7.cjs → rolldown-uS0trAmM.cjs} +9 -12
- package/package.json +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/buildkite/annotate.d.ts
|
|
2
1
|
type AnnotationStyle = 'success' | 'info' | 'warning' | 'error';
|
|
3
2
|
interface AnnotationOptions {
|
|
4
3
|
context?: string;
|
|
@@ -24,8 +23,6 @@ interface AnnotationOptions {
|
|
|
24
23
|
* The `buildkite-agent` binary must also be on your `PATH`.
|
|
25
24
|
*/
|
|
26
25
|
declare const annotate: (markdown: string, opts?: AnnotationOptions) => Promise<void>;
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region src/buildkite/md.d.ts
|
|
29
26
|
/**
|
|
30
27
|
* @internal
|
|
31
28
|
*/
|
|
@@ -35,5 +32,4 @@ declare const md: {
|
|
|
35
32
|
declare namespace index_d_exports {
|
|
36
33
|
export { AnnotationStyle, annotate, md };
|
|
37
34
|
}
|
|
38
|
-
//#endregion
|
|
39
35
|
export { annotate as i, md as n, AnnotationStyle as r, index_d_exports as t };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { f as ChangedFile
|
|
1
|
+
import { f as ChangedFile } from "./index-CX5l1M9F.cjs";
|
|
2
2
|
import { Endpoints } from "@octokit/types";
|
|
3
3
|
import { Octokit } from "@octokit/rest";
|
|
4
|
-
//#region src/github/checkRun.d.ts
|
|
5
4
|
type Output = NonNullable<Endpoints['PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}']['parameters']['output']>;
|
|
6
5
|
type Annotation = NonNullable<Output['annotations']>[number];
|
|
7
6
|
/**
|
|
@@ -18,6 +17,12 @@ interface CreateCheckRunParameters {
|
|
|
18
17
|
* The final conclusion of the check.
|
|
19
18
|
*/
|
|
20
19
|
conclusion: 'failure' | 'success';
|
|
20
|
+
/**
|
|
21
|
+
* A URL that links to the full details of the check, such as a CI build.
|
|
22
|
+
*
|
|
23
|
+
* Defaults to the homepage of the GitHub App that created the check run.
|
|
24
|
+
*/
|
|
25
|
+
detailsUrl?: string;
|
|
21
26
|
/**
|
|
22
27
|
* The name of the check. For example, "code-coverage".
|
|
23
28
|
*/
|
|
@@ -43,9 +48,7 @@ interface CreateCheckRunParameters {
|
|
|
43
48
|
* A `GITHUB_API_TOKEN` or `GITHUB_TOKEN` with the `checks:write` permission
|
|
44
49
|
* must be present on the environment.
|
|
45
50
|
*/
|
|
46
|
-
declare const createCheckRun: ({ annotations, conclusion, name, summary, text, title }: CreateCheckRunParameters) => Promise<void>;
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region src/github/environment.d.ts
|
|
51
|
+
declare const createCheckRun: ({ annotations, conclusion, detailsUrl, name, summary, text, title }: CreateCheckRunParameters) => Promise<void>;
|
|
49
52
|
/**
|
|
50
53
|
* Returns the name of the build as seen in GitHub status checks.
|
|
51
54
|
*
|
|
@@ -63,8 +66,6 @@ declare const enabledFromEnvironment: (env?: NodeJS.ProcessEnv) => boolean;
|
|
|
63
66
|
* Tries to return a GitHub API token from the environment.
|
|
64
67
|
*/
|
|
65
68
|
declare const apiTokenFromEnvironment: (env?: NodeJS.ProcessEnv) => string | undefined;
|
|
66
|
-
//#endregion
|
|
67
|
-
//#region src/github/pullRequest.d.ts
|
|
68
69
|
interface GetPullRequestParameters {
|
|
69
70
|
/**
|
|
70
71
|
* A preconstructed Octokit client to interact with GitHub's APIs.
|
|
@@ -84,8 +85,6 @@ interface GetPullRequestParameters {
|
|
|
84
85
|
* associated pull requests, or if they are all closed or locked.
|
|
85
86
|
*/
|
|
86
87
|
declare const getPullRequestNumber: (params?: GetPullRequestParameters) => Promise<number>;
|
|
87
|
-
//#endregion
|
|
88
|
-
//#region src/github/issueComment.d.ts
|
|
89
88
|
/**
|
|
90
89
|
* https://docs.github.com/en/rest/reference/issues#create-an-issue-comment
|
|
91
90
|
*/
|
|
@@ -146,8 +145,6 @@ interface IssueComment {
|
|
|
146
145
|
* on the environment.
|
|
147
146
|
*/
|
|
148
147
|
declare const putIssueComment: (params: PutIssueCommentParameters) => Promise<IssueComment | null>;
|
|
149
|
-
//#endregion
|
|
150
|
-
//#region src/github/push.d.ts
|
|
151
148
|
interface UploadAllFileChangesParams {
|
|
152
149
|
dir: string;
|
|
153
150
|
/**
|
|
@@ -234,5 +231,4 @@ declare const uploadFileChanges: ({ dir, branch, messageHeadline, messageBody, f
|
|
|
234
231
|
declare namespace index_d_exports {
|
|
235
232
|
export { Annotation, apiTokenFromEnvironment, buildNameFromEnvironment, createCheckRun, enabledFromEnvironment, getPullRequestNumber, putIssueComment, readFileChanges, uploadAllFileChanges, uploadFileChanges };
|
|
236
233
|
}
|
|
237
|
-
//#endregion
|
|
238
234
|
export { putIssueComment as a, buildNameFromEnvironment as c, createCheckRun as d, uploadFileChanges as i, enabledFromEnvironment as l, readFileChanges as n, getPullRequestNumber as o, uploadAllFileChanges as r, apiTokenFromEnvironment as s, index_d_exports as t, Annotation as u };
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
//#region src/net/socket.d.ts
|
|
2
1
|
interface SocketAddress {
|
|
3
2
|
host: string;
|
|
4
3
|
port: number;
|
|
5
4
|
}
|
|
6
|
-
//#endregion
|
|
7
|
-
//#region src/net/waitFor.d.ts
|
|
8
5
|
/**
|
|
9
6
|
* Wait for a resource to start listening on a socket address.
|
|
10
7
|
*
|
|
@@ -29,5 +26,4 @@ declare const waitFor: ({ host, port, resolveCompose, timeout }: {
|
|
|
29
26
|
declare namespace index_d_exports {
|
|
30
27
|
export { waitFor };
|
|
31
28
|
}
|
|
32
|
-
//#endregion
|
|
33
29
|
export { waitFor as n, index_d_exports as t };
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
//#region src/net/socket.d.ts
|
|
2
1
|
interface SocketAddress {
|
|
3
2
|
host: string;
|
|
4
3
|
port: number;
|
|
5
4
|
}
|
|
6
|
-
//#endregion
|
|
7
|
-
//#region src/net/waitFor.d.ts
|
|
8
5
|
/**
|
|
9
6
|
* Wait for a resource to start listening on a socket address.
|
|
10
7
|
*
|
|
@@ -29,5 +26,4 @@ declare const waitFor: ({ host, port, resolveCompose, timeout }: {
|
|
|
29
26
|
declare namespace index_d_exports {
|
|
30
27
|
export { waitFor };
|
|
31
28
|
}
|
|
32
|
-
//#endregion
|
|
33
29
|
export { waitFor as n, index_d_exports as t };
|
package/lib/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_buildkite = require("./buildkite-
|
|
3
|
-
const
|
|
4
|
-
const require_git = require("./git-
|
|
5
|
-
const require_github = require("./github-
|
|
6
|
-
const require_net = require("./net-
|
|
7
|
-
const require_rolldown = require("./rolldown-
|
|
2
|
+
const require_buildkite = require("./buildkite-ClGGPaJV.cjs");
|
|
3
|
+
const require_cdk = require("./cdk-ByEVlN14.cjs");
|
|
4
|
+
const require_git = require("./git-BOuG-9aF.cjs");
|
|
5
|
+
const require_github = require("./github-CY8WyO3R.cjs");
|
|
6
|
+
const require_net = require("./net-B0uYVMTV.cjs");
|
|
7
|
+
const require_rolldown = require("./rolldown-uS0trAmM.cjs");
|
|
8
8
|
Object.defineProperty(exports, "Buildkite", {
|
|
9
9
|
enumerable: true,
|
|
10
10
|
get: function() {
|
|
@@ -14,7 +14,7 @@ Object.defineProperty(exports, "Buildkite", {
|
|
|
14
14
|
Object.defineProperty(exports, "Cdk", {
|
|
15
15
|
enumerable: true,
|
|
16
16
|
get: function() {
|
|
17
|
-
return
|
|
17
|
+
return require_cdk.cdk_exports;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "Git", {
|
package/lib/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as index_d_exports } from "./index-
|
|
2
|
-
import {
|
|
3
|
-
import { t as index_d_exports$2 } from "./index-
|
|
4
|
-
import { t as index_d_exports$3 } from "./index
|
|
5
|
-
import { t as index_d_exports$4 } from "./index-
|
|
6
|
-
import { t as index_d_exports$5 } from "./index-
|
|
1
|
+
import { t as index_d_exports } from "./index-DhV1vmV_.cjs";
|
|
2
|
+
import { n as index_d_exports$1 } from "./index-DP8zjEgM.cjs";
|
|
3
|
+
import { t as index_d_exports$2 } from "./index-CX5l1M9F.cjs";
|
|
4
|
+
import { t as index_d_exports$3 } from "./index-ozhcNkrB.cjs";
|
|
5
|
+
import { t as index_d_exports$4 } from "./index-tjm5vla2.cjs";
|
|
6
|
+
import { t as index_d_exports$5 } from "./index-BqaQKTmE.cjs";
|
|
7
7
|
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, index_d_exports$5 as Rolldown };
|
package/lib/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as index_d_exports } from "./index-
|
|
2
|
-
import {
|
|
3
|
-
import { t as index_d_exports$2 } from "./index-
|
|
4
|
-
import { t as index_d_exports$3 } from "./index-
|
|
5
|
-
import { t as index_d_exports$4 } from "./index-
|
|
6
|
-
import { t as index_d_exports$5 } from "./index-
|
|
1
|
+
import { t as index_d_exports } from "./index-DhV1vmV_.mjs";
|
|
2
|
+
import { n as index_d_exports$1 } from "./index-DP8zjEgM.mjs";
|
|
3
|
+
import { t as index_d_exports$2 } from "./index-CX5l1M9F.mjs";
|
|
4
|
+
import { t as index_d_exports$3 } from "./index-BIoXUgOB.mjs";
|
|
5
|
+
import { t as index_d_exports$4 } from "./index-tjm5vla2.mjs";
|
|
6
|
+
import { t as index_d_exports$5 } from "./index-BqaQKTmE.mjs";
|
|
7
7
|
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, index_d_exports$5 as Rolldown };
|
package/lib/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as buildkite_exports } from "./buildkite-
|
|
2
|
-
import { t as cdk_exports } from "./cdk
|
|
3
|
-
import { t as git_exports } from "./git-
|
|
4
|
-
import { t as github_exports } from "./github-
|
|
5
|
-
import { t as net_exports } from "./net-
|
|
6
|
-
import { t as rolldown_exports } from "./rolldown-
|
|
1
|
+
import { t as buildkite_exports } from "./buildkite-ChVcxGm7.mjs";
|
|
2
|
+
import { t as cdk_exports } from "./cdk-BSFGwx14.mjs";
|
|
3
|
+
import { t as git_exports } from "./git-DsCvTj_4.mjs";
|
|
4
|
+
import { t as github_exports } from "./github-B_q9oeR0.mjs";
|
|
5
|
+
import { t as net_exports } from "./net-Biz58RYT.mjs";
|
|
6
|
+
import { t as rolldown_exports } from "./rolldown-BT1dfSUF.mjs";
|
|
7
7
|
export { buildkite_exports as Buildkite, cdk_exports as Cdk, git_exports as Git, github_exports as GitHub, net_exports as Net, rolldown_exports as Rolldown };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { styleText } from "node:util";
|
|
2
|
-
|
|
2
|
+
// ../../src/utils/logging.ts
|
|
3
3
|
const createLogger = ({ debug, prefixes = [], suffixes = [] }) => {
|
|
4
4
|
const logWithoutSuffixes = (...message) => console.log(...prefixes, ...message);
|
|
5
5
|
const log = (...message) => logWithoutSuffixes(...message, ...suffixes);
|
|
@@ -24,5 +24,4 @@ const createLogger = ({ debug, prefixes = [], suffixes = [] }) => {
|
|
|
24
24
|
};
|
|
25
25
|
const log = createLogger({ debug: false });
|
|
26
26
|
const pluralise = (count, subject) => `${count} ${subject}${count === 1 ? "" : "s"}`;
|
|
27
|
-
//#endregion
|
|
28
27
|
export { pluralise as n, log as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
let node_util = require("node:util");
|
|
2
|
-
|
|
2
|
+
// ../../src/utils/logging.ts
|
|
3
3
|
const createLogger = ({ debug, prefixes = [], suffixes = [] }) => {
|
|
4
4
|
const logWithoutSuffixes = (...message) => console.log(...prefixes, ...message);
|
|
5
5
|
const log = (...message) => logWithoutSuffixes(...message, ...suffixes);
|
|
@@ -24,7 +24,6 @@ const createLogger = ({ debug, prefixes = [], suffixes = [] }) => {
|
|
|
24
24
|
};
|
|
25
25
|
const log = createLogger({ debug: false });
|
|
26
26
|
const pluralise = (count, subject) => `${count} ${subject}${count === 1 ? "" : "s"}`;
|
|
27
|
-
//#endregion
|
|
28
27
|
Object.defineProperty(exports, "log", {
|
|
29
28
|
enumerable: true,
|
|
30
29
|
get: function() {
|
package/lib/net/index.cjs
CHANGED
package/lib/net/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as waitFor } from "../index-
|
|
1
|
+
import { n as waitFor } from "../index-tjm5vla2.cjs";
|
|
2
2
|
export { waitFor };
|
package/lib/net/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as waitFor } from "../index-
|
|
1
|
+
import { n as waitFor } from "../index-tjm5vla2.mjs";
|
|
2
2
|
export { waitFor };
|
package/lib/net/index.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { waitFor };
|
|
1
|
+
export { n as waitFor } from "../net-Biz58RYT.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
2
|
-
const require_exec = require("./exec-
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-BW-eSwOZ.cjs");
|
|
2
|
+
const require_exec = require("./exec-BIvSnwhj.cjs");
|
|
3
3
|
let net = require("net");
|
|
4
4
|
net = require_rolldown_runtime.__toESM(net, 1);
|
|
5
|
-
|
|
5
|
+
// src/net/compose.ts
|
|
6
6
|
const portStringToNumber = (portString) => {
|
|
7
7
|
const port = Number(portString);
|
|
8
8
|
if (!Number.isSafeInteger(port)) throw Error(`received non-integer port: '${portString}'`);
|
|
@@ -17,8 +17,7 @@ const resolveComposeAddress = async (privateHost, privatePort) => {
|
|
|
17
17
|
port: portStringToNumber(portString)
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
-
|
|
21
|
-
//#region src/net/socket.ts
|
|
20
|
+
// src/net/socket.ts
|
|
22
21
|
const trySocket = async (host, port) => new Promise((resolve) => {
|
|
23
22
|
const socket = new net.default.Socket();
|
|
24
23
|
const onFailure = () => {
|
|
@@ -45,8 +44,7 @@ const pollSocket = async (host, port, timeout) => new Promise((resolve, reject)
|
|
|
45
44
|
}, timeout);
|
|
46
45
|
callPort().catch(() => void 0);
|
|
47
46
|
});
|
|
48
|
-
|
|
49
|
-
//#region src/net/waitFor.ts
|
|
47
|
+
// src/net/waitFor.ts
|
|
50
48
|
/**
|
|
51
49
|
* Wait for a resource to start listening on a socket address.
|
|
52
50
|
*
|
|
@@ -61,10 +59,8 @@ const waitFor = async ({ host = "localhost", port, resolveCompose = false, timeo
|
|
|
61
59
|
await pollSocket(resolvedAddress.host, resolvedAddress.port, timeout);
|
|
62
60
|
return resolvedAddress;
|
|
63
61
|
};
|
|
64
|
-
|
|
65
|
-
//#region src/net/index.ts
|
|
62
|
+
// src/net/index.ts
|
|
66
63
|
var net_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({ waitFor: () => waitFor });
|
|
67
|
-
//#endregion
|
|
68
64
|
Object.defineProperty(exports, "net_exports", {
|
|
69
65
|
enumerable: true,
|
|
70
66
|
get: function() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { t as createExec } from "./exec-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-D8jQpDG7.mjs";
|
|
2
|
+
import { t as createExec } from "./exec-DC-QAW0e.mjs";
|
|
3
3
|
import net from "net";
|
|
4
|
-
|
|
4
|
+
// src/net/compose.ts
|
|
5
5
|
const portStringToNumber = (portString) => {
|
|
6
6
|
const port = Number(portString);
|
|
7
7
|
if (!Number.isSafeInteger(port)) throw Error(`received non-integer port: '${portString}'`);
|
|
@@ -16,8 +16,7 @@ const resolveComposeAddress = async (privateHost, privatePort) => {
|
|
|
16
16
|
port: portStringToNumber(portString)
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
|
|
20
|
-
//#region src/net/socket.ts
|
|
19
|
+
// src/net/socket.ts
|
|
21
20
|
const trySocket = async (host, port) => new Promise((resolve) => {
|
|
22
21
|
const socket = new net.Socket();
|
|
23
22
|
const onFailure = () => {
|
|
@@ -44,8 +43,7 @@ const pollSocket = async (host, port, timeout) => new Promise((resolve, reject)
|
|
|
44
43
|
}, timeout);
|
|
45
44
|
callPort().catch(() => void 0);
|
|
46
45
|
});
|
|
47
|
-
|
|
48
|
-
//#region src/net/waitFor.ts
|
|
46
|
+
// src/net/waitFor.ts
|
|
49
47
|
/**
|
|
50
48
|
* Wait for a resource to start listening on a socket address.
|
|
51
49
|
*
|
|
@@ -60,8 +58,6 @@ const waitFor = async ({ host = "localhost", port, resolveCompose = false, timeo
|
|
|
60
58
|
await pollSocket(resolvedAddress.host, resolvedAddress.port, timeout);
|
|
61
59
|
return resolvedAddress;
|
|
62
60
|
};
|
|
63
|
-
|
|
64
|
-
//#region src/net/index.ts
|
|
61
|
+
// src/net/index.ts
|
|
65
62
|
var net_exports = /* @__PURE__ */ __exportAll({ waitFor: () => waitFor });
|
|
66
|
-
//#endregion
|
|
67
63
|
export { waitFor as n, net_exports as t };
|
package/lib/rolldown/index.cjs
CHANGED
package/lib/rolldown/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as lambdaAsset, n as LambdaAssetFile, r as LambdaAssetOptions } from "../index-
|
|
1
|
+
import { i as lambdaAsset, n as LambdaAssetFile, r as LambdaAssetOptions } from "../index-BqaQKTmE.cjs";
|
|
2
2
|
export { type LambdaAssetFile, type LambdaAssetOptions, lambdaAsset };
|
package/lib/rolldown/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as lambdaAsset, n as LambdaAssetFile, r as LambdaAssetOptions } from "../index-
|
|
1
|
+
import { i as lambdaAsset, n as LambdaAssetFile, r as LambdaAssetOptions } from "../index-BqaQKTmE.mjs";
|
|
2
2
|
export { type LambdaAssetFile, type LambdaAssetOptions, lambdaAsset };
|
package/lib/rolldown/index.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { lambdaAsset };
|
|
1
|
+
export { n as lambdaAsset } from "../rolldown-BT1dfSUF.mjs";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { t as log } from "./logging-
|
|
3
|
-
import { t as createExec } from "./exec-
|
|
4
|
-
import { t as pathExists } from "./fs-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-D8jQpDG7.mjs";
|
|
2
|
+
import { t as log } from "./logging-BnwLxc05.mjs";
|
|
3
|
+
import { t as createExec } from "./exec-DC-QAW0e.mjs";
|
|
4
|
+
import { t as pathExists } from "./fs-Bac0LYeg.mjs";
|
|
5
5
|
import { findPackageJSON } from "node:module";
|
|
6
|
+
import * as path$1 from "node:path";
|
|
6
7
|
import fs from "fs-extra";
|
|
7
|
-
import * as path from "node:path";
|
|
8
8
|
import { findUp } from "find-up";
|
|
9
9
|
import { pathToFileURL } from "node:url";
|
|
10
10
|
import { isMap, parseDocument } from "yaml";
|
|
11
|
-
|
|
11
|
+
// src/rolldown/pnpm.ts
|
|
12
12
|
const PNPM_LOCK = "pnpm-lock.yaml";
|
|
13
13
|
const PNPM_WORKSPACE_YAML = "pnpm-workspace.yaml";
|
|
14
14
|
const PNPM_PATCHES_DIR = "patches";
|
|
@@ -18,7 +18,7 @@ const PNPM_WORKSPACE_FILES = [
|
|
|
18
18
|
".pnpmfile.cjs",
|
|
19
19
|
".pnpmfile.mjs"
|
|
20
20
|
];
|
|
21
|
-
const PNPM_METADATA_FILES = [path.join("node_modules", ".modules.yaml"), path.join("node_modules", ".pnpm-workspace-state-v1.json")];
|
|
21
|
+
const PNPM_METADATA_FILES = [path$1.join("node_modules", ".modules.yaml"), path$1.join("node_modules", ".pnpm-workspace-state-v1.json")];
|
|
22
22
|
const PNPM_INSTALL_COMMAND = [
|
|
23
23
|
"pnpm",
|
|
24
24
|
"install",
|
|
@@ -43,7 +43,7 @@ const PACKAGE_MANAGER_FIELDS = ["packageManager", "devEngines"];
|
|
|
43
43
|
* pnpm version as the project.
|
|
44
44
|
*/
|
|
45
45
|
const readPackageManagerFields = async (workspaceRoot) => {
|
|
46
|
-
const pkgPath = path.join(workspaceRoot, "package.json");
|
|
46
|
+
const pkgPath = path$1.join(workspaceRoot, "package.json");
|
|
47
47
|
if (!await pathExists(pkgPath)) return {};
|
|
48
48
|
const parsed = await readJsonFile(pkgPath);
|
|
49
49
|
if (!isRecord(parsed)) return {};
|
|
@@ -73,21 +73,21 @@ const allowUnusedPatches = (content) => {
|
|
|
73
73
|
*/
|
|
74
74
|
const stageWorkspaceFiles = async (workspaceRoot, outputDir, stagedFiles = []) => {
|
|
75
75
|
const present = (await Promise.all(PNPM_WORKSPACE_FILES.map(async (file) => {
|
|
76
|
-
const src = path.join(workspaceRoot, file);
|
|
76
|
+
const src = path$1.join(workspaceRoot, file);
|
|
77
77
|
return await pathExists(src) ? {
|
|
78
78
|
file,
|
|
79
79
|
src
|
|
80
80
|
} : void 0;
|
|
81
81
|
}))).filter((entry) => entry !== void 0);
|
|
82
|
-
for (const { file } of present) stagedFiles.push(path.join(outputDir, file));
|
|
82
|
+
for (const { file } of present) stagedFiles.push(path$1.join(outputDir, file));
|
|
83
83
|
await Promise.all(present.map(async ({ file, src }) => {
|
|
84
|
-
const dest = path.join(outputDir, file);
|
|
84
|
+
const dest = path$1.join(outputDir, file);
|
|
85
85
|
if (file === PNPM_WORKSPACE_YAML) await fs.promises.writeFile(dest, allowUnusedPatches(await fs.promises.readFile(src, "utf8")));
|
|
86
86
|
else await fs.promises.copyFile(src, dest);
|
|
87
87
|
}));
|
|
88
|
-
const patchesSrc = path.join(workspaceRoot, PNPM_PATCHES_DIR);
|
|
88
|
+
const patchesSrc = path$1.join(workspaceRoot, PNPM_PATCHES_DIR);
|
|
89
89
|
if (await pathExists(patchesSrc)) {
|
|
90
|
-
const patchesDest = path.join(outputDir, PNPM_PATCHES_DIR);
|
|
90
|
+
const patchesDest = path$1.join(outputDir, PNPM_PATCHES_DIR);
|
|
91
91
|
stagedFiles.push(patchesDest);
|
|
92
92
|
await fs.copy(patchesSrc, patchesDest);
|
|
93
93
|
}
|
|
@@ -113,20 +113,19 @@ const extractDependencies = async (resolveFrom, modules) => {
|
|
|
113
113
|
}
|
|
114
114
|
return result;
|
|
115
115
|
};
|
|
116
|
-
|
|
117
|
-
//#region src/rolldown/lambdaAsset.ts
|
|
116
|
+
// src/rolldown/lambdaAsset.ts
|
|
118
117
|
const PLUGIN_NAME = "skuba:lambda-asset";
|
|
119
118
|
const resolveOutputDir = ({ dir, file }, cwd) => {
|
|
120
119
|
if (!dir) throw new Error(`${PLUGIN_NAME} requires \`output.dir\`; it prepares a deployable directory, so a single \`output.file\`${file ? ` (${file})` : ""} has nowhere to install into.`);
|
|
121
|
-
return path.resolve(cwd, dir);
|
|
120
|
+
return path$1.resolve(cwd, dir);
|
|
122
121
|
};
|
|
123
122
|
const resolveLockFile = async (depsLockFilePath, cwd) => {
|
|
124
123
|
if (!depsLockFilePath) return findUp(PNPM_LOCK, { cwd });
|
|
125
|
-
const resolved = path.resolve(cwd, depsLockFilePath);
|
|
124
|
+
const resolved = path$1.resolve(cwd, depsLockFilePath);
|
|
126
125
|
if (!await pathExists(resolved)) throw new Error(`${PLUGIN_NAME} cannot find a ${PNPM_LOCK} at '${depsLockFilePath}'.`);
|
|
127
126
|
return resolved;
|
|
128
127
|
};
|
|
129
|
-
const toPosix = (p) => p.split(path.sep).join("/");
|
|
128
|
+
const toPosix = (p) => p.split(path$1.sep).join("/");
|
|
130
129
|
/**
|
|
131
130
|
* Emits extra `assets` into the build output alongside the bundle.
|
|
132
131
|
*
|
|
@@ -138,26 +137,26 @@ const toPosix = (p) => p.split(path.sep).join("/");
|
|
|
138
137
|
*/
|
|
139
138
|
const emitAssets = async (emit, projectRoot, assets) => {
|
|
140
139
|
await Promise.all(assets.map(async (asset) => {
|
|
141
|
-
const from = path.resolve(projectRoot, asset.from);
|
|
142
|
-
const to = asset.to ?? path.basename(asset.from);
|
|
143
|
-
const normalized = path.normalize(to);
|
|
144
|
-
if (path.isAbsolute(normalized) || normalized === "." || normalized === ".." || normalized.startsWith(`..${path.sep}`)) throw new Error(`${PLUGIN_NAME} refuses to copy asset '${asset.from}' to '${asset.to}': it escapes the output directory.`);
|
|
140
|
+
const from = path$1.resolve(projectRoot, asset.from);
|
|
141
|
+
const to = asset.to ?? path$1.basename(asset.from);
|
|
142
|
+
const normalized = path$1.normalize(to);
|
|
143
|
+
if (path$1.isAbsolute(normalized) || normalized === "." || normalized === ".." || normalized.startsWith(`..${path$1.sep}`)) throw new Error(`${PLUGIN_NAME} refuses to copy asset '${asset.from}' to '${asset.to}': it escapes the output directory.`);
|
|
145
144
|
const files = (await fs.promises.stat(from)).isDirectory() ? (await fs.promises.readdir(from, {
|
|
146
145
|
recursive: true,
|
|
147
146
|
withFileTypes: true
|
|
148
|
-
})).filter((entry) => entry.isFile()).map((entry) => path.join(entry.parentPath, entry.name)) : [from];
|
|
147
|
+
})).filter((entry) => entry.isFile()).map((entry) => path$1.join(entry.parentPath, entry.name)) : [from];
|
|
149
148
|
await Promise.all(files.map(async (absFile) => {
|
|
150
|
-
const rel = path.relative(from, absFile);
|
|
149
|
+
const rel = path$1.relative(from, absFile);
|
|
151
150
|
emit({
|
|
152
151
|
type: "asset",
|
|
153
|
-
fileName: toPosix(rel ? path.join(to, rel) : to),
|
|
152
|
+
fileName: toPosix(rel ? path$1.join(to, rel) : to),
|
|
154
153
|
originalFileName: absFile,
|
|
155
154
|
source: await fs.promises.readFile(absFile)
|
|
156
155
|
});
|
|
157
156
|
}));
|
|
158
157
|
}));
|
|
159
158
|
};
|
|
160
|
-
const writeOutputPackageJson = (outputDir, fields = {}) => fs.promises.writeFile(path.join(outputDir, "package.json"), JSON.stringify({
|
|
159
|
+
const writeOutputPackageJson = (outputDir, fields = {}) => fs.promises.writeFile(path$1.join(outputDir, "package.json"), JSON.stringify({
|
|
161
160
|
type: "module",
|
|
162
161
|
...fields
|
|
163
162
|
}, null, 2));
|
|
@@ -168,7 +167,7 @@ const writeOutputPackageJson = (outputDir, fields = {}) => fs.promises.writeFile
|
|
|
168
167
|
* not skip the rest, and the caller must hear about it.
|
|
169
168
|
*/
|
|
170
169
|
const stripInstallFiles = async (outputDir, stagedFiles, cause) => {
|
|
171
|
-
const reasons = (await Promise.allSettled([...stagedFiles, ...PNPM_METADATA_FILES.map((file) => path.join(outputDir, file))].map((file) => fs.remove(file)))).flatMap((result) => result.status === "rejected" ? [String(result.reason)] : []);
|
|
170
|
+
const reasons = (await Promise.allSettled([...stagedFiles, ...PNPM_METADATA_FILES.map((file) => path$1.join(outputDir, file))].map((file) => fs.remove(file)))).flatMap((result) => result.status === "rejected" ? [String(result.reason)] : []);
|
|
172
171
|
if (reasons.length) throw new Error(`${PLUGIN_NAME} could not strip install-only files from '${outputDir}'; these may include registry credentials and must not be deployed. ${reasons.join("; ")}`, { cause });
|
|
173
172
|
};
|
|
174
173
|
/**
|
|
@@ -214,7 +213,7 @@ const lambdaAsset = ({ nodeModules = [], assets = [], projectRoot: projectRootOp
|
|
|
214
213
|
cwd = options.cwd;
|
|
215
214
|
prepared.clear();
|
|
216
215
|
if (assets.length) {
|
|
217
|
-
const projectRoot = path.resolve(cwd, projectRootOption ?? ".");
|
|
216
|
+
const projectRoot = path$1.resolve(cwd, projectRootOption ?? ".");
|
|
218
217
|
await emitAssets((file) => this.emitFile(file), projectRoot, assets);
|
|
219
218
|
}
|
|
220
219
|
},
|
|
@@ -222,15 +221,15 @@ const lambdaAsset = ({ nodeModules = [], assets = [], projectRoot: projectRootOp
|
|
|
222
221
|
const outputDir = resolveOutputDir(outputOptions, cwd);
|
|
223
222
|
if (prepared.has(outputDir)) return;
|
|
224
223
|
prepared.add(outputDir);
|
|
225
|
-
const projectRoot = path.resolve(cwd, projectRootOption ?? ".");
|
|
224
|
+
const projectRoot = path$1.resolve(cwd, projectRootOption ?? ".");
|
|
226
225
|
if (!nodeModules.length) {
|
|
227
226
|
await writeOutputPackageJson(outputDir);
|
|
228
227
|
return;
|
|
229
228
|
}
|
|
230
229
|
const depsLockFilePath = await resolveLockFile(depsLockFilePathOption, cwd);
|
|
231
230
|
if (!depsLockFilePath) throw new Error(`${PLUGIN_NAME} cannot find a ${PNPM_LOCK}, which \`nodeModules\` requires. Specify one with \`depsLockFilePath\`.`);
|
|
232
|
-
const workspaceRoot = path.dirname(depsLockFilePath);
|
|
233
|
-
const projectPackageJson = path.join(projectRoot, "package.json");
|
|
231
|
+
const workspaceRoot = path$1.dirname(depsLockFilePath);
|
|
232
|
+
const projectPackageJson = path$1.join(projectRoot, "package.json");
|
|
234
233
|
if (!await pathExists(projectPackageJson)) throw new Error(`${PLUGIN_NAME} cannot find a package.json in '${projectRoot}', which \`nodeModules\` requires. Specify the directory with \`projectRoot\`.`);
|
|
235
234
|
const [dependencies, packageManagerFields] = await Promise.all([extractDependencies(projectPackageJson, nodeModules), readPackageManagerFields(workspaceRoot)]);
|
|
236
235
|
await writeOutputPackageJson(outputDir, {
|
|
@@ -240,7 +239,7 @@ const lambdaAsset = ({ nodeModules = [], assets = [], projectRoot: projectRootOp
|
|
|
240
239
|
const stagedFiles = [];
|
|
241
240
|
try {
|
|
242
241
|
await stageWorkspaceFiles(workspaceRoot, outputDir, stagedFiles);
|
|
243
|
-
const lockDest = path.join(outputDir, PNPM_LOCK);
|
|
242
|
+
const lockDest = path$1.join(outputDir, PNPM_LOCK);
|
|
244
243
|
stagedFiles.push(lockDest);
|
|
245
244
|
await fs.promises.copyFile(depsLockFilePath, lockDest);
|
|
246
245
|
log.plain(log.bold(PLUGIN_NAME), "installing", log.bold(nodeModules.join(", ")));
|
|
@@ -249,8 +248,8 @@ const lambdaAsset = ({ nodeModules = [], assets = [], projectRoot: projectRootOp
|
|
|
249
248
|
} catch (err) {
|
|
250
249
|
await stripInstallFiles(outputDir, [
|
|
251
250
|
...stagedFiles,
|
|
252
|
-
path.join(outputDir, "package.json"),
|
|
253
|
-
path.join(outputDir, "node_modules")
|
|
251
|
+
path$1.join(outputDir, "package.json"),
|
|
252
|
+
path$1.join(outputDir, "node_modules")
|
|
254
253
|
], err);
|
|
255
254
|
throw err;
|
|
256
255
|
}
|
|
@@ -258,8 +257,6 @@ const lambdaAsset = ({ nodeModules = [], assets = [], projectRoot: projectRootOp
|
|
|
258
257
|
}
|
|
259
258
|
};
|
|
260
259
|
};
|
|
261
|
-
|
|
262
|
-
//#region src/rolldown/index.ts
|
|
260
|
+
// src/rolldown/index.ts
|
|
263
261
|
var rolldown_exports = /* @__PURE__ */ __exportAll({ lambdaAsset: () => lambdaAsset });
|
|
264
|
-
//#endregion
|
|
265
262
|
export { lambdaAsset as n, rolldown_exports as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -28,7 +28,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
value: mod,
|
|
29
29
|
enumerable: true
|
|
30
30
|
}) : target, mod));
|
|
31
|
-
//#endregion
|
|
32
31
|
Object.defineProperty(exports, "__exportAll", {
|
|
33
32
|
enumerable: true,
|
|
34
33
|
get: function() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __exportAll = (all, no_symbols) => {
|
|
4
4
|
let target = {};
|
|
@@ -9,5 +9,4 @@ var __exportAll = (all, no_symbols) => {
|
|
|
9
9
|
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
10
|
return target;
|
|
11
11
|
};
|
|
12
|
-
//#endregion
|
|
13
12
|
export { __exportAll as t };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
2
|
-
const require_logging = require("./logging-
|
|
3
|
-
const require_exec = require("./exec-
|
|
4
|
-
const require_fs = require("./fs-
|
|
5
|
-
let fs_extra = require("fs-extra");
|
|
6
|
-
fs_extra = require_rolldown_runtime.__toESM(fs_extra, 1);
|
|
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
|
+
const require_fs = require("./fs-DF1Qj2xv.cjs");
|
|
7
5
|
let node_path = require("node:path");
|
|
8
6
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
7
|
+
let fs_extra = require("fs-extra");
|
|
8
|
+
fs_extra = require_rolldown_runtime.__toESM(fs_extra, 1);
|
|
9
9
|
let find_up = require("find-up");
|
|
10
10
|
let node_module = require("node:module");
|
|
11
11
|
let node_url = require("node:url");
|
|
12
12
|
let yaml = require("yaml");
|
|
13
|
-
|
|
13
|
+
// src/rolldown/pnpm.ts
|
|
14
14
|
const PNPM_LOCK = "pnpm-lock.yaml";
|
|
15
15
|
const PNPM_WORKSPACE_YAML = "pnpm-workspace.yaml";
|
|
16
16
|
const PNPM_PATCHES_DIR = "patches";
|
|
@@ -115,8 +115,7 @@ const extractDependencies = async (resolveFrom, modules) => {
|
|
|
115
115
|
}
|
|
116
116
|
return result;
|
|
117
117
|
};
|
|
118
|
-
|
|
119
|
-
//#region src/rolldown/lambdaAsset.ts
|
|
118
|
+
// src/rolldown/lambdaAsset.ts
|
|
120
119
|
const PLUGIN_NAME = "skuba:lambda-asset";
|
|
121
120
|
const resolveOutputDir = ({ dir, file }, cwd) => {
|
|
122
121
|
if (!dir) throw new Error(`${PLUGIN_NAME} requires \`output.dir\`; it prepares a deployable directory, so a single \`output.file\`${file ? ` (${file})` : ""} has nowhere to install into.`);
|
|
@@ -260,10 +259,8 @@ const lambdaAsset = ({ nodeModules = [], assets = [], projectRoot: projectRootOp
|
|
|
260
259
|
}
|
|
261
260
|
};
|
|
262
261
|
};
|
|
263
|
-
|
|
264
|
-
//#region src/rolldown/index.ts
|
|
262
|
+
// src/rolldown/index.ts
|
|
265
263
|
var rolldown_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({ lambdaAsset: () => lambdaAsset });
|
|
266
|
-
//#endregion
|
|
267
264
|
Object.defineProperty(exports, "lambdaAsset", {
|
|
268
265
|
enumerable: true,
|
|
269
266
|
get: function() {
|
package/package.json
CHANGED