@socketsecurity/cli-with-sentry 0.14.72 → 0.14.74

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.
@@ -911,7 +911,7 @@ function emitBanner(name) {
911
911
  logger.logger.error(getAsciiHeader(name))
912
912
  }
913
913
  function getAsciiHeader(command) {
914
- const cliVersion = '0.14.72:f9c998c:c2fcad47:pub' // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION_HASH']".
914
+ const cliVersion = '0.14.74:e430910:86507715:pub' // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION_HASH']".
915
915
  const nodeVersion = process$1.version
916
916
  const apiToken = shadowNpmInject.getDefaultToken()
917
917
  const shownToken = apiToken ? getLastFiveOfApiToken(apiToken) : 'no'
@@ -3172,6 +3172,10 @@ async function commitAndPushFix(branchName, commitMsg, cwd) {
3172
3172
  )
3173
3173
  return
3174
3174
  }
3175
+ const baseBranch = process.env['GITHUB_REF_NAME'] ?? 'main'
3176
+ await spawn.spawn('git', ['checkout', baseBranch], {
3177
+ cwd
3178
+ })
3175
3179
  await spawn.spawn('git', ['checkout', '-b', branchName], {
3176
3180
  cwd
3177
3181
  })
@@ -3196,6 +3200,7 @@ async function createPullRequest({
3196
3200
  const octokit = new vendor.Octokit({
3197
3201
  auth: process.env['SOCKET_AUTOFIX_PAT'] ?? process.env['GITHUB_TOKEN']
3198
3202
  })
3203
+ await new Promise(resolve => setTimeout(resolve, 3000)) // 3s
3199
3204
  await octokit.pulls.create({
3200
3205
  owner,
3201
3206
  repo,
@@ -3341,6 +3346,19 @@ async function pnpmFix(pkgEnvDetails, options) {
3341
3346
  const commitMsg = `fix: upgrade ${name} to ${targetVersion}`
3342
3347
  const { owner, repo } = getRepoInfo()
3343
3348
  // eslint-disable-next-line no-await-in-loop
3349
+ await spawn.spawn(
3350
+ 'git',
3351
+ [
3352
+ 'remote',
3353
+ 'set-url',
3354
+ 'origin',
3355
+ `https://x-access-token:${process.env['SOCKET_AUTOFIX_PAT']}@github.com/${owner}/${repo}`
3356
+ ],
3357
+ {
3358
+ cwd
3359
+ }
3360
+ )
3361
+ // eslint-disable-next-line no-await-in-loop
3344
3362
  await commitAndPushFix(branchName, commitMsg, cwd)
3345
3363
  // eslint-disable-next-line no-await-in-loop
3346
3364
  await createPullRequest({
@@ -11015,7 +11033,7 @@ void (async () => {
11015
11033
  await vendor.updater({
11016
11034
  name: SOCKET_CLI_BIN_NAME,
11017
11035
  // The '@rollup/plugin-replace' will replace "process.env['INLINED_SOCKET_CLI_VERSION']".
11018
- version: '0.14.72',
11036
+ version: '0.14.74',
11019
11037
  ttl: 86_400_000 /* 24 hours in milliseconds */
11020
11038
  })
11021
11039
  try {
@@ -11086,5 +11104,5 @@ void (async () => {
11086
11104
  await shadowNpmInject.captureException(e)
11087
11105
  }
11088
11106
  })()
11089
- //# debugId=1061c18a-7b58-4bbe-a8ce-5d6bf5f4178c
11107
+ //# debugId=653d2927-6580-43c1-bcbd-ad6cc485f8de
11090
11108
  //# sourceMappingURL=cli.js.map