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Q,EAAO,QAAS,CAAC,QAAQ,OAAQ,QAAQ,OAAQ,EAAQ,GAAQ,OAAO,UAClF,cAAc,IAEV,EAAU,CACd,MACA,MACA,OAAQ,GAAU,QAAQ,OAC1B,OAAQ,GAAU,QAAQ,OAC1B,MAAO,MAAM,CAAE,MAAK,SAEtB,EAAQ,OAAS,UAAU,GAC3B,EAAQ,OAAO,IAAI,WAAW,IAAI,gBAAgB,IAAI,WACtD,IACE,MAAM,QAAE,EAAO,QAAE,SAAkB,UAAU,EAAS,GACtD,EAAQ,sBAAwB,EAAQ,cACxC,EAAQ,QAAU,EAClB,IACE,MAAM,QAAe,IAAI,EAAS,GAElC,OADA,IACO,CACT,CAAE,MAAO,GAEP,YADM,SAAS,EAAS,EAAS,GAC3B,CACR,CACF,CAAE,MAAO,GAGP,YAFM,UAAU,EAAS,GACzB,IACM,CACR","file":"/npm/semantic-release@25.0.3/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/semantic-release@25.0.3/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import { createRequire } from \"node:module\";\nimport { pick } from \"lodash-es\";\nimport * as marked from \"marked\";\nimport envCi from \"env-ci\";\nimport { hookStd } from \"hook-std\";\nimport semver from \"semver\";\nimport AggregateError from \"aggregate-error\";\nimport hideSensitive from \"./lib/hide-sensitive.js\";\nimport getConfig from \"./lib/get-config.js\";\nimport verify from \"./lib/verify.js\";\nimport getNextVersion from \"./lib/get-next-version.js\";\nimport getCommits from \"./lib/get-commits.js\";\nimport getLastRelease from \"./lib/get-last-release.js\";\nimport getReleaseToAdd from \"./lib/get-release-to-add.js\";\nimport { extractErrors, makeTag } from \"./lib/utils.js\";\nimport getGitAuthUrl from \"./lib/get-git-auth-url.js\";\nimport getBranches from \"./lib/branches/index.js\";\nimport getLogger from \"./lib/get-logger.js\";\nimport { addNote, getGitHead, getTagHead, isBranchUpToDate, push, pushNotes, tag, verifyAuth } from \"./lib/git.js\";\nimport getError from \"./lib/get-error.js\";\nimport { COMMIT_EMAIL, COMMIT_NAME } from \"./lib/definitions/constants.js\";\n\nconst require = createRequire(import.meta.url);\nconst pkg = require(\"./package.json\");\n\nlet markedOptionsSet = false;\nasync function terminalOutput(text) {\n  if (!markedOptionsSet) {\n    const { default: TerminalRenderer } = await import(\"marked-terminal\"); // eslint-disable-line node/no-unsupported-features/es-syntax\n    marked.setOptions({ renderer: new TerminalRenderer() });\n    markedOptionsSet = true;\n  }\n\n  return marked.parse(text);\n}\n\n/* eslint complexity: off */\nasync function run(context, plugins) {\n  const { cwd, env, options, logger, envCi } = context;\n  const { isCi, branch, prBranch, isPr } = envCi;\n  const ciBranch = isPr ? prBranch : branch;\n\n  if (!isCi && !options.dryRun && !options.noCi) {\n    logger.warn(\"This run was not triggered in a known CI environment, running in dry-run mode.\");\n    options.dryRun = true;\n  } else {\n    // When running on CI, set the commits author and committer info and prevent the `git` CLI to prompt for username/password. See #703.\n    Object.assign(env, {\n      GIT_AUTHOR_NAME: COMMIT_NAME,\n      GIT_AUTHOR_EMAIL: COMMIT_EMAIL,\n      GIT_COMMITTER_NAME: COMMIT_NAME,\n      GIT_COMMITTER_EMAIL: COMMIT_EMAIL,\n      ...env,\n      GIT_ASKPASS: \"echo\",\n      GIT_TERMINAL_PROMPT: 0,\n    });\n  }\n\n  if (isCi && isPr && !options.noCi) {\n    logger.log(\"This run was triggered by a pull request and therefore a new version won't be published.\");\n    return false;\n  }\n\n  // Verify config\n  await verify(context);\n\n  options.repositoryUrl = await getGitAuthUrl({ ...context, branch: { name: ciBranch } });\n  context.branches = await getBranches(options.repositoryUrl, ciBranch, context);\n  context.branch = context.branches.find(({ name }) => name === ciBranch);\n\n  if (!context.branch) {\n    logger.log(\n      `This test run was triggered on the branch ${ciBranch}, while semantic-release is configured to only publish from ${context.branches\n        .map(({ name }) => name)\n        .join(\", \")}, therefore a new version won’t be published.`\n    );\n    return false;\n  }\n\n  logger[options.dryRun ? \"warn\" : \"success\"](\n    `Run automated release from branch ${ciBranch} on repository ${options.originalRepositoryURL}${\n      options.dryRun ? \" in dry-run mode\" : \"\"\n    }`\n  );\n\n  try {\n    try {\n      await verifyAuth(options.repositoryUrl, context.branch.name, { cwd, env });\n    } catch (error) {\n      if (!(await isBranchUpToDate(options.repositoryUrl, context.branch.name, { cwd, env }))) {\n        logger.log(\n          `The local branch ${context.branch.name} is behind the remote one, therefore a new version won't be published.`\n        );\n        return false;\n      }\n\n      throw error;\n    }\n  } catch (error) {\n    logger.error(`The command \"${error.command}\" failed with the error message ${error.stderr}.`);\n    throw getError(\"EGITNOPERMISSION\", context);\n  }\n\n  logger.success(`Allowed to push to the Git repository`);\n\n  await plugins.verifyConditions(context);\n\n  const errors = [];\n  context.releases = [];\n  const releaseToAdd = getReleaseToAdd(context);\n\n  if (releaseToAdd) {\n    const { lastRelease, currentRelease, nextRelease } = releaseToAdd;\n\n    nextRelease.gitHead = await getTagHead(nextRelease.gitHead, { cwd, env });\n    currentRelease.gitHead = await getTagHead(currentRelease.gitHead, { cwd, env });\n    if (context.branch.mergeRange && !semver.satisfies(nextRelease.version, context.branch.mergeRange)) {\n      errors.push(getError(\"EINVALIDMAINTENANCEMERGE\", { ...context, nextRelease }));\n    } else {\n      const commits = await getCommits({ ...context, lastRelease, nextRelease });\n      nextRelease.notes = await plugins.generateNotes({ ...context, commits, lastRelease, nextRelease });\n\n      if (options.dryRun) {\n        logger.warn(`Skip ${nextRelease.gitTag} tag creation in dry-run mode`);\n      } else {\n        await addNote({ channels: [...currentRelease.channels, nextRelease.channel] }, nextRelease.gitTag, {\n          cwd,\n          env,\n        });\n        await push(options.repositoryUrl, { cwd, env });\n        await pushNotes(options.repositoryUrl, nextRelease.gitTag, {\n          cwd,\n          env,\n        });\n        logger.success(\n          `Add ${nextRelease.channel ? `channel ${nextRelease.channel}` : \"default channel\"} to tag ${\n            nextRelease.gitTag\n          }`\n        );\n      }\n\n      context.branch.tags.push({\n        version: nextRelease.version,\n        channel: nextRelease.channel,\n        gitTag: nextRelease.gitTag,\n        gitHead: nextRelease.gitHead,\n      });\n\n      const releases = await plugins.addChannel({ ...context, commits, lastRelease, currentRelease, nextRelease });\n      context.releases.push(...releases);\n      await plugins.success({ ...context, lastRelease, commits, nextRelease, releases });\n    }\n  }\n\n  if (errors.length > 0) {\n    throw new AggregateError(errors);\n  }\n\n  context.lastRelease = getLastRelease(context);\n  if (context.lastRelease.gitHead) {\n    context.lastRelease.gitHead = await getTagHead(context.lastRelease.gitHead, { cwd, env });\n  }\n\n  if (context.lastRelease.gitTag) {\n    logger.log(\n      `Found git tag ${context.lastRelease.gitTag} associated with version ${context.lastRelease.version} on branch ${context.branch.name}`\n    );\n  } else {\n    logger.log(`No git tag version found on branch ${context.branch.name}`);\n  }\n\n  context.commits = await getCommits(context);\n\n  const nextRelease = {\n    type: await plugins.analyzeCommits(context),\n    channel: context.branch.channel || null,\n    gitHead: await getGitHead({ cwd, env }),\n  };\n  if (!nextRelease.type) {\n    logger.log(\"There are no relevant changes, so no new version is released.\");\n    return context.releases.length > 0 ? { releases: context.releases } : false;\n  }\n\n  context.nextRelease = nextRelease;\n  nextRelease.version = getNextVersion(context);\n  nextRelease.gitTag = makeTag(options.tagFormat, nextRelease.version);\n  nextRelease.name = nextRelease.gitTag;\n\n  if (context.branch.type !== \"prerelease\" && !semver.satisfies(nextRelease.version, context.branch.range)) {\n    throw getError(\"EINVALIDNEXTVERSION\", {\n      ...context,\n      validBranches: context.branches.filter(\n        ({ type, accept }) => type !== \"prerelease\" && accept.includes(nextRelease.type)\n      ),\n    });\n  }\n\n  await plugins.verifyRelease(context);\n\n  nextRelease.notes = await plugins.generateNotes(context);\n\n  await plugins.prepare(context);\n\n  if (options.dryRun) {\n    logger.warn(`Skip ${nextRelease.gitTag} tag creation in dry-run mode`);\n  } else {\n    // Create the tag before calling the publish plugins as some require the tag to exists\n    await tag(nextRelease.gitTag, nextRelease.gitHead, { cwd, env });\n    await addNote({ channels: [nextRelease.channel] }, nextRelease.gitTag, { cwd, env });\n    await push(options.repositoryUrl, { cwd, env });\n    await pushNotes(options.repositoryUrl, nextRelease.gitTag, { cwd, env });\n    logger.success(`Created tag ${nextRelease.gitTag}`);\n  }\n\n  const releases = await plugins.publish(context);\n  context.releases.push(...releases);\n\n  await plugins.success({ ...context, releases });\n\n  logger.success(\n    `Published release ${nextRelease.version} on ${nextRelease.channel ? nextRelease.channel : \"default\"} channel`\n  );\n\n  if (options.dryRun) {\n    logger.log(`Release note for version ${nextRelease.version}:`);\n    if (nextRelease.notes) {\n      context.stdout.write(await terminalOutput(nextRelease.notes));\n    }\n  }\n\n  return pick(context, [\"lastRelease\", \"commits\", \"nextRelease\", \"releases\"]);\n}\n\nasync function logErrors({ logger, stderr }, err) {\n  const errors = extractErrors(err).sort((error) => (error.semanticRelease ? -1 : 0));\n  for (const error of errors) {\n    if (error.semanticRelease) {\n      logger.error(`${error.code} ${error.message}`);\n      if (error.details) {\n        stderr.write(await terminalOutput(error.details)); // eslint-disable-line no-await-in-loop\n      }\n    } else {\n      logger.error(\"An error occurred while running semantic-release: %O\", error);\n    }\n  }\n}\n\nasync function callFail(context, plugins, err) {\n  const errors = extractErrors(err).filter((err) => err.semanticRelease);\n  if (errors.length > 0) {\n    try {\n      await plugins.fail({ ...context, errors });\n    } catch (error) {\n      await logErrors(context, error);\n    }\n  }\n}\n\nexport default async (cliOptions = {}, { cwd = process.cwd(), env = process.env, stdout, stderr } = {}) => {\n  const { unhook } = hookStd(\n    { silent: false, streams: [process.stdout, process.stderr, stdout, stderr].filter(Boolean) },\n    hideSensitive(env)\n  );\n  const context = {\n    cwd,\n    env,\n    stdout: stdout || process.stdout,\n    stderr: stderr || process.stderr,\n    envCi: envCi({ env, cwd }),\n  };\n  context.logger = getLogger(context);\n  context.logger.log(`Running ${pkg.name} version ${pkg.version}`);\n  try {\n    const { plugins, options } = await getConfig(context, cliOptions);\n    options.originalRepositoryURL = options.repositoryUrl;\n    context.options = options;\n    try {\n      const result = await run(context, plugins);\n      unhook();\n      return result;\n    } catch (error) {\n      await callFail(context, plugins, error);\n      throw error;\n    }\n  } catch (error) {\n    await logErrors(context, error);\n    unhook();\n    throw error;\n  }\n};\n"]}