@goldskycom/cli 0.1.0 → 0.2.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.js +398 -314
  2. package/package.json +3 -1
package/dist/index.js CHANGED
@@ -9,8 +9,8 @@ var __commonJS = (cb, mod) => function __require() {
9
9
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
10
  };
11
11
  var __export = (target, all) => {
12
- for (var name in all)
13
- __defProp(target, name, { get: all[name], enumerable: true });
12
+ for (var name2 in all)
13
+ __defProp(target, name2, { get: all[name2], enumerable: true });
14
14
  };
15
15
  var __reExport = (target, module2, copyDefault, desc) => {
16
16
  if (module2 && typeof module2 === "object" || typeof module2 === "function") {
@@ -94,11 +94,11 @@ var require_typebox = __commonJS({
94
94
  }
95
95
  Object(properties, options = {}) {
96
96
  const property_names = Object.keys(properties);
97
- const optional = property_names.filter((name) => {
98
- const candidate = properties[name];
97
+ const optional = property_names.filter((name2) => {
98
+ const candidate = properties[name2];
99
99
  return candidate.modifier && (candidate.modifier === exports.OptionalModifier || candidate.modifier === exports.ReadonlyOptionalModifier);
100
100
  });
101
- const required_names = property_names.filter((name) => !optional.includes(name));
101
+ const required_names = property_names.filter((name2) => !optional.includes(name2));
102
102
  const required = required_names.length > 0 ? required_names : void 0;
103
103
  return this.Store(required ? { ...options, kind: exports.ObjectKind, type: "object", properties, required } : { ...options, kind: exports.ObjectKind, type: "object", properties });
104
104
  }
@@ -710,10 +710,10 @@ var require_normalizeHeaderName = __commonJS({
710
710
  "use strict";
711
711
  var utils = require_utils();
712
712
  module2.exports = function normalizeHeaderName(headers, normalizedName) {
713
- utils.forEach(headers, function processHeader(value, name) {
714
- if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
713
+ utils.forEach(headers, function processHeader(value, name2) {
714
+ if (name2 !== normalizedName && name2.toUpperCase() === normalizedName.toUpperCase()) {
715
715
  headers[normalizedName] = value;
716
- delete headers[name];
716
+ delete headers[name2];
717
717
  }
718
718
  });
719
719
  };
@@ -787,9 +787,9 @@ var require_cookies = __commonJS({
787
787
  var utils = require_utils();
788
788
  module2.exports = utils.isStandardBrowserEnv() ? function standardBrowserEnv() {
789
789
  return {
790
- write: function write(name, value, expires, path5, domain, secure) {
790
+ write: function write(name2, value, expires, path5, domain, secure) {
791
791
  var cookie = [];
792
- cookie.push(name + "=" + encodeURIComponent(value));
792
+ cookie.push(name2 + "=" + encodeURIComponent(value));
793
793
  if (utils.isNumber(expires)) {
794
794
  cookie.push("expires=" + new Date(expires).toGMTString());
795
795
  }
@@ -804,12 +804,12 @@ var require_cookies = __commonJS({
804
804
  }
805
805
  document.cookie = cookie.join("; ");
806
806
  },
807
- read: function read(name) {
808
- var match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
807
+ read: function read(name2) {
808
+ var match = document.cookie.match(new RegExp("(^|;\\s*)(" + name2 + ")=([^;]*)"));
809
809
  return match ? decodeURIComponent(match[3]) : null;
810
810
  },
811
- remove: function remove2(name) {
812
- this.write(name, "", Date.now() - 864e5);
811
+ remove: function remove2(name2) {
812
+ this.write(name2, "", Date.now() - 864e5);
813
813
  }
814
814
  };
815
815
  }() : function nonStandardBrowserEnv() {
@@ -1219,9 +1219,9 @@ var require_ms = __commonJS({
1219
1219
  }
1220
1220
  return ms + " ms";
1221
1221
  }
1222
- function plural(ms, msAbs, n, name) {
1222
+ function plural(ms, msAbs, n, name2) {
1223
1223
  var isPlural = msAbs >= n * 1.5;
1224
- return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
1224
+ return Math.round(ms / n) + " " + name2 + (isPlural ? "s" : "");
1225
1225
  }
1226
1226
  }
1227
1227
  });
@@ -1338,7 +1338,7 @@ var require_common = __commonJS({
1338
1338
  }
1339
1339
  namespaces = split[i].replace(/\*/g, ".*?");
1340
1340
  if (namespaces[0] === "-") {
1341
- createDebug.skips.push(new RegExp("^" + namespaces.substr(1) + "$"));
1341
+ createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
1342
1342
  } else {
1343
1343
  createDebug.names.push(new RegExp("^" + namespaces + "$"));
1344
1344
  }
@@ -1352,19 +1352,19 @@ var require_common = __commonJS({
1352
1352
  createDebug.enable("");
1353
1353
  return namespaces;
1354
1354
  }
1355
- function enabled(name) {
1356
- if (name[name.length - 1] === "*") {
1355
+ function enabled(name2) {
1356
+ if (name2[name2.length - 1] === "*") {
1357
1357
  return true;
1358
1358
  }
1359
1359
  let i;
1360
1360
  let len;
1361
1361
  for (i = 0, len = createDebug.skips.length; i < len; i++) {
1362
- if (createDebug.skips[i].test(name)) {
1362
+ if (createDebug.skips[i].test(name2)) {
1363
1363
  return false;
1364
1364
  }
1365
1365
  }
1366
1366
  for (i = 0, len = createDebug.names.length; i < len; i++) {
1367
- if (createDebug.names[i].test(name)) {
1367
+ if (createDebug.names[i].test(name2)) {
1368
1368
  return true;
1369
1369
  }
1370
1370
  }
@@ -1638,10 +1638,10 @@ var require_supports_color = __commonJS({
1638
1638
  return 3;
1639
1639
  }
1640
1640
  if ("TERM_PROGRAM" in env2) {
1641
- const version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
1641
+ const version2 = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
1642
1642
  switch (env2.TERM_PROGRAM) {
1643
1643
  case "iTerm.app":
1644
- return version >= 3 ? 3 : 2;
1644
+ return version2 >= 3 ? 3 : 2;
1645
1645
  case "Apple_Terminal":
1646
1646
  return 2;
1647
1647
  }
@@ -1790,15 +1790,15 @@ var require_node = __commonJS({
1790
1790
  return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
1791
1791
  }
1792
1792
  function formatArgs(args) {
1793
- const { namespace: name, useColors: useColors2 } = this;
1793
+ const { namespace: name2, useColors: useColors2 } = this;
1794
1794
  if (useColors2) {
1795
1795
  const c = this.color;
1796
1796
  const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
1797
- const prefix = ` ${colorCode};1m${name} \x1B[0m`;
1797
+ const prefix = ` ${colorCode};1m${name2} \x1B[0m`;
1798
1798
  args[0] = prefix + args[0].split("\n").join("\n" + prefix);
1799
1799
  args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
1800
1800
  } else {
1801
- args[0] = getDate() + name + " " + args[0];
1801
+ args[0] = getDate() + name2 + " " + args[0];
1802
1802
  }
1803
1803
  }
1804
1804
  function getDate() {
@@ -1963,13 +1963,13 @@ var require_follow_redirects = __commonJS({
1963
1963
  this._ending = true;
1964
1964
  }
1965
1965
  };
1966
- RedirectableRequest.prototype.setHeader = function(name, value) {
1967
- this._options.headers[name] = value;
1968
- this._currentRequest.setHeader(name, value);
1966
+ RedirectableRequest.prototype.setHeader = function(name2, value) {
1967
+ this._options.headers[name2] = value;
1968
+ this._currentRequest.setHeader(name2, value);
1969
1969
  };
1970
- RedirectableRequest.prototype.removeHeader = function(name) {
1971
- delete this._options.headers[name];
1972
- this._currentRequest.removeHeader(name);
1970
+ RedirectableRequest.prototype.removeHeader = function(name2) {
1971
+ delete this._options.headers[name2];
1972
+ this._currentRequest.removeHeader(name2);
1973
1973
  };
1974
1974
  RedirectableRequest.prototype.setTimeout = function(msecs, callback) {
1975
1975
  var self2 = this;
@@ -2332,8 +2332,8 @@ var require_http = __commonJS({
2332
2332
  var data = config.data;
2333
2333
  var headers = config.headers;
2334
2334
  var headerNames = {};
2335
- Object.keys(headers).forEach(function storeLowerName(name) {
2336
- headerNames[name.toLowerCase()] = name;
2335
+ Object.keys(headers).forEach(function storeLowerName(name2) {
2336
+ headerNames[name2.toLowerCase()] = name2;
2337
2337
  });
2338
2338
  if ("user-agent" in headerNames) {
2339
2339
  if (!headers[headerNames["user-agent"]]) {
@@ -2849,17 +2849,17 @@ var require_validator = __commonJS({
2849
2849
  };
2850
2850
  });
2851
2851
  var deprecatedWarnings = {};
2852
- validators.transitional = function transitional(validator, version, message) {
2852
+ validators.transitional = function transitional(validator, version2, message) {
2853
2853
  function formatMessage(opt, desc) {
2854
2854
  return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
2855
2855
  }
2856
2856
  return function(value, opt, opts) {
2857
2857
  if (validator === false) {
2858
- throw new Error(formatMessage(opt, " has been removed" + (version ? " in " + version : "")));
2858
+ throw new Error(formatMessage(opt, " has been removed" + (version2 ? " in " + version2 : "")));
2859
2859
  }
2860
- if (version && !deprecatedWarnings[opt]) {
2860
+ if (version2 && !deprecatedWarnings[opt]) {
2861
2861
  deprecatedWarnings[opt] = true;
2862
- console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future"));
2862
+ console.warn(formatMessage(opt, " has been deprecated since v" + version2 + " and will be removed in the near future"));
2863
2863
  }
2864
2864
  return validator ? validator(value, opt, opts) : true;
2865
2865
  };
@@ -13703,11 +13703,11 @@ var require_ansi_styles = __commonJS({
13703
13703
  const offset = isBackground ? 10 : 0;
13704
13704
  const styles = {};
13705
13705
  for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
13706
- const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
13706
+ const name2 = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
13707
13707
  if (sourceSpace === targetSpace) {
13708
- styles[name] = wrap2(identity, offset);
13708
+ styles[name2] = wrap2(identity, offset);
13709
13709
  } else if (typeof suite === "object") {
13710
- styles[name] = wrap2(suite[targetSpace], offset);
13710
+ styles[name2] = wrap2(suite[targetSpace], offset);
13711
13711
  }
13712
13712
  }
13713
13713
  return styles;
@@ -13871,7 +13871,7 @@ var require_templates = __commonJS({
13871
13871
  }
13872
13872
  return ESCAPES.get(c) || c;
13873
13873
  }
13874
- function parseArguments(name, arguments_) {
13874
+ function parseArguments(name2, arguments_) {
13875
13875
  const results = [];
13876
13876
  const chunks = arguments_.trim().split(/\s*,\s*/g);
13877
13877
  let matches;
@@ -13882,7 +13882,7 @@ var require_templates = __commonJS({
13882
13882
  } else if (matches = chunk.match(STRING_REGEX)) {
13883
13883
  results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape2(escape) : character));
13884
13884
  } else {
13885
- throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
13885
+ throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name2}')`);
13886
13886
  }
13887
13887
  }
13888
13888
  return results;
@@ -13892,24 +13892,24 @@ var require_templates = __commonJS({
13892
13892
  const results = [];
13893
13893
  let matches;
13894
13894
  while ((matches = STYLE_REGEX.exec(style)) !== null) {
13895
- const name = matches[1];
13895
+ const name2 = matches[1];
13896
13896
  if (matches[2]) {
13897
- const args = parseArguments(name, matches[2]);
13898
- results.push([name].concat(args));
13897
+ const args = parseArguments(name2, matches[2]);
13898
+ results.push([name2].concat(args));
13899
13899
  } else {
13900
- results.push([name]);
13900
+ results.push([name2]);
13901
13901
  }
13902
13902
  }
13903
13903
  return results;
13904
13904
  }
13905
- function buildStyle(chalk11, styles) {
13905
+ function buildStyle(chalk12, styles) {
13906
13906
  const enabled = {};
13907
13907
  for (const layer of styles) {
13908
13908
  for (const style of layer.styles) {
13909
13909
  enabled[style[0]] = layer.inverse ? null : style.slice(1);
13910
13910
  }
13911
13911
  }
13912
- let current = chalk11;
13912
+ let current = chalk12;
13913
13913
  for (const [styleName, styles2] of Object.entries(enabled)) {
13914
13914
  if (!Array.isArray(styles2)) {
13915
13915
  continue;
@@ -13921,7 +13921,7 @@ var require_templates = __commonJS({
13921
13921
  }
13922
13922
  return current;
13923
13923
  }
13924
- module2.exports = (chalk11, temporary) => {
13924
+ module2.exports = (chalk12, temporary) => {
13925
13925
  const styles = [];
13926
13926
  const chunks = [];
13927
13927
  let chunk = [];
@@ -13931,13 +13931,13 @@ var require_templates = __commonJS({
13931
13931
  } else if (style) {
13932
13932
  const string = chunk.join("");
13933
13933
  chunk = [];
13934
- chunks.push(styles.length === 0 ? string : buildStyle(chalk11, styles)(string));
13934
+ chunks.push(styles.length === 0 ? string : buildStyle(chalk12, styles)(string));
13935
13935
  styles.push({ inverse, styles: parseStyle(style) });
13936
13936
  } else if (close) {
13937
13937
  if (styles.length === 0) {
13938
13938
  throw new Error("Found extraneous } in Chalk template literal");
13939
13939
  }
13940
- chunks.push(buildStyle(chalk11, styles)(chunk.join("")));
13940
+ chunks.push(buildStyle(chalk12, styles)(chunk.join("")));
13941
13941
  chunk = [];
13942
13942
  styles.pop();
13943
13943
  } else {
@@ -13985,16 +13985,16 @@ var require_source = __commonJS({
13985
13985
  }
13986
13986
  };
13987
13987
  var chalkFactory = (options) => {
13988
- const chalk12 = {};
13989
- applyOptions(chalk12, options);
13990
- chalk12.template = (...arguments_) => chalkTag(chalk12.template, ...arguments_);
13991
- Object.setPrototypeOf(chalk12, Chalk.prototype);
13992
- Object.setPrototypeOf(chalk12.template, chalk12);
13993
- chalk12.template.constructor = () => {
13988
+ const chalk13 = {};
13989
+ applyOptions(chalk13, options);
13990
+ chalk13.template = (...arguments_) => chalkTag(chalk13.template, ...arguments_);
13991
+ Object.setPrototypeOf(chalk13, Chalk.prototype);
13992
+ Object.setPrototypeOf(chalk13.template, chalk13);
13993
+ chalk13.template.constructor = () => {
13994
13994
  throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
13995
13995
  };
13996
- chalk12.template.Instance = ChalkClass;
13997
- return chalk12.template;
13996
+ chalk13.template.Instance = ChalkClass;
13997
+ return chalk13.template;
13998
13998
  };
13999
13999
  function Chalk(options) {
14000
14000
  return chalkFactory(options);
@@ -14105,7 +14105,7 @@ var require_source = __commonJS({
14105
14105
  return openAll + string + closeAll;
14106
14106
  };
14107
14107
  var template;
14108
- var chalkTag = (chalk12, ...strings) => {
14108
+ var chalkTag = (chalk13, ...strings) => {
14109
14109
  const [firstString] = strings;
14110
14110
  if (!isArray(firstString) || !isArray(firstString.raw)) {
14111
14111
  return strings.join(" ");
@@ -14118,14 +14118,14 @@ var require_source = __commonJS({
14118
14118
  if (template === void 0) {
14119
14119
  template = require_templates();
14120
14120
  }
14121
- return template(chalk12, parts.join(""));
14121
+ return template(chalk13, parts.join(""));
14122
14122
  };
14123
14123
  Object.defineProperties(Chalk.prototype, styles);
14124
- var chalk11 = Chalk();
14125
- chalk11.supportsColor = stdoutColor;
14126
- chalk11.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
14127
- chalk11.stderr.supportsColor = stderrColor;
14128
- module2.exports = chalk11;
14124
+ var chalk12 = Chalk();
14125
+ chalk12.supportsColor = stdoutColor;
14126
+ chalk12.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
14127
+ chalk12.stderr.supportsColor = stderrColor;
14128
+ module2.exports = chalk12;
14129
14129
  }
14130
14130
  });
14131
14131
 
@@ -14388,10 +14388,10 @@ var require_normalizeHeaderName2 = __commonJS({
14388
14388
  "use strict";
14389
14389
  var utils = require_utils2();
14390
14390
  module2.exports = function normalizeHeaderName(headers, normalizedName) {
14391
- utils.forEach(headers, function processHeader(value, name) {
14392
- if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
14391
+ utils.forEach(headers, function processHeader(value, name2) {
14392
+ if (name2 !== normalizedName && name2.toUpperCase() === normalizedName.toUpperCase()) {
14393
14393
  headers[normalizedName] = value;
14394
- delete headers[name];
14394
+ delete headers[name2];
14395
14395
  }
14396
14396
  });
14397
14397
  };
@@ -14465,9 +14465,9 @@ var require_cookies2 = __commonJS({
14465
14465
  var utils = require_utils2();
14466
14466
  module2.exports = utils.isStandardBrowserEnv() ? function standardBrowserEnv() {
14467
14467
  return {
14468
- write: function write(name, value, expires, path5, domain, secure) {
14468
+ write: function write(name2, value, expires, path5, domain, secure) {
14469
14469
  var cookie = [];
14470
- cookie.push(name + "=" + encodeURIComponent(value));
14470
+ cookie.push(name2 + "=" + encodeURIComponent(value));
14471
14471
  if (utils.isNumber(expires)) {
14472
14472
  cookie.push("expires=" + new Date(expires).toGMTString());
14473
14473
  }
@@ -14482,12 +14482,12 @@ var require_cookies2 = __commonJS({
14482
14482
  }
14483
14483
  document.cookie = cookie.join("; ");
14484
14484
  },
14485
- read: function read(name) {
14486
- var match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
14485
+ read: function read(name2) {
14486
+ var match = document.cookie.match(new RegExp("(^|;\\s*)(" + name2 + ")=([^;]*)"));
14487
14487
  return match ? decodeURIComponent(match[3]) : null;
14488
14488
  },
14489
- remove: function remove2(name) {
14490
- this.write(name, "", Date.now() - 864e5);
14489
+ remove: function remove2(name2) {
14490
+ this.write(name2, "", Date.now() - 864e5);
14491
14491
  }
14492
14492
  };
14493
14493
  }() : function nonStandardBrowserEnv() {
@@ -14857,8 +14857,8 @@ var require_http2 = __commonJS({
14857
14857
  var data = config.data;
14858
14858
  var headers = config.headers;
14859
14859
  var headerNames = {};
14860
- Object.keys(headers).forEach(function storeLowerName(name) {
14861
- headerNames[name.toLowerCase()] = name;
14860
+ Object.keys(headers).forEach(function storeLowerName(name2) {
14861
+ headerNames[name2.toLowerCase()] = name2;
14862
14862
  });
14863
14863
  if ("user-agent" in headerNames) {
14864
14864
  if (!headers[headerNames["user-agent"]]) {
@@ -15341,17 +15341,17 @@ var require_validator2 = __commonJS({
15341
15341
  };
15342
15342
  });
15343
15343
  var deprecatedWarnings = {};
15344
- validators.transitional = function transitional(validator, version, message) {
15344
+ validators.transitional = function transitional(validator, version2, message) {
15345
15345
  function formatMessage(opt, desc) {
15346
15346
  return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
15347
15347
  }
15348
15348
  return function(value, opt, opts) {
15349
15349
  if (validator === false) {
15350
- throw new Error(formatMessage(opt, " has been removed" + (version ? " in " + version : "")));
15350
+ throw new Error(formatMessage(opt, " has been removed" + (version2 ? " in " + version2 : "")));
15351
15351
  }
15352
- if (version && !deprecatedWarnings[opt]) {
15352
+ if (version2 && !deprecatedWarnings[opt]) {
15353
15353
  deprecatedWarnings[opt] = true;
15354
- console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future"));
15354
+ console.warn(formatMessage(opt, " has been deprecated since v" + version2 + " and will be removed in the near future"));
15355
15355
  }
15356
15356
  return validator ? validator(value, opt, opts) : true;
15357
15357
  };
@@ -15713,7 +15713,7 @@ var require_templates2 = __commonJS({
15713
15713
  }
15714
15714
  return ESCAPES.get(c) || c;
15715
15715
  }
15716
- function parseArguments(name, arguments_) {
15716
+ function parseArguments(name2, arguments_) {
15717
15717
  const results = [];
15718
15718
  const chunks = arguments_.trim().split(/\s*,\s*/g);
15719
15719
  let matches;
@@ -15724,7 +15724,7 @@ var require_templates2 = __commonJS({
15724
15724
  } else if (matches = chunk.match(STRING_REGEX)) {
15725
15725
  results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape2(escape) : character));
15726
15726
  } else {
15727
- throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
15727
+ throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name2}')`);
15728
15728
  }
15729
15729
  }
15730
15730
  return results;
@@ -15734,24 +15734,24 @@ var require_templates2 = __commonJS({
15734
15734
  const results = [];
15735
15735
  let matches;
15736
15736
  while ((matches = STYLE_REGEX.exec(style)) !== null) {
15737
- const name = matches[1];
15737
+ const name2 = matches[1];
15738
15738
  if (matches[2]) {
15739
- const args = parseArguments(name, matches[2]);
15740
- results.push([name].concat(args));
15739
+ const args = parseArguments(name2, matches[2]);
15740
+ results.push([name2].concat(args));
15741
15741
  } else {
15742
- results.push([name]);
15742
+ results.push([name2]);
15743
15743
  }
15744
15744
  }
15745
15745
  return results;
15746
15746
  }
15747
- function buildStyle(chalk11, styles) {
15747
+ function buildStyle(chalk12, styles) {
15748
15748
  const enabled = {};
15749
15749
  for (const layer of styles) {
15750
15750
  for (const style of layer.styles) {
15751
15751
  enabled[style[0]] = layer.inverse ? null : style.slice(1);
15752
15752
  }
15753
15753
  }
15754
- let current = chalk11;
15754
+ let current = chalk12;
15755
15755
  for (const [styleName, styles2] of Object.entries(enabled)) {
15756
15756
  if (!Array.isArray(styles2)) {
15757
15757
  continue;
@@ -15763,7 +15763,7 @@ var require_templates2 = __commonJS({
15763
15763
  }
15764
15764
  return current;
15765
15765
  }
15766
- module2.exports = (chalk11, temporary) => {
15766
+ module2.exports = (chalk12, temporary) => {
15767
15767
  const styles = [];
15768
15768
  const chunks = [];
15769
15769
  let chunk = [];
@@ -15773,13 +15773,13 @@ var require_templates2 = __commonJS({
15773
15773
  } else if (style) {
15774
15774
  const string = chunk.join("");
15775
15775
  chunk = [];
15776
- chunks.push(styles.length === 0 ? string : buildStyle(chalk11, styles)(string));
15776
+ chunks.push(styles.length === 0 ? string : buildStyle(chalk12, styles)(string));
15777
15777
  styles.push({ inverse, styles: parseStyle(style) });
15778
15778
  } else if (close) {
15779
15779
  if (styles.length === 0) {
15780
15780
  throw new Error("Found extraneous } in Chalk template literal");
15781
15781
  }
15782
- chunks.push(buildStyle(chalk11, styles)(chunk.join("")));
15782
+ chunks.push(buildStyle(chalk12, styles)(chunk.join("")));
15783
15783
  chunk = [];
15784
15784
  styles.pop();
15785
15785
  } else {
@@ -15826,16 +15826,16 @@ var require_source2 = __commonJS({
15826
15826
  }
15827
15827
  };
15828
15828
  var chalkFactory = (options) => {
15829
- const chalk12 = {};
15830
- applyOptions(chalk12, options);
15831
- chalk12.template = (...arguments_) => chalkTag(chalk12.template, ...arguments_);
15832
- Object.setPrototypeOf(chalk12, Chalk.prototype);
15833
- Object.setPrototypeOf(chalk12.template, chalk12);
15834
- chalk12.template.constructor = () => {
15829
+ const chalk13 = {};
15830
+ applyOptions(chalk13, options);
15831
+ chalk13.template = (...arguments_) => chalkTag(chalk13.template, ...arguments_);
15832
+ Object.setPrototypeOf(chalk13, Chalk.prototype);
15833
+ Object.setPrototypeOf(chalk13.template, chalk13);
15834
+ chalk13.template.constructor = () => {
15835
15835
  throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
15836
15836
  };
15837
- chalk12.template.Instance = ChalkClass;
15838
- return chalk12.template;
15837
+ chalk13.template.Instance = ChalkClass;
15838
+ return chalk13.template;
15839
15839
  };
15840
15840
  function Chalk(options) {
15841
15841
  return chalkFactory(options);
@@ -15943,7 +15943,7 @@ var require_source2 = __commonJS({
15943
15943
  return openAll + string + closeAll;
15944
15944
  };
15945
15945
  var template;
15946
- var chalkTag = (chalk12, ...strings) => {
15946
+ var chalkTag = (chalk13, ...strings) => {
15947
15947
  const [firstString] = strings;
15948
15948
  if (!Array.isArray(firstString)) {
15949
15949
  return strings.join(" ");
@@ -15956,14 +15956,14 @@ var require_source2 = __commonJS({
15956
15956
  if (template === void 0) {
15957
15957
  template = require_templates2();
15958
15958
  }
15959
- return template(chalk12, parts.join(""));
15959
+ return template(chalk13, parts.join(""));
15960
15960
  };
15961
15961
  Object.defineProperties(Chalk.prototype, styles);
15962
- var chalk11 = Chalk();
15963
- chalk11.supportsColor = stdoutColor;
15964
- chalk11.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
15965
- chalk11.stderr.supportsColor = stderrColor;
15966
- chalk11.Level = {
15962
+ var chalk12 = Chalk();
15963
+ chalk12.supportsColor = stdoutColor;
15964
+ chalk12.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
15965
+ chalk12.stderr.supportsColor = stderrColor;
15966
+ chalk12.Level = {
15967
15967
  None: 0,
15968
15968
  Basic: 1,
15969
15969
  Ansi256: 2,
@@ -15973,7 +15973,7 @@ var require_source2 = __commonJS({
15973
15973
  2: "Ansi256",
15974
15974
  3: "TrueColor"
15975
15975
  };
15976
- module2.exports = chalk11;
15976
+ module2.exports = chalk12;
15977
15977
  }
15978
15978
  });
15979
15979
 
@@ -18919,10 +18919,10 @@ var require_supports_color2 = __commonJS({
18919
18919
  return 3;
18920
18920
  }
18921
18921
  if ("TERM_PROGRAM" in env2) {
18922
- const version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
18922
+ const version2 = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
18923
18923
  switch (env2.TERM_PROGRAM) {
18924
18924
  case "iTerm.app":
18925
- return version >= 3 ? 3 : 2;
18925
+ return version2 >= 3 ? 3 : 2;
18926
18926
  case "Apple_Terminal":
18927
18927
  return 2;
18928
18928
  }
@@ -18979,7 +18979,7 @@ var require_templates3 = __commonJS({
18979
18979
  }
18980
18980
  return ESCAPES.get(c) || c;
18981
18981
  }
18982
- function parseArguments(name, args) {
18982
+ function parseArguments(name2, args) {
18983
18983
  const results = [];
18984
18984
  const chunks = args.trim().split(/\s*,\s*/g);
18985
18985
  let matches;
@@ -18989,7 +18989,7 @@ var require_templates3 = __commonJS({
18989
18989
  } else if (matches = chunk.match(STRING_REGEX)) {
18990
18990
  results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape2(escape) : chr));
18991
18991
  } else {
18992
- throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
18992
+ throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name2}')`);
18993
18993
  }
18994
18994
  }
18995
18995
  return results;
@@ -18999,24 +18999,24 @@ var require_templates3 = __commonJS({
18999
18999
  const results = [];
19000
19000
  let matches;
19001
19001
  while ((matches = STYLE_REGEX.exec(style)) !== null) {
19002
- const name = matches[1];
19002
+ const name2 = matches[1];
19003
19003
  if (matches[2]) {
19004
- const args = parseArguments(name, matches[2]);
19005
- results.push([name].concat(args));
19004
+ const args = parseArguments(name2, matches[2]);
19005
+ results.push([name2].concat(args));
19006
19006
  } else {
19007
- results.push([name]);
19007
+ results.push([name2]);
19008
19008
  }
19009
19009
  }
19010
19010
  return results;
19011
19011
  }
19012
- function buildStyle(chalk11, styles) {
19012
+ function buildStyle(chalk12, styles) {
19013
19013
  const enabled = {};
19014
19014
  for (const layer of styles) {
19015
19015
  for (const style of layer.styles) {
19016
19016
  enabled[style[0]] = layer.inverse ? null : style.slice(1);
19017
19017
  }
19018
19018
  }
19019
- let current = chalk11;
19019
+ let current = chalk12;
19020
19020
  for (const styleName of Object.keys(enabled)) {
19021
19021
  if (Array.isArray(enabled[styleName])) {
19022
19022
  if (!(styleName in current)) {
@@ -19031,7 +19031,7 @@ var require_templates3 = __commonJS({
19031
19031
  }
19032
19032
  return current;
19033
19033
  }
19034
- module2.exports = (chalk11, tmp) => {
19034
+ module2.exports = (chalk12, tmp) => {
19035
19035
  const styles = [];
19036
19036
  const chunks = [];
19037
19037
  let chunk = [];
@@ -19041,13 +19041,13 @@ var require_templates3 = __commonJS({
19041
19041
  } else if (style) {
19042
19042
  const str = chunk.join("");
19043
19043
  chunk = [];
19044
- chunks.push(styles.length === 0 ? str : buildStyle(chalk11, styles)(str));
19044
+ chunks.push(styles.length === 0 ? str : buildStyle(chalk12, styles)(str));
19045
19045
  styles.push({ inverse, styles: parseStyle(style) });
19046
19046
  } else if (close) {
19047
19047
  if (styles.length === 0) {
19048
19048
  throw new Error("Found extraneous } in Chalk template literal");
19049
19049
  }
19050
- chunks.push(buildStyle(chalk11, styles)(chunk.join("")));
19050
+ chunks.push(buildStyle(chalk12, styles)(chunk.join("")));
19051
19051
  chunk = [];
19052
19052
  styles.pop();
19053
19053
  } else {
@@ -19084,16 +19084,16 @@ var require_chalk = __commonJS({
19084
19084
  }
19085
19085
  function Chalk(options) {
19086
19086
  if (!this || !(this instanceof Chalk) || this.template) {
19087
- const chalk11 = {};
19088
- applyOptions(chalk11, options);
19089
- chalk11.template = function() {
19087
+ const chalk12 = {};
19088
+ applyOptions(chalk12, options);
19089
+ chalk12.template = function() {
19090
19090
  const args = [].slice.call(arguments);
19091
- return chalkTag.apply(null, [chalk11.template].concat(args));
19091
+ return chalkTag.apply(null, [chalk12.template].concat(args));
19092
19092
  };
19093
- Object.setPrototypeOf(chalk11, Chalk.prototype);
19094
- Object.setPrototypeOf(chalk11.template, chalk11);
19095
- chalk11.template.constructor = Chalk;
19096
- return chalk11.template;
19093
+ Object.setPrototypeOf(chalk12, Chalk.prototype);
19094
+ Object.setPrototypeOf(chalk12.template, chalk12);
19095
+ chalk12.template.constructor = Chalk;
19096
+ return chalk12.template;
19097
19097
  }
19098
19098
  applyOptions(this, options);
19099
19099
  }
@@ -19212,7 +19212,7 @@ var require_chalk = __commonJS({
19212
19212
  ansiStyles.dim.open = originalDim;
19213
19213
  return str;
19214
19214
  }
19215
- function chalkTag(chalk11, strings) {
19215
+ function chalkTag(chalk12, strings) {
19216
19216
  if (!Array.isArray(strings)) {
19217
19217
  return [].slice.call(arguments, 1).join(" ");
19218
19218
  }
@@ -19222,7 +19222,7 @@ var require_chalk = __commonJS({
19222
19222
  parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
19223
19223
  parts.push(String(strings.raw[i]));
19224
19224
  }
19225
- return template(chalk11, parts.join(""));
19225
+ return template(chalk12, parts.join(""));
19226
19226
  }
19227
19227
  Object.defineProperties(Chalk.prototype, styles);
19228
19228
  module2.exports = Chalk();
@@ -19235,21 +19235,21 @@ var require_chalk = __commonJS({
19235
19235
  var require_log_symbols = __commonJS({
19236
19236
  "../../node_modules/log-symbols/index.js"(exports, module2) {
19237
19237
  "use strict";
19238
- var chalk11 = require_chalk();
19238
+ var chalk12 = require_chalk();
19239
19239
  var isSupported = process.platform !== "win32" || process.env.CI || process.env.TERM === "xterm-256color";
19240
- var main = {
19241
- info: chalk11.blue("\u2139"),
19242
- success: chalk11.green("\u2714"),
19243
- warning: chalk11.yellow("\u26A0"),
19244
- error: chalk11.red("\u2716")
19240
+ var main2 = {
19241
+ info: chalk12.blue("\u2139"),
19242
+ success: chalk12.green("\u2714"),
19243
+ warning: chalk12.yellow("\u26A0"),
19244
+ error: chalk12.red("\u2716")
19245
19245
  };
19246
19246
  var fallbacks = {
19247
- info: chalk11.blue("i"),
19248
- success: chalk11.green("\u221A"),
19249
- warning: chalk11.yellow("\u203C"),
19250
- error: chalk11.red("\xD7")
19247
+ info: chalk12.blue("i"),
19248
+ success: chalk12.green("\u221A"),
19249
+ warning: chalk12.yellow("\u203C"),
19250
+ error: chalk12.red("\xD7")
19251
19251
  };
19252
- module2.exports = isSupported ? main : fallbacks;
19252
+ module2.exports = isSupported ? main2 : fallbacks;
19253
19253
  }
19254
19254
  });
19255
19255
 
@@ -19771,7 +19771,7 @@ var require_ora = __commonJS({
19771
19771
  "../../node_modules/ora/index.js"(exports, module2) {
19772
19772
  "use strict";
19773
19773
  var readline2 = require("readline");
19774
- var chalk11 = require_source2();
19774
+ var chalk12 = require_source2();
19775
19775
  var cliCursor = require_cli_cursor();
19776
19776
  var cliSpinners = require_cli_spinners();
19777
19777
  var logSymbols = require_log_symbols();
@@ -19939,7 +19939,7 @@ var require_ora = __commonJS({
19939
19939
  const { frames } = this.spinner;
19940
19940
  let frame = frames[this.frameIndex];
19941
19941
  if (this.color) {
19942
- frame = chalk11[this.color](frame);
19942
+ frame = chalk12[this.color](frame);
19943
19943
  }
19944
19944
  this.frameIndex = ++this.frameIndex % frames.length;
19945
19945
  const fullPrefixText = typeof this.prefixText === "string" && this.prefixText !== "" ? this.prefixText + " " : "";
@@ -22930,7 +22930,7 @@ var require_utils3 = __commonJS({
22930
22930
  }
22931
22931
  return result;
22932
22932
  };
22933
- exports.prepareContent = function(name, inputData, isBinary, isOptimizedBinaryString, isBase64) {
22933
+ exports.prepareContent = function(name2, inputData, isBinary, isOptimizedBinaryString, isBase64) {
22934
22934
  var promise = external.Promise.resolve(inputData).then(function(data) {
22935
22935
  var isBlob = support.blob && (data instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(data)) !== -1);
22936
22936
  if (isBlob && typeof FileReader !== "undefined") {
@@ -22951,7 +22951,7 @@ var require_utils3 = __commonJS({
22951
22951
  return promise.then(function(data) {
22952
22952
  var dataType = exports.getTypeOf(data);
22953
22953
  if (!dataType) {
22954
- return external.Promise.reject(new Error("Can't read the data of '" + name + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
22954
+ return external.Promise.reject(new Error("Can't read the data of '" + name2 + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
22955
22955
  }
22956
22956
  if (dataType === "arraybuffer") {
22957
22957
  data = exports.transformTo("uint8array", data);
@@ -22974,8 +22974,8 @@ var require_utils3 = __commonJS({
22974
22974
  var require_GenericWorker = __commonJS({
22975
22975
  "node_modules/jszip/lib/stream/GenericWorker.js"(exports, module2) {
22976
22976
  "use strict";
22977
- function GenericWorker(name) {
22978
- this.name = name || "default";
22977
+ function GenericWorker(name2) {
22978
+ this.name = name2 || "default";
22979
22979
  this.streamInfo = {};
22980
22980
  this.generatedError = null;
22981
22981
  this.extraStreamInfo = {};
@@ -23023,18 +23023,18 @@ var require_GenericWorker = __commonJS({
23023
23023
  }
23024
23024
  return true;
23025
23025
  },
23026
- on: function(name, listener) {
23027
- this._listeners[name].push(listener);
23026
+ on: function(name2, listener) {
23027
+ this._listeners[name2].push(listener);
23028
23028
  return this;
23029
23029
  },
23030
23030
  cleanUp: function() {
23031
23031
  this.streamInfo = this.generatedError = this.extraStreamInfo = null;
23032
23032
  this._listeners = [];
23033
23033
  },
23034
- emit: function(name, arg) {
23035
- if (this._listeners[name]) {
23036
- for (var i = 0; i < this._listeners[name].length; i++) {
23037
- this._listeners[name][i].call(this, arg);
23034
+ emit: function(name2, arg) {
23035
+ if (this._listeners[name2]) {
23036
+ for (var i = 0; i < this._listeners[name2].length; i++) {
23037
+ this._listeners[name2][i].call(this, arg);
23038
23038
  }
23039
23039
  }
23040
23040
  },
@@ -23743,8 +23743,8 @@ var require_zipObject = __commonJS({
23743
23743
  var utf8 = require_utf8();
23744
23744
  var CompressedObject = require_compressedObject();
23745
23745
  var GenericWorker = require_GenericWorker();
23746
- var ZipObject = function(name, data, options) {
23747
- this.name = name;
23746
+ var ZipObject = function(name2, data, options) {
23747
+ this.name = name2;
23748
23748
  this.dir = options.dir;
23749
23749
  this.date = options.date;
23750
23750
  this.comment = options.comment;
@@ -28376,7 +28376,7 @@ var require_object = __commonJS({
28376
28376
  var generate = require_generate();
28377
28377
  var nodejsUtils = require_nodejsUtils();
28378
28378
  var NodejsStreamInputAdapter = require_NodejsStreamInputAdapter();
28379
- var fileAdd = function(name, data, originalOptions) {
28379
+ var fileAdd = function(name2, data, originalOptions) {
28380
28380
  var dataType = utils.getTypeOf(data), parent;
28381
28381
  var o = utils.extend(originalOptions || {}, defaults);
28382
28382
  o.date = o.date || new Date();
@@ -28393,9 +28393,9 @@ var require_object = __commonJS({
28393
28393
  o.dir = true;
28394
28394
  }
28395
28395
  if (o.dir) {
28396
- name = forceTrailingSlash(name);
28396
+ name2 = forceTrailingSlash(name2);
28397
28397
  }
28398
- if (o.createFolders && (parent = parentFolder(name))) {
28398
+ if (o.createFolders && (parent = parentFolder(name2))) {
28399
28399
  folderAdd.call(this, parent, true);
28400
28400
  }
28401
28401
  var isUnicodeString = dataType === "string" && o.binary === false && o.base64 === false;
@@ -28414,12 +28414,12 @@ var require_object = __commonJS({
28414
28414
  if (data instanceof CompressedObject || data instanceof GenericWorker) {
28415
28415
  zipObjectContent = data;
28416
28416
  } else if (nodejsUtils.isNode && nodejsUtils.isStream(data)) {
28417
- zipObjectContent = new NodejsStreamInputAdapter(name, data);
28417
+ zipObjectContent = new NodejsStreamInputAdapter(name2, data);
28418
28418
  } else {
28419
- zipObjectContent = utils.prepareContent(name, data, o.binary, o.optimizedBinaryString, o.base64);
28419
+ zipObjectContent = utils.prepareContent(name2, data, o.binary, o.optimizedBinaryString, o.base64);
28420
28420
  }
28421
- var object = new ZipObject(name, zipObjectContent, o);
28422
- this.files[name] = object;
28421
+ var object = new ZipObject(name2, zipObjectContent, o);
28422
+ this.files[name2] = object;
28423
28423
  };
28424
28424
  var parentFolder = function(path5) {
28425
28425
  if (path5.slice(-1) === "/") {
@@ -28434,16 +28434,16 @@ var require_object = __commonJS({
28434
28434
  }
28435
28435
  return path5;
28436
28436
  };
28437
- var folderAdd = function(name, createFolders) {
28437
+ var folderAdd = function(name2, createFolders) {
28438
28438
  createFolders = typeof createFolders !== "undefined" ? createFolders : defaults.createFolders;
28439
- name = forceTrailingSlash(name);
28440
- if (!this.files[name]) {
28441
- fileAdd.call(this, name, null, {
28439
+ name2 = forceTrailingSlash(name2);
28440
+ if (!this.files[name2]) {
28441
+ fileAdd.call(this, name2, null, {
28442
28442
  dir: true,
28443
28443
  createFolders
28444
28444
  });
28445
28445
  }
28446
- return this.files[name];
28446
+ return this.files[name2];
28447
28447
  };
28448
28448
  function isRegExp(object) {
28449
28449
  return Object.prototype.toString.call(object) === "[object RegExp]";
@@ -28471,15 +28471,15 @@ var require_object = __commonJS({
28471
28471
  });
28472
28472
  return result;
28473
28473
  },
28474
- file: function(name, data, o) {
28474
+ file: function(name2, data, o) {
28475
28475
  if (arguments.length === 1) {
28476
- if (isRegExp(name)) {
28477
- var regexp = name;
28476
+ if (isRegExp(name2)) {
28477
+ var regexp = name2;
28478
28478
  return this.filter(function(relativePath, file) {
28479
28479
  return !file.dir && regexp.test(relativePath);
28480
28480
  });
28481
28481
  } else {
28482
- var obj = this.files[this.root + name];
28482
+ var obj = this.files[this.root + name2];
28483
28483
  if (obj && !obj.dir) {
28484
28484
  return obj;
28485
28485
  } else {
@@ -28487,8 +28487,8 @@ var require_object = __commonJS({
28487
28487
  }
28488
28488
  }
28489
28489
  } else {
28490
- name = this.root + name;
28491
- fileAdd.call(this, name, data, o);
28490
+ name2 = this.root + name2;
28491
+ fileAdd.call(this, name2, data, o);
28492
28492
  }
28493
28493
  return this;
28494
28494
  },
@@ -28501,26 +28501,26 @@ var require_object = __commonJS({
28501
28501
  return file.dir && arg.test(relativePath);
28502
28502
  });
28503
28503
  }
28504
- var name = this.root + arg;
28505
- var newFolder = folderAdd.call(this, name);
28504
+ var name2 = this.root + arg;
28505
+ var newFolder = folderAdd.call(this, name2);
28506
28506
  var ret = this.clone();
28507
28507
  ret.root = newFolder.name;
28508
28508
  return ret;
28509
28509
  },
28510
- remove: function(name) {
28511
- name = this.root + name;
28512
- var file = this.files[name];
28510
+ remove: function(name2) {
28511
+ name2 = this.root + name2;
28512
+ var file = this.files[name2];
28513
28513
  if (!file) {
28514
- if (name.slice(-1) !== "/") {
28515
- name += "/";
28514
+ if (name2.slice(-1) !== "/") {
28515
+ name2 += "/";
28516
28516
  }
28517
- file = this.files[name];
28517
+ file = this.files[name2];
28518
28518
  }
28519
28519
  if (file && !file.dir) {
28520
- delete this.files[name];
28520
+ delete this.files[name2];
28521
28521
  } else {
28522
28522
  var kids = this.filter(function(relativePath, file2) {
28523
- return file2.name.slice(0, name.length) === name;
28523
+ return file2.name.slice(0, name2.length) === name2;
28524
28524
  });
28525
28525
  for (var i = 0; i < kids.length; i++) {
28526
28526
  delete this.files[kids[i].name];
@@ -29165,18 +29165,18 @@ var require_load = __commonJS({
29165
29165
  return zipEntries;
29166
29166
  }).then(function checkCRC32(zipEntries) {
29167
29167
  var promises = [external.Promise.resolve(zipEntries)];
29168
- var files = zipEntries.files;
29168
+ var files2 = zipEntries.files;
29169
29169
  if (options.checkCRC32) {
29170
- for (var i = 0; i < files.length; i++) {
29171
- promises.push(checkEntryCRC32(files[i]));
29170
+ for (var i = 0; i < files2.length; i++) {
29171
+ promises.push(checkEntryCRC32(files2[i]));
29172
29172
  }
29173
29173
  }
29174
29174
  return external.Promise.all(promises);
29175
29175
  }).then(function addFiles(results) {
29176
29176
  var zipEntries = results.shift();
29177
- var files = zipEntries.files;
29178
- for (var i = 0; i < files.length; i++) {
29179
- var input = files[i];
29177
+ var files2 = zipEntries.files;
29178
+ for (var i = 0; i < files2.length; i++) {
29179
+ var input = files2[i];
29180
29180
  zip.file(input.fileNameStr, input.decompressed, {
29181
29181
  binary: true,
29182
29182
  optimizedBinaryString: true,
@@ -29716,11 +29716,11 @@ ${offset}${err}${errEnd}`;
29716
29716
  }
29717
29717
  };
29718
29718
  var YAMLError = class extends Error {
29719
- constructor(name, source, message) {
29719
+ constructor(name2, source, message) {
29720
29720
  if (!message || !(source instanceof Node))
29721
- throw new Error(`Invalid arguments for new ${name}`);
29721
+ throw new Error(`Invalid arguments for new ${name2}`);
29722
29722
  super();
29723
- this.name = name;
29723
+ this.name = name2;
29724
29724
  this.message = message;
29725
29725
  this.source = source;
29726
29726
  }
@@ -32459,15 +32459,15 @@ ${indent}`);
32459
32459
  return n;
32460
32460
  }
32461
32461
  function checkFlowCollectionEnd(errors, cst) {
32462
- let char, name;
32462
+ let char, name2;
32463
32463
  switch (cst.type) {
32464
32464
  case PlainValue.Type.FLOW_MAP:
32465
32465
  char = "}";
32466
- name = "flow map";
32466
+ name2 = "flow map";
32467
32467
  break;
32468
32468
  case PlainValue.Type.FLOW_SEQ:
32469
32469
  char = "]";
32470
- name = "flow sequence";
32470
+ name2 = "flow sequence";
32471
32471
  break;
32472
32472
  default:
32473
32473
  errors.push(new PlainValue.YAMLSemanticError(cst, "Not a flow collection!?"));
@@ -32482,7 +32482,7 @@ ${indent}`);
32482
32482
  }
32483
32483
  }
32484
32484
  if (lastItem && lastItem.char !== char) {
32485
- const msg = `Expected ${name} to end with ${char}`;
32485
+ const msg = `Expected ${name2} to end with ${char}`;
32486
32486
  let err;
32487
32487
  if (typeof lastItem.offset === "number") {
32488
32488
  err = new PlainValue.YAMLSemanticError(cst, msg);
@@ -32748,10 +32748,10 @@ ${indent}`);
32748
32748
  schema
32749
32749
  } = doc;
32750
32750
  if (node.type === PlainValue.Type.ALIAS) {
32751
- const name = node.rawValue;
32752
- const src = anchors.getNode(name);
32751
+ const name2 = node.rawValue;
32752
+ const src = anchors.getNode(name2);
32753
32753
  if (!src) {
32754
- const msg = `Aliased anchor not found: ${name}`;
32754
+ const msg = `Aliased anchor not found: ${name2}`;
32755
32755
  errors.push(new PlainValue.YAMLReferenceError(node, msg));
32756
32756
  return null;
32757
32757
  }
@@ -32791,11 +32791,11 @@ ${indent}`);
32791
32791
  const {
32792
32792
  anchors
32793
32793
  } = doc;
32794
- const name = node.anchor;
32795
- const prev = anchors.getNode(name);
32794
+ const name2 = node.anchor;
32795
+ const prev = anchors.getNode(name2);
32796
32796
  if (prev)
32797
- anchors.map[anchors.newName(name)] = prev;
32798
- anchors.map[name] = node;
32797
+ anchors.map[anchors.newName(name2)] = prev;
32798
+ anchors.map[name2] = node;
32799
32799
  }
32800
32800
  if (node.type === PlainValue.Type.ALIAS && (hasAnchor || hasTag)) {
32801
32801
  const msg = "An alias node must not specify any properties";
@@ -33623,10 +33623,10 @@ ${pair.comment}` : item.comment;
33623
33623
  }
33624
33624
  }
33625
33625
  var warned = {};
33626
- function warnOptionDeprecation(name, alternative) {
33627
- if (!warned[name] && shouldWarn(true)) {
33628
- warned[name] = true;
33629
- let msg = `The option '${name}' will be removed in a future release`;
33626
+ function warnOptionDeprecation(name2, alternative) {
33627
+ if (!warned[name2] && shouldWarn(true)) {
33628
+ warned[name2] = true;
33629
+ let msg = `The option '${name2}' will be removed in a future release`;
33630
33630
  msg += alternative ? `, use '${alternative}' instead.` : ".";
33631
33631
  warn(msg, "DeprecationWarning");
33632
33632
  }
@@ -33907,7 +33907,7 @@ var require_Schema_88e323a7 = __commonJS({
33907
33907
  tag: "tag:yaml.org,2002:int",
33908
33908
  format: "BIN",
33909
33909
  test: /^([-+]?)0b([0-1_]+)$/,
33910
- resolve: (str, sign, bin) => intResolve(sign, bin, 2),
33910
+ resolve: (str, sign, bin2) => intResolve(sign, bin2, 2),
33911
33911
  stringify: (node) => intStringify(node, 2, "0b")
33912
33912
  }, {
33913
33913
  identify: intIdentify,
@@ -34240,8 +34240,8 @@ var require_Document_9b4560a1 = __commonJS({
34240
34240
  tagObj = tags.find((t) => t.nodeClass && obj instanceof t.nodeClass);
34241
34241
  }
34242
34242
  if (!tagObj) {
34243
- const name = obj && obj.constructor ? obj.constructor.name : typeof obj;
34244
- throw new Error(`Tag not resolved for ${name} value`);
34243
+ const name2 = obj && obj.constructor ? obj.constructor.name : typeof obj;
34244
+ throw new Error(`Tag not resolved for ${name2} value`);
34245
34245
  }
34246
34246
  return tagObj;
34247
34247
  }
@@ -34277,10 +34277,10 @@ var require_Document_9b4560a1 = __commonJS({
34277
34277
  item = schema.createNode(item, true, null, createCtx);
34278
34278
  for (const alias of createCtx.aliasNodes) {
34279
34279
  alias.source = alias.source.node;
34280
- let name = anchors.getName(alias.source);
34281
- if (!name) {
34282
- name = anchors.newName();
34283
- anchors.map[name] = alias.source;
34280
+ let name2 = anchors.getName(alias.source);
34281
+ if (!name2) {
34282
+ name2 = anchors.newName();
34283
+ anchors.map[name2] = alias.source;
34284
34284
  }
34285
34285
  }
34286
34286
  }
@@ -34305,8 +34305,8 @@ ${ctx.indent}${str}`;
34305
34305
  PlainValue._defineProperty(this, "map", /* @__PURE__ */ Object.create(null));
34306
34306
  this.prefix = prefix;
34307
34307
  }
34308
- createAlias(node, name) {
34309
- this.setAnchor(node, name);
34308
+ createAlias(node, name2) {
34309
+ this.setAnchor(node, name2);
34310
34310
  return new resolveSeq.Alias(node);
34311
34311
  }
34312
34312
  createMergePair(...sources) {
@@ -34331,17 +34331,17 @@ ${ctx.indent}${str}`;
34331
34331
  getNames() {
34332
34332
  return Object.keys(this.map);
34333
34333
  }
34334
- getNode(name) {
34335
- return this.map[name];
34334
+ getNode(name2) {
34335
+ return this.map[name2];
34336
34336
  }
34337
34337
  newName(prefix) {
34338
34338
  if (!prefix)
34339
34339
  prefix = this.prefix;
34340
34340
  const names = Object.keys(this.map);
34341
34341
  for (let i = 1; true; ++i) {
34342
- const name = `${prefix}${i}`;
34343
- if (!names.includes(name))
34344
- return name;
34342
+ const name2 = `${prefix}${i}`;
34343
+ if (!names.includes(name2))
34344
+ return name2;
34345
34345
  }
34346
34346
  }
34347
34347
  resolveNodes() {
@@ -34357,11 +34357,11 @@ ${ctx.indent}${str}`;
34357
34357
  });
34358
34358
  delete this._cstAliases;
34359
34359
  }
34360
- setAnchor(node, name) {
34360
+ setAnchor(node, name2) {
34361
34361
  if (node != null && !Anchors.validAnchorNode(node)) {
34362
34362
  throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");
34363
34363
  }
34364
- if (name && /[\x00-\x19\s,[\]{}]/.test(name)) {
34364
+ if (name2 && /[\x00-\x19\s,[\]{}]/.test(name2)) {
34365
34365
  throw new Error("Anchor names must not contain whitespace or control characters");
34366
34366
  }
34367
34367
  const {
@@ -34369,21 +34369,21 @@ ${ctx.indent}${str}`;
34369
34369
  } = this;
34370
34370
  const prev = node && Object.keys(map).find((a) => map[a] === node);
34371
34371
  if (prev) {
34372
- if (!name) {
34372
+ if (!name2) {
34373
34373
  return prev;
34374
- } else if (prev !== name) {
34374
+ } else if (prev !== name2) {
34375
34375
  delete map[prev];
34376
- map[name] = node;
34376
+ map[name2] = node;
34377
34377
  }
34378
34378
  } else {
34379
- if (!name) {
34379
+ if (!name2) {
34380
34380
  if (!node)
34381
34381
  return null;
34382
- name = this.newName();
34382
+ name2 = this.newName();
34383
34383
  }
34384
- map[name] = node;
34384
+ map[name2] = node;
34385
34385
  }
34386
- return name;
34386
+ return name2;
34387
34387
  }
34388
34388
  };
34389
34389
  var visit = (node, tags) => {
@@ -34468,19 +34468,19 @@ ${cbNode.commentBefore}` : cb;
34468
34468
  };
34469
34469
  }
34470
34470
  function resolveYamlDirective(doc, directive) {
34471
- let [version] = directive.parameters;
34471
+ let [version2] = directive.parameters;
34472
34472
  if (directive.name === "YAML:1.0")
34473
- version = "1.0";
34474
- if (!version) {
34473
+ version2 = "1.0";
34474
+ if (!version2) {
34475
34475
  const msg = "Insufficient parameters given for %YAML directive";
34476
34476
  throw new PlainValue.YAMLSemanticError(directive, msg);
34477
34477
  }
34478
- if (!documentOptions[version]) {
34478
+ if (!documentOptions[version2]) {
34479
34479
  const v0 = doc.version || doc.options.version;
34480
- const msg = `Document will be parsed as YAML ${v0} rather than YAML ${version}`;
34480
+ const msg = `Document will be parsed as YAML ${v0} rather than YAML ${version2}`;
34481
34481
  doc.warnings.push(new PlainValue.YAMLWarning(directive, msg));
34482
34482
  }
34483
- return version;
34483
+ return version2;
34484
34484
  }
34485
34485
  function parseDirectives(doc, directives, prevDoc) {
34486
34486
  const directiveComments = [];
@@ -34488,9 +34488,9 @@ ${cbNode.commentBefore}` : cb;
34488
34488
  for (const directive of directives) {
34489
34489
  const {
34490
34490
  comment,
34491
- name
34491
+ name: name2
34492
34492
  } = directive;
34493
- switch (name) {
34493
+ switch (name2) {
34494
34494
  case "TAG":
34495
34495
  try {
34496
34496
  doc.tagPrefixes.push(resolveTagDirective(doc, directive));
@@ -34513,8 +34513,8 @@ ${cbNode.commentBefore}` : cb;
34513
34513
  hasDirectives = true;
34514
34514
  break;
34515
34515
  default:
34516
- if (name) {
34517
- const msg = `YAML only supports %TAG and %YAML directives, and not %${name}`;
34516
+ if (name2) {
34517
+ const msg = `YAML only supports %TAG and %YAML directives, and not %${name2}`;
34518
34518
  doc.warnings.push(new PlainValue.YAMLWarning(directive, msg));
34519
34519
  }
34520
34520
  }
@@ -34696,7 +34696,7 @@ ${cbNode.commentBefore}` : cb;
34696
34696
  };
34697
34697
  const anchorNames = Object.keys(this.anchors.map);
34698
34698
  if (anchorNames.length > 0)
34699
- ctx.anchors = new Map(anchorNames.map((name) => [this.anchors.map[name], {
34699
+ ctx.anchors = new Map(anchorNames.map((name2) => [this.anchors.map[name2], {
34700
34700
  alias: [],
34701
34701
  aliasCount: 0,
34702
34702
  count: 1
@@ -35335,10 +35335,10 @@ var require_colors = __commonJS({
35335
35335
  };
35336
35336
  function init() {
35337
35337
  var ret = {};
35338
- Object.keys(styles).forEach(function(name) {
35339
- ret[name] = {
35338
+ Object.keys(styles).forEach(function(name2) {
35339
+ ret[name2] = {
35340
35340
  get: function() {
35341
- return build([name]);
35341
+ return build([name2]);
35342
35342
  }
35343
35343
  };
35344
35344
  });
@@ -37421,8 +37421,8 @@ function isFunction(arg) {
37421
37421
  function whichModule(exported) {
37422
37422
  if (typeof require === "undefined")
37423
37423
  return null;
37424
- for (let i = 0, files = Object.keys(require.cache), mod; i < files.length; i++) {
37425
- mod = require.cache[files[i]];
37424
+ for (let i = 0, files2 = Object.keys(require.cache), mod; i < files2.length; i++) {
37425
+ mod = require.cache[files2[i]];
37426
37426
  if (mod.exports === exported)
37427
37427
  return mod;
37428
37428
  }
@@ -37462,7 +37462,7 @@ var CommandInstance = class {
37462
37462
  };
37463
37463
  this.shim.requireDirectory({ require: req, filename: callerFile }, dir, opts);
37464
37464
  }
37465
- addHandler(cmd, description, builder14, handler14, commandMiddleware, deprecated) {
37465
+ addHandler(cmd, description2, builder14, handler14, commandMiddleware, deprecated) {
37466
37466
  let aliases = [];
37467
37467
  const middlewares = commandMiddlewareFactory(commandMiddleware);
37468
37468
  handler14 = handler14 || (() => {
@@ -37482,7 +37482,7 @@ var CommandInstance = class {
37482
37482
  this.addHandler(command15, this.extractDesc(cmd), cmd.builder, cmd.handler, cmd.middlewares, cmd.deprecated);
37483
37483
  return;
37484
37484
  } else if (isCommandBuilderDefinition(builder14)) {
37485
- this.addHandler([cmd].concat(aliases), description, builder14.builder, builder14.handler, builder14.middlewares, builder14.deprecated);
37485
+ this.addHandler([cmd].concat(aliases), description2, builder14.builder, builder14.handler, builder14.middlewares, builder14.deprecated);
37486
37486
  return;
37487
37487
  }
37488
37488
  if (typeof cmd === "string") {
@@ -37506,12 +37506,12 @@ var CommandInstance = class {
37506
37506
  aliases.forEach((alias) => {
37507
37507
  this.aliasMap[alias] = parsedCommand.cmd;
37508
37508
  });
37509
- if (description !== false) {
37510
- this.usage.command(cmd, description, isDefault, aliases, deprecated);
37509
+ if (description2 !== false) {
37510
+ this.usage.command(cmd, description2, isDefault, aliases, deprecated);
37511
37511
  }
37512
37512
  this.handlers[parsedCommand.cmd] = {
37513
37513
  original: cmd,
37514
- description,
37514
+ description: description2,
37515
37515
  handler: handler14,
37516
37516
  builder: builder14 || {},
37517
37517
  middlewares,
@@ -37768,8 +37768,8 @@ var CommandInstance = class {
37768
37768
  commandFromFilename(filename) {
37769
37769
  return this.shim.path.basename(filename, this.shim.path.extname(filename));
37770
37770
  }
37771
- extractDesc({ describe: describe14, description, desc }) {
37772
- for (const test of [describe14, description, desc]) {
37771
+ extractDesc({ describe: describe14, description: description2, desc }) {
37772
+ for (const test of [describe14, description2, desc]) {
37773
37773
  if (typeof test === "string" || test === false)
37774
37774
  return test;
37775
37775
  assertNotStrictEqual(test, true, this.shim);
@@ -37910,14 +37910,14 @@ function usage(yargs, shim3) {
37910
37910
  };
37911
37911
  let usages = [];
37912
37912
  let usageDisabled = false;
37913
- self2.usage = (msg, description) => {
37913
+ self2.usage = (msg, description2) => {
37914
37914
  if (msg === null) {
37915
37915
  usageDisabled = true;
37916
37916
  usages = [];
37917
37917
  return self2;
37918
37918
  }
37919
37919
  usageDisabled = false;
37920
- usages.push([msg, description || ""]);
37920
+ usages.push([msg, description2 || ""]);
37921
37921
  return self2;
37922
37922
  };
37923
37923
  self2.getUsage = () => {
@@ -37930,18 +37930,18 @@ function usage(yargs, shim3) {
37930
37930
  return __("Positionals:");
37931
37931
  };
37932
37932
  let examples = [];
37933
- self2.example = (cmd, description) => {
37934
- examples.push([cmd, description || ""]);
37933
+ self2.example = (cmd, description2) => {
37934
+ examples.push([cmd, description2 || ""]);
37935
37935
  };
37936
37936
  let commands = [];
37937
- self2.command = function command15(cmd, description, isDefault, aliases, deprecated = false) {
37937
+ self2.command = function command15(cmd, description2, isDefault, aliases, deprecated = false) {
37938
37938
  if (isDefault) {
37939
37939
  commands = commands.map((cmdArray) => {
37940
37940
  cmdArray[2] = false;
37941
37941
  return cmdArray;
37942
37942
  });
37943
37943
  }
37944
- commands.push([cmd, description || "", isDefault, aliases, deprecated]);
37944
+ commands.push([cmd, description2 || "", isDefault, aliases, deprecated]);
37945
37945
  };
37946
37946
  self2.getCommands = () => commands;
37947
37947
  let descriptions = {};
@@ -38247,8 +38247,8 @@ function usage(yargs, shim3) {
38247
38247
  emit(self2.help());
38248
38248
  };
38249
38249
  self2.functionDescription = (fn) => {
38250
- const description = fn.name ? shim3.Parser.decamelize(fn.name, "-") : __("generated-value");
38251
- return ["(", description, ")"].join("");
38250
+ const description2 = fn.name ? shim3.Parser.decamelize(fn.name, "-") : __("generated-value");
38251
+ return ["(", description2, ")"].join("");
38252
38252
  };
38253
38253
  self2.stringifiedValues = function stringifiedValues(values, separator) {
38254
38254
  let string = "";
@@ -38291,16 +38291,16 @@ function usage(yargs, shim3) {
38291
38291
  return maxWidth2;
38292
38292
  }
38293
38293
  }
38294
- let version = null;
38294
+ let version2 = null;
38295
38295
  self2.version = (ver) => {
38296
- version = ver;
38296
+ version2 = ver;
38297
38297
  };
38298
38298
  self2.showVersion = (level) => {
38299
38299
  const logger = yargs.getInternalMethods().getLoggerInstance();
38300
38300
  if (!level)
38301
38301
  level = "error";
38302
38302
  const emit = typeof level === "function" ? level : logger[level];
38303
- emit(version);
38303
+ emit(version2);
38304
38304
  };
38305
38305
  self2.reset = function reset(localLookup) {
38306
38306
  failMessage = null;
@@ -38597,10 +38597,10 @@ var Completion = class {
38597
38597
  }
38598
38598
  generateCompletionScript($0, cmd) {
38599
38599
  let script = this.zshShell ? completionZshTemplate : completionShTemplate;
38600
- const name = this.shim.path.basename($0);
38600
+ const name2 = this.shim.path.basename($0);
38601
38601
  if ($0.match(/\.js$/))
38602
38602
  $0 = `./${$0}`;
38603
- script = script.replace(/{{app_name}}/g, name);
38603
+ script = script.replace(/{{app_name}}/g, name2);
38604
38604
  script = script.replace(/{{completion_command}}/g, cmd);
38605
38605
  return script.replace(/{{app_path}}/g, $0);
38606
38606
  }
@@ -39278,13 +39278,13 @@ var YargsInstance = class {
39278
39278
  __classPrivateFieldGet(this, _YargsInstance_completion, "f").registerFunction(fn);
39279
39279
  return this;
39280
39280
  }
39281
- command(cmd, description, builder14, handler14, middlewares, deprecated) {
39282
- argsert("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]", [cmd, description, builder14, handler14, middlewares, deprecated], arguments.length);
39283
- __classPrivateFieldGet(this, _YargsInstance_command, "f").addHandler(cmd, description, builder14, handler14, middlewares, deprecated);
39281
+ command(cmd, description2, builder14, handler14, middlewares, deprecated) {
39282
+ argsert("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]", [cmd, description2, builder14, handler14, middlewares, deprecated], arguments.length);
39283
+ __classPrivateFieldGet(this, _YargsInstance_command, "f").addHandler(cmd, description2, builder14, handler14, middlewares, deprecated);
39284
39284
  return this;
39285
39285
  }
39286
- commands(cmd, description, builder14, handler14, middlewares, deprecated) {
39287
- return this.command(cmd, description, builder14, handler14, middlewares, deprecated);
39286
+ commands(cmd, description2, builder14, handler14, middlewares, deprecated) {
39287
+ return this.command(cmd, description2, builder14, handler14, middlewares, deprecated);
39288
39288
  }
39289
39289
  commandDir(dir, opts) {
39290
39290
  argsert("<string> [object]", [dir, opts], arguments.length);
@@ -39369,10 +39369,10 @@ var YargsInstance = class {
39369
39369
  __classPrivateFieldGet(this, _YargsInstance_options, "f").deprecatedOptions[option] = message;
39370
39370
  return this;
39371
39371
  }
39372
- describe(keys, description) {
39373
- argsert("<object|string|array> [string]", [keys, description], arguments.length);
39372
+ describe(keys, description2) {
39373
+ argsert("<object|string|array> [string]", [keys, description2], arguments.length);
39374
39374
  this[kSetKey](keys, true);
39375
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").describe(keys, description);
39375
+ __classPrivateFieldGet(this, _YargsInstance_usage, "f").describe(keys, description2);
39376
39376
  return this;
39377
39377
  }
39378
39378
  detectLocale(detect) {
@@ -39396,12 +39396,12 @@ var YargsInstance = class {
39396
39396
  epilog(msg) {
39397
39397
  return this.epilogue(msg);
39398
39398
  }
39399
- example(cmd, description) {
39400
- argsert("<string|array> [string]", [cmd, description], arguments.length);
39399
+ example(cmd, description2) {
39400
+ argsert("<string|array> [string]", [cmd, description2], arguments.length);
39401
39401
  if (Array.isArray(cmd)) {
39402
39402
  cmd.forEach((exampleParams) => this.example(...exampleParams));
39403
39403
  } else {
39404
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").example(cmd, description);
39404
+ __classPrivateFieldGet(this, _YargsInstance_usage, "f").example(cmd, description2);
39405
39405
  }
39406
39406
  return this;
39407
39407
  }
@@ -39883,12 +39883,12 @@ var YargsInstance = class {
39883
39883
  __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.updateLocale(obj);
39884
39884
  return this;
39885
39885
  }
39886
- usage(msg, description, builder14, handler14) {
39887
- argsert("<string|null|undefined> [string|boolean] [function|object] [function]", [msg, description, builder14, handler14], arguments.length);
39888
- if (description !== void 0) {
39886
+ usage(msg, description2, builder14, handler14) {
39887
+ argsert("<string|null|undefined> [string|boolean] [function|object] [function]", [msg, description2, builder14, handler14], arguments.length);
39888
+ if (description2 !== void 0) {
39889
39889
  assertNotStrictEqual(msg, null, __classPrivateFieldGet(this, _YargsInstance_shim, "f"));
39890
39890
  if ((msg || "").match(/^\$0( |$)/)) {
39891
- return this.command(msg, description, builder14, handler14);
39891
+ return this.command(msg, description2, builder14, handler14);
39892
39892
  } else {
39893
39893
  throw new YError(".usage() description must start with $0 if being used as alias for .command()");
39894
39894
  }
@@ -40518,7 +40518,30 @@ var import_chalk = __toESM(require_source());
40518
40518
  var import_readline = __toESM(require("readline"));
40519
40519
  var import_axios = __toESM(require_axios4());
40520
40520
  var import_ora = __toESM(require_ora());
40521
+ async function checkToken(token, opts) {
40522
+ applyAuthToken(token);
40523
+ console.log();
40524
+ const spinner = (0, import_ora.default)("Validating API Token").start();
40525
+ try {
40526
+ const response = await import_axios.default.get(`${opts.apiHost}/auth/check_token`, {
40527
+ headers: {
40528
+ Authorization: `Bearer ${token}`
40529
+ },
40530
+ validateStatus: (_) => true
40531
+ });
40532
+ if (response.status === 200 && response.data.success) {
40533
+ await saveAuthToken(token);
40534
+ spinner.succeed(`${import_chalk.default.bold(`Logged in to project '${response.data.project.name}'`)} You can now run any authenticated commands on Goldsky from this computer`);
40535
+ return;
40536
+ }
40537
+ } catch (ex) {
40538
+ }
40539
+ spinner.fail(`${import_chalk.default.bold("Login failed")}. Make sure you entered your API token correctly - or contact Goldsky for more assistance`);
40540
+ }
40521
40541
  async function login(opts) {
40542
+ if (opts.token) {
40543
+ return checkToken(opts.token, opts);
40544
+ }
40522
40545
  const rl = import_readline.default.createInterface({
40523
40546
  input: process.stdin,
40524
40547
  output: process.stdout
@@ -40526,24 +40549,7 @@ async function login(opts) {
40526
40549
  rl.stdoutMuted = true;
40527
40550
  rl.question("Enter or paste in your Goldsky API token: ", async (token) => {
40528
40551
  rl.close();
40529
- applyAuthToken(token);
40530
- console.log();
40531
- const spinner = (0, import_ora.default)("Validating API Token").start();
40532
- try {
40533
- const response = await import_axios.default.get(`${opts.apiHost}/auth/check_token`, {
40534
- headers: {
40535
- Authorization: `Bearer ${token}`
40536
- },
40537
- validateStatus: (_) => true
40538
- });
40539
- if (response.status === 200 && response.data.success) {
40540
- await saveAuthToken(token);
40541
- spinner.succeed(`${import_chalk.default.bold(`Logged in to project '${response.data.project.name}'`)} You can now run any authenticated commands on Goldsky from this computer`);
40542
- return;
40543
- }
40544
- } catch (ex) {
40545
- }
40546
- spinner.fail(`${import_chalk.default.bold("Login failed")}. Make sure you entered your API token correctly - or contact Goldsky for more assistance`);
40552
+ await checkToken(token, opts);
40547
40553
  });
40548
40554
  rl._writeToOutput = () => {
40549
40555
  if (process.stdout.isTTY) {
@@ -40559,11 +40565,12 @@ async function logout(_opts) {
40559
40565
  // src/commands/login.ts
40560
40566
  var command2 = "login";
40561
40567
  var describe = "Log in to Goldsky to enable running authenticated CLI commands";
40562
- var builder = (yargs) => yargs.version(false);
40563
- var handler = async ({ apiHost }) => {
40564
- await login({
40565
- apiHost
40566
- });
40568
+ var builder = (yargs) => yargs.option("token", {
40569
+ describe: "CLI Auth Token",
40570
+ type: "string"
40571
+ });
40572
+ var handler = async ({ apiHost, token }) => {
40573
+ await login({ apiHost, token });
40567
40574
  };
40568
40575
 
40569
40576
  // src/commands/logout.ts
@@ -40658,11 +40665,11 @@ async function validateBuild(buildPath) {
40658
40665
  const spinner = (0, import_ora3.default)(`Validating build path`).start();
40659
40666
  const result = { isValid: false, buildPath };
40660
40667
  try {
40661
- const files = await Promise.all([
40668
+ const files2 = await Promise.all([
40662
40669
  import_fs6.default.promises.stat(import_path6.default.join(buildPath, "package.json")),
40663
40670
  import_fs6.default.promises.stat(import_path6.default.join(buildPath, "build"))
40664
40671
  ]);
40665
- if (files[0].isFile() && files[1].isDirectory()) {
40672
+ if (files2[0].isFile() && files2[1].isDirectory()) {
40666
40673
  result.buildPath = import_path6.default.join(buildPath, "build");
40667
40674
  }
40668
40675
  } catch (ex) {
@@ -40761,7 +40768,7 @@ var builder4 = (yargs) => yargs.positional("nameAndVersion", {
40761
40768
  }).option("path", {
40762
40769
  describe: "Path to subgraph",
40763
40770
  type: "string",
40764
- default: import_path8.default.join(process.cwd(), "build")
40771
+ default: import_path8.default.join(process.cwd())
40765
40772
  }).option("overwrite", {
40766
40773
  describe: "Overwrite existing subgraph with the matching name/version",
40767
40774
  type: "boolean",
@@ -41128,12 +41135,12 @@ var builder9 = (yargs) => yargs.positional("nameAndVersion", {
41128
41135
  });
41129
41136
  var handler9 = async ({
41130
41137
  entity,
41131
- name,
41138
+ name: name2,
41132
41139
  nameAndVersion,
41133
41140
  url
41134
41141
  }) => {
41135
41142
  await createWebhook({
41136
- name,
41143
+ name: name2,
41137
41144
  subgraphName: extractNameAndVersion(nameAndVersion)[0],
41138
41145
  subgraphVersion: extractNameAndVersion(nameAndVersion)[1],
41139
41146
  webhookUrl: url,
@@ -41157,9 +41164,9 @@ var builder10 = (yargs) => yargs.option("name", {
41157
41164
  type: "string",
41158
41165
  demandOption: true
41159
41166
  });
41160
- var handler10 = async ({ apiHost, name }) => {
41167
+ var handler10 = async ({ apiHost, name: name2 }) => {
41161
41168
  await deleteWebhook({
41162
- name
41169
+ name: name2
41163
41170
  });
41164
41171
  };
41165
41172
 
@@ -41193,11 +41200,88 @@ var builder13 = (yargs) => yargs.command(deploy_exports).command(list_exports).c
41193
41200
  var handler13 = async () => {
41194
41201
  };
41195
41202
 
41203
+ // src/lib/update-notifier.ts
41204
+ var import_chalk11 = __toESM(require_source());
41205
+
41206
+ // package.json
41207
+ var name = "@goldskycom/cli";
41208
+ var version = "0.2.0";
41209
+ var description = "The Goldsky CLI to deploy subgraphs, index & transform blockchain data, configure webhooks, and access your data in real-time.";
41210
+ var main = "dist/index.js";
41211
+ var keywords = [
41212
+ "goldsky",
41213
+ "web3",
41214
+ "blockchain",
41215
+ "real-time",
41216
+ "data pipelines",
41217
+ "streams",
41218
+ "webhooks"
41219
+ ];
41220
+ var author = "Goldsky";
41221
+ var scripts = {
41222
+ test: 'echo "Error: no test specified" && exit 1',
41223
+ clean: "rimraf ./dist && rimraf tsconfig.tsbuildinfo",
41224
+ build: "npm run clean && tsc --noEmit --skipLibCheck && node ./scripts/build.js && chmod a+x bin/goldsky",
41225
+ "build:sdk": "npx pkg -t linux,macos,win . -o sdk/goldsky",
41226
+ "dev:debug": "ts-node src/index.ts",
41227
+ prepublishOnly: "npm run build"
41228
+ };
41229
+ var bin = {
41230
+ goldsky: "bin/goldsky"
41231
+ };
41232
+ var files = [
41233
+ "bin/goldsky",
41234
+ "dist"
41235
+ ];
41236
+ var devDependencies = {
41237
+ "@types/axios": "^0.14.0",
41238
+ "@types/cli-table": "^0.3.0",
41239
+ "@types/form-data": "^2.5.0",
41240
+ "@types/jszip": "^3.4.1",
41241
+ "@types/node": "^16.11.11",
41242
+ "@types/update-notifier": "^6.0.1",
41243
+ "@types/yaml": "^1.9.7",
41244
+ "@types/yargs": "^17.0.7",
41245
+ axios: "^0.24.0",
41246
+ chalk: "^4.1.2",
41247
+ "cli-table": "^0.3.11",
41248
+ "form-data": "^4.0.0",
41249
+ jszip: "^3.7.1",
41250
+ ora: "^4.1.1",
41251
+ "update-notifier": "^6.0.2",
41252
+ yaml: "^1.10.2",
41253
+ yargs: "^17.5.1"
41254
+ };
41255
+ var license = "";
41256
+ var package_default = {
41257
+ name,
41258
+ version,
41259
+ description,
41260
+ main,
41261
+ keywords,
41262
+ author,
41263
+ scripts,
41264
+ bin,
41265
+ files,
41266
+ devDependencies,
41267
+ license
41268
+ };
41269
+
41270
+ // src/lib/update-notifier.ts
41271
+ var runUpdateNotifier = async () => {
41272
+ const updateNotifier = Function('return import("update-notifier")')();
41273
+ (await updateNotifier).default({ pkg: package_default }).notify({
41274
+ message: `\u{1F389} A new version of the Goldsky CLI is available \u{1F389}
41275
+
41276
+ Run {updateCommand} to update (${import_chalk11.default.dim("{currentVersion}")}${import_chalk11.default.reset(" \u2192 ")}${import_chalk11.default.green("{latestVersion}")})`
41277
+ });
41278
+ };
41279
+
41196
41280
  // src/index.ts
41197
41281
  var import_api_schemas7 = __toESM(require_src2());
41198
41282
  var doesCommandAcceptSubgraphNameWithoutVersion = (command15) => ["subgraph list", "subgraph tag delete"].includes(command15);
41199
41283
  var argv = hideBin(process.argv);
41200
- loadAndApplyAuthToken().then(() => {
41284
+ runUpdateNotifier().then(loadAndApplyAuthToken).then(() => {
41201
41285
  yargs_default(argv).scriptName("goldsky").usage("$0 <cmd> args").check((argv2) => {
41202
41286
  if (argv2.nameAndVersion && !doesCommandAcceptSubgraphNameWithoutVersion(argv2._.join(" ")) && !argv2.nameAndVersion.match(/^.*\/.*$/)) {
41203
41287
  throw new Error(`The provided <nameAndValue> "${argv2.nameAndVersion}" does not match the "name/version" pattern, such as "my-subgraph/1.0.0".`);