@sentry/craft 2.25.4 → 2.26.0
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 +688 -946
- package/package.json +1 -2
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
|
};
|
|
@@ -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
|
|
@@ -124649,7 +124726,7 @@ var init_npm = __esm({
|
|
|
124649
124726
|
* @param path Absolute path to the tarball to upload
|
|
124650
124727
|
* @returns A promise that resolves when the upload has completed
|
|
124651
124728
|
*/
|
|
124652
|
-
async publishPackage(
|
|
124729
|
+
async publishPackage(path18, options) {
|
|
124653
124730
|
const args = ["publish", "--ignore-scripts"];
|
|
124654
124731
|
let bin;
|
|
124655
124732
|
if (this.npmConfig.useYarn) {
|
|
@@ -124665,7 +124742,7 @@ var init_npm = __esm({
|
|
|
124665
124742
|
if (options.tag) {
|
|
124666
124743
|
args.push(`--tag=${options.tag}`);
|
|
124667
124744
|
}
|
|
124668
|
-
args.push(
|
|
124745
|
+
args.push(path18);
|
|
124669
124746
|
if (this.npmConfig.useOidc) {
|
|
124670
124747
|
const spawnOptions = {};
|
|
124671
124748
|
spawnOptions.env = { ...process.env };
|
|
@@ -124723,9 +124800,9 @@ var init_npm = __esm({
|
|
|
124723
124800
|
}
|
|
124724
124801
|
await Promise.all(
|
|
124725
124802
|
packageFiles.map(async (file) => {
|
|
124726
|
-
const
|
|
124803
|
+
const path18 = await this.artifactProvider.downloadArtifact(file);
|
|
124727
124804
|
this.logger.info(`Releasing ${file.filename} to NPM`);
|
|
124728
|
-
return this.publishPackage(
|
|
124805
|
+
return this.publishPackage(path18, publishOptions);
|
|
124729
124806
|
})
|
|
124730
124807
|
);
|
|
124731
124808
|
this.logger.info("NPM release complete");
|
|
@@ -124867,11 +124944,11 @@ var init_nuget = __esm({
|
|
|
124867
124944
|
* @param path Absolute path to the archive to upload
|
|
124868
124945
|
* @returns A promise that resolves when the upload has completed
|
|
124869
124946
|
*/
|
|
124870
|
-
async uploadAsset(
|
|
124947
|
+
async uploadAsset(path18) {
|
|
124871
124948
|
const args = [
|
|
124872
124949
|
"nuget",
|
|
124873
124950
|
"push",
|
|
124874
|
-
|
|
124951
|
+
path18,
|
|
124875
124952
|
"--api-key",
|
|
124876
124953
|
"${NUGET_API_TOKEN}",
|
|
124877
124954
|
// Warning: `--skip-duplicate` means we will NOT error when a version
|
|
@@ -124914,7 +124991,7 @@ var init_nuget = __esm({
|
|
|
124914
124991
|
);
|
|
124915
124992
|
await Promise.all(
|
|
124916
124993
|
packageFiles.map(async (file) => {
|
|
124917
|
-
const
|
|
124994
|
+
const path18 = await this.artifactProvider.downloadArtifact(file);
|
|
124918
124995
|
const symbolFileName = file.filename.replace(".nupkg", ".snupkg");
|
|
124919
124996
|
const symbolFile = symbolFiles.find((f5) => f5.filename === symbolFileName);
|
|
124920
124997
|
if (symbolFile) {
|
|
@@ -124923,7 +125000,7 @@ var init_nuget = __esm({
|
|
|
124923
125000
|
this.logger.info(
|
|
124924
125001
|
`Uploading file "${file.filename}" via "dotnet nuget"` + (symbolFile ? `, including symbol file "${symbolFile.filename}"` : "")
|
|
124925
125002
|
);
|
|
124926
|
-
return this.uploadAsset(
|
|
125003
|
+
return this.uploadAsset(path18);
|
|
124927
125004
|
})
|
|
124928
125005
|
);
|
|
124929
125006
|
this.logger.info("Nuget release complete");
|
|
@@ -126221,14 +126298,14 @@ var require_aws4 = __commonJS({
|
|
|
126221
126298
|
}
|
|
126222
126299
|
if (pathStr !== "/") {
|
|
126223
126300
|
if (normalizePath2) pathStr = pathStr.replace(/\/{2,}/g, "/");
|
|
126224
|
-
pathStr = pathStr.split("/").reduce(function(
|
|
126301
|
+
pathStr = pathStr.split("/").reduce(function(path18, piece) {
|
|
126225
126302
|
if (normalizePath2 && piece === "..") {
|
|
126226
|
-
|
|
126303
|
+
path18.pop();
|
|
126227
126304
|
} else if (!normalizePath2 || piece !== ".") {
|
|
126228
126305
|
if (decodePath) piece = decodeURIComponent(piece.replace(/\+/g, " "));
|
|
126229
|
-
|
|
126306
|
+
path18.push(encodeRfc3986Full(piece));
|
|
126230
126307
|
}
|
|
126231
|
-
return
|
|
126308
|
+
return path18;
|
|
126232
126309
|
}, []).join("/");
|
|
126233
126310
|
if (pathStr[0] !== "/") pathStr = "/" + pathStr;
|
|
126234
126311
|
if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, "/");
|
|
@@ -126281,25 +126358,25 @@ var require_aws4 = __commonJS({
|
|
|
126281
126358
|
};
|
|
126282
126359
|
};
|
|
126283
126360
|
RequestSigner.prototype.parsePath = function() {
|
|
126284
|
-
var
|
|
126285
|
-
if (/[^0-9A-Za-z;,/?:@&=+$\-_.!~*'()#%]/.test(
|
|
126286
|
-
|
|
126361
|
+
var path18 = this.request.path || "/";
|
|
126362
|
+
if (/[^0-9A-Za-z;,/?:@&=+$\-_.!~*'()#%]/.test(path18)) {
|
|
126363
|
+
path18 = encodeURI(decodeURI(path18));
|
|
126287
126364
|
}
|
|
126288
|
-
var queryIx =
|
|
126365
|
+
var queryIx = path18.indexOf("?"), query = null;
|
|
126289
126366
|
if (queryIx >= 0) {
|
|
126290
|
-
query = querystring2.parse(
|
|
126291
|
-
|
|
126367
|
+
query = querystring2.parse(path18.slice(queryIx + 1));
|
|
126368
|
+
path18 = path18.slice(0, queryIx);
|
|
126292
126369
|
}
|
|
126293
126370
|
this.parsedPath = {
|
|
126294
|
-
path:
|
|
126371
|
+
path: path18,
|
|
126295
126372
|
query
|
|
126296
126373
|
};
|
|
126297
126374
|
};
|
|
126298
126375
|
RequestSigner.prototype.formatPath = function() {
|
|
126299
|
-
var
|
|
126300
|
-
if (!query) return
|
|
126376
|
+
var path18 = this.parsedPath.path, query = this.parsedPath.query;
|
|
126377
|
+
if (!query) return path18;
|
|
126301
126378
|
if (query[""] != null) delete query[""];
|
|
126302
|
-
return
|
|
126379
|
+
return path18 + "?" + encodeRfc3986(querystring2.stringify(query));
|
|
126303
126380
|
};
|
|
126304
126381
|
aws42.RequestSigner = RequestSigner;
|
|
126305
126382
|
aws42.sign = function(request3, credentials) {
|
|
@@ -127219,9 +127296,9 @@ var init_createPaginator = __esm({
|
|
|
127219
127296
|
command10 = withCommand(command10) ?? command10;
|
|
127220
127297
|
return await client.send(command10, ...args);
|
|
127221
127298
|
};
|
|
127222
|
-
get = (fromObject,
|
|
127299
|
+
get = (fromObject, path18) => {
|
|
127223
127300
|
let cursor2 = fromObject;
|
|
127224
|
-
const pathComponents =
|
|
127301
|
+
const pathComponents = path18.split(".");
|
|
127225
127302
|
for (const step of pathComponents) {
|
|
127226
127303
|
if (!cursor2 || typeof cursor2 !== "object") {
|
|
127227
127304
|
return void 0;
|
|
@@ -128253,12 +128330,12 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
128253
128330
|
const password = request3.password ?? "";
|
|
128254
128331
|
auth2 = `${username}:${password}`;
|
|
128255
128332
|
}
|
|
128256
|
-
let
|
|
128333
|
+
let path18 = request3.path;
|
|
128257
128334
|
if (queryString) {
|
|
128258
|
-
|
|
128335
|
+
path18 += `?${queryString}`;
|
|
128259
128336
|
}
|
|
128260
128337
|
if (request3.fragment) {
|
|
128261
|
-
|
|
128338
|
+
path18 += `#${request3.fragment}`;
|
|
128262
128339
|
}
|
|
128263
128340
|
let hostname3 = request3.hostname ?? "";
|
|
128264
128341
|
if (hostname3[0] === "[" && hostname3.endsWith("]")) {
|
|
@@ -128270,7 +128347,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
128270
128347
|
headers: request3.headers,
|
|
128271
128348
|
host: hostname3,
|
|
128272
128349
|
method: request3.method,
|
|
128273
|
-
path:
|
|
128350
|
+
path: path18,
|
|
128274
128351
|
port: request3.port,
|
|
128275
128352
|
agent,
|
|
128276
128353
|
auth: auth2
|
|
@@ -128525,16 +128602,16 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
128525
128602
|
reject(err);
|
|
128526
128603
|
};
|
|
128527
128604
|
const queryString = querystringBuilder.buildQueryString(query || {});
|
|
128528
|
-
let
|
|
128605
|
+
let path18 = request3.path;
|
|
128529
128606
|
if (queryString) {
|
|
128530
|
-
|
|
128607
|
+
path18 += `?${queryString}`;
|
|
128531
128608
|
}
|
|
128532
128609
|
if (request3.fragment) {
|
|
128533
|
-
|
|
128610
|
+
path18 += `#${request3.fragment}`;
|
|
128534
128611
|
}
|
|
128535
128612
|
const req = session.request({
|
|
128536
128613
|
...request3.headers,
|
|
128537
|
-
[http22.constants.HTTP2_HEADER_PATH]:
|
|
128614
|
+
[http22.constants.HTTP2_HEADER_PATH]: path18,
|
|
128538
128615
|
[http22.constants.HTTP2_HEADER_METHOD]: method
|
|
128539
128616
|
});
|
|
128540
128617
|
session.ref();
|
|
@@ -128724,13 +128801,13 @@ var require_dist_cjs15 = __commonJS({
|
|
|
128724
128801
|
abortError.name = "AbortError";
|
|
128725
128802
|
return Promise.reject(abortError);
|
|
128726
128803
|
}
|
|
128727
|
-
let
|
|
128804
|
+
let path18 = request3.path;
|
|
128728
128805
|
const queryString = querystringBuilder.buildQueryString(request3.query || {});
|
|
128729
128806
|
if (queryString) {
|
|
128730
|
-
|
|
128807
|
+
path18 += `?${queryString}`;
|
|
128731
128808
|
}
|
|
128732
128809
|
if (request3.fragment) {
|
|
128733
|
-
|
|
128810
|
+
path18 += `#${request3.fragment}`;
|
|
128734
128811
|
}
|
|
128735
128812
|
let auth2 = "";
|
|
128736
128813
|
if (request3.username != null || request3.password != null) {
|
|
@@ -128739,7 +128816,7 @@ var require_dist_cjs15 = __commonJS({
|
|
|
128739
128816
|
auth2 = `${username}:${password}@`;
|
|
128740
128817
|
}
|
|
128741
128818
|
const { port, method } = request3;
|
|
128742
|
-
const url2 = `${request3.protocol}//${auth2}${request3.hostname}${port ? `:${port}` : ""}${
|
|
128819
|
+
const url2 = `${request3.protocol}//${auth2}${request3.hostname}${port ? `:${port}` : ""}${path18}`;
|
|
128743
128820
|
const body = method === "GET" || method === "HEAD" ? void 0 : request3.body;
|
|
128744
128821
|
const requestOptions = {
|
|
128745
128822
|
body,
|
|
@@ -130855,13 +130932,13 @@ function __disposeResources(env2) {
|
|
|
130855
130932
|
}
|
|
130856
130933
|
return next();
|
|
130857
130934
|
}
|
|
130858
|
-
function __rewriteRelativeImportExtension(
|
|
130859
|
-
if (typeof
|
|
130860
|
-
return
|
|
130935
|
+
function __rewriteRelativeImportExtension(path18, preserveJsx) {
|
|
130936
|
+
if (typeof path18 === "string" && /^\.\.?\//.test(path18)) {
|
|
130937
|
+
return path18.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m6, tsx, d5, ext2, cm) {
|
|
130861
130938
|
return tsx ? preserveJsx ? ".jsx" : ".js" : d5 && (!ext2 || !cm) ? m6 : d5 + ext2 + "." + cm.toLowerCase() + "js";
|
|
130862
130939
|
});
|
|
130863
130940
|
}
|
|
130864
|
-
return
|
|
130941
|
+
return path18;
|
|
130865
130942
|
}
|
|
130866
130943
|
var extendStatics, __assign3, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;
|
|
130867
130944
|
var init_tslib_es6 = __esm({
|
|
@@ -131757,11 +131834,11 @@ var init_HttpBindingProtocol = __esm({
|
|
|
131757
131834
|
const opTraits = translateTraits(operationSchema.traits);
|
|
131758
131835
|
if (opTraits.http) {
|
|
131759
131836
|
request3.method = opTraits.http[0];
|
|
131760
|
-
const [
|
|
131837
|
+
const [path18, search] = opTraits.http[1].split("?");
|
|
131761
131838
|
if (request3.path == "/") {
|
|
131762
|
-
request3.path =
|
|
131839
|
+
request3.path = path18;
|
|
131763
131840
|
} else {
|
|
131764
|
-
request3.path +=
|
|
131841
|
+
request3.path += path18;
|
|
131765
131842
|
}
|
|
131766
131843
|
const traitSearchParams = new URLSearchParams(search ?? "");
|
|
131767
131844
|
Object.assign(query, Object.fromEntries(traitSearchParams));
|
|
@@ -132147,8 +132224,8 @@ var init_requestBuilder = __esm({
|
|
|
132147
132224
|
return this;
|
|
132148
132225
|
}
|
|
132149
132226
|
p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
|
|
132150
|
-
this.resolvePathStack.push((
|
|
132151
|
-
this.path = resolvedPath(
|
|
132227
|
+
this.resolvePathStack.push((path18) => {
|
|
132228
|
+
this.path = resolvedPath(path18, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
|
|
132152
132229
|
});
|
|
132153
132230
|
return this;
|
|
132154
132231
|
}
|
|
@@ -132815,18 +132892,18 @@ var require_dist_cjs19 = __commonJS({
|
|
|
132815
132892
|
}
|
|
132816
132893
|
};
|
|
132817
132894
|
var booleanEquals = (value1, value2) => value1 === value2;
|
|
132818
|
-
var getAttrPathList = (
|
|
132819
|
-
const parts =
|
|
132895
|
+
var getAttrPathList = (path18) => {
|
|
132896
|
+
const parts = path18.split(".");
|
|
132820
132897
|
const pathList = [];
|
|
132821
132898
|
for (const part of parts) {
|
|
132822
132899
|
const squareBracketIndex = part.indexOf("[");
|
|
132823
132900
|
if (squareBracketIndex !== -1) {
|
|
132824
132901
|
if (part.indexOf("]") !== part.length - 1) {
|
|
132825
|
-
throw new EndpointError(`Path: '${
|
|
132902
|
+
throw new EndpointError(`Path: '${path18}' does not end with ']'`);
|
|
132826
132903
|
}
|
|
132827
132904
|
const arrayIndex = part.slice(squareBracketIndex + 1, -1);
|
|
132828
132905
|
if (Number.isNaN(parseInt(arrayIndex))) {
|
|
132829
|
-
throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${
|
|
132906
|
+
throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path18}'`);
|
|
132830
132907
|
}
|
|
132831
132908
|
if (squareBracketIndex !== 0) {
|
|
132832
132909
|
pathList.push(part.slice(0, squareBracketIndex));
|
|
@@ -132838,9 +132915,9 @@ var require_dist_cjs19 = __commonJS({
|
|
|
132838
132915
|
}
|
|
132839
132916
|
return pathList;
|
|
132840
132917
|
};
|
|
132841
|
-
var getAttr = (value,
|
|
132918
|
+
var getAttr = (value, path18) => getAttrPathList(path18).reduce((acc, index) => {
|
|
132842
132919
|
if (typeof acc !== "object") {
|
|
132843
|
-
throw new EndpointError(`Index '${index}' in '${
|
|
132920
|
+
throw new EndpointError(`Index '${index}' in '${path18}' not found in '${JSON.stringify(value)}'`);
|
|
132844
132921
|
} else if (Array.isArray(acc)) {
|
|
132845
132922
|
return acc[parseInt(index)];
|
|
132846
132923
|
}
|
|
@@ -132859,8 +132936,8 @@ var require_dist_cjs19 = __commonJS({
|
|
|
132859
132936
|
return value;
|
|
132860
132937
|
}
|
|
132861
132938
|
if (typeof value === "object" && "hostname" in value) {
|
|
132862
|
-
const { hostname: hostname4, port, protocol: protocol2 = "", path:
|
|
132863
|
-
const url2 = new URL(`${protocol2}//${hostname4}${port ? `:${port}` : ""}${
|
|
132939
|
+
const { hostname: hostname4, port, protocol: protocol2 = "", path: path18 = "", query = {} } = value;
|
|
132940
|
+
const url2 = new URL(`${protocol2}//${hostname4}${port ? `:${port}` : ""}${path18}`);
|
|
132864
132941
|
url2.search = Object.entries(query).map(([k6, v9]) => `${k6}=${v9}`).join("&");
|
|
132865
132942
|
return url2;
|
|
132866
132943
|
}
|
|
@@ -134396,10 +134473,10 @@ ${longDate}
|
|
|
134396
134473
|
${credentialScope}
|
|
134397
134474
|
${utilHexEncoding.toHex(hashedRequest)}`;
|
|
134398
134475
|
}
|
|
134399
|
-
getCanonicalPath({ path:
|
|
134476
|
+
getCanonicalPath({ path: path18 }) {
|
|
134400
134477
|
if (this.uriEscapePath) {
|
|
134401
134478
|
const normalizedPathSegments = [];
|
|
134402
|
-
for (const pathSegment of
|
|
134479
|
+
for (const pathSegment of path18.split("/")) {
|
|
134403
134480
|
if (pathSegment?.length === 0)
|
|
134404
134481
|
continue;
|
|
134405
134482
|
if (pathSegment === ".")
|
|
@@ -134410,11 +134487,11 @@ ${utilHexEncoding.toHex(hashedRequest)}`;
|
|
|
134410
134487
|
normalizedPathSegments.push(pathSegment);
|
|
134411
134488
|
}
|
|
134412
134489
|
}
|
|
134413
|
-
const normalizedPath = `${
|
|
134490
|
+
const normalizedPath = `${path18?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path18?.endsWith("/") ? "/" : ""}`;
|
|
134414
134491
|
const doubleEncoded = utilUriEscape.escapeUri(normalizedPath);
|
|
134415
134492
|
return doubleEncoded.replace(/%2F/g, "/");
|
|
134416
134493
|
}
|
|
134417
|
-
return
|
|
134494
|
+
return path18;
|
|
134418
134495
|
}
|
|
134419
134496
|
validateResolvedCredentials(credentials) {
|
|
134420
134497
|
if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") {
|
|
@@ -135733,11 +135810,11 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
135733
135810
|
}
|
|
135734
135811
|
}
|
|
135735
135812
|
const { service, operation: operation2 } = (0, import_util_middleware5.getSmithyContext)(context2);
|
|
135736
|
-
const
|
|
135813
|
+
const path18 = `/service/${service}/operation/${operation2}`;
|
|
135737
135814
|
if (request3.path.endsWith("/")) {
|
|
135738
|
-
request3.path +=
|
|
135815
|
+
request3.path += path18.slice(1);
|
|
135739
135816
|
} else {
|
|
135740
|
-
request3.path +=
|
|
135817
|
+
request3.path += path18;
|
|
135741
135818
|
}
|
|
135742
135819
|
return request3;
|
|
135743
135820
|
}
|
|
@@ -140717,14 +140794,14 @@ var require_readFile = __commonJS({
|
|
|
140717
140794
|
var promises_1 = require("node:fs/promises");
|
|
140718
140795
|
exports2.filePromises = {};
|
|
140719
140796
|
exports2.fileIntercept = {};
|
|
140720
|
-
var readFile4 = (
|
|
140721
|
-
if (exports2.fileIntercept[
|
|
140722
|
-
return exports2.fileIntercept[
|
|
140797
|
+
var readFile4 = (path18, options) => {
|
|
140798
|
+
if (exports2.fileIntercept[path18] !== void 0) {
|
|
140799
|
+
return exports2.fileIntercept[path18];
|
|
140723
140800
|
}
|
|
140724
|
-
if (!exports2.filePromises[
|
|
140725
|
-
exports2.filePromises[
|
|
140801
|
+
if (!exports2.filePromises[path18] || options?.ignoreCache) {
|
|
140802
|
+
exports2.filePromises[path18] = (0, promises_1.readFile)(path18, "utf8");
|
|
140726
140803
|
}
|
|
140727
|
-
return exports2.filePromises[
|
|
140804
|
+
return exports2.filePromises[path18];
|
|
140728
140805
|
};
|
|
140729
140806
|
exports2.readFile = readFile4;
|
|
140730
140807
|
}
|
|
@@ -140738,7 +140815,7 @@ var require_dist_cjs33 = __commonJS({
|
|
|
140738
140815
|
var getHomeDir = require_getHomeDir();
|
|
140739
140816
|
var getSSOTokenFilepath = require_getSSOTokenFilepath();
|
|
140740
140817
|
var getSSOTokenFromFile = require_getSSOTokenFromFile();
|
|
140741
|
-
var
|
|
140818
|
+
var path18 = require("path");
|
|
140742
140819
|
var types2 = require_dist_cjs();
|
|
140743
140820
|
var readFile4 = require_readFile();
|
|
140744
140821
|
var ENV_PROFILE = "AWS_PROFILE";
|
|
@@ -140760,9 +140837,9 @@ var require_dist_cjs33 = __commonJS({
|
|
|
140760
140837
|
...data2.default && { default: data2.default }
|
|
140761
140838
|
});
|
|
140762
140839
|
var ENV_CONFIG_PATH = "AWS_CONFIG_FILE";
|
|
140763
|
-
var getConfigFilepath = () => process.env[ENV_CONFIG_PATH] ||
|
|
140840
|
+
var getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path18.join(getHomeDir.getHomeDir(), ".aws", "config");
|
|
140764
140841
|
var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE";
|
|
140765
|
-
var getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] ||
|
|
140842
|
+
var getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path18.join(getHomeDir.getHomeDir(), ".aws", "credentials");
|
|
140766
140843
|
var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/;
|
|
140767
140844
|
var profileNameBlockList = ["__proto__", "profile __proto__"];
|
|
140768
140845
|
var parseIni = (iniData) => {
|
|
@@ -140817,11 +140894,11 @@ var require_dist_cjs33 = __commonJS({
|
|
|
140817
140894
|
const relativeHomeDirPrefix = "~/";
|
|
140818
140895
|
let resolvedFilepath = filepath;
|
|
140819
140896
|
if (filepath.startsWith(relativeHomeDirPrefix)) {
|
|
140820
|
-
resolvedFilepath =
|
|
140897
|
+
resolvedFilepath = path18.join(homeDir, filepath.slice(2));
|
|
140821
140898
|
}
|
|
140822
140899
|
let resolvedConfigFilepath = configFilepath;
|
|
140823
140900
|
if (configFilepath.startsWith(relativeHomeDirPrefix)) {
|
|
140824
|
-
resolvedConfigFilepath =
|
|
140901
|
+
resolvedConfigFilepath = path18.join(homeDir, configFilepath.slice(2));
|
|
140825
140902
|
}
|
|
140826
140903
|
const parsedFiles = await Promise.all([
|
|
140827
140904
|
readFile4.readFile(resolvedConfigFilepath, {
|
|
@@ -140860,8 +140937,8 @@ var require_dist_cjs33 = __commonJS({
|
|
|
140860
140937
|
getFileRecord() {
|
|
140861
140938
|
return readFile4.fileIntercept;
|
|
140862
140939
|
},
|
|
140863
|
-
interceptFile(
|
|
140864
|
-
readFile4.fileIntercept[
|
|
140940
|
+
interceptFile(path19, contents) {
|
|
140941
|
+
readFile4.fileIntercept[path19] = Promise.resolve(contents);
|
|
140865
140942
|
},
|
|
140866
140943
|
getTokenRecord() {
|
|
140867
140944
|
return getSSOTokenFromFile.tokenIntercept;
|
|
@@ -141103,8 +141180,8 @@ var require_dist_cjs35 = __commonJS({
|
|
|
141103
141180
|
return endpoint2.url.href;
|
|
141104
141181
|
}
|
|
141105
141182
|
if ("hostname" in endpoint2) {
|
|
141106
|
-
const { protocol, hostname: hostname3, port, path:
|
|
141107
|
-
return `${protocol}//${hostname3}${port ? ":" + port : ""}${
|
|
141183
|
+
const { protocol, hostname: hostname3, port, path: path18 } = endpoint2;
|
|
141184
|
+
return `${protocol}//${hostname3}${port ? ":" + port : ""}${path18}`;
|
|
141108
141185
|
}
|
|
141109
141186
|
}
|
|
141110
141187
|
return endpoint2;
|
|
@@ -156240,12 +156317,12 @@ var require_dist_cjs63 = __commonJS({
|
|
|
156240
156317
|
// src/utils/awsLambdaLayerManager.ts
|
|
156241
156318
|
async function getRegionsFromAws() {
|
|
156242
156319
|
logger.debug("Fetching AWS regions...");
|
|
156243
|
-
const { hostname: hostname3, path:
|
|
156320
|
+
const { hostname: hostname3, path: path18, headers } = import_aws4.default.sign({
|
|
156244
156321
|
service: "ec2",
|
|
156245
156322
|
region: "us-east-2",
|
|
156246
156323
|
path: "/?Action=DescribeRegions&Version=2013-10-15"
|
|
156247
156324
|
});
|
|
156248
|
-
const url2 = `https://${hostname3}${
|
|
156325
|
+
const url2 = `https://${hostname3}${path18}`;
|
|
156249
156326
|
const response = await (0, import_node_fetch4.default)(url2, {
|
|
156250
156327
|
headers
|
|
156251
156328
|
});
|
|
@@ -156808,371 +156885,6 @@ var init_upm = __esm({
|
|
|
156808
156885
|
}
|
|
156809
156886
|
});
|
|
156810
156887
|
|
|
156811
|
-
// node_modules/.pnpm/nvar@1.3.1/node_modules/nvar/lib/nvar.js
|
|
156812
|
-
var require_nvar = __commonJS({
|
|
156813
|
-
"node_modules/.pnpm/nvar@1.3.1/node_modules/nvar/lib/nvar.js"(exports2, module2) {
|
|
156814
|
-
init_import_meta_url();
|
|
156815
|
-
module2.exports = nvar2;
|
|
156816
|
-
function nvar2(opts) {
|
|
156817
|
-
if (typeof opts === "string") opts = { path: opts };
|
|
156818
|
-
const pathExplicitlySpecified = !!(opts || {}).path;
|
|
156819
|
-
let {
|
|
156820
|
-
// Destructure opts while stating defaults.
|
|
156821
|
-
path: path19 = ".env",
|
|
156822
|
-
source = null,
|
|
156823
|
-
target = process.env,
|
|
156824
|
-
enoent = pathExplicitlySpecified ? "error" : "warn",
|
|
156825
|
-
override = "all"
|
|
156826
|
-
} = opts || {};
|
|
156827
|
-
try {
|
|
156828
|
-
if (!source) source = require("fs").readFileSync(path19, "utf8");
|
|
156829
|
-
} catch (e4) {
|
|
156830
|
-
if (e4.code === "ENOENT") {
|
|
156831
|
-
if (!enoent) return;
|
|
156832
|
-
if (enoent === "warn") return console.error(`nvar did not assign any values, as it could not locate ${path19}.`);
|
|
156833
|
-
}
|
|
156834
|
-
throw e4;
|
|
156835
|
-
}
|
|
156836
|
-
let assignmentAllower;
|
|
156837
|
-
switch (typeof override) {
|
|
156838
|
-
case "function":
|
|
156839
|
-
assignmentAllower = override;
|
|
156840
|
-
break;
|
|
156841
|
-
case "string":
|
|
156842
|
-
assignmentAllower = {
|
|
156843
|
-
all: () => true,
|
|
156844
|
-
empty: (key2, target2) => !target2[key2],
|
|
156845
|
-
none: (key2, target2) => target2[key2] === void 0
|
|
156846
|
-
}[override];
|
|
156847
|
-
if (assignmentAllower) break;
|
|
156848
|
-
default:
|
|
156849
|
-
throw new Error("[nvar] `override` should be set to 'all', 'empty', 'none', or a function.");
|
|
156850
|
-
}
|
|
156851
|
-
let mode = "n";
|
|
156852
|
-
let i4 = 0;
|
|
156853
|
-
let marker;
|
|
156854
|
-
let word, key;
|
|
156855
|
-
let exportPrefixEncountered = false;
|
|
156856
|
-
let quoteMode, escapeMode;
|
|
156857
|
-
while (source[i4] !== void 0) {
|
|
156858
|
-
let char = source[i4];
|
|
156859
|
-
switch (mode) {
|
|
156860
|
-
case "n":
|
|
156861
|
-
while (/\s/.test(char)) {
|
|
156862
|
-
char = source[++i4];
|
|
156863
|
-
}
|
|
156864
|
-
if (char === "#") {
|
|
156865
|
-
mode = "x";
|
|
156866
|
-
break;
|
|
156867
|
-
}
|
|
156868
|
-
if (/[a-z_]/i.test(char)) {
|
|
156869
|
-
marker = i4++;
|
|
156870
|
-
mode = "k";
|
|
156871
|
-
break;
|
|
156872
|
-
}
|
|
156873
|
-
throw new Error("[nvar] Unexpected character '" + char + "' (position " + i4 + ")");
|
|
156874
|
-
case "k":
|
|
156875
|
-
while (/\w/.test(char = source[i4]) && char !== void 0) ++i4;
|
|
156876
|
-
if (char === "=") {
|
|
156877
|
-
word = source.slice(marker, i4);
|
|
156878
|
-
mode = "v";
|
|
156879
|
-
break;
|
|
156880
|
-
}
|
|
156881
|
-
if (char === "\\") {
|
|
156882
|
-
if (source[i4 + 1] === "\n") {
|
|
156883
|
-
i4 += 2;
|
|
156884
|
-
if (source[i4] === "=") {
|
|
156885
|
-
word = source.slice(marker, i4);
|
|
156886
|
-
mode = "v";
|
|
156887
|
-
}
|
|
156888
|
-
break;
|
|
156889
|
-
}
|
|
156890
|
-
} else if (/[\t ]/.test(char) && (word = source.slice(marker, i4)) === "export" && !exportPrefixEncountered) {
|
|
156891
|
-
exportPrefixEncountered = true;
|
|
156892
|
-
mode = "n";
|
|
156893
|
-
break;
|
|
156894
|
-
}
|
|
156895
|
-
mode = "x";
|
|
156896
|
-
break;
|
|
156897
|
-
case "v":
|
|
156898
|
-
exportPrefixEncountered = false;
|
|
156899
|
-
key = word.replace(/\\\n/g, "");
|
|
156900
|
-
word = "";
|
|
156901
|
-
quoteMode = null;
|
|
156902
|
-
marker = ++i4;
|
|
156903
|
-
while (mode === "v" && (char = source[i4])) {
|
|
156904
|
-
switch (quoteMode) {
|
|
156905
|
-
case "s":
|
|
156906
|
-
while ((char = source[i4]) && char !== "'") i4++;
|
|
156907
|
-
word += source.slice(marker, i4);
|
|
156908
|
-
marker = ++i4;
|
|
156909
|
-
quoteMode = null;
|
|
156910
|
-
break;
|
|
156911
|
-
case "d":
|
|
156912
|
-
if (char === "\\") {
|
|
156913
|
-
word += parameterExpand(source.slice(marker, i4));
|
|
156914
|
-
if (["\n", '"', "$", "\\"].indexOf(source[i4 + 1]) === -1) word += "\\" + source[i4 + 1];
|
|
156915
|
-
if (['"', "$", "\\"].indexOf(source[i4 + 1]) > -1) word += source[i4 + 1];
|
|
156916
|
-
i4 += 2;
|
|
156917
|
-
marker = i4;
|
|
156918
|
-
break;
|
|
156919
|
-
}
|
|
156920
|
-
if (char === '"') {
|
|
156921
|
-
word += parameterExpand(source.slice(marker, i4));
|
|
156922
|
-
quoteMode = null;
|
|
156923
|
-
marker = ++i4;
|
|
156924
|
-
break;
|
|
156925
|
-
}
|
|
156926
|
-
++i4;
|
|
156927
|
-
break;
|
|
156928
|
-
default:
|
|
156929
|
-
if (char === "\\") {
|
|
156930
|
-
word += parameterExpand(source.slice(marker, i4));
|
|
156931
|
-
if (source[i4 + 1] !== "\n") word += source[i4 + 1];
|
|
156932
|
-
i4 += 2;
|
|
156933
|
-
marker = i4;
|
|
156934
|
-
break;
|
|
156935
|
-
}
|
|
156936
|
-
if (char === "'") {
|
|
156937
|
-
word += parameterExpand(source.slice(marker, i4));
|
|
156938
|
-
quoteMode = "s";
|
|
156939
|
-
marker = ++i4;
|
|
156940
|
-
break;
|
|
156941
|
-
}
|
|
156942
|
-
if (char === '"') {
|
|
156943
|
-
word += parameterExpand(source.slice(marker, i4));
|
|
156944
|
-
quoteMode = "d";
|
|
156945
|
-
marker = ++i4;
|
|
156946
|
-
break;
|
|
156947
|
-
}
|
|
156948
|
-
if ([" ", " ", "\n"].indexOf(char) !== -1) {
|
|
156949
|
-
word += parameterExpand(source.slice(marker, i4));
|
|
156950
|
-
if (assignmentAllower(key, target)) target[key] = word;
|
|
156951
|
-
word = "";
|
|
156952
|
-
i4++;
|
|
156953
|
-
mode = "n";
|
|
156954
|
-
break;
|
|
156955
|
-
}
|
|
156956
|
-
++i4;
|
|
156957
|
-
}
|
|
156958
|
-
}
|
|
156959
|
-
word += parameterExpand(source.slice(marker, i4));
|
|
156960
|
-
if (mode === "v" && word) {
|
|
156961
|
-
if (assignmentAllower(key, target)) target[key] = word;
|
|
156962
|
-
word = "";
|
|
156963
|
-
}
|
|
156964
|
-
break;
|
|
156965
|
-
case "x":
|
|
156966
|
-
exportPrefixEncountered = false;
|
|
156967
|
-
do {
|
|
156968
|
-
++i4;
|
|
156969
|
-
} while ([void 0, "\n"].indexOf(char = source[i4]) === -1);
|
|
156970
|
-
mode = "n";
|
|
156971
|
-
break;
|
|
156972
|
-
}
|
|
156973
|
-
}
|
|
156974
|
-
return target;
|
|
156975
|
-
function parameterExpand(str2) {
|
|
156976
|
-
return str2.replace(/\$({?)([a-z_]\w*)(}?)/gi, (match2, p1, p22, p32) => {
|
|
156977
|
-
if (p1 === "" && p32 === "" || p1 === "{" && p32 === "}") return target[p22] || "";
|
|
156978
|
-
return match2;
|
|
156979
|
-
});
|
|
156980
|
-
}
|
|
156981
|
-
}
|
|
156982
|
-
}
|
|
156983
|
-
});
|
|
156984
|
-
|
|
156985
|
-
// node_modules/.pnpm/nvar@1.3.1/node_modules/nvar/lib/nvar-es5.js
|
|
156986
|
-
var require_nvar_es5 = __commonJS({
|
|
156987
|
-
"node_modules/.pnpm/nvar@1.3.1/node_modules/nvar/lib/nvar-es5.js"(exports2, module2) {
|
|
156988
|
-
"use strict";
|
|
156989
|
-
init_import_meta_url();
|
|
156990
|
-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
156991
|
-
return typeof obj;
|
|
156992
|
-
} : function(obj) {
|
|
156993
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
156994
|
-
};
|
|
156995
|
-
module2.exports = nvar2;
|
|
156996
|
-
function nvar2(opts) {
|
|
156997
|
-
if (typeof opts === "string") opts = { path: opts };
|
|
156998
|
-
var pathExplicitlySpecified = !!(opts || {}).path;
|
|
156999
|
-
var _ref = opts || {}, _ref$path = _ref.path, path19 = _ref$path === void 0 ? ".env" : _ref$path, _ref$source = _ref.source, source = _ref$source === void 0 ? null : _ref$source, _ref$target = _ref.target, target = _ref$target === void 0 ? process.env : _ref$target, _ref$enoent = _ref.enoent, enoent = _ref$enoent === void 0 ? pathExplicitlySpecified ? "error" : "warn" : _ref$enoent, _ref$override = _ref.override, override = _ref$override === void 0 ? "all" : _ref$override;
|
|
157000
|
-
try {
|
|
157001
|
-
if (!source) source = require("fs").readFileSync(path19, "utf8");
|
|
157002
|
-
} catch (e4) {
|
|
157003
|
-
if (e4.code === "ENOENT") {
|
|
157004
|
-
if (!enoent) return;
|
|
157005
|
-
if (enoent === "warn") return console.error("nvar did not assign any values, as it could not locate " + path19 + ".");
|
|
157006
|
-
}
|
|
157007
|
-
throw e4;
|
|
157008
|
-
}
|
|
157009
|
-
var assignmentAllower = void 0;
|
|
157010
|
-
switch (typeof override === "undefined" ? "undefined" : _typeof(override)) {
|
|
157011
|
-
case "function":
|
|
157012
|
-
assignmentAllower = override;
|
|
157013
|
-
break;
|
|
157014
|
-
case "string":
|
|
157015
|
-
assignmentAllower = {
|
|
157016
|
-
all: function all() {
|
|
157017
|
-
return true;
|
|
157018
|
-
},
|
|
157019
|
-
empty: function empty(key2, target2) {
|
|
157020
|
-
return !target2[key2];
|
|
157021
|
-
},
|
|
157022
|
-
none: function none(key2, target2) {
|
|
157023
|
-
return target2[key2] === void 0;
|
|
157024
|
-
}
|
|
157025
|
-
}[override];
|
|
157026
|
-
if (assignmentAllower) break;
|
|
157027
|
-
default:
|
|
157028
|
-
throw new Error("[nvar] `override` should be set to 'all', 'empty', 'none', or a function.");
|
|
157029
|
-
}
|
|
157030
|
-
var mode = "n";
|
|
157031
|
-
var i4 = 0;
|
|
157032
|
-
var marker = void 0;
|
|
157033
|
-
var word = void 0, key = void 0;
|
|
157034
|
-
var exportPrefixEncountered = false;
|
|
157035
|
-
var quoteMode = void 0, escapeMode = void 0;
|
|
157036
|
-
while (source[i4] !== void 0) {
|
|
157037
|
-
var char = source[i4];
|
|
157038
|
-
switch (mode) {
|
|
157039
|
-
case "n":
|
|
157040
|
-
while (/\s/.test(char)) {
|
|
157041
|
-
char = source[++i4];
|
|
157042
|
-
}
|
|
157043
|
-
if (char === "#") {
|
|
157044
|
-
mode = "x";
|
|
157045
|
-
break;
|
|
157046
|
-
}
|
|
157047
|
-
if (/[a-z_]/i.test(char)) {
|
|
157048
|
-
marker = i4++;
|
|
157049
|
-
mode = "k";
|
|
157050
|
-
break;
|
|
157051
|
-
}
|
|
157052
|
-
throw new Error("[nvar] Unexpected character '" + char + "' (position " + i4 + ")");
|
|
157053
|
-
case "k":
|
|
157054
|
-
while (/\w/.test(char = source[i4]) && char !== void 0) {
|
|
157055
|
-
++i4;
|
|
157056
|
-
}
|
|
157057
|
-
if (char === "=") {
|
|
157058
|
-
word = source.slice(marker, i4);
|
|
157059
|
-
mode = "v";
|
|
157060
|
-
break;
|
|
157061
|
-
}
|
|
157062
|
-
if (char === "\\") {
|
|
157063
|
-
if (source[i4 + 1] === "\n") {
|
|
157064
|
-
i4 += 2;
|
|
157065
|
-
if (source[i4] === "=") {
|
|
157066
|
-
word = source.slice(marker, i4);
|
|
157067
|
-
mode = "v";
|
|
157068
|
-
}
|
|
157069
|
-
break;
|
|
157070
|
-
}
|
|
157071
|
-
} else if (/[\t ]/.test(char) && (word = source.slice(marker, i4)) === "export" && !exportPrefixEncountered) {
|
|
157072
|
-
exportPrefixEncountered = true;
|
|
157073
|
-
mode = "n";
|
|
157074
|
-
break;
|
|
157075
|
-
}
|
|
157076
|
-
mode = "x";
|
|
157077
|
-
break;
|
|
157078
|
-
case "v":
|
|
157079
|
-
exportPrefixEncountered = false;
|
|
157080
|
-
key = word.replace(/\\\n/g, "");
|
|
157081
|
-
word = "";
|
|
157082
|
-
quoteMode = null;
|
|
157083
|
-
marker = ++i4;
|
|
157084
|
-
while (mode === "v" && (char = source[i4])) {
|
|
157085
|
-
switch (quoteMode) {
|
|
157086
|
-
case "s":
|
|
157087
|
-
while ((char = source[i4]) && char !== "'") {
|
|
157088
|
-
i4++;
|
|
157089
|
-
}
|
|
157090
|
-
word += source.slice(marker, i4);
|
|
157091
|
-
marker = ++i4;
|
|
157092
|
-
quoteMode = null;
|
|
157093
|
-
break;
|
|
157094
|
-
case "d":
|
|
157095
|
-
if (char === "\\") {
|
|
157096
|
-
word += parameterExpand(source.slice(marker, i4));
|
|
157097
|
-
if (["\n", '"', "$", "\\"].indexOf(source[i4 + 1]) === -1) word += "\\" + source[i4 + 1];
|
|
157098
|
-
if (['"', "$", "\\"].indexOf(source[i4 + 1]) > -1) word += source[i4 + 1];
|
|
157099
|
-
i4 += 2;
|
|
157100
|
-
marker = i4;
|
|
157101
|
-
break;
|
|
157102
|
-
}
|
|
157103
|
-
if (char === '"') {
|
|
157104
|
-
word += parameterExpand(source.slice(marker, i4));
|
|
157105
|
-
quoteMode = null;
|
|
157106
|
-
marker = ++i4;
|
|
157107
|
-
break;
|
|
157108
|
-
}
|
|
157109
|
-
++i4;
|
|
157110
|
-
break;
|
|
157111
|
-
default:
|
|
157112
|
-
if (char === "\\") {
|
|
157113
|
-
word += parameterExpand(source.slice(marker, i4));
|
|
157114
|
-
if (source[i4 + 1] !== "\n") word += source[i4 + 1];
|
|
157115
|
-
i4 += 2;
|
|
157116
|
-
marker = i4;
|
|
157117
|
-
break;
|
|
157118
|
-
}
|
|
157119
|
-
if (char === "'") {
|
|
157120
|
-
word += parameterExpand(source.slice(marker, i4));
|
|
157121
|
-
quoteMode = "s";
|
|
157122
|
-
marker = ++i4;
|
|
157123
|
-
break;
|
|
157124
|
-
}
|
|
157125
|
-
if (char === '"') {
|
|
157126
|
-
word += parameterExpand(source.slice(marker, i4));
|
|
157127
|
-
quoteMode = "d";
|
|
157128
|
-
marker = ++i4;
|
|
157129
|
-
break;
|
|
157130
|
-
}
|
|
157131
|
-
if ([" ", " ", "\n"].indexOf(char) !== -1) {
|
|
157132
|
-
word += parameterExpand(source.slice(marker, i4));
|
|
157133
|
-
if (assignmentAllower(key, target)) target[key] = word;
|
|
157134
|
-
word = "";
|
|
157135
|
-
i4++;
|
|
157136
|
-
mode = "n";
|
|
157137
|
-
break;
|
|
157138
|
-
}
|
|
157139
|
-
++i4;
|
|
157140
|
-
}
|
|
157141
|
-
}
|
|
157142
|
-
word += parameterExpand(source.slice(marker, i4));
|
|
157143
|
-
if (mode === "v" && word) {
|
|
157144
|
-
if (assignmentAllower(key, target)) target[key] = word;
|
|
157145
|
-
word = "";
|
|
157146
|
-
}
|
|
157147
|
-
break;
|
|
157148
|
-
case "x":
|
|
157149
|
-
exportPrefixEncountered = false;
|
|
157150
|
-
do {
|
|
157151
|
-
++i4;
|
|
157152
|
-
} while ([void 0, "\n"].indexOf(char = source[i4]) === -1);
|
|
157153
|
-
mode = "n";
|
|
157154
|
-
break;
|
|
157155
|
-
}
|
|
157156
|
-
}
|
|
157157
|
-
return target;
|
|
157158
|
-
function parameterExpand(str2) {
|
|
157159
|
-
return str2.replace(/\$({?)([a-z_]\w*)(}?)/gi, function(match2, p1, p22, p32) {
|
|
157160
|
-
if (p1 === "" && p32 === "" || p1 === "{" && p32 === "}") return target[p22] || "";
|
|
157161
|
-
return match2;
|
|
157162
|
-
});
|
|
157163
|
-
}
|
|
157164
|
-
}
|
|
157165
|
-
}
|
|
157166
|
-
});
|
|
157167
|
-
|
|
157168
|
-
// node_modules/.pnpm/nvar@1.3.1/node_modules/nvar/lib/index.js
|
|
157169
|
-
var require_lib11 = __commonJS({
|
|
157170
|
-
"node_modules/.pnpm/nvar@1.3.1/node_modules/nvar/lib/index.js"(exports2, module2) {
|
|
157171
|
-
init_import_meta_url();
|
|
157172
|
-
module2.exports = parseInt(/^v(\d+)/.exec(process.version)[1]) >= 6 ? require_nvar() : require_nvar_es5();
|
|
157173
|
-
}
|
|
157174
|
-
});
|
|
157175
|
-
|
|
157176
156888
|
// src/utils/env.ts
|
|
157177
156889
|
function envHasVar(envVar) {
|
|
157178
156890
|
const { name, legacyName } = envVar;
|
|
@@ -157195,62 +156907,21 @@ function envHasVar(envVar) {
|
|
|
157195
156907
|
}
|
|
157196
156908
|
return true;
|
|
157197
156909
|
}
|
|
157198
|
-
function
|
|
157199
|
-
const
|
|
157200
|
-
|
|
157201
|
-
|
|
157202
|
-
|
|
157203
|
-
if (mode & GROUP_MODE_MASK || mode & OTHER_MODE_MASK) {
|
|
157204
|
-
const perms = (mode & FULL_MODE_MASK).toString(8);
|
|
157205
|
-
logger.warn(
|
|
157206
|
-
`Permissions 0${perms} for file "${path19}" are too open. Consider making it readable only for the user.`
|
|
157207
|
-
);
|
|
157208
|
-
return false;
|
|
157209
|
-
}
|
|
157210
|
-
return true;
|
|
157211
|
-
}
|
|
157212
|
-
function readEnvironmentConfig(overwriteExisting = false) {
|
|
157213
|
-
let newEnv = {};
|
|
157214
|
-
const homedirEnvFile = (0, import_path16.join)(os5.homedir(), ENV_FILE_NAME);
|
|
157215
|
-
if ((0, import_fs19.existsSync)(homedirEnvFile)) {
|
|
157216
|
-
logger.debug(
|
|
157217
|
-
"Found environment file in the home directory:",
|
|
157218
|
-
homedirEnvFile
|
|
157219
|
-
);
|
|
157220
|
-
checkFileIsPrivate(homedirEnvFile);
|
|
157221
|
-
const homedirEnv = {};
|
|
157222
|
-
(0, import_nvar.default)({ path: homedirEnvFile, target: homedirEnv });
|
|
157223
|
-
newEnv = { ...newEnv, ...homedirEnv };
|
|
157224
|
-
logger.trace("Read the following variables from env file:", homedirEnv);
|
|
157225
|
-
} else {
|
|
157226
|
-
logger.debug(
|
|
157227
|
-
"No environment file found in the home directory:",
|
|
157228
|
-
homedirEnvFile
|
|
157229
|
-
);
|
|
156910
|
+
function warnIfCraftEnvFileExists() {
|
|
156911
|
+
const candidatePaths = [];
|
|
156912
|
+
try {
|
|
156913
|
+
candidatePaths.push((0, import_path16.join)(os5.homedir(), LEGACY_ENV_FILE_NAME));
|
|
156914
|
+
} catch {
|
|
157230
156915
|
}
|
|
157231
156916
|
const configFileDir = getConfigFileDir();
|
|
157232
|
-
|
|
157233
|
-
|
|
157234
|
-
logger.debug("No configuration file found:", CONFIG_FILE_NAME);
|
|
157235
|
-
} else if (configDirEnvFile && (0, import_fs19.existsSync)(configDirEnvFile)) {
|
|
157236
|
-
logger.debug(
|
|
157237
|
-
"Found environment file in the configuration directory:",
|
|
157238
|
-
configDirEnvFile
|
|
157239
|
-
);
|
|
157240
|
-
checkFileIsPrivate(configDirEnvFile);
|
|
157241
|
-
const configDirEnv = {};
|
|
157242
|
-
(0, import_nvar.default)({ path: configDirEnvFile, target: configDirEnv });
|
|
157243
|
-
newEnv = { ...newEnv, ...configDirEnv };
|
|
157244
|
-
logger.trace("Read the following variables from env file:", configDirEnv);
|
|
157245
|
-
} else {
|
|
157246
|
-
logger.debug(
|
|
157247
|
-
"No environment file found in the configuration directory:",
|
|
157248
|
-
configDirEnvFile
|
|
157249
|
-
);
|
|
156917
|
+
if (configFileDir) {
|
|
156918
|
+
candidatePaths.push((0, import_path16.join)(configFileDir, LEGACY_ENV_FILE_NAME));
|
|
157250
156919
|
}
|
|
157251
|
-
for (const
|
|
157252
|
-
if (
|
|
157253
|
-
|
|
156920
|
+
for (const path18 of candidatePaths) {
|
|
156921
|
+
if ((0, import_fs19.existsSync)(path18)) {
|
|
156922
|
+
logger.warn(
|
|
156923
|
+
`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.`
|
|
156924
|
+
);
|
|
157254
156925
|
}
|
|
157255
156926
|
}
|
|
157256
156927
|
}
|
|
@@ -157263,50 +156934,43 @@ function checkEnvForPrerequisite(...varList) {
|
|
|
157263
156934
|
);
|
|
157264
156935
|
}
|
|
157265
156936
|
}
|
|
157266
|
-
var import_fs19, import_path16,
|
|
156937
|
+
var import_fs19, import_path16, os5, LEGACY_ENV_FILE_NAME;
|
|
157267
156938
|
var init_env = __esm({
|
|
157268
156939
|
"src/utils/env.ts"() {
|
|
157269
156940
|
"use strict";
|
|
157270
156941
|
init_import_meta_url();
|
|
157271
156942
|
import_fs19 = require("fs");
|
|
157272
156943
|
import_path16 = require("path");
|
|
157273
|
-
import_nvar = __toESM(require_lib11());
|
|
157274
156944
|
init_config2();
|
|
157275
156945
|
init_errors2();
|
|
157276
156946
|
init_logger2();
|
|
156947
|
+
init_dynamicLinkerEnv();
|
|
157277
156948
|
os5 = require("os");
|
|
157278
|
-
|
|
156949
|
+
LEGACY_ENV_FILE_NAME = ".craft.env";
|
|
157279
156950
|
}
|
|
157280
156951
|
});
|
|
157281
156952
|
|
|
157282
156953
|
// src/utils/gpg.ts
|
|
157283
156954
|
async function importGPGKey(privateKey) {
|
|
157284
|
-
|
|
157285
|
-
await import_fs20.promises.writeFile(PRIVATE_KEY_FILE, privateKey);
|
|
157286
|
-
await spawnProcess(`gpg`, ["--batch", "--import", PRIVATE_KEY_FILE]);
|
|
157287
|
-
await import_fs20.promises.unlink(PRIVATE_KEY_FILE);
|
|
156955
|
+
await spawnProcess("gpg", ["--batch", "--import"], {}, { stdin: privateKey });
|
|
157288
156956
|
}
|
|
157289
|
-
var import_os2, import_fs20, path17;
|
|
157290
156957
|
var init_gpg = __esm({
|
|
157291
156958
|
"src/utils/gpg.ts"() {
|
|
157292
156959
|
"use strict";
|
|
157293
156960
|
init_import_meta_url();
|
|
157294
|
-
import_os2 = require("os");
|
|
157295
|
-
import_fs20 = require("fs");
|
|
157296
|
-
path17 = __toESM(require("path"));
|
|
157297
156961
|
init_system();
|
|
157298
156962
|
}
|
|
157299
156963
|
});
|
|
157300
156964
|
|
|
157301
156965
|
// src/targets/maven.ts
|
|
157302
|
-
var import_path17,
|
|
156966
|
+
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;
|
|
157303
156967
|
var init_maven = __esm({
|
|
157304
156968
|
"src/targets/maven.ts"() {
|
|
157305
156969
|
"use strict";
|
|
157306
156970
|
init_import_meta_url();
|
|
157307
156971
|
init_base5();
|
|
157308
156972
|
import_path17 = require("path");
|
|
157309
|
-
|
|
156973
|
+
import_fs20 = require("fs");
|
|
157310
156974
|
import_node_fetch5 = __toESM(require_lib9());
|
|
157311
156975
|
init_system();
|
|
157312
156976
|
init_async();
|
|
@@ -157533,7 +157197,7 @@ var init_maven = __esm({
|
|
|
157533
157197
|
if (await this.isBomFile(pomFilepath)) {
|
|
157534
157198
|
return pomFilepath;
|
|
157535
157199
|
}
|
|
157536
|
-
const filesInDir = await
|
|
157200
|
+
const filesInDir = await import_fs20.promises.readdir(distDir);
|
|
157537
157201
|
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));
|
|
157538
157202
|
return potentialPoms.find((f5) => this.isBomFile(f5));
|
|
157539
157203
|
}
|
|
@@ -157548,7 +157212,7 @@ var init_maven = __esm({
|
|
|
157548
157212
|
*/
|
|
157549
157213
|
async isBomFile(pomFilepath) {
|
|
157550
157214
|
try {
|
|
157551
|
-
const fileContents = await
|
|
157215
|
+
const fileContents = await import_fs20.promises.readFile(pomFilepath, {
|
|
157552
157216
|
encoding: "utf8"
|
|
157553
157217
|
});
|
|
157554
157218
|
return BOM_FILE_KEY_REGEXP.test(fileContents);
|
|
@@ -157689,7 +157353,7 @@ Error:
|
|
|
157689
157353
|
async getPomFileInDist(distDir) {
|
|
157690
157354
|
const pomFilepath = (0, import_path17.join)(distDir, "pom-default.xml");
|
|
157691
157355
|
try {
|
|
157692
|
-
const stat = await
|
|
157356
|
+
const stat = await import_fs20.promises.stat(pomFilepath);
|
|
157693
157357
|
if (stat.isFile()) {
|
|
157694
157358
|
return pomFilepath;
|
|
157695
157359
|
}
|
|
@@ -157702,7 +157366,7 @@ Error:
|
|
|
157702
157366
|
*/
|
|
157703
157367
|
async fileExists(filePath) {
|
|
157704
157368
|
try {
|
|
157705
|
-
const stat = await
|
|
157369
|
+
const stat = await import_fs20.promises.stat(filePath);
|
|
157706
157370
|
if (stat.isFile()) {
|
|
157707
157371
|
return true;
|
|
157708
157372
|
}
|
|
@@ -157721,7 +157385,7 @@ Error:
|
|
|
157721
157385
|
async fixModuleFileName(distDir, moduleFile) {
|
|
157722
157386
|
const fallbackFile = (0, import_path17.join)(distDir, "module.json");
|
|
157723
157387
|
if (!await this.fileExists(moduleFile) && await this.fileExists(fallbackFile)) {
|
|
157724
|
-
await
|
|
157388
|
+
await import_fs20.promises.rename(fallbackFile, moduleFile);
|
|
157725
157389
|
}
|
|
157726
157390
|
}
|
|
157727
157391
|
async uploadPomDistribution(distDir) {
|
|
@@ -157787,7 +157451,7 @@ Error:
|
|
|
157787
157451
|
);
|
|
157788
157452
|
} else if (isAppleDistDir) {
|
|
157789
157453
|
files["metadataFile"] = (0, import_path17.join)(distDir, `${moduleName}-metadata.jar`);
|
|
157790
|
-
const cinteropFiles = (await
|
|
157454
|
+
const cinteropFiles = (await import_fs20.promises.readdir(distDir)).filter((file) => file.includes("cinterop")).map((file) => (0, import_path17.join)(distDir, file));
|
|
157791
157455
|
files["klibFiles"] = cinteropFiles;
|
|
157792
157456
|
} else if (isKlibDistDir) {
|
|
157793
157457
|
files["klibFiles"] = [(0, import_path17.join)(distDir, `${moduleName}.klib`)];
|
|
@@ -157970,7 +157634,7 @@ Error:
|
|
|
157970
157634
|
});
|
|
157971
157635
|
|
|
157972
157636
|
// src/targets/symbolCollector.ts
|
|
157973
|
-
var
|
|
157637
|
+
var import_fs21, import_path18, DEFAULT_SYM_COLLECTOR_SERVER_ENDPOINT, SYM_COLLECTOR_BIN_NAME, SymbolCollector;
|
|
157974
157638
|
var init_symbolCollector = __esm({
|
|
157975
157639
|
"src/targets/symbolCollector.ts"() {
|
|
157976
157640
|
"use strict";
|
|
@@ -157978,7 +157642,7 @@ var init_symbolCollector = __esm({
|
|
|
157978
157642
|
init_errors2();
|
|
157979
157643
|
init_base5();
|
|
157980
157644
|
init_files();
|
|
157981
|
-
|
|
157645
|
+
import_fs21 = require("fs");
|
|
157982
157646
|
init_system();
|
|
157983
157647
|
import_path18 = require("path");
|
|
157984
157648
|
DEFAULT_SYM_COLLECTOR_SERVER_ENDPOINT = "https://symbol-collector.services.sentry.io/";
|
|
@@ -158027,7 +157691,7 @@ var init_symbolCollector = __esm({
|
|
|
158027
157691
|
await Promise.all(
|
|
158028
157692
|
artifacts.map(async (artifact, index) => {
|
|
158029
157693
|
const subdirPath = (0, import_path18.join)(dir, String(index));
|
|
158030
|
-
await
|
|
157694
|
+
await import_fs21.promises.mkdir(subdirPath);
|
|
158031
157695
|
await this.artifactProvider.downloadArtifact(artifact, subdirPath);
|
|
158032
157696
|
})
|
|
158033
157697
|
);
|
|
@@ -158057,13 +157721,13 @@ var init_symbolCollector = __esm({
|
|
|
158057
157721
|
});
|
|
158058
157722
|
|
|
158059
157723
|
// src/targets/pubDev.ts
|
|
158060
|
-
var
|
|
157724
|
+
var import_fs22, import_os2, import_path19, targetSecrets2, PubDevTarget;
|
|
158061
157725
|
var init_pubDev = __esm({
|
|
158062
157726
|
"src/targets/pubDev.ts"() {
|
|
158063
157727
|
"use strict";
|
|
158064
157728
|
init_import_meta_url();
|
|
158065
|
-
|
|
158066
|
-
|
|
157729
|
+
import_fs22 = require("fs");
|
|
157730
|
+
import_os2 = require("os");
|
|
158067
157731
|
import_path19 = require("path");
|
|
158068
157732
|
init_js_yaml();
|
|
158069
157733
|
init_git();
|
|
@@ -158096,10 +157760,10 @@ var init_pubDev = __esm({
|
|
|
158096
157760
|
*/
|
|
158097
157761
|
static async bumpVersion(rootDir, newVersion) {
|
|
158098
157762
|
const pubspecPath = (0, import_path19.join)(rootDir, "pubspec.yaml");
|
|
158099
|
-
if (!(0,
|
|
157763
|
+
if (!(0, import_fs22.existsSync)(pubspecPath)) {
|
|
158100
157764
|
return false;
|
|
158101
157765
|
}
|
|
158102
|
-
const content = (0,
|
|
157766
|
+
const content = (0, import_fs22.readFileSync)(pubspecPath, "utf-8");
|
|
158103
157767
|
const pubspec = load(content);
|
|
158104
157768
|
if (!pubspec || typeof pubspec !== "object") {
|
|
158105
157769
|
logger.debug("pubspec.yaml is not a valid YAML object");
|
|
@@ -158107,7 +157771,7 @@ var init_pubDev = __esm({
|
|
|
158107
157771
|
}
|
|
158108
157772
|
pubspec.version = newVersion;
|
|
158109
157773
|
logger.debug(`Updating version in ${pubspecPath} to ${newVersion}`);
|
|
158110
|
-
(0,
|
|
157774
|
+
(0, import_fs22.writeFileSync)(pubspecPath, dump(pubspec));
|
|
158111
157775
|
return true;
|
|
158112
157776
|
}
|
|
158113
157777
|
constructor(config3, artifactProvider, githubRepo) {
|
|
@@ -158194,21 +157858,21 @@ var init_pubDev = __esm({
|
|
|
158194
157858
|
// Expiration date is required, but irrelevant
|
|
158195
157859
|
};
|
|
158196
157860
|
try {
|
|
158197
|
-
await
|
|
157861
|
+
await import_fs22.promises.access(credentialsFilePath, import_fs22.constants.F_OK);
|
|
158198
157862
|
this.logger.warn("Credentials file already exists. Skipping creation.");
|
|
158199
157863
|
} catch {
|
|
158200
|
-
await
|
|
158201
|
-
await
|
|
157864
|
+
await import_fs22.promises.mkdir((0, import_path19.dirname)(credentialsFilePath), { recursive: true });
|
|
157865
|
+
await import_fs22.promises.writeFile(credentialsFilePath, JSON.stringify(content));
|
|
158202
157866
|
this.logger.info("Credentials file created.");
|
|
158203
157867
|
}
|
|
158204
157868
|
}
|
|
158205
157869
|
getCredentialsFilePath() {
|
|
158206
|
-
const currentPlatform = (0,
|
|
157870
|
+
const currentPlatform = (0, import_os2.platform)();
|
|
158207
157871
|
switch (currentPlatform) {
|
|
158208
157872
|
case "darwin":
|
|
158209
|
-
return `${(0,
|
|
157873
|
+
return `${(0, import_os2.homedir)()}/Library/Application Support/dart/pub-credentials.json`;
|
|
158210
157874
|
case "linux":
|
|
158211
|
-
return `${(0,
|
|
157875
|
+
return `${(0, import_os2.homedir)()}/.config/dart/pub-credentials.json`;
|
|
158212
157876
|
default:
|
|
158213
157877
|
throw new Error(`Unsupported platform: ${currentPlatform}`);
|
|
158214
157878
|
}
|
|
@@ -158270,22 +157934,22 @@ var init_pubDev = __esm({
|
|
|
158270
157934
|
}
|
|
158271
157935
|
async removeDependencyOverrides(directory, pkg) {
|
|
158272
157936
|
const pubSpecPath = (0, import_path19.join)(directory, pkg, "pubspec.yaml");
|
|
158273
|
-
const pubSpecContent = await
|
|
157937
|
+
const pubSpecContent = await import_fs22.promises.readFile(pubSpecPath, "utf8");
|
|
158274
157938
|
const pubSpecYaml = load(pubSpecContent);
|
|
158275
157939
|
delete pubSpecYaml.dependency_overrides;
|
|
158276
|
-
await
|
|
157940
|
+
await import_fs22.promises.writeFile(pubSpecPath, dump(pubSpecYaml));
|
|
158277
157941
|
}
|
|
158278
157942
|
};
|
|
158279
157943
|
}
|
|
158280
157944
|
});
|
|
158281
157945
|
|
|
158282
157946
|
// src/targets/hex.ts
|
|
158283
|
-
var
|
|
157947
|
+
var import_fs23, import_path20, DEFAULT_MIX_BIN, MIX_BIN, HexTarget;
|
|
158284
157948
|
var init_hex = __esm({
|
|
158285
157949
|
"src/targets/hex.ts"() {
|
|
158286
157950
|
"use strict";
|
|
158287
157951
|
init_import_meta_url();
|
|
158288
|
-
|
|
157952
|
+
import_fs23 = require("fs");
|
|
158289
157953
|
import_path20 = require("path");
|
|
158290
157954
|
init_git();
|
|
158291
157955
|
init_base5();
|
|
@@ -158310,10 +157974,10 @@ var init_hex = __esm({
|
|
|
158310
157974
|
*/
|
|
158311
157975
|
static async bumpVersion(rootDir, newVersion) {
|
|
158312
157976
|
const mixExsPath = (0, import_path20.join)(rootDir, "mix.exs");
|
|
158313
|
-
if (!(0,
|
|
157977
|
+
if (!(0, import_fs23.existsSync)(mixExsPath)) {
|
|
158314
157978
|
return false;
|
|
158315
157979
|
}
|
|
158316
|
-
const content = (0,
|
|
157980
|
+
const content = (0, import_fs23.readFileSync)(mixExsPath, "utf-8");
|
|
158317
157981
|
const versionPatterns = [
|
|
158318
157982
|
/^(\s*version:\s*["'])([^"']+)(["'])/m,
|
|
158319
157983
|
/^(\s*@version\s+["'])([^"']+)(["'])/m
|
|
@@ -158335,7 +157999,7 @@ var init_hex = __esm({
|
|
|
158335
157999
|
return true;
|
|
158336
158000
|
}
|
|
158337
158001
|
logger.debug(`Updating version in ${mixExsPath} to ${newVersion}`);
|
|
158338
|
-
(0,
|
|
158002
|
+
(0, import_fs23.writeFileSync)(mixExsPath, newContent);
|
|
158339
158003
|
return true;
|
|
158340
158004
|
}
|
|
158341
158005
|
constructor(config3, artifactProvider, githubRepo) {
|
|
@@ -158452,9 +158116,11 @@ async function pushArchiveToGitRepository({
|
|
|
158452
158116
|
logger3?.info(`Defined --strip-components depth as ${stripComponents}`);
|
|
158453
158117
|
}
|
|
158454
158118
|
logger3?.info(`Unpack tarball archive at "${archivePath}"...`);
|
|
158455
|
-
|
|
158456
|
-
|
|
158457
|
-
cwd: directory
|
|
158119
|
+
await lo({
|
|
158120
|
+
file: archivePath,
|
|
158121
|
+
cwd: directory,
|
|
158122
|
+
gzip: true,
|
|
158123
|
+
strip: stripComponents && stripComponents > 0 ? stripComponents : 0
|
|
158458
158124
|
});
|
|
158459
158125
|
logger3?.info(`Staging files...`);
|
|
158460
158126
|
await git.raw("add", "--all");
|
|
@@ -158477,7 +158143,7 @@ async function pushArchiveToGitRepository({
|
|
|
158477
158143
|
"craft-git-repository-target-"
|
|
158478
158144
|
);
|
|
158479
158145
|
}
|
|
158480
|
-
var
|
|
158146
|
+
var import_url3, CommitOnGitRepositoryTarget;
|
|
158481
158147
|
var init_commitOnGitRepository = __esm({
|
|
158482
158148
|
"src/targets/commitOnGitRepository.ts"() {
|
|
158483
158149
|
"use strict";
|
|
@@ -158486,7 +158152,7 @@ var init_commitOnGitRepository = __esm({
|
|
|
158486
158152
|
init_files();
|
|
158487
158153
|
init_git();
|
|
158488
158154
|
init_base5();
|
|
158489
|
-
|
|
158155
|
+
init_index_min();
|
|
158490
158156
|
import_url3 = require("url");
|
|
158491
158157
|
CommitOnGitRepositoryTarget = class extends BaseTarget {
|
|
158492
158158
|
/** Target name */
|
|
@@ -158773,7 +158439,7 @@ function findConfigFile() {
|
|
|
158773
158439
|
let currentDir = cwd;
|
|
158774
158440
|
while (depth <= MAX_DEPTH) {
|
|
158775
158441
|
const probePath = import_path22.default.join(currentDir, CONFIG_FILE_NAME);
|
|
158776
|
-
if ((0,
|
|
158442
|
+
if ((0, import_fs24.existsSync)(probePath) && (0, import_fs24.lstatSync)(probePath).isFile()) {
|
|
158777
158443
|
_configPathCache = probePath;
|
|
158778
158444
|
return _configPathCache;
|
|
158779
158445
|
}
|
|
@@ -158824,7 +158490,7 @@ function getConfiguration(clearCache = false) {
|
|
|
158824
158490
|
}
|
|
158825
158491
|
const configPath = getConfigFilePath();
|
|
158826
158492
|
logger.debug("Configuration file found: ", configPath);
|
|
158827
|
-
const rawConfig = load((0,
|
|
158493
|
+
const rawConfig = load((0, import_fs24.readFileSync)(configPath, "utf-8"));
|
|
158828
158494
|
_configCache = validateConfiguration(rawConfig);
|
|
158829
158495
|
checkMinimalConfigVersion(_configCache);
|
|
158830
158496
|
return _configCache;
|
|
@@ -159045,12 +158711,12 @@ async function expandWorkspaceTargets(targets) {
|
|
|
159045
158711
|
}
|
|
159046
158712
|
return expandedTargets;
|
|
159047
158713
|
}
|
|
159048
|
-
var
|
|
158714
|
+
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;
|
|
159049
158715
|
var init_config2 = __esm({
|
|
159050
158716
|
"src/config.ts"() {
|
|
159051
158717
|
"use strict";
|
|
159052
158718
|
init_import_meta_url();
|
|
159053
|
-
|
|
158719
|
+
import_fs24 = require("fs");
|
|
159054
158720
|
import_path22 = __toESM(require("path"));
|
|
159055
158721
|
init_js_yaml();
|
|
159056
158722
|
import_git_url_parse = __toESM(require_lib5());
|
|
@@ -159077,7 +158743,7 @@ var require_package6 = __commonJS({
|
|
|
159077
158743
|
"package.json"(exports2, module2) {
|
|
159078
158744
|
module2.exports = {
|
|
159079
158745
|
name: "@sentry/craft",
|
|
159080
|
-
version: "2.
|
|
158746
|
+
version: "2.26.0",
|
|
159081
158747
|
description: "The universal sentry workflow CLI",
|
|
159082
158748
|
main: "dist/craft",
|
|
159083
158749
|
repository: "https://github.com/getsentry/craft",
|
|
@@ -159132,7 +158798,6 @@ var require_package6 = __commonJS({
|
|
|
159132
158798
|
mustache: "3.0.1",
|
|
159133
158799
|
nock: "^13.2.4",
|
|
159134
158800
|
"node-fetch": "^2.6.1",
|
|
159135
|
-
nvar: "1.3.1",
|
|
159136
158801
|
ora: "5.4.0",
|
|
159137
158802
|
prettier: "^3.4.2",
|
|
159138
158803
|
prompts: "2.4.1",
|
|
@@ -159249,7 +158914,7 @@ function getPackage() {
|
|
|
159249
158914
|
}
|
|
159250
158915
|
function getPackageVersion() {
|
|
159251
158916
|
const { version: version2 } = getPackage();
|
|
159252
|
-
const buildInfo = "
|
|
158917
|
+
const buildInfo = "2d78918ece86d970404ccaa029735cb5dce1901b";
|
|
159253
158918
|
return buildInfo ? `${version2} (${buildInfo})` : version2;
|
|
159254
158919
|
}
|
|
159255
158920
|
function semVerToString(s6) {
|
|
@@ -161533,28 +161198,28 @@ var require_path_arg = __commonJS({
|
|
|
161533
161198
|
init_import_meta_url();
|
|
161534
161199
|
var platform4 = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform;
|
|
161535
161200
|
var { resolve: resolve7, parse: parse5 } = require("path");
|
|
161536
|
-
var pathArg = (
|
|
161537
|
-
if (/\0/.test(
|
|
161201
|
+
var pathArg = (path18) => {
|
|
161202
|
+
if (/\0/.test(path18)) {
|
|
161538
161203
|
throw Object.assign(
|
|
161539
161204
|
new TypeError("path must be a string without null bytes"),
|
|
161540
161205
|
{
|
|
161541
|
-
path:
|
|
161206
|
+
path: path18,
|
|
161542
161207
|
code: "ERR_INVALID_ARG_VALUE"
|
|
161543
161208
|
}
|
|
161544
161209
|
);
|
|
161545
161210
|
}
|
|
161546
|
-
|
|
161211
|
+
path18 = resolve7(path18);
|
|
161547
161212
|
if (platform4 === "win32") {
|
|
161548
161213
|
const badWinChars = /[*|"<>?:]/;
|
|
161549
|
-
const { root } = parse5(
|
|
161550
|
-
if (badWinChars.test(
|
|
161214
|
+
const { root } = parse5(path18);
|
|
161215
|
+
if (badWinChars.test(path18.substr(root.length))) {
|
|
161551
161216
|
throw Object.assign(new Error("Illegal characters in path."), {
|
|
161552
|
-
path:
|
|
161217
|
+
path: path18,
|
|
161553
161218
|
code: "EINVAL"
|
|
161554
161219
|
});
|
|
161555
161220
|
}
|
|
161556
161221
|
}
|
|
161557
|
-
return
|
|
161222
|
+
return path18;
|
|
161558
161223
|
};
|
|
161559
161224
|
module2.exports = pathArg;
|
|
161560
161225
|
}
|
|
@@ -161564,23 +161229,23 @@ var require_path_arg = __commonJS({
|
|
|
161564
161229
|
var require_find_made = __commonJS({
|
|
161565
161230
|
"node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/find-made.js"(exports2, module2) {
|
|
161566
161231
|
init_import_meta_url();
|
|
161567
|
-
var { dirname:
|
|
161568
|
-
var findMade = (opts, parent,
|
|
161569
|
-
if (
|
|
161232
|
+
var { dirname: dirname9 } = require("path");
|
|
161233
|
+
var findMade = (opts, parent, path18 = void 0) => {
|
|
161234
|
+
if (path18 === parent)
|
|
161570
161235
|
return Promise.resolve();
|
|
161571
161236
|
return opts.statAsync(parent).then(
|
|
161572
|
-
(st2) => st2.isDirectory() ?
|
|
161237
|
+
(st2) => st2.isDirectory() ? path18 : void 0,
|
|
161573
161238
|
// will fail later
|
|
161574
|
-
(er2) => er2.code === "ENOENT" ? findMade(opts,
|
|
161239
|
+
(er2) => er2.code === "ENOENT" ? findMade(opts, dirname9(parent), parent) : void 0
|
|
161575
161240
|
);
|
|
161576
161241
|
};
|
|
161577
|
-
var findMadeSync = (opts, parent,
|
|
161578
|
-
if (
|
|
161242
|
+
var findMadeSync = (opts, parent, path18 = void 0) => {
|
|
161243
|
+
if (path18 === parent)
|
|
161579
161244
|
return void 0;
|
|
161580
161245
|
try {
|
|
161581
|
-
return opts.statSync(parent).isDirectory() ?
|
|
161246
|
+
return opts.statSync(parent).isDirectory() ? path18 : void 0;
|
|
161582
161247
|
} catch (er2) {
|
|
161583
|
-
return er2.code === "ENOENT" ? findMadeSync(opts,
|
|
161248
|
+
return er2.code === "ENOENT" ? findMadeSync(opts, dirname9(parent), parent) : void 0;
|
|
161584
161249
|
}
|
|
161585
161250
|
};
|
|
161586
161251
|
module2.exports = { findMade, findMadeSync };
|
|
@@ -161591,22 +161256,22 @@ var require_find_made = __commonJS({
|
|
|
161591
161256
|
var require_mkdirp_manual = __commonJS({
|
|
161592
161257
|
"node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/mkdirp-manual.js"(exports2, module2) {
|
|
161593
161258
|
init_import_meta_url();
|
|
161594
|
-
var { dirname:
|
|
161595
|
-
var mkdirpManual = (
|
|
161259
|
+
var { dirname: dirname9 } = require("path");
|
|
161260
|
+
var mkdirpManual = (path18, opts, made) => {
|
|
161596
161261
|
opts.recursive = false;
|
|
161597
|
-
const parent =
|
|
161598
|
-
if (parent ===
|
|
161599
|
-
return opts.mkdirAsync(
|
|
161262
|
+
const parent = dirname9(path18);
|
|
161263
|
+
if (parent === path18) {
|
|
161264
|
+
return opts.mkdirAsync(path18, opts).catch((er2) => {
|
|
161600
161265
|
if (er2.code !== "EISDIR")
|
|
161601
161266
|
throw er2;
|
|
161602
161267
|
});
|
|
161603
161268
|
}
|
|
161604
|
-
return opts.mkdirAsync(
|
|
161269
|
+
return opts.mkdirAsync(path18, opts).then(() => made || path18, (er2) => {
|
|
161605
161270
|
if (er2.code === "ENOENT")
|
|
161606
|
-
return mkdirpManual(parent, opts).then((made2) => mkdirpManual(
|
|
161271
|
+
return mkdirpManual(parent, opts).then((made2) => mkdirpManual(path18, opts, made2));
|
|
161607
161272
|
if (er2.code !== "EEXIST" && er2.code !== "EROFS")
|
|
161608
161273
|
throw er2;
|
|
161609
|
-
return opts.statAsync(
|
|
161274
|
+
return opts.statAsync(path18).then((st2) => {
|
|
161610
161275
|
if (st2.isDirectory())
|
|
161611
161276
|
return made;
|
|
161612
161277
|
else
|
|
@@ -161616,12 +161281,12 @@ var require_mkdirp_manual = __commonJS({
|
|
|
161616
161281
|
});
|
|
161617
161282
|
});
|
|
161618
161283
|
};
|
|
161619
|
-
var mkdirpManualSync = (
|
|
161620
|
-
const parent =
|
|
161284
|
+
var mkdirpManualSync = (path18, opts, made) => {
|
|
161285
|
+
const parent = dirname9(path18);
|
|
161621
161286
|
opts.recursive = false;
|
|
161622
|
-
if (parent ===
|
|
161287
|
+
if (parent === path18) {
|
|
161623
161288
|
try {
|
|
161624
|
-
return opts.mkdirSync(
|
|
161289
|
+
return opts.mkdirSync(path18, opts);
|
|
161625
161290
|
} catch (er2) {
|
|
161626
161291
|
if (er2.code !== "EISDIR")
|
|
161627
161292
|
throw er2;
|
|
@@ -161630,15 +161295,15 @@ var require_mkdirp_manual = __commonJS({
|
|
|
161630
161295
|
}
|
|
161631
161296
|
}
|
|
161632
161297
|
try {
|
|
161633
|
-
opts.mkdirSync(
|
|
161634
|
-
return made ||
|
|
161298
|
+
opts.mkdirSync(path18, opts);
|
|
161299
|
+
return made || path18;
|
|
161635
161300
|
} catch (er2) {
|
|
161636
161301
|
if (er2.code === "ENOENT")
|
|
161637
|
-
return mkdirpManualSync(
|
|
161302
|
+
return mkdirpManualSync(path18, opts, mkdirpManualSync(parent, opts, made));
|
|
161638
161303
|
if (er2.code !== "EEXIST" && er2.code !== "EROFS")
|
|
161639
161304
|
throw er2;
|
|
161640
161305
|
try {
|
|
161641
|
-
if (!opts.statSync(
|
|
161306
|
+
if (!opts.statSync(path18).isDirectory())
|
|
161642
161307
|
throw er2;
|
|
161643
161308
|
} catch (_3) {
|
|
161644
161309
|
throw er2;
|
|
@@ -161653,33 +161318,33 @@ var require_mkdirp_manual = __commonJS({
|
|
|
161653
161318
|
var require_mkdirp_native = __commonJS({
|
|
161654
161319
|
"node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/mkdirp-native.js"(exports2, module2) {
|
|
161655
161320
|
init_import_meta_url();
|
|
161656
|
-
var { dirname:
|
|
161321
|
+
var { dirname: dirname9 } = require("path");
|
|
161657
161322
|
var { findMade, findMadeSync } = require_find_made();
|
|
161658
161323
|
var { mkdirpManual, mkdirpManualSync } = require_mkdirp_manual();
|
|
161659
|
-
var mkdirpNative = (
|
|
161324
|
+
var mkdirpNative = (path18, opts) => {
|
|
161660
161325
|
opts.recursive = true;
|
|
161661
|
-
const parent =
|
|
161662
|
-
if (parent ===
|
|
161663
|
-
return opts.mkdirAsync(
|
|
161664
|
-
return findMade(opts,
|
|
161326
|
+
const parent = dirname9(path18);
|
|
161327
|
+
if (parent === path18)
|
|
161328
|
+
return opts.mkdirAsync(path18, opts);
|
|
161329
|
+
return findMade(opts, path18).then((made) => opts.mkdirAsync(path18, opts).then(() => made).catch((er2) => {
|
|
161665
161330
|
if (er2.code === "ENOENT")
|
|
161666
|
-
return mkdirpManual(
|
|
161331
|
+
return mkdirpManual(path18, opts);
|
|
161667
161332
|
else
|
|
161668
161333
|
throw er2;
|
|
161669
161334
|
}));
|
|
161670
161335
|
};
|
|
161671
|
-
var mkdirpNativeSync = (
|
|
161336
|
+
var mkdirpNativeSync = (path18, opts) => {
|
|
161672
161337
|
opts.recursive = true;
|
|
161673
|
-
const parent =
|
|
161674
|
-
if (parent ===
|
|
161675
|
-
return opts.mkdirSync(
|
|
161676
|
-
const made = findMadeSync(opts,
|
|
161338
|
+
const parent = dirname9(path18);
|
|
161339
|
+
if (parent === path18)
|
|
161340
|
+
return opts.mkdirSync(path18, opts);
|
|
161341
|
+
const made = findMadeSync(opts, path18);
|
|
161677
161342
|
try {
|
|
161678
|
-
opts.mkdirSync(
|
|
161343
|
+
opts.mkdirSync(path18, opts);
|
|
161679
161344
|
return made;
|
|
161680
161345
|
} catch (er2) {
|
|
161681
161346
|
if (er2.code === "ENOENT")
|
|
161682
|
-
return mkdirpManualSync(
|
|
161347
|
+
return mkdirpManualSync(path18, opts);
|
|
161683
161348
|
else
|
|
161684
161349
|
throw er2;
|
|
161685
161350
|
}
|
|
@@ -161711,21 +161376,21 @@ var require_mkdirp = __commonJS({
|
|
|
161711
161376
|
var { mkdirpNative, mkdirpNativeSync } = require_mkdirp_native();
|
|
161712
161377
|
var { mkdirpManual, mkdirpManualSync } = require_mkdirp_manual();
|
|
161713
161378
|
var { useNative, useNativeSync } = require_use_native();
|
|
161714
|
-
var mkdirp2 = (
|
|
161715
|
-
|
|
161379
|
+
var mkdirp2 = (path18, opts) => {
|
|
161380
|
+
path18 = pathArg(path18);
|
|
161716
161381
|
opts = optsArg(opts);
|
|
161717
|
-
return useNative(opts) ? mkdirpNative(
|
|
161382
|
+
return useNative(opts) ? mkdirpNative(path18, opts) : mkdirpManual(path18, opts);
|
|
161718
161383
|
};
|
|
161719
|
-
var mkdirpSync = (
|
|
161720
|
-
|
|
161384
|
+
var mkdirpSync = (path18, opts) => {
|
|
161385
|
+
path18 = pathArg(path18);
|
|
161721
161386
|
opts = optsArg(opts);
|
|
161722
|
-
return useNativeSync(opts) ? mkdirpNativeSync(
|
|
161387
|
+
return useNativeSync(opts) ? mkdirpNativeSync(path18, opts) : mkdirpManualSync(path18, opts);
|
|
161723
161388
|
};
|
|
161724
161389
|
mkdirp2.sync = mkdirpSync;
|
|
161725
|
-
mkdirp2.native = (
|
|
161726
|
-
mkdirp2.manual = (
|
|
161727
|
-
mkdirp2.nativeSync = (
|
|
161728
|
-
mkdirp2.manualSync = (
|
|
161390
|
+
mkdirp2.native = (path18, opts) => mkdirpNative(pathArg(path18), optsArg(opts));
|
|
161391
|
+
mkdirp2.manual = (path18, opts) => mkdirpManual(pathArg(path18), optsArg(opts));
|
|
161392
|
+
mkdirp2.nativeSync = (path18, opts) => mkdirpNativeSync(pathArg(path18), optsArg(opts));
|
|
161393
|
+
mkdirp2.manualSync = (path18, opts) => mkdirpManualSync(pathArg(path18), optsArg(opts));
|
|
161729
161394
|
module2.exports = mkdirp2;
|
|
161730
161395
|
}
|
|
161731
161396
|
});
|
|
@@ -161735,7 +161400,7 @@ init_import_meta_url();
|
|
|
161735
161400
|
|
|
161736
161401
|
// src/instrument.ts
|
|
161737
161402
|
init_import_meta_url();
|
|
161738
|
-
var
|
|
161403
|
+
var import_os3 = require("os");
|
|
161739
161404
|
init_esm9();
|
|
161740
161405
|
var import_is_ci = __toESM(require_is_ci());
|
|
161741
161406
|
init_version9();
|
|
@@ -161774,11 +161439,11 @@ init2({
|
|
|
161774
161439
|
}
|
|
161775
161440
|
});
|
|
161776
161441
|
var scope = getCurrentScope();
|
|
161777
|
-
scope.setTag("os-username", (0,
|
|
161778
|
-
scope.setTag("os-hostname", (0,
|
|
161779
|
-
scope.setTag("os-platform", (0,
|
|
161780
|
-
scope.setTag("os-arch", (0,
|
|
161781
|
-
scope.setTag("os-release", (0,
|
|
161442
|
+
scope.setTag("os-username", (0, import_os3.userInfo)().username);
|
|
161443
|
+
scope.setTag("os-hostname", (0, import_os3.hostname)());
|
|
161444
|
+
scope.setTag("os-platform", (0, import_os3.platform)());
|
|
161445
|
+
scope.setTag("os-arch", (0, import_os3.arch)());
|
|
161446
|
+
scope.setTag("os-release", (0, import_os3.release)());
|
|
161782
161447
|
scope.setExtra("argv", process.argv);
|
|
161783
161448
|
scope.setExtra("craft-version", getPackageVersion());
|
|
161784
161449
|
scope.setExtra("working-directory", process.cwd());
|
|
@@ -162518,15 +162183,15 @@ function ui2(opts) {
|
|
|
162518
162183
|
// node_modules/.pnpm/escalade@3.2.0/node_modules/escalade/sync/index.mjs
|
|
162519
162184
|
init_import_meta_url();
|
|
162520
162185
|
var import_path23 = require("path");
|
|
162521
|
-
var
|
|
162186
|
+
var import_fs25 = require("fs");
|
|
162522
162187
|
function sync_default(start, callback) {
|
|
162523
162188
|
let dir = (0, import_path23.resolve)(".", start);
|
|
162524
|
-
let tmp2, stats = (0,
|
|
162189
|
+
let tmp2, stats = (0, import_fs25.statSync)(dir);
|
|
162525
162190
|
if (!stats.isDirectory()) {
|
|
162526
162191
|
dir = (0, import_path23.dirname)(dir);
|
|
162527
162192
|
}
|
|
162528
162193
|
while (true) {
|
|
162529
|
-
tmp2 = callback(dir, (0,
|
|
162194
|
+
tmp2 = callback(dir, (0, import_fs25.readdirSync)(dir));
|
|
162530
162195
|
if (tmp2) return (0, import_path23.resolve)(dir, tmp2);
|
|
162531
162196
|
dir = (0, import_path23.dirname)(tmp2 = dir);
|
|
162532
162197
|
if (tmp2 === dir) break;
|
|
@@ -163484,7 +163149,7 @@ function stripQuotes(val) {
|
|
|
163484
163149
|
}
|
|
163485
163150
|
|
|
163486
163151
|
// node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/index.js
|
|
163487
|
-
var
|
|
163152
|
+
var import_fs26 = require("fs");
|
|
163488
163153
|
var import_node_module = require("node:module");
|
|
163489
163154
|
var _a4;
|
|
163490
163155
|
var _b;
|
|
@@ -163507,11 +163172,11 @@ var parser4 = new YargsParser({
|
|
|
163507
163172
|
format: import_util25.format,
|
|
163508
163173
|
normalize: import_path24.normalize,
|
|
163509
163174
|
resolve: import_path24.resolve,
|
|
163510
|
-
require: (
|
|
163175
|
+
require: (path18) => {
|
|
163511
163176
|
if (typeof require2 !== "undefined") {
|
|
163512
|
-
return require2(
|
|
163513
|
-
} else if (
|
|
163514
|
-
return JSON.parse((0,
|
|
163177
|
+
return require2(path18);
|
|
163178
|
+
} else if (path18.match(/\.json$/)) {
|
|
163179
|
+
return JSON.parse((0, import_fs26.readFileSync)(path18, "utf8"));
|
|
163515
163180
|
} else {
|
|
163516
163181
|
throw Error("only .json config files are supported in ESM");
|
|
163517
163182
|
}
|
|
@@ -163554,19 +163219,19 @@ init_import_meta_url();
|
|
|
163554
163219
|
|
|
163555
163220
|
// node_modules/.pnpm/y18n@5.0.8/node_modules/y18n/build/lib/platform-shims/node.js
|
|
163556
163221
|
init_import_meta_url();
|
|
163557
|
-
var
|
|
163222
|
+
var import_fs27 = require("fs");
|
|
163558
163223
|
var import_util26 = require("util");
|
|
163559
163224
|
var import_path25 = require("path");
|
|
163560
163225
|
var node_default = {
|
|
163561
163226
|
fs: {
|
|
163562
|
-
readFileSync:
|
|
163563
|
-
writeFile:
|
|
163227
|
+
readFileSync: import_fs27.readFileSync,
|
|
163228
|
+
writeFile: import_fs27.writeFile
|
|
163564
163229
|
},
|
|
163565
163230
|
format: import_util26.format,
|
|
163566
163231
|
resolve: import_path25.resolve,
|
|
163567
163232
|
exists: (file) => {
|
|
163568
163233
|
try {
|
|
163569
|
-
return (0,
|
|
163234
|
+
return (0, import_fs27.statSync)(file).isFile();
|
|
163570
163235
|
} catch (err) {
|
|
163571
163236
|
return false;
|
|
163572
163237
|
}
|
|
@@ -167152,6 +166817,7 @@ init_tracing3();
|
|
|
167152
166817
|
var prepare_exports = {};
|
|
167153
166818
|
__export(prepare_exports, {
|
|
167154
166819
|
aliases: () => aliases2,
|
|
166820
|
+
assertRemoteConfigAllowed: () => assertRemoteConfigAllowed,
|
|
167155
166821
|
builder: () => builder2,
|
|
167156
166822
|
checkVersionOrPart: () => checkVersionOrPart,
|
|
167157
166823
|
command: () => command3,
|
|
@@ -167161,8 +166827,8 @@ __export(prepare_exports, {
|
|
|
167161
166827
|
runPreReleaseCommand: () => runPreReleaseCommand
|
|
167162
166828
|
});
|
|
167163
166829
|
init_import_meta_url();
|
|
167164
|
-
var
|
|
167165
|
-
var
|
|
166830
|
+
var import_fs29 = require("fs");
|
|
166831
|
+
var import_path29 = require("path");
|
|
167166
166832
|
var shellQuote2 = __toESM(require_shell_quote());
|
|
167167
166833
|
init_dryRun();
|
|
167168
166834
|
init_config2();
|
|
@@ -167257,6 +166923,28 @@ init_git();
|
|
|
167257
166923
|
init_helpers();
|
|
167258
166924
|
init_strings();
|
|
167259
166925
|
init_system();
|
|
166926
|
+
|
|
166927
|
+
// src/utils/releaseCommandEnv.ts
|
|
166928
|
+
init_import_meta_url();
|
|
166929
|
+
var ALLOWED_ENV_VARS = [
|
|
166930
|
+
"HOME",
|
|
166931
|
+
"USER",
|
|
166932
|
+
"GIT_COMMITTER_NAME",
|
|
166933
|
+
"GIT_AUTHOR_NAME",
|
|
166934
|
+
"EMAIL"
|
|
166935
|
+
];
|
|
166936
|
+
function buildReleaseCommandEnv(extras = {}) {
|
|
166937
|
+
const env2 = {
|
|
166938
|
+
PATH: process.env.PATH,
|
|
166939
|
+
GITHUB_TOKEN: process.env.GITHUB_TOKEN
|
|
166940
|
+
};
|
|
166941
|
+
for (const key of ALLOWED_ENV_VARS) {
|
|
166942
|
+
env2[key] = process.env[key];
|
|
166943
|
+
}
|
|
166944
|
+
return { ...env2, ...extras };
|
|
166945
|
+
}
|
|
166946
|
+
|
|
166947
|
+
// src/commands/prepare.ts
|
|
167260
166948
|
init_tracing3();
|
|
167261
166949
|
init_version9();
|
|
167262
166950
|
|
|
@@ -167326,9 +167014,9 @@ __export(publish_exports, {
|
|
|
167326
167014
|
});
|
|
167327
167015
|
init_import_meta_url();
|
|
167328
167016
|
var import_chalk = __toESM(require_source());
|
|
167329
|
-
var
|
|
167017
|
+
var import_fs28 = require("fs");
|
|
167330
167018
|
init_dryRun();
|
|
167331
|
-
var
|
|
167019
|
+
var import_path28 = require("path");
|
|
167332
167020
|
var import_shell_quote = __toESM(require_shell_quote());
|
|
167333
167021
|
var import_string_length = __toESM(require_string_length());
|
|
167334
167022
|
init_config2();
|
|
@@ -167345,14 +167033,45 @@ init_version9();
|
|
|
167345
167033
|
init_esm9();
|
|
167346
167034
|
init_git();
|
|
167347
167035
|
init_tracing3();
|
|
167348
|
-
|
|
167349
|
-
|
|
167350
|
-
|
|
167351
|
-
|
|
167352
|
-
|
|
167353
|
-
|
|
167354
|
-
|
|
167355
|
-
|
|
167036
|
+
|
|
167037
|
+
// src/utils/publishState.ts
|
|
167038
|
+
init_import_meta_url();
|
|
167039
|
+
var import_crypto10 = require("crypto");
|
|
167040
|
+
var import_os4 = require("os");
|
|
167041
|
+
var import_path27 = require("path");
|
|
167042
|
+
var STATE_DIR_NAME = "craft";
|
|
167043
|
+
function getCraftStateDir() {
|
|
167044
|
+
const xdgStateHome = process.env.XDG_STATE_HOME;
|
|
167045
|
+
if (xdgStateHome && xdgStateHome.length > 0) {
|
|
167046
|
+
return (0, import_path27.join)(xdgStateHome, STATE_DIR_NAME);
|
|
167047
|
+
}
|
|
167048
|
+
return (0, import_path27.join)((0, import_os4.homedir)(), ".local", "state", STATE_DIR_NAME);
|
|
167049
|
+
}
|
|
167050
|
+
function sanitiseForFilename(raw) {
|
|
167051
|
+
return raw.toLowerCase().replace(/[^a-z0-9._-]+/g, "_").replace(/^_+|_+$/g, "");
|
|
167052
|
+
}
|
|
167053
|
+
function shortCwdHash(cwd) {
|
|
167054
|
+
return (0, import_crypto10.createHash)("sha1").update(cwd).digest("hex").slice(0, 12);
|
|
167055
|
+
}
|
|
167056
|
+
function getPublishStateFilename(version2, githubConfig, cwd = process.cwd()) {
|
|
167057
|
+
const safeVersion = sanitiseForFilename(version2);
|
|
167058
|
+
if (githubConfig) {
|
|
167059
|
+
const owner = sanitiseForFilename(githubConfig.owner);
|
|
167060
|
+
const repo = sanitiseForFilename(githubConfig.repo);
|
|
167061
|
+
return `publish-state-${owner}-${repo}-${shortCwdHash(cwd)}-${safeVersion}.json`;
|
|
167062
|
+
}
|
|
167063
|
+
const cwdDigest = (0, import_crypto10.createHash)("sha256").update(cwd).digest("hex").slice(0, 16);
|
|
167064
|
+
return `publish-state-${cwdDigest}-${safeVersion}.json`;
|
|
167065
|
+
}
|
|
167066
|
+
function getPublishStatePath(version2, githubConfig, cwd = process.cwd()) {
|
|
167067
|
+
return (0, import_path27.join)(
|
|
167068
|
+
getCraftStateDir(),
|
|
167069
|
+
getPublishStateFilename(version2, githubConfig, cwd)
|
|
167070
|
+
);
|
|
167071
|
+
}
|
|
167072
|
+
|
|
167073
|
+
// src/commands/publish.ts
|
|
167074
|
+
var DEFAULT_POST_RELEASE_SCRIPT_PATH = (0, import_path28.join)("scripts", "post-release.sh");
|
|
167356
167075
|
var command2 = ["publish NEW-VERSION"];
|
|
167357
167076
|
var aliases = ["pp", "publish"];
|
|
167358
167077
|
var description = "\u{1F6EB} Publish artifacts";
|
|
@@ -167666,14 +167385,7 @@ async function runPostReleaseCommand(newVersion, postReleaseCommand) {
|
|
|
167666
167385
|
args = [...args, "", newVersion];
|
|
167667
167386
|
logger.info(`Running the post-release command...`);
|
|
167668
167387
|
await spawnProcess(sysCommand, args, {
|
|
167669
|
-
env: {
|
|
167670
|
-
CRAFT_RELEASED_VERSION: newVersion,
|
|
167671
|
-
PATH: process.env.PATH,
|
|
167672
|
-
GITHUB_TOKEN: process.env.GITHUB_TOKEN,
|
|
167673
|
-
...Object.fromEntries(
|
|
167674
|
-
ALLOWED_ENV_VARS.map((key) => [key, process.env[key]])
|
|
167675
|
-
)
|
|
167676
|
-
}
|
|
167388
|
+
env: buildReleaseCommandEnv({ CRAFT_RELEASED_VERSION: newVersion })
|
|
167677
167389
|
});
|
|
167678
167390
|
return true;
|
|
167679
167391
|
}
|
|
@@ -167763,13 +167475,28 @@ Original error: ${err instanceof Error ? err.message : String(err)}`;
|
|
|
167763
167475
|
}
|
|
167764
167476
|
}
|
|
167765
167477
|
let targetConfigList = await expandWorkspaceTargets(config3.targets || []);
|
|
167478
|
+
let publishStateGithubConfig = null;
|
|
167479
|
+
try {
|
|
167480
|
+
publishStateGithubConfig = await getGlobalGitHubConfig();
|
|
167481
|
+
} catch {
|
|
167482
|
+
}
|
|
167483
|
+
const publishStateFile = getPublishStatePath(
|
|
167484
|
+
newVersion,
|
|
167485
|
+
publishStateGithubConfig
|
|
167486
|
+
);
|
|
167766
167487
|
logger.info(`Looking for publish state file for ${newVersion}...`);
|
|
167767
|
-
|
|
167768
|
-
const
|
|
167488
|
+
logger.debug(`Publish state file path: ${publishStateFile}`);
|
|
167489
|
+
const legacyStateFile = `.craft-publish-${newVersion}.json`;
|
|
167490
|
+
if ((0, import_fs28.existsSync)(legacyStateFile)) {
|
|
167491
|
+
logger.warn(
|
|
167492
|
+
`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.`
|
|
167493
|
+
);
|
|
167494
|
+
}
|
|
167495
|
+
const earlierStateExists = (0, import_fs28.existsSync)(publishStateFile);
|
|
167769
167496
|
let publishState;
|
|
167770
167497
|
if (earlierStateExists) {
|
|
167771
167498
|
logger.info(`Found publish state file, resuming from there...`);
|
|
167772
|
-
publishState = JSON.parse((0,
|
|
167499
|
+
publishState = JSON.parse((0, import_fs28.readFileSync)(publishStateFile).toString());
|
|
167773
167500
|
targetsToPublish = new Set(targetConfigList.map(BaseTarget.getId));
|
|
167774
167501
|
} else {
|
|
167775
167502
|
publishState = { published: /* @__PURE__ */ Object.create(null) };
|
|
@@ -167797,6 +167524,7 @@ Original error: ${err instanceof Error ? err.message : String(err)}`;
|
|
|
167797
167524
|
await promptConfirmation();
|
|
167798
167525
|
await withTempDir(async (downloadDirectory) => {
|
|
167799
167526
|
artifactProvider.setDownloadDirectory(downloadDirectory);
|
|
167527
|
+
(0, import_fs28.mkdirSync)((0, import_path28.dirname)(publishStateFile), { recursive: true });
|
|
167800
167528
|
for (const target of targetList) {
|
|
167801
167529
|
await publishToTarget(target, newVersion, revision);
|
|
167802
167530
|
publishState.published[BaseTarget.getId(target.config)] = true;
|
|
@@ -167917,7 +167645,7 @@ var handler2 = async (args) => {
|
|
|
167917
167645
|
var command3 = ["prepare [NEW-VERSION]"];
|
|
167918
167646
|
var aliases2 = ["p", "prerelease", "prepublish", "prepare", "release"];
|
|
167919
167647
|
var description2 = "\u{1F6A2} Prepare a new release branch";
|
|
167920
|
-
var DEFAULT_BUMP_VERSION_PATH = (0,
|
|
167648
|
+
var DEFAULT_BUMP_VERSION_PATH = (0, import_path29.join)("scripts", "bump-version.sh");
|
|
167921
167649
|
var AUTO_VERSION_MIN_VERSION2 = "2.14.0";
|
|
167922
167650
|
var AUTO_BUMP_MIN_VERSION = "2.21.0";
|
|
167923
167651
|
var builder2 = (yargs) => yargs.positional("NEW-VERSION", {
|
|
@@ -167948,13 +167676,24 @@ var builder2 = (yargs) => yargs.positional("NEW-VERSION", {
|
|
|
167948
167676
|
description: "The git remote to use when pushing",
|
|
167949
167677
|
type: "string"
|
|
167950
167678
|
}).option("config-from", {
|
|
167951
|
-
description: "Load .craft.yml from the specified remote branch instead of local file",
|
|
167679
|
+
description: "Load .craft.yml from the specified remote branch instead of local file. Requires --allow-remote-config since the remote config can run arbitrary commands via preReleaseCommand.",
|
|
167952
167680
|
type: "string"
|
|
167681
|
+
}).option("allow-remote-config", {
|
|
167682
|
+
description: "Opt in to loading .craft.yml from a remote branch via --config-from. Without this flag, --config-from is rejected because remotely-fetched config is untrusted input that can execute arbitrary commands.",
|
|
167683
|
+
type: "boolean",
|
|
167684
|
+
default: false
|
|
167953
167685
|
}).option("calver-offset", {
|
|
167954
167686
|
description: "Days to go back for CalVer date calculation (overrides config)",
|
|
167955
167687
|
type: "number"
|
|
167956
167688
|
}).check(checkVersionOrPart);
|
|
167957
167689
|
var SLEEP_BEFORE_PUBLISH_SECONDS = 30;
|
|
167690
|
+
function assertRemoteConfigAllowed(configFrom, allowRemoteConfig) {
|
|
167691
|
+
if (!allowRemoteConfig) {
|
|
167692
|
+
throw new ConfigurationError(
|
|
167693
|
+
`--config-from loads ${CONFIG_FILE_NAME} from a remote git ref, which can execute arbitrary commands via preReleaseCommand. Pass --allow-remote-config (or set CRAFT_ALLOW_REMOTE_CONFIG=1) to confirm you trust the remote branch "${configFrom}".`
|
|
167694
|
+
);
|
|
167695
|
+
}
|
|
167696
|
+
}
|
|
167958
167697
|
function checkVersionOrPart(argv, _opt) {
|
|
167959
167698
|
const version2 = argv.newVersion;
|
|
167960
167699
|
if (!version2) {
|
|
@@ -168075,12 +167814,11 @@ async function runCustomPreReleaseCommand(oldVersion, newVersion, preReleaseComm
|
|
|
168075
167814
|
}
|
|
168076
167815
|
args = [...args, nonEmptyOldVersion, newVersion];
|
|
168077
167816
|
logger.info("Running the pre-release command...");
|
|
168078
|
-
const additionalEnv = {
|
|
168079
|
-
CRAFT_NEW_VERSION: newVersion,
|
|
168080
|
-
CRAFT_OLD_VERSION: nonEmptyOldVersion
|
|
168081
|
-
};
|
|
168082
167817
|
await spawnProcess(sysCommand, args, {
|
|
168083
|
-
env: {
|
|
167818
|
+
env: buildReleaseCommandEnv({
|
|
167819
|
+
CRAFT_NEW_VERSION: newVersion,
|
|
167820
|
+
CRAFT_OLD_VERSION: nonEmptyOldVersion
|
|
167821
|
+
})
|
|
168084
167822
|
});
|
|
168085
167823
|
return true;
|
|
168086
167824
|
}
|
|
@@ -168144,12 +167882,12 @@ async function prepareChangelog(git, oldVersion, newVersion, changelogPolicy = "
|
|
|
168144
167882
|
}
|
|
168145
167883
|
logger.info("Checking the changelog...");
|
|
168146
167884
|
logger.debug(`Changelog policy: "${changelogPolicy}".`);
|
|
168147
|
-
const relativePath = (0,
|
|
167885
|
+
const relativePath = (0, import_path29.relative)("", changelogPath);
|
|
168148
167886
|
logger.debug(`Changelog path: ${relativePath}`);
|
|
168149
167887
|
if (relativePath.startsWith(".")) {
|
|
168150
167888
|
throw new ConfigurationError(`Invalid changelog path: "${changelogPath}"`);
|
|
168151
167889
|
}
|
|
168152
|
-
if (!(0,
|
|
167890
|
+
if (!(0, import_fs29.existsSync)(relativePath)) {
|
|
168153
167891
|
if (changelogPolicy === "auto" /* Auto */) {
|
|
168154
167892
|
logger.info(`Creating changelog file: ${relativePath}`);
|
|
168155
167893
|
await safeFs.writeFile(relativePath, "# Changelog\n");
|
|
@@ -168159,7 +167897,7 @@ async function prepareChangelog(git, oldVersion, newVersion, changelogPolicy = "
|
|
|
168159
167897
|
);
|
|
168160
167898
|
}
|
|
168161
167899
|
}
|
|
168162
|
-
let changelogString = (await
|
|
167900
|
+
let changelogString = (await import_fs29.promises.readFile(relativePath)).toString();
|
|
168163
167901
|
let changeset = findChangeset(
|
|
168164
167902
|
changelogString,
|
|
168165
167903
|
newVersion,
|
|
@@ -168294,7 +168032,10 @@ async function resolveVersion(git, options) {
|
|
|
168294
168032
|
async function prepareMain(argv) {
|
|
168295
168033
|
let git = await getGitClient();
|
|
168296
168034
|
if (argv.configFrom) {
|
|
168297
|
-
|
|
168035
|
+
assertRemoteConfigAllowed(argv.configFrom, argv.allowRemoteConfig);
|
|
168036
|
+
logger.warn(
|
|
168037
|
+
`Loading configuration from remote branch "${argv.configFrom}" (opted in via --allow-remote-config). Ensure this branch is trusted \u2014 its .craft.yml will configure commands Craft will execute.`
|
|
168038
|
+
);
|
|
168298
168039
|
try {
|
|
168299
168040
|
await git.fetch([argv.remote, argv.configFrom]);
|
|
168300
168041
|
const configContent = await git.show([
|
|
@@ -168350,7 +168091,7 @@ async function prepareMain(argv) {
|
|
|
168350
168091
|
changelogPath
|
|
168351
168092
|
);
|
|
168352
168093
|
if (changelogBody) {
|
|
168353
|
-
const resolvedChangelogPath = (0,
|
|
168094
|
+
const resolvedChangelogPath = (0, import_path29.relative)(
|
|
168354
168095
|
"",
|
|
168355
168096
|
changelogPath || DEFAULT_CHANGELOG_PATH
|
|
168356
168097
|
);
|
|
@@ -168488,8 +168229,8 @@ init_import_meta_url();
|
|
|
168488
168229
|
init_logger2();
|
|
168489
168230
|
init_config2();
|
|
168490
168231
|
init_errors2();
|
|
168491
|
-
var
|
|
168492
|
-
var
|
|
168232
|
+
var import_path30 = require("path");
|
|
168233
|
+
var import_fs30 = require("fs");
|
|
168493
168234
|
init_none();
|
|
168494
168235
|
var mkdirp = require_mkdirp();
|
|
168495
168236
|
var command6 = ["download [NAME..]"];
|
|
@@ -168511,9 +168252,9 @@ var builder3 = (yargs) => yargs.positional("NAME", {
|
|
|
168511
168252
|
});
|
|
168512
168253
|
async function prepareOutputDirectory(argv) {
|
|
168513
168254
|
if (argv.directory) {
|
|
168514
|
-
const fullPath = (0,
|
|
168515
|
-
if ((0,
|
|
168516
|
-
if ((0,
|
|
168255
|
+
const fullPath = (0, import_path30.resolve)(argv.directory);
|
|
168256
|
+
if ((0, import_fs30.existsSync)(fullPath)) {
|
|
168257
|
+
if ((0, import_fs30.lstatSync)(fullPath).isDirectory()) {
|
|
168517
168258
|
return fullPath;
|
|
168518
168259
|
} else {
|
|
168519
168260
|
throw new ConfigurationError(`Not a directory: ${fullPath}`);
|
|
@@ -168524,7 +168265,7 @@ async function prepareOutputDirectory(argv) {
|
|
|
168524
168265
|
return fullPath;
|
|
168525
168266
|
}
|
|
168526
168267
|
} else {
|
|
168527
|
-
return (0,
|
|
168268
|
+
return (0, import_path30.resolve)(process.cwd());
|
|
168528
168269
|
}
|
|
168529
168270
|
}
|
|
168530
168271
|
async function handlerMain(argv) {
|
|
@@ -168756,8 +168497,9 @@ function fixGlobalBooleanFlags(argv) {
|
|
|
168756
168497
|
return result;
|
|
168757
168498
|
}
|
|
168758
168499
|
async function main() {
|
|
168500
|
+
sanitizeDynamicLinkerEnv();
|
|
168759
168501
|
printVersion();
|
|
168760
|
-
|
|
168502
|
+
warnIfCraftEnvFileExists();
|
|
168761
168503
|
const argv = fixGlobalBooleanFlags(process.argv.slice(2));
|
|
168762
168504
|
await yargs_default().parserConfiguration({
|
|
168763
168505
|
"boolean-negation": false
|