@gearbox-protocol/deploy-tools 4.24.6 → 4.25.0

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 +17 -12
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -366237,10 +366237,6 @@ var ForkTemplate = z.object({
366237
366237
  * Will append deploy-report generation to scripts
366238
366238
  */
366239
366239
  deployReport: z.boolean().default(false),
366240
- /**
366241
- * This flag is for old GO faucet and will be removed soon
366242
- */
366243
- faucet: z.boolean().default(false),
366244
366240
  /**
366245
366241
  * This flag is for old RUST snapshots and will be removed soon
366246
366242
  */
@@ -366251,9 +366247,13 @@ var ForkTemplate = z.object({
366251
366247
  var TemplateFile = z.array(ForkTemplate).min(1);
366252
366248
 
366253
366249
  // src/commands/launch-forks/load-template.ts
366254
- async function loadTemplate(file, release) {
366250
+ async function loadTemplate(file, interpolations) {
366255
366251
  let raw = await readFile7(file, "utf-8");
366256
- raw = raw.replace(/%release/g, release);
366252
+ for (const [key, val] of Object.entries(interpolations)) {
366253
+ if (key && val) {
366254
+ raw = raw.replace(new RegExp(`%${key}`, "g"), val);
366255
+ }
366256
+ }
366257
366257
  let parsed;
366258
366258
  if (file.endsWith(".json")) {
366259
366259
  parsed = JSON.parse(raw);
@@ -366261,15 +366261,15 @@ async function loadTemplate(file, release) {
366261
366261
  parsed = (0, import_yaml.parse)(raw);
366262
366262
  }
366263
366263
  const forks = TemplateFile.parse(parsed);
366264
- return forks.map((f) => expandTemplate(f, release));
366264
+ return forks.map((f) => expandTemplate(f, interpolations));
366265
366265
  }
366266
- function expandTemplate(template, release) {
366266
+ function expandTemplate(template, { release, comment }) {
366267
366267
  const { scripts: scriptz, ...rest } = template;
366268
366268
  const scripts = scriptz.map(
366269
366269
  (s) => ({
366270
366270
  ...s,
366271
366271
  npx: s.npx || release,
366272
- description: `${s.description || s.id} (${release})`
366272
+ description: `${s.description || s.id} (${comment || release})`
366273
366273
  })
366274
366274
  );
366275
366275
  return {
@@ -366300,10 +366300,15 @@ function launchForks() {
366300
366300
  "--release <version>",
366301
366301
  "release name to interpolate inside json files"
366302
366302
  ).default("")
366303
+ ).addOption(
366304
+ new Option(
366305
+ "--comment <comment>",
366306
+ "comment to interpolate inside json files"
366307
+ ).default("")
366303
366308
  ).action(async (opts) => {
366304
366309
  const start = /* @__PURE__ */ new Date();
366305
- const { endpoint, apiKey, release, template } = opts;
366306
- const forks = await loadTemplate(template, release);
366310
+ const { endpoint, apiKey, release, comment, template } = opts;
366311
+ const forks = await loadTemplate(template, { release, comment });
366307
366312
  console.log(`will create ${forks.length} forks`);
366308
366313
  const resp = await fetch(endpoint, {
366309
366314
  method: "POST",
@@ -366366,7 +366371,7 @@ function getRenderer(opts) {
366366
366371
  }
366367
366372
 
366368
366373
  // package.json
366369
- var version3 = "4.24.6";
366374
+ var version3 = "4.25.0";
366370
366375
 
366371
366376
  // src/version.ts
366372
366377
  var version_default = version3;
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": "4.24.6",
4
+ "version": "4.25.0",
5
5
  "homepage": "https://gearbox.fi",
6
6
  "keywords": [
7
7
  "gearbox"