@sentry/craft 2.25.5 → 2.26.1
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 +805 -566
- package/package.json +1 -1
package/dist/craft
CHANGED
|
@@ -7036,19 +7036,19 @@ var require_module_details_from_path = __commonJS({
|
|
|
7036
7036
|
basedir += segments[i4] + sep4;
|
|
7037
7037
|
}
|
|
7038
7038
|
}
|
|
7039
|
-
var
|
|
7039
|
+
var path18 = "";
|
|
7040
7040
|
var lastSegmentIndex = segments.length - 1;
|
|
7041
7041
|
for (var i22 = index + offset; i22 <= lastSegmentIndex; i22++) {
|
|
7042
7042
|
if (i22 === lastSegmentIndex) {
|
|
7043
|
-
|
|
7043
|
+
path18 += segments[i22];
|
|
7044
7044
|
} else {
|
|
7045
|
-
|
|
7045
|
+
path18 += segments[i22] + sep4;
|
|
7046
7046
|
}
|
|
7047
7047
|
}
|
|
7048
7048
|
return {
|
|
7049
7049
|
name,
|
|
7050
7050
|
basedir,
|
|
7051
|
-
path:
|
|
7051
|
+
path: path18
|
|
7052
7052
|
};
|
|
7053
7053
|
};
|
|
7054
7054
|
}
|
|
@@ -7059,7 +7059,7 @@ var require_require_in_the_middle = __commonJS({
|
|
|
7059
7059
|
"node_modules/.pnpm/require-in-the-middle@8.0.1/node_modules/require-in-the-middle/index.js"(exports2, module2) {
|
|
7060
7060
|
"use strict";
|
|
7061
7061
|
init_import_meta_url();
|
|
7062
|
-
var
|
|
7062
|
+
var path18 = require("path");
|
|
7063
7063
|
var Module = require("module");
|
|
7064
7064
|
var debug3 = require_src3()("require-in-the-middle");
|
|
7065
7065
|
var moduleDetailsFromPath = require_module_details_from_path();
|
|
@@ -7204,7 +7204,7 @@ var require_require_in_the_middle = __commonJS({
|
|
|
7204
7204
|
}
|
|
7205
7205
|
moduleName = filename;
|
|
7206
7206
|
} else if (hasWhitelist === true && modules.includes(filename)) {
|
|
7207
|
-
const parsedPath =
|
|
7207
|
+
const parsedPath = path18.parse(filename);
|
|
7208
7208
|
moduleName = parsedPath.name;
|
|
7209
7209
|
basedir = parsedPath.dir;
|
|
7210
7210
|
} else {
|
|
@@ -7242,7 +7242,7 @@ var require_require_in_the_middle = __commonJS({
|
|
|
7242
7242
|
}
|
|
7243
7243
|
if (res !== filename) {
|
|
7244
7244
|
if (internals === true) {
|
|
7245
|
-
moduleName = moduleName +
|
|
7245
|
+
moduleName = moduleName + path18.sep + path18.relative(basedir, filename);
|
|
7246
7246
|
debug3("preparing to process require of internal file: %s", moduleName);
|
|
7247
7247
|
} else {
|
|
7248
7248
|
debug3("ignoring require of non-main module file: %s", res);
|
|
@@ -7278,8 +7278,8 @@ var require_require_in_the_middle = __commonJS({
|
|
|
7278
7278
|
}
|
|
7279
7279
|
};
|
|
7280
7280
|
function resolveModuleName(stat) {
|
|
7281
|
-
const normalizedPath =
|
|
7282
|
-
return
|
|
7281
|
+
const normalizedPath = path18.sep !== "/" ? stat.path.split(path18.sep).join("/") : stat.path;
|
|
7282
|
+
return path18.posix.join(stat.name, normalizedPath).replace(normalize6, "");
|
|
7283
7283
|
}
|
|
7284
7284
|
}
|
|
7285
7285
|
});
|
|
@@ -7366,7 +7366,7 @@ var require_RequireInTheMiddleSingleton = __commonJS({
|
|
|
7366
7366
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
7367
7367
|
exports2.RequireInTheMiddleSingleton = void 0;
|
|
7368
7368
|
var require_in_the_middle_1 = require_require_in_the_middle();
|
|
7369
|
-
var
|
|
7369
|
+
var path18 = require("path");
|
|
7370
7370
|
var ModuleNameTrie_1 = require_ModuleNameTrie();
|
|
7371
7371
|
var isMocha = [
|
|
7372
7372
|
"afterEach",
|
|
@@ -7430,7 +7430,7 @@ var require_RequireInTheMiddleSingleton = __commonJS({
|
|
|
7430
7430
|
};
|
|
7431
7431
|
exports2.RequireInTheMiddleSingleton = RequireInTheMiddleSingleton;
|
|
7432
7432
|
function normalizePathSeparators(moduleNameOrPath) {
|
|
7433
|
-
return
|
|
7433
|
+
return path18.sep !== ModuleNameTrie_1.ModuleNameSeparator ? moduleNameOrPath.split(path18.sep).join(ModuleNameTrie_1.ModuleNameSeparator) : moduleNameOrPath;
|
|
7434
7434
|
}
|
|
7435
7435
|
}
|
|
7436
7436
|
});
|
|
@@ -7492,7 +7492,7 @@ var require_register = __commonJS({
|
|
|
7492
7492
|
var require_import_in_the_middle = __commonJS({
|
|
7493
7493
|
"node_modules/.pnpm/import-in-the-middle@2.0.0/node_modules/import-in-the-middle/index.js"(exports2, module2) {
|
|
7494
7494
|
init_import_meta_url();
|
|
7495
|
-
var
|
|
7495
|
+
var path18 = require("path");
|
|
7496
7496
|
var parse5 = require_module_details_from_path();
|
|
7497
7497
|
var { fileURLToPath: fileURLToPath4 } = require("url");
|
|
7498
7498
|
var { MessageChannel } = require("worker_threads");
|
|
@@ -7588,7 +7588,7 @@ var require_import_in_the_middle = __commonJS({
|
|
|
7588
7588
|
if (moduleName === name) {
|
|
7589
7589
|
if (baseDir) {
|
|
7590
7590
|
if (internals) {
|
|
7591
|
-
name = name +
|
|
7591
|
+
name = name + path18.sep + path18.relative(baseDir, fileURLToPath4(filename));
|
|
7592
7592
|
} else {
|
|
7593
7593
|
if (!getExperimentalPatchInternals() && !baseDir.endsWith(specifiers.get(filename))) continue;
|
|
7594
7594
|
}
|
|
@@ -7666,7 +7666,7 @@ var require_instrumentation2 = __commonJS({
|
|
|
7666
7666
|
init_import_meta_url();
|
|
7667
7667
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
7668
7668
|
exports2.InstrumentationBase = void 0;
|
|
7669
|
-
var
|
|
7669
|
+
var path18 = require("path");
|
|
7670
7670
|
var util_1 = require("util");
|
|
7671
7671
|
var semver_1 = require_semver();
|
|
7672
7672
|
var shimmer_1 = require_shimmer();
|
|
@@ -7764,7 +7764,7 @@ var require_instrumentation2 = __commonJS({
|
|
|
7764
7764
|
}
|
|
7765
7765
|
_extractPackageVersion(baseDir) {
|
|
7766
7766
|
try {
|
|
7767
|
-
const json2 = (0, fs_1.readFileSync)(
|
|
7767
|
+
const json2 = (0, fs_1.readFileSync)(path18.join(baseDir, "package.json"), {
|
|
7768
7768
|
encoding: "utf8"
|
|
7769
7769
|
});
|
|
7770
7770
|
const version2 = JSON.parse(json2).version;
|
|
@@ -7806,7 +7806,7 @@ var require_instrumentation2 = __commonJS({
|
|
|
7806
7806
|
return exports3;
|
|
7807
7807
|
}
|
|
7808
7808
|
const files = module3.files ?? [];
|
|
7809
|
-
const normalizedName =
|
|
7809
|
+
const normalizedName = path18.normalize(name);
|
|
7810
7810
|
const supportedFileInstrumentations = files.filter((f5) => f5.name === normalizedName).filter((f5) => isSupported(f5.supportedVersions, version2, module3.includePrerelease));
|
|
7811
7811
|
return supportedFileInstrumentations.reduce((patchedExports, file) => {
|
|
7812
7812
|
file.moduleExports = patchedExports;
|
|
@@ -7852,8 +7852,8 @@ var require_instrumentation2 = __commonJS({
|
|
|
7852
7852
|
this._warnOnPreloadedModules();
|
|
7853
7853
|
for (const module3 of this._modules) {
|
|
7854
7854
|
const hookFn = (exports3, name, baseDir) => {
|
|
7855
|
-
if (!baseDir &&
|
|
7856
|
-
const parsedPath =
|
|
7855
|
+
if (!baseDir && path18.isAbsolute(name)) {
|
|
7856
|
+
const parsedPath = path18.parse(name);
|
|
7857
7857
|
name = parsedPath.name;
|
|
7858
7858
|
baseDir = parsedPath.dir;
|
|
7859
7859
|
}
|
|
@@ -7862,7 +7862,7 @@ var require_instrumentation2 = __commonJS({
|
|
|
7862
7862
|
const onRequire = (exports3, name, baseDir) => {
|
|
7863
7863
|
return this._onRequire(module3, exports3, name, baseDir);
|
|
7864
7864
|
};
|
|
7865
|
-
const hook2 =
|
|
7865
|
+
const hook2 = path18.isAbsolute(module3.name) ? new require_in_the_middle_1.Hook([module3.name], { internals: true }, onRequire) : this._requireInTheMiddleSingleton.register(module3.name, onRequire);
|
|
7866
7866
|
this._hooks.push(hook2);
|
|
7867
7867
|
const esmHook = new import_in_the_middle_1.Hook([module3.name], { internals: false }, hookFn);
|
|
7868
7868
|
this._hooks.push(esmHook);
|
|
@@ -8329,13 +8329,13 @@ var require_utils3 = __commonJS({
|
|
|
8329
8329
|
const reqUrlObject = requestUrl || {};
|
|
8330
8330
|
const protocol = reqUrlObject.protocol || fallbackProtocol;
|
|
8331
8331
|
const port = (reqUrlObject.port || "").toString();
|
|
8332
|
-
let
|
|
8332
|
+
let path18 = reqUrlObject.path || "/";
|
|
8333
8333
|
let host = reqUrlObject.host || reqUrlObject.hostname || headers.host || "localhost";
|
|
8334
8334
|
if (host.indexOf(":") === -1 && port && port !== "80" && port !== "443") {
|
|
8335
8335
|
host += `:${port}`;
|
|
8336
8336
|
}
|
|
8337
|
-
if (
|
|
8338
|
-
const parsedUrl = url2.parse(
|
|
8337
|
+
if (path18.includes("?")) {
|
|
8338
|
+
const parsedUrl = url2.parse(path18);
|
|
8339
8339
|
const pathname = parsedUrl.pathname || "";
|
|
8340
8340
|
const query = parsedUrl.query || "";
|
|
8341
8341
|
const searchParams = new URLSearchParams(query);
|
|
@@ -8346,10 +8346,10 @@ var require_utils3 = __commonJS({
|
|
|
8346
8346
|
}
|
|
8347
8347
|
}
|
|
8348
8348
|
const redactedQuery = searchParams.toString();
|
|
8349
|
-
|
|
8349
|
+
path18 = `${pathname}?${redactedQuery}`;
|
|
8350
8350
|
}
|
|
8351
8351
|
const authPart = reqUrlObject.auth ? `${internal_types_2.STR_REDACTED}:${internal_types_2.STR_REDACTED}@` : "";
|
|
8352
|
-
return `${protocol}//${authPart}${host}${
|
|
8352
|
+
return `${protocol}//${authPart}${host}${path18}`;
|
|
8353
8353
|
};
|
|
8354
8354
|
exports2.getAbsoluteUrl = getAbsoluteUrl4;
|
|
8355
8355
|
var parseResponseStatus = (kind, statusCode) => {
|
|
@@ -11480,8 +11480,8 @@ function isValidProtocol(protocol) {
|
|
|
11480
11480
|
return protocol === "http" || protocol === "https";
|
|
11481
11481
|
}
|
|
11482
11482
|
function dsnToString(dsn, withPassword = false) {
|
|
11483
|
-
const { host, path:
|
|
11484
|
-
return `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ""}@${host}${port ? `:${port}` : ""}/${
|
|
11483
|
+
const { host, path: path18, pass, port, projectId, protocol, publicKey } = dsn;
|
|
11484
|
+
return `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ""}@${host}${port ? `:${port}` : ""}/${path18 ? `${path18}/` : path18}${projectId}`;
|
|
11485
11485
|
}
|
|
11486
11486
|
function dsnFromString(str2) {
|
|
11487
11487
|
const match2 = DSN_REGEX.exec(str2);
|
|
@@ -11492,11 +11492,11 @@ function dsnFromString(str2) {
|
|
|
11492
11492
|
return void 0;
|
|
11493
11493
|
}
|
|
11494
11494
|
const [protocol, publicKey, pass = "", host = "", port = "", lastPath = ""] = match2.slice(1);
|
|
11495
|
-
let
|
|
11495
|
+
let path18 = "";
|
|
11496
11496
|
let projectId = lastPath;
|
|
11497
11497
|
const split2 = projectId.split("/");
|
|
11498
11498
|
if (split2.length > 1) {
|
|
11499
|
-
|
|
11499
|
+
path18 = split2.slice(0, -1).join("/");
|
|
11500
11500
|
projectId = split2.pop();
|
|
11501
11501
|
}
|
|
11502
11502
|
if (projectId) {
|
|
@@ -11505,7 +11505,7 @@ function dsnFromString(str2) {
|
|
|
11505
11505
|
projectId = projectMatch[0];
|
|
11506
11506
|
}
|
|
11507
11507
|
}
|
|
11508
|
-
return dsnFromComponents({ host, pass, path:
|
|
11508
|
+
return dsnFromComponents({ host, pass, path: path18, projectId, port, protocol, publicKey });
|
|
11509
11509
|
}
|
|
11510
11510
|
function dsnFromComponents(components) {
|
|
11511
11511
|
return {
|
|
@@ -15670,9 +15670,9 @@ function stripUrlQueryAndFragment(urlPath) {
|
|
|
15670
15670
|
return urlPath.split(/[?#]/, 1)[0];
|
|
15671
15671
|
}
|
|
15672
15672
|
function getSanitizedUrlString(url2) {
|
|
15673
|
-
const { protocol, host, path:
|
|
15673
|
+
const { protocol, host, path: path18 } = url2;
|
|
15674
15674
|
const filteredHost = host?.replace(/^.*@/, "[filtered]:[filtered]@").replace(/(:80)$/, "").replace(/(:443)$/, "") || "";
|
|
15675
|
-
return `${protocol ? `${protocol}://` : ""}${filteredHost}${
|
|
15675
|
+
return `${protocol ? `${protocol}://` : ""}${filteredHost}${path18}`;
|
|
15676
15676
|
}
|
|
15677
15677
|
var DEFAULT_BASE_URL;
|
|
15678
15678
|
var init_url = __esm({
|
|
@@ -16486,8 +16486,8 @@ function splitPath(filename) {
|
|
|
16486
16486
|
const parts = splitPathRe.exec(truncated);
|
|
16487
16487
|
return parts ? parts.slice(1) : [];
|
|
16488
16488
|
}
|
|
16489
|
-
function dirname(
|
|
16490
|
-
const result = splitPath(
|
|
16489
|
+
function dirname(path18) {
|
|
16490
|
+
const result = splitPath(path18);
|
|
16491
16491
|
const root = result[0] || "";
|
|
16492
16492
|
let dir = result[1];
|
|
16493
16493
|
if (!root && !dir) {
|
|
@@ -19881,11 +19881,11 @@ function isKnownPrefetchRequest(req) {
|
|
|
19881
19881
|
return req.headers["next-router-prefetch"] === "1";
|
|
19882
19882
|
}
|
|
19883
19883
|
function isStaticAssetRequest(urlPath) {
|
|
19884
|
-
const
|
|
19885
|
-
if (
|
|
19884
|
+
const path18 = stripUrlQueryAndFragment(urlPath);
|
|
19885
|
+
if (path18.match(/\.(ico|png|jpg|jpeg|gif|svg|css|js|woff|woff2|ttf|eot|webp|avif)$/)) {
|
|
19886
19886
|
return true;
|
|
19887
19887
|
}
|
|
19888
|
-
if (
|
|
19888
|
+
if (path18.match(/^\/(robots\.txt|sitemap\.xml|manifest\.json|browserconfig\.xml)$/)) {
|
|
19889
19889
|
return true;
|
|
19890
19890
|
}
|
|
19891
19891
|
return false;
|
|
@@ -20123,8 +20123,8 @@ function getRequestUrl(requestOptions) {
|
|
|
20123
20123
|
const protocol = requestOptions.protocol || "";
|
|
20124
20124
|
const hostname3 = requestOptions.hostname || requestOptions.host || "";
|
|
20125
20125
|
const port = !requestOptions.port || requestOptions.port === 80 || requestOptions.port === 443 || /^(.*):(\d+)$/.test(hostname3) ? "" : `:${requestOptions.port}`;
|
|
20126
|
-
const
|
|
20127
|
-
return `${protocol}//${hostname3}${port}${
|
|
20126
|
+
const path18 = requestOptions.path ? requestOptions.path : "/";
|
|
20127
|
+
return `${protocol}//${hostname3}${port}${path18}`;
|
|
20128
20128
|
}
|
|
20129
20129
|
var init_getRequestUrl = __esm({
|
|
20130
20130
|
"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"() {
|
|
@@ -20576,9 +20576,9 @@ var require_getMachineId_linux = __commonJS({
|
|
|
20576
20576
|
var api_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
20577
20577
|
async function getMachineId() {
|
|
20578
20578
|
const paths = ["/etc/machine-id", "/var/lib/dbus/machine-id"];
|
|
20579
|
-
for (const
|
|
20579
|
+
for (const path18 of paths) {
|
|
20580
20580
|
try {
|
|
20581
|
-
const result = await fs_1.promises.readFile(
|
|
20581
|
+
const result = await fs_1.promises.readFile(path18, { encoding: "utf8" });
|
|
20582
20582
|
return result.trim();
|
|
20583
20583
|
} catch (e4) {
|
|
20584
20584
|
api_1.diag.debug(`error reading machine id: ${e4}`);
|
|
@@ -23815,8 +23815,8 @@ function getRequestOptions(request3) {
|
|
|
23815
23815
|
function getRequestUrl2(request3) {
|
|
23816
23816
|
const hostname3 = request3.getHeader("host") || request3.host;
|
|
23817
23817
|
const protocol = request3.protocol;
|
|
23818
|
-
const
|
|
23819
|
-
return `${protocol}//${hostname3}${
|
|
23818
|
+
const path18 = request3.path;
|
|
23819
|
+
return `${protocol}//${hostname3}${path18}`;
|
|
23820
23820
|
}
|
|
23821
23821
|
var init_outgoing_requests = __esm({
|
|
23822
23822
|
"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"() {
|
|
@@ -24042,19 +24042,19 @@ function getBreadcrumbData2(request3) {
|
|
|
24042
24042
|
return {};
|
|
24043
24043
|
}
|
|
24044
24044
|
}
|
|
24045
|
-
function getAbsoluteUrl2(origin,
|
|
24045
|
+
function getAbsoluteUrl2(origin, path18 = "/") {
|
|
24046
24046
|
try {
|
|
24047
|
-
const url2 = new URL(
|
|
24047
|
+
const url2 = new URL(path18, origin);
|
|
24048
24048
|
return url2.toString();
|
|
24049
24049
|
} catch {
|
|
24050
24050
|
const url2 = `${origin}`;
|
|
24051
|
-
if (url2.endsWith("/") &&
|
|
24052
|
-
return `${url2}${
|
|
24051
|
+
if (url2.endsWith("/") && path18.startsWith("/")) {
|
|
24052
|
+
return `${url2}${path18.slice(1)}`;
|
|
24053
24053
|
}
|
|
24054
|
-
if (!url2.endsWith("/") && !
|
|
24055
|
-
return `${url2}/${
|
|
24054
|
+
if (!url2.endsWith("/") && !path18.startsWith("/")) {
|
|
24055
|
+
return `${url2}/${path18.slice(1)}`;
|
|
24056
24056
|
}
|
|
24057
|
-
return `${url2}${
|
|
24057
|
+
return `${url2}${path18}`;
|
|
24058
24058
|
}
|
|
24059
24059
|
}
|
|
24060
24060
|
var import_core12, import_instrumentation3, diagch, SENTRY_TRACE_HEADER2, SENTRY_BAGGAGE_HEADER2, BAGGAGE_HEADER_REGEX, SentryNodeFetchInstrumentation;
|
|
@@ -24541,12 +24541,12 @@ function emplace(map3, key, contents) {
|
|
|
24541
24541
|
}
|
|
24542
24542
|
return value;
|
|
24543
24543
|
}
|
|
24544
|
-
function shouldSkipContextLinesForFile(
|
|
24545
|
-
if (
|
|
24546
|
-
if (
|
|
24547
|
-
if (
|
|
24548
|
-
if (
|
|
24549
|
-
if (
|
|
24544
|
+
function shouldSkipContextLinesForFile(path18) {
|
|
24545
|
+
if (path18.startsWith("node:")) return true;
|
|
24546
|
+
if (path18.endsWith(".min.js")) return true;
|
|
24547
|
+
if (path18.endsWith(".min.cjs")) return true;
|
|
24548
|
+
if (path18.endsWith(".min.mjs")) return true;
|
|
24549
|
+
if (path18.startsWith("data:")) return true;
|
|
24550
24550
|
return false;
|
|
24551
24551
|
}
|
|
24552
24552
|
function shouldSkipContextLinesForFrame(frame) {
|
|
@@ -24594,9 +24594,9 @@ function makeLineReaderRanges(lines, linecontext) {
|
|
|
24594
24594
|
}
|
|
24595
24595
|
return out;
|
|
24596
24596
|
}
|
|
24597
|
-
function getContextLinesFromFile(
|
|
24597
|
+
function getContextLinesFromFile(path18, ranges, output) {
|
|
24598
24598
|
return new Promise((resolve7, _reject) => {
|
|
24599
|
-
const stream2 = (0, import_node_fs2.createReadStream)(
|
|
24599
|
+
const stream2 = (0, import_node_fs2.createReadStream)(path18);
|
|
24600
24600
|
const lineReaded = (0, import_node_readline.createInterface)({
|
|
24601
24601
|
input: stream2
|
|
24602
24602
|
});
|
|
@@ -24614,8 +24614,8 @@ function getContextLinesFromFile(path19, ranges, output) {
|
|
|
24614
24614
|
let rangeStart = range3[0];
|
|
24615
24615
|
let rangeEnd = range3[1];
|
|
24616
24616
|
function onStreamError(e4) {
|
|
24617
|
-
LRU_FILE_CONTENTS_FS_READ_FAILED.set(
|
|
24618
|
-
DEBUG_BUILD2 && debug.error(`Failed to read file: ${
|
|
24617
|
+
LRU_FILE_CONTENTS_FS_READ_FAILED.set(path18, 1);
|
|
24618
|
+
DEBUG_BUILD2 && debug.error(`Failed to read file: ${path18}. Error: ${e4}`);
|
|
24619
24619
|
lineReaded.close();
|
|
24620
24620
|
lineReaded.removeAllListeners();
|
|
24621
24621
|
destroyStreamAndResolve();
|
|
@@ -25306,8 +25306,8 @@ function collectRequireModules() {
|
|
|
25306
25306
|
const paths = getRequireCachePaths();
|
|
25307
25307
|
const infos = {};
|
|
25308
25308
|
const seen = /* @__PURE__ */ new Set();
|
|
25309
|
-
paths.forEach((
|
|
25310
|
-
let dir =
|
|
25309
|
+
paths.forEach((path18) => {
|
|
25310
|
+
let dir = path18;
|
|
25311
25311
|
const updir = () => {
|
|
25312
25312
|
const orig = dir;
|
|
25313
25313
|
dir = (0, import_node_path2.dirname)(orig);
|
|
@@ -26577,8 +26577,8 @@ var init_envToBool = __esm({
|
|
|
26577
26577
|
});
|
|
26578
26578
|
|
|
26579
26579
|
// 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
|
|
26580
|
-
function normalizeWindowsPath(
|
|
26581
|
-
return
|
|
26580
|
+
function normalizeWindowsPath(path18) {
|
|
26581
|
+
return path18.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
|
|
26582
26582
|
}
|
|
26583
26583
|
function createGetModuleFromFilename(basePath = process.argv[1] ? dirname(process.argv[1]) : process.cwd(), isWindows = import_node_path3.sep === "\\") {
|
|
26584
26584
|
const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;
|
|
@@ -27517,15 +27517,15 @@ var require_src9 = __commonJS({
|
|
|
27517
27517
|
});
|
|
27518
27518
|
|
|
27519
27519
|
// node_modules/.pnpm/@sentry+node@10.27.0/node_modules/@sentry/node/build/esm/integrations/node-fetch.js
|
|
27520
|
-
function getAbsoluteUrl3(origin,
|
|
27520
|
+
function getAbsoluteUrl3(origin, path18 = "/") {
|
|
27521
27521
|
const url2 = `${origin}`;
|
|
27522
|
-
if (url2.endsWith("/") &&
|
|
27523
|
-
return `${url2}${
|
|
27522
|
+
if (url2.endsWith("/") && path18.startsWith("/")) {
|
|
27523
|
+
return `${url2}${path18.slice(1)}`;
|
|
27524
27524
|
}
|
|
27525
|
-
if (!url2.endsWith("/") && !
|
|
27526
|
-
return `${url2}/${
|
|
27525
|
+
if (!url2.endsWith("/") && !path18.startsWith("/")) {
|
|
27526
|
+
return `${url2}/${path18.slice(1)}`;
|
|
27527
27527
|
}
|
|
27528
|
-
return `${url2}${
|
|
27528
|
+
return `${url2}${path18}`;
|
|
27529
27529
|
}
|
|
27530
27530
|
function _shouldInstrumentSpans(options, clientOptions = {}) {
|
|
27531
27531
|
return typeof options.spans === "boolean" ? options.spans : !clientOptions.skipOpenTelemetrySetup && hasSpansEnabled(clientOptions);
|
|
@@ -27653,15 +27653,15 @@ var require_utils6 = __commonJS({
|
|
|
27653
27653
|
return { isLayerPathStored: true };
|
|
27654
27654
|
};
|
|
27655
27655
|
exports2.storeLayerPath = storeLayerPath;
|
|
27656
|
-
var getRouterPath = (
|
|
27656
|
+
var getRouterPath = (path18, layer) => {
|
|
27657
27657
|
const stackLayer = layer.handle?.stack?.[0];
|
|
27658
27658
|
if (stackLayer?.route?.path) {
|
|
27659
|
-
return `${
|
|
27659
|
+
return `${path18}${stackLayer.route.path}`;
|
|
27660
27660
|
}
|
|
27661
27661
|
if (stackLayer?.handle?.stack) {
|
|
27662
|
-
return (0, exports2.getRouterPath)(
|
|
27662
|
+
return (0, exports2.getRouterPath)(path18, stackLayer);
|
|
27663
27663
|
}
|
|
27664
|
-
return
|
|
27664
|
+
return path18;
|
|
27665
27665
|
};
|
|
27666
27666
|
exports2.getRouterPath = getRouterPath;
|
|
27667
27667
|
var getLayerMetadata = (route, layer, layerPath) => {
|
|
@@ -27743,7 +27743,7 @@ var require_utils6 = __commonJS({
|
|
|
27743
27743
|
};
|
|
27744
27744
|
function getConstructedRoute(req) {
|
|
27745
27745
|
const layersStore = Array.isArray(req[internal_types_1._LAYERS_STORE_PROPERTY]) ? req[internal_types_1._LAYERS_STORE_PROPERTY] : [];
|
|
27746
|
-
const meaningfulPaths = layersStore.filter((
|
|
27746
|
+
const meaningfulPaths = layersStore.filter((path18) => path18 !== "/" && path18 !== "/*");
|
|
27747
27747
|
if (meaningfulPaths.length === 1 && meaningfulPaths[0] === "*") {
|
|
27748
27748
|
return "*";
|
|
27749
27749
|
}
|
|
@@ -27755,7 +27755,7 @@ var require_utils6 = __commonJS({
|
|
|
27755
27755
|
if (layersStore.length === 0) {
|
|
27756
27756
|
return void 0;
|
|
27757
27757
|
}
|
|
27758
|
-
if (layersStore.every((
|
|
27758
|
+
if (layersStore.every((path18) => path18 === "/")) {
|
|
27759
27759
|
return req.originalUrl === "/" ? "/" : void 0;
|
|
27760
27760
|
}
|
|
27761
27761
|
const constructedRoute = getConstructedRoute(req);
|
|
@@ -30934,23 +30934,23 @@ var require_utils7 = __commonJS({
|
|
|
30934
30934
|
span.setAttribute(AttributeNames_1.AttributeNames.SOURCE, source);
|
|
30935
30935
|
}
|
|
30936
30936
|
exports2.addSpanSource = addSpanSource;
|
|
30937
|
-
function createFieldIfNotExists(tracer, getConfig, contextValue, info,
|
|
30938
|
-
let field = getField(contextValue,
|
|
30937
|
+
function createFieldIfNotExists(tracer, getConfig, contextValue, info, path18) {
|
|
30938
|
+
let field = getField(contextValue, path18);
|
|
30939
30939
|
if (field) {
|
|
30940
30940
|
return { field, spanAdded: false };
|
|
30941
30941
|
}
|
|
30942
30942
|
const config3 = getConfig();
|
|
30943
|
-
const parentSpan = config3.flatResolveSpans ? getRootSpan2(contextValue) : getParentFieldSpan(contextValue,
|
|
30943
|
+
const parentSpan = config3.flatResolveSpans ? getRootSpan2(contextValue) : getParentFieldSpan(contextValue, path18);
|
|
30944
30944
|
field = {
|
|
30945
|
-
span: createResolverSpan(tracer, getConfig, contextValue, info,
|
|
30945
|
+
span: createResolverSpan(tracer, getConfig, contextValue, info, path18, parentSpan)
|
|
30946
30946
|
};
|
|
30947
|
-
addField(contextValue,
|
|
30947
|
+
addField(contextValue, path18, field);
|
|
30948
30948
|
return { field, spanAdded: true };
|
|
30949
30949
|
}
|
|
30950
|
-
function createResolverSpan(tracer, getConfig, contextValue, info,
|
|
30950
|
+
function createResolverSpan(tracer, getConfig, contextValue, info, path18, parentSpan) {
|
|
30951
30951
|
const attributes = {
|
|
30952
30952
|
[AttributeNames_1.AttributeNames.FIELD_NAME]: info.fieldName,
|
|
30953
|
-
[AttributeNames_1.AttributeNames.FIELD_PATH]:
|
|
30953
|
+
[AttributeNames_1.AttributeNames.FIELD_PATH]: path18.join("."),
|
|
30954
30954
|
[AttributeNames_1.AttributeNames.FIELD_TYPE]: info.returnType.toString()
|
|
30955
30955
|
};
|
|
30956
30956
|
const span = tracer.startSpan(`${enum_1.SpanNames.RESOLVE} ${attributes[AttributeNames_1.AttributeNames.FIELD_PATH]}`, {
|
|
@@ -30981,15 +30981,15 @@ var require_utils7 = __commonJS({
|
|
|
30981
30981
|
}
|
|
30982
30982
|
}
|
|
30983
30983
|
exports2.getOperation = getOperation;
|
|
30984
|
-
function addField(contextValue,
|
|
30985
|
-
return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[
|
|
30984
|
+
function addField(contextValue, path18, field) {
|
|
30985
|
+
return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[path18.join(".")] = field;
|
|
30986
30986
|
}
|
|
30987
|
-
function getField(contextValue,
|
|
30988
|
-
return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[
|
|
30987
|
+
function getField(contextValue, path18) {
|
|
30988
|
+
return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[path18.join(".")];
|
|
30989
30989
|
}
|
|
30990
|
-
function getParentFieldSpan(contextValue,
|
|
30991
|
-
for (let i4 =
|
|
30992
|
-
const field = getField(contextValue,
|
|
30990
|
+
function getParentFieldSpan(contextValue, path18) {
|
|
30991
|
+
for (let i4 = path18.length - 1; i4 > 0; i4--) {
|
|
30992
|
+
const field = getField(contextValue, path18.slice(0, i4));
|
|
30993
30993
|
if (field) {
|
|
30994
30994
|
return field.span;
|
|
30995
30995
|
}
|
|
@@ -30999,9 +30999,9 @@ var require_utils7 = __commonJS({
|
|
|
30999
30999
|
function getRootSpan2(contextValue) {
|
|
31000
31000
|
return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].span;
|
|
31001
31001
|
}
|
|
31002
|
-
function pathToArray(mergeItems,
|
|
31002
|
+
function pathToArray(mergeItems, path18) {
|
|
31003
31003
|
const flattened = [];
|
|
31004
|
-
let curr =
|
|
31004
|
+
let curr = path18;
|
|
31005
31005
|
while (curr) {
|
|
31006
31006
|
let key = curr.key;
|
|
31007
31007
|
if (mergeItems && typeof key === "number") {
|
|
@@ -31154,14 +31154,14 @@ var require_utils7 = __commonJS({
|
|
|
31154
31154
|
if (!contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL]) {
|
|
31155
31155
|
return fieldResolver.call(this, source, args, contextValue, info);
|
|
31156
31156
|
}
|
|
31157
|
-
const
|
|
31158
|
-
const depth =
|
|
31157
|
+
const path18 = pathToArray(config3.mergeItems, info && info.path);
|
|
31158
|
+
const depth = path18.filter((item) => typeof item === "string").length;
|
|
31159
31159
|
let span;
|
|
31160
31160
|
let shouldEndSpan = false;
|
|
31161
31161
|
if (config3.depth >= 0 && config3.depth < depth) {
|
|
31162
|
-
span = getParentFieldSpan(contextValue,
|
|
31162
|
+
span = getParentFieldSpan(contextValue, path18);
|
|
31163
31163
|
} else {
|
|
31164
|
-
const { field, spanAdded } = createFieldIfNotExists(tracer, getConfig, contextValue, info,
|
|
31164
|
+
const { field, spanAdded } = createFieldIfNotExists(tracer, getConfig, contextValue, info, path18);
|
|
31165
31165
|
span = field.span;
|
|
31166
31166
|
shouldEndSpan = spanAdded;
|
|
31167
31167
|
}
|
|
@@ -36078,10 +36078,10 @@ var init_postgresjs = __esm({
|
|
|
36078
36078
|
*/
|
|
36079
36079
|
init() {
|
|
36080
36080
|
const instrumentationModule = new import_instrumentation8.InstrumentationNodeModuleDefinition("postgres", SUPPORTED_VERSIONS2);
|
|
36081
|
-
["src", "cf/src", "cjs/src"].forEach((
|
|
36081
|
+
["src", "cf/src", "cjs/src"].forEach((path18) => {
|
|
36082
36082
|
instrumentationModule.files.push(
|
|
36083
36083
|
new import_instrumentation8.InstrumentationNodeModuleFile(
|
|
36084
|
-
`postgres/${
|
|
36084
|
+
`postgres/${path18}/connection.js`,
|
|
36085
36085
|
["*"],
|
|
36086
36086
|
this._patchConnection.bind(this),
|
|
36087
36087
|
this._unwrap.bind(this)
|
|
@@ -36089,7 +36089,7 @@ var init_postgresjs = __esm({
|
|
|
36089
36089
|
);
|
|
36090
36090
|
instrumentationModule.files.push(
|
|
36091
36091
|
new import_instrumentation8.InstrumentationNodeModuleFile(
|
|
36092
|
-
`postgres/${
|
|
36092
|
+
`postgres/${path18}/query.js`,
|
|
36093
36093
|
SUPPORTED_VERSIONS2,
|
|
36094
36094
|
this._patchQuery.bind(this),
|
|
36095
36095
|
this._unwrap.bind(this)
|
|
@@ -37137,13 +37137,13 @@ var init_instrumentation2 = __esm({
|
|
|
37137
37137
|
return function(original) {
|
|
37138
37138
|
return function wrappedHandler(...args) {
|
|
37139
37139
|
if (typeof args[0] === "string") {
|
|
37140
|
-
const
|
|
37140
|
+
const path18 = args[0];
|
|
37141
37141
|
if (args.length === 1) {
|
|
37142
|
-
return original.apply(this, [
|
|
37142
|
+
return original.apply(this, [path18]);
|
|
37143
37143
|
}
|
|
37144
37144
|
const handlers2 = args.slice(1);
|
|
37145
37145
|
return original.apply(this, [
|
|
37146
|
-
|
|
37146
|
+
path18,
|
|
37147
37147
|
...handlers2.map((handler10) => instrumentation._wrapHandler(handler10))
|
|
37148
37148
|
]);
|
|
37149
37149
|
}
|
|
@@ -37177,13 +37177,13 @@ var init_instrumentation2 = __esm({
|
|
|
37177
37177
|
return function(original) {
|
|
37178
37178
|
return function wrappedHandler(...args) {
|
|
37179
37179
|
if (typeof args[0] === "string") {
|
|
37180
|
-
const
|
|
37180
|
+
const path18 = args[0];
|
|
37181
37181
|
if (args.length === 1) {
|
|
37182
|
-
return original.apply(this, [
|
|
37182
|
+
return original.apply(this, [path18]);
|
|
37183
37183
|
}
|
|
37184
37184
|
const handlers2 = args.slice(1);
|
|
37185
37185
|
return original.apply(this, [
|
|
37186
|
-
|
|
37186
|
+
path18,
|
|
37187
37187
|
...handlers2.map((handler10) => instrumentation._wrapHandler(handler10))
|
|
37188
37188
|
]);
|
|
37189
37189
|
}
|
|
@@ -37203,8 +37203,8 @@ var init_instrumentation2 = __esm({
|
|
|
37203
37203
|
if (!instrumentation.isEnabled()) {
|
|
37204
37204
|
return handler10.apply(this, [c4, next]);
|
|
37205
37205
|
}
|
|
37206
|
-
const
|
|
37207
|
-
const span = instrumentation.tracer.startSpan(
|
|
37206
|
+
const path18 = c4.req.path;
|
|
37207
|
+
const span = instrumentation.tracer.startSpan(path18);
|
|
37208
37208
|
return context.with(trace.setSpan(context.active(), span), () => {
|
|
37209
37209
|
return instrumentation._safeExecute(
|
|
37210
37210
|
() => {
|
|
@@ -37214,7 +37214,7 @@ var init_instrumentation2 = __esm({
|
|
|
37214
37214
|
const type2 = instrumentation._determineHandlerType(result2);
|
|
37215
37215
|
span.setAttributes({
|
|
37216
37216
|
[AttributeNames2.HONO_TYPE]: type2,
|
|
37217
|
-
[AttributeNames2.HONO_NAME]: type2 === HonoTypes.REQUEST_HANDLER ?
|
|
37217
|
+
[AttributeNames2.HONO_NAME]: type2 === HonoTypes.REQUEST_HANDLER ? path18 : handler10.name || "anonymous"
|
|
37218
37218
|
});
|
|
37219
37219
|
instrumentation.getConfig().responseHook?.(span);
|
|
37220
37220
|
return result2;
|
|
@@ -37223,7 +37223,7 @@ var init_instrumentation2 = __esm({
|
|
|
37223
37223
|
const type2 = instrumentation._determineHandlerType(result);
|
|
37224
37224
|
span.setAttributes({
|
|
37225
37225
|
[AttributeNames2.HONO_TYPE]: type2,
|
|
37226
|
-
[AttributeNames2.HONO_NAME]: type2 === HonoTypes.REQUEST_HANDLER ?
|
|
37226
|
+
[AttributeNames2.HONO_NAME]: type2 === HonoTypes.REQUEST_HANDLER ? path18 : handler10.name || "anonymous"
|
|
37227
37227
|
});
|
|
37228
37228
|
instrumentation.getConfig().responseHook?.(span);
|
|
37229
37229
|
return result;
|
|
@@ -37495,11 +37495,11 @@ var require_instrumentation15 = __commonJS({
|
|
|
37495
37495
|
const router = dispatchLayer.router;
|
|
37496
37496
|
const routesStack = router?.stack ?? [];
|
|
37497
37497
|
for (const pathLayer of routesStack) {
|
|
37498
|
-
const
|
|
37498
|
+
const path18 = pathLayer.path;
|
|
37499
37499
|
const pathStack = pathLayer.stack;
|
|
37500
37500
|
for (let j6 = 0; j6 < pathStack.length; j6++) {
|
|
37501
37501
|
const routedMiddleware = pathStack[j6];
|
|
37502
|
-
pathStack[j6] = this._patchLayer(routedMiddleware, true,
|
|
37502
|
+
pathStack[j6] = this._patchLayer(routedMiddleware, true, path18);
|
|
37503
37503
|
}
|
|
37504
37504
|
}
|
|
37505
37505
|
return dispatchLayer;
|
|
@@ -43963,10 +43963,10 @@ var require_src29 = __commonJS({
|
|
|
43963
43963
|
var fs_1 = require("fs");
|
|
43964
43964
|
var debug_1 = __importDefault2(require_src3());
|
|
43965
43965
|
var log3 = debug_1.default("@kwsites/file-exists");
|
|
43966
|
-
function check(
|
|
43967
|
-
log3(`checking %s`,
|
|
43966
|
+
function check(path18, isFile, isDirectory) {
|
|
43967
|
+
log3(`checking %s`, path18);
|
|
43968
43968
|
try {
|
|
43969
|
-
const stat = fs_1.statSync(
|
|
43969
|
+
const stat = fs_1.statSync(path18);
|
|
43970
43970
|
if (stat.isFile() && isFile) {
|
|
43971
43971
|
log3(`[OK] path represents a file`);
|
|
43972
43972
|
return true;
|
|
@@ -43986,8 +43986,8 @@ var require_src29 = __commonJS({
|
|
|
43986
43986
|
throw e4;
|
|
43987
43987
|
}
|
|
43988
43988
|
}
|
|
43989
|
-
function exists2(
|
|
43990
|
-
return check(
|
|
43989
|
+
function exists2(path18, type2 = exports2.READABLE) {
|
|
43990
|
+
return check(path18, (type2 & exports2.FILE) > 0, (type2 & exports2.FOLDER) > 0);
|
|
43991
43991
|
}
|
|
43992
43992
|
exports2.exists = exists2;
|
|
43993
43993
|
exports2.FILE = 1;
|
|
@@ -44058,8 +44058,8 @@ function pathspec(...paths) {
|
|
|
44058
44058
|
cache.set(key, paths);
|
|
44059
44059
|
return key;
|
|
44060
44060
|
}
|
|
44061
|
-
function isPathSpec(
|
|
44062
|
-
return
|
|
44061
|
+
function isPathSpec(path18) {
|
|
44062
|
+
return path18 instanceof String && cache.has(path18);
|
|
44063
44063
|
}
|
|
44064
44064
|
function toPaths(pathSpec) {
|
|
44065
44065
|
return cache.get(pathSpec) || [];
|
|
@@ -44103,8 +44103,8 @@ function toLinesWithContent(input = "", trimmed2 = true, separator = "\n") {
|
|
|
44103
44103
|
function forEachLineWithContent(input, callback) {
|
|
44104
44104
|
return toLinesWithContent(input, true).map((line) => callback(line));
|
|
44105
44105
|
}
|
|
44106
|
-
function folderExists(
|
|
44107
|
-
return (0, import_file_exists.exists)(
|
|
44106
|
+
function folderExists(path18) {
|
|
44107
|
+
return (0, import_file_exists.exists)(path18, import_file_exists.FOLDER);
|
|
44108
44108
|
}
|
|
44109
44109
|
function append(target, item) {
|
|
44110
44110
|
if (Array.isArray(target)) {
|
|
@@ -44295,8 +44295,8 @@ function checkIsRepoRootTask() {
|
|
|
44295
44295
|
commands: commands4,
|
|
44296
44296
|
format: "utf-8",
|
|
44297
44297
|
onError,
|
|
44298
|
-
parser(
|
|
44299
|
-
return /^\.(git)?$/.test(
|
|
44298
|
+
parser(path18) {
|
|
44299
|
+
return /^\.(git)?$/.test(path18.trim());
|
|
44300
44300
|
}
|
|
44301
44301
|
};
|
|
44302
44302
|
}
|
|
@@ -44552,11 +44552,11 @@ function parseGrep(grep) {
|
|
|
44552
44552
|
const paths = /* @__PURE__ */ new Set();
|
|
44553
44553
|
const results = {};
|
|
44554
44554
|
forEachLineWithContent(grep, (input) => {
|
|
44555
|
-
const [
|
|
44556
|
-
paths.add(
|
|
44557
|
-
(results[
|
|
44555
|
+
const [path18, line, preview] = input.split(NULL);
|
|
44556
|
+
paths.add(path18);
|
|
44557
|
+
(results[path18] = results[path18] || []).push({
|
|
44558
44558
|
line: asNumber(line),
|
|
44559
|
-
path:
|
|
44559
|
+
path: path18,
|
|
44560
44560
|
preview
|
|
44561
44561
|
});
|
|
44562
44562
|
});
|
|
@@ -44853,14 +44853,14 @@ function hashObjectTask(filePath, write) {
|
|
|
44853
44853
|
}
|
|
44854
44854
|
return straightThroughStringTask(commands4, true);
|
|
44855
44855
|
}
|
|
44856
|
-
function parseInit(bare,
|
|
44856
|
+
function parseInit(bare, path18, text) {
|
|
44857
44857
|
const response = String(text).trim();
|
|
44858
44858
|
let result;
|
|
44859
44859
|
if (result = initResponseRegex.exec(response)) {
|
|
44860
|
-
return new InitSummary(bare,
|
|
44860
|
+
return new InitSummary(bare, path18, false, result[1]);
|
|
44861
44861
|
}
|
|
44862
44862
|
if (result = reInitResponseRegex.exec(response)) {
|
|
44863
|
-
return new InitSummary(bare,
|
|
44863
|
+
return new InitSummary(bare, path18, true, result[1]);
|
|
44864
44864
|
}
|
|
44865
44865
|
let gitDir = "";
|
|
44866
44866
|
const tokens = response.split(" ");
|
|
@@ -44871,12 +44871,12 @@ function parseInit(bare, path19, text) {
|
|
|
44871
44871
|
break;
|
|
44872
44872
|
}
|
|
44873
44873
|
}
|
|
44874
|
-
return new InitSummary(bare,
|
|
44874
|
+
return new InitSummary(bare, path18, /^re/i.test(response), gitDir);
|
|
44875
44875
|
}
|
|
44876
44876
|
function hasBareCommand(command10) {
|
|
44877
44877
|
return command10.includes(bareCommand);
|
|
44878
44878
|
}
|
|
44879
|
-
function initTask(bare = false,
|
|
44879
|
+
function initTask(bare = false, path18, customArgs) {
|
|
44880
44880
|
const commands4 = ["init", ...customArgs];
|
|
44881
44881
|
if (bare && !hasBareCommand(commands4)) {
|
|
44882
44882
|
commands4.splice(1, 0, bareCommand);
|
|
@@ -44885,7 +44885,7 @@ function initTask(bare = false, path19, customArgs) {
|
|
|
44885
44885
|
commands: commands4,
|
|
44886
44886
|
format: "utf-8",
|
|
44887
44887
|
parser(text) {
|
|
44888
|
-
return parseInit(commands4.includes("--bare"),
|
|
44888
|
+
return parseInit(commands4.includes("--bare"), path18, text);
|
|
44889
44889
|
}
|
|
44890
44890
|
};
|
|
44891
44891
|
}
|
|
@@ -45164,14 +45164,14 @@ function splitLine(result, lineStr) {
|
|
|
45164
45164
|
default:
|
|
45165
45165
|
return;
|
|
45166
45166
|
}
|
|
45167
|
-
function data2(index, workingDir,
|
|
45167
|
+
function data2(index, workingDir, path18) {
|
|
45168
45168
|
const raw = `${index}${workingDir}`;
|
|
45169
45169
|
const handler10 = parsers6.get(raw);
|
|
45170
45170
|
if (handler10) {
|
|
45171
|
-
handler10(result,
|
|
45171
|
+
handler10(result, path18);
|
|
45172
45172
|
}
|
|
45173
45173
|
if (raw !== "##" && raw !== "!!") {
|
|
45174
|
-
result.files.push(new FileStatusSummary(
|
|
45174
|
+
result.files.push(new FileStatusSummary(path18, index, workingDir));
|
|
45175
45175
|
}
|
|
45176
45176
|
}
|
|
45177
45177
|
}
|
|
@@ -45358,8 +45358,8 @@ function deleteBranchTask(branch, forceDelete = false) {
|
|
|
45358
45358
|
return task;
|
|
45359
45359
|
}
|
|
45360
45360
|
function toPath(input) {
|
|
45361
|
-
const
|
|
45362
|
-
return
|
|
45361
|
+
const path18 = input.trim().replace(/^["']|["']$/g, "");
|
|
45362
|
+
return path18 && (0, import_node_path4.normalize)(path18);
|
|
45363
45363
|
}
|
|
45364
45364
|
function checkIgnoreTask(paths) {
|
|
45365
45365
|
return {
|
|
@@ -45498,8 +45498,8 @@ function stashListTask(opt = {}, customArgs) {
|
|
|
45498
45498
|
parser: parser42
|
|
45499
45499
|
};
|
|
45500
45500
|
}
|
|
45501
|
-
function addSubModuleTask(repo,
|
|
45502
|
-
return subModuleTask(["add", repo,
|
|
45501
|
+
function addSubModuleTask(repo, path18) {
|
|
45502
|
+
return subModuleTask(["add", repo, path18]);
|
|
45503
45503
|
}
|
|
45504
45504
|
function initSubModuleTask(customArgs) {
|
|
45505
45505
|
return subModuleTask(["init", ...customArgs]);
|
|
@@ -46816,9 +46816,9 @@ var init_esm10 = __esm({
|
|
|
46816
46816
|
"src/lib/responses/InitSummary.ts"() {
|
|
46817
46817
|
"use strict";
|
|
46818
46818
|
InitSummary = class {
|
|
46819
|
-
constructor(bare,
|
|
46819
|
+
constructor(bare, path18, existing, gitDir) {
|
|
46820
46820
|
this.bare = bare;
|
|
46821
|
-
this.path =
|
|
46821
|
+
this.path = path18;
|
|
46822
46822
|
this.existing = existing;
|
|
46823
46823
|
this.gitDir = gitDir;
|
|
46824
46824
|
}
|
|
@@ -47352,12 +47352,12 @@ var init_esm10 = __esm({
|
|
|
47352
47352
|
"use strict";
|
|
47353
47353
|
fromPathRegex = /^(.+)\0(.+)$/;
|
|
47354
47354
|
FileStatusSummary = class {
|
|
47355
|
-
constructor(
|
|
47356
|
-
this.path =
|
|
47355
|
+
constructor(path18, index, working_dir) {
|
|
47356
|
+
this.path = path18;
|
|
47357
47357
|
this.index = index;
|
|
47358
47358
|
this.working_dir = working_dir;
|
|
47359
47359
|
if (index === "R" || working_dir === "R") {
|
|
47360
|
-
const detail = fromPathRegex.exec(
|
|
47360
|
+
const detail = fromPathRegex.exec(path18) || [null, path18, path18];
|
|
47361
47361
|
this.from = detail[2] || "";
|
|
47362
47362
|
this.path = detail[1] || "";
|
|
47363
47363
|
}
|
|
@@ -47620,9 +47620,9 @@ var init_esm10 = __esm({
|
|
|
47620
47620
|
next
|
|
47621
47621
|
);
|
|
47622
47622
|
}
|
|
47623
|
-
hashObject(
|
|
47623
|
+
hashObject(path18, write) {
|
|
47624
47624
|
return this._runTask(
|
|
47625
|
-
hashObjectTask(
|
|
47625
|
+
hashObjectTask(path18, write === true),
|
|
47626
47626
|
trailingFunctionArgument(arguments)
|
|
47627
47627
|
);
|
|
47628
47628
|
}
|
|
@@ -48259,8 +48259,8 @@ var init_esm10 = __esm({
|
|
|
48259
48259
|
}
|
|
48260
48260
|
return this._runTask(straightThroughStringTask2(command10, this._trimmed), next);
|
|
48261
48261
|
};
|
|
48262
|
-
Git2.prototype.submoduleAdd = function(repo,
|
|
48263
|
-
return this._runTask(addSubModuleTask2(repo,
|
|
48262
|
+
Git2.prototype.submoduleAdd = function(repo, path18, then) {
|
|
48263
|
+
return this._runTask(addSubModuleTask2(repo, path18), trailingFunctionArgument2(arguments));
|
|
48264
48264
|
};
|
|
48265
48265
|
Git2.prototype.submoduleUpdate = function(args, then) {
|
|
48266
48266
|
return this._runTask(
|
|
@@ -55708,14 +55708,14 @@ function isGitHubMutatingMethod(methodName) {
|
|
|
55708
55708
|
(prefix) => methodName.toLowerCase().startsWith(prefix.toLowerCase())
|
|
55709
55709
|
);
|
|
55710
55710
|
}
|
|
55711
|
-
function createGitHubNamespaceProxy(target,
|
|
55711
|
+
function createGitHubNamespaceProxy(target, path18 = []) {
|
|
55712
55712
|
return new Proxy(target, {
|
|
55713
55713
|
get(obj, prop) {
|
|
55714
55714
|
const value = obj[prop];
|
|
55715
55715
|
if (value === void 0 || typeof prop === "symbol") {
|
|
55716
55716
|
return value;
|
|
55717
55717
|
}
|
|
55718
|
-
const currentPath = [...
|
|
55718
|
+
const currentPath = [...path18, prop];
|
|
55719
55719
|
if (typeof value === "function") {
|
|
55720
55720
|
return function(...args) {
|
|
55721
55721
|
if (isDryRun() && isGitHubMutatingMethod(prop)) {
|
|
@@ -56603,8 +56603,8 @@ var init_parseUtil = __esm({
|
|
|
56603
56603
|
init_errors3();
|
|
56604
56604
|
init_en();
|
|
56605
56605
|
makeIssue = (params) => {
|
|
56606
|
-
const { data: data2, path:
|
|
56607
|
-
const fullPath = [...
|
|
56606
|
+
const { data: data2, path: path18, errorMaps, issueData } = params;
|
|
56607
|
+
const fullPath = [...path18, ...issueData.path || []];
|
|
56608
56608
|
const fullIssue = {
|
|
56609
56609
|
...issueData,
|
|
56610
56610
|
path: fullPath
|
|
@@ -56915,11 +56915,11 @@ var init_types2 = __esm({
|
|
|
56915
56915
|
init_parseUtil();
|
|
56916
56916
|
init_util2();
|
|
56917
56917
|
ParseInputLazyPath = class {
|
|
56918
|
-
constructor(parent, value,
|
|
56918
|
+
constructor(parent, value, path18, key) {
|
|
56919
56919
|
this._cachedPath = [];
|
|
56920
56920
|
this.parent = parent;
|
|
56921
56921
|
this.data = value;
|
|
56922
|
-
this._path =
|
|
56922
|
+
this._path = path18;
|
|
56923
56923
|
this._key = key;
|
|
56924
56924
|
}
|
|
56925
56925
|
get path() {
|
|
@@ -61161,14 +61161,14 @@ var require_url_state_machine = __commonJS({
|
|
|
61161
61161
|
return url2.replace(/\u0009|\u000A|\u000D/g, "");
|
|
61162
61162
|
}
|
|
61163
61163
|
function shortenPath(url2) {
|
|
61164
|
-
const
|
|
61165
|
-
if (
|
|
61164
|
+
const path18 = url2.path;
|
|
61165
|
+
if (path18.length === 0) {
|
|
61166
61166
|
return;
|
|
61167
61167
|
}
|
|
61168
|
-
if (url2.scheme === "file" &&
|
|
61168
|
+
if (url2.scheme === "file" && path18.length === 1 && isNormalizedWindowsDriveLetter(path18[0])) {
|
|
61169
61169
|
return;
|
|
61170
61170
|
}
|
|
61171
|
-
|
|
61171
|
+
path18.pop();
|
|
61172
61172
|
}
|
|
61173
61173
|
function includesCredentials(url2) {
|
|
61174
61174
|
return url2.username !== "" || url2.password !== "";
|
|
@@ -67627,7 +67627,7 @@ var require_yauzl = __commonJS({
|
|
|
67627
67627
|
exports2.ZipFile = ZipFile;
|
|
67628
67628
|
exports2.Entry = Entry;
|
|
67629
67629
|
exports2.RandomAccessReader = RandomAccessReader;
|
|
67630
|
-
function open(
|
|
67630
|
+
function open(path18, options, callback) {
|
|
67631
67631
|
if (typeof options === "function") {
|
|
67632
67632
|
callback = options;
|
|
67633
67633
|
options = null;
|
|
@@ -67639,7 +67639,7 @@ var require_yauzl = __commonJS({
|
|
|
67639
67639
|
if (options.validateEntrySizes == null) options.validateEntrySizes = true;
|
|
67640
67640
|
if (options.strictFileNames == null) options.strictFileNames = false;
|
|
67641
67641
|
if (callback == null) callback = defaultCallback;
|
|
67642
|
-
fs15.open(
|
|
67642
|
+
fs15.open(path18, "r", function(err, fd) {
|
|
67643
67643
|
if (err) return callback(err);
|
|
67644
67644
|
fromFd(fd, options, function(err2, zipfile) {
|
|
67645
67645
|
if (err2) fs15.close(fd, defaultCallback);
|
|
@@ -68242,7 +68242,7 @@ var require_extract_zip = __commonJS({
|
|
|
68242
68242
|
var debug3 = require_src3()("extract-zip");
|
|
68243
68243
|
var { createWriteStream: createWriteStream3, promises: fs15 } = require("fs");
|
|
68244
68244
|
var getStream = require_get_stream();
|
|
68245
|
-
var
|
|
68245
|
+
var path18 = require("path");
|
|
68246
68246
|
var { promisify: promisify5 } = require("util");
|
|
68247
68247
|
var stream2 = require("stream");
|
|
68248
68248
|
var yauzl = require_yauzl();
|
|
@@ -68279,12 +68279,12 @@ var require_extract_zip = __commonJS({
|
|
|
68279
68279
|
this.zipfile.readEntry();
|
|
68280
68280
|
return;
|
|
68281
68281
|
}
|
|
68282
|
-
const destDir =
|
|
68282
|
+
const destDir = path18.dirname(path18.join(this.opts.dir, entry.fileName));
|
|
68283
68283
|
try {
|
|
68284
68284
|
await fs15.mkdir(destDir, { recursive: true });
|
|
68285
68285
|
const canonicalDestDir = await fs15.realpath(destDir);
|
|
68286
|
-
const relativeDestDir =
|
|
68287
|
-
if (relativeDestDir.split(
|
|
68286
|
+
const relativeDestDir = path18.relative(this.opts.dir, canonicalDestDir);
|
|
68287
|
+
if (relativeDestDir.split(path18.sep).includes("..")) {
|
|
68288
68288
|
throw new Error(`Out of bound path "${canonicalDestDir}" found while processing file ${entry.fileName}`);
|
|
68289
68289
|
}
|
|
68290
68290
|
await this.extractEntry(entry);
|
|
@@ -68306,7 +68306,7 @@ var require_extract_zip = __commonJS({
|
|
|
68306
68306
|
if (this.opts.onEntry) {
|
|
68307
68307
|
this.opts.onEntry(entry, this.zipfile);
|
|
68308
68308
|
}
|
|
68309
|
-
const dest =
|
|
68309
|
+
const dest = path18.join(this.opts.dir, entry.fileName);
|
|
68310
68310
|
const mode = entry.externalFileAttributes >> 16 & 65535;
|
|
68311
68311
|
const IFMT2 = 61440;
|
|
68312
68312
|
const IFDIR2 = 16384;
|
|
@@ -68320,7 +68320,7 @@ var require_extract_zip = __commonJS({
|
|
|
68320
68320
|
if (!isDir) isDir = madeBy === 0 && entry.externalFileAttributes === 16;
|
|
68321
68321
|
debug3("extracting entry", { filename: entry.fileName, isDir, isSymlink: symlink });
|
|
68322
68322
|
const procMode = this.getExtractedMode(mode, isDir) & 511;
|
|
68323
|
-
const destDir = isDir ? dest :
|
|
68323
|
+
const destDir = isDir ? dest : path18.dirname(dest);
|
|
68324
68324
|
const mkdirOptions = { recursive: true };
|
|
68325
68325
|
if (isDir) {
|
|
68326
68326
|
mkdirOptions.mode = procMode;
|
|
@@ -68362,7 +68362,7 @@ var require_extract_zip = __commonJS({
|
|
|
68362
68362
|
};
|
|
68363
68363
|
module2.exports = async function(zipPath, opts) {
|
|
68364
68364
|
debug3("creating target directory", opts.dir);
|
|
68365
|
-
if (!
|
|
68365
|
+
if (!path18.isAbsolute(opts.dir)) {
|
|
68366
68366
|
throw new Error("Target directory is expected to be absolute");
|
|
68367
68367
|
}
|
|
68368
68368
|
await fs15.mkdir(opts.dir, { recursive: true });
|
|
@@ -68372,6 +68372,74 @@ var require_extract_zip = __commonJS({
|
|
|
68372
68372
|
}
|
|
68373
68373
|
});
|
|
68374
68374
|
|
|
68375
|
+
// src/utils/dynamicLinkerEnv.ts
|
|
68376
|
+
function sanitizeDynamicLinkerEnv() {
|
|
68377
|
+
const allowOverride = process.env[ALLOW_DYNAMIC_LINKER_ENV_VAR] === "1";
|
|
68378
|
+
const presentKeys = DYNAMIC_LINKER_ENV_VARS.filter(
|
|
68379
|
+
(key) => process.env[key] !== void 0
|
|
68380
|
+
);
|
|
68381
|
+
if (presentKeys.length === 0) {
|
|
68382
|
+
return;
|
|
68383
|
+
}
|
|
68384
|
+
if (allowOverride) {
|
|
68385
|
+
logger.info(
|
|
68386
|
+
`${ALLOW_DYNAMIC_LINKER_ENV_VAR}=1 set; preserving dynamic-linker environment variables: ${presentKeys.join(
|
|
68387
|
+
", "
|
|
68388
|
+
)}. This is not recommended.`
|
|
68389
|
+
);
|
|
68390
|
+
return;
|
|
68391
|
+
}
|
|
68392
|
+
for (const key of presentKeys) {
|
|
68393
|
+
logger.warn(
|
|
68394
|
+
`Stripping dynamic-linker environment variable "${key}" for security reasons. Set ${ALLOW_DYNAMIC_LINKER_ENV_VAR}=1 to override (not recommended).`
|
|
68395
|
+
);
|
|
68396
|
+
delete process.env[key];
|
|
68397
|
+
}
|
|
68398
|
+
}
|
|
68399
|
+
function sanitizeSpawnEnv(env2) {
|
|
68400
|
+
if (env2 === void 0) {
|
|
68401
|
+
return env2;
|
|
68402
|
+
}
|
|
68403
|
+
if (process.env[ALLOW_DYNAMIC_LINKER_ENV_VAR] === "1") {
|
|
68404
|
+
return env2;
|
|
68405
|
+
}
|
|
68406
|
+
const sanitized = { ...env2 };
|
|
68407
|
+
let strippedAny = false;
|
|
68408
|
+
for (const key of DYNAMIC_LINKER_ENV_VARS) {
|
|
68409
|
+
if (sanitized[key] !== void 0) {
|
|
68410
|
+
delete sanitized[key];
|
|
68411
|
+
strippedAny = true;
|
|
68412
|
+
}
|
|
68413
|
+
}
|
|
68414
|
+
if (strippedAny) {
|
|
68415
|
+
logger.warn(
|
|
68416
|
+
`Stripped dynamic-linker environment variable(s) from a subprocess env. Set ${ALLOW_DYNAMIC_LINKER_ENV_VAR}=1 to override (not recommended).`
|
|
68417
|
+
);
|
|
68418
|
+
}
|
|
68419
|
+
return sanitized;
|
|
68420
|
+
}
|
|
68421
|
+
var DYNAMIC_LINKER_ENV_VARS, ALLOW_DYNAMIC_LINKER_ENV_VAR;
|
|
68422
|
+
var init_dynamicLinkerEnv = __esm({
|
|
68423
|
+
"src/utils/dynamicLinkerEnv.ts"() {
|
|
68424
|
+
"use strict";
|
|
68425
|
+
init_import_meta_url();
|
|
68426
|
+
init_logger2();
|
|
68427
|
+
DYNAMIC_LINKER_ENV_VARS = [
|
|
68428
|
+
// Linux / glibc / musl
|
|
68429
|
+
"LD_PRELOAD",
|
|
68430
|
+
"LD_LIBRARY_PATH",
|
|
68431
|
+
"LD_AUDIT",
|
|
68432
|
+
// macOS dyld
|
|
68433
|
+
"DYLD_INSERT_LIBRARIES",
|
|
68434
|
+
"DYLD_LIBRARY_PATH",
|
|
68435
|
+
"DYLD_FRAMEWORK_PATH",
|
|
68436
|
+
"DYLD_FALLBACK_LIBRARY_PATH",
|
|
68437
|
+
"DYLD_FALLBACK_FRAMEWORK_PATH"
|
|
68438
|
+
];
|
|
68439
|
+
ALLOW_DYNAMIC_LINKER_ENV_VAR = "CRAFT_ALLOW_DYNAMIC_LINKER_ENV";
|
|
68440
|
+
}
|
|
68441
|
+
});
|
|
68442
|
+
|
|
68375
68443
|
// src/utils/system.ts
|
|
68376
68444
|
function stripEnv(options = {}) {
|
|
68377
68445
|
const copy = { ...options };
|
|
@@ -68421,6 +68489,7 @@ async function spawnProcess(command10, args = [], options = {}, spawnProcessOpti
|
|
|
68421
68489
|
const processedArgs = args.map(
|
|
68422
68490
|
(arg) => replaceEnvVariable(arg, { ...process.env, ...options.env })
|
|
68423
68491
|
);
|
|
68492
|
+
options.env = sanitizeSpawnEnv(options.env ?? process.env);
|
|
68424
68493
|
options.stdio = [
|
|
68425
68494
|
spawnProcessOptions.stdin !== void 0 ? "pipe" : "inherit",
|
|
68426
68495
|
"pipe",
|
|
@@ -68602,6 +68671,7 @@ var init_system = __esm({
|
|
|
68602
68671
|
init_errors2();
|
|
68603
68672
|
init_helpers();
|
|
68604
68673
|
init_dryRun();
|
|
68674
|
+
init_dynamicLinkerEnv();
|
|
68605
68675
|
HashAlgorithm = /* @__PURE__ */ ((HashAlgorithm3) => {
|
|
68606
68676
|
HashAlgorithm3["SHA256"] = "sha256";
|
|
68607
68677
|
HashAlgorithm3["SHA384"] = "sha384";
|
|
@@ -70009,17 +70079,17 @@ function requestLog(octokit) {
|
|
|
70009
70079
|
octokit.log.debug("request", options);
|
|
70010
70080
|
const start = Date.now();
|
|
70011
70081
|
const requestOptions = octokit.request.endpoint.parse(options);
|
|
70012
|
-
const
|
|
70082
|
+
const path18 = requestOptions.url.replace(options.baseUrl, "");
|
|
70013
70083
|
return request3(options).then((response) => {
|
|
70014
70084
|
const requestId = response.headers["x-github-request-id"];
|
|
70015
70085
|
octokit.log.info(
|
|
70016
|
-
`${requestOptions.method} ${
|
|
70086
|
+
`${requestOptions.method} ${path18} - ${response.status} with id ${requestId} in ${Date.now() - start}ms`
|
|
70017
70087
|
);
|
|
70018
70088
|
return response;
|
|
70019
70089
|
}).catch((error3) => {
|
|
70020
70090
|
const requestId = error3.response?.headers["x-github-request-id"] || "UNKNOWN";
|
|
70021
70091
|
octokit.log.error(
|
|
70022
|
-
`${requestOptions.method} ${
|
|
70092
|
+
`${requestOptions.method} ${path18} - ${error3.status} with id ${requestId} in ${Date.now() - start}ms`
|
|
70023
70093
|
);
|
|
70024
70094
|
throw error3;
|
|
70025
70095
|
});
|
|
@@ -74116,13 +74186,13 @@ function getGitHubClient(token = "") {
|
|
|
74116
74186
|
}
|
|
74117
74187
|
return _GitHubClientCache[githubApiToken];
|
|
74118
74188
|
}
|
|
74119
|
-
async function getFile(github, owner, repo,
|
|
74189
|
+
async function getFile(github, owner, repo, path18, ref) {
|
|
74120
74190
|
return withTracing(
|
|
74121
74191
|
async () => {
|
|
74122
74192
|
try {
|
|
74123
74193
|
const response = await github.repos.getContent({
|
|
74124
74194
|
owner,
|
|
74125
|
-
path:
|
|
74195
|
+
path: path18,
|
|
74126
74196
|
ref,
|
|
74127
74197
|
repo
|
|
74128
74198
|
});
|
|
@@ -74143,7 +74213,7 @@ async function getFile(github, owner, repo, path19, ref) {
|
|
|
74143
74213
|
attributes: {
|
|
74144
74214
|
"github.owner": owner,
|
|
74145
74215
|
"github.repo": repo,
|
|
74146
|
-
"github.path":
|
|
74216
|
+
"github.path": path18,
|
|
74147
74217
|
"github.ref": ref
|
|
74148
74218
|
}
|
|
74149
74219
|
}
|
|
@@ -74512,7 +74582,7 @@ var require_ignore = __commonJS({
|
|
|
74512
74582
|
// path matching.
|
|
74513
74583
|
// - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
|
|
74514
74584
|
// @returns {TestResult} true if a file is ignored
|
|
74515
|
-
test(
|
|
74585
|
+
test(path18, checkUnignored, mode) {
|
|
74516
74586
|
let ignored = false;
|
|
74517
74587
|
let unignored = false;
|
|
74518
74588
|
let matchedRule;
|
|
@@ -74521,7 +74591,7 @@ var require_ignore = __commonJS({
|
|
|
74521
74591
|
if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
|
|
74522
74592
|
return;
|
|
74523
74593
|
}
|
|
74524
|
-
const matched = rule[mode].test(
|
|
74594
|
+
const matched = rule[mode].test(path18);
|
|
74525
74595
|
if (!matched) {
|
|
74526
74596
|
return;
|
|
74527
74597
|
}
|
|
@@ -74542,17 +74612,17 @@ var require_ignore = __commonJS({
|
|
|
74542
74612
|
var throwError2 = (message, Ctor) => {
|
|
74543
74613
|
throw new Ctor(message);
|
|
74544
74614
|
};
|
|
74545
|
-
var checkPath = (
|
|
74546
|
-
if (!isString2(
|
|
74615
|
+
var checkPath = (path18, originalPath, doThrow) => {
|
|
74616
|
+
if (!isString2(path18)) {
|
|
74547
74617
|
return doThrow(
|
|
74548
74618
|
`path must be a string, but got \`${originalPath}\``,
|
|
74549
74619
|
TypeError
|
|
74550
74620
|
);
|
|
74551
74621
|
}
|
|
74552
|
-
if (!
|
|
74622
|
+
if (!path18) {
|
|
74553
74623
|
return doThrow(`path must not be empty`, TypeError);
|
|
74554
74624
|
}
|
|
74555
|
-
if (checkPath.isNotRelative(
|
|
74625
|
+
if (checkPath.isNotRelative(path18)) {
|
|
74556
74626
|
const r4 = "`path.relative()`d";
|
|
74557
74627
|
return doThrow(
|
|
74558
74628
|
`path should be a ${r4} string, but got "${originalPath}"`,
|
|
@@ -74561,7 +74631,7 @@ var require_ignore = __commonJS({
|
|
|
74561
74631
|
}
|
|
74562
74632
|
return true;
|
|
74563
74633
|
};
|
|
74564
|
-
var isNotRelative = (
|
|
74634
|
+
var isNotRelative = (path18) => REGEX_TEST_INVALID_PATH.test(path18);
|
|
74565
74635
|
checkPath.isNotRelative = isNotRelative;
|
|
74566
74636
|
checkPath.convert = (p5) => p5;
|
|
74567
74637
|
var Ignore3 = class {
|
|
@@ -74591,19 +74661,19 @@ var require_ignore = __commonJS({
|
|
|
74591
74661
|
}
|
|
74592
74662
|
// @returns {TestResult}
|
|
74593
74663
|
_test(originalPath, cache5, checkUnignored, slices) {
|
|
74594
|
-
const
|
|
74664
|
+
const path18 = originalPath && checkPath.convert(originalPath);
|
|
74595
74665
|
checkPath(
|
|
74596
|
-
|
|
74666
|
+
path18,
|
|
74597
74667
|
originalPath,
|
|
74598
74668
|
this._strictPathCheck ? throwError2 : RETURN_FALSE
|
|
74599
74669
|
);
|
|
74600
|
-
return this._t(
|
|
74670
|
+
return this._t(path18, cache5, checkUnignored, slices);
|
|
74601
74671
|
}
|
|
74602
|
-
checkIgnore(
|
|
74603
|
-
if (!REGEX_TEST_TRAILING_SLASH.test(
|
|
74604
|
-
return this.test(
|
|
74672
|
+
checkIgnore(path18) {
|
|
74673
|
+
if (!REGEX_TEST_TRAILING_SLASH.test(path18)) {
|
|
74674
|
+
return this.test(path18);
|
|
74605
74675
|
}
|
|
74606
|
-
const slices =
|
|
74676
|
+
const slices = path18.split(SLASH).filter(Boolean);
|
|
74607
74677
|
slices.pop();
|
|
74608
74678
|
if (slices.length) {
|
|
74609
74679
|
const parent = this._t(
|
|
@@ -74616,18 +74686,18 @@ var require_ignore = __commonJS({
|
|
|
74616
74686
|
return parent;
|
|
74617
74687
|
}
|
|
74618
74688
|
}
|
|
74619
|
-
return this._rules.test(
|
|
74689
|
+
return this._rules.test(path18, false, MODE_CHECK_IGNORE);
|
|
74620
74690
|
}
|
|
74621
|
-
_t(
|
|
74622
|
-
if (
|
|
74623
|
-
return cache5[
|
|
74691
|
+
_t(path18, cache5, checkUnignored, slices) {
|
|
74692
|
+
if (path18 in cache5) {
|
|
74693
|
+
return cache5[path18];
|
|
74624
74694
|
}
|
|
74625
74695
|
if (!slices) {
|
|
74626
|
-
slices =
|
|
74696
|
+
slices = path18.split(SLASH).filter(Boolean);
|
|
74627
74697
|
}
|
|
74628
74698
|
slices.pop();
|
|
74629
74699
|
if (!slices.length) {
|
|
74630
|
-
return cache5[
|
|
74700
|
+
return cache5[path18] = this._rules.test(path18, checkUnignored, MODE_IGNORE);
|
|
74631
74701
|
}
|
|
74632
74702
|
const parent = this._t(
|
|
74633
74703
|
slices.join(SLASH) + SLASH,
|
|
@@ -74635,29 +74705,29 @@ var require_ignore = __commonJS({
|
|
|
74635
74705
|
checkUnignored,
|
|
74636
74706
|
slices
|
|
74637
74707
|
);
|
|
74638
|
-
return cache5[
|
|
74708
|
+
return cache5[path18] = parent.ignored ? parent : this._rules.test(path18, checkUnignored, MODE_IGNORE);
|
|
74639
74709
|
}
|
|
74640
|
-
ignores(
|
|
74641
|
-
return this._test(
|
|
74710
|
+
ignores(path18) {
|
|
74711
|
+
return this._test(path18, this._ignoreCache, false).ignored;
|
|
74642
74712
|
}
|
|
74643
74713
|
createFilter() {
|
|
74644
|
-
return (
|
|
74714
|
+
return (path18) => !this.ignores(path18);
|
|
74645
74715
|
}
|
|
74646
74716
|
filter(paths) {
|
|
74647
74717
|
return makeArray(paths).filter(this.createFilter());
|
|
74648
74718
|
}
|
|
74649
74719
|
// @returns {TestResult}
|
|
74650
|
-
test(
|
|
74651
|
-
return this._test(
|
|
74720
|
+
test(path18) {
|
|
74721
|
+
return this._test(path18, this._testCache, true);
|
|
74652
74722
|
}
|
|
74653
74723
|
};
|
|
74654
74724
|
var factory = (options) => new Ignore3(options);
|
|
74655
|
-
var isPathValid = (
|
|
74725
|
+
var isPathValid = (path18) => checkPath(path18 && checkPath.convert(path18), path18, RETURN_FALSE);
|
|
74656
74726
|
var setupWindows = () => {
|
|
74657
74727
|
const makePosix = (str2) => /^\\\\\?\\/.test(str2) || /["<>|\u0000-\u001F]+/u.test(str2) ? str2 : str2.replace(/\\/g, "/");
|
|
74658
74728
|
checkPath.convert = makePosix;
|
|
74659
74729
|
const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
|
|
74660
|
-
checkPath.isNotRelative = (
|
|
74730
|
+
checkPath.isNotRelative = (path18) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path18) || isNotRelative(path18);
|
|
74661
74731
|
};
|
|
74662
74732
|
if (
|
|
74663
74733
|
// Detect `process` so that it can run in browsers.
|
|
@@ -74678,7 +74748,7 @@ var require_tmp = __commonJS({
|
|
|
74678
74748
|
init_import_meta_url();
|
|
74679
74749
|
var fs15 = require("fs");
|
|
74680
74750
|
var os6 = require("os");
|
|
74681
|
-
var
|
|
74751
|
+
var path18 = require("path");
|
|
74682
74752
|
var crypto9 = require("crypto");
|
|
74683
74753
|
var _c5 = { fs: fs15.constants, os: os6.constants };
|
|
74684
74754
|
var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
@@ -74885,35 +74955,35 @@ var require_tmp = __commonJS({
|
|
|
74885
74955
|
return [actualOptions, callback];
|
|
74886
74956
|
}
|
|
74887
74957
|
function _resolvePath(name, tmpDir, cb) {
|
|
74888
|
-
const pathToResolve =
|
|
74958
|
+
const pathToResolve = path18.isAbsolute(name) ? name : path18.join(tmpDir, name);
|
|
74889
74959
|
fs15.stat(pathToResolve, function(err) {
|
|
74890
74960
|
if (err) {
|
|
74891
|
-
fs15.realpath(
|
|
74961
|
+
fs15.realpath(path18.dirname(pathToResolve), function(err2, parentDir) {
|
|
74892
74962
|
if (err2) return cb(err2);
|
|
74893
|
-
cb(null,
|
|
74963
|
+
cb(null, path18.join(parentDir, path18.basename(pathToResolve)));
|
|
74894
74964
|
});
|
|
74895
74965
|
} else {
|
|
74896
|
-
fs15.realpath(
|
|
74966
|
+
fs15.realpath(path18, cb);
|
|
74897
74967
|
}
|
|
74898
74968
|
});
|
|
74899
74969
|
}
|
|
74900
74970
|
function _resolvePathSync(name, tmpDir) {
|
|
74901
|
-
const pathToResolve =
|
|
74971
|
+
const pathToResolve = path18.isAbsolute(name) ? name : path18.join(tmpDir, name);
|
|
74902
74972
|
try {
|
|
74903
74973
|
fs15.statSync(pathToResolve);
|
|
74904
74974
|
return fs15.realpathSync(pathToResolve);
|
|
74905
74975
|
} catch (_err) {
|
|
74906
|
-
const parentDir = fs15.realpathSync(
|
|
74907
|
-
return
|
|
74976
|
+
const parentDir = fs15.realpathSync(path18.dirname(pathToResolve));
|
|
74977
|
+
return path18.join(parentDir, path18.basename(pathToResolve));
|
|
74908
74978
|
}
|
|
74909
74979
|
}
|
|
74910
74980
|
function _generateTmpName(opts) {
|
|
74911
74981
|
const tmpDir = opts.tmpdir;
|
|
74912
74982
|
if (!_isUndefined(opts.name)) {
|
|
74913
|
-
return
|
|
74983
|
+
return path18.join(tmpDir, opts.dir, opts.name);
|
|
74914
74984
|
}
|
|
74915
74985
|
if (!_isUndefined(opts.template)) {
|
|
74916
|
-
return
|
|
74986
|
+
return path18.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6));
|
|
74917
74987
|
}
|
|
74918
74988
|
const name = [
|
|
74919
74989
|
opts.prefix ? opts.prefix : "tmp",
|
|
@@ -74923,13 +74993,13 @@ var require_tmp = __commonJS({
|
|
|
74923
74993
|
_randomChars(12),
|
|
74924
74994
|
opts.postfix ? "-" + opts.postfix : ""
|
|
74925
74995
|
].join("");
|
|
74926
|
-
return
|
|
74996
|
+
return path18.join(tmpDir, opts.dir, name);
|
|
74927
74997
|
}
|
|
74928
74998
|
function _assertOptionsBase(options) {
|
|
74929
74999
|
if (!_isUndefined(options.name)) {
|
|
74930
75000
|
const name = options.name;
|
|
74931
|
-
if (
|
|
74932
|
-
const basename10 =
|
|
75001
|
+
if (path18.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`);
|
|
75002
|
+
const basename10 = path18.basename(name);
|
|
74933
75003
|
if (basename10 === ".." || basename10 === "." || basename10 !== name)
|
|
74934
75004
|
throw new Error(`name option must not contain a path, found "${name}".`);
|
|
74935
75005
|
}
|
|
@@ -74951,7 +75021,7 @@ var require_tmp = __commonJS({
|
|
|
74951
75021
|
if (_isUndefined(name)) return cb(null);
|
|
74952
75022
|
_resolvePath(name, tmpDir, function(err, resolvedPath2) {
|
|
74953
75023
|
if (err) return cb(err);
|
|
74954
|
-
const relativePath =
|
|
75024
|
+
const relativePath = path18.relative(tmpDir, resolvedPath2);
|
|
74955
75025
|
if (!resolvedPath2.startsWith(tmpDir)) {
|
|
74956
75026
|
return cb(new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`));
|
|
74957
75027
|
}
|
|
@@ -74961,7 +75031,7 @@ var require_tmp = __commonJS({
|
|
|
74961
75031
|
function _getRelativePathSync(option, name, tmpDir) {
|
|
74962
75032
|
if (_isUndefined(name)) return;
|
|
74963
75033
|
const resolvedPath2 = _resolvePathSync(name, tmpDir);
|
|
74964
|
-
const relativePath =
|
|
75034
|
+
const relativePath = path18.relative(tmpDir, resolvedPath2);
|
|
74965
75035
|
if (!resolvedPath2.startsWith(tmpDir)) {
|
|
74966
75036
|
throw new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`);
|
|
74967
75037
|
}
|
|
@@ -82923,7 +82993,7 @@ var require_src34 = __commonJS({
|
|
|
82923
82993
|
var fs15 = require("fs");
|
|
82924
82994
|
var gaxios_1 = require_src31();
|
|
82925
82995
|
var jws = require_jws();
|
|
82926
|
-
var
|
|
82996
|
+
var path18 = require("path");
|
|
82927
82997
|
var util_1 = require("util");
|
|
82928
82998
|
var readFile4 = fs15.readFile ? (0, util_1.promisify)(fs15.readFile) : async () => {
|
|
82929
82999
|
throw new ErrorWithCode("use key rather than keyFile.", "MISSING_CREDENTIALS");
|
|
@@ -83011,7 +83081,7 @@ var require_src34 = __commonJS({
|
|
|
83011
83081
|
* @returns an object with privateKey and clientEmail properties
|
|
83012
83082
|
*/
|
|
83013
83083
|
async getCredentials(keyFile) {
|
|
83014
|
-
const ext2 =
|
|
83084
|
+
const ext2 = path18.extname(keyFile);
|
|
83015
83085
|
switch (ext2) {
|
|
83016
83086
|
case ".json": {
|
|
83017
83087
|
const key = await readFile4(keyFile, "utf8");
|
|
@@ -85219,7 +85289,7 @@ var require_pluggable_auth_handler = __commonJS({
|
|
|
85219
85289
|
exports2.PluggableAuthHandler = void 0;
|
|
85220
85290
|
var pluggable_auth_client_1 = require_pluggable_auth_client();
|
|
85221
85291
|
var executable_response_1 = require_executable_response();
|
|
85222
|
-
var
|
|
85292
|
+
var childProcess = require("child_process");
|
|
85223
85293
|
var fs15 = require("fs");
|
|
85224
85294
|
var PluggableAuthHandler = class _PluggableAuthHandler {
|
|
85225
85295
|
/**
|
|
@@ -85246,7 +85316,7 @@ var require_pluggable_auth_handler = __commonJS({
|
|
|
85246
85316
|
*/
|
|
85247
85317
|
retrieveResponseFromExecutable(envMap) {
|
|
85248
85318
|
return new Promise((resolve7, reject) => {
|
|
85249
|
-
const child =
|
|
85319
|
+
const child = childProcess.spawn(this.commandComponents[0], this.commandComponents.slice(1), {
|
|
85250
85320
|
env: { ...process.env, ...Object.fromEntries(envMap) }
|
|
85251
85321
|
});
|
|
85252
85322
|
let output = "";
|
|
@@ -85725,7 +85795,7 @@ var require_googleauth = __commonJS({
|
|
|
85725
85795
|
var fs15 = require("fs");
|
|
85726
85796
|
var gcpMetadata = require_src33();
|
|
85727
85797
|
var os6 = require("os");
|
|
85728
|
-
var
|
|
85798
|
+
var path18 = require("path");
|
|
85729
85799
|
var crypto_1 = require_crypto3();
|
|
85730
85800
|
var transporters_1 = require_transporters();
|
|
85731
85801
|
var computeclient_1 = require_computeclient();
|
|
@@ -85986,11 +86056,11 @@ var require_googleauth = __commonJS({
|
|
|
85986
86056
|
} else {
|
|
85987
86057
|
const home = process.env["HOME"];
|
|
85988
86058
|
if (home) {
|
|
85989
|
-
location =
|
|
86059
|
+
location = path18.join(home, ".config");
|
|
85990
86060
|
}
|
|
85991
86061
|
}
|
|
85992
86062
|
if (location) {
|
|
85993
|
-
location =
|
|
86063
|
+
location = path18.join(location, "gcloud", "application_default_credentials.json");
|
|
85994
86064
|
if (!fs15.existsSync(location)) {
|
|
85995
86065
|
location = null;
|
|
85996
86066
|
}
|
|
@@ -86408,7 +86478,7 @@ var require_googleauth = __commonJS({
|
|
|
86408
86478
|
if (this.jsonContent) {
|
|
86409
86479
|
return this._cacheClientFromJSON(this.jsonContent, this.clientOptions);
|
|
86410
86480
|
} else if (this.keyFilename) {
|
|
86411
|
-
const filePath =
|
|
86481
|
+
const filePath = path18.resolve(this.keyFilename);
|
|
86412
86482
|
const stream2 = fs15.createReadStream(filePath);
|
|
86413
86483
|
return await this.fromStreamAsync(stream2, this.clientOptions);
|
|
86414
86484
|
} else if (this.apiKey) {
|
|
@@ -92972,11 +93042,11 @@ var require_Mime = __commonJS({
|
|
|
92972
93042
|
}
|
|
92973
93043
|
}
|
|
92974
93044
|
};
|
|
92975
|
-
Mime.prototype.getType = function(
|
|
92976
|
-
|
|
92977
|
-
let last2 =
|
|
93045
|
+
Mime.prototype.getType = function(path18) {
|
|
93046
|
+
path18 = String(path18);
|
|
93047
|
+
let last2 = path18.replace(/^.*[/\\]/, "").toLowerCase();
|
|
92978
93048
|
let ext2 = last2.replace(/^.*\./, "").toLowerCase();
|
|
92979
|
-
let hasPath = last2.length <
|
|
93049
|
+
let hasPath = last2.length < path18.length;
|
|
92980
93050
|
let hasDot = ext2.length < last2.length - 1;
|
|
92981
93051
|
return (hasDot || !hasPath) && this._types[ext2] || null;
|
|
92982
93052
|
};
|
|
@@ -93750,10 +93820,10 @@ var init_acl = __esm({
|
|
|
93750
93820
|
get(optionsOrCallback, cb) {
|
|
93751
93821
|
const options = typeof optionsOrCallback === "object" ? optionsOrCallback : null;
|
|
93752
93822
|
const callback = typeof optionsOrCallback === "function" ? optionsOrCallback : cb;
|
|
93753
|
-
let
|
|
93823
|
+
let path18 = "";
|
|
93754
93824
|
const query = {};
|
|
93755
93825
|
if (options) {
|
|
93756
|
-
|
|
93826
|
+
path18 = "/" + encodeURIComponent(options.entity);
|
|
93757
93827
|
if (options.generation) {
|
|
93758
93828
|
query.generation = options.generation;
|
|
93759
93829
|
}
|
|
@@ -93762,7 +93832,7 @@ var init_acl = __esm({
|
|
|
93762
93832
|
}
|
|
93763
93833
|
}
|
|
93764
93834
|
this.request({
|
|
93765
|
-
uri:
|
|
93835
|
+
uri: path18,
|
|
93766
93836
|
qs: query
|
|
93767
93837
|
}, (err, resp) => {
|
|
93768
93838
|
if (err) {
|
|
@@ -95462,10 +95532,10 @@ var init_signer = __esm({
|
|
|
95462
95532
|
`;
|
|
95463
95533
|
}).join("");
|
|
95464
95534
|
}
|
|
95465
|
-
getCanonicalRequest(method,
|
|
95535
|
+
getCanonicalRequest(method, path18, query, headers, signedHeaders, contentSha256) {
|
|
95466
95536
|
return [
|
|
95467
95537
|
method,
|
|
95468
|
-
|
|
95538
|
+
path18,
|
|
95469
95539
|
query,
|
|
95470
95540
|
headers,
|
|
95471
95541
|
signedHeaders,
|
|
@@ -107814,15 +107884,15 @@ var require_route = __commonJS({
|
|
|
107814
107884
|
};
|
|
107815
107885
|
}
|
|
107816
107886
|
function wrapConversion(toModel, graph) {
|
|
107817
|
-
const
|
|
107887
|
+
const path18 = [graph[toModel].parent, toModel];
|
|
107818
107888
|
let fn2 = conversions[graph[toModel].parent][toModel];
|
|
107819
107889
|
let cur = graph[toModel].parent;
|
|
107820
107890
|
while (graph[cur].parent) {
|
|
107821
|
-
|
|
107891
|
+
path18.unshift(graph[cur].parent);
|
|
107822
107892
|
fn2 = link(conversions[graph[cur].parent][cur], fn2);
|
|
107823
107893
|
cur = graph[cur].parent;
|
|
107824
107894
|
}
|
|
107825
|
-
fn2.conversion =
|
|
107895
|
+
fn2.conversion = path18;
|
|
107826
107896
|
return fn2;
|
|
107827
107897
|
}
|
|
107828
107898
|
module2.exports = function(fromModel) {
|
|
@@ -113816,10 +113886,10 @@ var init_brew = __esm({
|
|
|
113816
113886
|
'Please specify Formula template in the "brew" target configuration.'
|
|
113817
113887
|
);
|
|
113818
113888
|
}
|
|
113819
|
-
const { formula, path:
|
|
113889
|
+
const { formula, path: path18 } = config3;
|
|
113820
113890
|
return {
|
|
113821
113891
|
formula,
|
|
113822
|
-
path:
|
|
113892
|
+
path: path18,
|
|
113823
113893
|
tapRepo: this.getTapRepo(),
|
|
113824
113894
|
template
|
|
113825
113895
|
};
|
|
@@ -113885,13 +113955,13 @@ var init_brew = __esm({
|
|
|
113885
113955
|
* @param path The path to the formula
|
|
113886
113956
|
* @returns The SHA of the file, if it exists; otherwise undefined
|
|
113887
113957
|
*/
|
|
113888
|
-
async getFormulaSha(
|
|
113958
|
+
async getFormulaSha(path18) {
|
|
113889
113959
|
try {
|
|
113890
113960
|
const tap = this.brewConfig.tapRepo;
|
|
113891
|
-
this.logger.debug(`Loading SHA for ${tap.owner}/${tap.repo}:${
|
|
113961
|
+
this.logger.debug(`Loading SHA for ${tap.owner}/${tap.repo}:${path18}`);
|
|
113892
113962
|
const response = await this.github.repos.getContent({
|
|
113893
113963
|
...tap,
|
|
113894
|
-
path:
|
|
113964
|
+
path: path18
|
|
113895
113965
|
});
|
|
113896
113966
|
if (response.data instanceof Array) {
|
|
113897
113967
|
return void 0;
|
|
@@ -113917,9 +113987,9 @@ var init_brew = __esm({
|
|
|
113917
113987
|
);
|
|
113918
113988
|
return void 0;
|
|
113919
113989
|
}
|
|
113920
|
-
const { path:
|
|
113990
|
+
const { path: path18, template, tapRepo } = this.brewConfig;
|
|
113921
113991
|
const formulaName = this.resolveFormulaName(version2);
|
|
113922
|
-
const formulaPath =
|
|
113992
|
+
const formulaPath = path18 ? `${path18}/${formulaName}.rb` : `Formula/${formulaName}.rb`;
|
|
113923
113993
|
const filesList = await this.getArtifactsForRevision(revision);
|
|
113924
113994
|
this.logger.debug("Downloading artifacts for the revision");
|
|
113925
113995
|
this.logger.trace(filesList.map((file) => file.filename));
|
|
@@ -115020,8 +115090,8 @@ var init_gem = __esm({
|
|
|
115020
115090
|
* @param path Absolute path to the archive to upload
|
|
115021
115091
|
* @returns A promise that resolves when the gem pushed
|
|
115022
115092
|
*/
|
|
115023
|
-
async pushGem(
|
|
115024
|
-
return spawnProcess(GEM_BIN, ["push",
|
|
115093
|
+
async pushGem(path18) {
|
|
115094
|
+
return spawnProcess(GEM_BIN, ["push", path18]);
|
|
115025
115095
|
}
|
|
115026
115096
|
/**
|
|
115027
115097
|
* Pushes a gem to rubygems.org
|
|
@@ -115040,9 +115110,9 @@ var init_gem = __esm({
|
|
|
115040
115110
|
}
|
|
115041
115111
|
await Promise.all(
|
|
115042
115112
|
packageFiles.map(async (file) => {
|
|
115043
|
-
const
|
|
115113
|
+
const path18 = await this.artifactProvider.downloadArtifact(file);
|
|
115044
115114
|
this.logger.info(`Pushing gem "${file.filename}"`);
|
|
115045
|
-
return this.pushGem(
|
|
115115
|
+
return this.pushGem(path18);
|
|
115046
115116
|
})
|
|
115047
115117
|
);
|
|
115048
115118
|
this.logger.info("Successfully registered gem");
|
|
@@ -117474,6 +117544,13 @@ var init_changelog = __esm({
|
|
|
117474
117544
|
commit_patterns: ["^(?<type>\\w+(?:\\((?<scope>[^)]+)\\))?!:\\s*)"],
|
|
117475
117545
|
semver: "major"
|
|
117476
117546
|
},
|
|
117547
|
+
{
|
|
117548
|
+
title: "Security \u{1F512}",
|
|
117549
|
+
commit_patterns: [
|
|
117550
|
+
"^(?<type>security(?:\\((?<scope>[^)]+)\\))?!?:\\s*)"
|
|
117551
|
+
],
|
|
117552
|
+
semver: "patch"
|
|
117553
|
+
},
|
|
117477
117554
|
{
|
|
117478
117555
|
title: "New Features \u2728",
|
|
117479
117556
|
commit_patterns: ["^(?<type>feat(?:\\((?<scope>[^)]+)\\))?!?:\\s*)"],
|
|
@@ -117728,8 +117805,8 @@ _This changelog has been truncated. See the [full changelog](${permalink}) for a
|
|
|
117728
117805
|
* @param path Filesystem (local) path of the file to upload
|
|
117729
117806
|
* @param contentType Optional content-type for uploading
|
|
117730
117807
|
*/
|
|
117731
|
-
async uploadAsset(release3,
|
|
117732
|
-
const name = (0, import_path11.basename)(
|
|
117808
|
+
async uploadAsset(release3, path18, contentType) {
|
|
117809
|
+
const name = (0, import_path11.basename)(path18);
|
|
117733
117810
|
return safeExec(async () => {
|
|
117734
117811
|
process.stderr.write(
|
|
117735
117812
|
`Uploading asset "${name}" to ${this.githubConfig.owner}/${this.githubConfig.repo}:${release3.tag_name}
|
|
@@ -117738,7 +117815,7 @@ _This changelog has been truncated. See the [full changelog](${permalink}) for a
|
|
|
117738
117815
|
try {
|
|
117739
117816
|
const { url: url2 } = await this.handleGitHubUpload(
|
|
117740
117817
|
release3,
|
|
117741
|
-
|
|
117818
|
+
path18,
|
|
117742
117819
|
contentType
|
|
117743
117820
|
);
|
|
117744
117821
|
process.stderr.write(`\u2714 Uploaded asset "${name}".
|
|
@@ -117751,11 +117828,11 @@ _This changelog has been truncated. See the [full changelog](${permalink}) for a
|
|
|
117751
117828
|
}
|
|
117752
117829
|
}, `github.repos.uploadReleaseAsset(${name})`);
|
|
117753
117830
|
}
|
|
117754
|
-
async handleGitHubUpload(release3,
|
|
117831
|
+
async handleGitHubUpload(release3, path18, contentType, retries = 3) {
|
|
117755
117832
|
const contentTypeProcessed = contentType || DEFAULT_CONTENT_TYPE;
|
|
117756
|
-
const stats = (0, import_fs10.statSync)(
|
|
117757
|
-
const name = (0, import_path11.basename)(
|
|
117758
|
-
const file = (0, import_fs10.createReadStream)(
|
|
117833
|
+
const stats = (0, import_fs10.statSync)(path18);
|
|
117834
|
+
const name = (0, import_path11.basename)(path18);
|
|
117835
|
+
const file = (0, import_fs10.createReadStream)(path18);
|
|
117759
117836
|
const params = {
|
|
117760
117837
|
...this.githubConfig,
|
|
117761
117838
|
headers: {
|
|
@@ -117794,7 +117871,7 @@ _This changelog has been truncated. See the [full changelog](${permalink}) for a
|
|
|
117794
117871
|
"Got an error when trying to upload an asset, deleting and retrying..."
|
|
117795
117872
|
);
|
|
117796
117873
|
await this.deleteAssetByName(params.release_id, params.name);
|
|
117797
|
-
return this.handleGitHubUpload(release3,
|
|
117874
|
+
return this.handleGitHubUpload(release3, path18, contentType, --retries);
|
|
117798
117875
|
} finally {
|
|
117799
117876
|
file.destroy();
|
|
117800
117877
|
}
|
|
@@ -117948,7 +118025,7 @@ _This changelog has been truncated. See the [full changelog](${permalink}) for a
|
|
|
117948
118025
|
try {
|
|
117949
118026
|
await Promise.all(
|
|
117950
118027
|
localArtifacts.map(
|
|
117951
|
-
({ path:
|
|
118028
|
+
({ path: path18, mimeType }) => this.uploadAsset(draftRelease, path18, mimeType)
|
|
117952
118029
|
)
|
|
117953
118030
|
);
|
|
117954
118031
|
await this.publishRelease(draftRelease, { makeLatest });
|
|
@@ -120544,12 +120621,12 @@ var init_esm14 = __esm({
|
|
|
120544
120621
|
/**
|
|
120545
120622
|
* Get the Path object referenced by the string path, resolved from this Path
|
|
120546
120623
|
*/
|
|
120547
|
-
resolve(
|
|
120548
|
-
if (!
|
|
120624
|
+
resolve(path18) {
|
|
120625
|
+
if (!path18) {
|
|
120549
120626
|
return this;
|
|
120550
120627
|
}
|
|
120551
|
-
const rootPath = this.getRootString(
|
|
120552
|
-
const dir =
|
|
120628
|
+
const rootPath = this.getRootString(path18);
|
|
120629
|
+
const dir = path18.substring(rootPath.length);
|
|
120553
120630
|
const dirParts = dir.split(this.splitSep);
|
|
120554
120631
|
const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts);
|
|
120555
120632
|
return result;
|
|
@@ -121301,8 +121378,8 @@ var init_esm14 = __esm({
|
|
|
121301
121378
|
/**
|
|
121302
121379
|
* @internal
|
|
121303
121380
|
*/
|
|
121304
|
-
getRootString(
|
|
121305
|
-
return import_node_path15.win32.parse(
|
|
121381
|
+
getRootString(path18) {
|
|
121382
|
+
return import_node_path15.win32.parse(path18).root;
|
|
121306
121383
|
}
|
|
121307
121384
|
/**
|
|
121308
121385
|
* @internal
|
|
@@ -121348,8 +121425,8 @@ var init_esm14 = __esm({
|
|
|
121348
121425
|
/**
|
|
121349
121426
|
* @internal
|
|
121350
121427
|
*/
|
|
121351
|
-
getRootString(
|
|
121352
|
-
return
|
|
121428
|
+
getRootString(path18) {
|
|
121429
|
+
return path18.startsWith("/") ? "/" : "";
|
|
121353
121430
|
}
|
|
121354
121431
|
/**
|
|
121355
121432
|
* @internal
|
|
@@ -121438,11 +121515,11 @@ var init_esm14 = __esm({
|
|
|
121438
121515
|
/**
|
|
121439
121516
|
* Get the depth of a provided path, string, or the cwd
|
|
121440
121517
|
*/
|
|
121441
|
-
depth(
|
|
121442
|
-
if (typeof
|
|
121443
|
-
|
|
121518
|
+
depth(path18 = this.cwd) {
|
|
121519
|
+
if (typeof path18 === "string") {
|
|
121520
|
+
path18 = this.cwd.resolve(path18);
|
|
121444
121521
|
}
|
|
121445
|
-
return
|
|
121522
|
+
return path18.depth();
|
|
121446
121523
|
}
|
|
121447
121524
|
/**
|
|
121448
121525
|
* Return the cache of child entries. Exposed so subclasses can create
|
|
@@ -121929,9 +122006,9 @@ var init_esm14 = __esm({
|
|
|
121929
122006
|
process2();
|
|
121930
122007
|
return results;
|
|
121931
122008
|
}
|
|
121932
|
-
chdir(
|
|
122009
|
+
chdir(path18 = this.cwd) {
|
|
121933
122010
|
const oldCwd = this.cwd;
|
|
121934
|
-
this.cwd = typeof
|
|
122011
|
+
this.cwd = typeof path18 === "string" ? this.cwd.resolve(path18) : path18;
|
|
121935
122012
|
this.cwd[setAsCwd](oldCwd);
|
|
121936
122013
|
}
|
|
121937
122014
|
};
|
|
@@ -123129,10 +123206,10 @@ var init_ignore = __esm({
|
|
|
123129
123206
|
ignored(p5) {
|
|
123130
123207
|
const fullpath = p5.fullpath();
|
|
123131
123208
|
const fullpaths = `${fullpath}/`;
|
|
123132
|
-
const
|
|
123133
|
-
const relatives = `${
|
|
123209
|
+
const relative6 = p5.relative() || ".";
|
|
123210
|
+
const relatives = `${relative6}/`;
|
|
123134
123211
|
for (const m6 of this.relative) {
|
|
123135
|
-
if (m6.match(
|
|
123212
|
+
if (m6.match(relative6) || m6.match(relatives))
|
|
123136
123213
|
return true;
|
|
123137
123214
|
}
|
|
123138
123215
|
for (const m6 of this.absolute) {
|
|
@@ -123143,9 +123220,9 @@ var init_ignore = __esm({
|
|
|
123143
123220
|
}
|
|
123144
123221
|
childrenIgnored(p5) {
|
|
123145
123222
|
const fullpath = p5.fullpath() + "/";
|
|
123146
|
-
const
|
|
123223
|
+
const relative6 = (p5.relative() || ".") + "/";
|
|
123147
123224
|
for (const m6 of this.relativeChildren) {
|
|
123148
|
-
if (m6.match(
|
|
123225
|
+
if (m6.match(relative6))
|
|
123149
123226
|
return true;
|
|
123150
123227
|
}
|
|
123151
123228
|
for (const m6 of this.absoluteChildren) {
|
|
@@ -123193,8 +123270,8 @@ var init_processor = __esm({
|
|
|
123193
123270
|
}
|
|
123194
123271
|
// match, absolute, ifdir
|
|
123195
123272
|
entries() {
|
|
123196
|
-
return [...this.store.entries()].map(([
|
|
123197
|
-
|
|
123273
|
+
return [...this.store.entries()].map(([path18, n4]) => [
|
|
123274
|
+
path18,
|
|
123198
123275
|
!!(n4 & 2),
|
|
123199
123276
|
!!(n4 & 1)
|
|
123200
123277
|
]);
|
|
@@ -123408,9 +123485,9 @@ var init_walker = __esm({
|
|
|
123408
123485
|
signal;
|
|
123409
123486
|
maxDepth;
|
|
123410
123487
|
includeChildMatches;
|
|
123411
|
-
constructor(patterns,
|
|
123488
|
+
constructor(patterns, path18, opts) {
|
|
123412
123489
|
this.patterns = patterns;
|
|
123413
|
-
this.path =
|
|
123490
|
+
this.path = path18;
|
|
123414
123491
|
this.opts = opts;
|
|
123415
123492
|
this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/";
|
|
123416
123493
|
this.includeChildMatches = opts.includeChildMatches !== false;
|
|
@@ -123429,11 +123506,11 @@ var init_walker = __esm({
|
|
|
123429
123506
|
});
|
|
123430
123507
|
}
|
|
123431
123508
|
}
|
|
123432
|
-
#ignored(
|
|
123433
|
-
return this.seen.has(
|
|
123509
|
+
#ignored(path18) {
|
|
123510
|
+
return this.seen.has(path18) || !!this.#ignore?.ignored?.(path18);
|
|
123434
123511
|
}
|
|
123435
|
-
#childrenIgnored(
|
|
123436
|
-
return !!this.#ignore?.childrenIgnored?.(
|
|
123512
|
+
#childrenIgnored(path18) {
|
|
123513
|
+
return !!this.#ignore?.childrenIgnored?.(path18);
|
|
123437
123514
|
}
|
|
123438
123515
|
// backpressure mechanism
|
|
123439
123516
|
pause() {
|
|
@@ -123648,8 +123725,8 @@ var init_walker = __esm({
|
|
|
123648
123725
|
};
|
|
123649
123726
|
GlobWalker = class extends GlobUtil {
|
|
123650
123727
|
matches = /* @__PURE__ */ new Set();
|
|
123651
|
-
constructor(patterns,
|
|
123652
|
-
super(patterns,
|
|
123728
|
+
constructor(patterns, path18, opts) {
|
|
123729
|
+
super(patterns, path18, opts);
|
|
123653
123730
|
}
|
|
123654
123731
|
matchEmit(e4) {
|
|
123655
123732
|
this.matches.add(e4);
|
|
@@ -123686,8 +123763,8 @@ var init_walker = __esm({
|
|
|
123686
123763
|
};
|
|
123687
123764
|
GlobStream = class extends GlobUtil {
|
|
123688
123765
|
results;
|
|
123689
|
-
constructor(patterns,
|
|
123690
|
-
super(patterns,
|
|
123766
|
+
constructor(patterns, path18, opts) {
|
|
123767
|
+
super(patterns, path18, opts);
|
|
123691
123768
|
this.results = new Minipass2({
|
|
123692
123769
|
signal: this.signal,
|
|
123693
123770
|
objectMode: true
|
|
@@ -124303,6 +124380,7 @@ var init_npm = __esm({
|
|
|
124303
124380
|
import_fs13 = require("fs");
|
|
124304
124381
|
import_path12 = require("path");
|
|
124305
124382
|
import_prompts2 = __toESM(require_prompts3());
|
|
124383
|
+
init_dryRun();
|
|
124306
124384
|
init_errors2();
|
|
124307
124385
|
init_filters();
|
|
124308
124386
|
init_helpers();
|
|
@@ -124465,16 +124543,31 @@ var init_npm = __esm({
|
|
|
124465
124543
|
);
|
|
124466
124544
|
try {
|
|
124467
124545
|
await spawnProcess(bin, workspaceArgs, { cwd: rootDir });
|
|
124468
|
-
} catch {
|
|
124469
|
-
|
|
124470
|
-
"npm --workspaces failed
|
|
124471
|
-
|
|
124472
|
-
|
|
124473
|
-
bin,
|
|
124546
|
+
} catch (err) {
|
|
124547
|
+
if (isDryRun()) {
|
|
124548
|
+
logger.debug("npm --workspaces failed in dry-run mode, skipping");
|
|
124549
|
+
} else if (_NpmTarget.allWorkspacePackageJsonsMatch(
|
|
124550
|
+
rootDir,
|
|
124474
124551
|
workspaces.packages,
|
|
124475
|
-
newVersion
|
|
124476
|
-
|
|
124477
|
-
|
|
124552
|
+
newVersion
|
|
124553
|
+
)) {
|
|
124554
|
+
logger.warn(
|
|
124555
|
+
`npm version --workspaces exited non-zero but every workspace package.json was successfully bumped to the target version. This is likely caused by "workspace:*" dependency protocols tripping npm's URL validator \u2014 see https://github.com/npm/cli/issues/8845. Treating the bump as successful.`
|
|
124556
|
+
);
|
|
124557
|
+
logger.debug(
|
|
124558
|
+
`npm --workspaces error (ignored): ${err?.message ?? err}`
|
|
124559
|
+
);
|
|
124560
|
+
} else {
|
|
124561
|
+
logger.debug(
|
|
124562
|
+
"npm --workspaces failed, falling back to individual package bumping"
|
|
124563
|
+
);
|
|
124564
|
+
await _NpmTarget.bumpWorkspacePackagesIndividually(
|
|
124565
|
+
bin,
|
|
124566
|
+
workspaces.packages,
|
|
124567
|
+
newVersion,
|
|
124568
|
+
baseArgs
|
|
124569
|
+
);
|
|
124570
|
+
}
|
|
124478
124571
|
}
|
|
124479
124572
|
} else {
|
|
124480
124573
|
await _NpmTarget.bumpWorkspacePackagesIndividually(
|
|
@@ -124487,13 +124580,56 @@ var init_npm = __esm({
|
|
|
124487
124580
|
logger.info(
|
|
124488
124581
|
`Bumped version in root and ${workspaces.packages.length} workspace packages`
|
|
124489
124582
|
);
|
|
124583
|
+
_NpmTarget.patchBunLock(rootDir, workspaces.packages, newVersion);
|
|
124584
|
+
}
|
|
124585
|
+
return true;
|
|
124586
|
+
}
|
|
124587
|
+
/**
|
|
124588
|
+
* Read the `version` field from a package.json file.
|
|
124589
|
+
* Returns undefined if the file is missing, unreadable, or malformed.
|
|
124590
|
+
*/
|
|
124591
|
+
static readPackageJsonVersion(packageJsonPath) {
|
|
124592
|
+
try {
|
|
124593
|
+
const parsed = JSON.parse((0, import_fs13.readFileSync)(packageJsonPath, "utf-8"));
|
|
124594
|
+
return typeof parsed.version === "string" ? parsed.version : void 0;
|
|
124595
|
+
} catch {
|
|
124596
|
+
return void 0;
|
|
124597
|
+
}
|
|
124598
|
+
}
|
|
124599
|
+
/**
|
|
124600
|
+
* Check whether every package.json file (root + each workspace package that
|
|
124601
|
+
* exists on disk and is not private) has the expected version string.
|
|
124602
|
+
*
|
|
124603
|
+
* Used to detect the npm/cli#8845 case where `npm version --workspaces`
|
|
124604
|
+
* successfully writes every version field but then exits non-zero.
|
|
124605
|
+
*/
|
|
124606
|
+
static allWorkspacePackageJsonsMatch(rootDir, packages, expectedVersion) {
|
|
124607
|
+
const rootVersion = _NpmTarget.readPackageJsonVersion(
|
|
124608
|
+
(0, import_path12.join)(rootDir, "package.json")
|
|
124609
|
+
);
|
|
124610
|
+
if (rootVersion !== expectedVersion) {
|
|
124611
|
+
return false;
|
|
124612
|
+
}
|
|
124613
|
+
for (const pkg of packages) {
|
|
124614
|
+
const pkgJsonPath = (0, import_path12.join)(pkg.location, "package.json");
|
|
124615
|
+
if (!(0, import_fs13.existsSync)(pkgJsonPath)) {
|
|
124616
|
+
continue;
|
|
124617
|
+
}
|
|
124618
|
+
if (_NpmTarget.readPackageJsonVersion(pkgJsonPath) !== expectedVersion) {
|
|
124619
|
+
return false;
|
|
124620
|
+
}
|
|
124490
124621
|
}
|
|
124491
124622
|
return true;
|
|
124492
124623
|
}
|
|
124493
124624
|
/**
|
|
124494
|
-
* Bump version in each workspace package individually
|
|
124625
|
+
* Bump version in each workspace package individually.
|
|
124626
|
+
*
|
|
124627
|
+
* Applies the same post-check as the --workspaces path: if a per-package
|
|
124628
|
+
* `npm version` spawn fails but the file on disk already has the target
|
|
124629
|
+
* version (npm/cli#8845), treat it as success and continue. Otherwise
|
|
124630
|
+
* rethrow so the caller fails loudly.
|
|
124495
124631
|
*/
|
|
124496
|
-
static async bumpWorkspacePackagesIndividually(bin, packages,
|
|
124632
|
+
static async bumpWorkspacePackagesIndividually(bin, packages, newVersion, baseArgs) {
|
|
124497
124633
|
for (const pkg of packages) {
|
|
124498
124634
|
const pkgJsonPath = (0, import_path12.join)(pkg.location, "package.json");
|
|
124499
124635
|
if (!(0, import_fs13.existsSync)(pkgJsonPath)) {
|
|
@@ -124510,8 +124646,93 @@ var init_npm = __esm({
|
|
|
124510
124646
|
continue;
|
|
124511
124647
|
}
|
|
124512
124648
|
logger.debug(`Bumping version for workspace package: ${pkg.name}`);
|
|
124513
|
-
|
|
124649
|
+
try {
|
|
124650
|
+
await spawnProcess(bin, baseArgs, { cwd: pkg.location });
|
|
124651
|
+
} catch (err) {
|
|
124652
|
+
if (isDryRun()) {
|
|
124653
|
+
continue;
|
|
124654
|
+
}
|
|
124655
|
+
const actualVersion = _NpmTarget.readPackageJsonVersion(pkgJsonPath);
|
|
124656
|
+
if (actualVersion === newVersion) {
|
|
124657
|
+
logger.warn(
|
|
124658
|
+
`npm version for ${pkg.name} exited non-zero but package.json was successfully bumped to ${newVersion}. Likely caused by "workspace:*" dependency protocols \u2014 see https://github.com/npm/cli/issues/8845. Continuing.`
|
|
124659
|
+
);
|
|
124660
|
+
logger.debug(
|
|
124661
|
+
`npm version error for ${pkg.name} (ignored): ${err?.message ?? err}`
|
|
124662
|
+
);
|
|
124663
|
+
} else {
|
|
124664
|
+
throw err;
|
|
124665
|
+
}
|
|
124666
|
+
}
|
|
124667
|
+
}
|
|
124668
|
+
}
|
|
124669
|
+
/**
|
|
124670
|
+
* Patch workspace `version` entries in `bun.lock` if the file exists.
|
|
124671
|
+
*
|
|
124672
|
+
* `bun pm pack` rewrites `workspace:*` dependency specifiers to concrete
|
|
124673
|
+
* versions at pack time, reading those versions FROM `bun.lock` — not from
|
|
124674
|
+
* the workspace `package.json`. Neither `npm version` nor `bun install`
|
|
124675
|
+
* updates those lockfile entries, so after a version bump the lockfile
|
|
124676
|
+
* still records the old workspace version, and published tarballs ship
|
|
124677
|
+
* with stale `dependencies` that fail to install.
|
|
124678
|
+
*
|
|
124679
|
+
* We patch the lockfile in-place with a per-workspace regex that matches
|
|
124680
|
+
* the workspace's path-relative key ("packages/foo": {) and replaces the
|
|
124681
|
+
* first subsequent `"version": "..."` line. This leaves nested dependency
|
|
124682
|
+
* version pins inside the same block untouched.
|
|
124683
|
+
*
|
|
124684
|
+
* Writes go through `safeFs.writeFileSync` so dry-run mode is respected.
|
|
124685
|
+
*
|
|
124686
|
+
* No-op if bun.lock is absent or no workspace entries match (logged).
|
|
124687
|
+
*
|
|
124688
|
+
* See https://github.com/getsentry/craft/issues/804
|
|
124689
|
+
*/
|
|
124690
|
+
static patchBunLock(rootDir, packages, newVersion) {
|
|
124691
|
+
const bunLockPath = (0, import_path12.join)(rootDir, "bun.lock");
|
|
124692
|
+
if (!(0, import_fs13.existsSync)(bunLockPath)) {
|
|
124693
|
+
return;
|
|
124694
|
+
}
|
|
124695
|
+
let content;
|
|
124696
|
+
try {
|
|
124697
|
+
content = (0, import_fs13.readFileSync)(bunLockPath, "utf-8");
|
|
124698
|
+
} catch (err) {
|
|
124699
|
+
logger.warn(
|
|
124700
|
+
`Could not read bun.lock: ${err?.message ?? err}. Skipping lockfile patch.`
|
|
124701
|
+
);
|
|
124702
|
+
return;
|
|
124703
|
+
}
|
|
124704
|
+
let patchedCount = 0;
|
|
124705
|
+
for (const pkg of packages) {
|
|
124706
|
+
const relPath = (0, import_path12.relative)(rootDir, pkg.location).split(import_path12.sep).join("/");
|
|
124707
|
+
if (!relPath || relPath.startsWith("..")) {
|
|
124708
|
+
continue;
|
|
124709
|
+
}
|
|
124710
|
+
const escapedPath = escapeRegex(relPath);
|
|
124711
|
+
const pattern = new RegExp(
|
|
124712
|
+
`("${escapedPath}":\\s*\\{[^{}]*?)"version":\\s*"[^"]*"`
|
|
124713
|
+
);
|
|
124714
|
+
const replaced = content.replace(
|
|
124715
|
+
pattern,
|
|
124716
|
+
(_m3, prefix) => `${prefix}"version": "${newVersion}"`
|
|
124717
|
+
);
|
|
124718
|
+
if (replaced !== content) {
|
|
124719
|
+
content = replaced;
|
|
124720
|
+
patchedCount += 1;
|
|
124721
|
+
logger.debug(
|
|
124722
|
+
`Patched bun.lock workspace version for ${pkg.name} (${relPath})`
|
|
124723
|
+
);
|
|
124724
|
+
}
|
|
124725
|
+
}
|
|
124726
|
+
if (patchedCount === 0) {
|
|
124727
|
+
logger.warn(
|
|
124728
|
+
"bun.lock exists but no workspace entries matched the discovered packages; leaving it untouched. Your lockfile may be out of sync with package.json workspaces."
|
|
124729
|
+
);
|
|
124730
|
+
return;
|
|
124514
124731
|
}
|
|
124732
|
+
safeFs.writeFileSync(bunLockPath, content);
|
|
124733
|
+
logger.info(
|
|
124734
|
+
`Patched ${patchedCount} workspace version entr${patchedCount === 1 ? "y" : "ies"} in bun.lock`
|
|
124735
|
+
);
|
|
124515
124736
|
}
|
|
124516
124737
|
constructor(config3, artifactProvider) {
|
|
124517
124738
|
super(config3, artifactProvider);
|
|
@@ -124649,7 +124870,7 @@ var init_npm = __esm({
|
|
|
124649
124870
|
* @param path Absolute path to the tarball to upload
|
|
124650
124871
|
* @returns A promise that resolves when the upload has completed
|
|
124651
124872
|
*/
|
|
124652
|
-
async publishPackage(
|
|
124873
|
+
async publishPackage(path18, options) {
|
|
124653
124874
|
const args = ["publish", "--ignore-scripts"];
|
|
124654
124875
|
let bin;
|
|
124655
124876
|
if (this.npmConfig.useYarn) {
|
|
@@ -124665,7 +124886,7 @@ var init_npm = __esm({
|
|
|
124665
124886
|
if (options.tag) {
|
|
124666
124887
|
args.push(`--tag=${options.tag}`);
|
|
124667
124888
|
}
|
|
124668
|
-
args.push(
|
|
124889
|
+
args.push(path18);
|
|
124669
124890
|
if (this.npmConfig.useOidc) {
|
|
124670
124891
|
const spawnOptions = {};
|
|
124671
124892
|
spawnOptions.env = { ...process.env };
|
|
@@ -124723,9 +124944,9 @@ var init_npm = __esm({
|
|
|
124723
124944
|
}
|
|
124724
124945
|
await Promise.all(
|
|
124725
124946
|
packageFiles.map(async (file) => {
|
|
124726
|
-
const
|
|
124947
|
+
const path18 = await this.artifactProvider.downloadArtifact(file);
|
|
124727
124948
|
this.logger.info(`Releasing ${file.filename} to NPM`);
|
|
124728
|
-
return this.publishPackage(
|
|
124949
|
+
return this.publishPackage(path18, publishOptions);
|
|
124729
124950
|
})
|
|
124730
124951
|
);
|
|
124731
124952
|
this.logger.info("NPM release complete");
|
|
@@ -124867,11 +125088,11 @@ var init_nuget = __esm({
|
|
|
124867
125088
|
* @param path Absolute path to the archive to upload
|
|
124868
125089
|
* @returns A promise that resolves when the upload has completed
|
|
124869
125090
|
*/
|
|
124870
|
-
async uploadAsset(
|
|
125091
|
+
async uploadAsset(path18) {
|
|
124871
125092
|
const args = [
|
|
124872
125093
|
"nuget",
|
|
124873
125094
|
"push",
|
|
124874
|
-
|
|
125095
|
+
path18,
|
|
124875
125096
|
"--api-key",
|
|
124876
125097
|
"${NUGET_API_TOKEN}",
|
|
124877
125098
|
// Warning: `--skip-duplicate` means we will NOT error when a version
|
|
@@ -124914,7 +125135,7 @@ var init_nuget = __esm({
|
|
|
124914
125135
|
);
|
|
124915
125136
|
await Promise.all(
|
|
124916
125137
|
packageFiles.map(async (file) => {
|
|
124917
|
-
const
|
|
125138
|
+
const path18 = await this.artifactProvider.downloadArtifact(file);
|
|
124918
125139
|
const symbolFileName = file.filename.replace(".nupkg", ".snupkg");
|
|
124919
125140
|
const symbolFile = symbolFiles.find((f5) => f5.filename === symbolFileName);
|
|
124920
125141
|
if (symbolFile) {
|
|
@@ -124923,7 +125144,7 @@ var init_nuget = __esm({
|
|
|
124923
125144
|
this.logger.info(
|
|
124924
125145
|
`Uploading file "${file.filename}" via "dotnet nuget"` + (symbolFile ? `, including symbol file "${symbolFile.filename}"` : "")
|
|
124925
125146
|
);
|
|
124926
|
-
return this.uploadAsset(
|
|
125147
|
+
return this.uploadAsset(path18);
|
|
124927
125148
|
})
|
|
124928
125149
|
);
|
|
124929
125150
|
this.logger.info("Nuget release complete");
|
|
@@ -126221,14 +126442,14 @@ var require_aws4 = __commonJS({
|
|
|
126221
126442
|
}
|
|
126222
126443
|
if (pathStr !== "/") {
|
|
126223
126444
|
if (normalizePath2) pathStr = pathStr.replace(/\/{2,}/g, "/");
|
|
126224
|
-
pathStr = pathStr.split("/").reduce(function(
|
|
126445
|
+
pathStr = pathStr.split("/").reduce(function(path18, piece) {
|
|
126225
126446
|
if (normalizePath2 && piece === "..") {
|
|
126226
|
-
|
|
126447
|
+
path18.pop();
|
|
126227
126448
|
} else if (!normalizePath2 || piece !== ".") {
|
|
126228
126449
|
if (decodePath) piece = decodeURIComponent(piece.replace(/\+/g, " "));
|
|
126229
|
-
|
|
126450
|
+
path18.push(encodeRfc3986Full(piece));
|
|
126230
126451
|
}
|
|
126231
|
-
return
|
|
126452
|
+
return path18;
|
|
126232
126453
|
}, []).join("/");
|
|
126233
126454
|
if (pathStr[0] !== "/") pathStr = "/" + pathStr;
|
|
126234
126455
|
if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, "/");
|
|
@@ -126281,25 +126502,25 @@ var require_aws4 = __commonJS({
|
|
|
126281
126502
|
};
|
|
126282
126503
|
};
|
|
126283
126504
|
RequestSigner.prototype.parsePath = function() {
|
|
126284
|
-
var
|
|
126285
|
-
if (/[^0-9A-Za-z;,/?:@&=+$\-_.!~*'()#%]/.test(
|
|
126286
|
-
|
|
126505
|
+
var path18 = this.request.path || "/";
|
|
126506
|
+
if (/[^0-9A-Za-z;,/?:@&=+$\-_.!~*'()#%]/.test(path18)) {
|
|
126507
|
+
path18 = encodeURI(decodeURI(path18));
|
|
126287
126508
|
}
|
|
126288
|
-
var queryIx =
|
|
126509
|
+
var queryIx = path18.indexOf("?"), query = null;
|
|
126289
126510
|
if (queryIx >= 0) {
|
|
126290
|
-
query = querystring2.parse(
|
|
126291
|
-
|
|
126511
|
+
query = querystring2.parse(path18.slice(queryIx + 1));
|
|
126512
|
+
path18 = path18.slice(0, queryIx);
|
|
126292
126513
|
}
|
|
126293
126514
|
this.parsedPath = {
|
|
126294
|
-
path:
|
|
126515
|
+
path: path18,
|
|
126295
126516
|
query
|
|
126296
126517
|
};
|
|
126297
126518
|
};
|
|
126298
126519
|
RequestSigner.prototype.formatPath = function() {
|
|
126299
|
-
var
|
|
126300
|
-
if (!query) return
|
|
126520
|
+
var path18 = this.parsedPath.path, query = this.parsedPath.query;
|
|
126521
|
+
if (!query) return path18;
|
|
126301
126522
|
if (query[""] != null) delete query[""];
|
|
126302
|
-
return
|
|
126523
|
+
return path18 + "?" + encodeRfc3986(querystring2.stringify(query));
|
|
126303
126524
|
};
|
|
126304
126525
|
aws42.RequestSigner = RequestSigner;
|
|
126305
126526
|
aws42.sign = function(request3, credentials) {
|
|
@@ -127219,9 +127440,9 @@ var init_createPaginator = __esm({
|
|
|
127219
127440
|
command10 = withCommand(command10) ?? command10;
|
|
127220
127441
|
return await client.send(command10, ...args);
|
|
127221
127442
|
};
|
|
127222
|
-
get = (fromObject,
|
|
127443
|
+
get = (fromObject, path18) => {
|
|
127223
127444
|
let cursor2 = fromObject;
|
|
127224
|
-
const pathComponents =
|
|
127445
|
+
const pathComponents = path18.split(".");
|
|
127225
127446
|
for (const step of pathComponents) {
|
|
127226
127447
|
if (!cursor2 || typeof cursor2 !== "object") {
|
|
127227
127448
|
return void 0;
|
|
@@ -128253,12 +128474,12 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
128253
128474
|
const password = request3.password ?? "";
|
|
128254
128475
|
auth2 = `${username}:${password}`;
|
|
128255
128476
|
}
|
|
128256
|
-
let
|
|
128477
|
+
let path18 = request3.path;
|
|
128257
128478
|
if (queryString) {
|
|
128258
|
-
|
|
128479
|
+
path18 += `?${queryString}`;
|
|
128259
128480
|
}
|
|
128260
128481
|
if (request3.fragment) {
|
|
128261
|
-
|
|
128482
|
+
path18 += `#${request3.fragment}`;
|
|
128262
128483
|
}
|
|
128263
128484
|
let hostname3 = request3.hostname ?? "";
|
|
128264
128485
|
if (hostname3[0] === "[" && hostname3.endsWith("]")) {
|
|
@@ -128270,7 +128491,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
128270
128491
|
headers: request3.headers,
|
|
128271
128492
|
host: hostname3,
|
|
128272
128493
|
method: request3.method,
|
|
128273
|
-
path:
|
|
128494
|
+
path: path18,
|
|
128274
128495
|
port: request3.port,
|
|
128275
128496
|
agent,
|
|
128276
128497
|
auth: auth2
|
|
@@ -128525,16 +128746,16 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
128525
128746
|
reject(err);
|
|
128526
128747
|
};
|
|
128527
128748
|
const queryString = querystringBuilder.buildQueryString(query || {});
|
|
128528
|
-
let
|
|
128749
|
+
let path18 = request3.path;
|
|
128529
128750
|
if (queryString) {
|
|
128530
|
-
|
|
128751
|
+
path18 += `?${queryString}`;
|
|
128531
128752
|
}
|
|
128532
128753
|
if (request3.fragment) {
|
|
128533
|
-
|
|
128754
|
+
path18 += `#${request3.fragment}`;
|
|
128534
128755
|
}
|
|
128535
128756
|
const req = session.request({
|
|
128536
128757
|
...request3.headers,
|
|
128537
|
-
[http22.constants.HTTP2_HEADER_PATH]:
|
|
128758
|
+
[http22.constants.HTTP2_HEADER_PATH]: path18,
|
|
128538
128759
|
[http22.constants.HTTP2_HEADER_METHOD]: method
|
|
128539
128760
|
});
|
|
128540
128761
|
session.ref();
|
|
@@ -128724,13 +128945,13 @@ var require_dist_cjs15 = __commonJS({
|
|
|
128724
128945
|
abortError.name = "AbortError";
|
|
128725
128946
|
return Promise.reject(abortError);
|
|
128726
128947
|
}
|
|
128727
|
-
let
|
|
128948
|
+
let path18 = request3.path;
|
|
128728
128949
|
const queryString = querystringBuilder.buildQueryString(request3.query || {});
|
|
128729
128950
|
if (queryString) {
|
|
128730
|
-
|
|
128951
|
+
path18 += `?${queryString}`;
|
|
128731
128952
|
}
|
|
128732
128953
|
if (request3.fragment) {
|
|
128733
|
-
|
|
128954
|
+
path18 += `#${request3.fragment}`;
|
|
128734
128955
|
}
|
|
128735
128956
|
let auth2 = "";
|
|
128736
128957
|
if (request3.username != null || request3.password != null) {
|
|
@@ -128739,7 +128960,7 @@ var require_dist_cjs15 = __commonJS({
|
|
|
128739
128960
|
auth2 = `${username}:${password}@`;
|
|
128740
128961
|
}
|
|
128741
128962
|
const { port, method } = request3;
|
|
128742
|
-
const url2 = `${request3.protocol}//${auth2}${request3.hostname}${port ? `:${port}` : ""}${
|
|
128963
|
+
const url2 = `${request3.protocol}//${auth2}${request3.hostname}${port ? `:${port}` : ""}${path18}`;
|
|
128743
128964
|
const body = method === "GET" || method === "HEAD" ? void 0 : request3.body;
|
|
128744
128965
|
const requestOptions = {
|
|
128745
128966
|
body,
|
|
@@ -130855,13 +131076,13 @@ function __disposeResources(env2) {
|
|
|
130855
131076
|
}
|
|
130856
131077
|
return next();
|
|
130857
131078
|
}
|
|
130858
|
-
function __rewriteRelativeImportExtension(
|
|
130859
|
-
if (typeof
|
|
130860
|
-
return
|
|
131079
|
+
function __rewriteRelativeImportExtension(path18, preserveJsx) {
|
|
131080
|
+
if (typeof path18 === "string" && /^\.\.?\//.test(path18)) {
|
|
131081
|
+
return path18.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m6, tsx, d5, ext2, cm) {
|
|
130861
131082
|
return tsx ? preserveJsx ? ".jsx" : ".js" : d5 && (!ext2 || !cm) ? m6 : d5 + ext2 + "." + cm.toLowerCase() + "js";
|
|
130862
131083
|
});
|
|
130863
131084
|
}
|
|
130864
|
-
return
|
|
131085
|
+
return path18;
|
|
130865
131086
|
}
|
|
130866
131087
|
var extendStatics, __assign3, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;
|
|
130867
131088
|
var init_tslib_es6 = __esm({
|
|
@@ -131757,11 +131978,11 @@ var init_HttpBindingProtocol = __esm({
|
|
|
131757
131978
|
const opTraits = translateTraits(operationSchema.traits);
|
|
131758
131979
|
if (opTraits.http) {
|
|
131759
131980
|
request3.method = opTraits.http[0];
|
|
131760
|
-
const [
|
|
131981
|
+
const [path18, search] = opTraits.http[1].split("?");
|
|
131761
131982
|
if (request3.path == "/") {
|
|
131762
|
-
request3.path =
|
|
131983
|
+
request3.path = path18;
|
|
131763
131984
|
} else {
|
|
131764
|
-
request3.path +=
|
|
131985
|
+
request3.path += path18;
|
|
131765
131986
|
}
|
|
131766
131987
|
const traitSearchParams = new URLSearchParams(search ?? "");
|
|
131767
131988
|
Object.assign(query, Object.fromEntries(traitSearchParams));
|
|
@@ -132147,8 +132368,8 @@ var init_requestBuilder = __esm({
|
|
|
132147
132368
|
return this;
|
|
132148
132369
|
}
|
|
132149
132370
|
p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
|
|
132150
|
-
this.resolvePathStack.push((
|
|
132151
|
-
this.path = resolvedPath(
|
|
132371
|
+
this.resolvePathStack.push((path18) => {
|
|
132372
|
+
this.path = resolvedPath(path18, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
|
|
132152
132373
|
});
|
|
132153
132374
|
return this;
|
|
132154
132375
|
}
|
|
@@ -132815,18 +133036,18 @@ var require_dist_cjs19 = __commonJS({
|
|
|
132815
133036
|
}
|
|
132816
133037
|
};
|
|
132817
133038
|
var booleanEquals = (value1, value2) => value1 === value2;
|
|
132818
|
-
var getAttrPathList = (
|
|
132819
|
-
const parts =
|
|
133039
|
+
var getAttrPathList = (path18) => {
|
|
133040
|
+
const parts = path18.split(".");
|
|
132820
133041
|
const pathList = [];
|
|
132821
133042
|
for (const part of parts) {
|
|
132822
133043
|
const squareBracketIndex = part.indexOf("[");
|
|
132823
133044
|
if (squareBracketIndex !== -1) {
|
|
132824
133045
|
if (part.indexOf("]") !== part.length - 1) {
|
|
132825
|
-
throw new EndpointError(`Path: '${
|
|
133046
|
+
throw new EndpointError(`Path: '${path18}' does not end with ']'`);
|
|
132826
133047
|
}
|
|
132827
133048
|
const arrayIndex = part.slice(squareBracketIndex + 1, -1);
|
|
132828
133049
|
if (Number.isNaN(parseInt(arrayIndex))) {
|
|
132829
|
-
throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${
|
|
133050
|
+
throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path18}'`);
|
|
132830
133051
|
}
|
|
132831
133052
|
if (squareBracketIndex !== 0) {
|
|
132832
133053
|
pathList.push(part.slice(0, squareBracketIndex));
|
|
@@ -132838,9 +133059,9 @@ var require_dist_cjs19 = __commonJS({
|
|
|
132838
133059
|
}
|
|
132839
133060
|
return pathList;
|
|
132840
133061
|
};
|
|
132841
|
-
var getAttr = (value,
|
|
133062
|
+
var getAttr = (value, path18) => getAttrPathList(path18).reduce((acc, index) => {
|
|
132842
133063
|
if (typeof acc !== "object") {
|
|
132843
|
-
throw new EndpointError(`Index '${index}' in '${
|
|
133064
|
+
throw new EndpointError(`Index '${index}' in '${path18}' not found in '${JSON.stringify(value)}'`);
|
|
132844
133065
|
} else if (Array.isArray(acc)) {
|
|
132845
133066
|
return acc[parseInt(index)];
|
|
132846
133067
|
}
|
|
@@ -132859,8 +133080,8 @@ var require_dist_cjs19 = __commonJS({
|
|
|
132859
133080
|
return value;
|
|
132860
133081
|
}
|
|
132861
133082
|
if (typeof value === "object" && "hostname" in value) {
|
|
132862
|
-
const { hostname: hostname4, port, protocol: protocol2 = "", path:
|
|
132863
|
-
const url2 = new URL(`${protocol2}//${hostname4}${port ? `:${port}` : ""}${
|
|
133083
|
+
const { hostname: hostname4, port, protocol: protocol2 = "", path: path18 = "", query = {} } = value;
|
|
133084
|
+
const url2 = new URL(`${protocol2}//${hostname4}${port ? `:${port}` : ""}${path18}`);
|
|
132864
133085
|
url2.search = Object.entries(query).map(([k6, v9]) => `${k6}=${v9}`).join("&");
|
|
132865
133086
|
return url2;
|
|
132866
133087
|
}
|
|
@@ -134396,10 +134617,10 @@ ${longDate}
|
|
|
134396
134617
|
${credentialScope}
|
|
134397
134618
|
${utilHexEncoding.toHex(hashedRequest)}`;
|
|
134398
134619
|
}
|
|
134399
|
-
getCanonicalPath({ path:
|
|
134620
|
+
getCanonicalPath({ path: path18 }) {
|
|
134400
134621
|
if (this.uriEscapePath) {
|
|
134401
134622
|
const normalizedPathSegments = [];
|
|
134402
|
-
for (const pathSegment of
|
|
134623
|
+
for (const pathSegment of path18.split("/")) {
|
|
134403
134624
|
if (pathSegment?.length === 0)
|
|
134404
134625
|
continue;
|
|
134405
134626
|
if (pathSegment === ".")
|
|
@@ -134410,11 +134631,11 @@ ${utilHexEncoding.toHex(hashedRequest)}`;
|
|
|
134410
134631
|
normalizedPathSegments.push(pathSegment);
|
|
134411
134632
|
}
|
|
134412
134633
|
}
|
|
134413
|
-
const normalizedPath = `${
|
|
134634
|
+
const normalizedPath = `${path18?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path18?.endsWith("/") ? "/" : ""}`;
|
|
134414
134635
|
const doubleEncoded = utilUriEscape.escapeUri(normalizedPath);
|
|
134415
134636
|
return doubleEncoded.replace(/%2F/g, "/");
|
|
134416
134637
|
}
|
|
134417
|
-
return
|
|
134638
|
+
return path18;
|
|
134418
134639
|
}
|
|
134419
134640
|
validateResolvedCredentials(credentials) {
|
|
134420
134641
|
if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") {
|
|
@@ -135733,11 +135954,11 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
135733
135954
|
}
|
|
135734
135955
|
}
|
|
135735
135956
|
const { service, operation: operation2 } = (0, import_util_middleware5.getSmithyContext)(context2);
|
|
135736
|
-
const
|
|
135957
|
+
const path18 = `/service/${service}/operation/${operation2}`;
|
|
135737
135958
|
if (request3.path.endsWith("/")) {
|
|
135738
|
-
request3.path +=
|
|
135959
|
+
request3.path += path18.slice(1);
|
|
135739
135960
|
} else {
|
|
135740
|
-
request3.path +=
|
|
135961
|
+
request3.path += path18;
|
|
135741
135962
|
}
|
|
135742
135963
|
return request3;
|
|
135743
135964
|
}
|
|
@@ -140717,14 +140938,14 @@ var require_readFile = __commonJS({
|
|
|
140717
140938
|
var promises_1 = require("node:fs/promises");
|
|
140718
140939
|
exports2.filePromises = {};
|
|
140719
140940
|
exports2.fileIntercept = {};
|
|
140720
|
-
var readFile4 = (
|
|
140721
|
-
if (exports2.fileIntercept[
|
|
140722
|
-
return exports2.fileIntercept[
|
|
140941
|
+
var readFile4 = (path18, options) => {
|
|
140942
|
+
if (exports2.fileIntercept[path18] !== void 0) {
|
|
140943
|
+
return exports2.fileIntercept[path18];
|
|
140723
140944
|
}
|
|
140724
|
-
if (!exports2.filePromises[
|
|
140725
|
-
exports2.filePromises[
|
|
140945
|
+
if (!exports2.filePromises[path18] || options?.ignoreCache) {
|
|
140946
|
+
exports2.filePromises[path18] = (0, promises_1.readFile)(path18, "utf8");
|
|
140726
140947
|
}
|
|
140727
|
-
return exports2.filePromises[
|
|
140948
|
+
return exports2.filePromises[path18];
|
|
140728
140949
|
};
|
|
140729
140950
|
exports2.readFile = readFile4;
|
|
140730
140951
|
}
|
|
@@ -140738,7 +140959,7 @@ var require_dist_cjs33 = __commonJS({
|
|
|
140738
140959
|
var getHomeDir = require_getHomeDir();
|
|
140739
140960
|
var getSSOTokenFilepath = require_getSSOTokenFilepath();
|
|
140740
140961
|
var getSSOTokenFromFile = require_getSSOTokenFromFile();
|
|
140741
|
-
var
|
|
140962
|
+
var path18 = require("path");
|
|
140742
140963
|
var types2 = require_dist_cjs();
|
|
140743
140964
|
var readFile4 = require_readFile();
|
|
140744
140965
|
var ENV_PROFILE = "AWS_PROFILE";
|
|
@@ -140760,9 +140981,9 @@ var require_dist_cjs33 = __commonJS({
|
|
|
140760
140981
|
...data2.default && { default: data2.default }
|
|
140761
140982
|
});
|
|
140762
140983
|
var ENV_CONFIG_PATH = "AWS_CONFIG_FILE";
|
|
140763
|
-
var getConfigFilepath = () => process.env[ENV_CONFIG_PATH] ||
|
|
140984
|
+
var getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path18.join(getHomeDir.getHomeDir(), ".aws", "config");
|
|
140764
140985
|
var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE";
|
|
140765
|
-
var getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] ||
|
|
140986
|
+
var getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path18.join(getHomeDir.getHomeDir(), ".aws", "credentials");
|
|
140766
140987
|
var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/;
|
|
140767
140988
|
var profileNameBlockList = ["__proto__", "profile __proto__"];
|
|
140768
140989
|
var parseIni = (iniData) => {
|
|
@@ -140817,11 +141038,11 @@ var require_dist_cjs33 = __commonJS({
|
|
|
140817
141038
|
const relativeHomeDirPrefix = "~/";
|
|
140818
141039
|
let resolvedFilepath = filepath;
|
|
140819
141040
|
if (filepath.startsWith(relativeHomeDirPrefix)) {
|
|
140820
|
-
resolvedFilepath =
|
|
141041
|
+
resolvedFilepath = path18.join(homeDir, filepath.slice(2));
|
|
140821
141042
|
}
|
|
140822
141043
|
let resolvedConfigFilepath = configFilepath;
|
|
140823
141044
|
if (configFilepath.startsWith(relativeHomeDirPrefix)) {
|
|
140824
|
-
resolvedConfigFilepath =
|
|
141045
|
+
resolvedConfigFilepath = path18.join(homeDir, configFilepath.slice(2));
|
|
140825
141046
|
}
|
|
140826
141047
|
const parsedFiles = await Promise.all([
|
|
140827
141048
|
readFile4.readFile(resolvedConfigFilepath, {
|
|
@@ -140860,8 +141081,8 @@ var require_dist_cjs33 = __commonJS({
|
|
|
140860
141081
|
getFileRecord() {
|
|
140861
141082
|
return readFile4.fileIntercept;
|
|
140862
141083
|
},
|
|
140863
|
-
interceptFile(
|
|
140864
|
-
readFile4.fileIntercept[
|
|
141084
|
+
interceptFile(path19, contents) {
|
|
141085
|
+
readFile4.fileIntercept[path19] = Promise.resolve(contents);
|
|
140865
141086
|
},
|
|
140866
141087
|
getTokenRecord() {
|
|
140867
141088
|
return getSSOTokenFromFile.tokenIntercept;
|
|
@@ -141103,8 +141324,8 @@ var require_dist_cjs35 = __commonJS({
|
|
|
141103
141324
|
return endpoint2.url.href;
|
|
141104
141325
|
}
|
|
141105
141326
|
if ("hostname" in endpoint2) {
|
|
141106
|
-
const { protocol, hostname: hostname3, port, path:
|
|
141107
|
-
return `${protocol}//${hostname3}${port ? ":" + port : ""}${
|
|
141327
|
+
const { protocol, hostname: hostname3, port, path: path18 } = endpoint2;
|
|
141328
|
+
return `${protocol}//${hostname3}${port ? ":" + port : ""}${path18}`;
|
|
141108
141329
|
}
|
|
141109
141330
|
}
|
|
141110
141331
|
return endpoint2;
|
|
@@ -142665,12 +142886,12 @@ var require_fromHttp = __commonJS({
|
|
|
142665
142886
|
var fromHttp = (options = {}) => {
|
|
142666
142887
|
options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");
|
|
142667
142888
|
let host;
|
|
142668
|
-
const
|
|
142889
|
+
const relative6 = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];
|
|
142669
142890
|
const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];
|
|
142670
142891
|
const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];
|
|
142671
142892
|
const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];
|
|
142672
142893
|
const warn2 = options.logger?.constructor?.name === "NoOpLogger" || !options.logger?.warn ? console.warn : options.logger.warn.bind(options.logger);
|
|
142673
|
-
if (
|
|
142894
|
+
if (relative6 && full) {
|
|
142674
142895
|
warn2("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.");
|
|
142675
142896
|
warn2("awsContainerCredentialsFullUri will take precedence.");
|
|
142676
142897
|
}
|
|
@@ -142680,8 +142901,8 @@ var require_fromHttp = __commonJS({
|
|
|
142680
142901
|
}
|
|
142681
142902
|
if (full) {
|
|
142682
142903
|
host = full;
|
|
142683
|
-
} else if (
|
|
142684
|
-
host = `${DEFAULT_LINK_LOCAL_HOST}${
|
|
142904
|
+
} else if (relative6) {
|
|
142905
|
+
host = `${DEFAULT_LINK_LOCAL_HOST}${relative6}`;
|
|
142685
142906
|
} else {
|
|
142686
142907
|
throw new property_provider_1.CredentialsProviderError(`No HTTP credential provider host provided.
|
|
142687
142908
|
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger });
|
|
@@ -156240,12 +156461,12 @@ var require_dist_cjs63 = __commonJS({
|
|
|
156240
156461
|
// src/utils/awsLambdaLayerManager.ts
|
|
156241
156462
|
async function getRegionsFromAws() {
|
|
156242
156463
|
logger.debug("Fetching AWS regions...");
|
|
156243
|
-
const { hostname: hostname3, path:
|
|
156464
|
+
const { hostname: hostname3, path: path18, headers } = import_aws4.default.sign({
|
|
156244
156465
|
service: "ec2",
|
|
156245
156466
|
region: "us-east-2",
|
|
156246
156467
|
path: "/?Action=DescribeRegions&Version=2013-10-15"
|
|
156247
156468
|
});
|
|
156248
|
-
const url2 = `https://${hostname3}${
|
|
156469
|
+
const url2 = `https://${hostname3}${path18}`;
|
|
156249
156470
|
const response = await (0, import_node_fetch4.default)(url2, {
|
|
156250
156471
|
headers
|
|
156251
156472
|
});
|
|
@@ -156830,29 +157051,6 @@ function envHasVar(envVar) {
|
|
|
156830
157051
|
}
|
|
156831
157052
|
return true;
|
|
156832
157053
|
}
|
|
156833
|
-
function sanitizeDynamicLinkerEnv() {
|
|
156834
|
-
const allowOverride = process.env[ALLOW_DYNAMIC_LINKER_ENV_VAR] === "1";
|
|
156835
|
-
const presentKeys = DYNAMIC_LINKER_ENV_VARS.filter(
|
|
156836
|
-
(key) => process.env[key] !== void 0
|
|
156837
|
-
);
|
|
156838
|
-
if (presentKeys.length === 0) {
|
|
156839
|
-
return;
|
|
156840
|
-
}
|
|
156841
|
-
if (allowOverride) {
|
|
156842
|
-
logger.info(
|
|
156843
|
-
`${ALLOW_DYNAMIC_LINKER_ENV_VAR}=1 set; preserving dynamic-linker environment variables: ${presentKeys.join(
|
|
156844
|
-
", "
|
|
156845
|
-
)}. This is not recommended.`
|
|
156846
|
-
);
|
|
156847
|
-
return;
|
|
156848
|
-
}
|
|
156849
|
-
for (const key of presentKeys) {
|
|
156850
|
-
logger.warn(
|
|
156851
|
-
`Stripping dynamic-linker environment variable "${key}" for security reasons. Set ${ALLOW_DYNAMIC_LINKER_ENV_VAR}=1 to override (not recommended).`
|
|
156852
|
-
);
|
|
156853
|
-
delete process.env[key];
|
|
156854
|
-
}
|
|
156855
|
-
}
|
|
156856
157054
|
function warnIfCraftEnvFileExists() {
|
|
156857
157055
|
const candidatePaths = [];
|
|
156858
157056
|
try {
|
|
@@ -156863,10 +157061,10 @@ function warnIfCraftEnvFileExists() {
|
|
|
156863
157061
|
if (configFileDir) {
|
|
156864
157062
|
candidatePaths.push((0, import_path16.join)(configFileDir, LEGACY_ENV_FILE_NAME));
|
|
156865
157063
|
}
|
|
156866
|
-
for (const
|
|
156867
|
-
if ((0, import_fs19.existsSync)(
|
|
157064
|
+
for (const path18 of candidatePaths) {
|
|
157065
|
+
if ((0, import_fs19.existsSync)(path18)) {
|
|
156868
157066
|
logger.warn(
|
|
156869
|
-
`Found legacy "${LEGACY_ENV_FILE_NAME}" file at "${
|
|
157067
|
+
`Found legacy "${LEGACY_ENV_FILE_NAME}" file at "${path18}". Craft no longer reads this file for security reasons. Please set the required variables in your shell or CI environment instead.`
|
|
156870
157068
|
);
|
|
156871
157069
|
}
|
|
156872
157070
|
}
|
|
@@ -156880,7 +157078,7 @@ function checkEnvForPrerequisite(...varList) {
|
|
|
156880
157078
|
);
|
|
156881
157079
|
}
|
|
156882
157080
|
}
|
|
156883
|
-
var import_fs19, import_path16, os5, LEGACY_ENV_FILE_NAME
|
|
157081
|
+
var import_fs19, import_path16, os5, LEGACY_ENV_FILE_NAME;
|
|
156884
157082
|
var init_env = __esm({
|
|
156885
157083
|
"src/utils/env.ts"() {
|
|
156886
157084
|
"use strict";
|
|
@@ -156890,52 +157088,33 @@ var init_env = __esm({
|
|
|
156890
157088
|
init_config2();
|
|
156891
157089
|
init_errors2();
|
|
156892
157090
|
init_logger2();
|
|
157091
|
+
init_dynamicLinkerEnv();
|
|
156893
157092
|
os5 = require("os");
|
|
156894
157093
|
LEGACY_ENV_FILE_NAME = ".craft.env";
|
|
156895
|
-
DYNAMIC_LINKER_ENV_VARS = [
|
|
156896
|
-
// Linux / glibc / musl
|
|
156897
|
-
"LD_PRELOAD",
|
|
156898
|
-
"LD_LIBRARY_PATH",
|
|
156899
|
-
"LD_AUDIT",
|
|
156900
|
-
// macOS dyld
|
|
156901
|
-
"DYLD_INSERT_LIBRARIES",
|
|
156902
|
-
"DYLD_LIBRARY_PATH",
|
|
156903
|
-
"DYLD_FRAMEWORK_PATH",
|
|
156904
|
-
"DYLD_FALLBACK_LIBRARY_PATH",
|
|
156905
|
-
"DYLD_FALLBACK_FRAMEWORK_PATH"
|
|
156906
|
-
];
|
|
156907
|
-
ALLOW_DYNAMIC_LINKER_ENV_VAR = "CRAFT_ALLOW_DYNAMIC_LINKER_ENV";
|
|
156908
157094
|
}
|
|
156909
157095
|
});
|
|
156910
157096
|
|
|
156911
157097
|
// src/utils/gpg.ts
|
|
156912
157098
|
async function importGPGKey(privateKey) {
|
|
156913
|
-
|
|
156914
|
-
await import_fs20.promises.writeFile(PRIVATE_KEY_FILE, privateKey);
|
|
156915
|
-
await spawnProcess(`gpg`, ["--batch", "--import", PRIVATE_KEY_FILE]);
|
|
156916
|
-
await import_fs20.promises.unlink(PRIVATE_KEY_FILE);
|
|
157099
|
+
await spawnProcess("gpg", ["--batch", "--import"], {}, { stdin: privateKey });
|
|
156917
157100
|
}
|
|
156918
|
-
var import_os2, import_fs20, path17;
|
|
156919
157101
|
var init_gpg = __esm({
|
|
156920
157102
|
"src/utils/gpg.ts"() {
|
|
156921
157103
|
"use strict";
|
|
156922
157104
|
init_import_meta_url();
|
|
156923
|
-
import_os2 = require("os");
|
|
156924
|
-
import_fs20 = require("fs");
|
|
156925
|
-
path17 = __toESM(require("path"));
|
|
156926
157105
|
init_system();
|
|
156927
157106
|
}
|
|
156928
157107
|
});
|
|
156929
157108
|
|
|
156930
157109
|
// src/targets/maven.ts
|
|
156931
|
-
var import_path17,
|
|
157110
|
+
var import_path17, import_fs20, 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;
|
|
156932
157111
|
var init_maven = __esm({
|
|
156933
157112
|
"src/targets/maven.ts"() {
|
|
156934
157113
|
"use strict";
|
|
156935
157114
|
init_import_meta_url();
|
|
156936
157115
|
init_base5();
|
|
156937
157116
|
import_path17 = require("path");
|
|
156938
|
-
|
|
157117
|
+
import_fs20 = require("fs");
|
|
156939
157118
|
import_node_fetch5 = __toESM(require_lib9());
|
|
156940
157119
|
init_system();
|
|
156941
157120
|
init_async();
|
|
@@ -157162,7 +157341,7 @@ var init_maven = __esm({
|
|
|
157162
157341
|
if (await this.isBomFile(pomFilepath)) {
|
|
157163
157342
|
return pomFilepath;
|
|
157164
157343
|
}
|
|
157165
|
-
const filesInDir = await
|
|
157344
|
+
const filesInDir = await import_fs20.promises.readdir(distDir);
|
|
157166
157345
|
const potentialPoms = filesInDir.filter((f5) => f5 !== POM_DEFAULT_FILENAME && (0, import_path17.extname)(f5) === POM_FILE_EXT).map((f5) => (0, import_path17.join)(distDir, f5));
|
|
157167
157346
|
return potentialPoms.find((f5) => this.isBomFile(f5));
|
|
157168
157347
|
}
|
|
@@ -157177,7 +157356,7 @@ var init_maven = __esm({
|
|
|
157177
157356
|
*/
|
|
157178
157357
|
async isBomFile(pomFilepath) {
|
|
157179
157358
|
try {
|
|
157180
|
-
const fileContents = await
|
|
157359
|
+
const fileContents = await import_fs20.promises.readFile(pomFilepath, {
|
|
157181
157360
|
encoding: "utf8"
|
|
157182
157361
|
});
|
|
157183
157362
|
return BOM_FILE_KEY_REGEXP.test(fileContents);
|
|
@@ -157318,7 +157497,7 @@ Error:
|
|
|
157318
157497
|
async getPomFileInDist(distDir) {
|
|
157319
157498
|
const pomFilepath = (0, import_path17.join)(distDir, "pom-default.xml");
|
|
157320
157499
|
try {
|
|
157321
|
-
const stat = await
|
|
157500
|
+
const stat = await import_fs20.promises.stat(pomFilepath);
|
|
157322
157501
|
if (stat.isFile()) {
|
|
157323
157502
|
return pomFilepath;
|
|
157324
157503
|
}
|
|
@@ -157331,7 +157510,7 @@ Error:
|
|
|
157331
157510
|
*/
|
|
157332
157511
|
async fileExists(filePath) {
|
|
157333
157512
|
try {
|
|
157334
|
-
const stat = await
|
|
157513
|
+
const stat = await import_fs20.promises.stat(filePath);
|
|
157335
157514
|
if (stat.isFile()) {
|
|
157336
157515
|
return true;
|
|
157337
157516
|
}
|
|
@@ -157350,7 +157529,7 @@ Error:
|
|
|
157350
157529
|
async fixModuleFileName(distDir, moduleFile) {
|
|
157351
157530
|
const fallbackFile = (0, import_path17.join)(distDir, "module.json");
|
|
157352
157531
|
if (!await this.fileExists(moduleFile) && await this.fileExists(fallbackFile)) {
|
|
157353
|
-
await
|
|
157532
|
+
await import_fs20.promises.rename(fallbackFile, moduleFile);
|
|
157354
157533
|
}
|
|
157355
157534
|
}
|
|
157356
157535
|
async uploadPomDistribution(distDir) {
|
|
@@ -157416,7 +157595,7 @@ Error:
|
|
|
157416
157595
|
);
|
|
157417
157596
|
} else if (isAppleDistDir) {
|
|
157418
157597
|
files["metadataFile"] = (0, import_path17.join)(distDir, `${moduleName}-metadata.jar`);
|
|
157419
|
-
const cinteropFiles = (await
|
|
157598
|
+
const cinteropFiles = (await import_fs20.promises.readdir(distDir)).filter((file) => file.includes("cinterop")).map((file) => (0, import_path17.join)(distDir, file));
|
|
157420
157599
|
files["klibFiles"] = cinteropFiles;
|
|
157421
157600
|
} else if (isKlibDistDir) {
|
|
157422
157601
|
files["klibFiles"] = [(0, import_path17.join)(distDir, `${moduleName}.klib`)];
|
|
@@ -157599,7 +157778,7 @@ Error:
|
|
|
157599
157778
|
});
|
|
157600
157779
|
|
|
157601
157780
|
// src/targets/symbolCollector.ts
|
|
157602
|
-
var
|
|
157781
|
+
var import_fs21, import_path18, DEFAULT_SYM_COLLECTOR_SERVER_ENDPOINT, SYM_COLLECTOR_BIN_NAME, SymbolCollector;
|
|
157603
157782
|
var init_symbolCollector = __esm({
|
|
157604
157783
|
"src/targets/symbolCollector.ts"() {
|
|
157605
157784
|
"use strict";
|
|
@@ -157607,7 +157786,7 @@ var init_symbolCollector = __esm({
|
|
|
157607
157786
|
init_errors2();
|
|
157608
157787
|
init_base5();
|
|
157609
157788
|
init_files();
|
|
157610
|
-
|
|
157789
|
+
import_fs21 = require("fs");
|
|
157611
157790
|
init_system();
|
|
157612
157791
|
import_path18 = require("path");
|
|
157613
157792
|
DEFAULT_SYM_COLLECTOR_SERVER_ENDPOINT = "https://symbol-collector.services.sentry.io/";
|
|
@@ -157656,7 +157835,7 @@ var init_symbolCollector = __esm({
|
|
|
157656
157835
|
await Promise.all(
|
|
157657
157836
|
artifacts.map(async (artifact, index) => {
|
|
157658
157837
|
const subdirPath = (0, import_path18.join)(dir, String(index));
|
|
157659
|
-
await
|
|
157838
|
+
await import_fs21.promises.mkdir(subdirPath);
|
|
157660
157839
|
await this.artifactProvider.downloadArtifact(artifact, subdirPath);
|
|
157661
157840
|
})
|
|
157662
157841
|
);
|
|
@@ -157686,13 +157865,13 @@ var init_symbolCollector = __esm({
|
|
|
157686
157865
|
});
|
|
157687
157866
|
|
|
157688
157867
|
// src/targets/pubDev.ts
|
|
157689
|
-
var
|
|
157868
|
+
var import_fs22, import_os2, import_path19, targetSecrets2, PubDevTarget;
|
|
157690
157869
|
var init_pubDev = __esm({
|
|
157691
157870
|
"src/targets/pubDev.ts"() {
|
|
157692
157871
|
"use strict";
|
|
157693
157872
|
init_import_meta_url();
|
|
157694
|
-
|
|
157695
|
-
|
|
157873
|
+
import_fs22 = require("fs");
|
|
157874
|
+
import_os2 = require("os");
|
|
157696
157875
|
import_path19 = require("path");
|
|
157697
157876
|
init_js_yaml();
|
|
157698
157877
|
init_git();
|
|
@@ -157725,10 +157904,10 @@ var init_pubDev = __esm({
|
|
|
157725
157904
|
*/
|
|
157726
157905
|
static async bumpVersion(rootDir, newVersion) {
|
|
157727
157906
|
const pubspecPath = (0, import_path19.join)(rootDir, "pubspec.yaml");
|
|
157728
|
-
if (!(0,
|
|
157907
|
+
if (!(0, import_fs22.existsSync)(pubspecPath)) {
|
|
157729
157908
|
return false;
|
|
157730
157909
|
}
|
|
157731
|
-
const content = (0,
|
|
157910
|
+
const content = (0, import_fs22.readFileSync)(pubspecPath, "utf-8");
|
|
157732
157911
|
const pubspec = load(content);
|
|
157733
157912
|
if (!pubspec || typeof pubspec !== "object") {
|
|
157734
157913
|
logger.debug("pubspec.yaml is not a valid YAML object");
|
|
@@ -157736,7 +157915,7 @@ var init_pubDev = __esm({
|
|
|
157736
157915
|
}
|
|
157737
157916
|
pubspec.version = newVersion;
|
|
157738
157917
|
logger.debug(`Updating version in ${pubspecPath} to ${newVersion}`);
|
|
157739
|
-
(0,
|
|
157918
|
+
(0, import_fs22.writeFileSync)(pubspecPath, dump(pubspec));
|
|
157740
157919
|
return true;
|
|
157741
157920
|
}
|
|
157742
157921
|
constructor(config3, artifactProvider, githubRepo) {
|
|
@@ -157823,21 +158002,21 @@ var init_pubDev = __esm({
|
|
|
157823
158002
|
// Expiration date is required, but irrelevant
|
|
157824
158003
|
};
|
|
157825
158004
|
try {
|
|
157826
|
-
await
|
|
158005
|
+
await import_fs22.promises.access(credentialsFilePath, import_fs22.constants.F_OK);
|
|
157827
158006
|
this.logger.warn("Credentials file already exists. Skipping creation.");
|
|
157828
158007
|
} catch {
|
|
157829
|
-
await
|
|
157830
|
-
await
|
|
158008
|
+
await import_fs22.promises.mkdir((0, import_path19.dirname)(credentialsFilePath), { recursive: true });
|
|
158009
|
+
await import_fs22.promises.writeFile(credentialsFilePath, JSON.stringify(content));
|
|
157831
158010
|
this.logger.info("Credentials file created.");
|
|
157832
158011
|
}
|
|
157833
158012
|
}
|
|
157834
158013
|
getCredentialsFilePath() {
|
|
157835
|
-
const currentPlatform = (0,
|
|
158014
|
+
const currentPlatform = (0, import_os2.platform)();
|
|
157836
158015
|
switch (currentPlatform) {
|
|
157837
158016
|
case "darwin":
|
|
157838
|
-
return `${(0,
|
|
158017
|
+
return `${(0, import_os2.homedir)()}/Library/Application Support/dart/pub-credentials.json`;
|
|
157839
158018
|
case "linux":
|
|
157840
|
-
return `${(0,
|
|
158019
|
+
return `${(0, import_os2.homedir)()}/.config/dart/pub-credentials.json`;
|
|
157841
158020
|
default:
|
|
157842
158021
|
throw new Error(`Unsupported platform: ${currentPlatform}`);
|
|
157843
158022
|
}
|
|
@@ -157899,22 +158078,22 @@ var init_pubDev = __esm({
|
|
|
157899
158078
|
}
|
|
157900
158079
|
async removeDependencyOverrides(directory, pkg) {
|
|
157901
158080
|
const pubSpecPath = (0, import_path19.join)(directory, pkg, "pubspec.yaml");
|
|
157902
|
-
const pubSpecContent = await
|
|
158081
|
+
const pubSpecContent = await import_fs22.promises.readFile(pubSpecPath, "utf8");
|
|
157903
158082
|
const pubSpecYaml = load(pubSpecContent);
|
|
157904
158083
|
delete pubSpecYaml.dependency_overrides;
|
|
157905
|
-
await
|
|
158084
|
+
await import_fs22.promises.writeFile(pubSpecPath, dump(pubSpecYaml));
|
|
157906
158085
|
}
|
|
157907
158086
|
};
|
|
157908
158087
|
}
|
|
157909
158088
|
});
|
|
157910
158089
|
|
|
157911
158090
|
// src/targets/hex.ts
|
|
157912
|
-
var
|
|
158091
|
+
var import_fs23, import_path20, DEFAULT_MIX_BIN, MIX_BIN, HexTarget;
|
|
157913
158092
|
var init_hex = __esm({
|
|
157914
158093
|
"src/targets/hex.ts"() {
|
|
157915
158094
|
"use strict";
|
|
157916
158095
|
init_import_meta_url();
|
|
157917
|
-
|
|
158096
|
+
import_fs23 = require("fs");
|
|
157918
158097
|
import_path20 = require("path");
|
|
157919
158098
|
init_git();
|
|
157920
158099
|
init_base5();
|
|
@@ -157939,10 +158118,10 @@ var init_hex = __esm({
|
|
|
157939
158118
|
*/
|
|
157940
158119
|
static async bumpVersion(rootDir, newVersion) {
|
|
157941
158120
|
const mixExsPath = (0, import_path20.join)(rootDir, "mix.exs");
|
|
157942
|
-
if (!(0,
|
|
158121
|
+
if (!(0, import_fs23.existsSync)(mixExsPath)) {
|
|
157943
158122
|
return false;
|
|
157944
158123
|
}
|
|
157945
|
-
const content = (0,
|
|
158124
|
+
const content = (0, import_fs23.readFileSync)(mixExsPath, "utf-8");
|
|
157946
158125
|
const versionPatterns = [
|
|
157947
158126
|
/^(\s*version:\s*["'])([^"']+)(["'])/m,
|
|
157948
158127
|
/^(\s*@version\s+["'])([^"']+)(["'])/m
|
|
@@ -157964,7 +158143,7 @@ var init_hex = __esm({
|
|
|
157964
158143
|
return true;
|
|
157965
158144
|
}
|
|
157966
158145
|
logger.debug(`Updating version in ${mixExsPath} to ${newVersion}`);
|
|
157967
|
-
(0,
|
|
158146
|
+
(0, import_fs23.writeFileSync)(mixExsPath, newContent);
|
|
157968
158147
|
return true;
|
|
157969
158148
|
}
|
|
157970
158149
|
constructor(config3, artifactProvider, githubRepo) {
|
|
@@ -158081,9 +158260,11 @@ async function pushArchiveToGitRepository({
|
|
|
158081
158260
|
logger3?.info(`Defined --strip-components depth as ${stripComponents}`);
|
|
158082
158261
|
}
|
|
158083
158262
|
logger3?.info(`Unpack tarball archive at "${archivePath}"...`);
|
|
158084
|
-
|
|
158085
|
-
|
|
158086
|
-
cwd: directory
|
|
158263
|
+
await lo({
|
|
158264
|
+
file: archivePath,
|
|
158265
|
+
cwd: directory,
|
|
158266
|
+
gzip: true,
|
|
158267
|
+
strip: stripComponents && stripComponents > 0 ? stripComponents : 0
|
|
158087
158268
|
});
|
|
158088
158269
|
logger3?.info(`Staging files...`);
|
|
158089
158270
|
await git.raw("add", "--all");
|
|
@@ -158106,7 +158287,7 @@ async function pushArchiveToGitRepository({
|
|
|
158106
158287
|
"craft-git-repository-target-"
|
|
158107
158288
|
);
|
|
158108
158289
|
}
|
|
158109
|
-
var
|
|
158290
|
+
var import_url3, CommitOnGitRepositoryTarget;
|
|
158110
158291
|
var init_commitOnGitRepository = __esm({
|
|
158111
158292
|
"src/targets/commitOnGitRepository.ts"() {
|
|
158112
158293
|
"use strict";
|
|
@@ -158115,7 +158296,7 @@ var init_commitOnGitRepository = __esm({
|
|
|
158115
158296
|
init_files();
|
|
158116
158297
|
init_git();
|
|
158117
158298
|
init_base5();
|
|
158118
|
-
|
|
158299
|
+
init_index_min();
|
|
158119
158300
|
import_url3 = require("url");
|
|
158120
158301
|
CommitOnGitRepositoryTarget = class extends BaseTarget {
|
|
158121
158302
|
/** Target name */
|
|
@@ -158402,7 +158583,7 @@ function findConfigFile() {
|
|
|
158402
158583
|
let currentDir = cwd;
|
|
158403
158584
|
while (depth <= MAX_DEPTH) {
|
|
158404
158585
|
const probePath = import_path22.default.join(currentDir, CONFIG_FILE_NAME);
|
|
158405
|
-
if ((0,
|
|
158586
|
+
if ((0, import_fs24.existsSync)(probePath) && (0, import_fs24.lstatSync)(probePath).isFile()) {
|
|
158406
158587
|
_configPathCache = probePath;
|
|
158407
158588
|
return _configPathCache;
|
|
158408
158589
|
}
|
|
@@ -158453,7 +158634,7 @@ function getConfiguration(clearCache = false) {
|
|
|
158453
158634
|
}
|
|
158454
158635
|
const configPath = getConfigFilePath();
|
|
158455
158636
|
logger.debug("Configuration file found: ", configPath);
|
|
158456
|
-
const rawConfig = load((0,
|
|
158637
|
+
const rawConfig = load((0, import_fs24.readFileSync)(configPath, "utf-8"));
|
|
158457
158638
|
_configCache = validateConfiguration(rawConfig);
|
|
158458
158639
|
checkMinimalConfigVersion(_configCache);
|
|
158459
158640
|
return _configCache;
|
|
@@ -158674,12 +158855,12 @@ async function expandWorkspaceTargets(targets) {
|
|
|
158674
158855
|
}
|
|
158675
158856
|
return expandedTargets;
|
|
158676
158857
|
}
|
|
158677
|
-
var
|
|
158858
|
+
var import_fs24, import_path22, import_git_url_parse, CONFIG_FILE_NAME, DEFAULT_RELEASE_BRANCH_NAME, _configPathCache, _configCache, AUTO_VERSION_MIN_VERSION, _globalGitHubConfigCache, DEFAULT_CHANGELOG_FILE_PATH;
|
|
158678
158859
|
var init_config2 = __esm({
|
|
158679
158860
|
"src/config.ts"() {
|
|
158680
158861
|
"use strict";
|
|
158681
158862
|
init_import_meta_url();
|
|
158682
|
-
|
|
158863
|
+
import_fs24 = require("fs");
|
|
158683
158864
|
import_path22 = __toESM(require("path"));
|
|
158684
158865
|
init_js_yaml();
|
|
158685
158866
|
import_git_url_parse = __toESM(require_lib5());
|
|
@@ -158706,7 +158887,7 @@ var require_package6 = __commonJS({
|
|
|
158706
158887
|
"package.json"(exports2, module2) {
|
|
158707
158888
|
module2.exports = {
|
|
158708
158889
|
name: "@sentry/craft",
|
|
158709
|
-
version: "2.
|
|
158890
|
+
version: "2.26.1",
|
|
158710
158891
|
description: "The universal sentry workflow CLI",
|
|
158711
158892
|
main: "dist/craft",
|
|
158712
158893
|
repository: "https://github.com/getsentry/craft",
|
|
@@ -158877,7 +159058,7 @@ function getPackage() {
|
|
|
158877
159058
|
}
|
|
158878
159059
|
function getPackageVersion() {
|
|
158879
159060
|
const { version: version2 } = getPackage();
|
|
158880
|
-
const buildInfo = "
|
|
159061
|
+
const buildInfo = "c248b38be4dbcdb95ba538f39a2336d7dd12b9f7";
|
|
158881
159062
|
return buildInfo ? `${version2} (${buildInfo})` : version2;
|
|
158882
159063
|
}
|
|
158883
159064
|
function semVerToString(s6) {
|
|
@@ -161161,28 +161342,28 @@ var require_path_arg = __commonJS({
|
|
|
161161
161342
|
init_import_meta_url();
|
|
161162
161343
|
var platform4 = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform;
|
|
161163
161344
|
var { resolve: resolve7, parse: parse5 } = require("path");
|
|
161164
|
-
var pathArg = (
|
|
161165
|
-
if (/\0/.test(
|
|
161345
|
+
var pathArg = (path18) => {
|
|
161346
|
+
if (/\0/.test(path18)) {
|
|
161166
161347
|
throw Object.assign(
|
|
161167
161348
|
new TypeError("path must be a string without null bytes"),
|
|
161168
161349
|
{
|
|
161169
|
-
path:
|
|
161350
|
+
path: path18,
|
|
161170
161351
|
code: "ERR_INVALID_ARG_VALUE"
|
|
161171
161352
|
}
|
|
161172
161353
|
);
|
|
161173
161354
|
}
|
|
161174
|
-
|
|
161355
|
+
path18 = resolve7(path18);
|
|
161175
161356
|
if (platform4 === "win32") {
|
|
161176
161357
|
const badWinChars = /[*|"<>?:]/;
|
|
161177
|
-
const { root } = parse5(
|
|
161178
|
-
if (badWinChars.test(
|
|
161358
|
+
const { root } = parse5(path18);
|
|
161359
|
+
if (badWinChars.test(path18.substr(root.length))) {
|
|
161179
161360
|
throw Object.assign(new Error("Illegal characters in path."), {
|
|
161180
|
-
path:
|
|
161361
|
+
path: path18,
|
|
161181
161362
|
code: "EINVAL"
|
|
161182
161363
|
});
|
|
161183
161364
|
}
|
|
161184
161365
|
}
|
|
161185
|
-
return
|
|
161366
|
+
return path18;
|
|
161186
161367
|
};
|
|
161187
161368
|
module2.exports = pathArg;
|
|
161188
161369
|
}
|
|
@@ -161192,23 +161373,23 @@ var require_path_arg = __commonJS({
|
|
|
161192
161373
|
var require_find_made = __commonJS({
|
|
161193
161374
|
"node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/find-made.js"(exports2, module2) {
|
|
161194
161375
|
init_import_meta_url();
|
|
161195
|
-
var { dirname:
|
|
161196
|
-
var findMade = (opts, parent,
|
|
161197
|
-
if (
|
|
161376
|
+
var { dirname: dirname9 } = require("path");
|
|
161377
|
+
var findMade = (opts, parent, path18 = void 0) => {
|
|
161378
|
+
if (path18 === parent)
|
|
161198
161379
|
return Promise.resolve();
|
|
161199
161380
|
return opts.statAsync(parent).then(
|
|
161200
|
-
(st2) => st2.isDirectory() ?
|
|
161381
|
+
(st2) => st2.isDirectory() ? path18 : void 0,
|
|
161201
161382
|
// will fail later
|
|
161202
|
-
(er2) => er2.code === "ENOENT" ? findMade(opts,
|
|
161383
|
+
(er2) => er2.code === "ENOENT" ? findMade(opts, dirname9(parent), parent) : void 0
|
|
161203
161384
|
);
|
|
161204
161385
|
};
|
|
161205
|
-
var findMadeSync = (opts, parent,
|
|
161206
|
-
if (
|
|
161386
|
+
var findMadeSync = (opts, parent, path18 = void 0) => {
|
|
161387
|
+
if (path18 === parent)
|
|
161207
161388
|
return void 0;
|
|
161208
161389
|
try {
|
|
161209
|
-
return opts.statSync(parent).isDirectory() ?
|
|
161390
|
+
return opts.statSync(parent).isDirectory() ? path18 : void 0;
|
|
161210
161391
|
} catch (er2) {
|
|
161211
|
-
return er2.code === "ENOENT" ? findMadeSync(opts,
|
|
161392
|
+
return er2.code === "ENOENT" ? findMadeSync(opts, dirname9(parent), parent) : void 0;
|
|
161212
161393
|
}
|
|
161213
161394
|
};
|
|
161214
161395
|
module2.exports = { findMade, findMadeSync };
|
|
@@ -161219,22 +161400,22 @@ var require_find_made = __commonJS({
|
|
|
161219
161400
|
var require_mkdirp_manual = __commonJS({
|
|
161220
161401
|
"node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/mkdirp-manual.js"(exports2, module2) {
|
|
161221
161402
|
init_import_meta_url();
|
|
161222
|
-
var { dirname:
|
|
161223
|
-
var mkdirpManual = (
|
|
161403
|
+
var { dirname: dirname9 } = require("path");
|
|
161404
|
+
var mkdirpManual = (path18, opts, made) => {
|
|
161224
161405
|
opts.recursive = false;
|
|
161225
|
-
const parent =
|
|
161226
|
-
if (parent ===
|
|
161227
|
-
return opts.mkdirAsync(
|
|
161406
|
+
const parent = dirname9(path18);
|
|
161407
|
+
if (parent === path18) {
|
|
161408
|
+
return opts.mkdirAsync(path18, opts).catch((er2) => {
|
|
161228
161409
|
if (er2.code !== "EISDIR")
|
|
161229
161410
|
throw er2;
|
|
161230
161411
|
});
|
|
161231
161412
|
}
|
|
161232
|
-
return opts.mkdirAsync(
|
|
161413
|
+
return opts.mkdirAsync(path18, opts).then(() => made || path18, (er2) => {
|
|
161233
161414
|
if (er2.code === "ENOENT")
|
|
161234
|
-
return mkdirpManual(parent, opts).then((made2) => mkdirpManual(
|
|
161415
|
+
return mkdirpManual(parent, opts).then((made2) => mkdirpManual(path18, opts, made2));
|
|
161235
161416
|
if (er2.code !== "EEXIST" && er2.code !== "EROFS")
|
|
161236
161417
|
throw er2;
|
|
161237
|
-
return opts.statAsync(
|
|
161418
|
+
return opts.statAsync(path18).then((st2) => {
|
|
161238
161419
|
if (st2.isDirectory())
|
|
161239
161420
|
return made;
|
|
161240
161421
|
else
|
|
@@ -161244,12 +161425,12 @@ var require_mkdirp_manual = __commonJS({
|
|
|
161244
161425
|
});
|
|
161245
161426
|
});
|
|
161246
161427
|
};
|
|
161247
|
-
var mkdirpManualSync = (
|
|
161248
|
-
const parent =
|
|
161428
|
+
var mkdirpManualSync = (path18, opts, made) => {
|
|
161429
|
+
const parent = dirname9(path18);
|
|
161249
161430
|
opts.recursive = false;
|
|
161250
|
-
if (parent ===
|
|
161431
|
+
if (parent === path18) {
|
|
161251
161432
|
try {
|
|
161252
|
-
return opts.mkdirSync(
|
|
161433
|
+
return opts.mkdirSync(path18, opts);
|
|
161253
161434
|
} catch (er2) {
|
|
161254
161435
|
if (er2.code !== "EISDIR")
|
|
161255
161436
|
throw er2;
|
|
@@ -161258,15 +161439,15 @@ var require_mkdirp_manual = __commonJS({
|
|
|
161258
161439
|
}
|
|
161259
161440
|
}
|
|
161260
161441
|
try {
|
|
161261
|
-
opts.mkdirSync(
|
|
161262
|
-
return made ||
|
|
161442
|
+
opts.mkdirSync(path18, opts);
|
|
161443
|
+
return made || path18;
|
|
161263
161444
|
} catch (er2) {
|
|
161264
161445
|
if (er2.code === "ENOENT")
|
|
161265
|
-
return mkdirpManualSync(
|
|
161446
|
+
return mkdirpManualSync(path18, opts, mkdirpManualSync(parent, opts, made));
|
|
161266
161447
|
if (er2.code !== "EEXIST" && er2.code !== "EROFS")
|
|
161267
161448
|
throw er2;
|
|
161268
161449
|
try {
|
|
161269
|
-
if (!opts.statSync(
|
|
161450
|
+
if (!opts.statSync(path18).isDirectory())
|
|
161270
161451
|
throw er2;
|
|
161271
161452
|
} catch (_3) {
|
|
161272
161453
|
throw er2;
|
|
@@ -161281,33 +161462,33 @@ var require_mkdirp_manual = __commonJS({
|
|
|
161281
161462
|
var require_mkdirp_native = __commonJS({
|
|
161282
161463
|
"node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/mkdirp-native.js"(exports2, module2) {
|
|
161283
161464
|
init_import_meta_url();
|
|
161284
|
-
var { dirname:
|
|
161465
|
+
var { dirname: dirname9 } = require("path");
|
|
161285
161466
|
var { findMade, findMadeSync } = require_find_made();
|
|
161286
161467
|
var { mkdirpManual, mkdirpManualSync } = require_mkdirp_manual();
|
|
161287
|
-
var mkdirpNative = (
|
|
161468
|
+
var mkdirpNative = (path18, opts) => {
|
|
161288
161469
|
opts.recursive = true;
|
|
161289
|
-
const parent =
|
|
161290
|
-
if (parent ===
|
|
161291
|
-
return opts.mkdirAsync(
|
|
161292
|
-
return findMade(opts,
|
|
161470
|
+
const parent = dirname9(path18);
|
|
161471
|
+
if (parent === path18)
|
|
161472
|
+
return opts.mkdirAsync(path18, opts);
|
|
161473
|
+
return findMade(opts, path18).then((made) => opts.mkdirAsync(path18, opts).then(() => made).catch((er2) => {
|
|
161293
161474
|
if (er2.code === "ENOENT")
|
|
161294
|
-
return mkdirpManual(
|
|
161475
|
+
return mkdirpManual(path18, opts);
|
|
161295
161476
|
else
|
|
161296
161477
|
throw er2;
|
|
161297
161478
|
}));
|
|
161298
161479
|
};
|
|
161299
|
-
var mkdirpNativeSync = (
|
|
161480
|
+
var mkdirpNativeSync = (path18, opts) => {
|
|
161300
161481
|
opts.recursive = true;
|
|
161301
|
-
const parent =
|
|
161302
|
-
if (parent ===
|
|
161303
|
-
return opts.mkdirSync(
|
|
161304
|
-
const made = findMadeSync(opts,
|
|
161482
|
+
const parent = dirname9(path18);
|
|
161483
|
+
if (parent === path18)
|
|
161484
|
+
return opts.mkdirSync(path18, opts);
|
|
161485
|
+
const made = findMadeSync(opts, path18);
|
|
161305
161486
|
try {
|
|
161306
|
-
opts.mkdirSync(
|
|
161487
|
+
opts.mkdirSync(path18, opts);
|
|
161307
161488
|
return made;
|
|
161308
161489
|
} catch (er2) {
|
|
161309
161490
|
if (er2.code === "ENOENT")
|
|
161310
|
-
return mkdirpManualSync(
|
|
161491
|
+
return mkdirpManualSync(path18, opts);
|
|
161311
161492
|
else
|
|
161312
161493
|
throw er2;
|
|
161313
161494
|
}
|
|
@@ -161339,21 +161520,21 @@ var require_mkdirp = __commonJS({
|
|
|
161339
161520
|
var { mkdirpNative, mkdirpNativeSync } = require_mkdirp_native();
|
|
161340
161521
|
var { mkdirpManual, mkdirpManualSync } = require_mkdirp_manual();
|
|
161341
161522
|
var { useNative, useNativeSync } = require_use_native();
|
|
161342
|
-
var mkdirp2 = (
|
|
161343
|
-
|
|
161523
|
+
var mkdirp2 = (path18, opts) => {
|
|
161524
|
+
path18 = pathArg(path18);
|
|
161344
161525
|
opts = optsArg(opts);
|
|
161345
|
-
return useNative(opts) ? mkdirpNative(
|
|
161526
|
+
return useNative(opts) ? mkdirpNative(path18, opts) : mkdirpManual(path18, opts);
|
|
161346
161527
|
};
|
|
161347
|
-
var mkdirpSync = (
|
|
161348
|
-
|
|
161528
|
+
var mkdirpSync = (path18, opts) => {
|
|
161529
|
+
path18 = pathArg(path18);
|
|
161349
161530
|
opts = optsArg(opts);
|
|
161350
|
-
return useNativeSync(opts) ? mkdirpNativeSync(
|
|
161531
|
+
return useNativeSync(opts) ? mkdirpNativeSync(path18, opts) : mkdirpManualSync(path18, opts);
|
|
161351
161532
|
};
|
|
161352
161533
|
mkdirp2.sync = mkdirpSync;
|
|
161353
|
-
mkdirp2.native = (
|
|
161354
|
-
mkdirp2.manual = (
|
|
161355
|
-
mkdirp2.nativeSync = (
|
|
161356
|
-
mkdirp2.manualSync = (
|
|
161534
|
+
mkdirp2.native = (path18, opts) => mkdirpNative(pathArg(path18), optsArg(opts));
|
|
161535
|
+
mkdirp2.manual = (path18, opts) => mkdirpManual(pathArg(path18), optsArg(opts));
|
|
161536
|
+
mkdirp2.nativeSync = (path18, opts) => mkdirpNativeSync(pathArg(path18), optsArg(opts));
|
|
161537
|
+
mkdirp2.manualSync = (path18, opts) => mkdirpManualSync(pathArg(path18), optsArg(opts));
|
|
161357
161538
|
module2.exports = mkdirp2;
|
|
161358
161539
|
}
|
|
161359
161540
|
});
|
|
@@ -161363,7 +161544,7 @@ init_import_meta_url();
|
|
|
161363
161544
|
|
|
161364
161545
|
// src/instrument.ts
|
|
161365
161546
|
init_import_meta_url();
|
|
161366
|
-
var
|
|
161547
|
+
var import_os3 = require("os");
|
|
161367
161548
|
init_esm9();
|
|
161368
161549
|
var import_is_ci = __toESM(require_is_ci());
|
|
161369
161550
|
init_version9();
|
|
@@ -161402,11 +161583,11 @@ init2({
|
|
|
161402
161583
|
}
|
|
161403
161584
|
});
|
|
161404
161585
|
var scope = getCurrentScope();
|
|
161405
|
-
scope.setTag("os-username", (0,
|
|
161406
|
-
scope.setTag("os-hostname", (0,
|
|
161407
|
-
scope.setTag("os-platform", (0,
|
|
161408
|
-
scope.setTag("os-arch", (0,
|
|
161409
|
-
scope.setTag("os-release", (0,
|
|
161586
|
+
scope.setTag("os-username", (0, import_os3.userInfo)().username);
|
|
161587
|
+
scope.setTag("os-hostname", (0, import_os3.hostname)());
|
|
161588
|
+
scope.setTag("os-platform", (0, import_os3.platform)());
|
|
161589
|
+
scope.setTag("os-arch", (0, import_os3.arch)());
|
|
161590
|
+
scope.setTag("os-release", (0, import_os3.release)());
|
|
161410
161591
|
scope.setExtra("argv", process.argv);
|
|
161411
161592
|
scope.setExtra("craft-version", getPackageVersion());
|
|
161412
161593
|
scope.setExtra("working-directory", process.cwd());
|
|
@@ -162146,15 +162327,15 @@ function ui2(opts) {
|
|
|
162146
162327
|
// node_modules/.pnpm/escalade@3.2.0/node_modules/escalade/sync/index.mjs
|
|
162147
162328
|
init_import_meta_url();
|
|
162148
162329
|
var import_path23 = require("path");
|
|
162149
|
-
var
|
|
162330
|
+
var import_fs25 = require("fs");
|
|
162150
162331
|
function sync_default(start, callback) {
|
|
162151
162332
|
let dir = (0, import_path23.resolve)(".", start);
|
|
162152
|
-
let tmp2, stats = (0,
|
|
162333
|
+
let tmp2, stats = (0, import_fs25.statSync)(dir);
|
|
162153
162334
|
if (!stats.isDirectory()) {
|
|
162154
162335
|
dir = (0, import_path23.dirname)(dir);
|
|
162155
162336
|
}
|
|
162156
162337
|
while (true) {
|
|
162157
|
-
tmp2 = callback(dir, (0,
|
|
162338
|
+
tmp2 = callback(dir, (0, import_fs25.readdirSync)(dir));
|
|
162158
162339
|
if (tmp2) return (0, import_path23.resolve)(dir, tmp2);
|
|
162159
162340
|
dir = (0, import_path23.dirname)(tmp2 = dir);
|
|
162160
162341
|
if (tmp2 === dir) break;
|
|
@@ -163112,7 +163293,7 @@ function stripQuotes(val) {
|
|
|
163112
163293
|
}
|
|
163113
163294
|
|
|
163114
163295
|
// node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/index.js
|
|
163115
|
-
var
|
|
163296
|
+
var import_fs26 = require("fs");
|
|
163116
163297
|
var import_node_module = require("node:module");
|
|
163117
163298
|
var _a4;
|
|
163118
163299
|
var _b;
|
|
@@ -163135,11 +163316,11 @@ var parser4 = new YargsParser({
|
|
|
163135
163316
|
format: import_util25.format,
|
|
163136
163317
|
normalize: import_path24.normalize,
|
|
163137
163318
|
resolve: import_path24.resolve,
|
|
163138
|
-
require: (
|
|
163319
|
+
require: (path18) => {
|
|
163139
163320
|
if (typeof require2 !== "undefined") {
|
|
163140
|
-
return require2(
|
|
163141
|
-
} else if (
|
|
163142
|
-
return JSON.parse((0,
|
|
163321
|
+
return require2(path18);
|
|
163322
|
+
} else if (path18.match(/\.json$/)) {
|
|
163323
|
+
return JSON.parse((0, import_fs26.readFileSync)(path18, "utf8"));
|
|
163143
163324
|
} else {
|
|
163144
163325
|
throw Error("only .json config files are supported in ESM");
|
|
163145
163326
|
}
|
|
@@ -163182,19 +163363,19 @@ init_import_meta_url();
|
|
|
163182
163363
|
|
|
163183
163364
|
// node_modules/.pnpm/y18n@5.0.8/node_modules/y18n/build/lib/platform-shims/node.js
|
|
163184
163365
|
init_import_meta_url();
|
|
163185
|
-
var
|
|
163366
|
+
var import_fs27 = require("fs");
|
|
163186
163367
|
var import_util26 = require("util");
|
|
163187
163368
|
var import_path25 = require("path");
|
|
163188
163369
|
var node_default = {
|
|
163189
163370
|
fs: {
|
|
163190
|
-
readFileSync:
|
|
163191
|
-
writeFile:
|
|
163371
|
+
readFileSync: import_fs27.readFileSync,
|
|
163372
|
+
writeFile: import_fs27.writeFile
|
|
163192
163373
|
},
|
|
163193
163374
|
format: import_util26.format,
|
|
163194
163375
|
resolve: import_path25.resolve,
|
|
163195
163376
|
exists: (file) => {
|
|
163196
163377
|
try {
|
|
163197
|
-
return (0,
|
|
163378
|
+
return (0, import_fs27.statSync)(file).isFile();
|
|
163198
163379
|
} catch (err) {
|
|
163199
163380
|
return false;
|
|
163200
163381
|
}
|
|
@@ -166790,8 +166971,8 @@ __export(prepare_exports, {
|
|
|
166790
166971
|
runPreReleaseCommand: () => runPreReleaseCommand
|
|
166791
166972
|
});
|
|
166792
166973
|
init_import_meta_url();
|
|
166793
|
-
var
|
|
166794
|
-
var
|
|
166974
|
+
var import_fs29 = require("fs");
|
|
166975
|
+
var import_path29 = require("path");
|
|
166795
166976
|
var shellQuote2 = __toESM(require_shell_quote());
|
|
166796
166977
|
init_dryRun();
|
|
166797
166978
|
init_config2();
|
|
@@ -166890,20 +167071,24 @@ init_system();
|
|
|
166890
167071
|
// src/utils/releaseCommandEnv.ts
|
|
166891
167072
|
init_import_meta_url();
|
|
166892
167073
|
var ALLOWED_ENV_VARS = [
|
|
167074
|
+
"PATH",
|
|
166893
167075
|
"HOME",
|
|
166894
167076
|
"USER",
|
|
166895
167077
|
"GIT_COMMITTER_NAME",
|
|
166896
167078
|
"GIT_AUTHOR_NAME",
|
|
166897
167079
|
"EMAIL"
|
|
166898
167080
|
];
|
|
167081
|
+
var ALLOWED_ENV_VAR_PREFIXES = ["GITHUB_", "RUNNER_"];
|
|
166899
167082
|
function buildReleaseCommandEnv(extras = {}) {
|
|
166900
|
-
const env2 = {
|
|
166901
|
-
PATH: process.env.PATH,
|
|
166902
|
-
GITHUB_TOKEN: process.env.GITHUB_TOKEN
|
|
166903
|
-
};
|
|
167083
|
+
const env2 = {};
|
|
166904
167084
|
for (const key of ALLOWED_ENV_VARS) {
|
|
166905
167085
|
env2[key] = process.env[key];
|
|
166906
167086
|
}
|
|
167087
|
+
for (const key of Object.keys(process.env)) {
|
|
167088
|
+
if (ALLOWED_ENV_VAR_PREFIXES.some((prefix) => key.startsWith(prefix))) {
|
|
167089
|
+
env2[key] = process.env[key];
|
|
167090
|
+
}
|
|
167091
|
+
}
|
|
166907
167092
|
return { ...env2, ...extras };
|
|
166908
167093
|
}
|
|
166909
167094
|
|
|
@@ -166977,9 +167162,9 @@ __export(publish_exports, {
|
|
|
166977
167162
|
});
|
|
166978
167163
|
init_import_meta_url();
|
|
166979
167164
|
var import_chalk = __toESM(require_source());
|
|
166980
|
-
var
|
|
167165
|
+
var import_fs28 = require("fs");
|
|
166981
167166
|
init_dryRun();
|
|
166982
|
-
var
|
|
167167
|
+
var import_path28 = require("path");
|
|
166983
167168
|
var import_shell_quote = __toESM(require_shell_quote());
|
|
166984
167169
|
var import_string_length = __toESM(require_string_length());
|
|
166985
167170
|
init_config2();
|
|
@@ -166996,7 +167181,45 @@ init_version9();
|
|
|
166996
167181
|
init_esm9();
|
|
166997
167182
|
init_git();
|
|
166998
167183
|
init_tracing3();
|
|
166999
|
-
|
|
167184
|
+
|
|
167185
|
+
// src/utils/publishState.ts
|
|
167186
|
+
init_import_meta_url();
|
|
167187
|
+
var import_crypto10 = require("crypto");
|
|
167188
|
+
var import_os4 = require("os");
|
|
167189
|
+
var import_path27 = require("path");
|
|
167190
|
+
var STATE_DIR_NAME = "craft";
|
|
167191
|
+
function getCraftStateDir() {
|
|
167192
|
+
const xdgStateHome = process.env.XDG_STATE_HOME;
|
|
167193
|
+
if (xdgStateHome && xdgStateHome.length > 0) {
|
|
167194
|
+
return (0, import_path27.join)(xdgStateHome, STATE_DIR_NAME);
|
|
167195
|
+
}
|
|
167196
|
+
return (0, import_path27.join)((0, import_os4.homedir)(), ".local", "state", STATE_DIR_NAME);
|
|
167197
|
+
}
|
|
167198
|
+
function sanitiseForFilename(raw) {
|
|
167199
|
+
return raw.toLowerCase().replace(/[^a-z0-9._-]+/g, "_").replace(/^_+|_+$/g, "");
|
|
167200
|
+
}
|
|
167201
|
+
function shortCwdHash(cwd) {
|
|
167202
|
+
return (0, import_crypto10.createHash)("sha1").update(cwd).digest("hex").slice(0, 12);
|
|
167203
|
+
}
|
|
167204
|
+
function getPublishStateFilename(version2, githubConfig, cwd = process.cwd()) {
|
|
167205
|
+
const safeVersion = sanitiseForFilename(version2);
|
|
167206
|
+
if (githubConfig) {
|
|
167207
|
+
const owner = sanitiseForFilename(githubConfig.owner);
|
|
167208
|
+
const repo = sanitiseForFilename(githubConfig.repo);
|
|
167209
|
+
return `publish-state-${owner}-${repo}-${shortCwdHash(cwd)}-${safeVersion}.json`;
|
|
167210
|
+
}
|
|
167211
|
+
const cwdDigest = (0, import_crypto10.createHash)("sha256").update(cwd).digest("hex").slice(0, 16);
|
|
167212
|
+
return `publish-state-${cwdDigest}-${safeVersion}.json`;
|
|
167213
|
+
}
|
|
167214
|
+
function getPublishStatePath(version2, githubConfig, cwd = process.cwd()) {
|
|
167215
|
+
return (0, import_path27.join)(
|
|
167216
|
+
getCraftStateDir(),
|
|
167217
|
+
getPublishStateFilename(version2, githubConfig, cwd)
|
|
167218
|
+
);
|
|
167219
|
+
}
|
|
167220
|
+
|
|
167221
|
+
// src/commands/publish.ts
|
|
167222
|
+
var DEFAULT_POST_RELEASE_SCRIPT_PATH = (0, import_path28.join)("scripts", "post-release.sh");
|
|
167000
167223
|
var command2 = ["publish NEW-VERSION"];
|
|
167001
167224
|
var aliases = ["pp", "publish"];
|
|
167002
167225
|
var description = "\u{1F6EB} Publish artifacts";
|
|
@@ -167400,13 +167623,28 @@ Original error: ${err instanceof Error ? err.message : String(err)}`;
|
|
|
167400
167623
|
}
|
|
167401
167624
|
}
|
|
167402
167625
|
let targetConfigList = await expandWorkspaceTargets(config3.targets || []);
|
|
167626
|
+
let publishStateGithubConfig = null;
|
|
167627
|
+
try {
|
|
167628
|
+
publishStateGithubConfig = await getGlobalGitHubConfig();
|
|
167629
|
+
} catch {
|
|
167630
|
+
}
|
|
167631
|
+
const publishStateFile = getPublishStatePath(
|
|
167632
|
+
newVersion,
|
|
167633
|
+
publishStateGithubConfig
|
|
167634
|
+
);
|
|
167403
167635
|
logger.info(`Looking for publish state file for ${newVersion}...`);
|
|
167404
|
-
|
|
167405
|
-
const
|
|
167636
|
+
logger.debug(`Publish state file path: ${publishStateFile}`);
|
|
167637
|
+
const legacyStateFile = `.craft-publish-${newVersion}.json`;
|
|
167638
|
+
if ((0, import_fs28.existsSync)(legacyStateFile)) {
|
|
167639
|
+
logger.warn(
|
|
167640
|
+
`Found legacy publish state file at "${legacyStateFile}" in the project directory. This file is no longer read for security reasons. Craft now stores publish state at "${publishStateFile}". If you were pre-seeding published targets, update your workflow to write to the new location.`
|
|
167641
|
+
);
|
|
167642
|
+
}
|
|
167643
|
+
const earlierStateExists = (0, import_fs28.existsSync)(publishStateFile);
|
|
167406
167644
|
let publishState;
|
|
167407
167645
|
if (earlierStateExists) {
|
|
167408
167646
|
logger.info(`Found publish state file, resuming from there...`);
|
|
167409
|
-
publishState = JSON.parse((0,
|
|
167647
|
+
publishState = JSON.parse((0, import_fs28.readFileSync)(publishStateFile).toString());
|
|
167410
167648
|
targetsToPublish = new Set(targetConfigList.map(BaseTarget.getId));
|
|
167411
167649
|
} else {
|
|
167412
167650
|
publishState = { published: /* @__PURE__ */ Object.create(null) };
|
|
@@ -167434,6 +167672,7 @@ Original error: ${err instanceof Error ? err.message : String(err)}`;
|
|
|
167434
167672
|
await promptConfirmation();
|
|
167435
167673
|
await withTempDir(async (downloadDirectory) => {
|
|
167436
167674
|
artifactProvider.setDownloadDirectory(downloadDirectory);
|
|
167675
|
+
(0, import_fs28.mkdirSync)((0, import_path28.dirname)(publishStateFile), { recursive: true });
|
|
167437
167676
|
for (const target of targetList) {
|
|
167438
167677
|
await publishToTarget(target, newVersion, revision);
|
|
167439
167678
|
publishState.published[BaseTarget.getId(target.config)] = true;
|
|
@@ -167554,7 +167793,7 @@ var handler2 = async (args) => {
|
|
|
167554
167793
|
var command3 = ["prepare [NEW-VERSION]"];
|
|
167555
167794
|
var aliases2 = ["p", "prerelease", "prepublish", "prepare", "release"];
|
|
167556
167795
|
var description2 = "\u{1F6A2} Prepare a new release branch";
|
|
167557
|
-
var DEFAULT_BUMP_VERSION_PATH = (0,
|
|
167796
|
+
var DEFAULT_BUMP_VERSION_PATH = (0, import_path29.join)("scripts", "bump-version.sh");
|
|
167558
167797
|
var AUTO_VERSION_MIN_VERSION2 = "2.14.0";
|
|
167559
167798
|
var AUTO_BUMP_MIN_VERSION = "2.21.0";
|
|
167560
167799
|
var builder2 = (yargs) => yargs.positional("NEW-VERSION", {
|
|
@@ -167791,12 +168030,12 @@ async function prepareChangelog(git, oldVersion, newVersion, changelogPolicy = "
|
|
|
167791
168030
|
}
|
|
167792
168031
|
logger.info("Checking the changelog...");
|
|
167793
168032
|
logger.debug(`Changelog policy: "${changelogPolicy}".`);
|
|
167794
|
-
const relativePath = (0,
|
|
168033
|
+
const relativePath = (0, import_path29.relative)("", changelogPath);
|
|
167795
168034
|
logger.debug(`Changelog path: ${relativePath}`);
|
|
167796
168035
|
if (relativePath.startsWith(".")) {
|
|
167797
168036
|
throw new ConfigurationError(`Invalid changelog path: "${changelogPath}"`);
|
|
167798
168037
|
}
|
|
167799
|
-
if (!(0,
|
|
168038
|
+
if (!(0, import_fs29.existsSync)(relativePath)) {
|
|
167800
168039
|
if (changelogPolicy === "auto" /* Auto */) {
|
|
167801
168040
|
logger.info(`Creating changelog file: ${relativePath}`);
|
|
167802
168041
|
await safeFs.writeFile(relativePath, "# Changelog\n");
|
|
@@ -167806,7 +168045,7 @@ async function prepareChangelog(git, oldVersion, newVersion, changelogPolicy = "
|
|
|
167806
168045
|
);
|
|
167807
168046
|
}
|
|
167808
168047
|
}
|
|
167809
|
-
let changelogString = (await
|
|
168048
|
+
let changelogString = (await import_fs29.promises.readFile(relativePath)).toString();
|
|
167810
168049
|
let changeset = findChangeset(
|
|
167811
168050
|
changelogString,
|
|
167812
168051
|
newVersion,
|
|
@@ -168000,7 +168239,7 @@ async function prepareMain(argv) {
|
|
|
168000
168239
|
changelogPath
|
|
168001
168240
|
);
|
|
168002
168241
|
if (changelogBody) {
|
|
168003
|
-
const resolvedChangelogPath = (0,
|
|
168242
|
+
const resolvedChangelogPath = (0, import_path29.relative)(
|
|
168004
168243
|
"",
|
|
168005
168244
|
changelogPath || DEFAULT_CHANGELOG_PATH
|
|
168006
168245
|
);
|
|
@@ -168138,8 +168377,8 @@ init_import_meta_url();
|
|
|
168138
168377
|
init_logger2();
|
|
168139
168378
|
init_config2();
|
|
168140
168379
|
init_errors2();
|
|
168141
|
-
var
|
|
168142
|
-
var
|
|
168380
|
+
var import_path30 = require("path");
|
|
168381
|
+
var import_fs30 = require("fs");
|
|
168143
168382
|
init_none();
|
|
168144
168383
|
var mkdirp = require_mkdirp();
|
|
168145
168384
|
var command6 = ["download [NAME..]"];
|
|
@@ -168161,9 +168400,9 @@ var builder3 = (yargs) => yargs.positional("NAME", {
|
|
|
168161
168400
|
});
|
|
168162
168401
|
async function prepareOutputDirectory(argv) {
|
|
168163
168402
|
if (argv.directory) {
|
|
168164
|
-
const fullPath = (0,
|
|
168165
|
-
if ((0,
|
|
168166
|
-
if ((0,
|
|
168403
|
+
const fullPath = (0, import_path30.resolve)(argv.directory);
|
|
168404
|
+
if ((0, import_fs30.existsSync)(fullPath)) {
|
|
168405
|
+
if ((0, import_fs30.lstatSync)(fullPath).isDirectory()) {
|
|
168167
168406
|
return fullPath;
|
|
168168
168407
|
} else {
|
|
168169
168408
|
throw new ConfigurationError(`Not a directory: ${fullPath}`);
|
|
@@ -168174,7 +168413,7 @@ async function prepareOutputDirectory(argv) {
|
|
|
168174
168413
|
return fullPath;
|
|
168175
168414
|
}
|
|
168176
168415
|
} else {
|
|
168177
|
-
return (0,
|
|
168416
|
+
return (0, import_path30.resolve)(process.cwd());
|
|
168178
168417
|
}
|
|
168179
168418
|
}
|
|
168180
168419
|
async function handlerMain(argv) {
|