@gearbox-protocol/deploy-tools 5.49.9 → 5.49.10

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/index.mjs +13 -5
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -429514,14 +429514,20 @@ var log_default = logger;
429514
429514
  var log = log_default.child({ name: "git" });
429515
429515
  function getGithubUrl(repo, https = false) {
429516
429516
  const credentials = process.env.GIT_TOKEN ?? process.env.GITHUB_TOKEN ?? process.env.GH_TOKEN;
429517
+ const githubUser = process.env.GITHUB_USER;
429517
429518
  log.info({
429518
429519
  GIT_TOKEN: process.env.GIT_TOKEN?.slice(-4) ?? "--",
429519
429520
  GITHUB_TOKEN: process.env.GITHUB_TOKEN?.slice(-4) ?? "--",
429520
- GH_TOKEN: process.env.GH_TOKEN?.slice(-4) ?? "--"
429521
+ GH_TOKEN: process.env.GH_TOKEN?.slice(-4) ?? "--",
429522
+ GITHUB_USER: githubUser ?? "--"
429521
429523
  }, `using git token *****${credentials?.slice(-4)}`);
429522
429524
  const path12 = repo.replace(/^@/, "").replace(/\/$/, "");
429523
- const cred = credentials ? `${credentials}@` : "";
429524
- return https || credentials ? `https://${cred}github.com/${path12}.git` : `git@github.com:${path12}.git`;
429525
+ let cred = "";
429526
+ if (credentials) {
429527
+ cred = githubUser ? `${githubUser}:${credentials}@` : `${credentials}@`;
429528
+ }
429529
+ const url2 = https || credentials ? `https://${cred}github.com/${path12}.git` : `git@github.com:${path12}.git`;
429530
+ return url2;
429525
429531
  }
429526
429532
  async function cloneRepo(opts) {
429527
429533
  const { repo, commit, sandboxDir } = opts;
@@ -429542,6 +429548,7 @@ async function cloneRepo(opts) {
429542
429548
  cwd: sandboxDir
429543
429549
  });
429544
429550
  if (error46 || status !== 0) {
429551
+ log.error(`Git clone failed with status ${status}: ${stderr?.toString()}`);
429545
429552
  throw error46 ?? new Error(stderr?.toString());
429546
429553
  }
429547
429554
  log.debug({ clone: clone2 }, "cloned");
@@ -453189,7 +453196,8 @@ var MetaRepo = class {
453189
453196
  this.#logger.debug({
453190
453197
  GIT_TOKEN: process.env.GIT_TOKEN?.slice(-4) ?? "--",
453191
453198
  GITHUB_TOKEN: process.env.GITHUB_TOKEN?.slice(-4) ?? "--",
453192
- GH_TOKEN: process.env.GH_TOKEN?.slice(-4) ?? "--"
453199
+ GH_TOKEN: process.env.GH_TOKEN?.slice(-4) ?? "--",
453200
+ GITHUB_USER: process.env.GITHUB_USER ?? "--"
453193
453201
  }, "loading metadata from github repo");
453194
453202
  mkdirSync4(this.#dir, { recursive: true });
453195
453203
  await cloneRepo({
@@ -458772,7 +458780,7 @@ function getRenderer(opts) {
458772
458780
  var package_default = {
458773
458781
  name: "@gearbox-protocol/deploy-tools",
458774
458782
  description: "Gearbox deploy tools",
458775
- version: "5.49.9",
458783
+ version: "5.49.10",
458776
458784
  homepage: "https://gearbox.fi",
458777
458785
  keywords: [
458778
458786
  "gearbox"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/deploy-tools",
3
3
  "description": "Gearbox deploy tools",
4
- "version": "5.49.9",
4
+ "version": "5.49.10",
5
5
  "homepage": "https://gearbox.fi",
6
6
  "keywords": [
7
7
  "gearbox"