@sentry/craft 2.26.6 → 2.26.7

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.
Files changed (2) hide show
  1. package/dist/craft +39 -22
  2. package/package.json +3 -3
package/dist/craft CHANGED
@@ -75155,9 +75155,9 @@ var require_ignore = __commonJS({
75155
75155
  }
75156
75156
  });
75157
75157
 
75158
- // node_modules/.pnpm/tmp@0.2.4/node_modules/tmp/lib/tmp.js
75158
+ // node_modules/.pnpm/tmp@0.2.7/node_modules/tmp/lib/tmp.js
75159
75159
  var require_tmp = __commonJS({
75160
- "node_modules/.pnpm/tmp@0.2.4/node_modules/tmp/lib/tmp.js"(exports2, module2) {
75160
+ "node_modules/.pnpm/tmp@0.2.7/node_modules/tmp/lib/tmp.js"(exports2, module2) {
75161
75161
  init_import_meta_url();
75162
75162
  var fs15 = require("fs");
75163
75163
  var os6 = require("os");
@@ -75376,7 +75376,7 @@ var require_tmp = __commonJS({
75376
75376
  cb(null, path18.join(parentDir, path18.basename(pathToResolve)));
75377
75377
  });
75378
75378
  } else {
75379
- fs15.realpath(path18, cb);
75379
+ fs15.realpath(pathToResolve, cb);
75380
75380
  }
75381
75381
  });
75382
75382
  }
@@ -75408,16 +75408,31 @@ var require_tmp = __commonJS({
75408
75408
  ].join("");
75409
75409
  return path18.join(tmpDir, opts.dir, name);
75410
75410
  }
75411
+ function _assertPath(option, value) {
75412
+ if (typeof value !== "string") {
75413
+ throw new Error(`${option} option must be a string, got "${typeof value}".`);
75414
+ }
75415
+ if (value.includes("..")) {
75416
+ throw new Error("Relative value not allowed");
75417
+ }
75418
+ return value;
75419
+ }
75411
75420
  function _assertOptionsBase(options) {
75412
75421
  if (!_isUndefined(options.name)) {
75413
75422
  const name = options.name;
75414
75423
  if (path18.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`);
75415
75424
  const basename10 = path18.basename(name);
75416
- if (basename10 === ".." || basename10 === "." || basename10 !== name)
75425
+ if (basename10 === ".." || basename10 === "." || basename10 !== name) {
75417
75426
  throw new Error(`name option must not contain a path, found "${name}".`);
75427
+ }
75418
75428
  }
75419
- if (!_isUndefined(options.template) && !options.template.match(TEMPLATE_PATTERN)) {
75420
- throw new Error(`Invalid template, found "${options.template}".`);
75429
+ if (!_isUndefined(options.template)) {
75430
+ if (typeof options.template !== "string") {
75431
+ throw new Error(`template option must be a string, got "${typeof options.template}".`);
75432
+ }
75433
+ if (!options.template.match(TEMPLATE_PATTERN)) {
75434
+ throw new Error(`Invalid template, found "${options.template}".`);
75435
+ }
75421
75436
  }
75422
75437
  if (!_isUndefined(options.tries) && isNaN(options.tries) || options.tries < 0) {
75423
75438
  throw new Error(`Invalid tries, found "${options.tries}".`);
@@ -75427,15 +75442,16 @@ var require_tmp = __commonJS({
75427
75442
  options.detachDescriptor = !!options.detachDescriptor;
75428
75443
  options.discardDescriptor = !!options.discardDescriptor;
75429
75444
  options.unsafeCleanup = !!options.unsafeCleanup;
75430
- options.prefix = _isUndefined(options.prefix) ? "" : options.prefix;
75431
- options.postfix = _isUndefined(options.postfix) ? "" : options.postfix;
75445
+ options.prefix = _isUndefined(options.prefix) ? "" : _assertPath("prefix", options.prefix);
75446
+ options.postfix = _isUndefined(options.postfix) ? "" : _assertPath("postfix", options.postfix);
75447
+ options.template = _isUndefined(options.template) ? void 0 : _assertPath("template", options.template);
75432
75448
  }
75433
75449
  function _getRelativePath(option, name, tmpDir, cb) {
75434
75450
  if (_isUndefined(name)) return cb(null);
75435
75451
  _resolvePath(name, tmpDir, function(err, resolvedPath2) {
75436
75452
  if (err) return cb(err);
75437
75453
  const relativePath = path18.relative(tmpDir, resolvedPath2);
75438
- if (!resolvedPath2.startsWith(tmpDir)) {
75454
+ if (relativePath.startsWith("..") || path18.isAbsolute(relativePath)) {
75439
75455
  return cb(new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`));
75440
75456
  }
