@sentry/craft 2.21.4 → 2.21.6
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/dist/craft +915 -737
- package/package.json +1 -1
package/dist/craft
CHANGED
|
@@ -7034,19 +7034,19 @@ var require_module_details_from_path = __commonJS({
|
|
|
7034
7034
|
basedir += segments[i4] + sep5;
|
|
7035
7035
|
}
|
|
7036
7036
|
}
|
|
7037
|
-
var
|
|
7037
|
+
var path27 = "";
|
|
7038
7038
|
var lastSegmentIndex = segments.length - 1;
|
|
7039
7039
|
for (var i22 = index + offset; i22 <= lastSegmentIndex; i22++) {
|
|
7040
7040
|
if (i22 === lastSegmentIndex) {
|
|
7041
|
-
|
|
7041
|
+
path27 += segments[i22];
|
|
7042
7042
|
} else {
|
|
7043
|
-
|
|
7043
|
+
path27 += segments[i22] + sep5;
|
|
7044
7044
|
}
|
|
7045
7045
|
}
|
|
7046
7046
|
return {
|
|
7047
7047
|
name: name2,
|
|
7048
7048
|
basedir,
|
|
7049
|
-
path:
|
|
7049
|
+
path: path27
|
|
7050
7050
|
};
|
|
7051
7051
|
};
|
|
7052
7052
|
}
|
|
@@ -7057,7 +7057,7 @@ var require_require_in_the_middle = __commonJS({
|
|
|
7057
7057
|
"node_modules/.pnpm/require-in-the-middle@8.0.1/node_modules/require-in-the-middle/index.js"(exports2, module2) {
|
|
7058
7058
|
"use strict";
|
|
7059
7059
|
init_import_meta_url();
|
|
7060
|
-
var
|
|
7060
|
+
var path27 = require("path");
|
|
7061
7061
|
var Module = require("module");
|
|
7062
7062
|
var debug3 = require_src3()("require-in-the-middle");
|
|
7063
7063
|
var moduleDetailsFromPath = require_module_details_from_path();
|
|
@@ -7202,7 +7202,7 @@ var require_require_in_the_middle = __commonJS({
|
|
|
7202
7202
|
}
|
|
7203
7203
|
moduleName = filename;
|
|
7204
7204
|
} else if (hasWhitelist === true && modules.includes(filename)) {
|
|
7205
|
-
const parsedPath =
|
|
7205
|
+
const parsedPath = path27.parse(filename);
|
|
7206
7206
|
moduleName = parsedPath.name;
|
|
7207
7207
|
basedir = parsedPath.dir;
|
|
7208
7208
|
} else {
|
|
@@ -7240,7 +7240,7 @@ var require_require_in_the_middle = __commonJS({
|
|
|
7240
7240
|
}
|
|
7241
7241
|
if (res !== filename) {
|
|
7242
7242
|
if (internals === true) {
|
|
7243
|
-
moduleName = moduleName +
|
|
7243
|
+
moduleName = moduleName + path27.sep + path27.relative(basedir, filename);
|
|
7244
7244
|
debug3("preparing to process require of internal file: %s", moduleName);
|
|
7245
7245
|
} else {
|
|
7246
7246
|
debug3("ignoring require of non-main module file: %s", res);
|
|
@@ -7276,8 +7276,8 @@ var require_require_in_the_middle = __commonJS({
|
|
|
7276
7276
|
}
|
|
7277
7277
|
};
|
|
7278
7278
|
function resolveModuleName(stat) {
|
|
7279
|
-
const normalizedPath =
|
|
7280
|
-
return
|
|
7279
|
+
const normalizedPath = path27.sep !== "/" ? stat.path.split(path27.sep).join("/") : stat.path;
|
|
7280
|
+
return path27.posix.join(stat.name, normalizedPath).replace(normalize6, "");
|
|
7281
7281
|
}
|
|
7282
7282
|
}
|
|
7283
7283
|
});
|
|
@@ -7364,7 +7364,7 @@ var require_RequireInTheMiddleSingleton = __commonJS({
|
|
|
7364
7364
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
7365
7365
|
exports2.RequireInTheMiddleSingleton = void 0;
|
|
7366
7366
|
var require_in_the_middle_1 = require_require_in_the_middle();
|
|
7367
|
-
var
|
|
7367
|
+
var path27 = require("path");
|
|
7368
7368
|
var ModuleNameTrie_1 = require_ModuleNameTrie();
|
|
7369
7369
|
var isMocha = [
|
|
7370
7370
|
"afterEach",
|
|
@@ -7428,7 +7428,7 @@ var require_RequireInTheMiddleSingleton = __commonJS({
|
|
|
7428
7428
|
};
|
|
7429
7429
|
exports2.RequireInTheMiddleSingleton = RequireInTheMiddleSingleton;
|
|
7430
7430
|
function normalizePathSeparators(moduleNameOrPath) {
|
|
7431
|
-
return
|
|
7431
|
+
return path27.sep !== ModuleNameTrie_1.ModuleNameSeparator ? moduleNameOrPath.split(path27.sep).join(ModuleNameTrie_1.ModuleNameSeparator) : moduleNameOrPath;
|
|
7432
7432
|
}
|
|
7433
7433
|
}
|
|
7434
7434
|
});
|
|
@@ -7490,7 +7490,7 @@ var require_register = __commonJS({
|
|
|
7490
7490
|
var require_import_in_the_middle = __commonJS({
|
|
7491
7491
|
"node_modules/.pnpm/import-in-the-middle@2.0.0/node_modules/import-in-the-middle/index.js"(exports2, module2) {
|
|
7492
7492
|
init_import_meta_url();
|
|
7493
|
-
var
|
|
7493
|
+
var path27 = require("path");
|
|
7494
7494
|
var parse8 = require_module_details_from_path();
|
|
7495
7495
|
var { fileURLToPath: fileURLToPath4 } = require("url");
|
|
7496
7496
|
var { MessageChannel } = require("worker_threads");
|
|
@@ -7586,7 +7586,7 @@ var require_import_in_the_middle = __commonJS({
|
|
|
7586
7586
|
if (moduleName === name2) {
|
|
7587
7587
|
if (baseDir) {
|
|
7588
7588
|
if (internals) {
|
|
7589
|
-
name2 = name2 +
|
|
7589
|
+
name2 = name2 + path27.sep + path27.relative(baseDir, fileURLToPath4(filename));
|
|
7590
7590
|
} else {
|
|
7591
7591
|
if (!getExperimentalPatchInternals() && !baseDir.endsWith(specifiers.get(filename))) continue;
|
|
7592
7592
|
}
|
|
@@ -7664,7 +7664,7 @@ var require_instrumentation2 = __commonJS({
|
|
|
7664
7664
|
init_import_meta_url();
|
|
7665
7665
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
7666
7666
|
exports2.InstrumentationBase = void 0;
|
|
7667
|
-
var
|
|
7667
|
+
var path27 = require("path");
|
|
7668
7668
|
var util_1 = require("util");
|
|
7669
7669
|
var semver_1 = require_semver();
|
|
7670
7670
|
var shimmer_1 = require_shimmer();
|
|
@@ -7762,7 +7762,7 @@ var require_instrumentation2 = __commonJS({
|
|
|
7762
7762
|
}
|
|
7763
7763
|
_extractPackageVersion(baseDir) {
|
|
7764
7764
|
try {
|
|
7765
|
-
const json2 = (0, fs_1.readFileSync)(
|
|
7765
|
+
const json2 = (0, fs_1.readFileSync)(path27.join(baseDir, "package.json"), {
|
|
7766
7766
|
encoding: "utf8"
|
|
7767
7767
|
});
|
|
7768
7768
|
const version2 = JSON.parse(json2).version;
|
|
@@ -7804,7 +7804,7 @@ var require_instrumentation2 = __commonJS({
|
|
|
7804
7804
|
return exports3;
|
|
7805
7805
|
}
|
|
7806
7806
|
const files = module3.files ?? [];
|
|
7807
|
-
const normalizedName =
|
|
7807
|
+
const normalizedName = path27.normalize(name2);
|
|
7808
7808
|
const supportedFileInstrumentations = files.filter((f4) => f4.name === normalizedName).filter((f4) => isSupported(f4.supportedVersions, version2, module3.includePrerelease));
|
|
7809
7809
|
return supportedFileInstrumentations.reduce((patchedExports, file) => {
|
|
7810
7810
|
file.moduleExports = patchedExports;
|
|
@@ -7850,8 +7850,8 @@ var require_instrumentation2 = __commonJS({
|
|
|
7850
7850
|
this._warnOnPreloadedModules();
|
|
7851
7851
|
for (const module3 of this._modules) {
|
|
7852
7852
|
const hookFn = (exports3, name2, baseDir) => {
|
|
7853
|
-
if (!baseDir &&
|
|
7854
|
-
const parsedPath =
|
|
7853
|
+
if (!baseDir && path27.isAbsolute(name2)) {
|
|
7854
|
+
const parsedPath = path27.parse(name2);
|
|
7855
7855
|
name2 = parsedPath.name;
|
|
7856
7856
|
baseDir = parsedPath.dir;
|
|
7857
7857
|
}
|
|
@@ -7860,7 +7860,7 @@ var require_instrumentation2 = __commonJS({
|
|
|
7860
7860
|
const onRequire = (exports3, name2, baseDir) => {
|
|
7861
7861
|
return this._onRequire(module3, exports3, name2, baseDir);
|
|
7862
7862
|
};
|
|
7863
|
-
const hook2 =
|
|
7863
|
+
const hook2 = path27.isAbsolute(module3.name) ? new require_in_the_middle_1.Hook([module3.name], { internals: true }, onRequire) : this._requireInTheMiddleSingleton.register(module3.name, onRequire);
|
|
7864
7864
|
this._hooks.push(hook2);
|
|
7865
7865
|
const esmHook = new import_in_the_middle_1.Hook([module3.name], { internals: false }, hookFn);
|
|
7866
7866
|
this._hooks.push(esmHook);
|
|
@@ -8327,13 +8327,13 @@ var require_utils3 = __commonJS({
|
|
|
8327
8327
|
const reqUrlObject = requestUrl || {};
|
|
8328
8328
|
const protocol = reqUrlObject.protocol || fallbackProtocol;
|
|
8329
8329
|
const port = (reqUrlObject.port || "").toString();
|
|
8330
|
-
let
|
|
8330
|
+
let path27 = reqUrlObject.path || "/";
|
|
8331
8331
|
let host = reqUrlObject.host || reqUrlObject.hostname || headers.host || "localhost";
|
|
8332
8332
|
if (host.indexOf(":") === -1 && port && port !== "80" && port !== "443") {
|
|
8333
8333
|
host += `:${port}`;
|
|
8334
8334
|
}
|
|
8335
|
-
if (
|
|
8336
|
-
const parsedUrl = url2.parse(
|
|
8335
|
+
if (path27.includes("?")) {
|
|
8336
|
+
const parsedUrl = url2.parse(path27);
|
|
8337
8337
|
const pathname = parsedUrl.pathname || "";
|
|
8338
8338
|
const query = parsedUrl.query || "";
|
|
8339
8339
|
const searchParams = new URLSearchParams(query);
|
|
@@ -8344,10 +8344,10 @@ var require_utils3 = __commonJS({
|
|
|
8344
8344
|
}
|
|
8345
8345
|
}
|
|
8346
8346
|
const redactedQuery = searchParams.toString();
|
|
8347
|
-
|
|
8347
|
+
path27 = `${pathname}?${redactedQuery}`;
|
|
8348
8348
|
}
|
|
8349
8349
|
const authPart = reqUrlObject.auth ? `${internal_types_2.STR_REDACTED}:${internal_types_2.STR_REDACTED}@` : "";
|
|
8350
|
-
return `${protocol}//${authPart}${host}${
|
|
8350
|
+
return `${protocol}//${authPart}${host}${path27}`;
|
|
8351
8351
|
};
|
|
8352
8352
|
exports2.getAbsoluteUrl = getAbsoluteUrl4;
|
|
8353
8353
|
var parseResponseStatus = (kind, statusCode) => {
|
|
@@ -11478,8 +11478,8 @@ function isValidProtocol(protocol) {
|
|
|
11478
11478
|
return protocol === "http" || protocol === "https";
|
|
11479
11479
|
}
|
|
11480
11480
|
function dsnToString(dsn, withPassword = false) {
|
|
11481
|
-
const { host, path:
|
|
11482
|
-
return `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ""}@${host}${port ? `:${port}` : ""}/${
|
|
11481
|
+
const { host, path: path27, pass, port, projectId, protocol, publicKey } = dsn;
|
|
11482
|
+
return `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ""}@${host}${port ? `:${port}` : ""}/${path27 ? `${path27}/` : path27}${projectId}`;
|
|
11483
11483
|
}
|
|
11484
11484
|
function dsnFromString(str2) {
|
|
11485
11485
|
const match3 = DSN_REGEX.exec(str2);
|
|
@@ -11490,11 +11490,11 @@ function dsnFromString(str2) {
|
|
|
11490
11490
|
return void 0;
|
|
11491
11491
|
}
|
|
11492
11492
|
const [protocol, publicKey, pass = "", host = "", port = "", lastPath = ""] = match3.slice(1);
|
|
11493
|
-
let
|
|
11493
|
+
let path27 = "";
|
|
11494
11494
|
let projectId = lastPath;
|
|
11495
11495
|
const split2 = projectId.split("/");
|
|
11496
11496
|
if (split2.length > 1) {
|
|
11497
|
-
|
|
11497
|
+
path27 = split2.slice(0, -1).join("/");
|
|
11498
11498
|
projectId = split2.pop();
|
|
11499
11499
|
}
|
|
11500
11500
|
if (projectId) {
|
|
@@ -11503,7 +11503,7 @@ function dsnFromString(str2) {
|
|
|
11503
11503
|
projectId = projectMatch[0];
|
|
11504
11504
|
}
|
|
11505
11505
|
}
|
|
11506
|
-
return dsnFromComponents({ host, pass, path:
|
|
11506
|
+
return dsnFromComponents({ host, pass, path: path27, projectId, port, protocol, publicKey });
|
|
11507
11507
|
}
|
|
11508
11508
|
function dsnFromComponents(components) {
|
|
11509
11509
|
return {
|
|
@@ -15668,9 +15668,9 @@ function stripUrlQueryAndFragment(urlPath) {
|
|
|
15668
15668
|
return urlPath.split(/[?#]/, 1)[0];
|
|
15669
15669
|
}
|
|
15670
15670
|
function getSanitizedUrlString(url2) {
|
|
15671
|
-
const { protocol, host, path:
|
|
15671
|
+
const { protocol, host, path: path27 } = url2;
|
|
15672
15672
|
const filteredHost = host?.replace(/^.*@/, "[filtered]:[filtered]@").replace(/(:80)$/, "").replace(/(:443)$/, "") || "";
|
|
15673
|
-
return `${protocol ? `${protocol}://` : ""}${filteredHost}${
|
|
15673
|
+
return `${protocol ? `${protocol}://` : ""}${filteredHost}${path27}`;
|
|
15674
15674
|
}
|
|
15675
15675
|
var DEFAULT_BASE_URL;
|
|
15676
15676
|
var init_url = __esm({
|
|
@@ -16484,8 +16484,8 @@ function splitPath(filename) {
|
|
|
16484
16484
|
const parts = splitPathRe.exec(truncated);
|
|
16485
16485
|
return parts ? parts.slice(1) : [];
|
|
16486
16486
|
}
|
|
16487
|
-
function dirname(
|
|
16488
|
-
const result = splitPath(
|
|
16487
|
+
function dirname(path27) {
|
|
16488
|
+
const result = splitPath(path27);
|
|
16489
16489
|
const root = result[0] || "";
|
|
16490
16490
|
let dir = result[1];
|
|
16491
16491
|
if (!root && !dir) {
|
|
@@ -19879,11 +19879,11 @@ function isKnownPrefetchRequest(req) {
|
|
|
19879
19879
|
return req.headers["next-router-prefetch"] === "1";
|
|
19880
19880
|
}
|
|
19881
19881
|
function isStaticAssetRequest(urlPath) {
|
|
19882
|
-
const
|
|
19883
|
-
if (
|
|
19882
|
+
const path27 = stripUrlQueryAndFragment(urlPath);
|
|
19883
|
+
if (path27.match(/\.(ico|png|jpg|jpeg|gif|svg|css|js|woff|woff2|ttf|eot|webp|avif)$/)) {
|
|
19884
19884
|
return true;
|
|
19885
19885
|
}
|
|
19886
|
-
if (
|
|
19886
|
+
if (path27.match(/^\/(robots\.txt|sitemap\.xml|manifest\.json|browserconfig\.xml)$/)) {
|
|
19887
19887
|
return true;
|
|
19888
19888
|
}
|
|
19889
19889
|
return false;
|
|
@@ -20121,8 +20121,8 @@ function getRequestUrl(requestOptions) {
|
|
|
20121
20121
|
const protocol = requestOptions.protocol || "";
|
|
20122
20122
|
const hostname3 = requestOptions.hostname || requestOptions.host || "";
|
|
20123
20123
|
const port = !requestOptions.port || requestOptions.port === 80 || requestOptions.port === 443 || /^(.*):(\d+)$/.test(hostname3) ? "" : `:${requestOptions.port}`;
|
|
20124
|
-
const
|
|
20125
|
-
return `${protocol}//${hostname3}${port}${
|
|
20124
|
+
const path27 = requestOptions.path ? requestOptions.path : "/";
|
|
20125
|
+
return `${protocol}//${hostname3}${port}${path27}`;
|
|
20126
20126
|
}
|
|
20127
20127
|
var init_getRequestUrl = __esm({
|
|
20128
20128
|
"node_modules/.pnpm/@sentry+node-core@10.27.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_62248f89c2d022bbab885c4a52bb757f/node_modules/@sentry/node-core/build/esm/utils/getRequestUrl.js"() {
|
|
@@ -20574,9 +20574,9 @@ var require_getMachineId_linux = __commonJS({
|
|
|
20574
20574
|
var api_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
20575
20575
|
async function getMachineId() {
|
|
20576
20576
|
const paths = ["/etc/machine-id", "/var/lib/dbus/machine-id"];
|
|
20577
|
-
for (const
|
|
20577
|
+
for (const path27 of paths) {
|
|
20578
20578
|
try {
|
|
20579
|
-
const result = await fs_1.promises.readFile(
|
|
20579
|
+
const result = await fs_1.promises.readFile(path27, { encoding: "utf8" });
|
|
20580
20580
|
return result.trim();
|
|
20581
20581
|
} catch (e4) {
|
|
20582
20582
|
api_1.diag.debug(`error reading machine id: ${e4}`);
|
|
@@ -23813,8 +23813,8 @@ function getRequestOptions(request3) {
|
|
|
23813
23813
|
function getRequestUrl2(request3) {
|
|
23814
23814
|
const hostname3 = request3.getHeader("host") || request3.host;
|
|
23815
23815
|
const protocol = request3.protocol;
|
|
23816
|
-
const
|
|
23817
|
-
return `${protocol}//${hostname3}${
|
|
23816
|
+
const path27 = request3.path;
|
|
23817
|
+
return `${protocol}//${hostname3}${path27}`;
|
|
23818
23818
|
}
|
|
23819
23819
|
var init_outgoing_requests = __esm({
|
|
23820
23820
|
"node_modules/.pnpm/@sentry+node-core@10.27.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_62248f89c2d022bbab885c4a52bb757f/node_modules/@sentry/node-core/build/esm/integrations/http/outgoing-requests.js"() {
|
|
@@ -24040,19 +24040,19 @@ function getBreadcrumbData2(request3) {
|
|
|
24040
24040
|
return {};
|
|
24041
24041
|
}
|
|
24042
24042
|
}
|
|
24043
|
-
function getAbsoluteUrl2(origin,
|
|
24043
|
+
function getAbsoluteUrl2(origin, path27 = "/") {
|
|
24044
24044
|
try {
|
|
24045
|
-
const url2 = new URL(
|
|
24045
|
+
const url2 = new URL(path27, origin);
|
|
24046
24046
|
return url2.toString();
|
|
24047
24047
|
} catch {
|
|
24048
24048
|
const url2 = `${origin}`;
|
|
24049
|
-
if (url2.endsWith("/") &&
|
|
24050
|
-
return `${url2}${
|
|
24049
|
+
if (url2.endsWith("/") && path27.startsWith("/")) {
|
|
24050
|
+
return `${url2}${path27.slice(1)}`;
|
|
24051
24051
|
}
|
|
24052
|
-
if (!url2.endsWith("/") && !
|
|
24053
|
-
return `${url2}/${
|
|
24052
|
+
if (!url2.endsWith("/") && !path27.startsWith("/")) {
|
|
24053
|
+
return `${url2}/${path27.slice(1)}`;
|
|
24054
24054
|
}
|
|
24055
|
-
return `${url2}${
|
|
24055
|
+
return `${url2}${path27}`;
|
|
24056
24056
|
}
|
|
24057
24057
|
}
|
|
24058
24058
|
var import_core12, import_instrumentation3, diagch, SENTRY_TRACE_HEADER2, SENTRY_BAGGAGE_HEADER2, BAGGAGE_HEADER_REGEX, SentryNodeFetchInstrumentation;
|
|
@@ -24539,12 +24539,12 @@ function emplace(map3, key, contents) {
|
|
|
24539
24539
|
}
|
|
24540
24540
|
return value;
|
|
24541
24541
|
}
|
|
24542
|
-
function shouldSkipContextLinesForFile(
|
|
24543
|
-
if (
|
|
24544
|
-
if (
|
|
24545
|
-
if (
|
|
24546
|
-
if (
|
|
24547
|
-
if (
|
|
24542
|
+
function shouldSkipContextLinesForFile(path27) {
|
|
24543
|
+
if (path27.startsWith("node:")) return true;
|
|
24544
|
+
if (path27.endsWith(".min.js")) return true;
|
|
24545
|
+
if (path27.endsWith(".min.cjs")) return true;
|
|
24546
|
+
if (path27.endsWith(".min.mjs")) return true;
|
|
24547
|
+
if (path27.startsWith("data:")) return true;
|
|
24548
24548
|
return false;
|
|
24549
24549
|
}
|
|
24550
24550
|
function shouldSkipContextLinesForFrame(frame) {
|
|
@@ -24592,9 +24592,9 @@ function makeLineReaderRanges(lines, linecontext) {
|
|
|
24592
24592
|
}
|
|
24593
24593
|
return out;
|
|
24594
24594
|
}
|
|
24595
|
-
function getContextLinesFromFile(
|
|
24595
|
+
function getContextLinesFromFile(path27, ranges, output) {
|
|
24596
24596
|
return new Promise((resolve7, _reject) => {
|
|
24597
|
-
const stream2 = (0, import_node_fs2.createReadStream)(
|
|
24597
|
+
const stream2 = (0, import_node_fs2.createReadStream)(path27);
|
|
24598
24598
|
const lineReaded = (0, import_node_readline.createInterface)({
|
|
24599
24599
|
input: stream2
|
|
24600
24600
|
});
|
|
@@ -24612,8 +24612,8 @@ function getContextLinesFromFile(path26, ranges, output) {
|
|
|
24612
24612
|
let rangeStart = range3[0];
|
|
24613
24613
|
let rangeEnd = range3[1];
|
|
24614
24614
|
function onStreamError(e4) {
|
|
24615
|
-
LRU_FILE_CONTENTS_FS_READ_FAILED.set(
|
|
24616
|
-
DEBUG_BUILD2 && debug.error(`Failed to read file: ${
|
|
24615
|
+
LRU_FILE_CONTENTS_FS_READ_FAILED.set(path27, 1);
|
|
24616
|
+
DEBUG_BUILD2 && debug.error(`Failed to read file: ${path27}. Error: ${e4}`);
|
|
24617
24617
|
lineReaded.close();
|
|
24618
24618
|
lineReaded.removeAllListeners();
|
|
24619
24619
|
destroyStreamAndResolve();
|
|
@@ -25304,8 +25304,8 @@ function collectRequireModules() {
|
|
|
25304
25304
|
const paths = getRequireCachePaths();
|
|
25305
25305
|
const infos = {};
|
|
25306
25306
|
const seen = /* @__PURE__ */ new Set();
|
|
25307
|
-
paths.forEach((
|
|
25308
|
-
let dir =
|
|
25307
|
+
paths.forEach((path27) => {
|
|
25308
|
+
let dir = path27;
|
|
25309
25309
|
const updir = () => {
|
|
25310
25310
|
const orig = dir;
|
|
25311
25311
|
dir = (0, import_node_path2.dirname)(orig);
|
|
@@ -26575,8 +26575,8 @@ var init_envToBool = __esm({
|
|
|
26575
26575
|
});
|
|
26576
26576
|
|
|
26577
26577
|
// node_modules/.pnpm/@sentry+node-core@10.27.0_@opentelemetry+api@1.9.0_@opentelemetry+context-async-hooks@2_62248f89c2d022bbab885c4a52bb757f/node_modules/@sentry/node-core/build/esm/utils/module.js
|
|
26578
|
-
function normalizeWindowsPath(
|
|
26579
|
-
return
|
|
26578
|
+
function normalizeWindowsPath(path27) {
|
|
26579
|
+
return path27.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
|
|
26580
26580
|
}
|
|
26581
26581
|
function createGetModuleFromFilename(basePath = process.argv[1] ? dirname(process.argv[1]) : process.cwd(), isWindows4 = import_node_path3.sep === "\\") {
|
|
26582
26582
|
const normalizedBase = isWindows4 ? normalizeWindowsPath(basePath) : basePath;
|
|
@@ -27515,15 +27515,15 @@ var require_src9 = __commonJS({
|
|
|
27515
27515
|
});
|
|
27516
27516
|
|
|
27517
27517
|
// node_modules/.pnpm/@sentry+node@10.27.0/node_modules/@sentry/node/build/esm/integrations/node-fetch.js
|
|
27518
|
-
function getAbsoluteUrl3(origin,
|
|
27518
|
+
function getAbsoluteUrl3(origin, path27 = "/") {
|
|
27519
27519
|
const url2 = `${origin}`;
|
|
27520
|
-
if (url2.endsWith("/") &&
|
|
27521
|
-
return `${url2}${
|
|
27520
|
+
if (url2.endsWith("/") && path27.startsWith("/")) {
|
|
27521
|
+
return `${url2}${path27.slice(1)}`;
|
|
27522
27522
|
}
|
|
27523
|
-
if (!url2.endsWith("/") && !
|
|
27524
|
-
return `${url2}/${
|
|
27523
|
+
if (!url2.endsWith("/") && !path27.startsWith("/")) {
|
|
27524
|
+
return `${url2}/${path27.slice(1)}`;
|
|
27525
27525
|
}
|
|
27526
|
-
return `${url2}${
|
|
27526
|
+
return `${url2}${path27}`;
|
|
27527
27527
|
}
|
|
27528
27528
|
function _shouldInstrumentSpans(options, clientOptions = {}) {
|
|
27529
27529
|
return typeof options.spans === "boolean" ? options.spans : !clientOptions.skipOpenTelemetrySetup && hasSpansEnabled(clientOptions);
|
|
@@ -27651,15 +27651,15 @@ var require_utils6 = __commonJS({
|
|
|
27651
27651
|
return { isLayerPathStored: true };
|
|
27652
27652
|
};
|
|
27653
27653
|
exports2.storeLayerPath = storeLayerPath;
|
|
27654
|
-
var getRouterPath = (
|
|
27654
|
+
var getRouterPath = (path27, layer) => {
|
|
27655
27655
|
const stackLayer = layer.handle?.stack?.[0];
|
|
27656
27656
|
if (stackLayer?.route?.path) {
|
|
27657
|
-
return `${
|
|
27657
|
+
return `${path27}${stackLayer.route.path}`;
|
|
27658
27658
|
}
|
|
27659
27659
|
if (stackLayer?.handle?.stack) {
|
|
27660
|
-
return (0, exports2.getRouterPath)(
|
|
27660
|
+
return (0, exports2.getRouterPath)(path27, stackLayer);
|
|
27661
27661
|
}
|
|
27662
|
-
return
|
|
27662
|
+
return path27;
|
|
27663
27663
|
};
|
|
27664
27664
|
exports2.getRouterPath = getRouterPath;
|
|
27665
27665
|
var getLayerMetadata = (route, layer, layerPath) => {
|
|
@@ -27741,7 +27741,7 @@ var require_utils6 = __commonJS({
|
|
|
27741
27741
|
};
|
|
27742
27742
|
function getConstructedRoute(req) {
|
|
27743
27743
|
const layersStore = Array.isArray(req[internal_types_1._LAYERS_STORE_PROPERTY]) ? req[internal_types_1._LAYERS_STORE_PROPERTY] : [];
|
|
27744
|
-
const meaningfulPaths = layersStore.filter((
|
|
27744
|
+
const meaningfulPaths = layersStore.filter((path27) => path27 !== "/" && path27 !== "/*");
|
|
27745
27745
|
if (meaningfulPaths.length === 1 && meaningfulPaths[0] === "*") {
|
|
27746
27746
|
return "*";
|
|
27747
27747
|
}
|
|
@@ -27753,7 +27753,7 @@ var require_utils6 = __commonJS({
|
|
|
27753
27753
|
if (layersStore.length === 0) {
|
|
27754
27754
|
return void 0;
|
|
27755
27755
|
}
|
|
27756
|
-
if (layersStore.every((
|
|
27756
|
+
if (layersStore.every((path27) => path27 === "/")) {
|
|
27757
27757
|
return req.originalUrl === "/" ? "/" : void 0;
|
|
27758
27758
|
}
|
|
27759
27759
|
const constructedRoute = getConstructedRoute(req);
|
|
@@ -30648,23 +30648,23 @@ var require_utils7 = __commonJS({
|
|
|
30648
30648
|
span.setAttribute(AttributeNames_1.AttributeNames.SOURCE, source);
|
|
30649
30649
|
}
|
|
30650
30650
|
exports2.addSpanSource = addSpanSource;
|
|
30651
|
-
function createFieldIfNotExists(tracer, getConfig, contextValue, info,
|
|
30652
|
-
let field = getField(contextValue,
|
|
30651
|
+
function createFieldIfNotExists(tracer, getConfig, contextValue, info, path27) {
|
|
30652
|
+
let field = getField(contextValue, path27);
|
|
30653
30653
|
if (field) {
|
|
30654
30654
|
return { field, spanAdded: false };
|
|
30655
30655
|
}
|
|
30656
30656
|
const config3 = getConfig();
|
|
30657
|
-
const parentSpan = config3.flatResolveSpans ? getRootSpan2(contextValue) : getParentFieldSpan(contextValue,
|
|
30657
|
+
const parentSpan = config3.flatResolveSpans ? getRootSpan2(contextValue) : getParentFieldSpan(contextValue, path27);
|
|
30658
30658
|
field = {
|
|
30659
|
-
span: createResolverSpan(tracer, getConfig, contextValue, info,
|
|
30659
|
+
span: createResolverSpan(tracer, getConfig, contextValue, info, path27, parentSpan)
|
|
30660
30660
|
};
|
|
30661
|
-
addField(contextValue,
|
|
30661
|
+
addField(contextValue, path27, field);
|
|
30662
30662
|
return { field, spanAdded: true };
|
|
30663
30663
|
}
|
|
30664
|
-
function createResolverSpan(tracer, getConfig, contextValue, info,
|
|
30664
|
+
function createResolverSpan(tracer, getConfig, contextValue, info, path27, parentSpan) {
|
|
30665
30665
|
const attributes = {
|
|
30666
30666
|
[AttributeNames_1.AttributeNames.FIELD_NAME]: info.fieldName,
|
|
30667
|
-
[AttributeNames_1.AttributeNames.FIELD_PATH]:
|
|
30667
|
+
[AttributeNames_1.AttributeNames.FIELD_PATH]: path27.join("."),
|
|
30668
30668
|
[AttributeNames_1.AttributeNames.FIELD_TYPE]: info.returnType.toString()
|
|
30669
30669
|
};
|
|
30670
30670
|
const span = tracer.startSpan(`${enum_1.SpanNames.RESOLVE} ${attributes[AttributeNames_1.AttributeNames.FIELD_PATH]}`, {
|
|
@@ -30695,15 +30695,15 @@ var require_utils7 = __commonJS({
|
|
|
30695
30695
|
}
|
|
30696
30696
|
}
|
|
30697
30697
|
exports2.getOperation = getOperation;
|
|
30698
|
-
function addField(contextValue,
|
|
30699
|
-
return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[
|
|
30698
|
+
function addField(contextValue, path27, field) {
|
|
30699
|
+
return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[path27.join(".")] = field;
|
|
30700
30700
|
}
|
|
30701
|
-
function getField(contextValue,
|
|
30702
|
-
return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[
|
|
30701
|
+
function getField(contextValue, path27) {
|
|
30702
|
+
return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[path27.join(".")];
|
|
30703
30703
|
}
|
|
30704
|
-
function getParentFieldSpan(contextValue,
|
|
30705
|
-
for (let i4 =
|
|
30706
|
-
const field = getField(contextValue,
|
|
30704
|
+
function getParentFieldSpan(contextValue, path27) {
|
|
30705
|
+
for (let i4 = path27.length - 1; i4 > 0; i4--) {
|
|
30706
|
+
const field = getField(contextValue, path27.slice(0, i4));
|
|
30707
30707
|
if (field) {
|
|
30708
30708
|
return field.span;
|
|
30709
30709
|
}
|
|
@@ -30713,9 +30713,9 @@ var require_utils7 = __commonJS({
|
|
|
30713
30713
|
function getRootSpan2(contextValue) {
|
|
30714
30714
|
return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].span;
|
|
30715
30715
|
}
|
|
30716
|
-
function pathToArray(mergeItems,
|
|
30716
|
+
function pathToArray(mergeItems, path27) {
|
|
30717
30717
|
const flattened = [];
|
|
30718
|
-
let curr =
|
|
30718
|
+
let curr = path27;
|
|
30719
30719
|
while (curr) {
|
|
30720
30720
|
let key = curr.key;
|
|
30721
30721
|
if (mergeItems && typeof key === "number") {
|
|
@@ -30868,14 +30868,14 @@ var require_utils7 = __commonJS({
|
|
|
30868
30868
|
if (!contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL]) {
|
|
30869
30869
|
return fieldResolver.call(this, source, args, contextValue, info);
|
|
30870
30870
|
}
|
|
30871
|
-
const
|
|
30872
|
-
const depth =
|
|
30871
|
+
const path27 = pathToArray(config3.mergeItems, info && info.path);
|
|
30872
|
+
const depth = path27.filter((item) => typeof item === "string").length;
|
|
30873
30873
|
let span;
|
|
30874
30874
|
let shouldEndSpan = false;
|
|
30875
30875
|
if (config3.depth >= 0 && config3.depth < depth) {
|
|
30876
|
-
span = getParentFieldSpan(contextValue,
|
|
30876
|
+
span = getParentFieldSpan(contextValue, path27);
|
|
30877
30877
|
} else {
|
|
30878
|
-
const { field, spanAdded } = createFieldIfNotExists(tracer, getConfig, contextValue, info,
|
|
30878
|
+
const { field, spanAdded } = createFieldIfNotExists(tracer, getConfig, contextValue, info, path27);
|
|
30879
30879
|
span = field.span;
|
|
30880
30880
|
shouldEndSpan = spanAdded;
|
|
30881
30881
|
}
|
|
@@ -35792,10 +35792,10 @@ var init_postgresjs = __esm({
|
|
|
35792
35792
|
*/
|
|
35793
35793
|
init() {
|
|
35794
35794
|
const instrumentationModule = new import_instrumentation8.InstrumentationNodeModuleDefinition("postgres", SUPPORTED_VERSIONS2);
|
|
35795
|
-
["src", "cf/src", "cjs/src"].forEach((
|
|
35795
|
+
["src", "cf/src", "cjs/src"].forEach((path27) => {
|
|
35796
35796
|
instrumentationModule.files.push(
|
|
35797
35797
|
new import_instrumentation8.InstrumentationNodeModuleFile(
|
|
35798
|
-
`postgres/${
|
|
35798
|
+
`postgres/${path27}/connection.js`,
|
|
35799
35799
|
["*"],
|
|
35800
35800
|
this._patchConnection.bind(this),
|
|
35801
35801
|
this._unwrap.bind(this)
|
|
@@ -35803,7 +35803,7 @@ var init_postgresjs = __esm({
|
|
|
35803
35803
|
);
|
|
35804
35804
|
instrumentationModule.files.push(
|
|
35805
35805
|
new import_instrumentation8.InstrumentationNodeModuleFile(
|
|
35806
|
-
`postgres/${
|
|
35806
|
+
`postgres/${path27}/query.js`,
|
|
35807
35807
|
SUPPORTED_VERSIONS2,
|
|
35808
35808
|
this._patchQuery.bind(this),
|
|
35809
35809
|
this._unwrap.bind(this)
|
|
@@ -36851,13 +36851,13 @@ var init_instrumentation2 = __esm({
|
|
|
36851
36851
|
return function(original) {
|
|
36852
36852
|
return function wrappedHandler(...args) {
|
|
36853
36853
|
if (typeof args[0] === "string") {
|
|
36854
|
-
const
|
|
36854
|
+
const path27 = args[0];
|
|
36855
36855
|
if (args.length === 1) {
|
|
36856
|
-
return original.apply(this, [
|
|
36856
|
+
return original.apply(this, [path27]);
|
|
36857
36857
|
}
|
|
36858
36858
|
const handlers2 = args.slice(1);
|
|
36859
36859
|
return original.apply(this, [
|
|
36860
|
-
|
|
36860
|
+
path27,
|
|
36861
36861
|
...handlers2.map((handler10) => instrumentation._wrapHandler(handler10))
|
|
36862
36862
|
]);
|
|
36863
36863
|
}
|
|
@@ -36891,13 +36891,13 @@ var init_instrumentation2 = __esm({
|
|
|
36891
36891
|
return function(original) {
|
|
36892
36892
|
return function wrappedHandler(...args) {
|
|
36893
36893
|
if (typeof args[0] === "string") {
|
|
36894
|
-
const
|
|
36894
|
+
const path27 = args[0];
|
|
36895
36895
|
if (args.length === 1) {
|
|
36896
|
-
return original.apply(this, [
|
|
36896
|
+
return original.apply(this, [path27]);
|
|
36897
36897
|
}
|
|
36898
36898
|
const handlers2 = args.slice(1);
|
|
36899
36899
|
return original.apply(this, [
|
|
36900
|
-
|
|
36900
|
+
path27,
|
|
36901
36901
|
...handlers2.map((handler10) => instrumentation._wrapHandler(handler10))
|
|
36902
36902
|
]);
|
|
36903
36903
|
}
|
|
@@ -36917,8 +36917,8 @@ var init_instrumentation2 = __esm({
|
|
|
36917
36917
|
if (!instrumentation.isEnabled()) {
|
|
36918
36918
|
return handler10.apply(this, [c4, next]);
|
|
36919
36919
|
}
|
|
36920
|
-
const
|
|
36921
|
-
const span = instrumentation.tracer.startSpan(
|
|
36920
|
+
const path27 = c4.req.path;
|
|
36921
|
+
const span = instrumentation.tracer.startSpan(path27);
|
|
36922
36922
|
return context.with(trace.setSpan(context.active(), span), () => {
|
|
36923
36923
|
return instrumentation._safeExecute(
|
|
36924
36924
|
() => {
|
|
@@ -36928,7 +36928,7 @@ var init_instrumentation2 = __esm({
|
|
|
36928
36928
|
const type2 = instrumentation._determineHandlerType(result2);
|
|
36929
36929
|
span.setAttributes({
|
|
36930
36930
|
[AttributeNames2.HONO_TYPE]: type2,
|
|
36931
|
-
[AttributeNames2.HONO_NAME]: type2 === HonoTypes.REQUEST_HANDLER ?
|
|
36931
|
+
[AttributeNames2.HONO_NAME]: type2 === HonoTypes.REQUEST_HANDLER ? path27 : handler10.name || "anonymous"
|
|
36932
36932
|
});
|
|
36933
36933
|
instrumentation.getConfig().responseHook?.(span);
|
|
36934
36934
|
return result2;
|
|
@@ -36937,7 +36937,7 @@ var init_instrumentation2 = __esm({
|
|
|
36937
36937
|
const type2 = instrumentation._determineHandlerType(result);
|
|
36938
36938
|
span.setAttributes({
|
|
36939
36939
|
[AttributeNames2.HONO_TYPE]: type2,
|
|
36940
|
-
[AttributeNames2.HONO_NAME]: type2 === HonoTypes.REQUEST_HANDLER ?
|
|
36940
|
+
[AttributeNames2.HONO_NAME]: type2 === HonoTypes.REQUEST_HANDLER ? path27 : handler10.name || "anonymous"
|
|
36941
36941
|
});
|
|
36942
36942
|
instrumentation.getConfig().responseHook?.(span);
|
|
36943
36943
|
return result;
|
|
@@ -37209,11 +37209,11 @@ var require_instrumentation15 = __commonJS({
|
|
|
37209
37209
|
const router = dispatchLayer.router;
|
|
37210
37210
|
const routesStack = router?.stack ?? [];
|
|
37211
37211
|
for (const pathLayer of routesStack) {
|
|
37212
|
-
const
|
|
37212
|
+
const path27 = pathLayer.path;
|
|
37213
37213
|
const pathStack = pathLayer.stack;
|
|
37214
37214
|
for (let j5 = 0; j5 < pathStack.length; j5++) {
|
|
37215
37215
|
const routedMiddleware = pathStack[j5];
|
|
37216
|
-
pathStack[j5] = this._patchLayer(routedMiddleware, true,
|
|
37216
|
+
pathStack[j5] = this._patchLayer(routedMiddleware, true, path27);
|
|
37217
37217
|
}
|
|
37218
37218
|
}
|
|
37219
37219
|
return dispatchLayer;
|
|
@@ -43677,10 +43677,10 @@ var require_src29 = __commonJS({
|
|
|
43677
43677
|
var fs_1 = require("fs");
|
|
43678
43678
|
var debug_1 = __importDefault2(require_src3());
|
|
43679
43679
|
var log3 = debug_1.default("@kwsites/file-exists");
|
|
43680
|
-
function check(
|
|
43681
|
-
log3(`checking %s`,
|
|
43680
|
+
function check(path27, isFile2, isDirectory) {
|
|
43681
|
+
log3(`checking %s`, path27);
|
|
43682
43682
|
try {
|
|
43683
|
-
const stat = fs_1.statSync(
|
|
43683
|
+
const stat = fs_1.statSync(path27);
|
|
43684
43684
|
if (stat.isFile() && isFile2) {
|
|
43685
43685
|
log3(`[OK] path represents a file`);
|
|
43686
43686
|
return true;
|
|
@@ -43700,8 +43700,8 @@ var require_src29 = __commonJS({
|
|
|
43700
43700
|
throw e4;
|
|
43701
43701
|
}
|
|
43702
43702
|
}
|
|
43703
|
-
function exists2(
|
|
43704
|
-
return check(
|
|
43703
|
+
function exists2(path27, type2 = exports2.READABLE) {
|
|
43704
|
+
return check(path27, (type2 & exports2.FILE) > 0, (type2 & exports2.FOLDER) > 0);
|
|
43705
43705
|
}
|
|
43706
43706
|
exports2.exists = exists2;
|
|
43707
43707
|
exports2.FILE = 1;
|
|
@@ -43772,8 +43772,8 @@ function pathspec(...paths) {
|
|
|
43772
43772
|
cache.set(key, paths);
|
|
43773
43773
|
return key;
|
|
43774
43774
|
}
|
|
43775
|
-
function isPathSpec(
|
|
43776
|
-
return
|
|
43775
|
+
function isPathSpec(path27) {
|
|
43776
|
+
return path27 instanceof String && cache.has(path27);
|
|
43777
43777
|
}
|
|
43778
43778
|
function toPaths(pathSpec) {
|
|
43779
43779
|
return cache.get(pathSpec) || [];
|
|
@@ -43817,8 +43817,8 @@ function toLinesWithContent(input = "", trimmed2 = true, separator = "\n") {
|
|
|
43817
43817
|
function forEachLineWithContent(input, callback) {
|
|
43818
43818
|
return toLinesWithContent(input, true).map((line) => callback(line));
|
|
43819
43819
|
}
|
|
43820
|
-
function folderExists(
|
|
43821
|
-
return (0, import_file_exists.exists)(
|
|
43820
|
+
function folderExists(path27) {
|
|
43821
|
+
return (0, import_file_exists.exists)(path27, import_file_exists.FOLDER);
|
|
43822
43822
|
}
|
|
43823
43823
|
function append(target, item) {
|
|
43824
43824
|
if (Array.isArray(target)) {
|
|
@@ -44009,8 +44009,8 @@ function checkIsRepoRootTask() {
|
|
|
44009
44009
|
commands: commands4,
|
|
44010
44010
|
format: "utf-8",
|
|
44011
44011
|
onError,
|
|
44012
|
-
parser(
|
|
44013
|
-
return /^\.(git)?$/.test(
|
|
44012
|
+
parser(path27) {
|
|
44013
|
+
return /^\.(git)?$/.test(path27.trim());
|
|
44014
44014
|
}
|
|
44015
44015
|
};
|
|
44016
44016
|
}
|
|
@@ -44266,11 +44266,11 @@ function parseGrep(grep) {
|
|
|
44266
44266
|
const paths = /* @__PURE__ */ new Set();
|
|
44267
44267
|
const results = {};
|
|
44268
44268
|
forEachLineWithContent(grep, (input) => {
|
|
44269
|
-
const [
|
|
44270
|
-
paths.add(
|
|
44271
|
-
(results[
|
|
44269
|
+
const [path27, line, preview] = input.split(NULL);
|
|
44270
|
+
paths.add(path27);
|
|
44271
|
+
(results[path27] = results[path27] || []).push({
|
|
44272
44272
|
line: asNumber(line),
|
|
44273
|
-
path:
|
|
44273
|
+
path: path27,
|
|
44274
44274
|
preview
|
|
44275
44275
|
});
|
|
44276
44276
|
});
|
|
@@ -44567,14 +44567,14 @@ function hashObjectTask(filePath, write) {
|
|
|
44567
44567
|
}
|
|
44568
44568
|
return straightThroughStringTask(commands4, true);
|
|
44569
44569
|
}
|
|
44570
|
-
function parseInit(bare,
|
|
44570
|
+
function parseInit(bare, path27, text) {
|
|
44571
44571
|
const response = String(text).trim();
|
|
44572
44572
|
let result;
|
|
44573
44573
|
if (result = initResponseRegex.exec(response)) {
|
|
44574
|
-
return new InitSummary(bare,
|
|
44574
|
+
return new InitSummary(bare, path27, false, result[1]);
|
|
44575
44575
|
}
|
|
44576
44576
|
if (result = reInitResponseRegex.exec(response)) {
|
|
44577
|
-
return new InitSummary(bare,
|
|
44577
|
+
return new InitSummary(bare, path27, true, result[1]);
|
|
44578
44578
|
}
|
|
44579
44579
|
let gitDir = "";
|
|
44580
44580
|
const tokens = response.split(" ");
|
|
@@ -44585,12 +44585,12 @@ function parseInit(bare, path26, text) {
|
|
|
44585
44585
|
break;
|
|
44586
44586
|
}
|
|
44587
44587
|
}
|
|
44588
|
-
return new InitSummary(bare,
|
|
44588
|
+
return new InitSummary(bare, path27, /^re/i.test(response), gitDir);
|
|
44589
44589
|
}
|
|
44590
44590
|
function hasBareCommand(command10) {
|
|
44591
44591
|
return command10.includes(bareCommand);
|
|
44592
44592
|
}
|
|
44593
|
-
function initTask(bare = false,
|
|
44593
|
+
function initTask(bare = false, path27, customArgs) {
|
|
44594
44594
|
const commands4 = ["init", ...customArgs];
|
|
44595
44595
|
if (bare && !hasBareCommand(commands4)) {
|
|
44596
44596
|
commands4.splice(1, 0, bareCommand);
|
|
@@ -44599,7 +44599,7 @@ function initTask(bare = false, path26, customArgs) {
|
|
|
44599
44599
|
commands: commands4,
|
|
44600
44600
|
format: "utf-8",
|
|
44601
44601
|
parser(text) {
|
|
44602
|
-
return parseInit(commands4.includes("--bare"),
|
|
44602
|
+
return parseInit(commands4.includes("--bare"), path27, text);
|
|
44603
44603
|
}
|
|
44604
44604
|
};
|
|
44605
44605
|
}
|
|
@@ -44878,14 +44878,14 @@ function splitLine(result, lineStr) {
|
|
|
44878
44878
|
default:
|
|
44879
44879
|
return;
|
|
44880
44880
|
}
|
|
44881
|
-
function data2(index, workingDir,
|
|
44881
|
+
function data2(index, workingDir, path27) {
|
|
44882
44882
|
const raw2 = `${index}${workingDir}`;
|
|
44883
44883
|
const handler10 = parsers6.get(raw2);
|
|
44884
44884
|
if (handler10) {
|
|
44885
|
-
handler10(result,
|
|
44885
|
+
handler10(result, path27);
|
|
44886
44886
|
}
|
|
44887
44887
|
if (raw2 !== "##" && raw2 !== "!!") {
|
|
44888
|
-
result.files.push(new FileStatusSummary(
|
|
44888
|
+
result.files.push(new FileStatusSummary(path27, index, workingDir));
|
|
44889
44889
|
}
|
|
44890
44890
|
}
|
|
44891
44891
|
}
|
|
@@ -45050,8 +45050,8 @@ function deleteBranchTask(branch, forceDelete = false) {
|
|
|
45050
45050
|
return task;
|
|
45051
45051
|
}
|
|
45052
45052
|
function toPath(input) {
|
|
45053
|
-
const
|
|
45054
|
-
return
|
|
45053
|
+
const path27 = input.trim().replace(/^["']|["']$/g, "");
|
|
45054
|
+
return path27 && (0, import_node_path4.normalize)(path27);
|
|
45055
45055
|
}
|
|
45056
45056
|
function checkIgnoreTask(paths) {
|
|
45057
45057
|
return {
|
|
@@ -45207,8 +45207,8 @@ function stashListTask(opt = {}, customArgs) {
|
|
|
45207
45207
|
parser: parser42
|
|
45208
45208
|
};
|
|
45209
45209
|
}
|
|
45210
|
-
function addSubModuleTask(repo,
|
|
45211
|
-
return subModuleTask(["add", repo,
|
|
45210
|
+
function addSubModuleTask(repo, path27) {
|
|
45211
|
+
return subModuleTask(["add", repo, path27]);
|
|
45212
45212
|
}
|
|
45213
45213
|
function initSubModuleTask(customArgs) {
|
|
45214
45214
|
return subModuleTask(["init", ...customArgs]);
|
|
@@ -46519,9 +46519,9 @@ var init_esm8 = __esm({
|
|
|
46519
46519
|
"src/lib/responses/InitSummary.ts"() {
|
|
46520
46520
|
"use strict";
|
|
46521
46521
|
InitSummary = class {
|
|
46522
|
-
constructor(bare,
|
|
46522
|
+
constructor(bare, path27, existing, gitDir) {
|
|
46523
46523
|
this.bare = bare;
|
|
46524
|
-
this.path =
|
|
46524
|
+
this.path = path27;
|
|
46525
46525
|
this.existing = existing;
|
|
46526
46526
|
this.gitDir = gitDir;
|
|
46527
46527
|
}
|
|
@@ -47055,12 +47055,12 @@ var init_esm8 = __esm({
|
|
|
47055
47055
|
"use strict";
|
|
47056
47056
|
fromPathRegex = /^(.+)\0(.+)$/;
|
|
47057
47057
|
FileStatusSummary = class {
|
|
47058
|
-
constructor(
|
|
47059
|
-
this.path =
|
|
47058
|
+
constructor(path27, index, working_dir) {
|
|
47059
|
+
this.path = path27;
|
|
47060
47060
|
this.index = index;
|
|
47061
47061
|
this.working_dir = working_dir;
|
|
47062
47062
|
if (index === "R" || working_dir === "R") {
|
|
47063
|
-
const detail = fromPathRegex.exec(
|
|
47063
|
+
const detail = fromPathRegex.exec(path27) || [null, path27, path27];
|
|
47064
47064
|
this.from = detail[2] || "";
|
|
47065
47065
|
this.path = detail[1] || "";
|
|
47066
47066
|
}
|
|
@@ -47308,9 +47308,9 @@ var init_esm8 = __esm({
|
|
|
47308
47308
|
next
|
|
47309
47309
|
);
|
|
47310
47310
|
}
|
|
47311
|
-
hashObject(
|
|
47311
|
+
hashObject(path27, write) {
|
|
47312
47312
|
return this._runTask(
|
|
47313
|
-
hashObjectTask(
|
|
47313
|
+
hashObjectTask(path27, write === true),
|
|
47314
47314
|
trailingFunctionArgument(arguments)
|
|
47315
47315
|
);
|
|
47316
47316
|
}
|
|
@@ -47974,8 +47974,8 @@ var init_esm8 = __esm({
|
|
|
47974
47974
|
}
|
|
47975
47975
|
return this._runTask(straightThroughStringTask2(command10, this._trimmed), next);
|
|
47976
47976
|
};
|
|
47977
|
-
Git2.prototype.submoduleAdd = function(repo,
|
|
47978
|
-
return this._runTask(addSubModuleTask2(repo,
|
|
47977
|
+
Git2.prototype.submoduleAdd = function(repo, path27, then) {
|
|
47978
|
+
return this._runTask(addSubModuleTask2(repo, path27), trailingFunctionArgument2(arguments));
|
|
47979
47979
|
};
|
|
47980
47980
|
Git2.prototype.submoduleUpdate = function(args, then) {
|
|
47981
47981
|
return this._runTask(
|
|
@@ -55102,13 +55102,46 @@ ${delimiter2}
|
|
|
55102
55102
|
`);
|
|
55103
55103
|
}
|
|
55104
55104
|
}
|
|
55105
|
-
|
|
55105
|
+
function writeGitHubActionsFile(name2, content) {
|
|
55106
|
+
const runnerTemp = process.env.RUNNER_TEMP;
|
|
55107
|
+
if (!runnerTemp) {
|
|
55108
|
+
return void 0;
|
|
55109
|
+
}
|
|
55110
|
+
const dir = import_path2.default.join(runnerTemp, "craft");
|
|
55111
|
+
(0, import_fs.mkdirSync)(dir, { recursive: true });
|
|
55112
|
+
const filePath = import_path2.default.join(dir, `${name2}.md`);
|
|
55113
|
+
(0, import_fs.writeFileSync)(filePath, content, "utf-8");
|
|
55114
|
+
setGitHubActionsOutput(`${name2}_file`, filePath);
|
|
55115
|
+
return filePath;
|
|
55116
|
+
}
|
|
55117
|
+
function truncateForOutput(value, changelogUrl) {
|
|
55118
|
+
const notice = changelogUrl ? `
|
|
55119
|
+
|
|
55120
|
+
---
|
|
55121
|
+
*Changelog truncated. [View full changelog](${changelogUrl}).*` : "\n\n---\n*Changelog truncated.*";
|
|
55122
|
+
const noticeBytes = Buffer.byteLength(notice, "utf-8");
|
|
55123
|
+
const contentBudget = MAX_STEP_OUTPUT_BYTES - noticeBytes;
|
|
55124
|
+
if (Buffer.byteLength(value, "utf-8") <= MAX_STEP_OUTPUT_BYTES) {
|
|
55125
|
+
return value;
|
|
55126
|
+
}
|
|
55127
|
+
let truncated = Buffer.from(value, "utf-8").subarray(0, contentBudget).toString("utf-8");
|
|
55128
|
+
if (truncated.length > 0 && truncated[truncated.length - 1] === "\uFFFD") {
|
|
55129
|
+
truncated = truncated.slice(0, -1);
|
|
55130
|
+
}
|
|
55131
|
+
return truncated + notice;
|
|
55132
|
+
}
|
|
55133
|
+
function disableChangelogMentions(changelog) {
|
|
55134
|
+
return changelog.replace(/ by @(\S+) in /g, " by **$1** in ");
|
|
55135
|
+
}
|
|
55136
|
+
var import_fs, import_path2, import_prompts, MAX_STEP_OUTPUT_BYTES, FALSY_ENV_VALUES2, GLOBAL_FLAGS;
|
|
55106
55137
|
var init_helpers = __esm({
|
|
55107
55138
|
"src/utils/helpers.ts"() {
|
|
55108
55139
|
init_import_meta_url();
|
|
55109
55140
|
import_fs = require("fs");
|
|
55141
|
+
import_path2 = __toESM(require("path"));
|
|
55110
55142
|
import_prompts = __toESM(require_prompts3());
|
|
55111
55143
|
init_logger2();
|
|
55144
|
+
MAX_STEP_OUTPUT_BYTES = 64 * 1024;
|
|
55112
55145
|
FALSY_ENV_VALUES2 = /* @__PURE__ */ new Set(["", "undefined", "null", "0", "false", "no"]);
|
|
55113
55146
|
GLOBAL_FLAGS = {
|
|
55114
55147
|
"dry-run": false,
|
|
@@ -55207,8 +55240,8 @@ function unregisterCleanupHandlers() {
|
|
|
55207
55240
|
}
|
|
55208
55241
|
function symlinkDependencyDirs(originalCwd, worktreePath) {
|
|
55209
55242
|
for (const dir of SYMLINK_DIRS) {
|
|
55210
|
-
const srcPath = (0,
|
|
55211
|
-
const destPath = (0,
|
|
55243
|
+
const srcPath = (0, import_path3.join)(originalCwd, dir);
|
|
55244
|
+
const destPath = (0, import_path3.join)(worktreePath, dir);
|
|
55212
55245
|
if ((0, import_fs2.existsSync)(srcPath) && (0, import_fs2.lstatSync)(srcPath).isDirectory()) {
|
|
55213
55246
|
try {
|
|
55214
55247
|
(0, import_fs2.symlinkSync)(srcPath, destPath);
|
|
@@ -55240,7 +55273,7 @@ async function createDryRunIsolation(git, rev) {
|
|
|
55240
55273
|
const originalHead = (await git.revparse(["HEAD"])).trim();
|
|
55241
55274
|
const revision = rev || originalHead;
|
|
55242
55275
|
const randomSuffix = (0, import_crypto.randomBytes)(8).toString("hex");
|
|
55243
|
-
const worktreePath = (0,
|
|
55276
|
+
const worktreePath = (0, import_path3.join)((0, import_os.tmpdir)(), `craft-dry-run-${randomSuffix}`);
|
|
55244
55277
|
logger.info(`[dry-run] Creating temporary worktree at ${worktreePath}`);
|
|
55245
55278
|
const rawGit = esm_default2(originalCwd);
|
|
55246
55279
|
await rawGit.raw(["worktree", "add", "--detach", worktreePath, revision]);
|
|
@@ -55370,14 +55403,14 @@ function isGitHubMutatingMethod(methodName) {
|
|
|
55370
55403
|
(prefix) => methodName.toLowerCase().startsWith(prefix.toLowerCase())
|
|
55371
55404
|
);
|
|
55372
55405
|
}
|
|
55373
|
-
function createGitHubNamespaceProxy(target,
|
|
55406
|
+
function createGitHubNamespaceProxy(target, path27 = []) {
|
|
55374
55407
|
return new Proxy(target, {
|
|
55375
55408
|
get(obj, prop) {
|
|
55376
55409
|
const value = obj[prop];
|
|
55377
55410
|
if (value === void 0 || typeof prop === "symbol") {
|
|
55378
55411
|
return value;
|
|
55379
55412
|
}
|
|
55380
|
-
const currentPath = [...
|
|
55413
|
+
const currentPath = [...path27, prop];
|
|
55381
55414
|
if (typeof value === "function") {
|
|
55382
55415
|
return function(...args) {
|
|
55383
55416
|
if (isDryRun() && isGitHubMutatingMethod(prop)) {
|
|
@@ -55432,14 +55465,14 @@ async function safeExec(action, description9) {
|
|
|
55432
55465
|
}
|
|
55433
55466
|
return action();
|
|
55434
55467
|
}
|
|
55435
|
-
var fs, fsPromises, import_os,
|
|
55468
|
+
var fs, fsPromises, import_os, import_path3, import_crypto, import_fs2, import_promises, _inWorktreeMode, _activeWorktreeCleanup, _sigintHandler, _sigtermHandler, SYMLINK_DIRS, GIT_REMOTE_METHODS, GIT_LOCAL_METHODS, GIT_RAW_REMOTE_COMMANDS, GIT_RAW_LOCAL_COMMANDS, gitProxyCache, GIT_MOCK_RESULTS, GITHUB_MUTATING_PREFIXES, FS_MUTATING_METHODS, safeFsPromises, safeFsSync, safeFs;
|
|
55436
55469
|
var init_dryRun = __esm({
|
|
55437
55470
|
"src/utils/dryRun.ts"() {
|
|
55438
55471
|
init_import_meta_url();
|
|
55439
55472
|
fs = __toESM(require("fs"));
|
|
55440
55473
|
fsPromises = __toESM(require("fs/promises"));
|
|
55441
55474
|
import_os = require("os");
|
|
55442
|
-
|
|
55475
|
+
import_path3 = require("path");
|
|
55443
55476
|
import_crypto = require("crypto");
|
|
55444
55477
|
import_fs2 = require("fs");
|
|
55445
55478
|
import_promises = require("fs/promises");
|
|
@@ -56263,8 +56296,8 @@ var init_parseUtil = __esm({
|
|
|
56263
56296
|
init_errors3();
|
|
56264
56297
|
init_en();
|
|
56265
56298
|
makeIssue = (params) => {
|
|
56266
|
-
const { data: data2, path:
|
|
56267
|
-
const fullPath = [...
|
|
56299
|
+
const { data: data2, path: path27, errorMaps, issueData } = params;
|
|
56300
|
+
const fullPath = [...path27, ...issueData.path || []];
|
|
56268
56301
|
const fullIssue = {
|
|
56269
56302
|
...issueData,
|
|
56270
56303
|
path: fullPath
|
|
@@ -56575,11 +56608,11 @@ var init_types2 = __esm({
|
|
|
56575
56608
|
init_parseUtil();
|
|
56576
56609
|
init_util2();
|
|
56577
56610
|
ParseInputLazyPath = class {
|
|
56578
|
-
constructor(parent, value,
|
|
56611
|
+
constructor(parent, value, path27, key) {
|
|
56579
56612
|
this._cachedPath = [];
|
|
56580
56613
|
this.parent = parent;
|
|
56581
56614
|
this.data = value;
|
|
56582
|
-
this._path =
|
|
56615
|
+
this._path = path27;
|
|
56583
56616
|
this._key = key;
|
|
56584
56617
|
}
|
|
56585
56618
|
get path() {
|
|
@@ -60042,7 +60075,7 @@ var init_project_config = __esm({
|
|
|
60042
60075
|
|
|
60043
60076
|
// src/utils/detection.ts
|
|
60044
60077
|
function readTextFile(rootDir, ...pathSegments) {
|
|
60045
|
-
const filePath =
|
|
60078
|
+
const filePath = import_path4.default.join(rootDir, ...pathSegments);
|
|
60046
60079
|
if (!(0, import_fs3.existsSync)(filePath)) {
|
|
60047
60080
|
return null;
|
|
60048
60081
|
}
|
|
@@ -60073,12 +60106,12 @@ function isCompiledGitHubAction(rootDir) {
|
|
|
60073
60106
|
return false;
|
|
60074
60107
|
}
|
|
60075
60108
|
}
|
|
60076
|
-
var import_fs3,
|
|
60109
|
+
var import_fs3, import_path4;
|
|
60077
60110
|
var init_detection2 = __esm({
|
|
60078
60111
|
"src/utils/detection.ts"() {
|
|
60079
60112
|
init_import_meta_url();
|
|
60080
60113
|
import_fs3 = require("fs");
|
|
60081
|
-
|
|
60114
|
+
import_path4 = __toESM(require("path"));
|
|
60082
60115
|
init_js_yaml();
|
|
60083
60116
|
}
|
|
60084
60117
|
});
|
|
@@ -60819,14 +60852,14 @@ var require_url_state_machine = __commonJS({
|
|
|
60819
60852
|
return url2.replace(/\u0009|\u000A|\u000D/g, "");
|
|
60820
60853
|
}
|
|
60821
60854
|
function shortenPath(url2) {
|
|
60822
|
-
const
|
|
60823
|
-
if (
|
|
60855
|
+
const path27 = url2.path;
|
|
60856
|
+
if (path27.length === 0) {
|
|
60824
60857
|
return;
|
|
60825
60858
|
}
|
|
60826
|
-
if (url2.scheme === "file" &&
|
|
60859
|
+
if (url2.scheme === "file" && path27.length === 1 && isNormalizedWindowsDriveLetter(path27[0])) {
|
|
60827
60860
|
return;
|
|
60828
60861
|
}
|
|
60829
|
-
|
|
60862
|
+
path27.pop();
|
|
60830
60863
|
}
|
|
60831
60864
|
function includesCredentials(url2) {
|
|
60832
60865
|
return url2.username !== "" || url2.password !== "";
|
|
@@ -64322,17 +64355,17 @@ var init_esm10 = __esm({
|
|
|
64322
64355
|
[_size];
|
|
64323
64356
|
[_remain];
|
|
64324
64357
|
[_autoClose];
|
|
64325
|
-
constructor(
|
|
64358
|
+
constructor(path27, opt) {
|
|
64326
64359
|
opt = opt || {};
|
|
64327
64360
|
super(opt);
|
|
64328
64361
|
this.readable = true;
|
|
64329
64362
|
this.writable = false;
|
|
64330
|
-
if (typeof
|
|
64363
|
+
if (typeof path27 !== "string") {
|
|
64331
64364
|
throw new TypeError("path must be a string");
|
|
64332
64365
|
}
|
|
64333
64366
|
this[_errored] = false;
|
|
64334
64367
|
this[_fd] = typeof opt.fd === "number" ? opt.fd : void 0;
|
|
64335
|
-
this[_path] =
|
|
64368
|
+
this[_path] = path27;
|
|
64336
64369
|
this[_readSize] = opt.readSize || 16 * 1024 * 1024;
|
|
64337
64370
|
this[_reading] = false;
|
|
64338
64371
|
this[_size] = typeof opt.size === "number" ? opt.size : Infinity;
|
|
@@ -64495,10 +64528,10 @@ var init_esm10 = __esm({
|
|
|
64495
64528
|
[_flags];
|
|
64496
64529
|
[_finished] = false;
|
|
64497
64530
|
[_pos];
|
|
64498
|
-
constructor(
|
|
64531
|
+
constructor(path27, opt) {
|
|
64499
64532
|
opt = opt || {};
|
|
64500
64533
|
super(opt);
|
|
64501
|
-
this[_path] =
|
|
64534
|
+
this[_path] = path27;
|
|
64502
64535
|
this[_fd] = typeof opt.fd === "number" ? opt.fd : void 0;
|
|
64503
64536
|
this[_mode] = opt.mode === void 0 ? 438 : opt.mode;
|
|
64504
64537
|
this[_pos] = typeof opt.start === "number" ? opt.start : void 0;
|
|
@@ -65425,10 +65458,10 @@ var init_header = __esm({
|
|
|
65425
65458
|
}
|
|
65426
65459
|
const prefixSize = this.ctime || this.atime ? 130 : 155;
|
|
65427
65460
|
const split2 = splitPrefix(this.path || "", prefixSize);
|
|
65428
|
-
const
|
|
65461
|
+
const path27 = split2[0];
|
|
65429
65462
|
const prefix = split2[1];
|
|
65430
65463
|
this.needPax = !!split2[2];
|
|
65431
|
-
this.needPax = encString(buf, off, 100,
|
|
65464
|
+
this.needPax = encString(buf, off, 100, path27) || this.needPax;
|
|
65432
65465
|
this.needPax = encNumber(buf, off + 100, 8, this.mode) || this.needPax;
|
|
65433
65466
|
this.needPax = encNumber(buf, off + 108, 8, this.uid) || this.needPax;
|
|
65434
65467
|
this.needPax = encNumber(buf, off + 116, 8, this.gid) || this.needPax;
|
|
@@ -66331,13 +66364,13 @@ var init_strip_trailing_slashes = __esm({
|
|
|
66331
66364
|
});
|
|
66332
66365
|
|
|
66333
66366
|
// node_modules/.pnpm/tar@7.5.7/node_modules/tar/dist/esm/list.js
|
|
66334
|
-
var import_node_fs4,
|
|
66367
|
+
var import_node_fs4, import_path5, onReadEntryFunction, filesFilter, listFileSync, listFile, list;
|
|
66335
66368
|
var init_list = __esm({
|
|
66336
66369
|
"node_modules/.pnpm/tar@7.5.7/node_modules/tar/dist/esm/list.js"() {
|
|
66337
66370
|
init_import_meta_url();
|
|
66338
66371
|
init_esm10();
|
|
66339
66372
|
import_node_fs4 = __toESM(require("node:fs"), 1);
|
|
66340
|
-
|
|
66373
|
+
import_path5 = require("path");
|
|
66341
66374
|
init_make_command();
|
|
66342
66375
|
init_parse();
|
|
66343
66376
|
init_strip_trailing_slashes();
|
|
@@ -66352,7 +66385,7 @@ var init_list = __esm({
|
|
|
66352
66385
|
const map3 = new Map(files.map((f4) => [stripTrailingSlashes(f4), true]));
|
|
66353
66386
|
const filter3 = opt.filter;
|
|
66354
66387
|
const mapHas = (file, r4 = "") => {
|
|
66355
|
-
const root = r4 || (0,
|
|
66388
|
+
const root = r4 || (0, import_path5.parse)(file).root || ".";
|
|
66356
66389
|
let ret;
|
|
66357
66390
|
if (file === root)
|
|
66358
66391
|
ret = false;
|
|
@@ -66361,7 +66394,7 @@ var init_list = __esm({
|
|
|
66361
66394
|
if (m5 !== void 0) {
|
|
66362
66395
|
ret = m5;
|
|
66363
66396
|
} else {
|
|
66364
|
-
ret = mapHas((0,
|
|
66397
|
+
ret = mapHas((0, import_path5.dirname)(file), root);
|
|
66365
66398
|
}
|
|
66366
66399
|
}
|
|
66367
66400
|
map3.set(file, ret);
|
|
@@ -66466,16 +66499,16 @@ var init_strip_absolute_path = __esm({
|
|
|
66466
66499
|
init_import_meta_url();
|
|
66467
66500
|
import_node_path7 = require("node:path");
|
|
66468
66501
|
({ isAbsolute: isAbsolute2, parse: parse3 } = import_node_path7.win32);
|
|
66469
|
-
stripAbsolutePath = (
|
|
66502
|
+
stripAbsolutePath = (path27) => {
|
|
66470
66503
|
let r4 = "";
|
|
66471
|
-
let parsed = parse3(
|
|
66472
|
-
while (isAbsolute2(
|
|
66473
|
-
const root =
|
|
66474
|
-
|
|
66504
|
+
let parsed = parse3(path27);
|
|
66505
|
+
while (isAbsolute2(path27) || parsed.root) {
|
|
66506
|
+
const root = path27.charAt(0) === "/" && path27.slice(0, 4) !== "//?/" ? "/" : parsed.root;
|
|
66507
|
+
path27 = path27.slice(root.length);
|
|
66475
66508
|
r4 += root;
|
|
66476
|
-
parsed = parse3(
|
|
66509
|
+
parsed = parse3(path27);
|
|
66477
66510
|
}
|
|
66478
|
-
return [r4,
|
|
66511
|
+
return [r4, path27];
|
|
66479
66512
|
};
|
|
66480
66513
|
}
|
|
66481
66514
|
});
|
|
@@ -66495,13 +66528,13 @@ var init_winchars = __esm({
|
|
|
66495
66528
|
});
|
|
66496
66529
|
|
|
66497
66530
|
// node_modules/.pnpm/tar@7.5.7/node_modules/tar/dist/esm/write-entry.js
|
|
66498
|
-
var import_fs5,
|
|
66531
|
+
var import_fs5, import_path6, prefixPath, maxReadSize, PROCESS, FILE, DIRECTORY, SYMLINK, HARDLINK, HEADER, READ2, LSTAT, ONLSTAT, ONREAD, ONREADLINK, OPENFILE, ONOPENFILE, CLOSE, MODE, AWAITDRAIN, ONDRAIN, PREFIX2, WriteEntry, WriteEntrySync, WriteEntryTar, getType;
|
|
66499
66532
|
var init_write_entry = __esm({
|
|
66500
66533
|
"node_modules/.pnpm/tar@7.5.7/node_modules/tar/dist/esm/write-entry.js"() {
|
|
66501
66534
|
init_import_meta_url();
|
|
66502
66535
|
import_fs5 = __toESM(require("fs"), 1);
|
|
66503
66536
|
init_esm9();
|
|
66504
|
-
|
|
66537
|
+
import_path6 = __toESM(require("path"), 1);
|
|
66505
66538
|
init_header();
|
|
66506
66539
|
init_mode_fix();
|
|
66507
66540
|
init_normalize_windows_path();
|
|
@@ -66511,12 +66544,12 @@ var init_write_entry = __esm({
|
|
|
66511
66544
|
init_strip_trailing_slashes();
|
|
66512
66545
|
init_warn_method();
|
|
66513
66546
|
init_winchars();
|
|
66514
|
-
prefixPath = (
|
|
66547
|
+
prefixPath = (path27, prefix) => {
|
|
66515
66548
|
if (!prefix) {
|
|
66516
|
-
return normalizeWindowsPath2(
|
|
66549
|
+
return normalizeWindowsPath2(path27);
|
|
66517
66550
|
}
|
|
66518
|
-
|
|
66519
|
-
return stripTrailingSlashes(prefix) + "/" +
|
|
66551
|
+
path27 = normalizeWindowsPath2(path27).replace(/^\.(\/|$)/, "");
|
|
66552
|
+
return stripTrailingSlashes(prefix) + "/" + path27;
|
|
66520
66553
|
};
|
|
66521
66554
|
maxReadSize = 16 * 1024 * 1024;
|
|
66522
66555
|
PROCESS = Symbol("process");
|
|
@@ -66601,7 +66634,7 @@ var init_write_entry = __esm({
|
|
|
66601
66634
|
this.path = decode(this.path.replace(/\\/g, "/"));
|
|
66602
66635
|
p4 = p4.replace(/\\/g, "/");
|
|
66603
66636
|
}
|
|
66604
|
-
this.absolute = normalizeWindowsPath2(opt.absolute ||
|
|
66637
|
+
this.absolute = normalizeWindowsPath2(opt.absolute || import_path6.default.resolve(this.cwd, p4));
|
|
66605
66638
|
if (this.path === "") {
|
|
66606
66639
|
this.path = "./";
|
|
66607
66640
|
}
|
|
@@ -66661,8 +66694,8 @@ var init_write_entry = __esm({
|
|
|
66661
66694
|
[MODE](mode) {
|
|
66662
66695
|
return modeFix(mode, this.type === "Directory", this.portable);
|
|
66663
66696
|
}
|
|
66664
|
-
[PREFIX2](
|
|
66665
|
-
return prefixPath(
|
|
66697
|
+
[PREFIX2](path27) {
|
|
66698
|
+
return prefixPath(path27, this.prefix);
|
|
66666
66699
|
}
|
|
66667
66700
|
[HEADER]() {
|
|
66668
66701
|
if (!this.stat) {
|
|
@@ -66740,7 +66773,7 @@ var init_write_entry = __esm({
|
|
|
66740
66773
|
throw new Error("cannot create link entry without stat");
|
|
66741
66774
|
}
|
|
66742
66775
|
this.type = "Link";
|
|
66743
|
-
this.linkpath = normalizeWindowsPath2(
|
|
66776
|
+
this.linkpath = normalizeWindowsPath2(import_path6.default.relative(this.cwd, linkpath));
|
|
66744
66777
|
this.stat.size = 0;
|
|
66745
66778
|
this[HEADER]();
|
|
66746
66779
|
this.end();
|
|
@@ -67043,8 +67076,8 @@ var init_write_entry = __esm({
|
|
|
67043
67076
|
super.write(b5);
|
|
67044
67077
|
readEntry.pipe(this);
|
|
67045
67078
|
}
|
|
67046
|
-
[PREFIX2](
|
|
67047
|
-
return prefixPath(
|
|
67079
|
+
[PREFIX2](path27) {
|
|
67080
|
+
return prefixPath(path27, this.prefix);
|
|
67048
67081
|
}
|
|
67049
67082
|
[MODE](mode) {
|
|
67050
67083
|
return modeFix(mode, this.type === "Directory", this.portable);
|
|
@@ -67466,7 +67499,7 @@ var init_esm12 = __esm({
|
|
|
67466
67499
|
});
|
|
67467
67500
|
|
|
67468
67501
|
// node_modules/.pnpm/tar@7.5.7/node_modules/tar/dist/esm/pack.js
|
|
67469
|
-
var import_fs6,
|
|
67502
|
+
var import_fs6, import_path7, PackJob, EOF2, ONSTAT, ENDED2, QUEUE2, CURRENT, PROCESS2, PROCESSING, PROCESSJOB, JOBS, JOBDONE, ADDFSENTRY, ADDTARENTRY, STAT, READDIR, ONREADDIR, PIPE, ENTRY, ENTRYOPT, WRITEENTRYCLASS, WRITE, ONDRAIN2, Pack, PackSync;
|
|
67470
67503
|
var init_pack = __esm({
|
|
67471
67504
|
"node_modules/.pnpm/tar@7.5.7/node_modules/tar/dist/esm/pack.js"() {
|
|
67472
67505
|
init_import_meta_url();
|
|
@@ -67477,7 +67510,7 @@ var init_pack = __esm({
|
|
|
67477
67510
|
init_esm12();
|
|
67478
67511
|
init_read_entry();
|
|
67479
67512
|
init_warn_method();
|
|
67480
|
-
|
|
67513
|
+
import_path7 = __toESM(require("path"), 1);
|
|
67481
67514
|
init_normalize_windows_path();
|
|
67482
67515
|
PackJob = class {
|
|
67483
67516
|
path;
|
|
@@ -67488,8 +67521,8 @@ var init_pack = __esm({
|
|
|
67488
67521
|
pending = false;
|
|
67489
67522
|
ignore = false;
|
|
67490
67523
|
piped = false;
|
|
67491
|
-
constructor(
|
|
67492
|
-
this.path =
|
|
67524
|
+
constructor(path27, absolute) {
|
|
67525
|
+
this.path = path27 || "./";
|
|
67493
67526
|
this.absolute = absolute;
|
|
67494
67527
|
}
|
|
67495
67528
|
};
|
|
@@ -67618,21 +67651,21 @@ var init_pack = __esm({
|
|
|
67618
67651
|
[WRITE](chunk) {
|
|
67619
67652
|
return super.write(chunk);
|
|
67620
67653
|
}
|
|
67621
|
-
add(
|
|
67622
|
-
this.write(
|
|
67654
|
+
add(path27) {
|
|
67655
|
+
this.write(path27);
|
|
67623
67656
|
return this;
|
|
67624
67657
|
}
|
|
67625
|
-
end(
|
|
67626
|
-
if (typeof
|
|
67627
|
-
cb =
|
|
67628
|
-
|
|
67658
|
+
end(path27, encoding, cb) {
|
|
67659
|
+
if (typeof path27 === "function") {
|
|
67660
|
+
cb = path27;
|
|
67661
|
+
path27 = void 0;
|
|
67629
67662
|
}
|
|
67630
67663
|
if (typeof encoding === "function") {
|
|
67631
67664
|
cb = encoding;
|
|
67632
67665
|
encoding = void 0;
|
|
67633
67666
|
}
|
|
67634
|
-
if (
|
|
67635
|
-
this.add(
|
|
67667
|
+
if (path27) {
|
|
67668
|
+
this.add(path27);
|
|
67636
67669
|
}
|
|
67637
67670
|
this[ENDED2] = true;
|
|
67638
67671
|
this[PROCESS2]();
|
|
@@ -67640,19 +67673,19 @@ var init_pack = __esm({
|
|
|
67640
67673
|
cb();
|
|
67641
67674
|
return this;
|
|
67642
67675
|
}
|
|
67643
|
-
write(
|
|
67676
|
+
write(path27) {
|
|
67644
67677
|
if (this[ENDED2]) {
|
|
67645
67678
|
throw new Error("write after end");
|
|
67646
67679
|
}
|
|
67647
|
-
if (
|
|
67648
|
-
this[ADDTARENTRY](
|
|
67680
|
+
if (path27 instanceof ReadEntry) {
|
|
67681
|
+
this[ADDTARENTRY](path27);
|
|
67649
67682
|
} else {
|
|
67650
|
-
this[ADDFSENTRY](
|
|
67683
|
+
this[ADDFSENTRY](path27);
|
|
67651
67684
|
}
|
|
67652
67685
|
return this.flowing;
|
|
67653
67686
|
}
|
|
67654
67687
|
[ADDTARENTRY](p4) {
|
|
67655
|
-
const absolute = normalizeWindowsPath2(
|
|
67688
|
+
const absolute = normalizeWindowsPath2(import_path7.default.resolve(this.cwd, p4.path));
|
|
67656
67689
|
if (!this.filter(p4.path, p4)) {
|
|
67657
67690
|
p4.resume();
|
|
67658
67691
|
} else {
|
|
@@ -67665,7 +67698,7 @@ var init_pack = __esm({
|
|
|
67665
67698
|
this[PROCESS2]();
|
|
67666
67699
|
}
|
|
67667
67700
|
[ADDFSENTRY](p4) {
|
|
67668
|
-
const absolute = normalizeWindowsPath2(
|
|
67701
|
+
const absolute = normalizeWindowsPath2(import_path7.default.resolve(this.cwd, p4));
|
|
67669
67702
|
this[QUEUE2].push(new PackJob(p4, absolute));
|
|
67670
67703
|
this[PROCESS2]();
|
|
67671
67704
|
}
|
|
@@ -68006,9 +68039,9 @@ var init_esm13 = __esm({
|
|
|
68006
68039
|
init_import_meta_url();
|
|
68007
68040
|
import_node_fs5 = __toESM(require("node:fs"), 1);
|
|
68008
68041
|
import_node_path9 = __toESM(require("node:path"), 1);
|
|
68009
|
-
lchownSync = (
|
|
68042
|
+
lchownSync = (path27, uid, gid) => {
|
|
68010
68043
|
try {
|
|
68011
|
-
return import_node_fs5.default.lchownSync(
|
|
68044
|
+
return import_node_fs5.default.lchownSync(path27, uid, gid);
|
|
68012
68045
|
} catch (er) {
|
|
68013
68046
|
if (er?.code !== "ENOENT")
|
|
68014
68047
|
throw er;
|
|
@@ -68092,9 +68125,9 @@ var init_cwd_error = __esm({
|
|
|
68092
68125
|
path;
|
|
68093
68126
|
code;
|
|
68094
68127
|
syscall = "chdir";
|
|
68095
|
-
constructor(
|
|
68096
|
-
super(`${code2}: Cannot cd into '${
|
|
68097
|
-
this.path =
|
|
68128
|
+
constructor(path27, code2) {
|
|
68129
|
+
super(`${code2}: Cannot cd into '${path27}'`);
|
|
68130
|
+
this.path = path27;
|
|
68098
68131
|
this.code = code2;
|
|
68099
68132
|
}
|
|
68100
68133
|
get name() {
|
|
@@ -68114,10 +68147,10 @@ var init_symlink_error = __esm({
|
|
|
68114
68147
|
symlink;
|
|
68115
68148
|
syscall = "symlink";
|
|
68116
68149
|
code = "TAR_SYMLINK_ERROR";
|
|
68117
|
-
constructor(symlink,
|
|
68150
|
+
constructor(symlink, path27) {
|
|
68118
68151
|
super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link");
|
|
68119
68152
|
this.symlink = symlink;
|
|
68120
|
-
this.path =
|
|
68153
|
+
this.path = path27;
|
|
68121
68154
|
}
|
|
68122
68155
|
get name() {
|
|
68123
68156
|
return "SymlinkError";
|
|
@@ -68127,7 +68160,7 @@ var init_symlink_error = __esm({
|
|
|
68127
68160
|
});
|
|
68128
68161
|
|
|
68129
68162
|
// node_modules/.pnpm/tar@7.5.7/node_modules/tar/dist/esm/mkdir.js
|
|
68130
|
-
var import_node_fs6, import_promises2, import_node_path10, checkCwd, mkdir, mkdir_, onmkdir, checkCwdSync,
|
|
68163
|
+
var import_node_fs6, import_promises2, import_node_path10, checkCwd, mkdir, mkdir_, onmkdir, checkCwdSync, mkdirSync2;
|
|
68131
68164
|
var init_mkdir = __esm({
|
|
68132
68165
|
"node_modules/.pnpm/tar@7.5.7/node_modules/tar/dist/esm/mkdir.js"() {
|
|
68133
68166
|
init_import_meta_url();
|
|
@@ -68231,7 +68264,7 @@ var init_mkdir = __esm({
|
|
|
68231
68264
|
}
|
|
68232
68265
|
}
|
|
68233
68266
|
};
|
|
68234
|
-
|
|
68267
|
+
mkdirSync2 = (dir, opt) => {
|
|
68235
68268
|
dir = normalizeWindowsPath2(dir);
|
|
68236
68269
|
const umask = opt.umask ?? 18;
|
|
68237
68270
|
const mode = opt.mode | 448;
|
|
@@ -68324,13 +68357,13 @@ var init_path_reservations = __esm({
|
|
|
68324
68357
|
init_strip_trailing_slashes();
|
|
68325
68358
|
platform4 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
68326
68359
|
isWindows2 = platform4 === "win32";
|
|
68327
|
-
getDirs = (
|
|
68328
|
-
const dirs =
|
|
68360
|
+
getDirs = (path27) => {
|
|
68361
|
+
const dirs = path27.split("/").slice(0, -1).reduce((set2, path28) => {
|
|
68329
68362
|
const s4 = set2[set2.length - 1];
|
|
68330
68363
|
if (s4 !== void 0) {
|
|
68331
|
-
|
|
68364
|
+
path28 = (0, import_node_path11.join)(s4, path28);
|
|
68332
68365
|
}
|
|
68333
|
-
set2.push(
|
|
68366
|
+
set2.push(path28 || "/");
|
|
68334
68367
|
return set2;
|
|
68335
68368
|
}, []);
|
|
68336
68369
|
return dirs;
|
|
@@ -68348,7 +68381,7 @@ var init_path_reservations = __esm({
|
|
|
68348
68381
|
paths = isWindows2 ? ["win32 parallelization disabled"] : paths.map((p4) => {
|
|
68349
68382
|
return stripTrailingSlashes((0, import_node_path11.join)(normalizeUnicode(p4)));
|
|
68350
68383
|
});
|
|
68351
|
-
const dirs = new Set(paths.map((
|
|
68384
|
+
const dirs = new Set(paths.map((path27) => getDirs(path27)).reduce((a4, b5) => a4.concat(b5)));
|
|
68352
68385
|
this.#reservations.set(fn, { dirs, paths });
|
|
68353
68386
|
for (const p4 of paths) {
|
|
68354
68387
|
const q5 = this.#queues.get(p4);
|
|
@@ -68381,8 +68414,8 @@ var init_path_reservations = __esm({
|
|
|
68381
68414
|
throw new Error("function does not have any path reservations");
|
|
68382
68415
|
}
|
|
68383
68416
|
return {
|
|
68384
|
-
paths: res.paths.map((
|
|
68385
|
-
dirs: [...res.dirs].map((
|
|
68417
|
+
paths: res.paths.map((path27) => this.#queues.get(path27)),
|
|
68418
|
+
dirs: [...res.dirs].map((path27) => this.#queues.get(path27))
|
|
68386
68419
|
};
|
|
68387
68420
|
}
|
|
68388
68421
|
// check if fn is first in line for all its paths, and is
|
|
@@ -68410,14 +68443,14 @@ var init_path_reservations = __esm({
|
|
|
68410
68443
|
}
|
|
68411
68444
|
const { paths, dirs } = res;
|
|
68412
68445
|
const next = /* @__PURE__ */ new Set();
|
|
68413
|
-
for (const
|
|
68414
|
-
const q5 = this.#queues.get(
|
|
68446
|
+
for (const path27 of paths) {
|
|
68447
|
+
const q5 = this.#queues.get(path27);
|
|
68415
68448
|
if (!q5 || q5?.[0] !== fn) {
|
|
68416
68449
|
continue;
|
|
68417
68450
|
}
|
|
68418
68451
|
const q0 = q5[1];
|
|
68419
68452
|
if (!q0) {
|
|
68420
|
-
this.#queues.delete(
|
|
68453
|
+
this.#queues.delete(path27);
|
|
68421
68454
|
continue;
|
|
68422
68455
|
}
|
|
68423
68456
|
q5.shift();
|
|
@@ -68500,24 +68533,24 @@ var init_unpack = __esm({
|
|
|
68500
68533
|
platform5 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
68501
68534
|
isWindows3 = platform5 === "win32";
|
|
68502
68535
|
DEFAULT_MAX_DEPTH = 1024;
|
|
68503
|
-
unlinkFile = (
|
|
68536
|
+
unlinkFile = (path27, cb) => {
|
|
68504
68537
|
if (!isWindows3) {
|
|
68505
|
-
return import_node_fs7.default.unlink(
|
|
68538
|
+
return import_node_fs7.default.unlink(path27, cb);
|
|
68506
68539
|
}
|
|
68507
|
-
const name2 =
|
|
68508
|
-
import_node_fs7.default.rename(
|
|
68540
|
+
const name2 = path27 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex");
|
|
68541
|
+
import_node_fs7.default.rename(path27, name2, (er) => {
|
|
68509
68542
|
if (er) {
|
|
68510
68543
|
return cb(er);
|
|
68511
68544
|
}
|
|
68512
68545
|
import_node_fs7.default.unlink(name2, cb);
|
|
68513
68546
|
});
|
|
68514
68547
|
};
|
|
68515
|
-
unlinkFileSync = (
|
|
68548
|
+
unlinkFileSync = (path27) => {
|
|
68516
68549
|
if (!isWindows3) {
|
|
68517
|
-
return import_node_fs7.default.unlinkSync(
|
|
68550
|
+
return import_node_fs7.default.unlinkSync(path27);
|
|
68518
68551
|
}
|
|
68519
|
-
const name2 =
|
|
68520
|
-
import_node_fs7.default.renameSync(
|
|
68552
|
+
const name2 = path27 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex");
|
|
68553
|
+
import_node_fs7.default.renameSync(path27, name2);
|
|
68521
68554
|
import_node_fs7.default.unlinkSync(name2);
|
|
68522
68555
|
};
|
|
68523
68556
|
uint32 = (a4, b5, c4) => a4 !== void 0 && a4 === a4 >>> 0 ? a4 : b5 !== void 0 && b5 === b5 >>> 0 ? b5 : c4;
|
|
@@ -69135,7 +69168,7 @@ var init_unpack = __esm({
|
|
|
69135
69168
|
}
|
|
69136
69169
|
[MKDIR](dir, mode) {
|
|
69137
69170
|
try {
|
|
69138
|
-
return
|
|
69171
|
+
return mkdirSync2(normalizeWindowsPath2(dir), {
|
|
69139
69172
|
uid: this.uid,
|
|
69140
69173
|
gid: this.gid,
|
|
69141
69174
|
processUid: this.processUid,
|
|
@@ -69443,9 +69476,9 @@ var init_update = __esm({
|
|
|
69443
69476
|
if (!opt.mtimeCache) {
|
|
69444
69477
|
opt.mtimeCache = /* @__PURE__ */ new Map();
|
|
69445
69478
|
}
|
|
69446
|
-
opt.filter = filter3 ? (
|
|
69447
|
-
((opt.mtimeCache?.get(
|
|
69448
|
-
((opt.mtimeCache?.get(
|
|
69479
|
+
opt.filter = filter3 ? (path27, stat) => filter3(path27, stat) && !/* c8 ignore start */
|
|
69480
|
+
((opt.mtimeCache?.get(path27) ?? stat.mtime ?? 0) > (stat.mtime ?? 0)) : (path27, stat) => !/* c8 ignore start */
|
|
69481
|
+
((opt.mtimeCache?.get(path27) ?? stat.mtime ?? 0) > (stat.mtime ?? 0));
|
|
69449
69482
|
};
|
|
69450
69483
|
}
|
|
69451
69484
|
});
|
|
@@ -70457,7 +70490,7 @@ var require_yauzl = __commonJS({
|
|
|
70457
70490
|
exports2.ZipFile = ZipFile;
|
|
70458
70491
|
exports2.Entry = Entry;
|
|
70459
70492
|
exports2.RandomAccessReader = RandomAccessReader;
|
|
70460
|
-
function open(
|
|
70493
|
+
function open(path27, options, callback) {
|
|
70461
70494
|
if (typeof options === "function") {
|
|
70462
70495
|
callback = options;
|
|
70463
70496
|
options = null;
|
|
@@ -70469,7 +70502,7 @@ var require_yauzl = __commonJS({
|
|
|
70469
70502
|
if (options.validateEntrySizes == null) options.validateEntrySizes = true;
|
|
70470
70503
|
if (options.strictFileNames == null) options.strictFileNames = false;
|
|
70471
70504
|
if (callback == null) callback = defaultCallback;
|
|
70472
|
-
fs24.open(
|
|
70505
|
+
fs24.open(path27, "r", function(err, fd) {
|
|
70473
70506
|
if (err) return callback(err);
|
|
70474
70507
|
fromFd(fd, options, function(err2, zipfile) {
|
|
70475
70508
|
if (err2) fs24.close(fd, defaultCallback);
|
|
@@ -71072,7 +71105,7 @@ var require_extract_zip = __commonJS({
|
|
|
71072
71105
|
var debug3 = require_src3()("extract-zip");
|
|
71073
71106
|
var { createWriteStream: createWriteStream3, promises: fs24 } = require("fs");
|
|
71074
71107
|
var getStream = require_get_stream();
|
|
71075
|
-
var
|
|
71108
|
+
var path27 = require("path");
|
|
71076
71109
|
var { promisify: promisify5 } = require("util");
|
|
71077
71110
|
var stream2 = require("stream");
|
|
71078
71111
|
var yauzl = require_yauzl();
|
|
@@ -71109,12 +71142,12 @@ var require_extract_zip = __commonJS({
|
|
|
71109
71142
|
this.zipfile.readEntry();
|
|
71110
71143
|
return;
|
|
71111
71144
|
}
|
|
71112
|
-
const destDir =
|
|
71145
|
+
const destDir = path27.dirname(path27.join(this.opts.dir, entry.fileName));
|
|
71113
71146
|
try {
|
|
71114
71147
|
await fs24.mkdir(destDir, { recursive: true });
|
|
71115
71148
|
const canonicalDestDir = await fs24.realpath(destDir);
|
|
71116
|
-
const relativeDestDir =
|
|
71117
|
-
if (relativeDestDir.split(
|
|
71149
|
+
const relativeDestDir = path27.relative(this.opts.dir, canonicalDestDir);
|
|
71150
|
+
if (relativeDestDir.split(path27.sep).includes("..")) {
|
|
71118
71151
|
throw new Error(`Out of bound path "${canonicalDestDir}" found while processing file ${entry.fileName}`);
|
|
71119
71152
|
}
|
|
71120
71153
|
await this.extractEntry(entry);
|
|
@@ -71136,7 +71169,7 @@ var require_extract_zip = __commonJS({
|
|
|
71136
71169
|
if (this.opts.onEntry) {
|
|
71137
71170
|
this.opts.onEntry(entry, this.zipfile);
|
|
71138
71171
|
}
|
|
71139
|
-
const dest =
|
|
71172
|
+
const dest = path27.join(this.opts.dir, entry.fileName);
|
|
71140
71173
|
const mode = entry.externalFileAttributes >> 16 & 65535;
|
|
71141
71174
|
const IFMT2 = 61440;
|
|
71142
71175
|
const IFDIR2 = 16384;
|
|
@@ -71150,7 +71183,7 @@ var require_extract_zip = __commonJS({
|
|
|
71150
71183
|
if (!isDir) isDir = madeBy === 0 && entry.externalFileAttributes === 16;
|
|
71151
71184
|
debug3("extracting entry", { filename: entry.fileName, isDir, isSymlink: symlink });
|
|
71152
71185
|
const procMode = this.getExtractedMode(mode, isDir) & 511;
|
|
71153
|
-
const destDir = isDir ? dest :
|
|
71186
|
+
const destDir = isDir ? dest : path27.dirname(dest);
|
|
71154
71187
|
const mkdirOptions = { recursive: true };
|
|
71155
71188
|
if (isDir) {
|
|
71156
71189
|
mkdirOptions.mode = procMode;
|
|
@@ -71192,7 +71225,7 @@ var require_extract_zip = __commonJS({
|
|
|
71192
71225
|
};
|
|
71193
71226
|
module2.exports = async function(zipPath, opts) {
|
|
71194
71227
|
debug3("creating target directory", opts.dir);
|
|
71195
|
-
if (!
|
|
71228
|
+
if (!path27.isAbsolute(opts.dir)) {
|
|
71196
71229
|
throw new Error("Target directory is expected to be absolute");
|
|
71197
71230
|
}
|
|
71198
71231
|
await fs24.mkdir(opts.dir, { recursive: true });
|
|
@@ -71315,8 +71348,8 @@ function formatDigest(hash, format5) {
|
|
|
71315
71348
|
function getPotentialPaths(fileName) {
|
|
71316
71349
|
const envPath = process.env.PATH || "";
|
|
71317
71350
|
const envExt = process.env.PATHEXT || "";
|
|
71318
|
-
return envPath.replace(/"/g, "").split(
|
|
71319
|
-
(chunk) => envExt.split(
|
|
71351
|
+
return envPath.replace(/"/g, "").split(path11.delimiter).map(
|
|
71352
|
+
(chunk) => envExt.split(path11.delimiter).map((ext3) => path11.join(chunk, fileName + ext3))
|
|
71320
71353
|
).reduce((a4, b5) => a4.concat(b5));
|
|
71321
71354
|
}
|
|
71322
71355
|
function isExecutable(filePath) {
|
|
@@ -71416,14 +71449,14 @@ function catchKeyboardInterrupt(maxTimeDiff = 1e3) {
|
|
|
71416
71449
|
}
|
|
71417
71450
|
});
|
|
71418
71451
|
}
|
|
71419
|
-
var import_child_process2, import_crypto2, fs12,
|
|
71452
|
+
var import_child_process2, import_crypto2, fs12, path11, import_split, import_extract_zip, HashAlgorithm, HashOutputFormat;
|
|
71420
71453
|
var init_system = __esm({
|
|
71421
71454
|
"src/utils/system.ts"() {
|
|
71422
71455
|
init_import_meta_url();
|
|
71423
71456
|
import_child_process2 = require("child_process");
|
|
71424
71457
|
import_crypto2 = require("crypto");
|
|
71425
71458
|
fs12 = __toESM(require("fs"));
|
|
71426
|
-
|
|
71459
|
+
path11 = __toESM(require("path"));
|
|
71427
71460
|
import_split = __toESM(require_split());
|
|
71428
71461
|
init_esm14();
|
|
71429
71462
|
import_extract_zip = __toESM(require_extract_zip());
|
|
@@ -72835,17 +72868,17 @@ function requestLog(octokit) {
|
|
|
72835
72868
|
octokit.log.debug("request", options);
|
|
72836
72869
|
const start = Date.now();
|
|
72837
72870
|
const requestOptions = octokit.request.endpoint.parse(options);
|
|
72838
|
-
const
|
|
72871
|
+
const path27 = requestOptions.url.replace(options.baseUrl, "");
|
|
72839
72872
|
return request3(options).then((response) => {
|
|
72840
72873
|
const requestId = response.headers["x-github-request-id"];
|
|
72841
72874
|
octokit.log.info(
|
|
72842
|
-
`${requestOptions.method} ${
|
|
72875
|
+
`${requestOptions.method} ${path27} - ${response.status} with id ${requestId} in ${Date.now() - start}ms`
|
|
72843
72876
|
);
|
|
72844
72877
|
return response;
|
|
72845
72878
|
}).catch((error3) => {
|
|
72846
72879
|
const requestId = error3.response?.headers["x-github-request-id"] || "UNKNOWN";
|
|
72847
72880
|
octokit.log.error(
|
|
72848
|
-
`${requestOptions.method} ${
|
|
72881
|
+
`${requestOptions.method} ${path27} - ${error3.status} with id ${requestId} in ${Date.now() - start}ms`
|
|
72849
72882
|
);
|
|
72850
72883
|
throw error3;
|
|
72851
72884
|
});
|
|
@@ -76941,13 +76974,13 @@ function getGitHubClient(token = "") {
|
|
|
76941
76974
|
}
|
|
76942
76975
|
return _GitHubClientCache[githubApiToken];
|
|
76943
76976
|
}
|
|
76944
|
-
async function getFile(github, owner, repo,
|
|
76977
|
+
async function getFile(github, owner, repo, path27, ref) {
|
|
76945
76978
|
return withTracing(
|
|
76946
76979
|
async () => {
|
|
76947
76980
|
try {
|
|
76948
76981
|
const response = await github.repos.getContent({
|
|
76949
76982
|
owner,
|
|
76950
|
-
path:
|
|
76983
|
+
path: path27,
|
|
76951
76984
|
ref,
|
|
76952
76985
|
repo
|
|
76953
76986
|
});
|
|
@@ -76968,7 +77001,7 @@ async function getFile(github, owner, repo, path26, ref) {
|
|
|
76968
77001
|
attributes: {
|
|
76969
77002
|
"github.owner": owner,
|
|
76970
77003
|
"github.repo": repo,
|
|
76971
|
-
"github.path":
|
|
77004
|
+
"github.path": path27,
|
|
76972
77005
|
"github.ref": ref
|
|
76973
77006
|
}
|
|
76974
77007
|
}
|
|
@@ -77336,7 +77369,7 @@ var require_ignore = __commonJS({
|
|
|
77336
77369
|
// path matching.
|
|
77337
77370
|
// - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
|
|
77338
77371
|
// @returns {TestResult} true if a file is ignored
|
|
77339
|
-
test(
|
|
77372
|
+
test(path27, checkUnignored, mode) {
|
|
77340
77373
|
let ignored = false;
|
|
77341
77374
|
let unignored = false;
|
|
77342
77375
|
let matchedRule;
|
|
@@ -77345,7 +77378,7 @@ var require_ignore = __commonJS({
|
|
|
77345
77378
|
if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
|
|
77346
77379
|
return;
|
|
77347
77380
|
}
|
|
77348
|
-
const matched = rule[mode].test(
|
|
77381
|
+
const matched = rule[mode].test(path27);
|
|
77349
77382
|
if (!matched) {
|
|
77350
77383
|
return;
|
|
77351
77384
|
}
|
|
@@ -77366,17 +77399,17 @@ var require_ignore = __commonJS({
|
|
|
77366
77399
|
var throwError2 = (message, Ctor) => {
|
|
77367
77400
|
throw new Ctor(message);
|
|
77368
77401
|
};
|
|
77369
|
-
var checkPath = (
|
|
77370
|
-
if (!isString2(
|
|
77402
|
+
var checkPath = (path27, originalPath, doThrow) => {
|
|
77403
|
+
if (!isString2(path27)) {
|
|
77371
77404
|
return doThrow(
|
|
77372
77405
|
`path must be a string, but got \`${originalPath}\``,
|
|
77373
77406
|
TypeError
|
|
77374
77407
|
);
|
|
77375
77408
|
}
|
|
77376
|
-
if (!
|
|
77409
|
+
if (!path27) {
|
|
77377
77410
|
return doThrow(`path must not be empty`, TypeError);
|
|
77378
77411
|
}
|
|
77379
|
-
if (checkPath.isNotRelative(
|
|
77412
|
+
if (checkPath.isNotRelative(path27)) {
|
|
77380
77413
|
const r4 = "`path.relative()`d";
|
|
77381
77414
|
return doThrow(
|
|
77382
77415
|
`path should be a ${r4} string, but got "${originalPath}"`,
|
|
@@ -77385,7 +77418,7 @@ var require_ignore = __commonJS({
|
|
|
77385
77418
|
}
|
|
77386
77419
|
return true;
|
|
77387
77420
|
};
|
|
77388
|
-
var isNotRelative = (
|
|
77421
|
+
var isNotRelative = (path27) => REGEX_TEST_INVALID_PATH.test(path27);
|
|
77389
77422
|
checkPath.isNotRelative = isNotRelative;
|
|
77390
77423
|
checkPath.convert = (p4) => p4;
|
|
77391
77424
|
var Ignore3 = class {
|
|
@@ -77415,19 +77448,19 @@ var require_ignore = __commonJS({
|
|
|
77415
77448
|
}
|
|
77416
77449
|
// @returns {TestResult}
|
|
77417
77450
|
_test(originalPath, cache6, checkUnignored, slices) {
|
|
77418
|
-
const
|
|
77451
|
+
const path27 = originalPath && checkPath.convert(originalPath);
|
|
77419
77452
|
checkPath(
|
|
77420
|
-
|
|
77453
|
+
path27,
|
|
77421
77454
|
originalPath,
|
|
77422
77455
|
this._strictPathCheck ? throwError2 : RETURN_FALSE
|
|
77423
77456
|
);
|
|
77424
|
-
return this._t(
|
|
77457
|
+
return this._t(path27, cache6, checkUnignored, slices);
|
|
77425
77458
|
}
|
|
77426
|
-
checkIgnore(
|
|
77427
|
-
if (!REGEX_TEST_TRAILING_SLASH.test(
|
|
77428
|
-
return this.test(
|
|
77459
|
+
checkIgnore(path27) {
|
|
77460
|
+
if (!REGEX_TEST_TRAILING_SLASH.test(path27)) {
|
|
77461
|
+
return this.test(path27);
|
|
77429
77462
|
}
|
|
77430
|
-
const slices =
|
|
77463
|
+
const slices = path27.split(SLASH).filter(Boolean);
|
|
77431
77464
|
slices.pop();
|
|
77432
77465
|
if (slices.length) {
|
|
77433
77466
|
const parent = this._t(
|
|
@@ -77440,18 +77473,18 @@ var require_ignore = __commonJS({
|
|
|
77440
77473
|
return parent;
|
|
77441
77474
|
}
|
|
77442
77475
|
}
|
|
77443
|
-
return this._rules.test(
|
|
77476
|
+
return this._rules.test(path27, false, MODE_CHECK_IGNORE);
|
|
77444
77477
|
}
|
|
77445
|
-
_t(
|
|
77446
|
-
if (
|
|
77447
|
-
return cache6[
|
|
77478
|
+
_t(path27, cache6, checkUnignored, slices) {
|
|
77479
|
+
if (path27 in cache6) {
|
|
77480
|
+
return cache6[path27];
|
|
77448
77481
|
}
|
|
77449
77482
|
if (!slices) {
|
|
77450
|
-
slices =
|
|
77483
|
+
slices = path27.split(SLASH).filter(Boolean);
|
|
77451
77484
|
}
|
|
77452
77485
|
slices.pop();
|
|
77453
77486
|
if (!slices.length) {
|
|
77454
|
-
return cache6[
|
|
77487
|
+
return cache6[path27] = this._rules.test(path27, checkUnignored, MODE_IGNORE);
|
|
77455
77488
|
}
|
|
77456
77489
|
const parent = this._t(
|
|
77457
77490
|
slices.join(SLASH) + SLASH,
|
|
@@ -77459,29 +77492,29 @@ var require_ignore = __commonJS({
|
|
|
77459
77492
|
checkUnignored,
|
|
77460
77493
|
slices
|
|
77461
77494
|
);
|
|
77462
|
-
return cache6[
|
|
77495
|
+
return cache6[path27] = parent.ignored ? parent : this._rules.test(path27, checkUnignored, MODE_IGNORE);
|
|
77463
77496
|
}
|
|
77464
|
-
ignores(
|
|
77465
|
-
return this._test(
|
|
77497
|
+
ignores(path27) {
|
|
77498
|
+
return this._test(path27, this._ignoreCache, false).ignored;
|
|
77466
77499
|
}
|
|
77467
77500
|
createFilter() {
|
|
77468
|
-
return (
|
|
77501
|
+
return (path27) => !this.ignores(path27);
|
|
77469
77502
|
}
|
|
77470
77503
|
filter(paths) {
|
|
77471
77504
|
return makeArray(paths).filter(this.createFilter());
|
|
77472
77505
|
}
|
|
77473
77506
|
// @returns {TestResult}
|
|
77474
|
-
test(
|
|
77475
|
-
return this._test(
|
|
77507
|
+
test(path27) {
|
|
77508
|
+
return this._test(path27, this._testCache, true);
|
|
77476
77509
|
}
|
|
77477
77510
|
};
|
|
77478
77511
|
var factory = (options) => new Ignore3(options);
|
|
77479
|
-
var isPathValid = (
|
|
77512
|
+
var isPathValid = (path27) => checkPath(path27 && checkPath.convert(path27), path27, RETURN_FALSE);
|
|
77480
77513
|
var setupWindows = () => {
|
|
77481
77514
|
const makePosix = (str2) => /^\\\\\?\\/.test(str2) || /["<>|\u0000-\u001F]+/u.test(str2) ? str2 : str2.replace(/\\/g, "/");
|
|
77482
77515
|
checkPath.convert = makePosix;
|
|
77483
77516
|
const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
|
|
77484
|
-
checkPath.isNotRelative = (
|
|
77517
|
+
checkPath.isNotRelative = (path27) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path27) || isNotRelative(path27);
|
|
77485
77518
|
};
|
|
77486
77519
|
if (
|
|
77487
77520
|
// Detect `process` so that it can run in browsers.
|
|
@@ -77927,7 +77960,7 @@ var require_minimatch = __commonJS({
|
|
|
77927
77960
|
init_import_meta_url();
|
|
77928
77961
|
module2.exports = minimatch3;
|
|
77929
77962
|
minimatch3.Minimatch = Minimatch3;
|
|
77930
|
-
var
|
|
77963
|
+
var path27 = (function() {
|
|
77931
77964
|
try {
|
|
77932
77965
|
return require("path");
|
|
77933
77966
|
} catch (e4) {
|
|
@@ -77935,7 +77968,7 @@ var require_minimatch = __commonJS({
|
|
|
77935
77968
|
})() || {
|
|
77936
77969
|
sep: "/"
|
|
77937
77970
|
};
|
|
77938
|
-
minimatch3.sep =
|
|
77971
|
+
minimatch3.sep = path27.sep;
|
|
77939
77972
|
var GLOBSTAR3 = minimatch3.GLOBSTAR = Minimatch3.GLOBSTAR = {};
|
|
77940
77973
|
var expand4 = require_brace_expansion2();
|
|
77941
77974
|
var plTypes = {
|
|
@@ -78024,8 +78057,8 @@ var require_minimatch = __commonJS({
|
|
|
78024
78057
|
assertValidPattern3(pattern);
|
|
78025
78058
|
if (!options) options = {};
|
|
78026
78059
|
pattern = pattern.trim();
|
|
78027
|
-
if (!options.allowWindowsEscape &&
|
|
78028
|
-
pattern = pattern.split(
|
|
78060
|
+
if (!options.allowWindowsEscape && path27.sep !== "/") {
|
|
78061
|
+
pattern = pattern.split(path27.sep).join("/");
|
|
78029
78062
|
}
|
|
78030
78063
|
this.options = options;
|
|
78031
78064
|
this.set = [];
|
|
@@ -78394,8 +78427,8 @@ var require_minimatch = __commonJS({
|
|
|
78394
78427
|
if (this.empty) return f4 === "";
|
|
78395
78428
|
if (f4 === "/" && partial) return true;
|
|
78396
78429
|
var options = this.options;
|
|
78397
|
-
if (
|
|
78398
|
-
f4 = f4.split(
|
|
78430
|
+
if (path27.sep !== "/") {
|
|
78431
|
+
f4 = f4.split(path27.sep).join("/");
|
|
78399
78432
|
}
|
|
78400
78433
|
f4 = f4.split(slashSplit);
|
|
78401
78434
|
this.debug(this.pattern, "split", f4);
|
|
@@ -78548,12 +78581,12 @@ var require_path_is_absolute = __commonJS({
|
|
|
78548
78581
|
"node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js"(exports2, module2) {
|
|
78549
78582
|
"use strict";
|
|
78550
78583
|
init_import_meta_url();
|
|
78551
|
-
function posix5(
|
|
78552
|
-
return
|
|
78584
|
+
function posix5(path27) {
|
|
78585
|
+
return path27.charAt(0) === "/";
|
|
78553
78586
|
}
|
|
78554
|
-
function win323(
|
|
78587
|
+
function win323(path27) {
|
|
78555
78588
|
var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
|
|
78556
|
-
var result = splitDeviceRe.exec(
|
|
78589
|
+
var result = splitDeviceRe.exec(path27);
|
|
78557
78590
|
var device = result[1] || "";
|
|
78558
78591
|
var isUnc = Boolean(device && device.charAt(1) !== ":");
|
|
78559
78592
|
return Boolean(result[2] || isUnc);
|
|
@@ -78579,7 +78612,7 @@ var require_common2 = __commonJS({
|
|
|
78579
78612
|
return Object.prototype.hasOwnProperty.call(obj, field);
|
|
78580
78613
|
}
|
|
78581
78614
|
var fs24 = require("fs");
|
|
78582
|
-
var
|
|
78615
|
+
var path27 = require("path");
|
|
78583
78616
|
var minimatch3 = require_minimatch();
|
|
78584
78617
|
var isAbsolute3 = require_path_is_absolute();
|
|
78585
78618
|
var Minimatch3 = minimatch3.Minimatch;
|
|
@@ -78644,11 +78677,11 @@ var require_common2 = __commonJS({
|
|
|
78644
78677
|
if (!ownProp(options, "cwd"))
|
|
78645
78678
|
self2.cwd = cwd;
|
|
78646
78679
|
else {
|
|
78647
|
-
self2.cwd =
|
|
78680
|
+
self2.cwd = path27.resolve(options.cwd);
|
|
78648
78681
|
self2.changedCwd = self2.cwd !== cwd;
|
|
78649
78682
|
}
|
|
78650
|
-
self2.root = options.root ||
|
|
78651
|
-
self2.root =
|
|
78683
|
+
self2.root = options.root || path27.resolve(self2.cwd, "/");
|
|
78684
|
+
self2.root = path27.resolve(self2.root);
|
|
78652
78685
|
if (process.platform === "win32")
|
|
78653
78686
|
self2.root = self2.root.replace(/\\/g, "/");
|
|
78654
78687
|
self2.cwdAbs = isAbsolute3(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd);
|
|
@@ -78730,30 +78763,30 @@ var require_common2 = __commonJS({
|
|
|
78730
78763
|
function makeAbs(self2, f4) {
|
|
78731
78764
|
var abs = f4;
|
|
78732
78765
|
if (f4.charAt(0) === "/") {
|
|
78733
|
-
abs =
|
|
78766
|
+
abs = path27.join(self2.root, f4);
|
|
78734
78767
|
} else if (isAbsolute3(f4) || f4 === "") {
|
|
78735
78768
|
abs = f4;
|
|
78736
78769
|
} else if (self2.changedCwd) {
|
|
78737
|
-
abs =
|
|
78770
|
+
abs = path27.resolve(self2.cwd, f4);
|
|
78738
78771
|
} else {
|
|
78739
|
-
abs =
|
|
78772
|
+
abs = path27.resolve(f4);
|
|
78740
78773
|
}
|
|
78741
78774
|
if (process.platform === "win32")
|
|
78742
78775
|
abs = abs.replace(/\\/g, "/");
|
|
78743
78776
|
return abs;
|
|
78744
78777
|
}
|
|
78745
|
-
function isIgnored(self2,
|
|
78778
|
+
function isIgnored(self2, path28) {
|
|
78746
78779
|
if (!self2.ignore.length)
|
|
78747
78780
|
return false;
|
|
78748
78781
|
return self2.ignore.some(function(item) {
|
|
78749
|
-
return item.matcher.match(
|
|
78782
|
+
return item.matcher.match(path28) || !!(item.gmatcher && item.gmatcher.match(path28));
|
|
78750
78783
|
});
|
|
78751
78784
|
}
|
|
78752
|
-
function childrenIgnored(self2,
|
|
78785
|
+
function childrenIgnored(self2, path28) {
|
|
78753
78786
|
if (!self2.ignore.length)
|
|
78754
78787
|
return false;
|
|
78755
78788
|
return self2.ignore.some(function(item) {
|
|
78756
|
-
return !!(item.gmatcher && item.gmatcher.match(
|
|
78789
|
+
return !!(item.gmatcher && item.gmatcher.match(path28));
|
|
78757
78790
|
});
|
|
78758
78791
|
}
|
|
78759
78792
|
}
|
|
@@ -78770,7 +78803,7 @@ var require_sync = __commonJS({
|
|
|
78770
78803
|
var Minimatch3 = minimatch3.Minimatch;
|
|
78771
78804
|
var Glob2 = require_glob().Glob;
|
|
78772
78805
|
var util6 = require("util");
|
|
78773
|
-
var
|
|
78806
|
+
var path27 = require("path");
|
|
78774
78807
|
var assert3 = require("assert");
|
|
78775
78808
|
var isAbsolute3 = require_path_is_absolute();
|
|
78776
78809
|
var common2 = require_common2();
|
|
@@ -78899,7 +78932,7 @@ var require_sync = __commonJS({
|
|
|
78899
78932
|
e4 = prefix + e4;
|
|
78900
78933
|
}
|
|
78901
78934
|
if (e4.charAt(0) === "/" && !this.nomount) {
|
|
78902
|
-
e4 =
|
|
78935
|
+
e4 = path27.join(this.root, e4);
|
|
78903
78936
|
}
|
|
78904
78937
|
this._emitMatch(index, e4);
|
|
78905
78938
|
}
|
|
@@ -79050,9 +79083,9 @@ var require_sync = __commonJS({
|
|
|
79050
79083
|
if (prefix && isAbsolute3(prefix) && !this.nomount) {
|
|
79051
79084
|
var trail = /[\/\\]$/.test(prefix);
|
|
79052
79085
|
if (prefix.charAt(0) === "/") {
|
|
79053
|
-
prefix =
|
|
79086
|
+
prefix = path27.join(this.root, prefix);
|
|
79054
79087
|
} else {
|
|
79055
|
-
prefix =
|
|
79088
|
+
prefix = path27.resolve(this.root, prefix);
|
|
79056
79089
|
if (trail)
|
|
79057
79090
|
prefix += "/";
|
|
79058
79091
|
}
|
|
@@ -79172,7 +79205,7 @@ var require_glob = __commonJS({
|
|
|
79172
79205
|
var Minimatch3 = minimatch3.Minimatch;
|
|
79173
79206
|
var inherits = require_inherits();
|
|
79174
79207
|
var EE3 = require("events").EventEmitter;
|
|
79175
|
-
var
|
|
79208
|
+
var path27 = require("path");
|
|
79176
79209
|
var assert3 = require("assert");
|
|
79177
79210
|
var isAbsolute3 = require_path_is_absolute();
|
|
79178
79211
|
var globSync2 = require_sync();
|
|
@@ -79454,7 +79487,7 @@ var require_glob = __commonJS({
|
|
|
79454
79487
|
e4 = prefix + e4;
|
|
79455
79488
|
}
|
|
79456
79489
|
if (e4.charAt(0) === "/" && !this.nomount) {
|
|
79457
|
-
e4 =
|
|
79490
|
+
e4 = path27.join(this.root, e4);
|
|
79458
79491
|
}
|
|
79459
79492
|
this._emitMatch(index, e4);
|
|
79460
79493
|
}
|
|
@@ -79643,9 +79676,9 @@ var require_glob = __commonJS({
|
|
|
79643
79676
|
if (prefix && isAbsolute3(prefix) && !this.nomount) {
|
|
79644
79677
|
var trail = /[\/\\]$/.test(prefix);
|
|
79645
79678
|
if (prefix.charAt(0) === "/") {
|
|
79646
|
-
prefix =
|
|
79679
|
+
prefix = path27.join(this.root, prefix);
|
|
79647
79680
|
} else {
|
|
79648
|
-
prefix =
|
|
79681
|
+
prefix = path27.resolve(this.root, prefix);
|
|
79649
79682
|
if (trail)
|
|
79650
79683
|
prefix += "/";
|
|
79651
79684
|
}
|
|
@@ -79726,7 +79759,7 @@ var require_rimraf = __commonJS({
|
|
|
79726
79759
|
module2.exports = rimraf2;
|
|
79727
79760
|
rimraf2.sync = rimrafSync;
|
|
79728
79761
|
var assert3 = require("assert");
|
|
79729
|
-
var
|
|
79762
|
+
var path27 = require("path");
|
|
79730
79763
|
var fs24 = require("fs");
|
|
79731
79764
|
var glob2 = void 0;
|
|
79732
79765
|
try {
|
|
@@ -79917,7 +79950,7 @@ var require_rimraf = __commonJS({
|
|
|
79917
79950
|
return options.rmdir(p4, cb);
|
|
79918
79951
|
var errState;
|
|
79919
79952
|
files.forEach(function(f4) {
|
|
79920
|
-
rimraf2(
|
|
79953
|
+
rimraf2(path27.join(p4, f4), options, function(er2) {
|
|
79921
79954
|
if (errState)
|
|
79922
79955
|
return;
|
|
79923
79956
|
if (er2)
|
|
@@ -79994,7 +80027,7 @@ var require_rimraf = __commonJS({
|
|
|
79994
80027
|
assert3(p4);
|
|
79995
80028
|
assert3(options);
|
|
79996
80029
|
options.readdirSync(p4).forEach(function(f4) {
|
|
79997
|
-
rimrafSync(
|
|
80030
|
+
rimrafSync(path27.join(p4, f4), options);
|
|
79998
80031
|
});
|
|
79999
80032
|
var retries = isWindows4 ? 100 : 1;
|
|
80000
80033
|
var i4 = 0;
|
|
@@ -80019,7 +80052,7 @@ var require_tmp = __commonJS({
|
|
|
80019
80052
|
init_import_meta_url();
|
|
80020
80053
|
var fs24 = require("fs");
|
|
80021
80054
|
var os5 = require("os");
|
|
80022
|
-
var
|
|
80055
|
+
var path27 = require("path");
|
|
80023
80056
|
var crypto9 = require("crypto");
|
|
80024
80057
|
var _c5 = { fs: fs24.constants, os: os5.constants };
|
|
80025
80058
|
var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
@@ -80226,35 +80259,35 @@ var require_tmp = __commonJS({
|
|
|
80226
80259
|
return [actualOptions, callback];
|
|
80227
80260
|
}
|
|
80228
80261
|
function _resolvePath(name2, tmpDir, cb) {
|
|
80229
|
-
const pathToResolve =
|
|
80262
|
+
const pathToResolve = path27.isAbsolute(name2) ? name2 : path27.join(tmpDir, name2);
|
|
80230
80263
|
fs24.stat(pathToResolve, function(err) {
|
|
80231
80264
|
if (err) {
|
|
80232
|
-
fs24.realpath(
|
|
80265
|
+
fs24.realpath(path27.dirname(pathToResolve), function(err2, parentDir) {
|
|
80233
80266
|
if (err2) return cb(err2);
|
|
80234
|
-
cb(null,
|
|
80267
|
+
cb(null, path27.join(parentDir, path27.basename(pathToResolve)));
|
|
80235
80268
|
});
|
|
80236
80269
|
} else {
|
|
80237
|
-
fs24.realpath(
|
|
80270
|
+
fs24.realpath(path27, cb);
|
|
80238
80271
|
}
|
|
80239
80272
|
});
|
|
80240
80273
|
}
|
|
80241
80274
|
function _resolvePathSync(name2, tmpDir) {
|
|
80242
|
-
const pathToResolve =
|
|
80275
|
+
const pathToResolve = path27.isAbsolute(name2) ? name2 : path27.join(tmpDir, name2);
|
|
80243
80276
|
try {
|
|
80244
80277
|
fs24.statSync(pathToResolve);
|
|
80245
80278
|
return fs24.realpathSync(pathToResolve);
|
|
80246
80279
|
} catch (_err) {
|
|
80247
|
-
const parentDir = fs24.realpathSync(
|
|
80248
|
-
return
|
|
80280
|
+
const parentDir = fs24.realpathSync(path27.dirname(pathToResolve));
|
|
80281
|
+
return path27.join(parentDir, path27.basename(pathToResolve));
|
|
80249
80282
|
}
|
|
80250
80283
|
}
|
|
80251
80284
|
function _generateTmpName(opts) {
|
|
80252
80285
|
const tmpDir = opts.tmpdir;
|
|
80253
80286
|
if (!_isUndefined(opts.name)) {
|
|
80254
|
-
return
|
|
80287
|
+
return path27.join(tmpDir, opts.dir, opts.name);
|
|
80255
80288
|
}
|
|
80256
80289
|
if (!_isUndefined(opts.template)) {
|
|
80257
|
-
return
|
|
80290
|
+
return path27.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6));
|
|
80258
80291
|
}
|
|
80259
80292
|
const name2 = [
|
|
80260
80293
|
opts.prefix ? opts.prefix : "tmp",
|
|
@@ -80264,13 +80297,13 @@ var require_tmp = __commonJS({
|
|
|
80264
80297
|
_randomChars(12),
|
|
80265
80298
|
opts.postfix ? "-" + opts.postfix : ""
|
|
80266
80299
|
].join("");
|
|
80267
|
-
return
|
|
80300
|
+
return path27.join(tmpDir, opts.dir, name2);
|
|
80268
80301
|
}
|
|
80269
80302
|
function _assertOptionsBase(options) {
|
|
80270
80303
|
if (!_isUndefined(options.name)) {
|
|
80271
80304
|
const name2 = options.name;
|
|
80272
|
-
if (
|
|
80273
|
-
const basename11 =
|
|
80305
|
+
if (path27.isAbsolute(name2)) throw new Error(`name option must not contain an absolute path, found "${name2}".`);
|
|
80306
|
+
const basename11 = path27.basename(name2);
|
|
80274
80307
|
if (basename11 === ".." || basename11 === "." || basename11 !== name2)
|
|
80275
80308
|
throw new Error(`name option must not contain a path, found "${name2}".`);
|
|
80276
80309
|
}
|
|
@@ -80292,7 +80325,7 @@ var require_tmp = __commonJS({
|
|
|
80292
80325
|
if (_isUndefined(name2)) return cb(null);
|
|
80293
80326
|
_resolvePath(name2, tmpDir, function(err, resolvedPath2) {
|
|
80294
80327
|
if (err) return cb(err);
|
|
80295
|
-
const relativePath =
|
|
80328
|
+
const relativePath = path27.relative(tmpDir, resolvedPath2);
|
|
80296
80329
|
if (!resolvedPath2.startsWith(tmpDir)) {
|
|
80297
80330
|
return cb(new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`));
|
|
80298
80331
|
}
|
|
@@ -80302,7 +80335,7 @@ var require_tmp = __commonJS({
|
|
|
80302
80335
|
function _getRelativePathSync(option, name2, tmpDir) {
|
|
80303
80336
|
if (_isUndefined(name2)) return;
|
|
80304
80337
|
const resolvedPath2 = _resolvePathSync(name2, tmpDir);
|
|
80305
|
-
const relativePath =
|
|
80338
|
+
const relativePath = path27.relative(tmpDir, resolvedPath2);
|
|
80306
80339
|
if (!resolvedPath2.startsWith(tmpDir)) {
|
|
80307
80340
|
throw new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`);
|
|
80308
80341
|
}
|
|
@@ -80476,7 +80509,7 @@ var init_async = __esm({
|
|
|
80476
80509
|
async function scan(directory, results = []) {
|
|
80477
80510
|
const files = await readdirp(directory);
|
|
80478
80511
|
for (const f4 of files) {
|
|
80479
|
-
const fullPath =
|
|
80512
|
+
const fullPath = path12.join(directory, f4);
|
|
80480
80513
|
const stat = await lstat2(fullPath);
|
|
80481
80514
|
if (stat.isDirectory()) {
|
|
80482
80515
|
await scan(fullPath, results);
|
|
@@ -80487,7 +80520,7 @@ async function scan(directory, results = []) {
|
|
|
80487
80520
|
return results;
|
|
80488
80521
|
}
|
|
80489
80522
|
async function withTempDir(callback, cleanup = true, prefix = "craft-") {
|
|
80490
|
-
const directory = await mkdtemp2(
|
|
80523
|
+
const directory = await mkdtemp2(path12.join(os3.tmpdir(), prefix));
|
|
80491
80524
|
try {
|
|
80492
80525
|
return await callback(directory);
|
|
80493
80526
|
} finally {
|
|
@@ -80527,7 +80560,7 @@ function detectContentType(artifactName) {
|
|
|
80527
80560
|
async function loadGitignore(rootDir) {
|
|
80528
80561
|
const ig = (0, import_ignore.default)();
|
|
80529
80562
|
try {
|
|
80530
|
-
const content = await (0, import_promises3.readFile)(
|
|
80563
|
+
const content = await (0, import_promises3.readFile)(path12.join(rootDir, ".gitignore"), "utf-8");
|
|
80531
80564
|
ig.add(content);
|
|
80532
80565
|
} catch {
|
|
80533
80566
|
}
|
|
@@ -80544,8 +80577,8 @@ async function walkDirectory(rootDir, currentDir, ig, options, depth) {
|
|
|
80544
80577
|
return results;
|
|
80545
80578
|
}
|
|
80546
80579
|
for await (const entry of dir) {
|
|
80547
|
-
const fullPath =
|
|
80548
|
-
const relativePath =
|
|
80580
|
+
const fullPath = path12.join(currentDir, entry.name);
|
|
80581
|
+
const relativePath = path12.relative(rootDir, fullPath);
|
|
80549
80582
|
if (ig.ignores(relativePath)) {
|
|
80550
80583
|
continue;
|
|
80551
80584
|
}
|
|
@@ -80570,7 +80603,7 @@ async function findFiles(rootDir, options = {}) {
|
|
|
80570
80603
|
const ig = await loadGitignore(rootDir);
|
|
80571
80604
|
return walkDirectory(rootDir, rootDir, ig, options, 0);
|
|
80572
80605
|
}
|
|
80573
|
-
var fs13, import_promises3, import_ignore, os3,
|
|
80606
|
+
var fs13, import_promises3, import_ignore, os3, path12, import_rimraf, tmp, util3, lstat2, readdirp, mkdtemp2, readdir3;
|
|
80574
80607
|
var init_files = __esm({
|
|
80575
80608
|
"src/utils/files.ts"() {
|
|
80576
80609
|
init_import_meta_url();
|
|
@@ -80578,7 +80611,7 @@ var init_files = __esm({
|
|
|
80578
80611
|
import_promises3 = require("fs/promises");
|
|
80579
80612
|
import_ignore = __toESM(require_ignore());
|
|
80580
80613
|
os3 = __toESM(require("os"));
|
|
80581
|
-
|
|
80614
|
+
path12 = __toESM(require("path"));
|
|
80582
80615
|
import_rimraf = __toESM(require_rimraf());
|
|
80583
80616
|
tmp = __toESM(require_tmp());
|
|
80584
80617
|
util3 = __toESM(require("util"));
|
|
@@ -81112,13 +81145,13 @@ function lazyRequest(cb) {
|
|
|
81112
81145
|
return data2;
|
|
81113
81146
|
};
|
|
81114
81147
|
}
|
|
81115
|
-
var fs14, import_node_fetch3,
|
|
81148
|
+
var fs14, import_node_fetch3, path13, MAX_TRIES, MILLISECONDS, ARTIFACTS_POLLING_INTERVAL, DOWNLOAD_CONCURRENCY, GitHubArtifactProvider;
|
|
81116
81149
|
var init_github = __esm({
|
|
81117
81150
|
"src/artifact_providers/github.ts"() {
|
|
81118
81151
|
init_import_meta_url();
|
|
81119
81152
|
fs14 = __toESM(require("fs"));
|
|
81120
81153
|
import_node_fetch3 = __toESM(require_lib9());
|
|
81121
|
-
|
|
81154
|
+
path13 = __toESM(require("path"));
|
|
81122
81155
|
init_p_limit();
|
|
81123
81156
|
init_base3();
|
|
81124
81157
|
init_githubApi();
|
|
@@ -81142,7 +81175,7 @@ var init_github = __esm({
|
|
|
81142
81175
|
* @inheritDoc
|
|
81143
81176
|
*/
|
|
81144
81177
|
async doDownloadArtifact(artifact, downloadDirectory) {
|
|
81145
|
-
const destination =
|
|
81178
|
+
const destination = path13.join(downloadDirectory, artifact.filename);
|
|
81146
81179
|
this.logger.debug(
|
|
81147
81180
|
`rename ${artifact.storedFile.downloadFilepath} to ${destination}`
|
|
81148
81181
|
);
|
|
@@ -81393,11 +81426,11 @@ var init_github = __esm({
|
|
|
81393
81426
|
await extractZipArchive(tempFilepath, tmpDir);
|
|
81394
81427
|
(await scan(tmpDir)).forEach((file) => {
|
|
81395
81428
|
artifacts.push({
|
|
81396
|
-
filename:
|
|
81429
|
+
filename: path13.basename(file),
|
|
81397
81430
|
mimeType: detectContentType(file),
|
|
81398
81431
|
storedFile: {
|
|
81399
81432
|
downloadFilepath: file,
|
|
81400
|
-
filename:
|
|
81433
|
+
filename: path13.basename(file),
|
|
81401
81434
|
size: fs14.lstatSync(file).size
|
|
81402
81435
|
}
|
|
81403
81436
|
});
|
|
@@ -88260,7 +88293,7 @@ var require_src34 = __commonJS({
|
|
|
88260
88293
|
var fs24 = require("fs");
|
|
88261
88294
|
var gaxios_1 = require_src31();
|
|
88262
88295
|
var jws = require_jws();
|
|
88263
|
-
var
|
|
88296
|
+
var path27 = require("path");
|
|
88264
88297
|
var util_1 = require("util");
|
|
88265
88298
|
var readFile4 = fs24.readFile ? (0, util_1.promisify)(fs24.readFile) : async () => {
|
|
88266
88299
|
throw new ErrorWithCode("use key rather than keyFile.", "MISSING_CREDENTIALS");
|
|
@@ -88348,7 +88381,7 @@ var require_src34 = __commonJS({
|
|
|
88348
88381
|
* @returns an object with privateKey and clientEmail properties
|
|
88349
88382
|
*/
|
|
88350
88383
|
async getCredentials(keyFile) {
|
|
88351
|
-
const ext3 =
|
|
88384
|
+
const ext3 = path27.extname(keyFile);
|
|
88352
88385
|
switch (ext3) {
|
|
88353
88386
|
case ".json": {
|
|
88354
88387
|
const key = await readFile4(keyFile, "utf8");
|
|
@@ -91062,7 +91095,7 @@ var require_googleauth = __commonJS({
|
|
|
91062
91095
|
var fs24 = require("fs");
|
|
91063
91096
|
var gcpMetadata = require_src33();
|
|
91064
91097
|
var os5 = require("os");
|
|
91065
|
-
var
|
|
91098
|
+
var path27 = require("path");
|
|
91066
91099
|
var crypto_1 = require_crypto3();
|
|
91067
91100
|
var transporters_1 = require_transporters();
|
|
91068
91101
|
var computeclient_1 = require_computeclient();
|
|
@@ -91323,11 +91356,11 @@ var require_googleauth = __commonJS({
|
|
|
91323
91356
|
} else {
|
|
91324
91357
|
const home = process.env["HOME"];
|
|
91325
91358
|
if (home) {
|
|
91326
|
-
location =
|
|
91359
|
+
location = path27.join(home, ".config");
|
|
91327
91360
|
}
|
|
91328
91361
|
}
|
|
91329
91362
|
if (location) {
|
|
91330
|
-
location =
|
|
91363
|
+
location = path27.join(location, "gcloud", "application_default_credentials.json");
|
|
91331
91364
|
if (!fs24.existsSync(location)) {
|
|
91332
91365
|
location = null;
|
|
91333
91366
|
}
|
|
@@ -91745,7 +91778,7 @@ var require_googleauth = __commonJS({
|
|
|
91745
91778
|
if (this.jsonContent) {
|
|
91746
91779
|
return this._cacheClientFromJSON(this.jsonContent, this.clientOptions);
|
|
91747
91780
|
} else if (this.keyFilename) {
|
|
91748
|
-
const filePath =
|
|
91781
|
+
const filePath = path27.resolve(this.keyFilename);
|
|
91749
91782
|
const stream2 = fs24.createReadStream(filePath);
|
|
91750
91783
|
return await this.fromStreamAsync(stream2, this.clientOptions);
|
|
91751
91784
|
} else if (this.apiKey) {
|
|
@@ -98261,11 +98294,11 @@ var require_Mime = __commonJS({
|
|
|
98261
98294
|
}
|
|
98262
98295
|
}
|
|
98263
98296
|
};
|
|
98264
|
-
Mime.prototype.getType = function(
|
|
98265
|
-
|
|
98266
|
-
let last2 =
|
|
98297
|
+
Mime.prototype.getType = function(path27) {
|
|
98298
|
+
path27 = String(path27);
|
|
98299
|
+
let last2 = path27.replace(/^.*[/\\]/, "").toLowerCase();
|
|
98267
98300
|
let ext3 = last2.replace(/^.*\./, "").toLowerCase();
|
|
98268
|
-
let hasPath = last2.length <
|
|
98301
|
+
let hasPath = last2.length < path27.length;
|
|
98269
98302
|
let hasDot = ext3.length < last2.length - 1;
|
|
98270
98303
|
return (hasDot || !hasPath) && this._types[ext3] || null;
|
|
98271
98304
|
};
|
|
@@ -99039,10 +99072,10 @@ var init_acl = __esm({
|
|
|
99039
99072
|
get(optionsOrCallback, cb) {
|
|
99040
99073
|
const options = typeof optionsOrCallback === "object" ? optionsOrCallback : null;
|
|
99041
99074
|
const callback = typeof optionsOrCallback === "function" ? optionsOrCallback : cb;
|
|
99042
|
-
let
|
|
99075
|
+
let path27 = "";
|
|
99043
99076
|
const query = {};
|
|
99044
99077
|
if (options) {
|
|
99045
|
-
|
|
99078
|
+
path27 = "/" + encodeURIComponent(options.entity);
|
|
99046
99079
|
if (options.generation) {
|
|
99047
99080
|
query.generation = options.generation;
|
|
99048
99081
|
}
|
|
@@ -99051,7 +99084,7 @@ var init_acl = __esm({
|
|
|
99051
99084
|
}
|
|
99052
99085
|
}
|
|
99053
99086
|
this.request({
|
|
99054
|
-
uri:
|
|
99087
|
+
uri: path27,
|
|
99055
99088
|
qs: query
|
|
99056
99089
|
}, (err, resp) => {
|
|
99057
99090
|
if (err) {
|
|
@@ -100751,10 +100784,10 @@ var init_signer = __esm({
|
|
|
100751
100784
|
`;
|
|
100752
100785
|
}).join("");
|
|
100753
100786
|
}
|
|
100754
|
-
getCanonicalRequest(method,
|
|
100787
|
+
getCanonicalRequest(method, path27, query, headers, signedHeaders, contentSha256) {
|
|
100755
100788
|
return [
|
|
100756
100789
|
method,
|
|
100757
|
-
|
|
100790
|
+
path27,
|
|
100758
100791
|
query,
|
|
100759
100792
|
headers,
|
|
100760
100793
|
signedHeaders,
|
|
@@ -105151,7 +105184,7 @@ var init_notification = __esm({
|
|
|
105151
105184
|
});
|
|
105152
105185
|
|
|
105153
105186
|
// node_modules/.pnpm/@google-cloud+storage@7.18.0/node_modules/@google-cloud/storage/build/esm/src/bucket.js
|
|
105154
|
-
var import_paginator, import_promisify6, fs16, import_mime2,
|
|
105187
|
+
var import_paginator, import_promisify6, fs16, import_mime2, path14, import_p_limit2, import_util15, import_async_retry3, import_stream6, import_url2, BucketActionToHTTPMethod, AvailableServiceObjectMethods, BucketExceptionMessages, Bucket;
|
|
105155
105188
|
var init_bucket = __esm({
|
|
105156
105189
|
"node_modules/.pnpm/@google-cloud+storage@7.18.0/node_modules/@google-cloud/storage/build/esm/src/bucket.js"() {
|
|
105157
105190
|
init_import_meta_url();
|
|
@@ -105160,7 +105193,7 @@ var init_bucket = __esm({
|
|
|
105160
105193
|
import_promisify6 = __toESM(require_src39(), 1);
|
|
105161
105194
|
fs16 = __toESM(require("fs"), 1);
|
|
105162
105195
|
import_mime2 = __toESM(require_mime(), 1);
|
|
105163
|
-
|
|
105196
|
+
path14 = __toESM(require("path"), 1);
|
|
105164
105197
|
import_p_limit2 = __toESM(require_p_limit(), 1);
|
|
105165
105198
|
import_util15 = require("util");
|
|
105166
105199
|
import_async_retry3 = __toESM(require_lib10(), 1);
|
|
@@ -108166,7 +108199,7 @@ var init_bucket = __esm({
|
|
|
108166
108199
|
preconditionOpts: this.instancePreconditionOpts
|
|
108167
108200
|
});
|
|
108168
108201
|
} else {
|
|
108169
|
-
const destination =
|
|
108202
|
+
const destination = path14.basename(pathString);
|
|
108170
108203
|
newFile = this.file(destination, {
|
|
108171
108204
|
encryptionKey: options.encryptionKey,
|
|
108172
108205
|
kmsKeyName: options.kmsKeyName,
|
|
@@ -111197,12 +111230,12 @@ function getGCSCredsFromEnv(jsonVar, filepathVar) {
|
|
|
111197
111230
|
credentials: { client_email, private_key }
|
|
111198
111231
|
};
|
|
111199
111232
|
}
|
|
111200
|
-
var fs17,
|
|
111233
|
+
var fs17, path15, DEFAULT_MAX_RETRIES, DEFAULT_UPLOAD_METADATA, CraftGCSClient;
|
|
111201
111234
|
var init_gcsApi = __esm({
|
|
111202
111235
|
"src/utils/gcsApi.ts"() {
|
|
111203
111236
|
init_import_meta_url();
|
|
111204
111237
|
fs17 = __toESM(require("fs"));
|
|
111205
|
-
|
|
111238
|
+
path15 = __toESM(require("path"));
|
|
111206
111239
|
init_src();
|
|
111207
111240
|
init_logger2();
|
|
111208
111241
|
init_errors2();
|
|
@@ -111241,7 +111274,7 @@ var init_gcsApi = __esm({
|
|
|
111241
111274
|
* @param bucketPath Destination path with associated metadata
|
|
111242
111275
|
*/
|
|
111243
111276
|
async uploadArtifact(artifactLocalPath, bucketPath) {
|
|
111244
|
-
const filename =
|
|
111277
|
+
const filename = path15.basename(artifactLocalPath);
|
|
111245
111278
|
let pathInBucket = bucketPath.path;
|
|
111246
111279
|
if (pathInBucket[0] === "/") {
|
|
111247
111280
|
pathInBucket = pathInBucket.substring(1);
|
|
@@ -111262,7 +111295,7 @@ var init_gcsApi = __esm({
|
|
|
111262
111295
|
...contentType && { contentType }
|
|
111263
111296
|
};
|
|
111264
111297
|
const uploadConfig = {
|
|
111265
|
-
destination:
|
|
111298
|
+
destination: path15.posix.join(pathInBucket, filename),
|
|
111266
111299
|
gzip: true,
|
|
111267
111300
|
metadata,
|
|
111268
111301
|
resumable: !process.env.CI
|
|
@@ -111270,7 +111303,7 @@ var init_gcsApi = __esm({
|
|
|
111270
111303
|
logger.trace(
|
|
111271
111304
|
`File \`${filename}\`, upload options: ${formatJson(uploadConfig)}`
|
|
111272
111305
|
);
|
|
111273
|
-
const destination =
|
|
111306
|
+
const destination = path15.posix.join(this.bucketName, pathInBucket);
|
|
111274
111307
|
await safeExec(async () => {
|
|
111275
111308
|
logger.debug(
|
|
111276
111309
|
`Attempting to upload \`${filename}\` to \`${destination}\`.`
|
|
@@ -111282,7 +111315,7 @@ var init_gcsApi = __esm({
|
|
|
111282
111315
|
${formatJson(err)}`);
|
|
111283
111316
|
}
|
|
111284
111317
|
logger.debug(
|
|
111285
|
-
`Successfully uploaded \`${filename}\`. It can be downloaded by running \`gsutil cp ${
|
|
111318
|
+
`Successfully uploaded \`${filename}\`. It can be downloaded by running \`gsutil cp ${path15.posix.join(
|
|
111286
111319
|
"gs://",
|
|
111287
111320
|
this.bucketName,
|
|
111288
111321
|
pathInBucket,
|
|
@@ -111302,13 +111335,13 @@ var init_gcsApi = __esm({
|
|
|
111302
111335
|
* name on the artifact provider
|
|
111303
111336
|
* @returns Path to the downloaded file, or `null` in dry-run mode (file won't exist)
|
|
111304
111337
|
*/
|
|
111305
|
-
async downloadArtifact(downloadFilepath, destinationDirectory, destinationFilename =
|
|
111338
|
+
async downloadArtifact(downloadFilepath, destinationDirectory, destinationFilename = path15.basename(downloadFilepath)) {
|
|
111306
111339
|
if (!fs17.existsSync(destinationDirectory)) {
|
|
111307
111340
|
reportError(
|
|
111308
111341
|
`Unable to download \`${destinationFilename}\` to \`${destinationDirectory}\` - directory does not exist!`
|
|
111309
111342
|
);
|
|
111310
111343
|
}
|
|
111311
|
-
const localPath =
|
|
111344
|
+
const localPath = path15.join(destinationDirectory, destinationFilename);
|
|
111312
111345
|
const result = await safeExec(async () => {
|
|
111313
111346
|
logger.debug(
|
|
111314
111347
|
`Attempting to download \`${destinationFilename}\` to \`${destinationDirectory}\`.`
|
|
@@ -111335,7 +111368,7 @@ var init_gcsApi = __esm({
|
|
|
111335
111368
|
*/
|
|
111336
111369
|
convertToRemoteArtifact(gcsFile) {
|
|
111337
111370
|
const { name: name2 } = gcsFile;
|
|
111338
|
-
const filename =
|
|
111371
|
+
const filename = path15.basename(name2);
|
|
111339
111372
|
const {
|
|
111340
111373
|
size,
|
|
111341
111374
|
updated: lastUpdated,
|
|
@@ -111363,7 +111396,7 @@ var init_gcsApi = __esm({
|
|
|
111363
111396
|
*/
|
|
111364
111397
|
async listArtifactsForRevision(repoOwner, repoName, revision) {
|
|
111365
111398
|
let files = [];
|
|
111366
|
-
const prefix =
|
|
111399
|
+
const prefix = path15.posix.join(repoOwner, repoName, revision);
|
|
111367
111400
|
logger.debug(`Looking for files starting with '${prefix}'`);
|
|
111368
111401
|
try {
|
|
111369
111402
|
[files] = await this.bucket.getFiles({ prefix });
|
|
@@ -112311,15 +112344,15 @@ var require_route = __commonJS({
|
|
|
112311
112344
|
};
|
|
112312
112345
|
}
|
|
112313
112346
|
function wrapConversion(toModel, graph) {
|
|
112314
|
-
const
|
|
112347
|
+
const path27 = [graph[toModel].parent, toModel];
|
|
112315
112348
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
112316
112349
|
let cur = graph[toModel].parent;
|
|
112317
112350
|
while (graph[cur].parent) {
|
|
112318
|
-
|
|
112351
|
+
path27.unshift(graph[cur].parent);
|
|
112319
112352
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
112320
112353
|
cur = graph[cur].parent;
|
|
112321
112354
|
}
|
|
112322
|
-
fn.conversion =
|
|
112355
|
+
fn.conversion = path27;
|
|
112323
112356
|
return fn;
|
|
112324
112357
|
}
|
|
112325
112358
|
module2.exports = function(fromModel) {
|
|
@@ -115972,6 +116005,16 @@ var init_base4 = __esm({
|
|
|
115972
116005
|
this.logger = logger.withScope(`[status-provider/${config3.name}]`);
|
|
115973
116006
|
}
|
|
115974
116007
|
logger;
|
|
116008
|
+
/**
|
|
116009
|
+
* Returns human-readable details about failed checks for the given revision.
|
|
116010
|
+
* Subclasses should override this to provide provider-specific information.
|
|
116011
|
+
*
|
|
116012
|
+
* @param _revision Git revision SHA
|
|
116013
|
+
* @returns Array of formatted strings describing each failed check
|
|
116014
|
+
*/
|
|
116015
|
+
getFailureDetails(_revision) {
|
|
116016
|
+
return [];
|
|
116017
|
+
}
|
|
115975
116018
|
/**
|
|
115976
116019
|
* Waits for the builds to finish for the revision
|
|
115977
116020
|
*
|
|
@@ -115994,6 +116037,12 @@ var init_base4 = __esm({
|
|
|
115994
116037
|
if (spinner.isSpinning) {
|
|
115995
116038
|
spinner.fail();
|
|
115996
116039
|
}
|
|
116040
|
+
const failureDetails = this.getFailureDetails(revision);
|
|
116041
|
+
if (failureDetails.length > 0) {
|
|
116042
|
+
this.logger.error(
|
|
116043
|
+
"The following check(s) have not succeeded:\n" + failureDetails.join("\n")
|
|
116044
|
+
);
|
|
116045
|
+
}
|
|
115997
116046
|
reportError(
|
|
115998
116047
|
`Build(s) for revision ${revision} have not succeeded. Please check the revision's status.`
|
|
115999
116048
|
);
|
|
@@ -116035,6 +116084,9 @@ var init_github2 = __esm({
|
|
|
116035
116084
|
GitHubStatusProvider = class extends BaseStatusProvider {
|
|
116036
116085
|
/** GitHub client */
|
|
116037
116086
|
github;
|
|
116087
|
+
/** Cached API responses from the most recent getRevisionStatus() call */
|
|
116088
|
+
lastRevisionStatus;
|
|
116089
|
+
lastRevisionChecks;
|
|
116038
116090
|
constructor(config3, githubConfig) {
|
|
116039
116091
|
super(config3, githubConfig);
|
|
116040
116092
|
this.github = getGitHubClient();
|
|
@@ -116052,11 +116104,7 @@ var init_github2 = __esm({
|
|
|
116052
116104
|
);
|
|
116053
116105
|
}
|
|
116054
116106
|
}
|
|
116055
|
-
const [
|
|
116056
|
-
revisionStatus,
|
|
116057
|
-
revisionCheckSuites,
|
|
116058
|
-
revisionChecks
|
|
116059
|
-
] = await Promise.all([
|
|
116107
|
+
const [revisionStatus, revisionCheckSuites, revisionChecks] = await Promise.all([
|
|
116060
116108
|
// 1. Commit status API
|
|
116061
116109
|
this.getCommitApiStatus(revision),
|
|
116062
116110
|
// 2. Check suites API
|
|
@@ -116064,6 +116112,8 @@ var init_github2 = __esm({
|
|
|
116064
116112
|
// 3. Check runs API
|
|
116065
116113
|
this.getRevisionChecks(revision)
|
|
116066
116114
|
]);
|
|
116115
|
+
this.lastRevisionStatus = revisionStatus;
|
|
116116
|
+
this.lastRevisionChecks = revisionChecks;
|
|
116067
116117
|
if (contexts.length > 0) {
|
|
116068
116118
|
for (const context2 of contexts) {
|
|
116069
116119
|
const contextString = String(context2);
|
|
@@ -116110,9 +116160,7 @@ var init_github2 = __esm({
|
|
|
116110
116160
|
commitApiStatusResult = "not_found" /* NOT_FOUND */;
|
|
116111
116161
|
}
|
|
116112
116162
|
} else {
|
|
116113
|
-
commitApiStatusResult = this.getResultFromCommitApiStatus(
|
|
116114
|
-
revisionStatus
|
|
116115
|
-
);
|
|
116163
|
+
commitApiStatusResult = this.getResultFromCommitApiStatus(revisionStatus);
|
|
116116
116164
|
}
|
|
116117
116165
|
logger.debug(`Commit API status result: ${commitApiStatusResult}`);
|
|
116118
116166
|
const revisionChecksResult = this.getResultFromRevisionChecks(
|
|
@@ -116246,12 +116294,10 @@ var init_github2 = __esm({
|
|
|
116246
116294
|
*/
|
|
116247
116295
|
async getCommitApiStatus(revision) {
|
|
116248
116296
|
logger.debug(`Fetching combined revision status...`);
|
|
116249
|
-
const revisionStatusResponse = await this.github.repos.getCombinedStatusForRef(
|
|
116250
|
-
|
|
116251
|
-
|
|
116252
|
-
|
|
116253
|
-
}
|
|
116254
|
-
);
|
|
116297
|
+
const revisionStatusResponse = await this.github.repos.getCombinedStatusForRef({
|
|
116298
|
+
...this.githubConfig,
|
|
116299
|
+
ref: revision
|
|
116300
|
+
});
|
|
116255
116301
|
const revisionStatus = revisionStatusResponse.data;
|
|
116256
116302
|
logger.debug("Combined revision status received.");
|
|
116257
116303
|
logger.trace(revisionStatus);
|
|
@@ -116306,6 +116352,41 @@ var init_github2 = __esm({
|
|
|
116306
116352
|
...this.githubConfig
|
|
116307
116353
|
});
|
|
116308
116354
|
}
|
|
116355
|
+
/**
|
|
116356
|
+
* Returns details about failed checks using cached API responses from
|
|
116357
|
+
* the most recent getRevisionStatus() call.
|
|
116358
|
+
*
|
|
116359
|
+
* @param revision Git revision SHA (used for the "see all checks" link)
|
|
116360
|
+
*/
|
|
116361
|
+
getFailureDetails(revision) {
|
|
116362
|
+
const details = [];
|
|
116363
|
+
if (this.lastRevisionStatus) {
|
|
116364
|
+
for (const status of this.lastRevisionStatus.statuses) {
|
|
116365
|
+
if (status.state !== "success" && status.state !== "pending") {
|
|
116366
|
+
const url2 = status.target_url ? ` \u2192 ${status.target_url}` : "";
|
|
116367
|
+
details.push(
|
|
116368
|
+
` ${status.state.toUpperCase()}: ${status.context}${url2}`
|
|
116369
|
+
);
|
|
116370
|
+
}
|
|
116371
|
+
}
|
|
116372
|
+
}
|
|
116373
|
+
if (this.lastRevisionChecks) {
|
|
116374
|
+
for (const run of this.lastRevisionChecks.check_runs) {
|
|
116375
|
+
if (run.status === "completed" && run.conclusion !== "success" && run.conclusion !== "skipped") {
|
|
116376
|
+
const url2 = run.html_url ? ` \u2192 ${run.html_url}` : "";
|
|
116377
|
+
details.push(
|
|
116378
|
+
` ${(run.conclusion || "unknown").toUpperCase()}: ${run.name}${url2}`
|
|
116379
|
+
);
|
|
116380
|
+
}
|
|
116381
|
+
}
|
|
116382
|
+
}
|
|
116383
|
+
const { owner, repo } = this.githubConfig;
|
|
116384
|
+
details.push(
|
|
116385
|
+
`
|
|
116386
|
+
See all checks: https://github.com/${owner}/${repo}/commit/${revision}`
|
|
116387
|
+
);
|
|
116388
|
+
return details;
|
|
116389
|
+
}
|
|
116309
116390
|
};
|
|
116310
116391
|
}
|
|
116311
116392
|
});
|
|
@@ -118261,10 +118342,10 @@ var init_brew = __esm({
|
|
|
118261
118342
|
'Please specify Formula template in the "brew" target configuration.'
|
|
118262
118343
|
);
|
|
118263
118344
|
}
|
|
118264
|
-
const { formula, path:
|
|
118345
|
+
const { formula, path: path27 } = config3;
|
|
118265
118346
|
return {
|
|
118266
118347
|
formula,
|
|
118267
|
-
path:
|
|
118348
|
+
path: path27,
|
|
118268
118349
|
tapRepo: this.getTapRepo(),
|
|
118269
118350
|
template
|
|
118270
118351
|
};
|
|
@@ -118330,13 +118411,13 @@ var init_brew = __esm({
|
|
|
118330
118411
|
* @param path The path to the formula
|
|
118331
118412
|
* @returns The SHA of the file, if it exists; otherwise undefined
|
|
118332
118413
|
*/
|
|
118333
|
-
async getFormulaSha(
|
|
118414
|
+
async getFormulaSha(path27) {
|
|
118334
118415
|
try {
|
|
118335
118416
|
const tap = this.brewConfig.tapRepo;
|
|
118336
|
-
this.logger.debug(`Loading SHA for ${tap.owner}/${tap.repo}:${
|
|
118417
|
+
this.logger.debug(`Loading SHA for ${tap.owner}/${tap.repo}:${path27}`);
|
|
118337
118418
|
const response = await this.github.repos.getContent({
|
|
118338
118419
|
...tap,
|
|
118339
|
-
path:
|
|
118420
|
+
path: path27
|
|
118340
118421
|
});
|
|
118341
118422
|
if (response.data instanceof Array) {
|
|
118342
118423
|
return void 0;
|
|
@@ -118362,9 +118443,9 @@ var init_brew = __esm({
|
|
|
118362
118443
|
);
|
|
118363
118444
|
return void 0;
|
|
118364
118445
|
}
|
|
118365
|
-
const { path:
|
|
118446
|
+
const { path: path27, template, tapRepo } = this.brewConfig;
|
|
118366
118447
|
const formulaName = this.resolveFormulaName(version2);
|
|
118367
|
-
const formulaPath =
|
|
118448
|
+
const formulaPath = path27 ? `${path27}/${formulaName}.rb` : `Formula/${formulaName}.rb`;
|
|
118368
118449
|
const filesList = await this.getArtifactsForRevision(revision);
|
|
118369
118450
|
this.logger.debug("Downloading artifacts for the revision");
|
|
118370
118451
|
this.logger.trace(filesList.map((file) => file.filename));
|
|
@@ -118415,12 +118496,12 @@ ${data2}`);
|
|
|
118415
118496
|
});
|
|
118416
118497
|
|
|
118417
118498
|
// src/targets/cocoapods.ts
|
|
118418
|
-
var fs18,
|
|
118499
|
+
var fs18, import_path8, import_util23, writeFile2, DEFAULT_COCOAPODS_BIN, COCOAPODS_BIN, CocoapodsTarget;
|
|
118419
118500
|
var init_cocoapods = __esm({
|
|
118420
118501
|
"src/targets/cocoapods.ts"() {
|
|
118421
118502
|
init_import_meta_url();
|
|
118422
118503
|
fs18 = __toESM(require("fs"));
|
|
118423
|
-
|
|
118504
|
+
import_path8 = require("path");
|
|
118424
118505
|
import_util23 = require("util");
|
|
118425
118506
|
init_errors2();
|
|
118426
118507
|
init_files();
|
|
@@ -118480,10 +118561,10 @@ var init_cocoapods = __esm({
|
|
|
118480
118561
|
reportError(`Podspec not found at ${owner}/${repo}:${specPath}`);
|
|
118481
118562
|
return void 0;
|
|
118482
118563
|
}
|
|
118483
|
-
const fileName = (0,
|
|
118564
|
+
const fileName = (0, import_path8.basename)(specPath);
|
|
118484
118565
|
await withTempDir(
|
|
118485
118566
|
async (directory) => {
|
|
118486
|
-
const filePath = (0,
|
|
118567
|
+
const filePath = (0, import_path8.join)(directory, fileName);
|
|
118487
118568
|
await writeFile2(filePath, specContents, "utf8");
|
|
118488
118569
|
this.logger.info(`Pushing podspec "${fileName}" to cocoapods...`);
|
|
118489
118570
|
await spawnProcess(COCOAPODS_BIN, ["setup"]);
|
|
@@ -118508,12 +118589,12 @@ var init_cocoapods = __esm({
|
|
|
118508
118589
|
});
|
|
118509
118590
|
|
|
118510
118591
|
// src/targets/crates.ts
|
|
118511
|
-
var fs19,
|
|
118592
|
+
var fs19, path16, CARGO_CONFIG, CARGO_BIN, VERSION_ERROR, REPUBLISH_ERROR, MAX_ATTEMPTS, RETRY_DELAY_SECS2, RETRY_EXP_FACTOR2, CratesTarget;
|
|
118512
118593
|
var init_crates = __esm({
|
|
118513
118594
|
"src/targets/crates.ts"() {
|
|
118514
118595
|
init_import_meta_url();
|
|
118515
118596
|
fs19 = __toESM(require("fs"));
|
|
118516
|
-
|
|
118597
|
+
path16 = __toESM(require("path"));
|
|
118517
118598
|
init_git();
|
|
118518
118599
|
init_async();
|
|
118519
118600
|
init_errors2();
|
|
@@ -118547,7 +118628,7 @@ var init_crates = __esm({
|
|
|
118547
118628
|
* @throws Error if cargo is not found or command fails
|
|
118548
118629
|
*/
|
|
118549
118630
|
static async bumpVersion(rootDir, newVersion) {
|
|
118550
|
-
const cargoTomlPath =
|
|
118631
|
+
const cargoTomlPath = path16.join(rootDir, "Cargo.toml");
|
|
118551
118632
|
if (!fs19.existsSync(cargoTomlPath)) {
|
|
118552
118633
|
return false;
|
|
118553
118634
|
}
|
|
@@ -118744,7 +118825,7 @@ var init_crates = __esm({
|
|
|
118744
118825
|
await git.checkout(revision);
|
|
118745
118826
|
this.logger.info(`Checking out submodules`);
|
|
118746
118827
|
await git.submoduleUpdate(["--init"]);
|
|
118747
|
-
const gitdir =
|
|
118828
|
+
const gitdir = path16.join(directory, ".git");
|
|
118748
118829
|
fs19.renameSync(gitdir, `${gitdir}.bak`);
|
|
118749
118830
|
}
|
|
118750
118831
|
/**
|
|
@@ -119342,12 +119423,12 @@ var init_gcs2 = __esm({
|
|
|
119342
119423
|
});
|
|
119343
119424
|
|
|
119344
119425
|
// src/targets/gem.ts
|
|
119345
|
-
var import_promises4,
|
|
119426
|
+
var import_promises4, import_path9, DEFAULT_GEM_BIN, GEM_BIN, DEFAULT_GEM_REGEX, GemTarget;
|
|
119346
119427
|
var init_gem = __esm({
|
|
119347
119428
|
"src/targets/gem.ts"() {
|
|
119348
119429
|
init_import_meta_url();
|
|
119349
119430
|
import_promises4 = require("fs/promises");
|
|
119350
|
-
|
|
119431
|
+
import_path9 = require("path");
|
|
119351
119432
|
init_errors2();
|
|
119352
119433
|
init_files();
|
|
119353
119434
|
init_system();
|
|
@@ -119389,8 +119470,8 @@ var init_gem = __esm({
|
|
|
119389
119470
|
bumped = true;
|
|
119390
119471
|
}
|
|
119391
119472
|
}
|
|
119392
|
-
const gemDir = (0,
|
|
119393
|
-
const libDir = (0,
|
|
119473
|
+
const gemDir = (0, import_path9.dirname)(gemspecPath);
|
|
119474
|
+
const libDir = (0, import_path9.join)(gemDir, "lib");
|
|
119394
119475
|
const libUpdated = await _GemTarget.updateVersionRbFiles(
|
|
119395
119476
|
libDir,
|
|
119396
119477
|
newVersion
|
|
@@ -119411,7 +119492,7 @@ var init_gem = __esm({
|
|
|
119411
119492
|
return false;
|
|
119412
119493
|
}
|
|
119413
119494
|
for (const entry of entries) {
|
|
119414
|
-
const fullPath = (0,
|
|
119495
|
+
const fullPath = (0, import_path9.join)(dir, entry.name);
|
|
119415
119496
|
if (entry.isDirectory()) {
|
|
119416
119497
|
const subUpdated = await _GemTarget.updateVersionRbFiles(
|
|
119417
119498
|
fullPath,
|
|
@@ -119443,8 +119524,8 @@ var init_gem = __esm({
|
|
|
119443
119524
|
* @param path Absolute path to the archive to upload
|
|
119444
119525
|
* @returns A promise that resolves when the gem pushed
|
|
119445
119526
|
*/
|
|
119446
|
-
async pushGem(
|
|
119447
|
-
return spawnProcess(GEM_BIN, ["push",
|
|
119527
|
+
async pushGem(path27) {
|
|
119528
|
+
return spawnProcess(GEM_BIN, ["push", path27]);
|
|
119448
119529
|
}
|
|
119449
119530
|
/**
|
|
119450
119531
|
* Pushes a gem to rubygems.org
|
|
@@ -119463,9 +119544,9 @@ var init_gem = __esm({
|
|
|
119463
119544
|
}
|
|
119464
119545
|
await Promise.all(
|
|
119465
119546
|
packageFiles.map(async (file) => {
|
|
119466
|
-
const
|
|
119547
|
+
const path27 = await this.artifactProvider.downloadArtifact(file);
|
|
119467
119548
|
this.logger.info(`Pushing gem "${file.filename}"`);
|
|
119468
|
-
return this.pushGem(
|
|
119549
|
+
return this.pushGem(path27);
|
|
119469
119550
|
})
|
|
119470
119551
|
);
|
|
119471
119552
|
this.logger.info("Successfully registered gem");
|
|
@@ -119475,12 +119556,12 @@ var init_gem = __esm({
|
|
|
119475
119556
|
});
|
|
119476
119557
|
|
|
119477
119558
|
// src/targets/ghPages.ts
|
|
119478
|
-
var fs20,
|
|
119559
|
+
var fs20, path17, DEFAULT_DEPLOY_ARCHIVE_REGEX, DEFAULT_DEPLOY_BRANCH, GhPagesTarget;
|
|
119479
119560
|
var init_ghPages = __esm({
|
|
119480
119561
|
"src/targets/ghPages.ts"() {
|
|
119481
119562
|
init_import_meta_url();
|
|
119482
119563
|
fs20 = __toESM(require("fs"));
|
|
119483
|
-
|
|
119564
|
+
path17 = __toESM(require("path"));
|
|
119484
119565
|
init_errors2();
|
|
119485
119566
|
init_files();
|
|
119486
119567
|
init_githubApi();
|
|
@@ -119550,14 +119631,14 @@ var init_ghPages = __esm({
|
|
|
119550
119631
|
this.logger.info(`Extracting "${archivePath}" to "${directory}"...`);
|
|
119551
119632
|
await extractZipArchive(archivePath, directory);
|
|
119552
119633
|
const newDirContents = fs20.readdirSync(directory).filter((f4) => f4 !== ".git");
|
|
119553
|
-
if (newDirContents.length === 1 && fs20.statSync(
|
|
119634
|
+
if (newDirContents.length === 1 && fs20.statSync(path17.join(directory, newDirContents[0])).isDirectory()) {
|
|
119554
119635
|
this.logger.debug(
|
|
119555
119636
|
"Single top-level directory found, moving files from it..."
|
|
119556
119637
|
);
|
|
119557
|
-
const innerDirPath =
|
|
119638
|
+
const innerDirPath = path17.join(directory, newDirContents[0]);
|
|
119558
119639
|
fs20.readdirSync(innerDirPath).forEach((item) => {
|
|
119559
|
-
const srcPath =
|
|
119560
|
-
const destPath =
|
|
119640
|
+
const srcPath = path17.join(innerDirPath, item);
|
|
119641
|
+
const destPath = path17.join(directory, item);
|
|
119561
119642
|
fs20.renameSync(srcPath, destPath);
|
|
119562
119643
|
});
|
|
119563
119644
|
fs20.rmdirSync(innerDirPath);
|
|
@@ -120859,6 +120940,15 @@ async function fetchPRInfo(prNumber) {
|
|
|
120859
120940
|
function isBumpType(value) {
|
|
120860
120941
|
return BUMP_TYPES.has(value);
|
|
120861
120942
|
}
|
|
120943
|
+
function getLineNumber(text, charIndex) {
|
|
120944
|
+
let count = 1;
|
|
120945
|
+
for (let i4 = 0; i4 < charIndex && i4 < text.length; i4++) {
|
|
120946
|
+
if (text[i4] === "\n") {
|
|
120947
|
+
count++;
|
|
120948
|
+
}
|
|
120949
|
+
}
|
|
120950
|
+
return count;
|
|
120951
|
+
}
|
|
120862
120952
|
function escapeMarkdownPound(text) {
|
|
120863
120953
|
return text.replace(/#/g, "#");
|
|
120864
120954
|
}
|
|
@@ -120975,7 +121065,12 @@ function extractChangeset(markdown, location) {
|
|
|
120975
121065
|
const bodyStart = location.startIndex + location.headingLength;
|
|
120976
121066
|
const body = markdown.substring(bodyStart, location.endIndex).trim();
|
|
120977
121067
|
const name2 = location.title.replace(/\(.*\)$/, "").trim();
|
|
120978
|
-
|
|
121068
|
+
const startLine = getLineNumber(markdown, location.startIndex);
|
|
121069
|
+
const endLine = getLineNumber(
|
|
121070
|
+
markdown,
|
|
121071
|
+
Math.max(location.startIndex, location.endIndex - 1)
|
|
121072
|
+
);
|
|
121073
|
+
return { name: name2, body, startLine, endLine };
|
|
120979
121074
|
}
|
|
120980
121075
|
function locateChangeset(markdown, predicate) {
|
|
120981
121076
|
const tokens = d.lexer(markdown);
|
|
@@ -121144,7 +121239,7 @@ function readReleaseConfig() {
|
|
|
121144
121239
|
if (!configFileDir) {
|
|
121145
121240
|
return { config: DEFAULT_RELEASE_CONFIG, isCustomConfig: false };
|
|
121146
121241
|
}
|
|
121147
|
-
const releaseConfigPath = (0,
|
|
121242
|
+
const releaseConfigPath = (0, import_path10.join)(configFileDir, ".github", "release.yml");
|
|
121148
121243
|
try {
|
|
121149
121244
|
const fileContents = (0, import_fs9.readFileSync)(releaseConfigPath, "utf8");
|
|
121150
121245
|
const config3 = load(fileContents);
|
|
@@ -121810,12 +121905,12 @@ async function getPRAndLabelsFromCommit(hashes) {
|
|
|
121810
121905
|
})
|
|
121811
121906
|
);
|
|
121812
121907
|
}
|
|
121813
|
-
var import_fs9,
|
|
121908
|
+
var import_fs9, import_path10, BUMP_TYPES, DEFAULT_CHANGELOG_PATH, DEFAULT_UNRELEASED_TITLE, SKIP_CHANGELOG_MAGIC_WORD, BODY_IN_CHANGELOG_MAGIC_WORD, DEFAULT_CHANGESET_BODY, VERSION_HEADER_LEVEL, SUBSECTION_HEADER_LEVEL, SCOPE_HEADER_LEVEL, MAX_COMMITS_PER_QUERY, MAX_LEFTOVERS, DEFAULT_RELEASE_CONFIG, releaseConfigCache, SHORT_SHA_LENGTH, changesetCache;
|
|
121814
121909
|
var init_changelog = __esm({
|
|
121815
121910
|
"src/utils/changelog.ts"() {
|
|
121816
121911
|
init_import_meta_url();
|
|
121817
121912
|
import_fs9 = require("fs");
|
|
121818
|
-
|
|
121913
|
+
import_path10 = require("path");
|
|
121819
121914
|
init_js_yaml();
|
|
121820
121915
|
init_marked_esm();
|
|
121821
121916
|
init_esm7();
|
|
@@ -121894,12 +121989,12 @@ function isLatestRelease(githubRelease, version2) {
|
|
|
121894
121989
|
const versionToPublish = parseVersion(version2);
|
|
121895
121990
|
return latestVersion && versionToPublish ? versionGreaterOrEqualThan(versionToPublish, latestVersion) : true;
|
|
121896
121991
|
}
|
|
121897
|
-
var import_fs10,
|
|
121992
|
+
var import_fs10, import_path11, DEFAULT_CONTENT_TYPE, GITHUB_RELEASE_BODY_MAX, GitHubTarget;
|
|
121898
121993
|
var init_github3 = __esm({
|
|
121899
121994
|
"src/targets/github.ts"() {
|
|
121900
121995
|
init_import_meta_url();
|
|
121901
121996
|
import_fs10 = require("fs");
|
|
121902
|
-
|
|
121997
|
+
import_path11 = require("path");
|
|
121903
121998
|
init_config2();
|
|
121904
121999
|
init_project_config();
|
|
121905
122000
|
init_changelog();
|
|
@@ -121910,6 +122005,7 @@ var init_github3 = __esm({
|
|
|
121910
122005
|
init_base5();
|
|
121911
122006
|
init_logger2();
|
|
121912
122007
|
DEFAULT_CONTENT_TYPE = "application/octet-stream";
|
|
122008
|
+
GITHUB_RELEASE_BODY_MAX = 125e3;
|
|
121913
122009
|
GitHubTarget = class extends BaseTarget {
|
|
121914
122010
|
/** Target name */
|
|
121915
122011
|
name = "github";
|
|
@@ -121938,6 +122034,42 @@ var init_github3 = __esm({
|
|
|
121938
122034
|
};
|
|
121939
122035
|
this.github = getGitHubClient();
|
|
121940
122036
|
}
|
|
122037
|
+
/**
|
|
122038
|
+
* Builds a permalink URL to the changelog file in the repository at a
|
|
122039
|
+
* specific revision, optionally anchored to the line range of the changeset.
|
|
122040
|
+
*/
|
|
122041
|
+
buildChangelogPermalink(revision, changes) {
|
|
122042
|
+
const { owner, repo, changelog } = this.githubConfig;
|
|
122043
|
+
let url2 = `https://github.com/${owner}/${repo}/blob/${revision}/${changelog}`;
|
|
122044
|
+
if (changes?.startLine != null && changes?.endLine != null) {
|
|
122045
|
+
url2 += `#L${changes.startLine}-L${changes.endLine}`;
|
|
122046
|
+
}
|
|
122047
|
+
return url2;
|
|
122048
|
+
}
|
|
122049
|
+
/**
|
|
122050
|
+
* If the release body exceeds GitHub's maximum, truncate it at the last
|
|
122051
|
+
* line boundary that fits and append a link to the full changelog.
|
|
122052
|
+
*/
|
|
122053
|
+
truncateBody(body, revision, changes) {
|
|
122054
|
+
if (body.length <= GITHUB_RELEASE_BODY_MAX) {
|
|
122055
|
+
return body;
|
|
122056
|
+
}
|
|
122057
|
+
const permalink = this.buildChangelogPermalink(revision, changes);
|
|
122058
|
+
const footer = `
|
|
122059
|
+
|
|
122060
|
+
---
|
|
122061
|
+
_This changelog has been truncated. See the [full changelog](${permalink}) for all changes._`;
|
|
122062
|
+
const maxLength = GITHUB_RELEASE_BODY_MAX - footer.length;
|
|
122063
|
+
const truncateAt = body.lastIndexOf("\n", maxLength);
|
|
122064
|
+
const truncated = body.substring(
|
|
122065
|
+
0,
|
|
122066
|
+
truncateAt > 0 ? truncateAt : maxLength
|
|
122067
|
+
);
|
|
122068
|
+
this.logger.warn(
|
|
122069
|
+
`Release body exceeds GitHub limit (${body.length} > ${GITHUB_RELEASE_BODY_MAX} chars). Truncating and linking to full changelog.`
|
|
122070
|
+
);
|
|
122071
|
+
return truncated + footer;
|
|
122072
|
+
}
|
|
121941
122073
|
/**
|
|
121942
122074
|
* Create a draft release for the given version.
|
|
121943
122075
|
*
|
|
@@ -121963,15 +122095,16 @@ var init_github3 = __esm({
|
|
|
121963
122095
|
draft: true
|
|
121964
122096
|
};
|
|
121965
122097
|
}
|
|
122098
|
+
const body = changes?.body ? this.truncateBody(changes.body, revision, changes) : void 0;
|
|
121966
122099
|
const { data: data2 } = await this.github.repos.createRelease({
|
|
121967
122100
|
draft: true,
|
|
121968
|
-
name: tag2,
|
|
122101
|
+
name: changes?.name || tag2,
|
|
121969
122102
|
owner: this.githubConfig.owner,
|
|
121970
122103
|
prerelease: isPreview,
|
|
121971
122104
|
repo: this.githubConfig.repo,
|
|
121972
122105
|
tag_name: tag2,
|
|
121973
122106
|
target_commitish: revision,
|
|
121974
|
-
|
|
122107
|
+
body
|
|
121975
122108
|
});
|
|
121976
122109
|
return data2;
|
|
121977
122110
|
}
|
|
@@ -122068,8 +122201,8 @@ var init_github3 = __esm({
|
|
|
122068
122201
|
* @param path Filesystem (local) path of the file to upload
|
|
122069
122202
|
* @param contentType Optional content-type for uploading
|
|
122070
122203
|
*/
|
|
122071
|
-
async uploadAsset(release3,
|
|
122072
|
-
const name2 = (0,
|
|
122204
|
+
async uploadAsset(release3, path27, contentType) {
|
|
122205
|
+
const name2 = (0, import_path11.basename)(path27);
|
|
122073
122206
|
return safeExec(async () => {
|
|
122074
122207
|
process.stderr.write(
|
|
122075
122208
|
`Uploading asset "${name2}" to ${this.githubConfig.owner}/${this.githubConfig.repo}:${release3.tag_name}
|
|
@@ -122078,7 +122211,7 @@ var init_github3 = __esm({
|
|
|
122078
122211
|
try {
|
|
122079
122212
|
const { url: url2 } = await this.handleGitHubUpload(
|
|
122080
122213
|
release3,
|
|
122081
|
-
|
|
122214
|
+
path27,
|
|
122082
122215
|
contentType
|
|
122083
122216
|
);
|
|
122084
122217
|
process.stderr.write(`\u2714 Uploaded asset "${name2}".
|
|
@@ -122091,11 +122224,11 @@ var init_github3 = __esm({
|
|
|
122091
122224
|
}
|
|
122092
122225
|
}, `github.repos.uploadReleaseAsset(${name2})`);
|
|
122093
122226
|
}
|
|
122094
|
-
async handleGitHubUpload(release3,
|
|
122227
|
+
async handleGitHubUpload(release3, path27, contentType, retries = 3) {
|
|
122095
122228
|
const contentTypeProcessed = contentType || DEFAULT_CONTENT_TYPE;
|
|
122096
|
-
const stats = (0, import_fs10.statSync)(
|
|
122097
|
-
const name2 = (0,
|
|
122098
|
-
const file = (0, import_fs10.createReadStream)(
|
|
122229
|
+
const stats = (0, import_fs10.statSync)(path27);
|
|
122230
|
+
const name2 = (0, import_path11.basename)(path27);
|
|
122231
|
+
const file = (0, import_fs10.createReadStream)(path27);
|
|
122099
122232
|
const params = {
|
|
122100
122233
|
...this.githubConfig,
|
|
122101
122234
|
headers: {
|
|
@@ -122134,7 +122267,7 @@ var init_github3 = __esm({
|
|
|
122134
122267
|
"Got an error when trying to upload an asset, deleting and retrying..."
|
|
122135
122268
|
);
|
|
122136
122269
|
await this.deleteAssetByName(params.release_id, params.name);
|
|
122137
|
-
return this.handleGitHubUpload(release3,
|
|
122270
|
+
return this.handleGitHubUpload(release3, path27, contentType, --retries);
|
|
122138
122271
|
} finally {
|
|
122139
122272
|
file.destroy();
|
|
122140
122273
|
}
|
|
@@ -122288,7 +122421,7 @@ var init_github3 = __esm({
|
|
|
122288
122421
|
try {
|
|
122289
122422
|
await Promise.all(
|
|
122290
122423
|
localArtifacts.map(
|
|
122291
|
-
({ path:
|
|
122424
|
+
({ path: path27, mimeType }) => this.uploadAsset(draftRelease, path27, mimeType)
|
|
122292
122425
|
)
|
|
122293
122426
|
);
|
|
122294
122427
|
await this.publishRelease(draftRelease, { makeLatest });
|
|
@@ -123182,7 +123315,7 @@ var init_escape2 = __esm({
|
|
|
123182
123315
|
});
|
|
123183
123316
|
|
|
123184
123317
|
// node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/index.js
|
|
123185
|
-
var minimatch2, starDotExtRE2, starDotExtTest2, starDotExtTestDot2, starDotExtTestNocase2, starDotExtTestNocaseDot2, starDotStarRE2, starDotStarTest2, starDotStarTestDot2, dotStarRE2, dotStarTest2, starRE2, starTest2, starTestDot2, qmarksRE2, qmarksTestNocase2, qmarksTestNocaseDot2, qmarksTestDot2, qmarksTest2, qmarksTestNoExt2, qmarksTestNoExtDot2, defaultPlatform2,
|
|
123318
|
+
var minimatch2, starDotExtRE2, starDotExtTest2, starDotExtTestDot2, starDotExtTestNocase2, starDotExtTestNocaseDot2, starDotStarRE2, starDotStarTest2, starDotStarTestDot2, dotStarRE2, dotStarTest2, starRE2, starTest2, starTestDot2, qmarksRE2, qmarksTestNocase2, qmarksTestNocaseDot2, qmarksTestDot2, qmarksTest2, qmarksTestNoExt2, qmarksTestNoExtDot2, defaultPlatform2, path18, sep4, GLOBSTAR2, qmark4, star4, twoStarDot2, twoStarNoDot2, filter2, ext2, defaults2, braceExpand2, makeRe2, match2, globMagic2, regExpEscape4, Minimatch2;
|
|
123186
123319
|
var init_esm18 = __esm({
|
|
123187
123320
|
"node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/index.js"() {
|
|
123188
123321
|
init_import_meta_url();
|
|
@@ -123252,11 +123385,11 @@ var init_esm18 = __esm({
|
|
|
123252
123385
|
return (f4) => f4.length === len && f4 !== "." && f4 !== "..";
|
|
123253
123386
|
};
|
|
123254
123387
|
defaultPlatform2 = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
123255
|
-
|
|
123388
|
+
path18 = {
|
|
123256
123389
|
win32: { sep: "\\" },
|
|
123257
123390
|
posix: { sep: "/" }
|
|
123258
123391
|
};
|
|
123259
|
-
sep4 = defaultPlatform2 === "win32" ?
|
|
123392
|
+
sep4 = defaultPlatform2 === "win32" ? path18.win32.sep : path18.posix.sep;
|
|
123260
123393
|
minimatch2.sep = sep4;
|
|
123261
123394
|
GLOBSTAR2 = Symbol("globstar **");
|
|
123262
123395
|
minimatch2.GLOBSTAR = GLOBSTAR2;
|
|
@@ -125609,12 +125742,12 @@ var init_esm20 = __esm({
|
|
|
125609
125742
|
/**
|
|
125610
125743
|
* Get the Path object referenced by the string path, resolved from this Path
|
|
125611
125744
|
*/
|
|
125612
|
-
resolve(
|
|
125613
|
-
if (!
|
|
125745
|
+
resolve(path27) {
|
|
125746
|
+
if (!path27) {
|
|
125614
125747
|
return this;
|
|
125615
125748
|
}
|
|
125616
|
-
const rootPath = this.getRootString(
|
|
125617
|
-
const dir =
|
|
125749
|
+
const rootPath = this.getRootString(path27);
|
|
125750
|
+
const dir = path27.substring(rootPath.length);
|
|
125618
125751
|
const dirParts = dir.split(this.splitSep);
|
|
125619
125752
|
const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts);
|
|
125620
125753
|
return result;
|
|
@@ -126366,8 +126499,8 @@ var init_esm20 = __esm({
|
|
|
126366
126499
|
/**
|
|
126367
126500
|
* @internal
|
|
126368
126501
|
*/
|
|
126369
|
-
getRootString(
|
|
126370
|
-
return import_node_path15.win32.parse(
|
|
126502
|
+
getRootString(path27) {
|
|
126503
|
+
return import_node_path15.win32.parse(path27).root;
|
|
126371
126504
|
}
|
|
126372
126505
|
/**
|
|
126373
126506
|
* @internal
|
|
@@ -126413,8 +126546,8 @@ var init_esm20 = __esm({
|
|
|
126413
126546
|
/**
|
|
126414
126547
|
* @internal
|
|
126415
126548
|
*/
|
|
126416
|
-
getRootString(
|
|
126417
|
-
return
|
|
126549
|
+
getRootString(path27) {
|
|
126550
|
+
return path27.startsWith("/") ? "/" : "";
|
|
126418
126551
|
}
|
|
126419
126552
|
/**
|
|
126420
126553
|
* @internal
|
|
@@ -126503,11 +126636,11 @@ var init_esm20 = __esm({
|
|
|
126503
126636
|
/**
|
|
126504
126637
|
* Get the depth of a provided path, string, or the cwd
|
|
126505
126638
|
*/
|
|
126506
|
-
depth(
|
|
126507
|
-
if (typeof
|
|
126508
|
-
|
|
126639
|
+
depth(path27 = this.cwd) {
|
|
126640
|
+
if (typeof path27 === "string") {
|
|
126641
|
+
path27 = this.cwd.resolve(path27);
|
|
126509
126642
|
}
|
|
126510
|
-
return
|
|
126643
|
+
return path27.depth();
|
|
126511
126644
|
}
|
|
126512
126645
|
/**
|
|
126513
126646
|
* Return the cache of child entries. Exposed so subclasses can create
|
|
@@ -126994,9 +127127,9 @@ var init_esm20 = __esm({
|
|
|
126994
127127
|
process2();
|
|
126995
127128
|
return results;
|
|
126996
127129
|
}
|
|
126997
|
-
chdir(
|
|
127130
|
+
chdir(path27 = this.cwd) {
|
|
126998
127131
|
const oldCwd = this.cwd;
|
|
126999
|
-
this.cwd = typeof
|
|
127132
|
+
this.cwd = typeof path27 === "string" ? this.cwd.resolve(path27) : path27;
|
|
127000
127133
|
this.cwd[setAsCwd](oldCwd);
|
|
127001
127134
|
}
|
|
127002
127135
|
};
|
|
@@ -127374,8 +127507,8 @@ var init_processor = __esm({
|
|
|
127374
127507
|
}
|
|
127375
127508
|
// match, absolute, ifdir
|
|
127376
127509
|
entries() {
|
|
127377
|
-
return [...this.store.entries()].map(([
|
|
127378
|
-
|
|
127510
|
+
return [...this.store.entries()].map(([path27, n4]) => [
|
|
127511
|
+
path27,
|
|
127379
127512
|
!!(n4 & 2),
|
|
127380
127513
|
!!(n4 & 1)
|
|
127381
127514
|
]);
|
|
@@ -127589,9 +127722,9 @@ var init_walker = __esm({
|
|
|
127589
127722
|
signal;
|
|
127590
127723
|
maxDepth;
|
|
127591
127724
|
includeChildMatches;
|
|
127592
|
-
constructor(patterns,
|
|
127725
|
+
constructor(patterns, path27, opts) {
|
|
127593
127726
|
this.patterns = patterns;
|
|
127594
|
-
this.path =
|
|
127727
|
+
this.path = path27;
|
|
127595
127728
|
this.opts = opts;
|
|
127596
127729
|
this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/";
|
|
127597
127730
|
this.includeChildMatches = opts.includeChildMatches !== false;
|
|
@@ -127610,11 +127743,11 @@ var init_walker = __esm({
|
|
|
127610
127743
|
});
|
|
127611
127744
|
}
|
|
127612
127745
|
}
|
|
127613
|
-
#ignored(
|
|
127614
|
-
return this.seen.has(
|
|
127746
|
+
#ignored(path27) {
|
|
127747
|
+
return this.seen.has(path27) || !!this.#ignore?.ignored?.(path27);
|
|
127615
127748
|
}
|
|
127616
|
-
#childrenIgnored(
|
|
127617
|
-
return !!this.#ignore?.childrenIgnored?.(
|
|
127749
|
+
#childrenIgnored(path27) {
|
|
127750
|
+
return !!this.#ignore?.childrenIgnored?.(path27);
|
|
127618
127751
|
}
|
|
127619
127752
|
// backpressure mechanism
|
|
127620
127753
|
pause() {
|
|
@@ -127829,8 +127962,8 @@ var init_walker = __esm({
|
|
|
127829
127962
|
};
|
|
127830
127963
|
GlobWalker = class extends GlobUtil {
|
|
127831
127964
|
matches = /* @__PURE__ */ new Set();
|
|
127832
|
-
constructor(patterns,
|
|
127833
|
-
super(patterns,
|
|
127965
|
+
constructor(patterns, path27, opts) {
|
|
127966
|
+
super(patterns, path27, opts);
|
|
127834
127967
|
}
|
|
127835
127968
|
matchEmit(e4) {
|
|
127836
127969
|
this.matches.add(e4);
|
|
@@ -127867,8 +128000,8 @@ var init_walker = __esm({
|
|
|
127867
128000
|
};
|
|
127868
128001
|
GlobStream = class extends GlobUtil {
|
|
127869
128002
|
results;
|
|
127870
|
-
constructor(patterns,
|
|
127871
|
-
super(patterns,
|
|
128003
|
+
constructor(patterns, path27, opts) {
|
|
128004
|
+
super(patterns, path27, opts);
|
|
127872
128005
|
this.results = new Minipass({
|
|
127873
128006
|
signal: this.signal,
|
|
127874
128007
|
objectMode: true
|
|
@@ -128199,7 +128332,7 @@ function isNotFoundError(err) {
|
|
|
128199
128332
|
return err instanceof Error && "code" in err && err.code === "ENOENT";
|
|
128200
128333
|
}
|
|
128201
128334
|
function readPackageJson(packagePath) {
|
|
128202
|
-
const packageJsonPath =
|
|
128335
|
+
const packageJsonPath = path19.join(packagePath, "package.json");
|
|
128203
128336
|
try {
|
|
128204
128337
|
return JSON.parse((0, import_fs12.readFileSync)(packageJsonPath, "utf-8"));
|
|
128205
128338
|
} catch (err) {
|
|
@@ -128275,7 +128408,7 @@ async function discoverNpmYarnWorkspaces(rootDir) {
|
|
|
128275
128408
|
if (workspacesGlobs.length === 0) {
|
|
128276
128409
|
return null;
|
|
128277
128410
|
}
|
|
128278
|
-
const type2 = fileExists(
|
|
128411
|
+
const type2 = fileExists(path19.join(rootDir, "yarn.lock")) ? "yarn" : "npm";
|
|
128279
128412
|
const packages = await resolveWorkspaceGlobs(rootDir, workspacesGlobs);
|
|
128280
128413
|
logger.debug(
|
|
128281
128414
|
`Discovered ${packages.length} ${type2} workspace packages from ${workspacesGlobs.join(", ")}`
|
|
@@ -128283,7 +128416,7 @@ async function discoverNpmYarnWorkspaces(rootDir) {
|
|
|
128283
128416
|
return { type: type2, packages };
|
|
128284
128417
|
}
|
|
128285
128418
|
async function discoverPnpmWorkspaces(rootDir) {
|
|
128286
|
-
const pnpmWorkspacePath =
|
|
128419
|
+
const pnpmWorkspacePath = path19.join(rootDir, "pnpm-workspace.yaml");
|
|
128287
128420
|
let config3;
|
|
128288
128421
|
try {
|
|
128289
128422
|
const content = (0, import_fs12.readFileSync)(pnpmWorkspacePath, "utf-8");
|
|
@@ -128391,12 +128524,12 @@ function topologicalSortPackages(packages) {
|
|
|
128391
128524
|
return depthA - depthB;
|
|
128392
128525
|
});
|
|
128393
128526
|
}
|
|
128394
|
-
var import_fs12,
|
|
128527
|
+
var import_fs12, path19;
|
|
128395
128528
|
var init_workspaces = __esm({
|
|
128396
128529
|
"src/utils/workspaces.ts"() {
|
|
128397
128530
|
init_import_meta_url();
|
|
128398
128531
|
import_fs12 = require("fs");
|
|
128399
|
-
|
|
128532
|
+
path19 = __toESM(require("path"));
|
|
128400
128533
|
init_js_yaml();
|
|
128401
128534
|
init_esm21();
|
|
128402
128535
|
init_logger2();
|
|
@@ -128461,13 +128594,13 @@ async function getPublishTag(version2, checkPackageName, npmConfig, logger3, otp
|
|
|
128461
128594
|
}
|
|
128462
128595
|
return void 0;
|
|
128463
128596
|
}
|
|
128464
|
-
var import_child_process3, import_fs13,
|
|
128597
|
+
var import_child_process3, import_fs13, import_path12, import_prompts2, import_fs14, NPM_CONFIG, YARN_CONFIG, NPM_BIN, YARN_BIN, NPM_MIN_MAJOR, NPM_MIN_MINOR, NPM_TOKEN_ENV_VAR, DEFAULT_PACKAGE_REGEX, NpmPackageAccess, NpmTarget;
|
|
128465
128598
|
var init_npm = __esm({
|
|
128466
128599
|
"src/targets/npm.ts"() {
|
|
128467
128600
|
init_import_meta_url();
|
|
128468
128601
|
import_child_process3 = require("child_process");
|
|
128469
128602
|
import_fs13 = require("fs");
|
|
128470
|
-
|
|
128603
|
+
import_path12 = require("path");
|
|
128471
128604
|
import_prompts2 = __toESM(require_prompts3());
|
|
128472
128605
|
init_errors2();
|
|
128473
128606
|
init_filters();
|
|
@@ -128599,7 +128732,7 @@ var init_npm = __esm({
|
|
|
128599
128732
|
* @throws Error if npm/yarn is not found or command fails
|
|
128600
128733
|
*/
|
|
128601
128734
|
static async bumpVersion(rootDir, newVersion) {
|
|
128602
|
-
const packageJsonPath = (0,
|
|
128735
|
+
const packageJsonPath = (0, import_path12.join)(rootDir, "package.json");
|
|
128603
128736
|
if (!(0, import_fs13.existsSync)(packageJsonPath)) {
|
|
128604
128737
|
return false;
|
|
128605
128738
|
}
|
|
@@ -128655,7 +128788,7 @@ var init_npm = __esm({
|
|
|
128655
128788
|
*/
|
|
128656
128789
|
static async bumpWorkspacePackagesIndividually(bin, packages, _newVersion, baseArgs) {
|
|
128657
128790
|
for (const pkg of packages) {
|
|
128658
|
-
const pkgJsonPath = (0,
|
|
128791
|
+
const pkgJsonPath = (0, import_path12.join)(pkg.location, "package.json");
|
|
128659
128792
|
if (!(0, import_fs13.existsSync)(pkgJsonPath)) {
|
|
128660
128793
|
continue;
|
|
128661
128794
|
}
|
|
@@ -128749,7 +128882,7 @@ var init_npm = __esm({
|
|
|
128749
128882
|
* @param path Absolute path to the tarball to upload
|
|
128750
128883
|
* @returns A promise that resolves when the upload has completed
|
|
128751
128884
|
*/
|
|
128752
|
-
async publishPackage(
|
|
128885
|
+
async publishPackage(path27, options) {
|
|
128753
128886
|
const args = ["publish", "--ignore-scripts"];
|
|
128754
128887
|
let bin;
|
|
128755
128888
|
if (this.npmConfig.useYarn) {
|
|
@@ -128777,7 +128910,7 @@ var init_npm = __esm({
|
|
|
128777
128910
|
filePath,
|
|
128778
128911
|
`//registry.npmjs.org/:_authToken=\${${NPM_TOKEN_ENV_VAR}}`
|
|
128779
128912
|
);
|
|
128780
|
-
args.push(
|
|
128913
|
+
args.push(path27);
|
|
128781
128914
|
return spawnProcess(bin, args, spawnOptions, {
|
|
128782
128915
|
showStdout: true
|
|
128783
128916
|
});
|
|
@@ -128815,9 +128948,9 @@ var init_npm = __esm({
|
|
|
128815
128948
|
}
|
|
128816
128949
|
await Promise.all(
|
|
128817
128950
|
packageFiles.map(async (file) => {
|
|
128818
|
-
const
|
|
128951
|
+
const path27 = await this.artifactProvider.downloadArtifact(file);
|
|
128819
128952
|
this.logger.info(`Releasing ${file.filename} to NPM`);
|
|
128820
|
-
return this.publishPackage(
|
|
128953
|
+
return this.publishPackage(path27, publishOptions);
|
|
128821
128954
|
})
|
|
128822
128955
|
);
|
|
128823
128956
|
this.logger.info("NPM release complete");
|
|
@@ -128827,12 +128960,12 @@ var init_npm = __esm({
|
|
|
128827
128960
|
});
|
|
128828
128961
|
|
|
128829
128962
|
// src/targets/nuget.ts
|
|
128830
|
-
var import_fs15,
|
|
128963
|
+
var import_fs15, import_path13, NUGET_DOTNET_BIN, DEFAULT_NUGET_SERVER_URL, DEFAULT_NUGET_REGEX, SYMBOLS_NUGET_REGEX, DOTNET_SPAWN_OPTIONS, NugetTarget;
|
|
128831
128964
|
var init_nuget = __esm({
|
|
128832
128965
|
"src/targets/nuget.ts"() {
|
|
128833
128966
|
init_import_meta_url();
|
|
128834
128967
|
import_fs15 = require("fs");
|
|
128835
|
-
|
|
128968
|
+
import_path13 = require("path");
|
|
128836
128969
|
init_errors2();
|
|
128837
128970
|
init_system();
|
|
128838
128971
|
init_base5();
|
|
@@ -128859,7 +128992,7 @@ var init_nuget = __esm({
|
|
|
128859
128992
|
*/
|
|
128860
128993
|
static async bumpVersion(rootDir, newVersion) {
|
|
128861
128994
|
const csprojFiles = (0, import_fs15.readdirSync)(rootDir).filter((f4) => f4.endsWith(".csproj"));
|
|
128862
|
-
const hasDotNet = csprojFiles.length > 0 || (0, import_fs15.existsSync)((0,
|
|
128995
|
+
const hasDotNet = csprojFiles.length > 0 || (0, import_fs15.existsSync)((0, import_path13.join)(rootDir, "Directory.Build.props"));
|
|
128863
128996
|
if (!hasDotNet) {
|
|
128864
128997
|
return false;
|
|
128865
128998
|
}
|
|
@@ -128885,7 +129018,7 @@ var init_nuget = __esm({
|
|
|
128885
129018
|
}
|
|
128886
129019
|
}
|
|
128887
129020
|
let bumped = false;
|
|
128888
|
-
const buildPropsPath = (0,
|
|
129021
|
+
const buildPropsPath = (0, import_path13.join)(rootDir, "Directory.Build.props");
|
|
128889
129022
|
if ((0, import_fs15.existsSync)(buildPropsPath)) {
|
|
128890
129023
|
if (_NugetTarget.updateVersionInXml(buildPropsPath, newVersion)) {
|
|
128891
129024
|
bumped = true;
|
|
@@ -128893,7 +129026,7 @@ var init_nuget = __esm({
|
|
|
128893
129026
|
}
|
|
128894
129027
|
if (!bumped) {
|
|
128895
129028
|
for (const csproj of csprojFiles) {
|
|
128896
|
-
const csprojPath = (0,
|
|
129029
|
+
const csprojPath = (0, import_path13.join)(rootDir, csproj);
|
|
128897
129030
|
if (_NugetTarget.updateVersionInXml(csprojPath, newVersion)) {
|
|
128898
129031
|
bumped = true;
|
|
128899
129032
|
}
|
|
@@ -128958,11 +129091,11 @@ var init_nuget = __esm({
|
|
|
128958
129091
|
* @param path Absolute path to the archive to upload
|
|
128959
129092
|
* @returns A promise that resolves when the upload has completed
|
|
128960
129093
|
*/
|
|
128961
|
-
async uploadAsset(
|
|
129094
|
+
async uploadAsset(path27) {
|
|
128962
129095
|
const args = [
|
|
128963
129096
|
"nuget",
|
|
128964
129097
|
"push",
|
|
128965
|
-
|
|
129098
|
+
path27,
|
|
128966
129099
|
"--api-key",
|
|
128967
129100
|
"${NUGET_API_TOKEN}",
|
|
128968
129101
|
// Warning: `--skip-duplicate` means we will NOT error when a version
|
|
@@ -129005,7 +129138,7 @@ var init_nuget = __esm({
|
|
|
129005
129138
|
);
|
|
129006
129139
|
await Promise.all(
|
|
129007
129140
|
packageFiles.map(async (file) => {
|
|
129008
|
-
const
|
|
129141
|
+
const path27 = await this.artifactProvider.downloadArtifact(file);
|
|
129009
129142
|
const symbolFileName = file.filename.replace(".nupkg", ".snupkg");
|
|
129010
129143
|
const symbolFile = symbolFiles.find((f4) => f4.filename === symbolFileName);
|
|
129011
129144
|
if (symbolFile) {
|
|
@@ -129014,7 +129147,7 @@ var init_nuget = __esm({
|
|
|
129014
129147
|
this.logger.info(
|
|
129015
129148
|
`Uploading file "${file.filename}" via "dotnet nuget"` + (symbolFile ? `, including symbol file "${symbolFile.filename}"` : "")
|
|
129016
129149
|
);
|
|
129017
|
-
return this.uploadAsset(
|
|
129150
|
+
return this.uploadAsset(path27);
|
|
129018
129151
|
})
|
|
129019
129152
|
);
|
|
129020
129153
|
this.logger.info("Nuget release complete");
|
|
@@ -129031,12 +129164,12 @@ function uniquePackages(filenames) {
|
|
|
129031
129164
|
});
|
|
129032
129165
|
return [...new Set(versions)].sort();
|
|
129033
129166
|
}
|
|
129034
|
-
var import_fs16,
|
|
129167
|
+
var import_fs16, import_path14, WHEEL_REGEX, SentryPypiTarget;
|
|
129035
129168
|
var init_sentryPypi = __esm({
|
|
129036
129169
|
"src/targets/sentryPypi.ts"() {
|
|
129037
129170
|
init_import_meta_url();
|
|
129038
129171
|
import_fs16 = __toESM(require("fs"));
|
|
129039
|
-
|
|
129172
|
+
import_path14 = __toESM(require("path"));
|
|
129040
129173
|
init_files();
|
|
129041
129174
|
init_errors2();
|
|
129042
129175
|
init_system();
|
|
@@ -129094,7 +129227,7 @@ var init_sentryPypi = __esm({
|
|
|
129094
129227
|
{ cwd: directory },
|
|
129095
129228
|
{ enableInDryRunMode: true }
|
|
129096
129229
|
);
|
|
129097
|
-
const contents2 = import_fs16.default.readFileSync(
|
|
129230
|
+
const contents2 = import_fs16.default.readFileSync(import_path14.default.join(directory, "packages.ini"), {
|
|
129098
129231
|
encoding: "utf-8"
|
|
129099
129232
|
});
|
|
129100
129233
|
const tree2 = (await spawnProcess(
|
|
@@ -129153,12 +129286,12 @@ var init_sentryPypi = __esm({
|
|
|
129153
129286
|
});
|
|
129154
129287
|
|
|
129155
129288
|
// src/targets/pypi.ts
|
|
129156
|
-
var import_fs17,
|
|
129289
|
+
var import_fs17, import_path15, DEFAULT_TWINE_BIN, TWINE_BIN, DEFAULT_PYPI_REGEX, PypiTarget;
|
|
129157
129290
|
var init_pypi = __esm({
|
|
129158
129291
|
"src/targets/pypi.ts"() {
|
|
129159
129292
|
init_import_meta_url();
|
|
129160
129293
|
import_fs17 = require("fs");
|
|
129161
|
-
|
|
129294
|
+
import_path15 = require("path");
|
|
129162
129295
|
init_errors2();
|
|
129163
129296
|
init_system();
|
|
129164
129297
|
init_base5();
|
|
@@ -129186,7 +129319,7 @@ var init_pypi = __esm({
|
|
|
129186
129319
|
* @throws Error if tool is not found or command fails
|
|
129187
129320
|
*/
|
|
129188
129321
|
static async bumpVersion(rootDir, newVersion) {
|
|
129189
|
-
const pyprojectPath = (0,
|
|
129322
|
+
const pyprojectPath = (0, import_path15.join)(rootDir, "pyproject.toml");
|
|
129190
129323
|
if (!(0, import_fs17.existsSync)(pyprojectPath)) {
|
|
129191
129324
|
return false;
|
|
129192
129325
|
}
|
|
@@ -129377,20 +129510,20 @@ function createSymlinks(versionFilePath, newVersion, oldVersion) {
|
|
|
129377
129510
|
throw new ConfigurationError(`Cannot parse version: "${parsedNewVersion}"`);
|
|
129378
129511
|
}
|
|
129379
129512
|
const parsedOldVersion = (oldVersion ? parseVersion(oldVersion) : void 0) || void 0;
|
|
129380
|
-
const baseVersionName =
|
|
129381
|
-
const packageDir =
|
|
129513
|
+
const baseVersionName = path21.basename(versionFilePath);
|
|
129514
|
+
const packageDir = path21.dirname(versionFilePath);
|
|
129382
129515
|
if (!parsedOldVersion || versionGreaterOrEqualThan(parsedNewVersion, parsedOldVersion)) {
|
|
129383
129516
|
logger.debug('Symlink "latest.json"', {
|
|
129384
129517
|
before: oldVersion,
|
|
129385
129518
|
after: newVersion
|
|
129386
129519
|
});
|
|
129387
|
-
forceSymlink(baseVersionName,
|
|
129520
|
+
forceSymlink(baseVersionName, path21.join(packageDir, "latest.json"));
|
|
129388
129521
|
}
|
|
129389
129522
|
const existingLinkedMajorVersion = getExistingSymlinkedVersion(
|
|
129390
|
-
|
|
129523
|
+
path21.join(packageDir, `${parsedNewVersion.major}.json`)
|
|
129391
129524
|
);
|
|
129392
129525
|
const existingLinkedMinorVersion = getExistingSymlinkedVersion(
|
|
129393
|
-
|
|
129526
|
+
path21.join(
|
|
129394
129527
|
packageDir,
|
|
129395
129528
|
`${parsedNewVersion.major}.${parsedNewVersion.minor}.json`
|
|
129396
129529
|
)
|
|
@@ -129401,7 +129534,7 @@ function createSymlinks(versionFilePath, newVersion, oldVersion) {
|
|
|
129401
129534
|
before: existingLinkedMajorVersion && semVerToString(existingLinkedMajorVersion),
|
|
129402
129535
|
after: newVersion
|
|
129403
129536
|
});
|
|
129404
|
-
forceSymlink(baseVersionName,
|
|
129537
|
+
forceSymlink(baseVersionName, path21.join(packageDir, majorVersionLink));
|
|
129405
129538
|
}
|
|
129406
129539
|
if (!existingLinkedMinorVersion || versionGreaterOrEqualThan(parsedNewVersion, existingLinkedMinorVersion)) {
|
|
129407
129540
|
const minorVersionLink = `${parsedNewVersion.major}.${parsedNewVersion.minor}.json`;
|
|
@@ -129409,7 +129542,7 @@ function createSymlinks(versionFilePath, newVersion, oldVersion) {
|
|
|
129409
129542
|
before: existingLinkedMinorVersion && semVerToString(existingLinkedMinorVersion),
|
|
129410
129543
|
after: newVersion
|
|
129411
129544
|
});
|
|
129412
|
-
forceSymlink(baseVersionName,
|
|
129545
|
+
forceSymlink(baseVersionName, path21.join(packageDir, minorVersionLink));
|
|
129413
129546
|
}
|
|
129414
129547
|
}
|
|
129415
129548
|
function getExistingSymlinkedVersion(symlinkPath) {
|
|
@@ -129419,14 +129552,14 @@ function getExistingSymlinkedVersion(symlinkPath) {
|
|
|
129419
129552
|
return null;
|
|
129420
129553
|
}
|
|
129421
129554
|
const linkedFile = fs22.readlinkSync(symlinkPath);
|
|
129422
|
-
return parseVersion(
|
|
129555
|
+
return parseVersion(path21.basename(linkedFile));
|
|
129423
129556
|
}
|
|
129424
|
-
var fs22,
|
|
129557
|
+
var fs22, path21;
|
|
129425
129558
|
var init_symlink = __esm({
|
|
129426
129559
|
"src/utils/symlink.ts"() {
|
|
129427
129560
|
init_import_meta_url();
|
|
129428
129561
|
fs22 = __toESM(require("fs"));
|
|
129429
|
-
|
|
129562
|
+
path21 = __toESM(require("path"));
|
|
129430
129563
|
init_logger2();
|
|
129431
129564
|
init_errors2();
|
|
129432
129565
|
init_version9();
|
|
@@ -129436,7 +129569,7 @@ var init_symlink = __esm({
|
|
|
129436
129569
|
// src/utils/packagePath.ts
|
|
129437
129570
|
function getSdkPackagePath(canonical) {
|
|
129438
129571
|
const packageDirs = parseCanonical(canonical);
|
|
129439
|
-
return
|
|
129572
|
+
return path22.join("packages", ...packageDirs);
|
|
129440
129573
|
}
|
|
129441
129574
|
function getAppPackagePath(canonical) {
|
|
129442
129575
|
const packageDirs = parseCanonical(canonical);
|
|
@@ -129445,7 +129578,7 @@ function getAppPackagePath(canonical) {
|
|
|
129445
129578
|
`Invalid canonical entry for an app: ${canonical}`
|
|
129446
129579
|
);
|
|
129447
129580
|
}
|
|
129448
|
-
return
|
|
129581
|
+
return path22.join("apps", ...packageDirs.slice(1));
|
|
129449
129582
|
}
|
|
129450
129583
|
function getPackageDirPath(packageType, canonical) {
|
|
129451
129584
|
switch (packageType) {
|
|
@@ -129476,11 +129609,11 @@ function parseCanonical(canonicalName) {
|
|
|
129476
129609
|
}
|
|
129477
129610
|
return [registry, ...packageDirs];
|
|
129478
129611
|
}
|
|
129479
|
-
var
|
|
129612
|
+
var path22;
|
|
129480
129613
|
var init_packagePath = __esm({
|
|
129481
129614
|
"src/utils/packagePath.ts"() {
|
|
129482
129615
|
init_import_meta_url();
|
|
129483
|
-
|
|
129616
|
+
path22 = __toESM(require("path"));
|
|
129484
129617
|
init_registry();
|
|
129485
129618
|
init_errors2();
|
|
129486
129619
|
}
|
|
@@ -129508,12 +129641,12 @@ function createInitialManifest(initialData) {
|
|
|
129508
129641
|
}
|
|
129509
129642
|
async function getPackageManifest(baseDir, type2, canonicalName, version2, initialManifestData) {
|
|
129510
129643
|
const packageDirPath = getPackageDirPath(type2, canonicalName);
|
|
129511
|
-
const fullPackageDir =
|
|
129512
|
-
const versionFilePath =
|
|
129644
|
+
const fullPackageDir = path23.join(baseDir, packageDirPath);
|
|
129645
|
+
const versionFilePath = path23.join(fullPackageDir, `${version2}.json`);
|
|
129513
129646
|
if ((0, import_fs18.existsSync)(versionFilePath)) {
|
|
129514
129647
|
reportError(`Version file for "${version2}" already exists. Aborting.`);
|
|
129515
129648
|
}
|
|
129516
|
-
const packageManifestPath =
|
|
129649
|
+
const packageManifestPath = path23.join(fullPackageDir, "latest.json");
|
|
129517
129650
|
if (!(0, import_fs18.existsSync)(packageManifestPath)) {
|
|
129518
129651
|
if (!initialManifestData) {
|
|
129519
129652
|
reportError(
|
|
@@ -129550,12 +129683,12 @@ async function updateManifestSymlinks(updatedManifest, version2, versionFilePath
|
|
|
129550
129683
|
await import_fs18.promises.writeFile(versionFilePath, manifestString);
|
|
129551
129684
|
createSymlinks(versionFilePath, version2, previousVersion);
|
|
129552
129685
|
}
|
|
129553
|
-
var import_fs18,
|
|
129686
|
+
var import_fs18, path23, DEFAULT_REGISTRY_REMOTE;
|
|
129554
129687
|
var init_registry = __esm({
|
|
129555
129688
|
"src/utils/registry.ts"() {
|
|
129556
129689
|
init_import_meta_url();
|
|
129557
129690
|
import_fs18 = require("fs");
|
|
129558
|
-
|
|
129691
|
+
path23 = __toESM(require("path"));
|
|
129559
129692
|
init_logger2();
|
|
129560
129693
|
init_symlink();
|
|
129561
129694
|
init_errors2();
|
|
@@ -130267,14 +130400,14 @@ var require_aws4 = __commonJS({
|
|
|
130267
130400
|
}
|
|
130268
130401
|
if (pathStr !== "/") {
|
|
130269
130402
|
if (normalizePath2) pathStr = pathStr.replace(/\/{2,}/g, "/");
|
|
130270
|
-
pathStr = pathStr.split("/").reduce(function(
|
|
130403
|
+
pathStr = pathStr.split("/").reduce(function(path27, piece) {
|
|
130271
130404
|
if (normalizePath2 && piece === "..") {
|
|
130272
|
-
|
|
130405
|
+
path27.pop();
|
|
130273
130406
|
} else if (!normalizePath2 || piece !== ".") {
|
|
130274
130407
|
if (decodePath) piece = decodeURIComponent(piece.replace(/\+/g, " "));
|
|
130275
|
-
|
|
130408
|
+
path27.push(encodeRfc3986Full(piece));
|
|
130276
130409
|
}
|
|
130277
|
-
return
|
|
130410
|
+
return path27;
|
|
130278
130411
|
}, []).join("/");
|
|
130279
130412
|
if (pathStr[0] !== "/") pathStr = "/" + pathStr;
|
|
130280
130413
|
if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, "/");
|
|
@@ -130327,25 +130460,25 @@ var require_aws4 = __commonJS({
|
|
|
130327
130460
|
};
|
|
130328
130461
|
};
|
|
130329
130462
|
RequestSigner.prototype.parsePath = function() {
|
|
130330
|
-
var
|
|
130331
|
-
if (/[^0-9A-Za-z;,/?:@&=+$\-_.!~*'()#%]/.test(
|
|
130332
|
-
|
|
130463
|
+
var path27 = this.request.path || "/";
|
|
130464
|
+
if (/[^0-9A-Za-z;,/?:@&=+$\-_.!~*'()#%]/.test(path27)) {
|
|
130465
|
+
path27 = encodeURI(decodeURI(path27));
|
|
130333
130466
|
}
|
|
130334
|
-
var queryIx =
|
|
130467
|
+
var queryIx = path27.indexOf("?"), query = null;
|
|
130335
130468
|
if (queryIx >= 0) {
|
|
130336
|
-
query = querystring2.parse(
|
|
130337
|
-
|
|
130469
|
+
query = querystring2.parse(path27.slice(queryIx + 1));
|
|
130470
|
+
path27 = path27.slice(0, queryIx);
|
|
130338
130471
|
}
|
|
130339
130472
|
this.parsedPath = {
|
|
130340
|
-
path:
|
|
130473
|
+
path: path27,
|
|
130341
130474
|
query
|
|
130342
130475
|
};
|
|
130343
130476
|
};
|
|
130344
130477
|
RequestSigner.prototype.formatPath = function() {
|
|
130345
|
-
var
|
|
130346
|
-
if (!query) return
|
|
130478
|
+
var path27 = this.parsedPath.path, query = this.parsedPath.query;
|
|
130479
|
+
if (!query) return path27;
|
|
130347
130480
|
if (query[""] != null) delete query[""];
|
|
130348
|
-
return
|
|
130481
|
+
return path27 + "?" + encodeRfc3986(querystring2.stringify(query));
|
|
130349
130482
|
};
|
|
130350
130483
|
aws42.RequestSigner = RequestSigner;
|
|
130351
130484
|
aws42.sign = function(request3, credentials) {
|
|
@@ -131265,9 +131398,9 @@ var init_createPaginator = __esm({
|
|
|
131265
131398
|
command10 = withCommand(command10) ?? command10;
|
|
131266
131399
|
return await client.send(command10, ...args);
|
|
131267
131400
|
};
|
|
131268
|
-
get = (fromObject,
|
|
131401
|
+
get = (fromObject, path27) => {
|
|
131269
131402
|
let cursor2 = fromObject;
|
|
131270
|
-
const pathComponents =
|
|
131403
|
+
const pathComponents = path27.split(".");
|
|
131271
131404
|
for (const step of pathComponents) {
|
|
131272
131405
|
if (!cursor2 || typeof cursor2 !== "object") {
|
|
131273
131406
|
return void 0;
|
|
@@ -132299,12 +132432,12 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
132299
132432
|
const password = request3.password ?? "";
|
|
132300
132433
|
auth2 = `${username}:${password}`;
|
|
132301
132434
|
}
|
|
132302
|
-
let
|
|
132435
|
+
let path27 = request3.path;
|
|
132303
132436
|
if (queryString) {
|
|
132304
|
-
|
|
132437
|
+
path27 += `?${queryString}`;
|
|
132305
132438
|
}
|
|
132306
132439
|
if (request3.fragment) {
|
|
132307
|
-
|
|
132440
|
+
path27 += `#${request3.fragment}`;
|
|
132308
132441
|
}
|
|
132309
132442
|
let hostname3 = request3.hostname ?? "";
|
|
132310
132443
|
if (hostname3[0] === "[" && hostname3.endsWith("]")) {
|
|
@@ -132316,7 +132449,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
132316
132449
|
headers: request3.headers,
|
|
132317
132450
|
host: hostname3,
|
|
132318
132451
|
method: request3.method,
|
|
132319
|
-
path:
|
|
132452
|
+
path: path27,
|
|
132320
132453
|
port: request3.port,
|
|
132321
132454
|
agent,
|
|
132322
132455
|
auth: auth2
|
|
@@ -132571,16 +132704,16 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
132571
132704
|
reject(err);
|
|
132572
132705
|
};
|
|
132573
132706
|
const queryString = querystringBuilder.buildQueryString(query || {});
|
|
132574
|
-
let
|
|
132707
|
+
let path27 = request3.path;
|
|
132575
132708
|
if (queryString) {
|
|
132576
|
-
|
|
132709
|
+
path27 += `?${queryString}`;
|
|
132577
132710
|
}
|
|
132578
132711
|
if (request3.fragment) {
|
|
132579
|
-
|
|
132712
|
+
path27 += `#${request3.fragment}`;
|
|
132580
132713
|
}
|
|
132581
132714
|
const req = session.request({
|
|
132582
132715
|
...request3.headers,
|
|
132583
|
-
[http22.constants.HTTP2_HEADER_PATH]:
|
|
132716
|
+
[http22.constants.HTTP2_HEADER_PATH]: path27,
|
|
132584
132717
|
[http22.constants.HTTP2_HEADER_METHOD]: method
|
|
132585
132718
|
});
|
|
132586
132719
|
session.ref();
|
|
@@ -132770,13 +132903,13 @@ var require_dist_cjs15 = __commonJS({
|
|
|
132770
132903
|
abortError.name = "AbortError";
|
|
132771
132904
|
return Promise.reject(abortError);
|
|
132772
132905
|
}
|
|
132773
|
-
let
|
|
132906
|
+
let path27 = request3.path;
|
|
132774
132907
|
const queryString = querystringBuilder.buildQueryString(request3.query || {});
|
|
132775
132908
|
if (queryString) {
|
|
132776
|
-
|
|
132909
|
+
path27 += `?${queryString}`;
|
|
132777
132910
|
}
|
|
132778
132911
|
if (request3.fragment) {
|
|
132779
|
-
|
|
132912
|
+
path27 += `#${request3.fragment}`;
|
|
132780
132913
|
}
|
|
132781
132914
|
let auth2 = "";
|
|
132782
132915
|
if (request3.username != null || request3.password != null) {
|
|
@@ -132785,7 +132918,7 @@ var require_dist_cjs15 = __commonJS({
|
|
|
132785
132918
|
auth2 = `${username}:${password}@`;
|
|
132786
132919
|
}
|
|
132787
132920
|
const { port, method } = request3;
|
|
132788
|
-
const url2 = `${request3.protocol}//${auth2}${request3.hostname}${port ? `:${port}` : ""}${
|
|
132921
|
+
const url2 = `${request3.protocol}//${auth2}${request3.hostname}${port ? `:${port}` : ""}${path27}`;
|
|
132789
132922
|
const body = method === "GET" || method === "HEAD" ? void 0 : request3.body;
|
|
132790
132923
|
const requestOptions = {
|
|
132791
132924
|
body,
|
|
@@ -134901,13 +135034,13 @@ function __disposeResources(env2) {
|
|
|
134901
135034
|
}
|
|
134902
135035
|
return next();
|
|
134903
135036
|
}
|
|
134904
|
-
function __rewriteRelativeImportExtension(
|
|
134905
|
-
if (typeof
|
|
134906
|
-
return
|
|
135037
|
+
function __rewriteRelativeImportExtension(path27, preserveJsx) {
|
|
135038
|
+
if (typeof path27 === "string" && /^\.\.?\//.test(path27)) {
|
|
135039
|
+
return path27.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m5, tsx, d5, ext3, cm) {
|
|
134907
135040
|
return tsx ? preserveJsx ? ".jsx" : ".js" : d5 && (!ext3 || !cm) ? m5 : d5 + ext3 + "." + cm.toLowerCase() + "js";
|
|
134908
135041
|
});
|
|
134909
135042
|
}
|
|
134910
|
-
return
|
|
135043
|
+
return path27;
|
|
134911
135044
|
}
|
|
134912
135045
|
var extendStatics, __assign3, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;
|
|
134913
135046
|
var init_tslib_es6 = __esm({
|
|
@@ -135803,11 +135936,11 @@ var init_HttpBindingProtocol = __esm({
|
|
|
135803
135936
|
const opTraits = translateTraits(operationSchema.traits);
|
|
135804
135937
|
if (opTraits.http) {
|
|
135805
135938
|
request3.method = opTraits.http[0];
|
|
135806
|
-
const [
|
|
135939
|
+
const [path27, search] = opTraits.http[1].split("?");
|
|
135807
135940
|
if (request3.path == "/") {
|
|
135808
|
-
request3.path =
|
|
135941
|
+
request3.path = path27;
|
|
135809
135942
|
} else {
|
|
135810
|
-
request3.path +=
|
|
135943
|
+
request3.path += path27;
|
|
135811
135944
|
}
|
|
135812
135945
|
const traitSearchParams = new URLSearchParams(search ?? "");
|
|
135813
135946
|
Object.assign(query, Object.fromEntries(traitSearchParams));
|
|
@@ -136193,8 +136326,8 @@ var init_requestBuilder = __esm({
|
|
|
136193
136326
|
return this;
|
|
136194
136327
|
}
|
|
136195
136328
|
p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
|
|
136196
|
-
this.resolvePathStack.push((
|
|
136197
|
-
this.path = resolvedPath(
|
|
136329
|
+
this.resolvePathStack.push((path27) => {
|
|
136330
|
+
this.path = resolvedPath(path27, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
|
|
136198
136331
|
});
|
|
136199
136332
|
return this;
|
|
136200
136333
|
}
|
|
@@ -136861,18 +136994,18 @@ var require_dist_cjs19 = __commonJS({
|
|
|
136861
136994
|
}
|
|
136862
136995
|
};
|
|
136863
136996
|
var booleanEquals = (value1, value2) => value1 === value2;
|
|
136864
|
-
var getAttrPathList = (
|
|
136865
|
-
const parts =
|
|
136997
|
+
var getAttrPathList = (path27) => {
|
|
136998
|
+
const parts = path27.split(".");
|
|
136866
136999
|
const pathList = [];
|
|
136867
137000
|
for (const part of parts) {
|
|
136868
137001
|
const squareBracketIndex = part.indexOf("[");
|
|
136869
137002
|
if (squareBracketIndex !== -1) {
|
|
136870
137003
|
if (part.indexOf("]") !== part.length - 1) {
|
|
136871
|
-
throw new EndpointError(`Path: '${
|
|
137004
|
+
throw new EndpointError(`Path: '${path27}' does not end with ']'`);
|
|
136872
137005
|
}
|
|
136873
137006
|
const arrayIndex = part.slice(squareBracketIndex + 1, -1);
|
|
136874
137007
|
if (Number.isNaN(parseInt(arrayIndex))) {
|
|
136875
|
-
throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${
|
|
137008
|
+
throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path27}'`);
|
|
136876
137009
|
}
|
|
136877
137010
|
if (squareBracketIndex !== 0) {
|
|
136878
137011
|
pathList.push(part.slice(0, squareBracketIndex));
|
|
@@ -136884,9 +137017,9 @@ var require_dist_cjs19 = __commonJS({
|
|
|
136884
137017
|
}
|
|
136885
137018
|
return pathList;
|
|
136886
137019
|
};
|
|
136887
|
-
var getAttr = (value,
|
|
137020
|
+
var getAttr = (value, path27) => getAttrPathList(path27).reduce((acc, index) => {
|
|
136888
137021
|
if (typeof acc !== "object") {
|
|
136889
|
-
throw new EndpointError(`Index '${index}' in '${
|
|
137022
|
+
throw new EndpointError(`Index '${index}' in '${path27}' not found in '${JSON.stringify(value)}'`);
|
|
136890
137023
|
} else if (Array.isArray(acc)) {
|
|
136891
137024
|
return acc[parseInt(index)];
|
|
136892
137025
|
}
|
|
@@ -136905,8 +137038,8 @@ var require_dist_cjs19 = __commonJS({
|
|
|
136905
137038
|
return value;
|
|
136906
137039
|
}
|
|
136907
137040
|
if (typeof value === "object" && "hostname" in value) {
|
|
136908
|
-
const { hostname: hostname4, port, protocol: protocol2 = "", path:
|
|
136909
|
-
const url2 = new URL(`${protocol2}//${hostname4}${port ? `:${port}` : ""}${
|
|
137041
|
+
const { hostname: hostname4, port, protocol: protocol2 = "", path: path27 = "", query = {} } = value;
|
|
137042
|
+
const url2 = new URL(`${protocol2}//${hostname4}${port ? `:${port}` : ""}${path27}`);
|
|
136910
137043
|
url2.search = Object.entries(query).map(([k5, v8]) => `${k5}=${v8}`).join("&");
|
|
136911
137044
|
return url2;
|
|
136912
137045
|
}
|
|
@@ -138442,10 +138575,10 @@ ${longDate}
|
|
|
138442
138575
|
${credentialScope}
|
|
138443
138576
|
${utilHexEncoding.toHex(hashedRequest)}`;
|
|
138444
138577
|
}
|
|
138445
|
-
getCanonicalPath({ path:
|
|
138578
|
+
getCanonicalPath({ path: path27 }) {
|
|
138446
138579
|
if (this.uriEscapePath) {
|
|
138447
138580
|
const normalizedPathSegments = [];
|
|
138448
|
-
for (const pathSegment of
|
|
138581
|
+
for (const pathSegment of path27.split("/")) {
|
|
138449
138582
|
if (pathSegment?.length === 0)
|
|
138450
138583
|
continue;
|
|
138451
138584
|
if (pathSegment === ".")
|
|
@@ -138456,11 +138589,11 @@ ${utilHexEncoding.toHex(hashedRequest)}`;
|
|
|
138456
138589
|
normalizedPathSegments.push(pathSegment);
|
|
138457
138590
|
}
|
|
138458
138591
|
}
|
|
138459
|
-
const normalizedPath = `${
|
|
138592
|
+
const normalizedPath = `${path27?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path27?.endsWith("/") ? "/" : ""}`;
|
|
138460
138593
|
const doubleEncoded = utilUriEscape.escapeUri(normalizedPath);
|
|
138461
138594
|
return doubleEncoded.replace(/%2F/g, "/");
|
|
138462
138595
|
}
|
|
138463
|
-
return
|
|
138596
|
+
return path27;
|
|
138464
138597
|
}
|
|
138465
138598
|
validateResolvedCredentials(credentials) {
|
|
138466
138599
|
if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") {
|
|
@@ -139779,11 +139912,11 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
139779
139912
|
}
|
|
139780
139913
|
}
|
|
139781
139914
|
const { service, operation: operation2 } = (0, import_util_middleware5.getSmithyContext)(context2);
|
|
139782
|
-
const
|
|
139915
|
+
const path27 = `/service/${service}/operation/${operation2}`;
|
|
139783
139916
|
if (request3.path.endsWith("/")) {
|
|
139784
|
-
request3.path +=
|
|
139917
|
+
request3.path += path27.slice(1);
|
|
139785
139918
|
} else {
|
|
139786
|
-
request3.path +=
|
|
139919
|
+
request3.path += path27;
|
|
139787
139920
|
}
|
|
139788
139921
|
return request3;
|
|
139789
139922
|
}
|
|
@@ -144319,14 +144452,14 @@ var require_readFile = __commonJS({
|
|
|
144319
144452
|
var promises_1 = require("node:fs/promises");
|
|
144320
144453
|
exports2.filePromises = {};
|
|
144321
144454
|
exports2.fileIntercept = {};
|
|
144322
|
-
var readFile4 = (
|
|
144323
|
-
if (exports2.fileIntercept[
|
|
144324
|
-
return exports2.fileIntercept[
|
|
144455
|
+
var readFile4 = (path27, options) => {
|
|
144456
|
+
if (exports2.fileIntercept[path27] !== void 0) {
|
|
144457
|
+
return exports2.fileIntercept[path27];
|
|
144325
144458
|
}
|
|
144326
|
-
if (!exports2.filePromises[
|
|
144327
|
-
exports2.filePromises[
|
|
144459
|
+
if (!exports2.filePromises[path27] || options?.ignoreCache) {
|
|
144460
|
+
exports2.filePromises[path27] = (0, promises_1.readFile)(path27, "utf8");
|
|
144328
144461
|
}
|
|
144329
|
-
return exports2.filePromises[
|
|
144462
|
+
return exports2.filePromises[path27];
|
|
144330
144463
|
};
|
|
144331
144464
|
exports2.readFile = readFile4;
|
|
144332
144465
|
}
|
|
@@ -144340,7 +144473,7 @@ var require_dist_cjs33 = __commonJS({
|
|
|
144340
144473
|
var getHomeDir = require_getHomeDir();
|
|
144341
144474
|
var getSSOTokenFilepath = require_getSSOTokenFilepath();
|
|
144342
144475
|
var getSSOTokenFromFile = require_getSSOTokenFromFile();
|
|
144343
|
-
var
|
|
144476
|
+
var path27 = require("path");
|
|
144344
144477
|
var types3 = require_dist_cjs();
|
|
144345
144478
|
var readFile4 = require_readFile();
|
|
144346
144479
|
var ENV_PROFILE = "AWS_PROFILE";
|
|
@@ -144362,9 +144495,9 @@ var require_dist_cjs33 = __commonJS({
|
|
|
144362
144495
|
...data2.default && { default: data2.default }
|
|
144363
144496
|
});
|
|
144364
144497
|
var ENV_CONFIG_PATH = "AWS_CONFIG_FILE";
|
|
144365
|
-
var getConfigFilepath = () => process.env[ENV_CONFIG_PATH] ||
|
|
144498
|
+
var getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path27.join(getHomeDir.getHomeDir(), ".aws", "config");
|
|
144366
144499
|
var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE";
|
|
144367
|
-
var getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] ||
|
|
144500
|
+
var getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path27.join(getHomeDir.getHomeDir(), ".aws", "credentials");
|
|
144368
144501
|
var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/;
|
|
144369
144502
|
var profileNameBlockList = ["__proto__", "profile __proto__"];
|
|
144370
144503
|
var parseIni = (iniData) => {
|
|
@@ -144419,11 +144552,11 @@ var require_dist_cjs33 = __commonJS({
|
|
|
144419
144552
|
const relativeHomeDirPrefix = "~/";
|
|
144420
144553
|
let resolvedFilepath = filepath;
|
|
144421
144554
|
if (filepath.startsWith(relativeHomeDirPrefix)) {
|
|
144422
|
-
resolvedFilepath =
|
|
144555
|
+
resolvedFilepath = path27.join(homeDir, filepath.slice(2));
|
|
144423
144556
|
}
|
|
144424
144557
|
let resolvedConfigFilepath = configFilepath;
|
|
144425
144558
|
if (configFilepath.startsWith(relativeHomeDirPrefix)) {
|
|
144426
|
-
resolvedConfigFilepath =
|
|
144559
|
+
resolvedConfigFilepath = path27.join(homeDir, configFilepath.slice(2));
|
|
144427
144560
|
}
|
|
144428
144561
|
const parsedFiles = await Promise.all([
|
|
144429
144562
|
readFile4.readFile(resolvedConfigFilepath, {
|
|
@@ -144462,8 +144595,8 @@ var require_dist_cjs33 = __commonJS({
|
|
|
144462
144595
|
getFileRecord() {
|
|
144463
144596
|
return readFile4.fileIntercept;
|
|
144464
144597
|
},
|
|
144465
|
-
interceptFile(
|
|
144466
|
-
readFile4.fileIntercept[
|
|
144598
|
+
interceptFile(path28, contents) {
|
|
144599
|
+
readFile4.fileIntercept[path28] = Promise.resolve(contents);
|
|
144467
144600
|
},
|
|
144468
144601
|
getTokenRecord() {
|
|
144469
144602
|
return getSSOTokenFromFile.tokenIntercept;
|
|
@@ -144705,8 +144838,8 @@ var require_dist_cjs35 = __commonJS({
|
|
|
144705
144838
|
return endpoint2.url.href;
|
|
144706
144839
|
}
|
|
144707
144840
|
if ("hostname" in endpoint2) {
|
|
144708
|
-
const { protocol, hostname: hostname3, port, path:
|
|
144709
|
-
return `${protocol}//${hostname3}${port ? ":" + port : ""}${
|
|
144841
|
+
const { protocol, hostname: hostname3, port, path: path27 } = endpoint2;
|
|
144842
|
+
return `${protocol}//${hostname3}${port ? ":" + port : ""}${path27}`;
|
|
144710
144843
|
}
|
|
144711
144844
|
}
|
|
144712
144845
|
return endpoint2;
|
|
@@ -159842,12 +159975,12 @@ var require_dist_cjs63 = __commonJS({
|
|
|
159842
159975
|
// src/utils/awsLambdaLayerManager.ts
|
|
159843
159976
|
async function getRegionsFromAws() {
|
|
159844
159977
|
logger.debug("Fetching AWS regions...");
|
|
159845
|
-
const { hostname: hostname3, path:
|
|
159978
|
+
const { hostname: hostname3, path: path27, headers } = import_aws4.default.sign({
|
|
159846
159979
|
service: "ec2",
|
|
159847
159980
|
region: "us-east-2",
|
|
159848
159981
|
path: "/?Action=DescribeRegions&Version=2013-10-15"
|
|
159849
159982
|
});
|
|
159850
|
-
const url2 = `https://${hostname3}${
|
|
159983
|
+
const url2 = `https://${hostname3}${path27}`;
|
|
159851
159984
|
const response = await (0, import_node_fetch4.default)(url2, { headers });
|
|
159852
159985
|
if (!response.ok) {
|
|
159853
159986
|
throw new Error(
|
|
@@ -159966,12 +160099,12 @@ var init_awsLambdaLayerManager = __esm({
|
|
|
159966
160099
|
});
|
|
159967
160100
|
|
|
159968
160101
|
// src/targets/awsLambdaLayer.ts
|
|
159969
|
-
var fs23,
|
|
160102
|
+
var fs23, path24, AwsLambdaLayerTarget;
|
|
159970
160103
|
var init_awsLambdaLayer = __esm({
|
|
159971
160104
|
"src/targets/awsLambdaLayer.ts"() {
|
|
159972
160105
|
init_import_meta_url();
|
|
159973
160106
|
fs23 = __toESM(require("fs"));
|
|
159974
|
-
|
|
160107
|
+
path24 = __toESM(require("path"));
|
|
159975
160108
|
init_githubApi();
|
|
159976
160109
|
init_base5();
|
|
159977
160110
|
init_errors2();
|
|
@@ -160163,7 +160296,7 @@ v${version2} for ${runtimeNames}`
|
|
|
160163
160296
|
*/
|
|
160164
160297
|
createVersionSymlinks(directory, version2, versionFilepath) {
|
|
160165
160298
|
this.logger.debug("Creating symlinks...");
|
|
160166
|
-
const latestVersionPath =
|
|
160299
|
+
const latestVersionPath = path24.posix.join(directory, "latest.json");
|
|
160167
160300
|
if (fs23.existsSync(latestVersionPath)) {
|
|
160168
160301
|
const previousVersion = fs23.readlinkSync(latestVersionPath).split(".json")[0];
|
|
160169
160302
|
createSymlinks(versionFilepath, version2, previousVersion);
|
|
@@ -160212,7 +160345,7 @@ v${version2} for ${runtimeNames}`
|
|
|
160212
160345
|
`${runtime.name}: ${publishedLayers.length} layers published.`
|
|
160213
160346
|
);
|
|
160214
160347
|
}
|
|
160215
|
-
const runtimeBaseDir =
|
|
160348
|
+
const runtimeBaseDir = path24.posix.join(
|
|
160216
160349
|
directory,
|
|
160217
160350
|
this.AWS_REGISTRY_DIR,
|
|
160218
160351
|
runtime.name
|
|
@@ -160236,11 +160369,11 @@ v${version2} for ${runtimeNames}`
|
|
|
160236
160369
|
layer_name: resolvedLayerName,
|
|
160237
160370
|
regions: regionsVersions
|
|
160238
160371
|
};
|
|
160239
|
-
const baseFilepath =
|
|
160372
|
+
const baseFilepath = path24.posix.join(
|
|
160240
160373
|
runtimeBaseDir,
|
|
160241
160374
|
this.BASE_FILENAME
|
|
160242
160375
|
);
|
|
160243
|
-
const newVersionFilepath =
|
|
160376
|
+
const newVersionFilepath = path24.posix.join(
|
|
160244
160377
|
runtimeBaseDir,
|
|
160245
160378
|
`${version2}.json`
|
|
160246
160379
|
);
|
|
@@ -160415,18 +160548,18 @@ var require_nvar = __commonJS({
|
|
|
160415
160548
|
const pathExplicitlySpecified = !!(opts || {}).path;
|
|
160416
160549
|
let {
|
|
160417
160550
|
// Destructure opts while stating defaults.
|
|
160418
|
-
path:
|
|
160551
|
+
path: path27 = ".env",
|
|
160419
160552
|
source = null,
|
|
160420
160553
|
target = process.env,
|
|
160421
160554
|
enoent = pathExplicitlySpecified ? "error" : "warn",
|
|
160422
160555
|
override = "all"
|
|
160423
160556
|
} = opts || {};
|
|
160424
160557
|
try {
|
|
160425
|
-
if (!source) source = require("fs").readFileSync(
|
|
160558
|
+
if (!source) source = require("fs").readFileSync(path27, "utf8");
|
|
160426
160559
|
} catch (e4) {
|
|
160427
160560
|
if (e4.code === "ENOENT") {
|
|
160428
160561
|
if (!enoent) return;
|
|
160429
|
-
if (enoent === "warn") return console.error(`nvar did not assign any values, as it could not locate ${
|
|
160562
|
+
if (enoent === "warn") return console.error(`nvar did not assign any values, as it could not locate ${path27}.`);
|
|
160430
160563
|
}
|
|
160431
160564
|
throw e4;
|
|
160432
160565
|
}
|
|
@@ -160593,13 +160726,13 @@ var require_nvar_es5 = __commonJS({
|
|
|
160593
160726
|
function nvar2(opts) {
|
|
160594
160727
|
if (typeof opts === "string") opts = { path: opts };
|
|
160595
160728
|
var pathExplicitlySpecified = !!(opts || {}).path;
|
|
160596
|
-
var _ref = opts || {}, _ref$path = _ref.path,
|
|
160729
|
+
var _ref = opts || {}, _ref$path = _ref.path, path27 = _ref$path === void 0 ? ".env" : _ref$path, _ref$source = _ref.source, source = _ref$source === void 0 ? null : _ref$source, _ref$target = _ref.target, target = _ref$target === void 0 ? process.env : _ref$target, _ref$enoent = _ref.enoent, enoent = _ref$enoent === void 0 ? pathExplicitlySpecified ? "error" : "warn" : _ref$enoent, _ref$override = _ref.override, override = _ref$override === void 0 ? "all" : _ref$override;
|
|
160597
160730
|
try {
|
|
160598
|
-
if (!source) source = require("fs").readFileSync(
|
|
160731
|
+
if (!source) source = require("fs").readFileSync(path27, "utf8");
|
|
160599
160732
|
} catch (e4) {
|
|
160600
160733
|
if (e4.code === "ENOENT") {
|
|
160601
160734
|
if (!enoent) return;
|
|
160602
|
-
if (enoent === "warn") return console.error("nvar did not assign any values, as it could not locate " +
|
|
160735
|
+
if (enoent === "warn") return console.error("nvar did not assign any values, as it could not locate " + path27 + ".");
|
|
160603
160736
|
}
|
|
160604
160737
|
throw e4;
|
|
160605
160738
|
}
|
|
@@ -160792,15 +160925,15 @@ function envHasVar(envVar) {
|
|
|
160792
160925
|
}
|
|
160793
160926
|
return true;
|
|
160794
160927
|
}
|
|
160795
|
-
function checkFileIsPrivate(
|
|
160928
|
+
function checkFileIsPrivate(path27) {
|
|
160796
160929
|
const FULL_MODE_MASK = 511;
|
|
160797
160930
|
const GROUP_MODE_MASK = 56;
|
|
160798
160931
|
const OTHER_MODE_MASK = 7;
|
|
160799
|
-
const mode = (0, import_fs19.statSync)(
|
|
160932
|
+
const mode = (0, import_fs19.statSync)(path27).mode;
|
|
160800
160933
|
if (mode & GROUP_MODE_MASK || mode & OTHER_MODE_MASK) {
|
|
160801
160934
|
const perms = (mode & FULL_MODE_MASK).toString(8);
|
|
160802
160935
|
logger.warn(
|
|
160803
|
-
`Permissions 0${perms} for file "${
|
|
160936
|
+
`Permissions 0${perms} for file "${path27}" are too open. Consider making it readable only for the user.`
|
|
160804
160937
|
);
|
|
160805
160938
|
return false;
|
|
160806
160939
|
}
|
|
@@ -160808,7 +160941,7 @@ function checkFileIsPrivate(path26) {
|
|
|
160808
160941
|
}
|
|
160809
160942
|
function readEnvironmentConfig(overwriteExisting = false) {
|
|
160810
160943
|
let newEnv = {};
|
|
160811
|
-
const homedirEnvFile = (0,
|
|
160944
|
+
const homedirEnvFile = (0, import_path16.join)(os4.homedir(), ENV_FILE_NAME);
|
|
160812
160945
|
if ((0, import_fs19.existsSync)(homedirEnvFile)) {
|
|
160813
160946
|
logger.debug(
|
|
160814
160947
|
"Found environment file in the home directory:",
|
|
@@ -160826,7 +160959,7 @@ function readEnvironmentConfig(overwriteExisting = false) {
|
|
|
160826
160959
|
);
|
|
160827
160960
|
}
|
|
160828
160961
|
const configFileDir = getConfigFileDir();
|
|
160829
|
-
const configDirEnvFile = configFileDir && (0,
|
|
160962
|
+
const configDirEnvFile = configFileDir && (0, import_path16.join)(configFileDir, ENV_FILE_NAME);
|
|
160830
160963
|
if (!configDirEnvFile) {
|
|
160831
160964
|
logger.debug("No configuration file found:", CONFIG_FILE_NAME);
|
|
160832
160965
|
} else if (configDirEnvFile && (0, import_fs19.existsSync)(configDirEnvFile)) {
|
|
@@ -160860,12 +160993,12 @@ function checkEnvForPrerequisite(...varList) {
|
|
|
160860
160993
|
);
|
|
160861
160994
|
}
|
|
160862
160995
|
}
|
|
160863
|
-
var import_fs19,
|
|
160996
|
+
var import_fs19, import_path16, import_nvar, os4, ENV_FILE_NAME;
|
|
160864
160997
|
var init_env = __esm({
|
|
160865
160998
|
"src/utils/env.ts"() {
|
|
160866
160999
|
init_import_meta_url();
|
|
160867
161000
|
import_fs19 = require("fs");
|
|
160868
|
-
|
|
161001
|
+
import_path16 = require("path");
|
|
160869
161002
|
import_nvar = __toESM(require_lib11());
|
|
160870
161003
|
init_config2();
|
|
160871
161004
|
init_errors2();
|
|
@@ -160877,29 +161010,29 @@ var init_env = __esm({
|
|
|
160877
161010
|
|
|
160878
161011
|
// src/utils/gpg.ts
|
|
160879
161012
|
async function importGPGKey(privateKey) {
|
|
160880
|
-
const PRIVATE_KEY_FILE =
|
|
161013
|
+
const PRIVATE_KEY_FILE = path25.join((0, import_os2.tmpdir)(), "private-key.asc");
|
|
160881
161014
|
await import_fs20.promises.writeFile(PRIVATE_KEY_FILE, privateKey);
|
|
160882
161015
|
await spawnProcess(`gpg`, ["--batch", "--import", PRIVATE_KEY_FILE]);
|
|
160883
161016
|
await import_fs20.promises.unlink(PRIVATE_KEY_FILE);
|
|
160884
161017
|
}
|
|
160885
|
-
var import_os2, import_fs20,
|
|
161018
|
+
var import_os2, import_fs20, path25;
|
|
160886
161019
|
var init_gpg = __esm({
|
|
160887
161020
|
"src/utils/gpg.ts"() {
|
|
160888
161021
|
init_import_meta_url();
|
|
160889
161022
|
import_os2 = require("os");
|
|
160890
161023
|
import_fs20 = require("fs");
|
|
160891
|
-
|
|
161024
|
+
path25 = __toESM(require("path"));
|
|
160892
161025
|
init_system();
|
|
160893
161026
|
}
|
|
160894
161027
|
});
|
|
160895
161028
|
|
|
160896
161029
|
// src/targets/maven.ts
|
|
160897
|
-
var
|
|
161030
|
+
var import_path17, import_fs21, import_node_fetch5, POM_DEFAULT_FILENAME, POM_FILE_EXT, BOM_FILE_KEY_REGEXP, NEXUS_API_BASE_URL, CENTRAL_API_BASE_URL, NEXUS_RETRY_DELAY, SONATYPE_RETRY_DEADLINE, CENTRAL_RETRY_DELAY, targetSecrets, targetOptions, MavenTarget;
|
|
160898
161031
|
var init_maven = __esm({
|
|
160899
161032
|
"src/targets/maven.ts"() {
|
|
160900
161033
|
init_import_meta_url();
|
|
160901
161034
|
init_base5();
|
|
160902
|
-
|
|
161035
|
+
import_path17 = require("path");
|
|
160903
161036
|
import_fs21 = require("fs");
|
|
160904
161037
|
import_node_fetch5 = __toESM(require_lib9());
|
|
160905
161038
|
init_system();
|
|
@@ -161093,8 +161226,8 @@ var init_maven = __esm({
|
|
|
161093
161226
|
this.logger.debug(`Extracting ${artifact.filename}: `, downloadedPkgPath);
|
|
161094
161227
|
await withTempDir(async (dir) => {
|
|
161095
161228
|
await extractZipArchive(downloadedPkgPath, dir);
|
|
161096
|
-
const pkgName = (0,
|
|
161097
|
-
const distDir = (0,
|
|
161229
|
+
const pkgName = (0, import_path17.basename)(artifact.filename, ".zip");
|
|
161230
|
+
const distDir = (0, import_path17.join)(dir, pkgName);
|
|
161098
161231
|
await this.uploadDistribution(distDir);
|
|
161099
161232
|
});
|
|
161100
161233
|
}
|
|
@@ -161123,12 +161256,12 @@ var init_maven = __esm({
|
|
|
161123
161256
|
* `undefined` if there isn't any.
|
|
161124
161257
|
*/
|
|
161125
161258
|
async getBomFileInDist(distDir) {
|
|
161126
|
-
const pomFilepath = (0,
|
|
161259
|
+
const pomFilepath = (0, import_path17.join)(distDir, POM_DEFAULT_FILENAME);
|
|
161127
161260
|
if (await this.isBomFile(pomFilepath)) {
|
|
161128
161261
|
return pomFilepath;
|
|
161129
161262
|
}
|
|
161130
161263
|
const filesInDir = await import_fs21.promises.readdir(distDir);
|
|
161131
|
-
const potentialPoms = filesInDir.filter((f4) => f4 !== POM_DEFAULT_FILENAME && (0,
|
|
161264
|
+
const potentialPoms = filesInDir.filter((f4) => f4 !== POM_DEFAULT_FILENAME && (0, import_path17.extname)(f4) === POM_FILE_EXT).map((f4) => (0, import_path17.join)(distDir, f4));
|
|
161132
161265
|
return potentialPoms.find((f4) => this.isBomFile(f4));
|
|
161133
161266
|
}
|
|
161134
161267
|
/**
|
|
@@ -161170,7 +161303,7 @@ Error:
|
|
|
161170
161303
|
}
|
|
161171
161304
|
async uploadKmpPomDistribution(distDir) {
|
|
161172
161305
|
if (this.mavenConfig.kmp !== false) {
|
|
161173
|
-
const moduleName = (0,
|
|
161306
|
+
const moduleName = (0, import_path17.parse)(distDir).base;
|
|
161174
161307
|
const isRootDistDir = this.mavenConfig.kmp.rootDistDirRegex.test(moduleName);
|
|
161175
161308
|
const isAppleDistDir = this.mavenConfig.kmp.appleDistDirRegex.test(moduleName);
|
|
161176
161309
|
const isKlibDistDir = this.mavenConfig.kmp.klibDistDirRegex.test(moduleName);
|
|
@@ -161281,7 +161414,7 @@ Error:
|
|
|
161281
161414
|
* within the distribution directory.
|
|
161282
161415
|
*/
|
|
161283
161416
|
async getPomFileInDist(distDir) {
|
|
161284
|
-
const pomFilepath = (0,
|
|
161417
|
+
const pomFilepath = (0, import_path17.join)(distDir, "pom-default.xml");
|
|
161285
161418
|
try {
|
|
161286
161419
|
const stat = await import_fs21.promises.stat(pomFilepath);
|
|
161287
161420
|
if (stat.isFile()) {
|
|
@@ -161313,7 +161446,7 @@ Error:
|
|
|
161313
161446
|
* making it fit for mvn publishing.
|
|
161314
161447
|
*/
|
|
161315
161448
|
async fixModuleFileName(distDir, moduleFile) {
|
|
161316
|
-
const fallbackFile = (0,
|
|
161449
|
+
const fallbackFile = (0, import_path17.join)(distDir, "module.json");
|
|
161317
161450
|
if (!await this.fileExists(moduleFile) && await this.fileExists(fallbackFile)) {
|
|
161318
161451
|
await import_fs21.promises.rename(fallbackFile, moduleFile);
|
|
161319
161452
|
}
|
|
@@ -161348,13 +161481,13 @@ Error:
|
|
|
161348
161481
|
* @returns record of required files.
|
|
161349
161482
|
*/
|
|
161350
161483
|
getFilesForMavenPomDist(distDir) {
|
|
161351
|
-
const moduleName = (0,
|
|
161484
|
+
const moduleName = (0, import_path17.parse)(distDir).base;
|
|
161352
161485
|
return {
|
|
161353
|
-
targetFile: (0,
|
|
161354
|
-
javadocFile: (0,
|
|
161355
|
-
sourcesFile: (0,
|
|
161356
|
-
pomFile: (0,
|
|
161357
|
-
moduleFile: (0,
|
|
161486
|
+
targetFile: (0, import_path17.join)(distDir, this.getTargetFilename(distDir)),
|
|
161487
|
+
javadocFile: (0, import_path17.join)(distDir, `${moduleName}-javadoc.jar`),
|
|
161488
|
+
sourcesFile: (0, import_path17.join)(distDir, `${moduleName}-sources.jar`),
|
|
161489
|
+
pomFile: (0, import_path17.join)(distDir, "pom-default.xml"),
|
|
161490
|
+
moduleFile: (0, import_path17.join)(distDir, `${moduleName}.module`)
|
|
161358
161491
|
};
|
|
161359
161492
|
}
|
|
161360
161493
|
/**
|
|
@@ -161367,24 +161500,24 @@ Error:
|
|
|
161367
161500
|
async getFilesForKmpMavenPomDist(distDir) {
|
|
161368
161501
|
const files = this.getFilesForMavenPomDist(distDir);
|
|
161369
161502
|
await this.fixModuleFileName(distDir, files.moduleFile);
|
|
161370
|
-
const moduleName = (0,
|
|
161503
|
+
const moduleName = (0, import_path17.parse)(distDir).base;
|
|
161371
161504
|
if (this.mavenConfig.kmp !== false) {
|
|
161372
161505
|
const { klibDistDirRegex, appleDistDirRegex, rootDistDirRegex } = this.mavenConfig.kmp;
|
|
161373
161506
|
const isRootDistDir = rootDistDirRegex.test(moduleName);
|
|
161374
161507
|
const isAppleDistDir = appleDistDirRegex.test(moduleName);
|
|
161375
161508
|
const isKlibDistDir = klibDistDirRegex.test(moduleName);
|
|
161376
161509
|
if (isRootDistDir) {
|
|
161377
|
-
files["allFile"] = (0,
|
|
161378
|
-
files["kotlinToolingMetadataFile"] = (0,
|
|
161510
|
+
files["allFile"] = (0, import_path17.join)(distDir, `${moduleName}-all.jar`);
|
|
161511
|
+
files["kotlinToolingMetadataFile"] = (0, import_path17.join)(
|
|
161379
161512
|
distDir,
|
|
161380
161513
|
`${moduleName}-kotlin-tooling-metadata.json`
|
|
161381
161514
|
);
|
|
161382
161515
|
} else if (isAppleDistDir) {
|
|
161383
|
-
files["metadataFile"] = (0,
|
|
161384
|
-
const cinteropFiles = (await import_fs21.promises.readdir(distDir)).filter((file) => file.includes("cinterop")).map((file) => (0,
|
|
161516
|
+
files["metadataFile"] = (0, import_path17.join)(distDir, `${moduleName}-metadata.jar`);
|
|
161517
|
+
const cinteropFiles = (await import_fs21.promises.readdir(distDir)).filter((file) => file.includes("cinterop")).map((file) => (0, import_path17.join)(distDir, file));
|
|
161385
161518
|
files["klibFiles"] = cinteropFiles;
|
|
161386
161519
|
} else if (isKlibDistDir) {
|
|
161387
|
-
files["klibFiles"] = [(0,
|
|
161520
|
+
files["klibFiles"] = [(0, import_path17.join)(distDir, `${moduleName}.klib`)];
|
|
161388
161521
|
}
|
|
161389
161522
|
}
|
|
161390
161523
|
return files;
|
|
@@ -161404,7 +161537,7 @@ Error:
|
|
|
161404
161537
|
* @returns the target file name.
|
|
161405
161538
|
*/
|
|
161406
161539
|
getTargetFilename(distDir) {
|
|
161407
|
-
const moduleName = (0,
|
|
161540
|
+
const moduleName = (0, import_path17.parse)(distDir).base;
|
|
161408
161541
|
if (this.mavenConfig.android !== false) {
|
|
161409
161542
|
const isAndroidDistDir = this.mavenConfig.android.distDirRegex.test(moduleName);
|
|
161410
161543
|
if (isAndroidDistDir) {
|
|
@@ -161564,7 +161697,7 @@ Error:
|
|
|
161564
161697
|
});
|
|
161565
161698
|
|
|
161566
161699
|
// src/targets/symbolCollector.ts
|
|
161567
|
-
var import_fs22,
|
|
161700
|
+
var import_fs22, import_path18, DEFAULT_SYM_COLLECTOR_SERVER_ENDPOINT, SYM_COLLECTOR_BIN_NAME, SymbolCollector;
|
|
161568
161701
|
var init_symbolCollector = __esm({
|
|
161569
161702
|
"src/targets/symbolCollector.ts"() {
|
|
161570
161703
|
init_import_meta_url();
|
|
@@ -161573,7 +161706,7 @@ var init_symbolCollector = __esm({
|
|
|
161573
161706
|
init_files();
|
|
161574
161707
|
import_fs22 = require("fs");
|
|
161575
161708
|
init_system();
|
|
161576
|
-
|
|
161709
|
+
import_path18 = require("path");
|
|
161577
161710
|
DEFAULT_SYM_COLLECTOR_SERVER_ENDPOINT = "https://symbol-collector.services.sentry.io/";
|
|
161578
161711
|
SYM_COLLECTOR_BIN_NAME = "SymbolCollector.Console";
|
|
161579
161712
|
SymbolCollector = class extends BaseTarget {
|
|
@@ -161619,7 +161752,7 @@ var init_symbolCollector = __esm({
|
|
|
161619
161752
|
this.logger.debug("Downloading artifacts...");
|
|
161620
161753
|
await Promise.all(
|
|
161621
161754
|
artifacts.map(async (artifact, index) => {
|
|
161622
|
-
const subdirPath = (0,
|
|
161755
|
+
const subdirPath = (0, import_path18.join)(dir, String(index));
|
|
161623
161756
|
await import_fs22.promises.mkdir(subdirPath);
|
|
161624
161757
|
await this.artifactProvider.downloadArtifact(artifact, subdirPath);
|
|
161625
161758
|
})
|
|
@@ -161650,13 +161783,13 @@ var init_symbolCollector = __esm({
|
|
|
161650
161783
|
});
|
|
161651
161784
|
|
|
161652
161785
|
// src/targets/pubDev.ts
|
|
161653
|
-
var import_fs23, import_os3,
|
|
161786
|
+
var import_fs23, import_os3, import_path19, targetSecrets2, PubDevTarget;
|
|
161654
161787
|
var init_pubDev = __esm({
|
|
161655
161788
|
"src/targets/pubDev.ts"() {
|
|
161656
161789
|
init_import_meta_url();
|
|
161657
161790
|
import_fs23 = require("fs");
|
|
161658
161791
|
import_os3 = require("os");
|
|
161659
|
-
|
|
161792
|
+
import_path19 = require("path");
|
|
161660
161793
|
init_js_yaml();
|
|
161661
161794
|
init_git();
|
|
161662
161795
|
init_base5();
|
|
@@ -161687,7 +161820,7 @@ var init_pubDev = __esm({
|
|
|
161687
161820
|
* @throws Error if file cannot be updated
|
|
161688
161821
|
*/
|
|
161689
161822
|
static async bumpVersion(rootDir, newVersion) {
|
|
161690
|
-
const pubspecPath = (0,
|
|
161823
|
+
const pubspecPath = (0, import_path19.join)(rootDir, "pubspec.yaml");
|
|
161691
161824
|
if (!(0, import_fs23.existsSync)(pubspecPath)) {
|
|
161692
161825
|
return false;
|
|
161693
161826
|
}
|
|
@@ -161789,7 +161922,7 @@ var init_pubDev = __esm({
|
|
|
161789
161922
|
await import_fs23.promises.access(credentialsFilePath, import_fs23.constants.F_OK);
|
|
161790
161923
|
this.logger.warn("Credentials file already exists. Skipping creation.");
|
|
161791
161924
|
} catch {
|
|
161792
|
-
await import_fs23.promises.mkdir((0,
|
|
161925
|
+
await import_fs23.promises.mkdir((0, import_path19.dirname)(credentialsFilePath), { recursive: true });
|
|
161793
161926
|
await import_fs23.promises.writeFile(credentialsFilePath, JSON.stringify(content));
|
|
161794
161927
|
this.logger.info("Credentials file created.");
|
|
161795
161928
|
}
|
|
@@ -161849,7 +161982,7 @@ var init_pubDev = __esm({
|
|
|
161849
161982
|
this.pubDevConfig.dartCliPath,
|
|
161850
161983
|
args,
|
|
161851
161984
|
{
|
|
161852
|
-
cwd: (0,
|
|
161985
|
+
cwd: (0, import_path19.join)(directory, pkg)
|
|
161853
161986
|
},
|
|
161854
161987
|
// Dart stops the process and asks user to go to provided url for authorization.
|
|
161855
161988
|
// We want the stdout to be visible just in case something goes wrong, otherwise
|
|
@@ -161861,7 +161994,7 @@ var init_pubDev = __esm({
|
|
|
161861
161994
|
);
|
|
161862
161995
|
}
|
|
161863
161996
|
async removeDependencyOverrides(directory, pkg) {
|
|
161864
|
-
const pubSpecPath = (0,
|
|
161997
|
+
const pubSpecPath = (0, import_path19.join)(directory, pkg, "pubspec.yaml");
|
|
161865
161998
|
const pubSpecContent = await import_fs23.promises.readFile(pubSpecPath, "utf8");
|
|
161866
161999
|
const pubSpecYaml = load(pubSpecContent);
|
|
161867
162000
|
delete pubSpecYaml.dependency_overrides;
|
|
@@ -161872,12 +162005,12 @@ var init_pubDev = __esm({
|
|
|
161872
162005
|
});
|
|
161873
162006
|
|
|
161874
162007
|
// src/targets/hex.ts
|
|
161875
|
-
var import_fs24,
|
|
162008
|
+
var import_fs24, import_path20, DEFAULT_MIX_BIN, MIX_BIN, HexTarget;
|
|
161876
162009
|
var init_hex = __esm({
|
|
161877
162010
|
"src/targets/hex.ts"() {
|
|
161878
162011
|
init_import_meta_url();
|
|
161879
162012
|
import_fs24 = require("fs");
|
|
161880
|
-
|
|
162013
|
+
import_path20 = require("path");
|
|
161881
162014
|
init_git();
|
|
161882
162015
|
init_base5();
|
|
161883
162016
|
init_files();
|
|
@@ -161900,7 +162033,7 @@ var init_hex = __esm({
|
|
|
161900
162033
|
* @throws Error if file cannot be updated
|
|
161901
162034
|
*/
|
|
161902
162035
|
static async bumpVersion(rootDir, newVersion) {
|
|
161903
|
-
const mixExsPath = (0,
|
|
162036
|
+
const mixExsPath = (0, import_path20.join)(rootDir, "mix.exs");
|
|
161904
162037
|
if (!(0, import_fs24.existsSync)(mixExsPath)) {
|
|
161905
162038
|
return false;
|
|
161906
162039
|
}
|
|
@@ -162149,11 +162282,11 @@ var init_commitOnGitRepository = __esm({
|
|
|
162149
162282
|
});
|
|
162150
162283
|
|
|
162151
162284
|
// src/targets/powershell.ts
|
|
162152
|
-
var
|
|
162285
|
+
var import_path21, POWERSHELL_BIN, DEFAULT_POWERSHELL_REPOSITORY, PowerShellTarget;
|
|
162153
162286
|
var init_powershell = __esm({
|
|
162154
162287
|
"src/targets/powershell.ts"() {
|
|
162155
162288
|
init_import_meta_url();
|
|
162156
|
-
|
|
162289
|
+
import_path21 = require("path");
|
|
162157
162290
|
init_errors2();
|
|
162158
162291
|
init_files();
|
|
162159
162292
|
init_helpers();
|
|
@@ -162259,7 +162392,7 @@ var init_powershell = __esm({
|
|
|
162259
162392
|
const zipPath = await this.artifactProvider.downloadArtifact(artifact);
|
|
162260
162393
|
this.logger.info(`Extracting artifact "${artifact.filename}"`);
|
|
162261
162394
|
await withTempDir(async (dir) => {
|
|
162262
|
-
const moduleDir = (0,
|
|
162395
|
+
const moduleDir = (0, import_path21.join)(dir, this.psConfig.module);
|
|
162263
162396
|
await extractZipArchive(zipPath, moduleDir);
|
|
162264
162397
|
await this.publishModule(moduleDir);
|
|
162265
162398
|
});
|
|
@@ -162360,12 +162493,12 @@ function findConfigFile() {
|
|
|
162360
162493
|
let depth = 0;
|
|
162361
162494
|
let currentDir = cwd;
|
|
162362
162495
|
while (depth <= MAX_DEPTH) {
|
|
162363
|
-
const probePath =
|
|
162496
|
+
const probePath = import_path22.default.join(currentDir, CONFIG_FILE_NAME);
|
|
162364
162497
|
if ((0, import_fs25.existsSync)(probePath) && (0, import_fs25.lstatSync)(probePath).isFile()) {
|
|
162365
162498
|
_configPathCache = probePath;
|
|
162366
162499
|
return _configPathCache;
|
|
162367
162500
|
}
|
|
162368
|
-
const parentDir =
|
|
162501
|
+
const parentDir = import_path22.default.dirname(currentDir);
|
|
162369
162502
|
if (currentDir === parentDir) {
|
|
162370
162503
|
return void 0;
|
|
162371
162504
|
}
|
|
@@ -162389,7 +162522,7 @@ function getConfigFileDir() {
|
|
|
162389
162522
|
if (!configFilePath2) {
|
|
162390
162523
|
return void 0;
|
|
162391
162524
|
}
|
|
162392
|
-
return
|
|
162525
|
+
return import_path22.default.dirname(configFilePath2);
|
|
162393
162526
|
}
|
|
162394
162527
|
function validateConfiguration(rawConfig) {
|
|
162395
162528
|
logger.debug("Parsing and validating the configuration file...");
|
|
@@ -162633,12 +162766,12 @@ async function expandWorkspaceTargets(targets) {
|
|
|
162633
162766
|
}
|
|
162634
162767
|
return expandedTargets;
|
|
162635
162768
|
}
|
|
162636
|
-
var import_fs25,
|
|
162769
|
+
var import_fs25, import_path22, import_git_url_parse, CONFIG_FILE_NAME, DEFAULT_RELEASE_BRANCH_NAME, _configPathCache, _configCache, AUTO_VERSION_MIN_VERSION, _globalGitHubConfigCache, DEFAULT_CHANGELOG_FILE_PATH;
|
|
162637
162770
|
var init_config2 = __esm({
|
|
162638
162771
|
"src/config.ts"() {
|
|
162639
162772
|
init_import_meta_url();
|
|
162640
162773
|
import_fs25 = require("fs");
|
|
162641
|
-
|
|
162774
|
+
import_path22 = __toESM(require("path"));
|
|
162642
162775
|
init_js_yaml();
|
|
162643
162776
|
import_git_url_parse = __toESM(require_lib5());
|
|
162644
162777
|
init_git();
|
|
@@ -162664,7 +162797,7 @@ var require_package6 = __commonJS({
|
|
|
162664
162797
|
"package.json"(exports2, module2) {
|
|
162665
162798
|
module2.exports = {
|
|
162666
162799
|
name: "@sentry/craft",
|
|
162667
|
-
version: "2.21.
|
|
162800
|
+
version: "2.21.6",
|
|
162668
162801
|
description: "The universal sentry workflow CLI",
|
|
162669
162802
|
main: "dist/craft",
|
|
162670
162803
|
repository: "https://github.com/getsentry/craft",
|
|
@@ -162834,7 +162967,7 @@ function getPackage() {
|
|
|
162834
162967
|
}
|
|
162835
162968
|
function getPackageVersion() {
|
|
162836
162969
|
const { version: version2 } = getPackage();
|
|
162837
|
-
const buildInfo = "
|
|
162970
|
+
const buildInfo = "ba4115c4f37e5e82d57e7a59256568d0418ac725";
|
|
162838
162971
|
return buildInfo ? `${version2} (${buildInfo})` : version2;
|
|
162839
162972
|
}
|
|
162840
162973
|
function semVerToString(s4) {
|
|
@@ -165117,28 +165250,28 @@ var require_path_arg = __commonJS({
|
|
|
165117
165250
|
init_import_meta_url();
|
|
165118
165251
|
var platform8 = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform;
|
|
165119
165252
|
var { resolve: resolve7, parse: parse8 } = require("path");
|
|
165120
|
-
var pathArg = (
|
|
165121
|
-
if (/\0/.test(
|
|
165253
|
+
var pathArg = (path27) => {
|
|
165254
|
+
if (/\0/.test(path27)) {
|
|
165122
165255
|
throw Object.assign(
|
|
165123
165256
|
new TypeError("path must be a string without null bytes"),
|
|
165124
165257
|
{
|
|
165125
|
-
path:
|
|
165258
|
+
path: path27,
|
|
165126
165259
|
code: "ERR_INVALID_ARG_VALUE"
|
|
165127
165260
|
}
|
|
165128
165261
|
);
|
|
165129
165262
|
}
|
|
165130
|
-
|
|
165263
|
+
path27 = resolve7(path27);
|
|
165131
165264
|
if (platform8 === "win32") {
|
|
165132
165265
|
const badWinChars = /[*|"<>?:]/;
|
|
165133
|
-
const { root } = parse8(
|
|
165134
|
-
if (badWinChars.test(
|
|
165266
|
+
const { root } = parse8(path27);
|
|
165267
|
+
if (badWinChars.test(path27.substr(root.length))) {
|
|
165135
165268
|
throw Object.assign(new Error("Illegal characters in path."), {
|
|
165136
|
-
path:
|
|
165269
|
+
path: path27,
|
|
165137
165270
|
code: "EINVAL"
|
|
165138
165271
|
});
|
|
165139
165272
|
}
|
|
165140
165273
|
}
|
|
165141
|
-
return
|
|
165274
|
+
return path27;
|
|
165142
165275
|
};
|
|
165143
165276
|
module2.exports = pathArg;
|
|
165144
165277
|
}
|
|
@@ -165149,20 +165282,20 @@ var require_find_made = __commonJS({
|
|
|
165149
165282
|
"node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/find-made.js"(exports2, module2) {
|
|
165150
165283
|
init_import_meta_url();
|
|
165151
165284
|
var { dirname: dirname9 } = require("path");
|
|
165152
|
-
var findMade = (opts, parent,
|
|
165153
|
-
if (
|
|
165285
|
+
var findMade = (opts, parent, path27 = void 0) => {
|
|
165286
|
+
if (path27 === parent)
|
|
165154
165287
|
return Promise.resolve();
|
|
165155
165288
|
return opts.statAsync(parent).then(
|
|
165156
|
-
(st) => st.isDirectory() ?
|
|
165289
|
+
(st) => st.isDirectory() ? path27 : void 0,
|
|
165157
165290
|
// will fail later
|
|
165158
165291
|
(er) => er.code === "ENOENT" ? findMade(opts, dirname9(parent), parent) : void 0
|
|
165159
165292
|
);
|
|
165160
165293
|
};
|
|
165161
|
-
var findMadeSync = (opts, parent,
|
|
165162
|
-
if (
|
|
165294
|
+
var findMadeSync = (opts, parent, path27 = void 0) => {
|
|
165295
|
+
if (path27 === parent)
|
|
165163
165296
|
return void 0;
|
|
165164
165297
|
try {
|
|
165165
|
-
return opts.statSync(parent).isDirectory() ?
|
|
165298
|
+
return opts.statSync(parent).isDirectory() ? path27 : void 0;
|
|
165166
165299
|
} catch (er) {
|
|
165167
165300
|
return er.code === "ENOENT" ? findMadeSync(opts, dirname9(parent), parent) : void 0;
|
|
165168
165301
|
}
|
|
@@ -165176,21 +165309,21 @@ var require_mkdirp_manual = __commonJS({
|
|
|
165176
165309
|
"node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/mkdirp-manual.js"(exports2, module2) {
|
|
165177
165310
|
init_import_meta_url();
|
|
165178
165311
|
var { dirname: dirname9 } = require("path");
|
|
165179
|
-
var mkdirpManual = (
|
|
165312
|
+
var mkdirpManual = (path27, opts, made) => {
|
|
165180
165313
|
opts.recursive = false;
|
|
165181
|
-
const parent = dirname9(
|
|
165182
|
-
if (parent ===
|
|
165183
|
-
return opts.mkdirAsync(
|
|
165314
|
+
const parent = dirname9(path27);
|
|
165315
|
+
if (parent === path27) {
|
|
165316
|
+
return opts.mkdirAsync(path27, opts).catch((er) => {
|
|
165184
165317
|
if (er.code !== "EISDIR")
|
|
165185
165318
|
throw er;
|
|
165186
165319
|
});
|
|
165187
165320
|
}
|
|
165188
|
-
return opts.mkdirAsync(
|
|
165321
|
+
return opts.mkdirAsync(path27, opts).then(() => made || path27, (er) => {
|
|
165189
165322
|
if (er.code === "ENOENT")
|
|
165190
|
-
return mkdirpManual(parent, opts).then((made2) => mkdirpManual(
|
|
165323
|
+
return mkdirpManual(parent, opts).then((made2) => mkdirpManual(path27, opts, made2));
|
|
165191
165324
|
if (er.code !== "EEXIST" && er.code !== "EROFS")
|
|
165192
165325
|
throw er;
|
|
165193
|
-
return opts.statAsync(
|
|
165326
|
+
return opts.statAsync(path27).then((st) => {
|
|
165194
165327
|
if (st.isDirectory())
|
|
165195
165328
|
return made;
|
|
165196
165329
|
else
|
|
@@ -165200,12 +165333,12 @@ var require_mkdirp_manual = __commonJS({
|
|
|
165200
165333
|
});
|
|
165201
165334
|
});
|
|
165202
165335
|
};
|
|
165203
|
-
var mkdirpManualSync = (
|
|
165204
|
-
const parent = dirname9(
|
|
165336
|
+
var mkdirpManualSync = (path27, opts, made) => {
|
|
165337
|
+
const parent = dirname9(path27);
|
|
165205
165338
|
opts.recursive = false;
|
|
165206
|
-
if (parent ===
|
|
165339
|
+
if (parent === path27) {
|
|
165207
165340
|
try {
|
|
165208
|
-
return opts.mkdirSync(
|
|
165341
|
+
return opts.mkdirSync(path27, opts);
|
|
165209
165342
|
} catch (er) {
|
|
165210
165343
|
if (er.code !== "EISDIR")
|
|
165211
165344
|
throw er;
|
|
@@ -165214,15 +165347,15 @@ var require_mkdirp_manual = __commonJS({
|
|
|
165214
165347
|
}
|
|
165215
165348
|
}
|
|
165216
165349
|
try {
|
|
165217
|
-
opts.mkdirSync(
|
|
165218
|
-
return made ||
|
|
165350
|
+
opts.mkdirSync(path27, opts);
|
|
165351
|
+
return made || path27;
|
|
165219
165352
|
} catch (er) {
|
|
165220
165353
|
if (er.code === "ENOENT")
|
|
165221
|
-
return mkdirpManualSync(
|
|
165354
|
+
return mkdirpManualSync(path27, opts, mkdirpManualSync(parent, opts, made));
|
|
165222
165355
|
if (er.code !== "EEXIST" && er.code !== "EROFS")
|
|
165223
165356
|
throw er;
|
|
165224
165357
|
try {
|
|
165225
|
-
if (!opts.statSync(
|
|
165358
|
+
if (!opts.statSync(path27).isDirectory())
|
|
165226
165359
|
throw er;
|
|
165227
165360
|
} catch (_2) {
|
|
165228
165361
|
throw er;
|
|
@@ -165240,30 +165373,30 @@ var require_mkdirp_native = __commonJS({
|
|
|
165240
165373
|
var { dirname: dirname9 } = require("path");
|
|
165241
165374
|
var { findMade, findMadeSync } = require_find_made();
|
|
165242
165375
|
var { mkdirpManual, mkdirpManualSync } = require_mkdirp_manual();
|
|
165243
|
-
var mkdirpNative = (
|
|
165376
|
+
var mkdirpNative = (path27, opts) => {
|
|
165244
165377
|
opts.recursive = true;
|
|
165245
|
-
const parent = dirname9(
|
|
165246
|
-
if (parent ===
|
|
165247
|
-
return opts.mkdirAsync(
|
|
165248
|
-
return findMade(opts,
|
|
165378
|
+
const parent = dirname9(path27);
|
|
165379
|
+
if (parent === path27)
|
|
165380
|
+
return opts.mkdirAsync(path27, opts);
|
|
165381
|
+
return findMade(opts, path27).then((made) => opts.mkdirAsync(path27, opts).then(() => made).catch((er) => {
|
|
165249
165382
|
if (er.code === "ENOENT")
|
|
165250
|
-
return mkdirpManual(
|
|
165383
|
+
return mkdirpManual(path27, opts);
|
|
165251
165384
|
else
|
|
165252
165385
|
throw er;
|
|
165253
165386
|
}));
|
|
165254
165387
|
};
|
|
165255
|
-
var mkdirpNativeSync = (
|
|
165388
|
+
var mkdirpNativeSync = (path27, opts) => {
|
|
165256
165389
|
opts.recursive = true;
|
|
165257
|
-
const parent = dirname9(
|
|
165258
|
-
if (parent ===
|
|
165259
|
-
return opts.mkdirSync(
|
|
165260
|
-
const made = findMadeSync(opts,
|
|
165390
|
+
const parent = dirname9(path27);
|
|
165391
|
+
if (parent === path27)
|
|
165392
|
+
return opts.mkdirSync(path27, opts);
|
|
165393
|
+
const made = findMadeSync(opts, path27);
|
|
165261
165394
|
try {
|
|
165262
|
-
opts.mkdirSync(
|
|
165395
|
+
opts.mkdirSync(path27, opts);
|
|
165263
165396
|
return made;
|
|
165264
165397
|
} catch (er) {
|
|
165265
165398
|
if (er.code === "ENOENT")
|
|
165266
|
-
return mkdirpManualSync(
|
|
165399
|
+
return mkdirpManualSync(path27, opts);
|
|
165267
165400
|
else
|
|
165268
165401
|
throw er;
|
|
165269
165402
|
}
|
|
@@ -165295,21 +165428,21 @@ var require_mkdirp = __commonJS({
|
|
|
165295
165428
|
var { mkdirpNative, mkdirpNativeSync } = require_mkdirp_native();
|
|
165296
165429
|
var { mkdirpManual, mkdirpManualSync } = require_mkdirp_manual();
|
|
165297
165430
|
var { useNative, useNativeSync } = require_use_native();
|
|
165298
|
-
var mkdirp2 = (
|
|
165299
|
-
|
|
165431
|
+
var mkdirp2 = (path27, opts) => {
|
|
165432
|
+
path27 = pathArg(path27);
|
|
165300
165433
|
opts = optsArg(opts);
|
|
165301
|
-
return useNative(opts) ? mkdirpNative(
|
|
165434
|
+
return useNative(opts) ? mkdirpNative(path27, opts) : mkdirpManual(path27, opts);
|
|
165302
165435
|
};
|
|
165303
|
-
var mkdirpSync = (
|
|
165304
|
-
|
|
165436
|
+
var mkdirpSync = (path27, opts) => {
|
|
165437
|
+
path27 = pathArg(path27);
|
|
165305
165438
|
opts = optsArg(opts);
|
|
165306
|
-
return useNativeSync(opts) ? mkdirpNativeSync(
|
|
165439
|
+
return useNativeSync(opts) ? mkdirpNativeSync(path27, opts) : mkdirpManualSync(path27, opts);
|
|
165307
165440
|
};
|
|
165308
165441
|
mkdirp2.sync = mkdirpSync;
|
|
165309
|
-
mkdirp2.native = (
|
|
165310
|
-
mkdirp2.manual = (
|
|
165311
|
-
mkdirp2.nativeSync = (
|
|
165312
|
-
mkdirp2.manualSync = (
|
|
165442
|
+
mkdirp2.native = (path27, opts) => mkdirpNative(pathArg(path27), optsArg(opts));
|
|
165443
|
+
mkdirp2.manual = (path27, opts) => mkdirpManual(pathArg(path27), optsArg(opts));
|
|
165444
|
+
mkdirp2.nativeSync = (path27, opts) => mkdirpNativeSync(pathArg(path27), optsArg(opts));
|
|
165445
|
+
mkdirp2.manualSync = (path27, opts) => mkdirpManualSync(pathArg(path27), optsArg(opts));
|
|
165313
165446
|
module2.exports = mkdirp2;
|
|
165314
165447
|
}
|
|
165315
165448
|
});
|
|
@@ -166101,18 +166234,18 @@ function ui(opts) {
|
|
|
166101
166234
|
|
|
166102
166235
|
// node_modules/.pnpm/escalade@3.2.0/node_modules/escalade/sync/index.mjs
|
|
166103
166236
|
init_import_meta_url();
|
|
166104
|
-
var
|
|
166237
|
+
var import_path23 = require("path");
|
|
166105
166238
|
var import_fs26 = require("fs");
|
|
166106
166239
|
function sync_default(start, callback) {
|
|
166107
|
-
let dir = (0,
|
|
166240
|
+
let dir = (0, import_path23.resolve)(".", start);
|
|
166108
166241
|
let tmp2, stats = (0, import_fs26.statSync)(dir);
|
|
166109
166242
|
if (!stats.isDirectory()) {
|
|
166110
|
-
dir = (0,
|
|
166243
|
+
dir = (0, import_path23.dirname)(dir);
|
|
166111
166244
|
}
|
|
166112
166245
|
while (true) {
|
|
166113
166246
|
tmp2 = callback(dir, (0, import_fs26.readdirSync)(dir));
|
|
166114
|
-
if (tmp2) return (0,
|
|
166115
|
-
dir = (0,
|
|
166247
|
+
if (tmp2) return (0, import_path23.resolve)(dir, tmp2);
|
|
166248
|
+
dir = (0, import_path23.dirname)(tmp2 = dir);
|
|
166116
166249
|
if (tmp2 === dir) break;
|
|
166117
166250
|
}
|
|
166118
166251
|
}
|
|
@@ -166124,7 +166257,7 @@ var import_url4 = require("url");
|
|
|
166124
166257
|
// node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/index.js
|
|
166125
166258
|
init_import_meta_url();
|
|
166126
166259
|
var import_util24 = require("util");
|
|
166127
|
-
var
|
|
166260
|
+
var import_path24 = require("path");
|
|
166128
166261
|
|
|
166129
166262
|
// node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/string-utils.js
|
|
166130
166263
|
init_import_meta_url();
|
|
@@ -167089,13 +167222,13 @@ var parser4 = new YargsParser({
|
|
|
167089
167222
|
return env;
|
|
167090
167223
|
},
|
|
167091
167224
|
format: import_util24.format,
|
|
167092
|
-
normalize:
|
|
167093
|
-
resolve:
|
|
167094
|
-
require: (
|
|
167225
|
+
normalize: import_path24.normalize,
|
|
167226
|
+
resolve: import_path24.resolve,
|
|
167227
|
+
require: (path27) => {
|
|
167095
167228
|
if (typeof require2 !== "undefined") {
|
|
167096
|
-
return require2(
|
|
167097
|
-
} else if (
|
|
167098
|
-
return JSON.parse((0, import_fs27.readFileSync)(
|
|
167229
|
+
return require2(path27);
|
|
167230
|
+
} else if (path27.match(/\.json$/)) {
|
|
167231
|
+
return JSON.parse((0, import_fs27.readFileSync)(path27, "utf8"));
|
|
167099
167232
|
} else {
|
|
167100
167233
|
throw Error("only .json config files are supported in ESM");
|
|
167101
167234
|
}
|
|
@@ -167114,7 +167247,7 @@ yargsParser.looksLikeNumber = looksLikeNumber;
|
|
|
167114
167247
|
var lib_default = yargsParser;
|
|
167115
167248
|
|
|
167116
167249
|
// node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/lib/platform-shims/esm.mjs
|
|
167117
|
-
var
|
|
167250
|
+
var import_path26 = require("path");
|
|
167118
167251
|
|
|
167119
167252
|
// node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/utils/process-argv.js
|
|
167120
167253
|
init_import_meta_url();
|
|
@@ -167140,14 +167273,14 @@ init_import_meta_url();
|
|
|
167140
167273
|
init_import_meta_url();
|
|
167141
167274
|
var import_fs28 = require("fs");
|
|
167142
167275
|
var import_util25 = require("util");
|
|
167143
|
-
var
|
|
167276
|
+
var import_path25 = require("path");
|
|
167144
167277
|
var node_default = {
|
|
167145
167278
|
fs: {
|
|
167146
167279
|
readFileSync: import_fs28.readFileSync,
|
|
167147
167280
|
writeFile: import_fs28.writeFile
|
|
167148
167281
|
},
|
|
167149
167282
|
format: import_util25.format,
|
|
167150
|
-
resolve:
|
|
167283
|
+
resolve: import_path25.resolve,
|
|
167151
167284
|
exists: (file) => {
|
|
167152
167285
|
try {
|
|
167153
167286
|
return (0, import_fs28.statSync)(file).isFile();
|
|
@@ -167347,12 +167480,12 @@ var esm_default3 = {
|
|
|
167347
167480
|
mainFilename: mainFilename || process.cwd(),
|
|
167348
167481
|
Parser: lib_default,
|
|
167349
167482
|
path: {
|
|
167350
|
-
basename:
|
|
167351
|
-
dirname:
|
|
167352
|
-
extname:
|
|
167353
|
-
relative:
|
|
167354
|
-
resolve:
|
|
167355
|
-
join:
|
|
167483
|
+
basename: import_path26.basename,
|
|
167484
|
+
dirname: import_path26.dirname,
|
|
167485
|
+
extname: import_path26.extname,
|
|
167486
|
+
relative: import_path26.relative,
|
|
167487
|
+
resolve: import_path26.resolve,
|
|
167488
|
+
join: import_path26.join
|
|
167356
167489
|
},
|
|
167357
167490
|
process: {
|
|
167358
167491
|
argv: () => process.argv,
|
|
@@ -167374,7 +167507,7 @@ var esm_default3 = {
|
|
|
167374
167507
|
},
|
|
167375
167508
|
stringWidth,
|
|
167376
167509
|
y18n: y18n_default({
|
|
167377
|
-
directory: (0,
|
|
167510
|
+
directory: (0, import_path26.resolve)(__dirname2, "../../../locales"),
|
|
167378
167511
|
updateFiles: false
|
|
167379
167512
|
})
|
|
167380
167513
|
};
|
|
@@ -170746,7 +170879,7 @@ __export(prepare_exports, {
|
|
|
170746
170879
|
});
|
|
170747
170880
|
init_import_meta_url();
|
|
170748
170881
|
var import_fs30 = require("fs");
|
|
170749
|
-
var
|
|
170882
|
+
var import_path28 = require("path");
|
|
170750
170883
|
init_dryRun();
|
|
170751
170884
|
var shellQuote2 = __toESM(require_shell_quote());
|
|
170752
170885
|
init_config2();
|
|
@@ -170911,7 +171044,7 @@ init_import_meta_url();
|
|
|
170911
171044
|
var import_chalk = __toESM(require_source());
|
|
170912
171045
|
var import_fs29 = require("fs");
|
|
170913
171046
|
init_dryRun();
|
|
170914
|
-
var
|
|
171047
|
+
var import_path27 = require("path");
|
|
170915
171048
|
var import_shell_quote = __toESM(require_shell_quote());
|
|
170916
171049
|
var import_string_length = __toESM(require_string_length());
|
|
170917
171050
|
init_config2();
|
|
@@ -170927,7 +171060,7 @@ init_system();
|
|
|
170927
171060
|
init_version9();
|
|
170928
171061
|
init_git();
|
|
170929
171062
|
init_tracing3();
|
|
170930
|
-
var DEFAULT_POST_RELEASE_SCRIPT_PATH = (0,
|
|
171063
|
+
var DEFAULT_POST_RELEASE_SCRIPT_PATH = (0, import_path27.join)("scripts", "post-release.sh");
|
|
170931
171064
|
var ALLOWED_ENV_VARS = [
|
|
170932
171065
|
"HOME",
|
|
170933
171066
|
"USER",
|
|
@@ -171371,7 +171504,7 @@ var handler2 = async (args) => {
|
|
|
171371
171504
|
var command3 = ["prepare [NEW-VERSION]"];
|
|
171372
171505
|
var aliases2 = ["p", "prerelease", "prepublish", "prepare", "release"];
|
|
171373
171506
|
var description2 = "\u{1F6A2} Prepare a new release branch";
|
|
171374
|
-
var DEFAULT_BUMP_VERSION_PATH = (0,
|
|
171507
|
+
var DEFAULT_BUMP_VERSION_PATH = (0, import_path28.join)("scripts", "bump-version.sh");
|
|
171375
171508
|
var AUTO_VERSION_MIN_VERSION2 = "2.14.0";
|
|
171376
171509
|
var AUTO_BUMP_MIN_VERSION = "2.21.0";
|
|
171377
171510
|
var builder2 = (yargs) => yargs.positional("NEW-VERSION", {
|
|
@@ -171583,7 +171716,7 @@ async function prepareChangelog(git, oldVersion, newVersion, changelogPolicy = "
|
|
|
171583
171716
|
}
|
|
171584
171717
|
logger.info("Checking the changelog...");
|
|
171585
171718
|
logger.debug(`Changelog policy: "${changelogPolicy}".`);
|
|
171586
|
-
const relativePath = (0,
|
|
171719
|
+
const relativePath = (0, import_path28.relative)("", changelogPath);
|
|
171587
171720
|
logger.debug(`Changelog path: ${relativePath}`);
|
|
171588
171721
|
if (relativePath.startsWith(".")) {
|
|
171589
171722
|
throw new ConfigurationError(`Invalid changelog path: "${changelogPath}"`);
|
|
@@ -171639,6 +171772,38 @@ async function prepareChangelog(git, oldVersion, newVersion, changelogPolicy = "
|
|
|
171639
171772
|
logger.trace(changeset.body);
|
|
171640
171773
|
return changeset?.body;
|
|
171641
171774
|
}
|
|
171775
|
+
async function getChangelogLineRange(git, changelogPath, version2) {
|
|
171776
|
+
try {
|
|
171777
|
+
const content = await git.show([`HEAD:${changelogPath}`]);
|
|
171778
|
+
const lines = content.split("\n");
|
|
171779
|
+
const startIdx = lines.findIndex(
|
|
171780
|
+
(l4) => l4.trimEnd() === `## ${version2}` || l4.trimEnd() === version2
|
|
171781
|
+
);
|
|
171782
|
+
if (startIdx < 0) {
|
|
171783
|
+
return "";
|
|
171784
|
+
}
|
|
171785
|
+
let endIdx = -1;
|
|
171786
|
+
for (let i4 = startIdx + 1; i4 < lines.length; i4++) {
|
|
171787
|
+
if (/^## /.test(lines[i4])) {
|
|
171788
|
+
endIdx = i4;
|
|
171789
|
+
break;
|
|
171790
|
+
}
|
|
171791
|
+
if (i4 + 1 < lines.length && lines[i4].trim() !== "" && /^(-{3,}|={3,})\s*$/.test(lines[i4 + 1])) {
|
|
171792
|
+
endIdx = i4;
|
|
171793
|
+
break;
|
|
171794
|
+
}
|
|
171795
|
+
}
|
|
171796
|
+
if (endIdx < 0) {
|
|
171797
|
+
endIdx = lines.length;
|
|
171798
|
+
}
|
|
171799
|
+
while (endIdx > startIdx + 1 && lines[endIdx - 1].trim() === "") {
|
|
171800
|
+
endIdx--;
|
|
171801
|
+
}
|
|
171802
|
+
return `#L${startIdx + 1}-L${endIdx}`;
|
|
171803
|
+
} catch {
|
|
171804
|
+
return "";
|
|
171805
|
+
}
|
|
171806
|
+
}
|
|
171642
171807
|
async function switchToDefaultBranch(git, defaultBranch) {
|
|
171643
171808
|
const repoStatus = await git.status();
|
|
171644
171809
|
if (repoStatus.current === defaultBranch) {
|
|
@@ -171776,7 +171941,20 @@ async function prepareMain(argv) {
|
|
|
171776
171941
|
setGitHubActionsOutput("sha", releaseSha);
|
|
171777
171942
|
setGitHubActionsOutput("previous_tag", oldVersion || "");
|
|
171778
171943
|
if (changelogBody) {
|
|
171779
|
-
|
|
171944
|
+
const isCalVer = argv.newVersion === "calver" || getVersioningPolicy() === "calver" /* CalVer */;
|
|
171945
|
+
const issueChangelog = isCalVer ? disableChangelogMentions(changelogBody) : changelogBody;
|
|
171946
|
+
writeGitHubActionsFile("changelog", issueChangelog);
|
|
171947
|
+
const resolvedChangelogPath = changelogPath || DEFAULT_CHANGELOG_PATH;
|
|
171948
|
+
const lineRange = await getChangelogLineRange(
|
|
171949
|
+
git,
|
|
171950
|
+
resolvedChangelogPath,
|
|
171951
|
+
newVersion
|
|
171952
|
+
);
|
|
171953
|
+
const changelogFileUrl = `https://github.com/${githubConfig.owner}/${githubConfig.repo}/blob/${branchName}/${resolvedChangelogPath}` + lineRange;
|
|
171954
|
+
setGitHubActionsOutput(
|
|
171955
|
+
"changelog",
|
|
171956
|
+
truncateForOutput(issueChangelog, changelogFileUrl)
|
|
171957
|
+
);
|
|
171780
171958
|
}
|
|
171781
171959
|
logger.info(
|
|
171782
171960
|
`View diff at: https://github.com/${githubConfig.owner}/${githubConfig.repo}/compare/${branchName}`
|
|
@@ -171879,7 +172057,7 @@ init_import_meta_url();
|
|
|
171879
172057
|
init_logger2();
|
|
171880
172058
|
init_config2();
|
|
171881
172059
|
init_errors2();
|
|
171882
|
-
var
|
|
172060
|
+
var import_path29 = require("path");
|
|
171883
172061
|
var import_fs31 = require("fs");
|
|
171884
172062
|
init_none();
|
|
171885
172063
|
var mkdirp = require_mkdirp();
|
|
@@ -171902,7 +172080,7 @@ var builder3 = (yargs) => yargs.positional("NAME", {
|
|
|
171902
172080
|
});
|
|
171903
172081
|
async function prepareOutputDirectory(argv) {
|
|
171904
172082
|
if (argv.directory) {
|
|
171905
|
-
const fullPath = (0,
|
|
172083
|
+
const fullPath = (0, import_path29.resolve)(argv.directory);
|
|
171906
172084
|
if ((0, import_fs31.existsSync)(fullPath)) {
|
|
171907
172085
|
if ((0, import_fs31.lstatSync)(fullPath).isDirectory()) {
|
|
171908
172086
|
return fullPath;
|
|
@@ -171915,7 +172093,7 @@ async function prepareOutputDirectory(argv) {
|
|
|
171915
172093
|
return fullPath;
|
|
171916
172094
|
}
|
|
171917
172095
|
} else {
|
|
171918
|
-
return (0,
|
|
172096
|
+
return (0, import_path29.resolve)(process.cwd());
|
|
171919
172097
|
}
|
|
171920
172098
|
}
|
|
171921
172099
|
async function handlerMain(argv) {
|