@sentry/craft 3.2.0 → 3.3.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 +174 -76
- package/package.json +1 -1
package/dist/craft
CHANGED
|
@@ -42537,7 +42537,7 @@ var init_esm11 = __esm({
|
|
|
42537
42537
|
*
|
|
42538
42538
|
* @internal
|
|
42539
42539
|
*/
|
|
42540
|
-
constructor(cwd = process.cwd(), pathImpl,
|
|
42540
|
+
constructor(cwd = process.cwd(), pathImpl, sep6, { nocase, childrenCacheSize = 16 * 1024, fs: fs16 = defaultFS } = {}) {
|
|
42541
42541
|
this.#fs = fsFromOption(fs16);
|
|
42542
42542
|
if (cwd instanceof URL || cwd.startsWith("file://")) {
|
|
42543
42543
|
cwd = (0, import_node_url5.fileURLToPath)(cwd);
|
|
@@ -42548,7 +42548,7 @@ var init_esm11 = __esm({
|
|
|
42548
42548
|
this.#resolveCache = new ResolveCache();
|
|
42549
42549
|
this.#resolvePosixCache = new ResolveCache();
|
|
42550
42550
|
this.#children = new ChildrenCache(childrenCacheSize);
|
|
42551
|
-
const split2 = cwdPath.substring(this.rootPath.length).split(
|
|
42551
|
+
const split2 = cwdPath.substring(this.rootPath.length).split(sep6);
|
|
42552
42552
|
if (split2.length === 1 && !split2[0]) {
|
|
42553
42553
|
split2.pop();
|
|
42554
42554
|
}
|
|
@@ -44268,10 +44268,10 @@ var init_ignore = __esm({
|
|
|
44268
44268
|
ignored(p8) {
|
|
44269
44269
|
const fullpath = p8.fullpath();
|
|
44270
44270
|
const fullpaths = `${fullpath}/`;
|
|
44271
|
-
const
|
|
44272
|
-
const relatives = `${
|
|
44271
|
+
const relative7 = p8.relative() || ".";
|
|
44272
|
+
const relatives = `${relative7}/`;
|
|
44273
44273
|
for (const m10 of this.relative) {
|
|
44274
|
-
if (m10.match(
|
|
44274
|
+
if (m10.match(relative7) || m10.match(relatives))
|
|
44275
44275
|
return true;
|
|
44276
44276
|
}
|
|
44277
44277
|
for (const m10 of this.absolute) {
|
|
@@ -44282,9 +44282,9 @@ var init_ignore = __esm({
|
|
|
44282
44282
|
}
|
|
44283
44283
|
childrenIgnored(p8) {
|
|
44284
44284
|
const fullpath = p8.fullpath() + "/";
|
|
44285
|
-
const
|
|
44285
|
+
const relative7 = (p8.relative() || ".") + "/";
|
|
44286
44286
|
for (const m10 of this.relativeChildren) {
|
|
44287
|
-
if (m10.match(
|
|
44287
|
+
if (m10.match(relative7))
|
|
44288
44288
|
return true;
|
|
44289
44289
|
}
|
|
44290
44290
|
for (const m10 of this.absoluteChildren) {
|
|
@@ -57537,9 +57537,9 @@ var require_prompts = __commonJS({
|
|
|
57537
57537
|
$5.date = (args) => toPrompt("DatePrompt", args);
|
|
57538
57538
|
$5.confirm = (args) => toPrompt("ConfirmPrompt", args);
|
|
57539
57539
|
$5.list = (args) => {
|
|
57540
|
-
const
|
|
57540
|
+
const sep6 = args.separator || ",";
|
|
57541
57541
|
return toPrompt("TextPrompt", args, {
|
|
57542
|
-
onSubmit: (str2) => str2.split(
|
|
57542
|
+
onSubmit: (str2) => str2.split(sep6).map((s8) => s8.trim())
|
|
57543
57543
|
});
|
|
57544
57544
|
};
|
|
57545
57545
|
$5.toggle = (args) => toPrompt("TogglePrompt", args);
|
|
@@ -59857,9 +59857,9 @@ var require_prompts2 = __commonJS({
|
|
|
59857
59857
|
$5.date = (args) => toPrompt("DatePrompt", args);
|
|
59858
59858
|
$5.confirm = (args) => toPrompt("ConfirmPrompt", args);
|
|
59859
59859
|
$5.list = (args) => {
|
|
59860
|
-
const
|
|
59860
|
+
const sep6 = args.separator || ",";
|
|
59861
59861
|
return toPrompt("TextPrompt", args, {
|
|
59862
|
-
onSubmit: (str2) => str2.split(
|
|
59862
|
+
onSubmit: (str2) => str2.split(sep6).map((s8) => s8.trim())
|
|
59863
59863
|
});
|
|
59864
59864
|
};
|
|
59865
59865
|
$5.toggle = (args) => toPrompt("TogglePrompt", args);
|
|
@@ -61050,13 +61050,13 @@ async function getChangesSince(git, rev, until) {
|
|
|
61050
61050
|
const discovered = await discoverWorkspaces(root);
|
|
61051
61051
|
const ownedPaths = new Set(getWorkspaceNames());
|
|
61052
61052
|
for (const pkg of discovered.packages) {
|
|
61053
|
-
const
|
|
61054
|
-
if (
|
|
61053
|
+
const relative7 = import_node_path13.default.relative(root, pkg.location).split(import_node_path13.default.sep).join("/");
|
|
61054
|
+
if (relative7 === "" || relative7 === ".." || relative7.startsWith("../")) {
|
|
61055
61055
|
throw new ConfigurationError(
|
|
61056
61056
|
`Workspace package is outside the repository: ${pkg.name}`
|
|
61057
61057
|
);
|
|
61058
61058
|
}
|
|
61059
|
-
ownedPaths.add(
|
|
61059
|
+
ownedPaths.add(relative7);
|
|
61060
61060
|
}
|
|
61061
61061
|
const orderedOwners = [...ownedPaths].sort(
|
|
61062
61062
|
(left2, right2) => right2.length - left2.length
|
|
@@ -109186,21 +109186,21 @@ var init_Matcher = __esm({
|
|
|
109186
109186
|
* @returns {string}
|
|
109187
109187
|
*/
|
|
109188
109188
|
toString(separator, includeNamespace = true) {
|
|
109189
|
-
const
|
|
109190
|
-
const isDefault =
|
|
109189
|
+
const sep6 = separator || this.separator;
|
|
109190
|
+
const isDefault = sep6 === this.separator && includeNamespace === true;
|
|
109191
109191
|
if (isDefault) {
|
|
109192
109192
|
if (this._pathStringCache !== null) {
|
|
109193
109193
|
return this._pathStringCache;
|
|
109194
109194
|
}
|
|
109195
109195
|
const result = this.path.map(
|
|
109196
109196
|
(n5) => n5.namespace ? `${n5.namespace}:${n5.tag}` : n5.tag
|
|
109197
|
-
).join(
|
|
109197
|
+
).join(sep6);
|
|
109198
109198
|
this._pathStringCache = result;
|
|
109199
109199
|
return result;
|
|
109200
109200
|
}
|
|
109201
109201
|
return this.path.map(
|
|
109202
109202
|
(n5) => includeNamespace && n5.namespace ? `${n5.namespace}:${n5.tag}` : n5.tag
|
|
109203
|
-
).join(
|
|
109203
|
+
).join(sep6);
|
|
109204
109204
|
}
|
|
109205
109205
|
/**
|
|
109206
109206
|
* Get path as array of tag names.
|
|
@@ -124418,8 +124418,12 @@ var init_nuget = __esm({
|
|
|
124418
124418
|
nugetConfig;
|
|
124419
124419
|
/**
|
|
124420
124420
|
* Expand a nuget target config into multiple targets if workspaces is enabled.
|
|
124421
|
+
*
|
|
124422
|
+
* The solution is always resolved from `rootDir` (the repository root), so
|
|
124423
|
+
* `solutionPath` keeps its meaning. When a release workspace is selected,
|
|
124424
|
+
* `releaseUnitDir` is its directory and only projects inside it are kept.
|
|
124421
124425
|
*/
|
|
124422
|
-
static async expand(config, rootDir) {
|
|
124426
|
+
static async expand(config, rootDir, releaseUnitDir = rootDir) {
|
|
124423
124427
|
if (!config.workspaces) {
|
|
124424
124428
|
return [config];
|
|
124425
124429
|
}
|
|
@@ -124429,7 +124433,17 @@ var init_nuget = __esm({
|
|
|
124429
124433
|
"nuget target has workspaces enabled but no packable projects were found" + (result ? ` in ${result.solutionPath}` : "") + '. Check that the solution file exists and lists your projects, or set "solutionPath".'
|
|
124430
124434
|
);
|
|
124431
124435
|
}
|
|
124432
|
-
const
|
|
124436
|
+
const releaseUnitPath = (0, import_path15.relative)(rootDir, releaseUnitDir);
|
|
124437
|
+
const discoveredPackages = releaseUnitPath ? result.packages.filter((pkg) => {
|
|
124438
|
+
const projectPath = (0, import_path15.relative)(releaseUnitDir, pkg.projectPath);
|
|
124439
|
+
return projectPath !== ".." && !projectPath.startsWith(`..${import_path15.sep}`) && !(0, import_path15.isAbsolute)(projectPath);
|
|
124440
|
+
}) : result.packages;
|
|
124441
|
+
if (discoveredPackages.length === 0) {
|
|
124442
|
+
throw new ConfigurationError(
|
|
124443
|
+
`nuget target has workspaces enabled but none of the packable projects in ${result.solutionPath} are inside the selected workspace "${releaseUnitPath}".`
|
|
124444
|
+
);
|
|
124445
|
+
}
|
|
124446
|
+
const workspacePackages = discoveredPackages.map((pkg) => ({
|
|
124433
124447
|
name: pkg.packageId,
|
|
124434
124448
|
location: pkg.projectPath,
|
|
124435
124449
|
private: !pkg.isPackable,
|
|
@@ -124455,7 +124469,7 @@ var init_nuget = __esm({
|
|
|
124455
124469
|
);
|
|
124456
124470
|
}
|
|
124457
124471
|
const filteredNames = new Set(filteredWorkspacePackages.map((p8) => p8.name));
|
|
124458
|
-
const filteredPackages =
|
|
124472
|
+
const filteredPackages = discoveredPackages.filter(
|
|
124459
124473
|
(p8) => filteredNames.has(p8.packageId)
|
|
124460
124474
|
);
|
|
124461
124475
|
const sortedPackages = sortDotnetPackages(filteredPackages);
|
|
@@ -142784,12 +142798,12 @@ var require_fromHttp = __commonJS({
|
|
|
142784
142798
|
var fromHttp = (options = {}) => {
|
|
142785
142799
|
options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");
|
|
142786
142800
|
let host;
|
|
142787
|
-
const
|
|
142801
|
+
const relative7 = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];
|
|
142788
142802
|
const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];
|
|
142789
142803
|
const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];
|
|
142790
142804
|
const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];
|
|
142791
142805
|
const warn3 = options.logger?.constructor?.name === "NoOpLogger" || !options.logger?.warn ? console.warn : options.logger.warn.bind(options.logger);
|
|
142792
|
-
if (
|
|
142806
|
+
if (relative7 && full) {
|
|
142793
142807
|
warn3("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.");
|
|
142794
142808
|
warn3("awsContainerCredentialsFullUri will take precedence.");
|
|
142795
142809
|
}
|
|
@@ -142799,8 +142813,8 @@ var require_fromHttp = __commonJS({
|
|
|
142799
142813
|
}
|
|
142800
142814
|
if (full) {
|
|
142801
142815
|
host = full;
|
|
142802
|
-
} else if (
|
|
142803
|
-
host = `${DEFAULT_LINK_LOCAL_HOST}${
|
|
142816
|
+
} else if (relative7) {
|
|
142817
|
+
host = `${DEFAULT_LINK_LOCAL_HOST}${relative7}`;
|
|
142804
142818
|
} else {
|
|
142805
142819
|
throw new property_provider_1.CredentialsProviderError(`No HTTP credential provider host provided.
|
|
142806
142820
|
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger });
|
|
@@ -160593,10 +160607,10 @@ var require_symlink = __commonJS({
|
|
|
160593
160607
|
pathExists(dstpath, (err, destinationExists) => {
|
|
160594
160608
|
if (err) return callback(err);
|
|
160595
160609
|
if (destinationExists) return callback(null);
|
|
160596
|
-
symlinkPaths(srcpath, dstpath, (err2,
|
|
160610
|
+
symlinkPaths(srcpath, dstpath, (err2, relative7) => {
|
|
160597
160611
|
if (err2) return callback(err2);
|
|
160598
|
-
srcpath =
|
|
160599
|
-
symlinkType(
|
|
160612
|
+
srcpath = relative7.toDst;
|
|
160613
|
+
symlinkType(relative7.toCwd, type2, (err3, type3) => {
|
|
160600
160614
|
if (err3) return callback(err3);
|
|
160601
160615
|
const dir = path20.dirname(dstpath);
|
|
160602
160616
|
pathExists(dir, (err4, dirExists) => {
|
|
@@ -160614,9 +160628,9 @@ var require_symlink = __commonJS({
|
|
|
160614
160628
|
function createSymlinkSync(srcpath, dstpath, type2) {
|
|
160615
160629
|
const destinationExists = fs16.existsSync(dstpath);
|
|
160616
160630
|
if (destinationExists) return void 0;
|
|
160617
|
-
const
|
|
160618
|
-
srcpath =
|
|
160619
|
-
type2 = symlinkTypeSync(
|
|
160631
|
+
const relative7 = symlinkPathsSync(srcpath, dstpath);
|
|
160632
|
+
srcpath = relative7.toDst;
|
|
160633
|
+
type2 = symlinkTypeSync(relative7.toCwd, type2);
|
|
160620
160634
|
const dir = path20.dirname(dstpath);
|
|
160621
160635
|
const exists = fs16.existsSync(dir);
|
|
160622
160636
|
if (exists) return fs16.symlinkSync(srcpath, dstpath, type2);
|
|
@@ -168682,10 +168696,10 @@ var require_symlink2 = __commonJS({
|
|
|
168682
168696
|
});
|
|
168683
168697
|
}
|
|
168684
168698
|
function _createSymlink(srcpath, dstpath, type2, callback) {
|
|
168685
|
-
symlinkPaths(srcpath, dstpath, (err,
|
|
168699
|
+
symlinkPaths(srcpath, dstpath, (err, relative7) => {
|
|
168686
168700
|
if (err) return callback(err);
|
|
168687
|
-
srcpath =
|
|
168688
|
-
symlinkType(
|
|
168701
|
+
srcpath = relative7.toDst;
|
|
168702
|
+
symlinkType(relative7.toCwd, type2, (err2, type3) => {
|
|
168689
168703
|
if (err2) return callback(err2);
|
|
168690
168704
|
const dir = path20.dirname(dstpath);
|
|
168691
168705
|
pathExists(dir, (err3, dirExists) => {
|
|
@@ -168710,9 +168724,9 @@ var require_symlink2 = __commonJS({
|
|
|
168710
168724
|
const dstStat = fs16.statSync(dstpath);
|
|
168711
168725
|
if (areIdentical(srcStat, dstStat)) return;
|
|
168712
168726
|
}
|
|
168713
|
-
const
|
|
168714
|
-
srcpath =
|
|
168715
|
-
type2 = symlinkTypeSync(
|
|
168727
|
+
const relative7 = symlinkPathsSync(srcpath, dstpath);
|
|
168728
|
+
srcpath = relative7.toDst;
|
|
168729
|
+
type2 = symlinkTypeSync(relative7.toCwd, type2);
|
|
168716
168730
|
const dir = path20.dirname(dstpath);
|
|
168717
168731
|
const exists = fs16.existsSync(dir);
|
|
168718
168732
|
if (exists) return fs16.symlinkSync(srcpath, dstpath, type2);
|
|
@@ -184664,7 +184678,7 @@ var require_dist12 = __commonJS({
|
|
|
184664
184678
|
var fs122 = require("fs");
|
|
184665
184679
|
var path82 = require("path");
|
|
184666
184680
|
var minimatch3 = require_minimatch2();
|
|
184667
|
-
var
|
|
184681
|
+
var isAbsolute7 = require("path").isAbsolute;
|
|
184668
184682
|
var Minimatch2 = minimatch3.Minimatch;
|
|
184669
184683
|
function alphasort(a5, b9) {
|
|
184670
184684
|
return a5.localeCompare(b9, "en");
|
|
@@ -184732,7 +184746,7 @@ var require_dist12 = __commonJS({
|
|
|
184732
184746
|
}
|
|
184733
184747
|
self2.root = options.root || path82.resolve(self2.cwd, "/");
|
|
184734
184748
|
self2.root = path82.resolve(self2.root);
|
|
184735
|
-
self2.cwdAbs =
|
|
184749
|
+
self2.cwdAbs = isAbsolute7(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd);
|
|
184736
184750
|
self2.nomount = !!options.nomount;
|
|
184737
184751
|
if (process.platform === "win32") {
|
|
184738
184752
|
self2.root = self2.root.replace(/\\/g, "/");
|
|
@@ -184815,7 +184829,7 @@ var require_dist12 = __commonJS({
|
|
|
184815
184829
|
var abs = f8;
|
|
184816
184830
|
if (f8.charAt(0) === "/") {
|
|
184817
184831
|
abs = path82.join(self2.root, f8);
|
|
184818
|
-
} else if (
|
|
184832
|
+
} else if (isAbsolute7(f8) || f8 === "") {
|
|
184819
184833
|
abs = f8;
|
|
184820
184834
|
} else if (self2.changedCwd) {
|
|
184821
184835
|
abs = path82.resolve(self2.cwd, f8);
|
|
@@ -184853,7 +184867,7 @@ var require_dist12 = __commonJS({
|
|
|
184853
184867
|
var util5 = require("util");
|
|
184854
184868
|
var path82 = require("path");
|
|
184855
184869
|
var assert7 = require("assert");
|
|
184856
|
-
var
|
|
184870
|
+
var isAbsolute7 = require("path").isAbsolute;
|
|
184857
184871
|
var common3 = require_common6();
|
|
184858
184872
|
var setopts = common3.setopts;
|
|
184859
184873
|
var ownProp = common3.ownProp;
|
|
@@ -184925,10 +184939,10 @@ var require_dist12 = __commonJS({
|
|
|
184925
184939
|
var read;
|
|
184926
184940
|
if (prefix === null)
|
|
184927
184941
|
read = ".";
|
|
184928
|
-
else if (
|
|
184942
|
+
else if (isAbsolute7(prefix) || isAbsolute7(pattern.map(function(p8) {
|
|
184929
184943
|
return typeof p8 === "string" ? p8 : "[*]";
|
|
184930
184944
|
}).join("/"))) {
|
|
184931
|
-
if (!prefix || !
|
|
184945
|
+
if (!prefix || !isAbsolute7(prefix))
|
|
184932
184946
|
prefix = "/" + prefix;
|
|
184933
184947
|
read = prefix;
|
|
184934
184948
|
} else
|
|
@@ -185125,7 +185139,7 @@ var require_dist12 = __commonJS({
|
|
|
185125
185139
|
this.matches[index] = /* @__PURE__ */ Object.create(null);
|
|
185126
185140
|
if (!exists)
|
|
185127
185141
|
return;
|
|
185128
|
-
if (prefix &&
|
|
185142
|
+
if (prefix && isAbsolute7(prefix) && !this.nomount) {
|
|
185129
185143
|
var trail = /[\/\\]$/.test(prefix);
|
|
185130
185144
|
if (prefix.charAt(0) === "/") {
|
|
185131
185145
|
prefix = path82.join(this.root, prefix);
|
|
@@ -185247,7 +185261,7 @@ var require_dist12 = __commonJS({
|
|
|
185247
185261
|
var EE = require("events").EventEmitter;
|
|
185248
185262
|
var path82 = require("path");
|
|
185249
185263
|
var assert7 = require("assert");
|
|
185250
|
-
var
|
|
185264
|
+
var isAbsolute7 = require("path").isAbsolute;
|
|
185251
185265
|
var globSync2 = require_sync7();
|
|
185252
185266
|
var common3 = require_common6();
|
|
185253
185267
|
var setopts = common3.setopts;
|
|
@@ -185469,10 +185483,10 @@ var require_dist12 = __commonJS({
|
|
|
185469
185483
|
var read;
|
|
185470
185484
|
if (prefix === null)
|
|
185471
185485
|
read = ".";
|
|
185472
|
-
else if (
|
|
185486
|
+
else if (isAbsolute7(prefix) || isAbsolute7(pattern.map(function(p8) {
|
|
185473
185487
|
return typeof p8 === "string" ? p8 : "[*]";
|
|
185474
185488
|
}).join("/"))) {
|
|
185475
|
-
if (!prefix || !
|
|
185489
|
+
if (!prefix || !isAbsolute7(prefix))
|
|
185476
185490
|
prefix = "/" + prefix;
|
|
185477
185491
|
read = prefix;
|
|
185478
185492
|
} else
|
|
@@ -185557,7 +185571,7 @@ var require_dist12 = __commonJS({
|
|
|
185557
185571
|
this._emitQueue.push([index, e5]);
|
|
185558
185572
|
return;
|
|
185559
185573
|
}
|
|
185560
|
-
var abs =
|
|
185574
|
+
var abs = isAbsolute7(e5) ? e5 : this._makeAbs(e5);
|
|
185561
185575
|
if (this.mark)
|
|
185562
185576
|
e5 = this._mark(e5);
|
|
185563
185577
|
if (this.absolute)
|
|
@@ -185712,7 +185726,7 @@ var require_dist12 = __commonJS({
|
|
|
185712
185726
|
this.matches[index] = /* @__PURE__ */ Object.create(null);
|
|
185713
185727
|
if (!exists)
|
|
185714
185728
|
return cb();
|
|
185715
|
-
if (prefix &&
|
|
185729
|
+
if (prefix && isAbsolute7(prefix) && !this.nomount) {
|
|
185716
185730
|
var trail = /[\/\\]$/.test(prefix);
|
|
185717
185731
|
if (prefix.charAt(0) === "/") {
|
|
185718
185732
|
prefix = path82.join(this.root, prefix);
|
|
@@ -209079,7 +209093,7 @@ ${codeblock}`, options);
|
|
|
209079
209093
|
ptr++;
|
|
209080
209094
|
return banComments || c7 !== "#" ? ptr : skipVoid(str2, skipComment(str2, ptr), banNewLines);
|
|
209081
209095
|
}
|
|
209082
|
-
function skipUntil(str2, ptr,
|
|
209096
|
+
function skipUntil(str2, ptr, sep6, end, banNewLines = false) {
|
|
209083
209097
|
if (!end) {
|
|
209084
209098
|
ptr = indexOfNewline(str2, ptr);
|
|
209085
209099
|
return ptr < 0 ? str2.length : ptr;
|
|
@@ -209088,7 +209102,7 @@ ${codeblock}`, options);
|
|
|
209088
209102
|
let c7 = str2[i5];
|
|
209089
209103
|
if (c7 === "#") {
|
|
209090
209104
|
i5 = indexOfNewline(str2, i5);
|
|
209091
|
-
} else if (c7 ===
|
|
209105
|
+
} else if (c7 === sep6) {
|
|
209092
209106
|
return i5 + 1;
|
|
209093
209107
|
} else if (c7 === end || banNewLines && (c7 === "\n" || c7 === "\r" && str2[i5 + 1] === "\n")) {
|
|
209094
209108
|
return i5;
|
|
@@ -214446,15 +214460,15 @@ function getLocation(text, position) {
|
|
|
214446
214460
|
throw earlyReturnException;
|
|
214447
214461
|
}
|
|
214448
214462
|
},
|
|
214449
|
-
onSeparator: (
|
|
214463
|
+
onSeparator: (sep6, offset, length) => {
|
|
214450
214464
|
if (position <= offset) {
|
|
214451
214465
|
throw earlyReturnException;
|
|
214452
214466
|
}
|
|
214453
|
-
if (
|
|
214467
|
+
if (sep6 === ":" && previousNode && previousNode.type === "property") {
|
|
214454
214468
|
previousNode.colonOffset = offset;
|
|
214455
214469
|
isAtPropertyKey = false;
|
|
214456
214470
|
previousNode = void 0;
|
|
214457
|
-
} else if (
|
|
214471
|
+
} else if (sep6 === ",") {
|
|
214458
214472
|
const last = segments[segments.length - 1];
|
|
214459
214473
|
if (typeof last === "number") {
|
|
214460
214474
|
segments[segments.length - 1] = last + 1;
|
|
@@ -214569,11 +214583,11 @@ function parseTree(text, errors = [], options = ParseOptions.DEFAULT) {
|
|
|
214569
214583
|
onValue({ type: getNodeType(value), offset, length, parent: currentParent, value });
|
|
214570
214584
|
ensurePropertyComplete(offset + length);
|
|
214571
214585
|
},
|
|
214572
|
-
onSeparator: (
|
|
214586
|
+
onSeparator: (sep6, offset, length) => {
|
|
214573
214587
|
if (currentParent.type === "property") {
|
|
214574
|
-
if (
|
|
214588
|
+
if (sep6 === ":") {
|
|
214575
214589
|
currentParent.colonOffset = offset;
|
|
214576
|
-
} else if (
|
|
214590
|
+
} else if (sep6 === ",") {
|
|
214577
214591
|
ensurePropertyComplete(offset);
|
|
214578
214592
|
}
|
|
214579
214593
|
}
|
|
@@ -218796,21 +218810,21 @@ var require_pattern = __commonJS({
|
|
|
218796
218810
|
exports2.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
218797
218811
|
function partitionAbsoluteAndRelative(patterns) {
|
|
218798
218812
|
const absolute = [];
|
|
218799
|
-
const
|
|
218813
|
+
const relative7 = [];
|
|
218800
218814
|
for (const pattern of patterns) {
|
|
218801
|
-
if (
|
|
218815
|
+
if (isAbsolute7(pattern)) {
|
|
218802
218816
|
absolute.push(pattern);
|
|
218803
218817
|
} else {
|
|
218804
|
-
|
|
218818
|
+
relative7.push(pattern);
|
|
218805
218819
|
}
|
|
218806
218820
|
}
|
|
218807
|
-
return [absolute,
|
|
218821
|
+
return [absolute, relative7];
|
|
218808
218822
|
}
|
|
218809
218823
|
exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
218810
|
-
function
|
|
218824
|
+
function isAbsolute7(pattern) {
|
|
218811
218825
|
return path20.isAbsolute(pattern);
|
|
218812
218826
|
}
|
|
218813
|
-
exports2.isAbsolute =
|
|
218827
|
+
exports2.isAbsolute = isAbsolute7;
|
|
218814
218828
|
}
|
|
218815
218829
|
});
|
|
218816
218830
|
|
|
@@ -229139,7 +229153,68 @@ function resolveWorkspaceConfig(base, workspaceName, workspaceDirectory) {
|
|
|
229139
229153
|
resolved[key] = value;
|
|
229140
229154
|
}
|
|
229141
229155
|
}
|
|
229142
|
-
return
|
|
229156
|
+
return expandWorkspacePlaceholders(
|
|
229157
|
+
resolved,
|
|
229158
|
+
getWorkspacePlaceholderResolver(workspaceName, workspaceDirectory)
|
|
229159
|
+
);
|
|
229160
|
+
}
|
|
229161
|
+
function getWorkspacePlaceholderResolver(workspaceName, workspaceDirectory) {
|
|
229162
|
+
let packageName;
|
|
229163
|
+
const readPackageName = (placeholder) => {
|
|
229164
|
+
if (packageName !== void 0) {
|
|
229165
|
+
return packageName;
|
|
229166
|
+
}
|
|
229167
|
+
const packageJsonPath = import_path24.default.posix.join(workspaceName, "package.json");
|
|
229168
|
+
let name;
|
|
229169
|
+
try {
|
|
229170
|
+
name = JSON.parse(
|
|
229171
|
+
(0, import_fs26.readFileSync)(import_path24.default.join(workspaceDirectory, packageJsonPath), "utf-8")
|
|
229172
|
+
)?.name;
|
|
229173
|
+
} catch (error3) {
|
|
229174
|
+
throw new ConfigurationError(
|
|
229175
|
+
`Workspace "${workspaceName}" uses {{${placeholder}}}, but ${packageJsonPath} could not be read: ${error3.message}`
|
|
229176
|
+
);
|
|
229177
|
+
}
|
|
229178
|
+
if (typeof name !== "string" || name === "") {
|
|
229179
|
+
throw new ConfigurationError(
|
|
229180
|
+
`Workspace "${workspaceName}" uses {{${placeholder}}}, but ${packageJsonPath} has no "name".`
|
|
229181
|
+
);
|
|
229182
|
+
}
|
|
229183
|
+
packageName = name;
|
|
229184
|
+
return name;
|
|
229185
|
+
};
|
|
229186
|
+
return (placeholder) => {
|
|
229187
|
+
switch (placeholder) {
|
|
229188
|
+
case "workspace":
|
|
229189
|
+
return workspaceName;
|
|
229190
|
+
case "workspaceName":
|
|
229191
|
+
return import_path24.default.posix.basename(workspaceName);
|
|
229192
|
+
case "packageName":
|
|
229193
|
+
return readPackageName(placeholder);
|
|
229194
|
+
case "packageSimpleName":
|
|
229195
|
+
return readPackageName(placeholder).replace(/^@/, "").replace(/\//g, "-");
|
|
229196
|
+
}
|
|
229197
|
+
};
|
|
229198
|
+
}
|
|
229199
|
+
function expandWorkspacePlaceholders(value, resolve10) {
|
|
229200
|
+
if (typeof value === "string") {
|
|
229201
|
+
return value.replace(
|
|
229202
|
+
WORKSPACE_PLACEHOLDER_REGEX,
|
|
229203
|
+
(_match, placeholder) => resolve10(placeholder)
|
|
229204
|
+
);
|
|
229205
|
+
}
|
|
229206
|
+
if (Array.isArray(value)) {
|
|
229207
|
+
return value.map((item) => expandWorkspacePlaceholders(item, resolve10));
|
|
229208
|
+
}
|
|
229209
|
+
if (value !== null && typeof value === "object" && Object.getPrototypeOf(value) === Object.prototype) {
|
|
229210
|
+
return Object.fromEntries(
|
|
229211
|
+
Object.entries(value).map(([key, item]) => [
|
|
229212
|
+
key,
|
|
229213
|
+
expandWorkspacePlaceholders(item, resolve10)
|
|
229214
|
+
])
|
|
229215
|
+
);
|
|
229216
|
+
}
|
|
229217
|
+
return value;
|
|
229143
229218
|
}
|
|
229144
229219
|
function getWorkspaceConfig(workspaces, workspaceName, workspaceDirectory) {
|
|
229145
229220
|
if (isWorkspacePattern(workspaceName)) {
|
|
@@ -229605,10 +229680,10 @@ async function getStatusProviderFromConfig() {
|
|
|
229605
229680
|
}
|
|
229606
229681
|
}
|
|
229607
229682
|
}
|
|
229608
|
-
function
|
|
229683
|
+
function getActiveWorkspaceDirectory() {
|
|
229609
229684
|
const workspace = getActiveWorkspace();
|
|
229610
229685
|
if (!workspace) {
|
|
229611
|
-
return
|
|
229686
|
+
return void 0;
|
|
229612
229687
|
}
|
|
229613
229688
|
if (!isSafeWorkspacePath(workspace)) {
|
|
229614
229689
|
throw new ConfigurationError(`Invalid workspace path: "${workspace}"`);
|
|
@@ -229616,7 +229691,7 @@ function getDefaultChangelogFilePath() {
|
|
|
229616
229691
|
const root = getConfigFileDir() || process.cwd();
|
|
229617
229692
|
const directory = import_path24.default.resolve(root, workspace);
|
|
229618
229693
|
if (!(0, import_fs26.existsSync)(directory) || !(0, import_fs26.lstatSync)(directory).isDirectory()) {
|
|
229619
|
-
return
|
|
229694
|
+
return void 0;
|
|
229620
229695
|
}
|
|
229621
229696
|
const realRoot = (0, import_fs26.realpathSync)(root);
|
|
229622
229697
|
const realDirectory = (0, import_fs26.realpathSync)(directory);
|
|
@@ -229625,7 +229700,16 @@ function getDefaultChangelogFilePath() {
|
|
|
229625
229700
|
`Workspace directory escapes the repository: "${workspace}"`
|
|
229626
229701
|
);
|
|
229627
229702
|
}
|
|
229628
|
-
return
|
|
229703
|
+
return workspace;
|
|
229704
|
+
}
|
|
229705
|
+
function getReleaseUnitDir() {
|
|
229706
|
+
const root = getConfigFileDir() || process.cwd();
|
|
229707
|
+
const workspaceDirectory = getActiveWorkspaceDirectory();
|
|
229708
|
+
return workspaceDirectory ? import_path24.default.resolve(root, workspaceDirectory) : root;
|
|
229709
|
+
}
|
|
229710
|
+
function getDefaultChangelogFilePath() {
|
|
229711
|
+
const workspaceDirectory = getActiveWorkspaceDirectory();
|
|
229712
|
+
return workspaceDirectory ? import_path24.default.posix.join(workspaceDirectory, DEFAULT_CHANGELOG_FILE_PATH) : DEFAULT_CHANGELOG_FILE_PATH;
|
|
229629
229713
|
}
|
|
229630
229714
|
function getChangelogConfig() {
|
|
229631
229715
|
const config = getConfiguration();
|
|
@@ -229699,11 +229783,16 @@ function isExpandableTarget(targetClass) {
|
|
|
229699
229783
|
async function expandWorkspaceTargets(targets) {
|
|
229700
229784
|
const { getTargetByName: getTargetByName2 } = (init_targets(), __toCommonJS(targets_exports));
|
|
229701
229785
|
const rootDir = getConfigFileDir() || process.cwd();
|
|
229786
|
+
const releaseUnitDir = getReleaseUnitDir();
|
|
229702
229787
|
const expandedTargets = [];
|
|
229703
229788
|
for (const target of targets) {
|
|
229704
229789
|
const targetClass = getTargetByName2(target.name);
|
|
229705
229790
|
if (targetClass && isExpandableTarget(targetClass)) {
|
|
229706
|
-
const expanded = await targetClass.expand(
|
|
229791
|
+
const expanded = await targetClass.expand(
|
|
229792
|
+
target,
|
|
229793
|
+
rootDir,
|
|
229794
|
+
releaseUnitDir
|
|
229795
|
+
);
|
|
229707
229796
|
expandedTargets.push(...expanded);
|
|
229708
229797
|
} else {
|
|
229709
229798
|
expandedTargets.push(target);
|
|
@@ -229711,7 +229800,7 @@ async function expandWorkspaceTargets(targets) {
|
|
|
229711
229800
|
}
|
|
229712
229801
|
return expandedTargets;
|
|
229713
229802
|
}
|
|
229714
|
-
var import_fs26, import_path24, import_git_url_parse, CONFIG_FILE_NAME, DEFAULT_RELEASE_BRANCH_NAME, _configPathCache, _configCache, WORKSPACES_MIN_VERSION, _activeWorkspaceName, AUTO_VERSION_MIN_VERSION, _globalGitHubConfigCache, DEFAULT_CHANGELOG_FILE_PATH;
|
|
229803
|
+
var import_fs26, import_path24, import_git_url_parse, CONFIG_FILE_NAME, DEFAULT_RELEASE_BRANCH_NAME, _configPathCache, _configCache, WORKSPACES_MIN_VERSION, _activeWorkspaceName, WORKSPACE_PLACEHOLDERS, WORKSPACE_PLACEHOLDER_REGEX, AUTO_VERSION_MIN_VERSION, _globalGitHubConfigCache, DEFAULT_CHANGELOG_FILE_PATH;
|
|
229715
229804
|
var init_config2 = __esm({
|
|
229716
229805
|
"src/config.ts"() {
|
|
229717
229806
|
"use strict";
|
|
@@ -229735,6 +229824,16 @@ var init_config2 = __esm({
|
|
|
229735
229824
|
CONFIG_FILE_NAME = ".craft.yml";
|
|
229736
229825
|
DEFAULT_RELEASE_BRANCH_NAME = "release";
|
|
229737
229826
|
WORKSPACES_MIN_VERSION = "2.29.0";
|
|
229827
|
+
WORKSPACE_PLACEHOLDERS = [
|
|
229828
|
+
"workspace",
|
|
229829
|
+
"workspaceName",
|
|
229830
|
+
"packageName",
|
|
229831
|
+
"packageSimpleName"
|
|
229832
|
+
];
|
|
229833
|
+
WORKSPACE_PLACEHOLDER_REGEX = new RegExp(
|
|
229834
|
+
`\\{\\{(${WORKSPACE_PLACEHOLDERS.join("|")})\\}\\}`,
|
|
229835
|
+
"g"
|
|
229836
|
+
);
|
|
229738
229837
|
AUTO_VERSION_MIN_VERSION = "2.14.0";
|
|
229739
229838
|
DEFAULT_CHANGELOG_FILE_PATH = "CHANGELOG.md";
|
|
229740
229839
|
}
|
|
@@ -229745,7 +229844,7 @@ var require_package7 = __commonJS({
|
|
|
229745
229844
|
"package.json"(exports2, module2) {
|
|
229746
229845
|
module2.exports = {
|
|
229747
229846
|
name: "@sentry/craft",
|
|
229748
|
-
version: "3.
|
|
229847
|
+
version: "3.3.0",
|
|
229749
229848
|
description: "The universal sentry workflow CLI",
|
|
229750
229849
|
main: "dist/craft",
|
|
229751
229850
|
repository: "https://github.com/getsentry/craft",
|
|
@@ -229952,7 +230051,7 @@ function getPackage() {
|
|
|
229952
230051
|
}
|
|
229953
230052
|
function getPackageVersion3() {
|
|
229954
230053
|
const { version: version2 } = getPackage();
|
|
229955
|
-
const buildInfo = "
|
|
230054
|
+
const buildInfo = "4b763f5419255bb520e3e5a49f5b91426dcd374d";
|
|
229956
230055
|
return buildInfo ? `${version2} (${buildInfo})` : version2;
|
|
229957
230056
|
}
|
|
229958
230057
|
function semVerToString(s8) {
|
|
@@ -235922,13 +236021,13 @@ function usage(yargs, shim3) {
|
|
|
235922
236021
|
};
|
|
235923
236022
|
self2.stringifiedValues = function stringifiedValues(values, separator) {
|
|
235924
236023
|
let string2 = "";
|
|
235925
|
-
const
|
|
236024
|
+
const sep6 = separator || ", ";
|
|
235926
236025
|
const array2 = [].concat(values);
|
|
235927
236026
|
if (!values || !array2.length)
|
|
235928
236027
|
return string2;
|
|
235929
236028
|
array2.forEach((value) => {
|
|
235930
236029
|
if (string2.length)
|
|
235931
|
-
string2 +=
|
|
236030
|
+
string2 += sep6;
|
|
235932
236031
|
string2 += JSON.stringify(value);
|
|
235933
236032
|
});
|
|
235934
236033
|
return string2;
|
|
@@ -239557,13 +239656,12 @@ async function prepareMain(argv) {
|
|
|
239557
239656
|
const resolvedChangelogPath = (0, import_path31.relative)("", changelogPath);
|
|
239558
239657
|
await git.add(resolvedChangelogPath);
|
|
239559
239658
|
}
|
|
239560
|
-
const rootDir = getConfigFileDir() || process.cwd();
|
|
239561
239659
|
const preReleaseCommandRan = await runPreReleaseCommand({
|
|
239562
239660
|
oldVersion,
|
|
239563
239661
|
newVersion,
|
|
239564
239662
|
preReleaseCommand: config.preReleaseCommand,
|
|
239565
239663
|
targets: config.targets,
|
|
239566
|
-
rootDir
|
|
239664
|
+
rootDir: getReleaseUnitDir()
|
|
239567
239665
|
});
|
|
239568
239666
|
await commitChanges(git, newVersion, preReleaseCommandRan);
|
|
239569
239667
|
await isolation.showDiff();
|