75441
75457
  cb(null, relativePath);
@@ -75445,7 +75461,7 @@ var require_tmp = __commonJS({
75445
75461
  if (_isUndefined(name)) return;
75446
75462
  const resolvedPath2 = _resolvePathSync(name, tmpDir);
75447
75463
  const relativePath = path18.relative(tmpDir, resolvedPath2);
75448
- if (!resolvedPath2.startsWith(tmpDir)) {
75464
+ if (relativePath.startsWith("..") || path18.isAbsolute(relativePath)) {
75449
75465
  throw new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`);
75450
75466
  }
75451
75467
  return relativePath;
@@ -127424,13 +127440,14 @@ var init_npm = __esm({
127424
127440
  });
127425
127441
 
127426
127442
  // src/targets/nuget.ts
127427
- var import_fs15, import_path13, NUGET_DOTNET_BIN, DEFAULT_NUGET_SERVER_URL, DEFAULT_NUGET_REGEX, SYMBOLS_NUGET_REGEX, DOTNET_SPAWN_OPTIONS, NugetTarget;
127443
+ var import_fs15, import_path13, import_crypto5, NUGET_DOTNET_BIN, DEFAULT_NUGET_SERVER_URL, DEFAULT_NUGET_REGEX, SYMBOLS_NUGET_REGEX, DOTNET_SPAWN_OPTIONS, NugetTarget;
127428
127444
  var init_nuget = __esm({
127429
127445
  "src/targets/nuget.ts"() {
127430
127446
  "use strict";
127431
127447
  init_import_meta_url();
127432
127448
  import_fs15 = require("fs");
127433
127449
  import_path13 = require("path");
127450
+ import_crypto5 = require("crypto");
127434
127451
  init_errors2();
127435
127452
  init_system();
127436
127453
  init_base5();
@@ -127463,7 +127480,7 @@ var init_nuget = __esm({
127463
127480
  }
127464
127481
  if (hasExecutable(NUGET_DOTNET_BIN)) {
127465
127482
  const globalJsonPath = (0, import_path13.join)(rootDir, "global.json");
127466
- const globalJsonBackup = `${globalJsonPath}.craft-bak`;
127483
+ const globalJsonBackup = `${globalJsonPath}.craft-bak-${(0, import_crypto5.randomUUID)()}`;
127467
127484
  const globalJsonMoved = (0, import_fs15.existsSync)(globalJsonPath);
127468
127485
  if (globalJsonMoved) {
127469
127486
  (0, import_fs15.renameSync)(globalJsonPath, globalJsonBackup);
@@ -133669,11 +133686,11 @@ var require_dist_cjs18 = __commonJS({
133669
133686
  "node_modules/.pnpm/@smithy+uuid@1.1.0/node_modules/@smithy/uuid/dist-cjs/index.js"(exports2) {
133670
133687
  "use strict";
133671
133688
  init_import_meta_url();
133672
- var randomUUID = require_randomUUID();
133689
+ var randomUUID2 = require_randomUUID();
133673
133690
  var decimalToHex = Array.from({ length: 256 }, (_4, i5) => i5.toString(16).padStart(2, "0"));
133674
133691
  var v42 = () => {
133675
- if (randomUUID.randomUUID) {
133676
- return randomUUID.randomUUID();
133692
+ if (randomUUID2.randomUUID) {
133693
+ return randomUUID2.randomUUID();
133677
133694
  }
133678
133695
  const rnds = new Uint8Array(16);
133679
133696
  crypto.getRandomValues(rnds);
@@ -161654,7 +161671,7 @@ var require_package6 = __commonJS({
161654
161671
  "package.json"(exports2, module2) {
161655
161672
  module2.exports = {
161656
161673
  name: "@sentry/craft",
161657
- version: "2.26.6",
161674
+ version: "2.26.7",
161658
161675
  description: "The universal sentry workflow CLI",
161659
161676
  main: "dist/craft",
161660
161677
  repository: "https://github.com/getsentry/craft",
@@ -161718,11 +161735,11 @@ var require_package6 = __commonJS({
161718
161735
  split: "1.0.1",
161719
161736
  "string-length": "3.1.0",
161720
161737
  tar: "7.5.11",
161721
- tmp: "0.2.4",
161738
+ tmp: "^0.2.6",
161722
161739
  tslib: "^2.8.1",
161723
161740
  typescript: "^5.7.2",
161724
161741
  "typescript-eslint": "^8.18.2",
161725
- vitest: "^3.0.2",
161742
+ vitest: "^4.1.0",
161726
161743
  yargs: "^18",
161727
161744
  zod: "^3.24.1"
161728
161745
  },
@@ -161828,7 +161845,7 @@ function getPackage() {
161828
161845
  }
161829
161846
  function getPackageVersion() {
161830
161847
  const { version: version2 } = getPackage();
161831
- const buildInfo = "3e6a0f477702864bb5854384b390a0db3325428e";
161848
+ const buildInfo = "2d91188a567c27575be26f7f06a4701ecd4d94ce";
161832
161849
  return buildInfo ? `${version2} (${buildInfo})` : version2;
161833
161850
  }
161834
161851
  function semVerToString(s6) {
@@ -169953,7 +169970,7 @@ init_tracing3();
169953
169970
 
169954
169971
  // src/utils/publishState.ts
169955
169972
  init_import_meta_url();
169956
- var import_crypto5 = require("crypto");
169973
+ var import_crypto6 = require("crypto");
169957
169974
  var import_os4 = require("os");
169958
169975
  var import_path27 = require("path");
169959
169976
  var STATE_DIR_NAME = "craft";
@@ -169968,7 +169985,7 @@ function sanitiseForFilename(raw) {
169968
169985
  return raw.toLowerCase().replace(/[^a-z0-9._-]+/g, "_").replace(/^_+|_+$/g, "");
169969
169986
  }
169970
169987
  function shortCwdHash(cwd) {
169971
- return (0, import_crypto5.createHash)("sha1").update(cwd).digest("hex").slice(0, 12);
169988
+ return (0, import_crypto6.createHash)("sha1").update(cwd).digest("hex").slice(0, 12);
169972
169989
  }
169973
169990
  function getPublishStateFilename(version2, githubConfig, cwd = process.cwd()) {
169974
169991
  const safeVersion = sanitiseForFilename(version2);
@@ -169977,7 +169994,7 @@ function getPublishStateFilename(version2, githubConfig, cwd = process.cwd()) {
169977
169994
  const repo = sanitiseForFilename(githubConfig.repo);
169978
169995
  return `publish-state-${owner}-${repo}-${shortCwdHash(cwd)}-${safeVersion}.json`;
169979
169996
  }
169980
- const cwdDigest = (0, import_crypto5.createHash)("sha256").update(cwd).digest("hex").slice(0, 16);
169997
+ const cwdDigest = (0, import_crypto6.createHash)("sha256").update(cwd).digest("hex").slice(0, 16);
169981
169998
  return `publish-state-${cwdDigest}-${safeVersion}.json`;
169982
169999
  }
169983
170000
  function getPublishStatePath(version2, githubConfig, cwd = process.cwd()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/craft",
3
- "version": "2.26.6",
3
+ "version": "2.26.7",
4
4
  "description": "The universal sentry workflow CLI",
5
5
  "main": "dist/craft",
6
6
  "repository": "https://github.com/getsentry/craft",
@@ -64,11 +64,11 @@
64
64
  "split": "1.0.1",
65
65
  "string-length": "3.1.0",
66
66
  "tar": "7.5.11",
67
- "tmp": "0.2.4",
67
+ "tmp": "^0.2.6",
68
68
  "tslib": "^2.8.1",
69
69
  "typescript": "^5.7.2",
70
70
  "typescript-eslint": "^8.18.2",
71
- "vitest": "^3.0.2",
71
+ "vitest": "^4.1.0",
72
72
  "yargs": "^18",
73
73
  "zod": "^3.24.1"
74
74
  },