@sentry/craft 2.21.1 → 2.21.2

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 +207 -187
  2. package/package.json +4 -1
package/dist/craft CHANGED
@@ -55046,8 +55046,14 @@ function envToBool2(envVar) {
55046
55046
  return !FALSY_ENV_VALUES2.has(normalized);
55047
55047
  }
55048
55048
  function setGlobals(argv) {
55049
- for (const globalFlag of Object.keys(GLOBAL_FLAGS)) {
55050
- GLOBAL_FLAGS[globalFlag] = argv[globalFlag];
55049
+ if (argv["dry-run"] !== void 0) {
55050
+ GLOBAL_FLAGS["dry-run"] = argv["dry-run"];
55051
+ }
55052
+ if (argv["no-input"] !== void 0) {
55053
+ GLOBAL_FLAGS["no-input"] = argv["no-input"];
55054
+ }
55055
+ if (argv["log-level"] !== void 0) {
55056
+ GLOBAL_FLAGS["log-level"] = argv["log-level"];
55051
55057
  }
55052
55058
  logger.trace("Global flags:", GLOBAL_FLAGS);
55053
55059
  setLevel(import_consola.LogLevel[GLOBAL_FLAGS["log-level"]]);
@@ -71039,7 +71045,7 @@ function replaceEnvVariable(arg, env2) {
71039
71045
  return arg;
71040
71046
  }
71041
71047
  }
71042
- async function spawnProcess2(command10, args = [], options = {}, spawnProcessOptions = {}) {
71048
+ async function spawnProcess(command10, args = [], options = {}, spawnProcessOptions = {}) {
71043
71049
  const argsString = args.map((arg) => `"${arg}"`).join(" ");
71044
71050
  if (isDryRun() && !spawnProcessOptions.enableInDryRunMode && !isInWorktreeMode()) {
71045
71051
  logger.info("[dry-run] Not spawning process:", `${command10} ${argsString}`);
@@ -71189,7 +71195,7 @@ async function runWithExecutable(config3, args, options = {}, spawnOpts = {}) {
71189
71195
  }
71190
71196
  }
71191
71197
  logger.debug(`Running: ${bin} ${args.join(" ")}`);
71192
- return spawnProcess2(bin, args, options, spawnOpts);
71198
+ return spawnProcess(bin, args, options, spawnOpts);
71193
71199
  }
71194
71200
  async function extractZipArchive(filePath, dir) {
71195
71201
  await (0, import_extract_zip.default)(filePath, { dir });
@@ -80165,7 +80171,7 @@ async function retrySpawnProcess(command10, args = [], spawnOptions = {}, spawnP
80165
80171
  const retryExpFactor = retryOptions.retryExpFactor ?? RETRY_EXP_FACTOR;
80166
80172
  let retryDelay = retryOptions.retryDelay ?? RETRY_DELAY_SECS;
80167
80173
  return withRetry(
80168
- () => spawnProcess2(command10, args, spawnOptions, spawnProcessOptions),
80174
+ () => spawnProcess(command10, args, spawnOptions, spawnProcessOptions),
80169
80175
  maxRetries,
80170
80176
  async (err) => {
80171
80177
  logger.warn(`${command10} failed. Trying again in ${retryDelay}s.`);
@@ -110903,7 +110909,7 @@ var init_gcsApi = __esm({
110903
110909
  this.bucket = new Bucket(
110904
110910
  new Storage({
110905
110911
  credentials,
110906
- maxRetries,
110912
+ retryOptions: { maxRetries },
110907
110913
  projectId
110908
110914
  }),
110909
110915
  bucketName
@@ -110948,7 +110954,9 @@ var init_gcsApi = __esm({
110948
110954
  );
110949
110955
  const destination = path14.posix.join(this.bucketName, pathInBucket);
110950
110956
  await safeExec(async () => {
110951
- logger.debug(`Attempting to upload \`${filename}\` to \`${destination}\`.`);
110957
+ logger.debug(
110958
+ `Attempting to upload \`${filename}\` to \`${destination}\`.`
110959
+ );
110952
110960
  try {
110953
110961
  await this.bucket.upload(artifactLocalPath, uploadConfig);
110954
110962
  } catch (err) {
@@ -111020,7 +111028,7 @@ var init_gcsApi = __esm({
111020
111028
  filename,
111021
111029
  mimeType,
111022
111030
  storedFile: {
111023
- downloadFilepath,
111031
+ downloadFilepath: downloadFilepath ?? name2,
111024
111032
  filename,
111025
111033
  lastUpdated,
111026
111034
  size: Number(size)
@@ -111036,17 +111044,16 @@ var init_gcsApi = __esm({
111036
111044
  * @returns An array of RemoteArtifact objects
111037
111045
  */
111038
111046
  async listArtifactsForRevision(repoOwner, repoName, revision) {
111039
- let filesResponse = [[]];
111047
+ let files = [];
111040
111048
  const prefix = path14.posix.join(repoOwner, repoName, revision);
111041
111049
  logger.debug(`Looking for files starting with '${prefix}'`);
111042
111050
  try {
111043
- filesResponse = await this.bucket.getFiles({ prefix });
111051
+ [files] = await this.bucket.getFiles({ prefix });
111044
111052
  } catch (err) {
111045
111053
  reportError(
111046
111054
  `Error retrieving artifact list from GCS: ${formatJson(err)}`
111047
111055
  );
111048
111056
  }
111049
- const files = filesResponse[0];
111050
111057
  return files.map((gcsFile) => this.convertToRemoteArtifact(gcsFile));
111051
111058
  }
111052
111059
  };
@@ -117929,13 +117936,14 @@ var init_brew = __esm({
117929
117936
  * Extracts Brew target options from the raw configuration
117930
117937
  */
117931
117938
  getBrewConfig() {
117932
- const template = this.config.template;
117939
+ const config3 = this.config;
117940
+ const template = config3.template;
117933
117941
  if (!template) {
117934
117942
  throw new ConfigurationError(
117935
117943
  'Please specify Formula template in the "brew" target configuration.'
117936
117944
  );
117937
117945
  }
117938
- const { formula, path: path26 } = this.config;
117946
+ const { formula, path: path26 } = config3;
117939
117947
  return {
117940
117948
  formula,
117941
117949
  path: path26,
@@ -117953,7 +117961,8 @@ var init_brew = __esm({
117953
117961
  * @returns The owner and repository of the tap
117954
117962
  */
117955
117963
  getTapRepo() {
117956
- const { tap } = this.config;
117964
+ const config3 = this.config;
117965
+ const { tap } = config3;
117957
117966
  if (!tap) {
117958
117967
  return {
117959
117968
  owner: "homebrew",
@@ -118042,14 +118051,18 @@ var init_brew = __esm({
118042
118051
  this.logger.debug("Downloading artifacts for the revision");
118043
118052
  this.logger.trace(filesList.map((file) => file.filename));
118044
118053
  const checksums = {};
118045
- await (0, import_async4.mapLimit)(filesList, MAX_DOWNLOAD_CONCURRENCY, async (file) => {
118046
- const key = file.filename.replace(version2, "__VERSION__");
118047
- checksums[key] = await this.artifactProvider.getChecksum(
118048
- file,
118049
- "sha256" /* SHA256 */,
118050
- "hex" /* Hex */
118051
- );
118052
- });
118054
+ await (0, import_async4.mapLimit)(
118055
+ filesList,
118056
+ MAX_DOWNLOAD_CONCURRENCY,
118057
+ async (file) => {
118058
+ const key = file.filename.replace(version2, "__VERSION__");
118059
+ checksums[key] = await this.artifactProvider.getChecksum(
118060
+ file,
118061
+ "sha256" /* SHA256 */,
118062
+ "hex" /* Hex */
118063
+ );
118064
+ }
118065
+ );
118053
118066
  const data2 = renderTemplateSafe(template, {
118054
118067
  checksums,
118055
118068
  revision,
@@ -118119,7 +118132,8 @@ var init_cocoapods = __esm({
118119
118132
  * Extracts Cocoapods target options from the environment
118120
118133
  */
118121
118134
  getCocoapodsConfig() {
118122
- const specPath = this.config.specPath;
118135
+ const config3 = this.config;
118136
+ const specPath = config3.specPath;
118123
118137
  if (!specPath) {
118124
118138
  throw new ConfigurationError("No podspec path provided!");
118125
118139
  }
@@ -118154,8 +118168,8 @@ var init_cocoapods = __esm({
118154
118168
  const filePath = (0, import_path7.join)(directory, fileName);
118155
118169
  await writeFile2(filePath, specContents, "utf8");
118156
118170
  this.logger.info(`Pushing podspec "${fileName}" to cocoapods...`);
118157
- await spawnProcess2(COCOAPODS_BIN, ["setup"]);
118158
- await spawnProcess2(
118171
+ await spawnProcess(COCOAPODS_BIN, ["setup"]);
118172
+ await spawnProcess(
118159
118173
  COCOAPODS_BIN,
118160
118174
  ["trunk", "push", fileName, "--allow-warnings", "--synchronous"],
118161
118175
  {
@@ -118468,7 +118482,7 @@ function hasGcloudCredentials() {
118468
118482
  }
118469
118483
  async function isGcloudAvailable() {
118470
118484
  try {
118471
- await spawnProcess2("gcloud", ["--version"], {}, {});
118485
+ await spawnProcess("gcloud", ["--version"], {}, {});
118472
118486
  return true;
118473
118487
  } catch {
118474
118488
  return false;
@@ -118710,7 +118724,7 @@ Please use ${registryHint}DOCKER_USERNAME and DOCKER_PASSWORD environment variab
118710
118724
  }
118711
118725
  const registryName = registry || "Docker Hub";
118712
118726
  this.logger.debug(`Logging into ${registryName}...`);
118713
- await spawnProcess2(DOCKER_BIN, args, {}, { stdin: password });
118727
+ await spawnProcess(DOCKER_BIN, args, {}, { stdin: password });
118714
118728
  }
118715
118729
  /**
118716
118730
  * Configures Docker to use gcloud for authentication to Google Cloud registries.
@@ -118734,7 +118748,7 @@ Please use ${registryHint}DOCKER_USERNAME and DOCKER_PASSWORD environment variab
118734
118748
  const registryList = registries.join(",");
118735
118749
  this.logger.debug(`Configuring Docker for Google Cloud registries: ${registryList}`);
118736
118750
  try {
118737
- await spawnProcess2("gcloud", ["auth", "configure-docker", registryList, "--quiet"], {}, {});
118751
+ await spawnProcess("gcloud", ["auth", "configure-docker", registryList, "--quiet"], {}, {});
118738
118752
  this.logger.info(`Configured Docker authentication for: ${registryList}`);
118739
118753
  return true;
118740
118754
  } catch (error3) {
@@ -118810,7 +118824,7 @@ Please use ${registryHint}DOCKER_USERNAME and DOCKER_PASSWORD environment variab
118810
118824
  version: version2
118811
118825
  });
118812
118826
  this.logger.debug(`Copying image from ${sourceImage} to ${targetImage}...`);
118813
- return spawnProcess2(
118827
+ return spawnProcess(
118814
118828
  DOCKER_BIN,
118815
118829
  ["buildx", "imagetools", "create", "--tag", targetImage, sourceImage],
118816
118830
  {},
@@ -118868,9 +118882,11 @@ var init_gcs2 = __esm({
118868
118882
  legacyName: "CRAFT_GCS_CREDENTIALS_PATH"
118869
118883
  }
118870
118884
  );
118871
- const bucketName = this.config.bucket;
118885
+ const config3 = this.config;
118886
+ const bucketName = config3.bucket;
118872
118887
  if (!bucketName) {
118873
118888
  reportError("No GCS bucket provided!");
118889
+ throw new Error("No GCS bucket provided!");
118874
118890
  }
118875
118891
  const pathTemplates = this.parseRawPathConfig(
118876
118892
  this.config.paths
@@ -119110,7 +119126,7 @@ var init_gem = __esm({
119110
119126
  * @returns A promise that resolves when the gem pushed
119111
119127
  */
119112
119128
  async pushGem(path26) {
119113
- return spawnProcess2(GEM_BIN, ["push", path26]);
119129
+ return spawnProcess(GEM_BIN, ["push", path26]);
119114
119130
  }
119115
119131
  /**
119116
119132
  * Pushes a gem to rubygems.org
@@ -119174,12 +119190,13 @@ var init_ghPages = __esm({
119174
119190
  * Extracts "gh-pages" target options from the raw configuration
119175
119191
  */
119176
119192
  getGhPagesConfig() {
119193
+ const config3 = this.config;
119177
119194
  let githubOwner;
119178
119195
  let githubRepo;
119179
- if (this.config.githubOwner && this.config.githubRepo) {
119180
- githubOwner = this.config.githubOwner;
119181
- githubRepo = this.config.githubRepo;
119182
- } else if (!this.config.githubOwner && !this.config.githubRepo) {
119196
+ if (config3.githubOwner && config3.githubRepo) {
119197
+ githubOwner = config3.githubOwner;
119198
+ githubRepo = config3.githubRepo;
119199
+ } else if (!config3.githubOwner && !config3.githubRepo) {
119183
119200
  githubOwner = this.githubRepo.owner;
119184
119201
  githubRepo = this.githubRepo.repo;
119185
119202
  } else {
@@ -119187,7 +119204,7 @@ var init_ghPages = __esm({
119187
119204
  "[gh-pages] Invalid repository configuration: check repo owner and name"
119188
119205
  );
119189
119206
  }
119190
- const branch = this.config.branch || DEFAULT_DEPLOY_BRANCH;
119207
+ const branch = config3.branch || DEFAULT_DEPLOY_BRANCH;
119191
119208
  return {
119192
119209
  branch,
119193
119210
  githubOwner,
@@ -121587,18 +121604,19 @@ var init_github3 = __esm({
121587
121604
  constructor(config3, artifactProvider, githubRepo) {
121588
121605
  super(config3, artifactProvider, githubRepo);
121589
121606
  this.githubRepo = githubRepo;
121590
- const owner = config3.owner || githubRepo.owner;
121591
- const repo = config3.repo || githubRepo.repo;
121607
+ const typedConfig = this.config;
121608
+ const owner = typedConfig.owner || githubRepo.owner;
121609
+ const repo = typedConfig.repo || githubRepo.repo;
121592
121610
  const configChangelog = getConfiguration().changelog;
121593
121611
  const changelog = typeof configChangelog === "string" ? configChangelog : configChangelog?.filePath || DEFAULT_CHANGELOG_PATH;
121594
121612
  this.githubConfig = {
121595
121613
  owner,
121596
121614
  repo,
121597
121615
  changelog,
121598
- previewReleases: this.config.previewReleases === void 0 || !!this.config.previewReleases,
121599
- tagPrefix: this.config.tagPrefix || "",
121600
- tagOnly: !!this.config.tagOnly,
121601
- floatingTags: this.config.floatingTags || []
121616
+ previewReleases: typedConfig.previewReleases === void 0 || !!typedConfig.previewReleases,
121617
+ tagPrefix: typedConfig.tagPrefix || "",
121618
+ tagOnly: !!typedConfig.tagOnly,
121619
+ floatingTags: typedConfig.floatingTags || []
121602
121620
  };
121603
121621
  this.github = getGitHubClient();
121604
121622
  }
@@ -121740,7 +121758,11 @@ var init_github3 = __esm({
121740
121758
  `
121741
121759
  );
121742
121760
  try {
121743
- const { url: url2 } = await this.handleGitHubUpload(release3, path26, contentType);
121761
+ const { url: url2 } = await this.handleGitHubUpload(
121762
+ release3,
121763
+ path26,
121764
+ contentType
121765
+ );
121744
121766
  process.stderr.write(`\u2714 Uploaded asset "${name2}".
121745
121767
  `);
121746
121768
  return url2;
@@ -121784,7 +121806,7 @@ var init_github3 = __esm({
121784
121806
  );
121785
121807
  }
121786
121808
  return ret;
121787
- } catch (err) {
121809
+ } catch {
121788
121810
  if (retries <= 0) {
121789
121811
  throw new Error(
121790
121812
  `Reached maximum retries for trying to upload asset "${params.name}.`
@@ -127922,7 +127944,7 @@ function fileExists(filePath) {
127922
127944
  try {
127923
127945
  (0, import_fs12.readFileSync)(filePath);
127924
127946
  return true;
127925
- } catch (err) {
127947
+ } catch {
127926
127948
  return false;
127927
127949
  }
127928
127950
  }
@@ -128080,7 +128102,7 @@ async function getLatestVersion(packageName, npmConfig, otp) {
128080
128102
  filePath,
128081
128103
  `//registry.npmjs.org/:_authToken=\${${NPM_TOKEN_ENV_VAR}}`
128082
128104
  );
128083
- return spawnProcess2(bin, args, spawnOptions);
128105
+ return spawnProcess(bin, args, spawnOptions);
128084
128106
  });
128085
128107
  if (!response) {
128086
128108
  return void 0;
@@ -128272,7 +128294,7 @@ var init_npm = __esm({
128272
128294
  const isWorkspace = workspaces.type !== "none" && workspaces.packages.length > 0;
128273
128295
  const baseArgs = isNpm ? ["version", newVersion, "--no-git-tag-version", "--allow-same-version"] : ["version", newVersion, "--no-git-tag-version"];
128274
128296
  logger.debug(`Running: ${bin} ${baseArgs.join(" ")}`);
128275
- await spawnProcess2(bin, baseArgs, { cwd: rootDir });
128297
+ await spawnProcess(bin, baseArgs, { cwd: rootDir });
128276
128298
  if (isWorkspace) {
128277
128299
  if (isNpm) {
128278
128300
  const workspaceArgs = [
@@ -128284,7 +128306,7 @@ var init_npm = __esm({
128284
128306
  `Running: ${bin} ${workspaceArgs.join(" ")} (for workspaces)`
128285
128307
  );
128286
128308
  try {
128287
- await spawnProcess2(bin, workspaceArgs, { cwd: rootDir });
128309
+ await spawnProcess(bin, workspaceArgs, { cwd: rootDir });
128288
128310
  } catch {
128289
128311
  logger.debug(
128290
128312
  "npm --workspaces failed, falling back to individual package bumping"
@@ -128313,7 +128335,7 @@ var init_npm = __esm({
128313
128335
  /**
128314
128336
  * Bump version in each workspace package individually
128315
128337
  */
128316
- static async bumpWorkspacePackagesIndividually(bin, packages, newVersion, baseArgs) {
128338
+ static async bumpWorkspacePackagesIndividually(bin, packages, _newVersion, baseArgs) {
128317
128339
  for (const pkg of packages) {
128318
128340
  const pkgJsonPath = (0, import_path11.join)(pkg.location, "package.json");
128319
128341
  if (!(0, import_fs13.existsSync)(pkgJsonPath)) {
@@ -128330,7 +128352,7 @@ var init_npm = __esm({
128330
128352
  continue;
128331
128353
  }
128332
128354
  logger.debug(`Bumping version for workspace package: ${pkg.name}`);
128333
- await spawnProcess2(bin, baseArgs, { cwd: pkg.location });
128355
+ await spawnProcess(bin, baseArgs, { cwd: pkg.location });
128334
128356
  }
128335
128357
  }
128336
128358
  constructor(config3, artifactProvider) {
@@ -128383,16 +128405,17 @@ var init_npm = __esm({
128383
128405
  if (!token) {
128384
128406
  throw new Error("NPM target: NPM_TOKEN not found in the environment");
128385
128407
  }
128408
+ const config3 = this.config;
128386
128409
  const npmConfig = {
128387
128410
  useYarn: !!process.env.USE_YARN || !hasExecutable(NPM_BIN),
128388
128411
  token
128389
128412
  };
128390
- if (this.config.access) {
128391
- if (Object.values(NpmPackageAccess).includes(this.config.access)) {
128392
- npmConfig.access = this.config.access;
128413
+ if (config3.access) {
128414
+ if (Object.values(NpmPackageAccess).includes(config3.access)) {
128415
+ npmConfig.access = config3.access;
128393
128416
  } else {
128394
128417
  throw new ConfigurationError(
128395
- `Invalid value for "npm.access" option: ${this.config.access}`
128418
+ `Invalid value for "npm.access" option: ${config3.access}`
128396
128419
  );
128397
128420
  }
128398
128421
  }
@@ -128437,7 +128460,7 @@ var init_npm = __esm({
128437
128460
  `//registry.npmjs.org/:_authToken=\${${NPM_TOKEN_ENV_VAR}}`
128438
128461
  );
128439
128462
  args.push(path26);
128440
- return spawnProcess2(bin, args, spawnOptions, {
128463
+ return spawnProcess(bin, args, spawnOptions, {
128441
128464
  showStdout: true
128442
128465
  });
128443
128466
  });
@@ -128461,9 +128484,10 @@ var init_npm = __esm({
128461
128484
  if (!isDryRun() && this.npmConfig.useOtp) {
128462
128485
  publishOptions.otp = await this.requestOtp();
128463
128486
  }
128487
+ const config3 = this.config;
128464
128488
  const tag2 = await getPublishTag(
128465
128489
  version2,
128466
- this.config.checkPackageName,
128490
+ config3.checkPackageName,
128467
128491
  this.npmConfig,
128468
128492
  this.logger,
128469
128493
  publishOptions.otp
@@ -128523,7 +128547,7 @@ var init_nuget = __esm({
128523
128547
  }
128524
128548
  if (hasExecutable(NUGET_DOTNET_BIN)) {
128525
128549
  try {
128526
- const result = await spawnProcess2(
128550
+ const result = await spawnProcess(
128527
128551
  NUGET_DOTNET_BIN,
128528
128552
  ["setversion", newVersion],
128529
128553
  { cwd: rootDir },
@@ -128537,7 +128561,9 @@ var init_nuget = __esm({
128537
128561
  if (!message.includes("not installed") && !message.includes("Could not execute")) {
128538
128562
  throw error3;
128539
128563
  }
128540
- logger.debug("dotnet-setversion not available, falling back to manual edit");
128564
+ logger.debug(
128565
+ "dotnet-setversion not available, falling back to manual edit"
128566
+ );
128541
128567
  }
128542
128568
  }
128543
128569
  let bumped = false;
@@ -128602,9 +128628,10 @@ var init_nuget = __esm({
128602
128628
  Please use NUGET_API_TOKEN environment variable.`
128603
128629
  );
128604
128630
  }
128631
+ const config3 = this.config;
128605
128632
  return {
128606
128633
  apiToken: process.env.NUGET_API_TOKEN,
128607
- serverUrl: this.config.serverUrl || DEFAULT_NUGET_SERVER_URL
128634
+ serverUrl: config3.serverUrl || DEFAULT_NUGET_SERVER_URL
128608
128635
  };
128609
128636
  }
128610
128637
  /**
@@ -128629,7 +128656,7 @@ var init_nuget = __esm({
128629
128656
  "--source",
128630
128657
  this.nugetConfig.serverUrl
128631
128658
  ];
128632
- return spawnProcess2(NUGET_DOTNET_BIN, args, DOTNET_SPAWN_OPTIONS);
128659
+ return spawnProcess(NUGET_DOTNET_BIN, args, DOTNET_SPAWN_OPTIONS);
128633
128660
  }
128634
128661
  /**
128635
128662
  * Publishes a package tarball to the Nuget registry
@@ -128651,9 +128678,9 @@ var init_nuget = __esm({
128651
128678
  );
128652
128679
  }
128653
128680
  this.logger.info(".NET Version:");
128654
- await spawnProcess2(NUGET_DOTNET_BIN, ["--version"], DOTNET_SPAWN_OPTIONS);
128681
+ await spawnProcess(NUGET_DOTNET_BIN, ["--version"], DOTNET_SPAWN_OPTIONS);
128655
128682
  this.logger.info("Nuget Version:");
128656
- await spawnProcess2(
128683
+ await spawnProcess(
128657
128684
  NUGET_DOTNET_BIN,
128658
128685
  ["nuget", "--version"],
128659
128686
  DOTNET_SPAWN_OPTIONS
@@ -128728,21 +128755,22 @@ var init_sentryPypi = __esm({
128728
128755
  return void 0;
128729
128756
  }
128730
128757
  const versions = uniquePackages(packageFiles.map((f4) => f4.filename));
128731
- const [owner, repo] = this.config.internalPypiRepo.split("/");
128758
+ const typedConfig = this.config;
128759
+ const [owner, repo] = typedConfig.internalPypiRepo.split("/");
128732
128760
  const [contents, tree, commit] = await withTempDir(async (directory) => {
128733
- await spawnProcess2(
128761
+ await spawnProcess(
128734
128762
  "git",
128735
128763
  [
128736
128764
  "clone",
128737
128765
  "--quiet",
128738
128766
  "--depth=1",
128739
- `https://github.com/${this.config.internalPypiRepo}`,
128767
+ `https://github.com/${typedConfig.internalPypiRepo}`,
128740
128768
  directory
128741
128769
  ],
128742
128770
  {},
128743
128771
  { enableInDryRunMode: true }
128744
128772
  );
128745
- await spawnProcess2(
128773
+ await spawnProcess(
128746
128774
  "python3",
128747
128775
  ["-m", "add_pkg", "--skip-resolve", ...versions],
128748
128776
  { cwd: directory },
@@ -128751,13 +128779,13 @@ var init_sentryPypi = __esm({
128751
128779
  const contents2 = import_fs16.default.readFileSync(import_path13.default.join(directory, "packages.ini"), {
128752
128780
  encoding: "utf-8"
128753
128781
  });
128754
- const tree2 = (await spawnProcess2(
128782
+ const tree2 = (await spawnProcess(
128755
128783
  "git",
128756
128784
  ["-C", directory, "rev-parse", "HEAD:"],
128757
128785
  {},
128758
128786
  { enableInDryRunMode: true }
128759
128787
  )).toString("utf-8").trim();
128760
- const commit2 = (await spawnProcess2(
128788
+ const commit2 = (await spawnProcess(
128761
128789
  "git",
128762
128790
  ["-C", directory, "rev-parse", "HEAD"],
128763
128791
  {},
@@ -129173,6 +129201,7 @@ async function getPackageManifest(baseDir, type2, canonicalName, version2, initi
129173
129201
  reportError(
129174
129202
  `Package "${canonicalName}" does not exist in the registry and no initial manifest data was provided.`
129175
129203
  );
129204
+ throw new Error("Unreachable");
129176
129205
  }
129177
129206
  if (!(0, import_fs18.existsSync)(fullPackageDir)) {
129178
129207
  logger.info(
@@ -129256,7 +129285,8 @@ var init_registry2 = __esm({
129256
129285
  githubRepo;
129257
129286
  constructor(config3, artifactProvider, githubRepo) {
129258
129287
  super(config3, artifactProvider, githubRepo);
129259
- const remote = this.config.remote;
129288
+ const typedConfig = this.config;
129289
+ const remote = typedConfig.remote;
129260
129290
  if (remote) {
129261
129291
  const [owner, repo] = remote.split("/", 2);
129262
129292
  this.remote = new GitHubRemote(owner, repo);
@@ -129271,8 +129301,11 @@ var init_registry2 = __esm({
129271
129301
  * Extracts Registry target options from the raw configuration.
129272
129302
  */
129273
129303
  getRegistryConfig() {
129304
+ const typedConfig = this.config;
129274
129305
  const items = Object.entries(BATCH_KEYS).flatMap(
129275
- ([key, type2]) => Object.entries(this.config[key] || {}).map(([canonicalName, conf]) => {
129306
+ ([key, type2]) => Object.entries(
129307
+ typedConfig[key] || {}
129308
+ ).map(([canonicalName, conf]) => {
129276
129309
  const config3 = conf;
129277
129310
  const result = Object.assign(/* @__PURE__ */ Object.create(null), config3, {
129278
129311
  type: type2,
@@ -129284,7 +129317,7 @@ var init_registry2 = __esm({
129284
129317
  return result;
129285
129318
  })
129286
129319
  );
129287
- if (items.length === 0 && this.config.type) {
129320
+ if (items.length === 0 && typedConfig.type) {
129288
129321
  this.logger.warn(
129289
129322
  "You are using a deprecated registry target config, please update."
129290
129323
  );
@@ -129294,8 +129327,9 @@ var init_registry2 = __esm({
129294
129327
  }
129295
129328
  }
129296
129329
  getLegacyRegistryConfig() {
129297
- const registryType = this.config.type;
129298
- if (["app" /* APP */, "sdk" /* SDK */].indexOf(
129330
+ const typedConfig = this.config;
129331
+ const registryType = typedConfig.type;
129332
+ if (!registryType || ["app" /* APP */, "sdk" /* SDK */].indexOf(
129299
129333
  registryType
129300
129334
  ) === -1) {
129301
129335
  throw new ConfigurationError(
@@ -129304,14 +129338,14 @@ var init_registry2 = __esm({
129304
129338
  }
129305
129339
  let urlTemplate;
129306
129340
  if (registryType === "app" /* APP */) {
129307
- urlTemplate = this.config.urlTemplate;
129341
+ urlTemplate = typedConfig.urlTemplate;
129308
129342
  if (urlTemplate && typeof urlTemplate !== "string") {
129309
129343
  throw new ConfigurationError(
129310
129344
  `Invalid "urlTemplate" specified: ${urlTemplate}`
129311
129345
  );
129312
129346
  }
129313
129347
  }
129314
- const releaseConfig = this.config.config;
129348
+ const releaseConfig = typedConfig.config;
129315
129349
  if (!releaseConfig) {
129316
129350
  throw new ConfigurationError(
129317
129351
  "Cannot find configuration dictionary for release registry"
@@ -129323,12 +129357,12 @@ var init_registry2 = __esm({
129323
129357
  "Canonical name not found in the configuration"
129324
129358
  );
129325
129359
  }
129326
- const linkPrereleases = this.config.linkPrereleases || false;
129360
+ const linkPrereleases = typedConfig.linkPrereleases || false;
129327
129361
  if (typeof linkPrereleases !== "boolean") {
129328
129362
  throw new ConfigurationError('Invlaid type of "linkPrereleases"');
129329
129363
  }
129330
- const checksums = castChecksums(this.config.checksums);
129331
- const onlyIfPresentStr = this.config.onlyIfPresent || void 0;
129364
+ const checksums = castChecksums(typedConfig.checksums);
129365
+ const onlyIfPresentStr = typedConfig.onlyIfPresent || void 0;
129332
129366
  let onlyIfPresent;
129333
129367
  if (onlyIfPresentStr) {
129334
129368
  if (typeof onlyIfPresentStr !== "string") {
@@ -129447,15 +129481,19 @@ var init_registry2 = __esm({
129447
129481
  "Adding extra data (checksums, download links) for available artifacts..."
129448
129482
  );
129449
129483
  const files = {};
129450
- await (0, import_async7.mapLimit)(artifacts, MAX_DOWNLOAD_CONCURRENCY, async (artifact) => {
129451
- const fileData = await this.getArtifactData(
129452
- registryConfig,
129453
- artifact,
129454
- version2,
129455
- revision
129456
- );
129457
- files[artifact.filename] = fileData;
129458
- });
129484
+ await (0, import_async7.mapLimit)(
129485
+ artifacts,
129486
+ MAX_DOWNLOAD_CONCURRENCY,
129487
+ async (artifact) => {
129488
+ const fileData = await this.getArtifactData(
129489
+ registryConfig,
129490
+ artifact,
129491
+ version2,
129492
+ revision
129493
+ );
129494
+ files[artifact.filename] = fileData;
129495
+ }
129496
+ );
129459
129497
  packageManifest.files = files;
129460
129498
  }
129461
129499
  /**
@@ -129574,12 +129612,9 @@ var init_registry2 = __esm({
129574
129612
  }
129575
129613
  const onlyIfPresentPattern = registryConfig.onlyIfPresent;
129576
129614
  if (onlyIfPresentPattern) {
129577
- const artifacts = await this.artifactProvider.filterArtifactsForRevision(
129578
- revision,
129579
- {
129580
- includeNames: onlyIfPresentPattern
129581
- }
129582
- );
129615
+ const artifacts = await this.artifactProvider.filterArtifactsForRevision(revision, {
129616
+ includeNames: onlyIfPresentPattern
129617
+ });
129583
129618
  if (artifacts.length === 0) {
129584
129619
  this.logger.warn(
129585
129620
  `No files found that match "${onlyIfPresentPattern.toString()}", skipping the target.`
@@ -159656,11 +159691,12 @@ var init_awsLambdaLayer = __esm({
159656
159691
  Please use AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables.`
159657
159692
  );
159658
159693
  }
159694
+ const config3 = this.config;
159659
159695
  return {
159660
159696
  awsAccessKeyId: process.env.AWS_ACCESS_KEY_ID,
159661
159697
  awsSecretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
159662
159698
  registryRemote: DEFAULT_REGISTRY_REMOTE,
159663
- linkPrereleases: this.config.linkPrereleases || false
159699
+ linkPrereleases: config3.linkPrereleases || false
159664
159700
  };
159665
159701
  }
159666
159702
  /**
@@ -159763,7 +159799,8 @@ var init_awsLambdaLayer = __esm({
159763
159799
  }, "publishRuntimes(...)");
159764
159800
  await git.add(["."]);
159765
159801
  await git.checkout("master");
159766
- const runtimeNames = this.config.compatibleRuntimes.map(
159802
+ const config3 = this.config;
159803
+ const runtimeNames = config3.compatibleRuntimes.map(
159767
159804
  (runtime) => runtime.name
159768
159805
  );
159769
159806
  await git.commit(
@@ -159826,13 +159863,14 @@ v${version2} for ${runtimeNames}`
159826
159863
  async publishRuntimes(version2, directory, awsRegions, artifactBuffer) {
159827
159864
  const resolvedLayerName = this.resolveLayerName(version2);
159828
159865
  this.logger.debug(`Resolved layer name: ${resolvedLayerName}`);
159866
+ const config3 = this.config;
159829
159867
  await Promise.all(
159830
- this.config.compatibleRuntimes.map(async (runtime) => {
159868
+ config3.compatibleRuntimes.map(async (runtime) => {
159831
159869
  this.logger.debug(`Publishing runtime ${runtime.name}...`);
159832
159870
  const layerManager = new AwsLambdaLayerManager(
159833
159871
  runtime,
159834
159872
  resolvedLayerName,
159835
- this.config.license,
159873
+ config3.license,
159836
159874
  artifactBuffer,
159837
159875
  awsRegions,
159838
159876
  version2
@@ -159986,19 +160024,21 @@ var init_upm = __esm({
159986
160024
  this.logger.info(
159987
160025
  `Found artifact: "${packageFile.filename}", downloading...`
159988
160026
  );
159989
- const artifactPath = await this.artifactProvider.downloadArtifact(
159990
- packageFile
159991
- );
160027
+ const artifactPath = await this.artifactProvider.downloadArtifact(packageFile);
160028
+ const typedConfig = this.config;
159992
160029
  const remote = new GitHubRemote(
159993
- this.config.releaseRepoOwner,
159994
- this.config.releaseRepoName,
160030
+ typedConfig.releaseRepoOwner,
160031
+ typedConfig.releaseRepoName,
159995
160032
  getGitHubApiToken()
159996
160033
  );
159997
160034
  const remoteAddr = remote.getRemoteString();
159998
160035
  this.logger.debug(`Target release repository: ${remoteAddr}`);
159999
160036
  await withTempDir(
160000
160037
  async (directory) => {
160001
- const git = await cloneRepo(remote.getRemoteStringWithAuth(), directory);
160038
+ const git = await cloneRepo(
160039
+ remote.getRemoteStringWithAuth(),
160040
+ directory
160041
+ );
160002
160042
  this.logger.info("Clearing the repository.");
160003
160043
  await git.rm(["-r", "-f", "."]);
160004
160044
  this.logger.info(`Extracting "${packageFile.filename}".`);
@@ -160521,7 +160561,7 @@ var init_env = __esm({
160521
160561
  async function importGPGKey(privateKey) {
160522
160562
  const PRIVATE_KEY_FILE = path24.join((0, import_os2.tmpdir)(), "private-key.asc");
160523
160563
  await import_fs20.promises.writeFile(PRIVATE_KEY_FILE, privateKey);
160524
- await spawnProcess2(`gpg`, ["--batch", "--import", PRIVATE_KEY_FILE]);
160564
+ await spawnProcess(`gpg`, ["--batch", "--import", PRIVATE_KEY_FILE]);
160525
160565
  await import_fs20.promises.unlink(PRIVATE_KEY_FILE);
160526
160566
  }
160527
160567
  var import_os2, import_fs20, path24;
@@ -160615,71 +160655,72 @@ var init_maven = __esm({
160615
160655
  }, {});
160616
160656
  }
160617
160657
  getOuterTargetSettings() {
160658
+ const config3 = this.config;
160618
160659
  const settings = targetOptions.map((setting) => {
160619
- if (!this.config[setting]) {
160660
+ if (!config3[setting]) {
160620
160661
  throw new ConfigurationError(
160621
160662
  `Required configuration ${setting} not found in configuration file. See the documentation for more details.`
160622
160663
  );
160623
160664
  }
160624
160665
  return {
160625
160666
  name: setting,
160626
- value: this.config[setting]
160667
+ value: config3[setting]
160627
160668
  };
160628
160669
  });
160629
160670
  return this.reduceConfig(settings);
160630
160671
  }
160631
160672
  getKotlinMultiplatformSettings() {
160632
- if (this.config.kmp === false || !this.config.kmp) {
160673
+ const config3 = this.config;
160674
+ if (config3.kmp === false || !config3.kmp) {
160633
160675
  return {
160634
160676
  kmp: false
160635
160677
  };
160636
160678
  }
160637
- if (!this.config.kmp.rootDistDirRegex) {
160679
+ if (!config3.kmp.rootDistDirRegex) {
160638
160680
  throw new ConfigurationError(
160639
160681
  "Required root configuration for Kotlin Multiplatform is incorrect. See the documentation for more details."
160640
160682
  );
160641
160683
  }
160642
- if (!this.config.kmp.appleDistDirRegex) {
160684
+ if (!config3.kmp.appleDistDirRegex) {
160643
160685
  throw new ConfigurationError(
160644
160686
  "Required apple configuration for Kotlin Multiplatform is incorrect. See the documentation for more details."
160645
160687
  );
160646
160688
  }
160647
- if (!this.config.kmp.klibDistDirRegex) {
160689
+ if (!config3.kmp.klibDistDirRegex) {
160648
160690
  throw new ConfigurationError(
160649
160691
  "Required klib configuration for Kotlin Multiplatform is incorrect. See the documentation for more details."
160650
160692
  );
160651
160693
  }
160652
160694
  return {
160653
160695
  kmp: {
160654
- appleDistDirRegex: stringToRegexp(this.config.kmp.appleDistDirRegex),
160655
- rootDistDirRegex: stringToRegexp(this.config.kmp.rootDistDirRegex),
160656
- klibDistDirRegex: stringToRegexp(this.config.kmp.klibDistDirRegex)
160696
+ appleDistDirRegex: stringToRegexp(config3.kmp.appleDistDirRegex),
160697
+ rootDistDirRegex: stringToRegexp(config3.kmp.rootDistDirRegex),
160698
+ klibDistDirRegex: stringToRegexp(config3.kmp.klibDistDirRegex)
160657
160699
  }
160658
160700
  };
160659
160701
  }
160660
160702
  getAndroidSettings() {
160661
- if (this.config.android === false) {
160703
+ const config3 = this.config;
160704
+ if (config3.android === false) {
160662
160705
  return {
160663
160706
  android: false
160664
160707
  };
160665
160708
  }
160666
- if (!this.config.android) {
160709
+ if (!config3.android) {
160667
160710
  throw new ConfigurationError(
160668
160711
  "Required Android configuration was not found in the configuration file. See the documentation for more details"
160669
160712
  );
160670
160713
  }
160671
- if (!this.config.android.distDirRegex || !this.config.android.fileReplaceeRegex || !this.config.android.fileReplacerStr) {
160714
+ if (!config3.android.distDirRegex || !config3.android.fileReplaceeRegex || !config3.android.fileReplacerStr) {
160672
160715
  throw new ConfigurationError(
160673
160716
  "Required Android configuration is incorrect. See the documentation for more details."
160674
160717
  );
160675
160718
  }
160676
160719
  return {
160677
160720
  android: {
160678
- distDirRegex: stringToRegexp(this.config.android.distDirRegex),
160679
- fileReplaceeRegex: stringToRegexp(
160680
- this.config.android.fileReplaceeRegex
160681
- ),
160682
- fileReplacerStr: this.config.android.fileReplacerStr
160721
+ distDirRegex: stringToRegexp(config3.android.distDirRegex),
160722
+ fileReplaceeRegex: stringToRegexp(config3.android.fileReplaceeRegex),
160723
+ fileReplacerStr: config3.android.fileReplacerStr
160683
160724
  }
160684
160725
  };
160685
160726
  }
@@ -160730,9 +160771,7 @@ var init_maven = __esm({
160730
160771
  */
160731
160772
  async uploadArtifact(artifact) {
160732
160773
  this.logger.debug("Downloading:", artifact.filename);
160733
- const downloadedPkgPath = await this.artifactProvider.downloadArtifact(
160734
- artifact
160735
- );
160774
+ const downloadedPkgPath = await this.artifactProvider.downloadArtifact(artifact);
160736
160775
  this.logger.debug(`Extracting ${artifact.filename}: `, downloadedPkgPath);
160737
160776
  await withTempDir(async (dir) => {
160738
160777
  await extractZipArchive(downloadedPkgPath, dir);
@@ -160814,22 +160853,12 @@ Error:
160814
160853
  async uploadKmpPomDistribution(distDir) {
160815
160854
  if (this.mavenConfig.kmp !== false) {
160816
160855
  const moduleName = (0, import_path16.parse)(distDir).base;
160817
- const isRootDistDir = this.mavenConfig.kmp.rootDistDirRegex.test(
160818
- moduleName
160819
- );
160820
- const isAppleDistDir = this.mavenConfig.kmp.appleDistDirRegex.test(
160821
- moduleName
160822
- );
160823
- const isKlibDistDir = this.mavenConfig.kmp.klibDistDirRegex.test(
160824
- moduleName
160825
- );
160856
+ const isRootDistDir = this.mavenConfig.kmp.rootDistDirRegex.test(moduleName);
160857
+ const isAppleDistDir = this.mavenConfig.kmp.appleDistDirRegex.test(moduleName);
160858
+ const isKlibDistDir = this.mavenConfig.kmp.klibDistDirRegex.test(moduleName);
160826
160859
  const files = await this.getFilesForKmpMavenPomDist(distDir);
160827
160860
  const { targetFile, pomFile } = files;
160828
- const {
160829
- sideArtifacts,
160830
- classifiers,
160831
- types: types3
160832
- } = this.transformKmpSideArtifacts(
160861
+ const { sideArtifacts, classifiers, types: types3 } = this.transformKmpSideArtifacts(
160833
160862
  isRootDistDir,
160834
160863
  isAppleDistDir,
160835
160864
  isKlibDistDir,
@@ -160940,7 +160969,7 @@ Error:
160940
160969
  if (stat.isFile()) {
160941
160970
  return pomFilepath;
160942
160971
  }
160943
- } catch (e4) {
160972
+ } catch {
160944
160973
  }
160945
160974
  return void 0;
160946
160975
  }
@@ -160953,7 +160982,7 @@ Error:
160953
160982
  if (stat.isFile()) {
160954
160983
  return true;
160955
160984
  }
160956
- } catch (e4) {
160985
+ } catch {
160957
160986
  }
160958
160987
  return false;
160959
160988
  }
@@ -160975,13 +161004,7 @@ Error:
160975
161004
  if (this.mavenConfig.kmp !== false) {
160976
161005
  await this.uploadKmpPomDistribution(distDir);
160977
161006
  } else {
160978
- const {
160979
- targetFile,
160980
- javadocFile,
160981
- sourcesFile,
160982
- pomFile,
160983
- moduleFile
160984
- } = this.getFilesForMavenPomDist(distDir);
161007
+ const { targetFile, javadocFile, sourcesFile, pomFile, moduleFile } = this.getFilesForMavenPomDist(distDir);
160985
161008
  await this.fixModuleFileName(distDir, moduleFile);
160986
161009
  const hasModule = await this.fileExists(moduleFile);
160987
161010
  await retrySpawnProcess(this.mavenConfig.mavenCliPath, [
@@ -161028,11 +161051,7 @@ Error:
161028
161051
  await this.fixModuleFileName(distDir, files.moduleFile);
161029
161052
  const moduleName = (0, import_path16.parse)(distDir).base;
161030
161053
  if (this.mavenConfig.kmp !== false) {
161031
- const {
161032
- klibDistDirRegex,
161033
- appleDistDirRegex,
161034
- rootDistDirRegex
161035
- } = this.mavenConfig.kmp;
161054
+ const { klibDistDirRegex, appleDistDirRegex, rootDistDirRegex } = this.mavenConfig.kmp;
161036
161055
  const isRootDistDir = rootDistDirRegex.test(moduleName);
161037
161056
  const isAppleDistDir = appleDistDirRegex.test(moduleName);
161038
161057
  const isKlibDistDir = klibDistDirRegex.test(moduleName);
@@ -161069,9 +161088,7 @@ Error:
161069
161088
  getTargetFilename(distDir) {
161070
161089
  const moduleName = (0, import_path16.parse)(distDir).base;
161071
161090
  if (this.mavenConfig.android !== false) {
161072
- const isAndroidDistDir = this.mavenConfig.android.distDirRegex.test(
161073
- moduleName
161074
- );
161091
+ const isAndroidDistDir = this.mavenConfig.android.distDirRegex.test(moduleName);
161075
161092
  if (isAndroidDistDir) {
161076
161093
  return moduleName.replace(
161077
161094
  this.mavenConfig.android.fileReplaceeRegex,
@@ -161252,20 +161269,21 @@ var init_symbolCollector = __esm({
161252
161269
  }
161253
161270
  getSymbolCollectorConfig() {
161254
161271
  checkExecutableIsPresent(SYM_COLLECTOR_BIN_NAME);
161255
- if (!this.config.batchType) {
161272
+ const config3 = this.config;
161273
+ if (!config3.batchType) {
161256
161274
  throw new ConfigurationError(
161257
161275
  "The required `batchType` parameter is missing in the configuration file. See the documentation for more details."
161258
161276
  );
161259
161277
  }
161260
- if (!this.config.bundleIdPrefix) {
161278
+ if (!config3.bundleIdPrefix) {
161261
161279
  throw new ConfigurationError(
161262
161280
  "The required `bundleIdPrefix` parameter is missing in the configuration file. See the documentation for more details."
161263
161281
  );
161264
161282
  }
161265
161283
  return {
161266
- serverEndpoint: this.config.serverEndpoint || DEFAULT_SYM_COLLECTOR_SERVER_ENDPOINT,
161267
- batchType: this.config.batchType,
161268
- bundleIdPrefix: this.config.bundleIdPrefix
161284
+ serverEndpoint: config3.serverEndpoint || DEFAULT_SYM_COLLECTOR_SERVER_ENDPOINT,
161285
+ batchType: config3.batchType,
161286
+ bundleIdPrefix: config3.bundleIdPrefix
161269
161287
  };
161270
161288
  }
161271
161289
  async publish(version2, revision) {
@@ -161288,7 +161306,7 @@ var init_symbolCollector = __esm({
161288
161306
  await this.artifactProvider.downloadArtifact(artifact, subdirPath);
161289
161307
  })
161290
161308
  );
161291
- const cmdOutput = await spawnProcess2(SYM_COLLECTOR_BIN_NAME, [
161309
+ const cmdOutput = await spawnProcess(SYM_COLLECTOR_BIN_NAME, [
161292
161310
  "--upload",
161293
161311
  "directory",
161294
161312
  "--path",
@@ -161379,11 +161397,12 @@ var init_pubDev = __esm({
161379
161397
  * @returns the pub-dev config for this target.
161380
161398
  */
161381
161399
  getPubDevConfig() {
161400
+ const targetConfig = this.config;
161382
161401
  const config3 = {
161383
- dartCliPath: this.config.dartCliPath || "dart",
161384
- packages: this.config.packages ? Object.keys(this.config.packages) : ["."],
161402
+ dartCliPath: targetConfig.dartCliPath || "dart",
161403
+ packages: targetConfig.packages ? Object.keys(targetConfig.packages) : ["."],
161385
161404
  ...this.getTargetSecrets(),
161386
- skipValidation: this.config.skipValidation ?? false
161405
+ skipValidation: targetConfig.skipValidation ?? false
161387
161406
  };
161388
161407
  this.checkRequiredSoftware(config3);
161389
161408
  return config3;
@@ -161508,7 +161527,7 @@ var init_pubDev = __esm({
161508
161527
  if (this.pubDevConfig.skipValidation) {
161509
161528
  args.push("--skip-validation");
161510
161529
  }
161511
- await spawnProcess2(
161530
+ await spawnProcess(
161512
161531
  this.pubDevConfig.dartCliPath,
161513
161532
  args,
161514
161533
  {
@@ -161636,25 +161655,25 @@ var init_hex = __esm({
161636
161655
  await this.cloneRepository(this.githubRepo, revision, directory);
161637
161656
  const spawnOptions = { cwd: directory };
161638
161657
  const spawnProcessOptions = { showStdout: true };
161639
- await spawnProcess2(
161658
+ await spawnProcess(
161640
161659
  MIX_BIN,
161641
161660
  ["local.hex", "--force"],
161642
161661
  spawnOptions,
161643
161662
  spawnProcessOptions
161644
161663
  );
161645
- await spawnProcess2(
161664
+ await spawnProcess(
161646
161665
  MIX_BIN,
161647
161666
  ["local.rebar", "--force"],
161648
161667
  spawnOptions,
161649
161668
  spawnProcessOptions
161650
161669
  );
161651
- await spawnProcess2(
161670
+ await spawnProcess(
161652
161671
  MIX_BIN,
161653
161672
  ["deps.get"],
161654
161673
  spawnOptions,
161655
161674
  spawnProcessOptions
161656
161675
  );
161657
- await spawnProcess2(
161676
+ await spawnProcess(
161658
161677
  MIX_BIN,
161659
161678
  ["hex.publish", "--yes"],
161660
161679
  spawnOptions,
@@ -161754,13 +161773,7 @@ var init_commitOnGitRepository = __esm({
161754
161773
  * @param revision Git commit SHA to be published
161755
161774
  */
161756
161775
  async publish(version2, revision) {
161757
- const {
161758
- archive,
161759
- branch,
161760
- repositoryUrl,
161761
- createTag,
161762
- stripComponents
161763
- } = this.getGitRepositoryTargetConfig();
161776
+ const { archive, branch, repositoryUrl, createTag, stripComponents } = this.getGitRepositoryTargetConfig();
161764
161777
  this.logger.info(`Finding archive with regexp "${archive}"...`);
161765
161778
  const archives = await this.getArtifactsForRevision(revision, {
161766
161779
  includeNames: archive
@@ -161804,12 +161817,13 @@ var init_commitOnGitRepository = __esm({
161804
161817
  `\`repositoryUrl\` option has invalid value ${this.config["branch"]}. Needs to be string.`
161805
161818
  );
161806
161819
  }
161820
+ const config3 = this.config;
161807
161821
  return {
161808
161822
  archive: this.config["archive"],
161809
161823
  repositoryUrl: this.config["repositoryUrl"],
161810
161824
  branch: this.config["branch"],
161811
- createTag: this.config["createTag"] ?? true,
161812
- stripComponents: this.config["stripComponents"]
161825
+ createTag: config3.createTag ?? true,
161826
+ stripComponents: config3.stripComponents
161813
161827
  };
161814
161828
  }
161815
161829
  };
@@ -161840,10 +161854,11 @@ var init_powershell = __esm({
161840
161854
  };
161841
161855
  constructor(config3, artifactProvider) {
161842
161856
  super(config3, artifactProvider);
161857
+ const typedConfig = this.config;
161843
161858
  this.psConfig = {
161844
161859
  apiKey: process.env.POWERSHELL_API_KEY || "",
161845
- repository: this.config.repository || DEFAULT_POWERSHELL_REPOSITORY,
161846
- module: this.config.module || ""
161860
+ repository: typedConfig.repository || DEFAULT_POWERSHELL_REPOSITORY,
161861
+ module: typedConfig.module || ""
161847
161862
  };
161848
161863
  checkExecutableIsPresent(POWERSHELL_BIN);
161849
161864
  }
@@ -161854,7 +161869,7 @@ var init_powershell = __esm({
161854
161869
  command10 = `$ErrorActionPreference = 'Stop'
161855
161870
  ` + command10;
161856
161871
  this.logger.trace("Executing PowerShell command:", command10);
161857
- return spawnProcess2(
161872
+ return spawnProcess(
161858
161873
  POWERSHELL_BIN,
161859
161874
  ["-Command", command10],
161860
161875
  {},
@@ -161891,7 +161906,7 @@ var init_powershell = __esm({
161891
161906
  async publish(_version, revision) {
161892
161907
  this.checkProjectConfig();
161893
161908
  this.logger.info(`PowerShell (${POWERSHELL_BIN}) info:`);
161894
- await spawnProcess2(
161909
+ await spawnProcess(
161895
161910
  POWERSHELL_BIN,
161896
161911
  ["--version"],
161897
161912
  {},
@@ -162331,7 +162346,7 @@ var require_package6 = __commonJS({
162331
162346
  "package.json"(exports2, module2) {
162332
162347
  module2.exports = {
162333
162348
  name: "@sentry/craft",
162334
- version: "2.21.1",
162349
+ version: "2.21.2",
162335
162350
  description: "The universal sentry workflow CLI",
162336
162351
  main: "dist/craft",
162337
162352
  repository: "https://github.com/getsentry/craft",
@@ -162364,6 +162379,7 @@ var require_package6 = __commonJS({
162364
162379
  "@types/ora": "^1.3.4",
162365
162380
  "@types/prompts": "^2.0.11",
162366
162381
  "@types/rimraf": "^2.0.2",
162382
+ "@types/semver": "^7.7.1",
162367
162383
  "@types/shell-quote": "^1.6.0",
162368
162384
  "@types/tar": "^4.0.0",
162369
162385
  "@types/tmp": "^0.0.33",
@@ -162399,6 +162415,7 @@ var require_package6 = __commonJS({
162399
162415
  "string-length": "3.1.0",
162400
162416
  tar: "7.5.7",
162401
162417
  tmp: "0.2.4",
162418
+ tslib: "^2.8.1",
162402
162419
  typescript: "^5.7.2",
162403
162420
  "typescript-eslint": "^8.18.2",
162404
162421
  vitest: "^3.0.2",
@@ -162416,6 +162433,7 @@ var require_package6 = __commonJS({
162416
162433
  fix: "pnpm lint --fix",
162417
162434
  test: "vitest run",
162418
162435
  "test:watch": "vitest",
162436
+ typecheck: "tsc --noEmit",
162419
162437
  "docs:dev": "cd docs && pnpm dev",
162420
162438
  "docs:build": "cd docs && pnpm build"
162421
162439
  },
@@ -162497,7 +162515,7 @@ function getPackage() {
162497
162515
  }
162498
162516
  function getPackageVersion() {
162499
162517
  const { version: version2 } = getPackage();
162500
- const buildInfo = "564d9f5a3186fd8685cc17e5fe9c6915531ff98d";
162518
+ const buildInfo = "63d1636bead951f6e034ed62c2a3610965fef010";
162501
162519
  return buildInfo ? `${version2} (${buildInfo})` : version2;
162502
162520
  }
162503
162521
  function semVerToString(s4) {
@@ -170821,7 +170839,7 @@ async function runPostReleaseCommand(newVersion, postReleaseCommand) {
170821
170839
  }
170822
170840
  args = [...args, "", newVersion];
170823
170841
  logger.info(`Running the post-release command...`);
170824
- await spawnProcess2(sysCommand, args, {
170842
+ await spawnProcess(sysCommand, args, {
170825
170843
  env: {
170826
170844
  CRAFT_NEW_VERSION: newVersion,
170827
170845
  CRAFT_OLD_VERSION: "",
@@ -170955,7 +170973,9 @@ async function publishMain(argv) {
170955
170973
  argv.mergeTarget,
170956
170974
  argv.keepBranch
170957
170975
  );
170958
- safeFs.unlink(publishStateFile).catch((err) => logger.trace("Couldn't remove publish state file: ", err));
170976
+ safeFs.unlink(publishStateFile).catch(
170977
+ (err) => logger.trace("Couldn't remove publish state file: ", err)
170978
+ );
170959
170979
  logger.success(`Version ${newVersion} has been published!`);
170960
170980
  } else {
170961
170981
  const msg = [
@@ -171131,7 +171151,7 @@ async function runCustomPreReleaseCommand(oldVersion, newVersion, preReleaseComm
171131
171151
  CRAFT_NEW_VERSION: newVersion,
171132
171152
  CRAFT_OLD_VERSION: nonEmptyOldVersion
171133
171153
  };
171134
- await spawnProcess2(sysCommand, args, {
171154
+ await spawnProcess(sysCommand, args, {
171135
171155
  env: { ...process.env, ...additionalEnv }
171136
171156
  });
171137
171157
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/craft",
3
- "version": "2.21.1",
3
+ "version": "2.21.2",
4
4
  "description": "The universal sentry workflow CLI",
5
5
  "main": "dist/craft",
6
6
  "repository": "https://github.com/getsentry/craft",
@@ -33,6 +33,7 @@
33
33
  "@types/ora": "^1.3.4",
34
34
  "@types/prompts": "^2.0.11",
35
35
  "@types/rimraf": "^2.0.2",
36
+ "@types/semver": "^7.7.1",
36
37
  "@types/shell-quote": "^1.6.0",
37
38
  "@types/tar": "^4.0.0",
38
39
  "@types/tmp": "^0.0.33",
@@ -68,6 +69,7 @@
68
69
  "string-length": "3.1.0",
69
70
  "tar": "7.5.7",
70
71
  "tmp": "0.2.4",
72
+ "tslib": "^2.8.1",
71
73
  "typescript": "^5.7.2",
72
74
  "typescript-eslint": "^8.18.2",
73
75
  "vitest": "^3.0.2",
@@ -85,6 +87,7 @@
85
87
  "fix": "pnpm lint --fix",
86
88
  "test": "vitest run",
87
89
  "test:watch": "vitest",
90
+ "typecheck": "tsc --noEmit",
88
91
  "docs:dev": "cd docs && pnpm dev",
89
92
  "docs:build": "cd docs && pnpm build"
90
93
  },