@goldskycom/cli 0.2.0 → 0.2.1

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 +762 -450
  2. package/package.json +5 -3
package/dist/index.js CHANGED
@@ -1,33 +1,30 @@
1
+ "use strict";
1
2
  var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
6
  var __getProtoOf = Object.getPrototypeOf;
6
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
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 name2 in all)
13
- __defProp(target, name2, { get: all[name2], enumerable: true });
12
+ for (var name in all)
13
+ __defProp(target, name, { get: all[name], enumerable: true });
14
14
  };
15
- var __reExport = (target, module2, copyDefault, desc) => {
16
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
17
- for (let key of __getOwnPropNames(module2))
18
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
19
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from))
18
+ if (!__hasOwnProp.call(to, key) && key !== except)
19
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
20
20
  }
21
- return target;
22
- };
23
- var __toESM = (module2, isNodeMode) => {
24
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
21
+ return to;
25
22
  };
26
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
27
- return (module2, temp) => {
28
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
29
- };
30
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
31
28
 
32
29
  // ../../node_modules/@sinclair/typebox/typebox.js
33
30
  var require_typebox = __commonJS({
@@ -94,11 +91,11 @@ var require_typebox = __commonJS({
94
91
  }
95
92
  Object(properties, options = {}) {
96
93
  const property_names = Object.keys(properties);
97
- const optional = property_names.filter((name2) => {
98
- const candidate = properties[name2];
94
+ const optional = property_names.filter((name) => {
95
+ const candidate = properties[name];
99
96
  return candidate.modifier && (candidate.modifier === exports.OptionalModifier || candidate.modifier === exports.ReadonlyOptionalModifier);
100
97
  });
101
- const required_names = property_names.filter((name2) => !optional.includes(name2));
98
+ const required_names = property_names.filter((name) => !optional.includes(name));
102
99
  const required = required_names.length > 0 ? required_names : void 0;
103
100
  return this.Store(required ? { ...options, kind: exports.ObjectKind, type: "object", properties, required } : { ...options, kind: exports.ObjectKind, type: "object", properties });
104
101
  }
@@ -333,6 +330,22 @@ var require_subgraph = __commonJS({
333
330
  exports.RemoveMessageSchema = {
334
331
  params: DeployParams
335
332
  };
333
+ var SubgraphDeployment = typebox_1.Type.Object({
334
+ created_at: typebox_1.Type.Number(),
335
+ deployment_id: typebox_1.Type.String(),
336
+ health: typebox_1.Type.String(),
337
+ synced: typebox_1.Type.Boolean(),
338
+ fatal_error: typebox_1.Type.Optional(typebox_1.Type.String()),
339
+ non_fatal_errors: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.String())),
340
+ indexing_progress: typebox_1.Type.Optional(typebox_1.Type.Object({
341
+ network: typebox_1.Type.String(),
342
+ progress_percent: typebox_1.Type.Number(),
343
+ chain_head_block: typebox_1.Type.Number(),
344
+ deployment_head_block: typebox_1.Type.Number(),
345
+ deployment_start_block: typebox_1.Type.Number(),
346
+ synced: typebox_1.Type.Boolean()
347
+ }))
348
+ });
336
349
  var SubgraphStatus = typebox_1.Type.Object({
337
350
  name: typebox_1.Type.String(),
338
351
  version: typebox_1.Type.String(),
@@ -340,22 +353,7 @@ var require_subgraph = __commonJS({
340
353
  health: typebox_1.Type.String(),
341
354
  synced: typebox_1.Type.Boolean(),
342
355
  graphql_endpoint: typebox_1.Type.String(),
343
- deployments: typebox_1.Type.Array(typebox_1.Type.Object({
344
- created_at: typebox_1.Type.Number(),
345
- deployment_id: typebox_1.Type.String(),
346
- health: typebox_1.Type.String(),
347
- synced: typebox_1.Type.Boolean(),
348
- fatal_error: typebox_1.Type.Optional(typebox_1.Type.String()),
349
- non_fatal_errors: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.String())),
350
- indexing_progress: typebox_1.Type.Optional(typebox_1.Type.Object({
351
- network: typebox_1.Type.String(),
352
- progress_percent: typebox_1.Type.Number(),
353
- chain_head_block: typebox_1.Type.Number(),
354
- deployment_head_block: typebox_1.Type.Number(),
355
- deployment_start_block: typebox_1.Type.Number(),
356
- synced: typebox_1.Type.Boolean()
357
- }))
358
- }))
356
+ deployments: typebox_1.Type.Array(SubgraphDeployment)
359
357
  });
360
358
  var SubgraphVersionsParams = typebox_1.Type.Object({
361
359
  name: typebox_1.Type.String()
@@ -710,10 +708,10 @@ var require_normalizeHeaderName = __commonJS({
710
708
  "use strict";
711
709
  var utils = require_utils();
712
710
  module2.exports = function normalizeHeaderName(headers, normalizedName) {
713
- utils.forEach(headers, function processHeader(value, name2) {
714
- if (name2 !== normalizedName && name2.toUpperCase() === normalizedName.toUpperCase()) {
711
+ utils.forEach(headers, function processHeader(value, name) {
712
+ if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
715
713
  headers[normalizedName] = value;
716
- delete headers[name2];
714
+ delete headers[name];
717
715
  }
718
716
  });
719
717
  };
@@ -774,7 +772,13 @@ var require_settle = __commonJS({
774
772
  if (!response.status || !validateStatus || validateStatus(response.status)) {
775
773
  resolve5(response);
776
774
  } else {
777
- reject(createError("Request failed with status code " + response.status, response.config, null, response.request, response));
775
+ reject(createError(
776
+ "Request failed with status code " + response.status,
777
+ response.config,
778
+ null,
779
+ response.request,
780
+ response
781
+ ));
778
782
  }
779
783
  };
780
784
  }
@@ -787,9 +791,9 @@ var require_cookies = __commonJS({
787
791
  var utils = require_utils();
788
792
  module2.exports = utils.isStandardBrowserEnv() ? function standardBrowserEnv() {
789
793
  return {
790
- write: function write(name2, value, expires, path5, domain, secure) {
794
+ write: function write(name, value, expires, path5, domain, secure) {
791
795
  var cookie = [];
792
- cookie.push(name2 + "=" + encodeURIComponent(value));
796
+ cookie.push(name + "=" + encodeURIComponent(value));
793
797
  if (utils.isNumber(expires)) {
794
798
  cookie.push("expires=" + new Date(expires).toGMTString());
795
799
  }
@@ -804,12 +808,12 @@ var require_cookies = __commonJS({
804
808
  }
805
809
  document.cookie = cookie.join("; ");
806
810
  },
807
- read: function read(name2) {
808
- var match = document.cookie.match(new RegExp("(^|;\\s*)(" + name2 + ")=([^;]*)"));
811
+ read: function read(name) {
812
+ var match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
809
813
  return match ? decodeURIComponent(match[3]) : null;
810
814
  },
811
- remove: function remove2(name2) {
812
- this.write(name2, "", Date.now() - 864e5);
815
+ remove: function remove2(name) {
816
+ this.write(name, "", Date.now() - 864e5);
813
817
  }
814
818
  };
815
819
  }() : function nonStandardBrowserEnv() {
@@ -1061,7 +1065,12 @@ var require_xhr = __commonJS({
1061
1065
  if (config.timeoutErrorMessage) {
1062
1066
  timeoutErrorMessage = config.timeoutErrorMessage;
1063
1067
  }
1064
- reject(createError(timeoutErrorMessage, config, transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED", request));
1068
+ reject(createError(
1069
+ timeoutErrorMessage,
1070
+ config,
1071
+ transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED",
1072
+ request
1073
+ ));
1065
1074
  request = null;
1066
1075
  };
1067
1076
  if (utils.isStandardBrowserEnv()) {
@@ -1131,14 +1140,18 @@ var require_ms = __commonJS({
1131
1140
  } else if (type === "number" && isFinite(val)) {
1132
1141
  return options.long ? fmtLong(val) : fmtShort(val);
1133
1142
  }
1134
- throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
1143
+ throw new Error(
1144
+ "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
1145
+ );
1135
1146
  };
1136
1147
  function parse(str) {
1137
1148
  str = String(str);
1138
1149
  if (str.length > 100) {
1139
1150
  return;
1140
1151
  }
1141
- var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
1152
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
1153
+ str
1154
+ );
1142
1155
  if (!match) {
1143
1156
  return;
1144
1157
  }
@@ -1219,9 +1232,9 @@ var require_ms = __commonJS({
1219
1232
  }
1220
1233
  return ms + " ms";
1221
1234
  }
1222
- function plural(ms, msAbs, n, name2) {
1235
+ function plural(ms, msAbs, n, name) {
1223
1236
  var isPlural = msAbs >= n * 1.5;
1224
- return Math.round(ms / n) + " " + name2 + (isPlural ? "s" : "");
1237
+ return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
1225
1238
  }
1226
1239
  }
1227
1240
  });
@@ -1352,19 +1365,19 @@ var require_common = __commonJS({
1352
1365
  createDebug.enable("");
1353
1366
  return namespaces;
1354
1367
  }
1355
- function enabled(name2) {
1356
- if (name2[name2.length - 1] === "*") {
1368
+ function enabled(name) {
1369
+ if (name[name.length - 1] === "*") {
1357
1370
  return true;
1358
1371
  }
1359
1372
  let i;
1360
1373
  let len;
1361
1374
  for (i = 0, len = createDebug.skips.length; i < len; i++) {
1362
- if (createDebug.skips[i].test(name2)) {
1375
+ if (createDebug.skips[i].test(name)) {
1363
1376
  return false;
1364
1377
  }
1365
1378
  }
1366
1379
  for (i = 0, len = createDebug.names.length; i < len; i++) {
1367
- if (createDebug.names[i].test(name2)) {
1380
+ if (createDebug.names[i].test(name)) {
1368
1381
  return true;
1369
1382
  }
1370
1383
  }
@@ -1638,10 +1651,10 @@ var require_supports_color = __commonJS({
1638
1651
  return 3;
1639
1652
  }
1640
1653
  if ("TERM_PROGRAM" in env2) {
1641
- const version2 = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
1654
+ const version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
1642
1655
  switch (env2.TERM_PROGRAM) {
1643
1656
  case "iTerm.app":
1644
- return version2 >= 3 ? 3 : 2;
1657
+ return version >= 3 ? 3 : 2;
1645
1658
  case "Apple_Terminal":
1646
1659
  return 2;
1647
1660
  }
@@ -1680,8 +1693,11 @@ var require_node = __commonJS({
1680
1693
  exports.save = save;
1681
1694
  exports.load = load;
1682
1695
  exports.useColors = useColors;
1683
- exports.destroy = util.deprecate(() => {
1684
- }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
1696
+ exports.destroy = util.deprecate(
1697
+ () => {
1698
+ },
1699
+ "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
1700
+ );
1685
1701
  exports.colors = [6, 2, 3, 4, 5, 1];
1686
1702
  try {
1687
1703
  const supportsColor = require_supports_color();
@@ -1790,15 +1806,15 @@ var require_node = __commonJS({
1790
1806
  return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
1791
1807
  }
1792
1808
  function formatArgs(args) {
1793
- const { namespace: name2, useColors: useColors2 } = this;
1809
+ const { namespace: name, useColors: useColors2 } = this;
1794
1810
  if (useColors2) {
1795
1811
  const c = this.color;
1796
1812
  const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
1797
- const prefix = ` ${colorCode};1m${name2} \x1B[0m`;
1813
+ const prefix = ` ${colorCode};1m${name} \x1B[0m`;
1798
1814
  args[0] = prefix + args[0].split("\n").join("\n" + prefix);
1799
1815
  args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
1800
1816
  } else {
1801
- args[0] = getDate() + name2 + " " + args[0];
1817
+ args[0] = getDate() + name + " " + args[0];
1802
1818
  }
1803
1819
  }
1804
1820
  function getDate() {
@@ -1888,10 +1904,22 @@ var require_follow_redirects = __commonJS({
1888
1904
  this._redirectable.emit(event, arg1, arg2, arg3);
1889
1905
  };
1890
1906
  });
1891
- var RedirectionError = createErrorType("ERR_FR_REDIRECTION_FAILURE", "Redirected request failed");
1892
- var TooManyRedirectsError = createErrorType("ERR_FR_TOO_MANY_REDIRECTS", "Maximum number of redirects exceeded");
1893
- var MaxBodyLengthExceededError = createErrorType("ERR_FR_MAX_BODY_LENGTH_EXCEEDED", "Request body larger than maxBodyLength limit");
1894
- var WriteAfterEndError = createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end");
1907
+ var RedirectionError = createErrorType(
1908
+ "ERR_FR_REDIRECTION_FAILURE",
1909
+ "Redirected request failed"
1910
+ );
1911
+ var TooManyRedirectsError = createErrorType(
1912
+ "ERR_FR_TOO_MANY_REDIRECTS",
1913
+ "Maximum number of redirects exceeded"
1914
+ );
1915
+ var MaxBodyLengthExceededError = createErrorType(
1916
+ "ERR_FR_MAX_BODY_LENGTH_EXCEEDED",
1917
+ "Request body larger than maxBodyLength limit"
1918
+ );
1919
+ var WriteAfterEndError = createErrorType(
1920
+ "ERR_STREAM_WRITE_AFTER_END",
1921
+ "write after end"
1922
+ );
1895
1923
  function RedirectableRequest(options, responseCallback) {
1896
1924
  Writable.call(this);
1897
1925
  this._sanitizeOptions(options);
@@ -1963,13 +1991,13 @@ var require_follow_redirects = __commonJS({
1963
1991
  this._ending = true;
1964
1992
  }
1965
1993
  };
1966
- RedirectableRequest.prototype.setHeader = function(name2, value) {
1967
- this._options.headers[name2] = value;
1968
- this._currentRequest.setHeader(name2, value);
1994
+ RedirectableRequest.prototype.setHeader = function(name, value) {
1995
+ this._options.headers[name] = value;
1996
+ this._currentRequest.setHeader(name, value);
1969
1997
  };
1970
- RedirectableRequest.prototype.removeHeader = function(name2) {
1971
- delete this._options.headers[name2];
1972
- this._currentRequest.removeHeader(name2);
1998
+ RedirectableRequest.prototype.removeHeader = function(name) {
1999
+ delete this._options.headers[name];
2000
+ this._currentRequest.removeHeader(name);
1973
2001
  };
1974
2002
  RedirectableRequest.prototype.setTimeout = function(msecs, callback) {
1975
2003
  var self2 = this;
@@ -2332,8 +2360,8 @@ var require_http = __commonJS({
2332
2360
  var data = config.data;
2333
2361
  var headers = config.headers;
2334
2362
  var headerNames = {};
2335
- Object.keys(headers).forEach(function storeLowerName(name2) {
2336
- headerNames[name2.toLowerCase()] = name2;
2363
+ Object.keys(headers).forEach(function storeLowerName(name) {
2364
+ headerNames[name.toLowerCase()] = name;
2337
2365
  });
2338
2366
  if ("user-agent" in headerNames) {
2339
2367
  if (!headers[headerNames["user-agent"]]) {
@@ -2349,7 +2377,10 @@ var require_http = __commonJS({
2349
2377
  } else if (utils.isString(data)) {
2350
2378
  data = Buffer.from(data, "utf-8");
2351
2379
  } else {
2352
- return reject(createError("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", config));
2380
+ return reject(createError(
2381
+ "Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",
2382
+ config
2383
+ ));
2353
2384
  }
2354
2385
  if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
2355
2386
  return reject(createError("Request body larger than maxBodyLength limit", config));
@@ -2498,7 +2529,12 @@ var require_http = __commonJS({
2498
2529
  if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
2499
2530
  rejected = true;
2500
2531
  stream.destroy();
2501
- reject(createError("maxContentLength size of " + config.maxContentLength + " exceeded", config, null, lastRequest));
2532
+ reject(createError(
2533
+ "maxContentLength size of " + config.maxContentLength + " exceeded",
2534
+ config,
2535
+ null,
2536
+ lastRequest
2537
+ ));
2502
2538
  }
2503
2539
  });
2504
2540
  stream.on("aborted", function handlerStreamAborted() {
@@ -2541,7 +2577,12 @@ var require_http = __commonJS({
2541
2577
  if (config.timeout) {
2542
2578
  var timeout = parseInt(config.timeout, 10);
2543
2579
  if (isNaN(timeout)) {
2544
- reject(createError("error trying to parse `config.timeout` to int", config, "ERR_PARSE_TIMEOUT", req));
2580
+ reject(createError(
2581
+ "error trying to parse `config.timeout` to int",
2582
+ config,
2583
+ "ERR_PARSE_TIMEOUT",
2584
+ req
2585
+ ));
2545
2586
  return;
2546
2587
  }
2547
2588
  req.setTimeout(timeout, function handleRequestTimeout() {
@@ -2553,7 +2594,12 @@ var require_http = __commonJS({
2553
2594
  timeoutErrorMessage = "timeout of " + config.timeout + "ms exceeded";
2554
2595
  }
2555
2596
  var transitional = config.transitional || defaults.transitional;
2556
- reject(createError(timeoutErrorMessage, config, transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED", req));
2597
+ reject(createError(
2598
+ timeoutErrorMessage,
2599
+ config,
2600
+ transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED",
2601
+ req
2602
+ ));
2557
2603
  });
2558
2604
  }
2559
2605
  if (config.cancelToken || config.signal) {
@@ -2732,21 +2778,43 @@ var require_dispatchRequest = __commonJS({
2732
2778
  module2.exports = function dispatchRequest(config) {
2733
2779
  throwIfCancellationRequested(config);
2734
2780
  config.headers = config.headers || {};
2735
- config.data = transformData.call(config, config.data, config.headers, config.transformRequest);
2736
- config.headers = utils.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers);
2737
- utils.forEach(["delete", "get", "head", "post", "put", "patch", "common"], function cleanHeaderConfig(method) {
2738
- delete config.headers[method];
2739
- });
2781
+ config.data = transformData.call(
2782
+ config,
2783
+ config.data,
2784
+ config.headers,
2785
+ config.transformRequest
2786
+ );
2787
+ config.headers = utils.merge(
2788
+ config.headers.common || {},
2789
+ config.headers[config.method] || {},
2790
+ config.headers
2791
+ );
2792
+ utils.forEach(
2793
+ ["delete", "get", "head", "post", "put", "patch", "common"],
2794
+ function cleanHeaderConfig(method) {
2795
+ delete config.headers[method];
2796
+ }
2797
+ );
2740
2798
  var adapter = config.adapter || defaults.adapter;
2741
2799
  return adapter(config).then(function onAdapterResolution(response) {
2742
2800
  throwIfCancellationRequested(config);
2743
- response.data = transformData.call(config, response.data, response.headers, config.transformResponse);
2801
+ response.data = transformData.call(
2802
+ config,
2803
+ response.data,
2804
+ response.headers,
2805
+ config.transformResponse
2806
+ );
2744
2807
  return response;
2745
2808
  }, function onAdapterRejection(reason) {
2746
2809
  if (!isCancel(reason)) {
2747
2810
  throwIfCancellationRequested(config);
2748
2811
  if (reason && reason.response) {
2749
- reason.response.data = transformData.call(config, reason.response.data, reason.response.headers, config.transformResponse);
2812
+ reason.response.data = transformData.call(
2813
+ config,
2814
+ reason.response.data,
2815
+ reason.response.headers,
2816
+ config.transformResponse
2817
+ );
2750
2818
  }
2751
2819
  }
2752
2820
  return Promise.reject(reason);
@@ -2849,17 +2917,22 @@ var require_validator = __commonJS({
2849
2917
  };
2850
2918
  });
2851
2919
  var deprecatedWarnings = {};
2852
- validators.transitional = function transitional(validator, version2, message) {
2920
+ validators.transitional = function transitional(validator, version, message) {
2853
2921
  function formatMessage(opt, desc) {
2854
2922
  return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
2855
2923
  }
2856
2924
  return function(value, opt, opts) {
2857
2925
  if (validator === false) {
2858
- throw new Error(formatMessage(opt, " has been removed" + (version2 ? " in " + version2 : "")));
2926
+ throw new Error(formatMessage(opt, " has been removed" + (version ? " in " + version : "")));
2859
2927
  }
2860
- if (version2 && !deprecatedWarnings[opt]) {
2928
+ if (version && !deprecatedWarnings[opt]) {
2861
2929
  deprecatedWarnings[opt] = true;
2862
- console.warn(formatMessage(opt, " has been deprecated since v" + version2 + " and will be removed in the near future"));
2930
+ console.warn(
2931
+ formatMessage(
2932
+ opt,
2933
+ " has been deprecated since v" + version + " and will be removed in the near future"
2934
+ )
2935
+ );
2863
2936
  }
2864
2937
  return validator ? validator(value, opt, opts) : true;
2865
2938
  };
@@ -12665,9 +12738,13 @@ var require_src2 = __commonJS({
12665
12738
  var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
12666
12739
  if (k2 === void 0)
12667
12740
  k2 = k;
12668
- Object.defineProperty(o, k2, { enumerable: true, get: function() {
12669
- return m[k];
12670
- } });
12741
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12742
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12743
+ desc = { enumerable: true, get: function() {
12744
+ return m[k];
12745
+ } };
12746
+ }
12747
+ Object.defineProperty(o, k2, desc);
12671
12748
  } : function(o, m, k, k2) {
12672
12749
  if (k2 === void 0)
12673
12750
  k2 = k;
@@ -13703,11 +13780,11 @@ var require_ansi_styles = __commonJS({
13703
13780
  const offset = isBackground ? 10 : 0;
13704
13781
  const styles = {};
13705
13782
  for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
13706
- const name2 = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
13783
+ const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
13707
13784
  if (sourceSpace === targetSpace) {
13708
- styles[name2] = wrap2(identity, offset);
13785
+ styles[name] = wrap2(identity, offset);
13709
13786
  } else if (typeof suite === "object") {
13710
- styles[name2] = wrap2(suite[targetSpace], offset);
13787
+ styles[name] = wrap2(suite[targetSpace], offset);
13711
13788
  }
13712
13789
  }
13713
13790
  return styles;
@@ -13871,7 +13948,7 @@ var require_templates = __commonJS({
13871
13948
  }
13872
13949
  return ESCAPES.get(c) || c;
13873
13950
  }
13874
- function parseArguments(name2, arguments_) {
13951
+ function parseArguments(name, arguments_) {
13875
13952
  const results = [];
13876
13953
  const chunks = arguments_.trim().split(/\s*,\s*/g);
13877
13954
  let matches;
@@ -13882,7 +13959,7 @@ var require_templates = __commonJS({
13882
13959
  } else if (matches = chunk.match(STRING_REGEX)) {
13883
13960
  results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape2(escape) : character));
13884
13961
  } else {
13885
- throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name2}')`);
13962
+ throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
13886
13963
  }
13887
13964
  }
13888
13965
  return results;
@@ -13892,12 +13969,12 @@ var require_templates = __commonJS({
13892
13969
  const results = [];
13893
13970
  let matches;
13894
13971
  while ((matches = STYLE_REGEX.exec(style)) !== null) {
13895
- const name2 = matches[1];
13972
+ const name = matches[1];
13896
13973
  if (matches[2]) {
13897
- const args = parseArguments(name2, matches[2]);
13898
- results.push([name2].concat(args));
13974
+ const args = parseArguments(name, matches[2]);
13975
+ results.push([name].concat(args));
13899
13976
  } else {
13900
- results.push([name2]);
13977
+ results.push([name]);
13901
13978
  }
13902
13979
  }
13903
13980
  return results;
@@ -14113,7 +14190,10 @@ var require_source = __commonJS({
14113
14190
  const arguments_ = strings.slice(1);
14114
14191
  const parts = [firstString.raw[0]];
14115
14192
  for (let i = 1; i < firstString.length; i++) {
14116
- parts.push(String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"), String(firstString.raw[i]));
14193
+ parts.push(
14194
+ String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"),
14195
+ String(firstString.raw[i])
14196
+ );
14117
14197
  }
14118
14198
  if (template === void 0) {
14119
14199
  template = require_templates();
@@ -14388,10 +14468,10 @@ var require_normalizeHeaderName2 = __commonJS({
14388
14468
  "use strict";
14389
14469
  var utils = require_utils2();
14390
14470
  module2.exports = function normalizeHeaderName(headers, normalizedName) {
14391
- utils.forEach(headers, function processHeader(value, name2) {
14392
- if (name2 !== normalizedName && name2.toUpperCase() === normalizedName.toUpperCase()) {
14471
+ utils.forEach(headers, function processHeader(value, name) {
14472
+ if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
14393
14473
  headers[normalizedName] = value;
14394
- delete headers[name2];
14474
+ delete headers[name];
14395
14475
  }
14396
14476
  });
14397
14477
  };
@@ -14452,7 +14532,13 @@ var require_settle2 = __commonJS({
14452
14532
  if (!response.status || !validateStatus || validateStatus(response.status)) {
14453
14533
  resolve5(response);
14454
14534
  } else {
14455
- reject(createError("Request failed with status code " + response.status, response.config, null, response.request, response));
14535
+ reject(createError(
14536
+ "Request failed with status code " + response.status,
14537
+ response.config,
14538
+ null,
14539
+ response.request,
14540
+ response
14541
+ ));
14456
14542
  }
14457
14543
  };
14458
14544
  }
@@ -14465,9 +14551,9 @@ var require_cookies2 = __commonJS({
14465
14551
  var utils = require_utils2();
14466
14552
  module2.exports = utils.isStandardBrowserEnv() ? function standardBrowserEnv() {
14467
14553
  return {
14468
- write: function write(name2, value, expires, path5, domain, secure) {
14554
+ write: function write(name, value, expires, path5, domain, secure) {
14469
14555
  var cookie = [];
14470
- cookie.push(name2 + "=" + encodeURIComponent(value));
14556
+ cookie.push(name + "=" + encodeURIComponent(value));
14471
14557
  if (utils.isNumber(expires)) {
14472
14558
  cookie.push("expires=" + new Date(expires).toGMTString());
14473
14559
  }
@@ -14482,12 +14568,12 @@ var require_cookies2 = __commonJS({
14482
14568
  }
14483
14569
  document.cookie = cookie.join("; ");
14484
14570
  },
14485
- read: function read(name2) {
14486
- var match = document.cookie.match(new RegExp("(^|;\\s*)(" + name2 + ")=([^;]*)"));
14571
+ read: function read(name) {
14572
+ var match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
14487
14573
  return match ? decodeURIComponent(match[3]) : null;
14488
14574
  },
14489
- remove: function remove2(name2) {
14490
- this.write(name2, "", Date.now() - 864e5);
14575
+ remove: function remove2(name) {
14576
+ this.write(name, "", Date.now() - 864e5);
14491
14577
  }
14492
14578
  };
14493
14579
  }() : function nonStandardBrowserEnv() {
@@ -14739,7 +14825,12 @@ var require_xhr2 = __commonJS({
14739
14825
  if (config.timeoutErrorMessage) {
14740
14826
  timeoutErrorMessage = config.timeoutErrorMessage;
14741
14827
  }
14742
- reject(createError(timeoutErrorMessage, config, transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED", request));
14828
+ reject(createError(
14829
+ timeoutErrorMessage,
14830
+ config,
14831
+ transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED",
14832
+ request
14833
+ ));
14743
14834
  request = null;
14744
14835
  };
14745
14836
  if (utils.isStandardBrowserEnv()) {
@@ -14857,8 +14948,8 @@ var require_http2 = __commonJS({
14857
14948
  var data = config.data;
14858
14949
  var headers = config.headers;
14859
14950
  var headerNames = {};
14860
- Object.keys(headers).forEach(function storeLowerName(name2) {
14861
- headerNames[name2.toLowerCase()] = name2;
14951
+ Object.keys(headers).forEach(function storeLowerName(name) {
14952
+ headerNames[name.toLowerCase()] = name;
14862
14953
  });
14863
14954
  if ("user-agent" in headerNames) {
14864
14955
  if (!headers[headerNames["user-agent"]]) {
@@ -14874,7 +14965,10 @@ var require_http2 = __commonJS({
14874
14965
  } else if (utils.isString(data)) {
14875
14966
  data = Buffer.from(data, "utf-8");
14876
14967
  } else {
14877
- return reject(createError("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", config));
14968
+ return reject(createError(
14969
+ "Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",
14970
+ config
14971
+ ));
14878
14972
  }
14879
14973
  if (!headerNames["content-length"]) {
14880
14974
  headers["Content-Length"] = data.length;
@@ -15010,7 +15104,12 @@ var require_http2 = __commonJS({
15010
15104
  totalResponseBytes += chunk.length;
15011
15105
  if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
15012
15106
  stream.destroy();
15013
- reject(createError("maxContentLength size of " + config.maxContentLength + " exceeded", config, null, lastRequest));
15107
+ reject(createError(
15108
+ "maxContentLength size of " + config.maxContentLength + " exceeded",
15109
+ config,
15110
+ null,
15111
+ lastRequest
15112
+ ));
15014
15113
  }
15015
15114
  });
15016
15115
  stream.on("error", function handleStreamError(err) {
@@ -15039,13 +15138,23 @@ var require_http2 = __commonJS({
15039
15138
  if (config.timeout) {
15040
15139
  var timeout = parseInt(config.timeout, 10);
15041
15140
  if (isNaN(timeout)) {
15042
- reject(createError("error trying to parse `config.timeout` to int", config, "ERR_PARSE_TIMEOUT", req));
15141
+ reject(createError(
15142
+ "error trying to parse `config.timeout` to int",
15143
+ config,
15144
+ "ERR_PARSE_TIMEOUT",
15145
+ req
15146
+ ));
15043
15147
  return;
15044
15148
  }
15045
15149
  req.setTimeout(timeout, function handleRequestTimeout() {
15046
15150
  req.abort();
15047
15151
  var transitional = config.transitional || defaults.transitional;
15048
- reject(createError("timeout of " + timeout + "ms exceeded", config, transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED", req));
15152
+ reject(createError(
15153
+ "timeout of " + timeout + "ms exceeded",
15154
+ config,
15155
+ transitional.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED",
15156
+ req
15157
+ ));
15049
15158
  });
15050
15159
  }
15051
15160
  if (config.cancelToken || config.signal) {
@@ -15224,21 +15333,43 @@ var require_dispatchRequest2 = __commonJS({
15224
15333
  module2.exports = function dispatchRequest(config) {
15225
15334
  throwIfCancellationRequested(config);
15226
15335
  config.headers = config.headers || {};
15227
- config.data = transformData.call(config, config.data, config.headers, config.transformRequest);
15228
- config.headers = utils.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers);
15229
- utils.forEach(["delete", "get", "head", "post", "put", "patch", "common"], function cleanHeaderConfig(method) {
15230
- delete config.headers[method];
15231
- });
15336
+ config.data = transformData.call(
15337
+ config,
15338
+ config.data,
15339
+ config.headers,
15340
+ config.transformRequest
15341
+ );
15342
+ config.headers = utils.merge(
15343
+ config.headers.common || {},
15344
+ config.headers[config.method] || {},
15345
+ config.headers
15346
+ );
15347
+ utils.forEach(
15348
+ ["delete", "get", "head", "post", "put", "patch", "common"],
15349
+ function cleanHeaderConfig(method) {
15350
+ delete config.headers[method];
15351
+ }
15352
+ );
15232
15353
  var adapter = config.adapter || defaults.adapter;
15233
15354
  return adapter(config).then(function onAdapterResolution(response) {
15234
15355
  throwIfCancellationRequested(config);
15235
- response.data = transformData.call(config, response.data, response.headers, config.transformResponse);
15356
+ response.data = transformData.call(
15357
+ config,
15358
+ response.data,
15359
+ response.headers,
15360
+ config.transformResponse
15361
+ );
15236
15362
  return response;
15237
15363
  }, function onAdapterRejection(reason) {
15238
15364
  if (!isCancel(reason)) {
15239
15365
  throwIfCancellationRequested(config);
15240
15366
  if (reason && reason.response) {
15241
- reason.response.data = transformData.call(config, reason.response.data, reason.response.headers, config.transformResponse);
15367
+ reason.response.data = transformData.call(
15368
+ config,
15369
+ reason.response.data,
15370
+ reason.response.headers,
15371
+ config.transformResponse
15372
+ );
15242
15373
  }
15243
15374
  }
15244
15375
  return Promise.reject(reason);
@@ -15341,17 +15472,22 @@ var require_validator2 = __commonJS({
15341
15472
  };
15342
15473
  });
15343
15474
  var deprecatedWarnings = {};
15344
- validators.transitional = function transitional(validator, version2, message) {
15475
+ validators.transitional = function transitional(validator, version, message) {
15345
15476
  function formatMessage(opt, desc) {
15346
15477
  return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
15347
15478
  }
15348
15479
  return function(value, opt, opts) {
15349
15480
  if (validator === false) {
15350
- throw new Error(formatMessage(opt, " has been removed" + (version2 ? " in " + version2 : "")));
15481
+ throw new Error(formatMessage(opt, " has been removed" + (version ? " in " + version : "")));
15351
15482
  }
15352
- if (version2 && !deprecatedWarnings[opt]) {
15483
+ if (version && !deprecatedWarnings[opt]) {
15353
15484
  deprecatedWarnings[opt] = true;
15354
- console.warn(formatMessage(opt, " has been deprecated since v" + version2 + " and will be removed in the near future"));
15485
+ console.warn(
15486
+ formatMessage(
15487
+ opt,
15488
+ " has been deprecated since v" + version + " and will be removed in the near future"
15489
+ )
15490
+ );
15355
15491
  }
15356
15492
  return validator ? validator(value, opt, opts) : true;
15357
15493
  };
@@ -15713,7 +15849,7 @@ var require_templates2 = __commonJS({
15713
15849
  }
15714
15850
  return ESCAPES.get(c) || c;
15715
15851
  }
15716
- function parseArguments(name2, arguments_) {
15852
+ function parseArguments(name, arguments_) {
15717
15853
  const results = [];
15718
15854
  const chunks = arguments_.trim().split(/\s*,\s*/g);
15719
15855
  let matches;
@@ -15724,7 +15860,7 @@ var require_templates2 = __commonJS({
15724
15860
  } else if (matches = chunk.match(STRING_REGEX)) {
15725
15861
  results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape2(escape) : character));
15726
15862
  } else {
15727
- throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name2}')`);
15863
+ throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
15728
15864
  }
15729
15865
  }
15730
15866
  return results;
@@ -15734,12 +15870,12 @@ var require_templates2 = __commonJS({
15734
15870
  const results = [];
15735
15871
  let matches;
15736
15872
  while ((matches = STYLE_REGEX.exec(style)) !== null) {
15737
- const name2 = matches[1];
15873
+ const name = matches[1];
15738
15874
  if (matches[2]) {
15739
- const args = parseArguments(name2, matches[2]);
15740
- results.push([name2].concat(args));
15875
+ const args = parseArguments(name, matches[2]);
15876
+ results.push([name].concat(args));
15741
15877
  } else {
15742
- results.push([name2]);
15878
+ results.push([name]);
15743
15879
  }
15744
15880
  }
15745
15881
  return results;
@@ -15951,7 +16087,10 @@ var require_source2 = __commonJS({
15951
16087
  const arguments_ = strings.slice(1);
15952
16088
  const parts = [firstString.raw[0]];
15953
16089
  for (let i = 1; i < firstString.length; i++) {
15954
- parts.push(String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"), String(firstString.raw[i]));
16090
+ parts.push(
16091
+ String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"),
16092
+ String(firstString.raw[i])
16093
+ );
15955
16094
  }
15956
16095
  if (template === void 0) {
15957
16096
  template = require_templates2();
@@ -16041,10 +16180,25 @@ var require_signals = __commonJS({
16041
16180
  "SIGTERM"
16042
16181
  ];
16043
16182
  if (process.platform !== "win32") {
16044
- module2.exports.push("SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
16183
+ module2.exports.push(
16184
+ "SIGVTALRM",
16185
+ "SIGXCPU",
16186
+ "SIGXFSZ",
16187
+ "SIGUSR2",
16188
+ "SIGTRAP",
16189
+ "SIGSYS",
16190
+ "SIGQUIT",
16191
+ "SIGIOT"
16192
+ );
16045
16193
  }
16046
16194
  if (process.platform === "linux") {
16047
- module2.exports.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT", "SIGUNUSED");
16195
+ module2.exports.push(
16196
+ "SIGIO",
16197
+ "SIGPOLL",
16198
+ "SIGPWR",
16199
+ "SIGSTKFLT",
16200
+ "SIGUNUSED"
16201
+ );
16048
16202
  }
16049
16203
  }
16050
16204
  });
@@ -18919,10 +19073,10 @@ var require_supports_color2 = __commonJS({
18919
19073
  return 3;
18920
19074
  }
18921
19075
  if ("TERM_PROGRAM" in env2) {
18922
- const version2 = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
19076
+ const version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
18923
19077
  switch (env2.TERM_PROGRAM) {
18924
19078
  case "iTerm.app":
18925
- return version2 >= 3 ? 3 : 2;
19079
+ return version >= 3 ? 3 : 2;
18926
19080
  case "Apple_Terminal":
18927
19081
  return 2;
18928
19082
  }
@@ -18979,7 +19133,7 @@ var require_templates3 = __commonJS({
18979
19133
  }
18980
19134
  return ESCAPES.get(c) || c;
18981
19135
  }
18982
- function parseArguments(name2, args) {
19136
+ function parseArguments(name, args) {
18983
19137
  const results = [];
18984
19138
  const chunks = args.trim().split(/\s*,\s*/g);
18985
19139
  let matches;
@@ -18989,7 +19143,7 @@ var require_templates3 = __commonJS({
18989
19143
  } else if (matches = chunk.match(STRING_REGEX)) {
18990
19144
  results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape2(escape) : chr));
18991
19145
  } else {
18992
- throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name2}')`);
19146
+ throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
18993
19147
  }
18994
19148
  }
18995
19149
  return results;
@@ -18999,12 +19153,12 @@ var require_templates3 = __commonJS({
18999
19153
  const results = [];
19000
19154
  let matches;
19001
19155
  while ((matches = STYLE_REGEX.exec(style)) !== null) {
19002
- const name2 = matches[1];
19156
+ const name = matches[1];
19003
19157
  if (matches[2]) {
19004
- const args = parseArguments(name2, matches[2]);
19005
- results.push([name2].concat(args));
19158
+ const args = parseArguments(name, matches[2]);
19159
+ results.push([name].concat(args));
19006
19160
  } else {
19007
- results.push([name2]);
19161
+ results.push([name]);
19008
19162
  }
19009
19163
  }
19010
19164
  return results;
@@ -19237,7 +19391,7 @@ var require_log_symbols = __commonJS({
19237
19391
  "use strict";
19238
19392
  var chalk12 = require_chalk();
19239
19393
  var isSupported = process.platform !== "win32" || process.env.CI || process.env.TERM === "xterm-256color";
19240
- var main2 = {
19394
+ var main = {
19241
19395
  info: chalk12.blue("\u2139"),
19242
19396
  success: chalk12.green("\u2714"),
19243
19397
  warning: chalk12.yellow("\u26A0"),
@@ -19249,7 +19403,7 @@ var require_log_symbols = __commonJS({
19249
19403
  warning: chalk12.yellow("\u203C"),
19250
19404
  error: chalk12.red("\xD7")
19251
19405
  };
19252
- module2.exports = isSupported ? main2 : fallbacks;
19406
+ module2.exports = isSupported ? main : fallbacks;
19253
19407
  }
19254
19408
  });
19255
19409
 
@@ -19632,7 +19786,9 @@ var require_is_interactive = __commonJS({
19632
19786
  "../../node_modules/is-interactive/index.js"(exports, module2) {
19633
19787
  "use strict";
19634
19788
  module2.exports = ({ stream = process.stdout } = {}) => {
19635
- return Boolean(stream && stream.isTTY && process.env.TERM !== "dumb" && !("CI" in process.env));
19789
+ return Boolean(
19790
+ stream && stream.isTTY && process.env.TERM !== "dumb" && !("CI" in process.env)
19791
+ );
19636
19792
  };
19637
19793
  }
19638
19794
  });
@@ -21681,7 +21837,7 @@ var require_stream_readable = __commonJS({
21681
21837
  debug("ondata");
21682
21838
  increasedAwaitDrain = false;
21683
21839
  var ret = dest.write(chunk);
21684
- if (ret === false && !increasedAwaitDrain) {
21840
+ if (false === ret && !increasedAwaitDrain) {
21685
21841
  if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
21686
21842
  debug("false write response, pause", src._readableState.awaitDrain);
21687
21843
  src._readableState.awaitDrain++;
@@ -21823,7 +21979,7 @@ var require_stream_readable = __commonJS({
21823
21979
  }
21824
21980
  Readable.prototype.pause = function() {
21825
21981
  debug("call pause flowing=%j", this._readableState.flowing);
21826
- if (this._readableState.flowing !== false) {
21982
+ if (false !== this._readableState.flowing) {
21827
21983
  debug("pause");
21828
21984
  this._readableState.flowing = false;
21829
21985
  this.emit("pause");
@@ -22930,7 +23086,7 @@ var require_utils3 = __commonJS({
22930
23086
  }
22931
23087
  return result;
22932
23088
  };
22933
- exports.prepareContent = function(name2, inputData, isBinary, isOptimizedBinaryString, isBase64) {
23089
+ exports.prepareContent = function(name, inputData, isBinary, isOptimizedBinaryString, isBase64) {
22934
23090
  var promise = external.Promise.resolve(inputData).then(function(data) {
22935
23091
  var isBlob = support.blob && (data instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(data)) !== -1);
22936
23092
  if (isBlob && typeof FileReader !== "undefined") {
@@ -22951,7 +23107,9 @@ var require_utils3 = __commonJS({
22951
23107
  return promise.then(function(data) {
22952
23108
  var dataType = exports.getTypeOf(data);
22953
23109
  if (!dataType) {
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) ?"));
23110
+ return external.Promise.reject(
23111
+ new Error("Can't read the data of '" + name + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?")
23112
+ );
22955
23113
  }
22956
23114
  if (dataType === "arraybuffer") {
22957
23115
  data = exports.transformTo("uint8array", data);
@@ -22974,8 +23132,8 @@ var require_utils3 = __commonJS({
22974
23132
  var require_GenericWorker = __commonJS({
22975
23133
  "node_modules/jszip/lib/stream/GenericWorker.js"(exports, module2) {
22976
23134
  "use strict";
22977
- function GenericWorker(name2) {
22978
- this.name = name2 || "default";
23135
+ function GenericWorker(name) {
23136
+ this.name = name || "default";
22979
23137
  this.streamInfo = {};
22980
23138
  this.generatedError = null;
22981
23139
  this.extraStreamInfo = {};
@@ -23023,18 +23181,18 @@ var require_GenericWorker = __commonJS({
23023
23181
  }
23024
23182
  return true;
23025
23183
  },
23026
- on: function(name2, listener) {
23027
- this._listeners[name2].push(listener);
23184
+ on: function(name, listener) {
23185
+ this._listeners[name].push(listener);
23028
23186
  return this;
23029
23187
  },
23030
23188
  cleanUp: function() {
23031
23189
  this.streamInfo = this.generatedError = this.extraStreamInfo = null;
23032
23190
  this._listeners = [];
23033
23191
  },
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);
23192
+ emit: function(name, arg) {
23193
+ if (this._listeners[name]) {
23194
+ for (var i = 0; i < this._listeners[name].length; i++) {
23195
+ this._listeners[name][i].call(this, arg);
23038
23196
  }
23039
23197
  }
23040
23198
  },
@@ -23743,8 +23901,8 @@ var require_zipObject = __commonJS({
23743
23901
  var utf8 = require_utf8();
23744
23902
  var CompressedObject = require_compressedObject();
23745
23903
  var GenericWorker = require_GenericWorker();
23746
- var ZipObject = function(name2, data, options) {
23747
- this.name = name2;
23904
+ var ZipObject = function(name, data, options) {
23905
+ this.name = name;
23748
23906
  this.dir = options.dir;
23749
23907
  this.date = options.date;
23750
23908
  this.comment = options.comment;
@@ -25308,7 +25466,10 @@ var require_deflate = __commonJS({
25308
25466
  put_byte(s, OS_CODE);
25309
25467
  s.status = BUSY_STATE;
25310
25468
  } else {
25311
- put_byte(s, (s.gzhead.text ? 1 : 0) + (s.gzhead.hcrc ? 2 : 0) + (!s.gzhead.extra ? 0 : 4) + (!s.gzhead.name ? 0 : 8) + (!s.gzhead.comment ? 0 : 16));
25469
+ put_byte(
25470
+ s,
25471
+ (s.gzhead.text ? 1 : 0) + (s.gzhead.hcrc ? 2 : 0) + (!s.gzhead.extra ? 0 : 4) + (!s.gzhead.name ? 0 : 8) + (!s.gzhead.comment ? 0 : 16)
25472
+ );
25312
25473
  put_byte(s, s.gzhead.time & 255);
25313
25474
  put_byte(s, s.gzhead.time >> 8 & 255);
25314
25475
  put_byte(s, s.gzhead.time >> 16 & 255);
@@ -25823,7 +25984,14 @@ var require_deflate2 = __commonJS({
25823
25984
  this.chunks = [];
25824
25985
  this.strm = new ZStream();
25825
25986
  this.strm.avail_out = 0;
25826
- var status = zlib_deflate.deflateInit2(this.strm, opt.level, opt.method, opt.windowBits, opt.memLevel, opt.strategy);
25987
+ var status = zlib_deflate.deflateInit2(
25988
+ this.strm,
25989
+ opt.level,
25990
+ opt.method,
25991
+ opt.windowBits,
25992
+ opt.memLevel,
25993
+ opt.strategy
25994
+ );
25827
25995
  if (status !== Z_OK) {
25828
25996
  throw new Error(msg[status]);
25829
25997
  }
@@ -26931,7 +27099,13 @@ var require_inflate = __commonJS({
26931
27099
  if (!state.head.extra) {
26932
27100
  state.head.extra = new Array(state.head.extra_len);
26933
27101
  }
26934
- utils.arraySet(state.head.extra, input, next, copy, len);
27102
+ utils.arraySet(
27103
+ state.head.extra,
27104
+ input,
27105
+ next,
27106
+ copy,
27107
+ len
27108
+ );
26935
27109
  }
26936
27110
  if (state.flags & 512) {
26937
27111
  state.check = crc32(state.check, input, copy, next);
@@ -27775,7 +27949,10 @@ var require_inflate2 = __commonJS({
27775
27949
  this.chunks = [];
27776
27950
  this.strm = new ZStream();
27777
27951
  this.strm.avail_out = 0;
27778
- var status = zlib_inflate.inflateInit2(this.strm, opt.windowBits);
27952
+ var status = zlib_inflate.inflateInit2(
27953
+ this.strm,
27954
+ opt.windowBits
27955
+ );
27779
27956
  if (status !== c.Z_OK) {
27780
27957
  throw new Error(msg[status]);
27781
27958
  }
@@ -28376,7 +28553,7 @@ var require_object = __commonJS({
28376
28553
  var generate = require_generate();
28377
28554
  var nodejsUtils = require_nodejsUtils();
28378
28555
  var NodejsStreamInputAdapter = require_NodejsStreamInputAdapter();
28379
- var fileAdd = function(name2, data, originalOptions) {
28556
+ var fileAdd = function(name, data, originalOptions) {
28380
28557
  var dataType = utils.getTypeOf(data), parent;
28381
28558
  var o = utils.extend(originalOptions || {}, defaults);
28382
28559
  o.date = o.date || new Date();
@@ -28393,9 +28570,9 @@ var require_object = __commonJS({
28393
28570
  o.dir = true;
28394
28571
  }
28395
28572
  if (o.dir) {
28396
- name2 = forceTrailingSlash(name2);
28573
+ name = forceTrailingSlash(name);
28397
28574
  }
28398
- if (o.createFolders && (parent = parentFolder(name2))) {
28575
+ if (o.createFolders && (parent = parentFolder(name))) {
28399
28576
  folderAdd.call(this, parent, true);
28400
28577
  }
28401
28578
  var isUnicodeString = dataType === "string" && o.binary === false && o.base64 === false;
@@ -28414,12 +28591,12 @@ var require_object = __commonJS({
28414
28591
  if (data instanceof CompressedObject || data instanceof GenericWorker) {
28415
28592
  zipObjectContent = data;
28416
28593
  } else if (nodejsUtils.isNode && nodejsUtils.isStream(data)) {
28417
- zipObjectContent = new NodejsStreamInputAdapter(name2, data);
28594
+ zipObjectContent = new NodejsStreamInputAdapter(name, data);
28418
28595
  } else {
28419
- zipObjectContent = utils.prepareContent(name2, data, o.binary, o.optimizedBinaryString, o.base64);
28596
+ zipObjectContent = utils.prepareContent(name, data, o.binary, o.optimizedBinaryString, o.base64);
28420
28597
  }
28421
- var object = new ZipObject(name2, zipObjectContent, o);
28422
- this.files[name2] = object;
28598
+ var object = new ZipObject(name, zipObjectContent, o);
28599
+ this.files[name] = object;
28423
28600
  };
28424
28601
  var parentFolder = function(path5) {
28425
28602
  if (path5.slice(-1) === "/") {
@@ -28434,16 +28611,16 @@ var require_object = __commonJS({
28434
28611
  }
28435
28612
  return path5;
28436
28613
  };
28437
- var folderAdd = function(name2, createFolders) {
28614
+ var folderAdd = function(name, createFolders) {
28438
28615
  createFolders = typeof createFolders !== "undefined" ? createFolders : defaults.createFolders;
28439
- name2 = forceTrailingSlash(name2);
28440
- if (!this.files[name2]) {
28441
- fileAdd.call(this, name2, null, {
28616
+ name = forceTrailingSlash(name);
28617
+ if (!this.files[name]) {
28618
+ fileAdd.call(this, name, null, {
28442
28619
  dir: true,
28443
28620
  createFolders
28444
28621
  });
28445
28622
  }
28446
- return this.files[name2];
28623
+ return this.files[name];
28447
28624
  };
28448
28625
  function isRegExp(object) {
28449
28626
  return Object.prototype.toString.call(object) === "[object RegExp]";
@@ -28471,15 +28648,15 @@ var require_object = __commonJS({
28471
28648
  });
28472
28649
  return result;
28473
28650
  },
28474
- file: function(name2, data, o) {
28651
+ file: function(name, data, o) {
28475
28652
  if (arguments.length === 1) {
28476
- if (isRegExp(name2)) {
28477
- var regexp = name2;
28653
+ if (isRegExp(name)) {
28654
+ var regexp = name;
28478
28655
  return this.filter(function(relativePath, file) {
28479
28656
  return !file.dir && regexp.test(relativePath);
28480
28657
  });
28481
28658
  } else {
28482
- var obj = this.files[this.root + name2];
28659
+ var obj = this.files[this.root + name];
28483
28660
  if (obj && !obj.dir) {
28484
28661
  return obj;
28485
28662
  } else {
@@ -28487,8 +28664,8 @@ var require_object = __commonJS({
28487
28664
  }
28488
28665
  }
28489
28666
  } else {
28490
- name2 = this.root + name2;
28491
- fileAdd.call(this, name2, data, o);
28667
+ name = this.root + name;
28668
+ fileAdd.call(this, name, data, o);
28492
28669
  }
28493
28670
  return this;
28494
28671
  },
@@ -28501,26 +28678,26 @@ var require_object = __commonJS({
28501
28678
  return file.dir && arg.test(relativePath);
28502
28679
  });
28503
28680
  }
28504
- var name2 = this.root + arg;
28505
- var newFolder = folderAdd.call(this, name2);
28681
+ var name = this.root + arg;
28682
+ var newFolder = folderAdd.call(this, name);
28506
28683
  var ret = this.clone();
28507
28684
  ret.root = newFolder.name;
28508
28685
  return ret;
28509
28686
  },
28510
- remove: function(name2) {
28511
- name2 = this.root + name2;
28512
- var file = this.files[name2];
28687
+ remove: function(name) {
28688
+ name = this.root + name;
28689
+ var file = this.files[name];
28513
28690
  if (!file) {
28514
- if (name2.slice(-1) !== "/") {
28515
- name2 += "/";
28691
+ if (name.slice(-1) !== "/") {
28692
+ name += "/";
28516
28693
  }
28517
- file = this.files[name2];
28694
+ file = this.files[name];
28518
28695
  }
28519
28696
  if (file && !file.dir) {
28520
- delete this.files[name2];
28697
+ delete this.files[name];
28521
28698
  } else {
28522
28699
  var kids = this.filter(function(relativePath, file2) {
28523
- return file2.name.slice(0, name2.length) === name2;
28700
+ return file2.name.slice(0, name.length) === name;
28524
28701
  });
28525
28702
  for (var i = 0; i < kids.length; i++) {
28526
28703
  delete this.files[kids[i].name];
@@ -28631,7 +28808,14 @@ var require_DataReader = __commonJS({
28631
28808
  },
28632
28809
  readDate: function() {
28633
28810
  var dostime = this.readInt(4);
28634
- return new Date(Date.UTC((dostime >> 25 & 127) + 1980, (dostime >> 21 & 15) - 1, dostime >> 16 & 31, dostime >> 11 & 31, dostime >> 5 & 63, (dostime & 31) << 1));
28811
+ return new Date(Date.UTC(
28812
+ (dostime >> 25 & 127) + 1980,
28813
+ (dostime >> 21 & 15) - 1,
28814
+ dostime >> 16 & 31,
28815
+ dostime >> 11 & 31,
28816
+ dostime >> 5 & 63,
28817
+ (dostime & 31) << 1
28818
+ ));
28635
28819
  }
28636
28820
  };
28637
28821
  module2.exports = DataReader;
@@ -29165,18 +29349,18 @@ var require_load = __commonJS({
29165
29349
  return zipEntries;
29166
29350
  }).then(function checkCRC32(zipEntries) {
29167
29351
  var promises = [external.Promise.resolve(zipEntries)];
29168
- var files2 = zipEntries.files;
29352
+ var files = zipEntries.files;
29169
29353
  if (options.checkCRC32) {
29170
- for (var i = 0; i < files2.length; i++) {
29171
- promises.push(checkEntryCRC32(files2[i]));
29354
+ for (var i = 0; i < files.length; i++) {
29355
+ promises.push(checkEntryCRC32(files[i]));
29172
29356
  }
29173
29357
  }
29174
29358
  return external.Promise.all(promises);
29175
29359
  }).then(function addFiles(results) {
29176
29360
  var zipEntries = results.shift();
29177
- var files2 = zipEntries.files;
29178
- for (var i = 0; i < files2.length; i++) {
29179
- var input = files2[i];
29361
+ var files = zipEntries.files;
29362
+ for (var i = 0; i < files.length; i++) {
29363
+ var input = files[i];
29180
29364
  zip.file(input.fileNameStr, input.decompressed, {
29181
29365
  binary: true,
29182
29366
  optimizedBinaryString: true,
@@ -29716,11 +29900,11 @@ ${offset}${err}${errEnd}`;
29716
29900
  }
29717
29901
  };
29718
29902
  var YAMLError = class extends Error {
29719
- constructor(name2, source, message) {
29903
+ constructor(name, source, message) {
29720
29904
  if (!message || !(source instanceof Node))
29721
- throw new Error(`Invalid arguments for new ${name2}`);
29905
+ throw new Error(`Invalid arguments for new ${name}`);
29722
29906
  super();
29723
- this.name = name2;
29907
+ this.name = name;
29724
29908
  this.message = message;
29725
29909
  this.source = source;
29726
29910
  }
@@ -32459,15 +32643,15 @@ ${indent}`);
32459
32643
  return n;
32460
32644
  }
32461
32645
  function checkFlowCollectionEnd(errors, cst) {
32462
- let char, name2;
32646
+ let char, name;
32463
32647
  switch (cst.type) {
32464
32648
  case PlainValue.Type.FLOW_MAP:
32465
32649
  char = "}";
32466
- name2 = "flow map";
32650
+ name = "flow map";
32467
32651
  break;
32468
32652
  case PlainValue.Type.FLOW_SEQ:
32469
32653
  char = "]";
32470
- name2 = "flow sequence";
32654
+ name = "flow sequence";
32471
32655
  break;
32472
32656
  default:
32473
32657
  errors.push(new PlainValue.YAMLSemanticError(cst, "Not a flow collection!?"));
@@ -32482,7 +32666,7 @@ ${indent}`);
32482
32666
  }
32483
32667
  }
32484
32668
  if (lastItem && lastItem.char !== char) {
32485
- const msg = `Expected ${name2} to end with ${char}`;
32669
+ const msg = `Expected ${name} to end with ${char}`;
32486
32670
  let err;
32487
32671
  if (typeof lastItem.offset === "number") {
32488
32672
  err = new PlainValue.YAMLSemanticError(cst, msg);
@@ -32748,10 +32932,10 @@ ${indent}`);
32748
32932
  schema
32749
32933
  } = doc;
32750
32934
  if (node.type === PlainValue.Type.ALIAS) {
32751
- const name2 = node.rawValue;
32752
- const src = anchors.getNode(name2);
32935
+ const name = node.rawValue;
32936
+ const src = anchors.getNode(name);
32753
32937
  if (!src) {
32754
- const msg = `Aliased anchor not found: ${name2}`;
32938
+ const msg = `Aliased anchor not found: ${name}`;
32755
32939
  errors.push(new PlainValue.YAMLReferenceError(node, msg));
32756
32940
  return null;
32757
32941
  }
@@ -32791,11 +32975,11 @@ ${indent}`);
32791
32975
  const {
32792
32976
  anchors
32793
32977
  } = doc;
32794
- const name2 = node.anchor;
32795
- const prev = anchors.getNode(name2);
32978
+ const name = node.anchor;
32979
+ const prev = anchors.getNode(name);
32796
32980
  if (prev)
32797
- anchors.map[anchors.newName(name2)] = prev;
32798
- anchors.map[name2] = node;
32981
+ anchors.map[anchors.newName(name)] = prev;
32982
+ anchors.map[name] = node;
32799
32983
  }
32800
32984
  if (node.type === PlainValue.Type.ALIAS && (hasAnchor || hasTag)) {
32801
32985
  const msg = "An alias node must not specify any properties";
@@ -33623,10 +33807,10 @@ ${pair.comment}` : item.comment;
33623
33807
  }
33624
33808
  }
33625
33809
  var warned = {};
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`;
33810
+ function warnOptionDeprecation(name, alternative) {
33811
+ if (!warned[name] && shouldWarn(true)) {
33812
+ warned[name] = true;
33813
+ let msg = `The option '${name}' will be removed in a future release`;
33630
33814
  msg += alternative ? `, use '${alternative}' instead.` : ".";
33631
33815
  warn(msg, "DeprecationWarning");
33632
33816
  }
@@ -33907,7 +34091,7 @@ var require_Schema_88e323a7 = __commonJS({
33907
34091
  tag: "tag:yaml.org,2002:int",
33908
34092
  format: "BIN",
33909
34093
  test: /^([-+]?)0b([0-1_]+)$/,
33910
- resolve: (str, sign, bin2) => intResolve(sign, bin2, 2),
34094
+ resolve: (str, sign, bin) => intResolve(sign, bin, 2),
33911
34095
  stringify: (node) => intStringify(node, 2, "0b")
33912
34096
  }, {
33913
34097
  identify: intIdentify,
@@ -34240,8 +34424,8 @@ var require_Document_9b4560a1 = __commonJS({
34240
34424
  tagObj = tags.find((t) => t.nodeClass && obj instanceof t.nodeClass);
34241
34425
  }
34242
34426
  if (!tagObj) {
34243
- const name2 = obj && obj.constructor ? obj.constructor.name : typeof obj;
34244
- throw new Error(`Tag not resolved for ${name2} value`);
34427
+ const name = obj && obj.constructor ? obj.constructor.name : typeof obj;
34428
+ throw new Error(`Tag not resolved for ${name} value`);
34245
34429
  }
34246
34430
  return tagObj;
34247
34431
  }
@@ -34277,10 +34461,10 @@ var require_Document_9b4560a1 = __commonJS({
34277
34461
  item = schema.createNode(item, true, null, createCtx);
34278
34462
  for (const alias of createCtx.aliasNodes) {
34279
34463
  alias.source = alias.source.node;
34280
- let name2 = anchors.getName(alias.source);
34281
- if (!name2) {
34282
- name2 = anchors.newName();
34283
- anchors.map[name2] = alias.source;
34464
+ let name = anchors.getName(alias.source);
34465
+ if (!name) {
34466
+ name = anchors.newName();
34467
+ anchors.map[name] = alias.source;
34284
34468
  }
34285
34469
  }
34286
34470
  }
@@ -34305,8 +34489,8 @@ ${ctx.indent}${str}`;
34305
34489
  PlainValue._defineProperty(this, "map", /* @__PURE__ */ Object.create(null));
34306
34490
  this.prefix = prefix;
34307
34491
  }
34308
- createAlias(node, name2) {
34309
- this.setAnchor(node, name2);
34492
+ createAlias(node, name) {
34493
+ this.setAnchor(node, name);
34310
34494
  return new resolveSeq.Alias(node);
34311
34495
  }
34312
34496
  createMergePair(...sources) {
@@ -34331,17 +34515,17 @@ ${ctx.indent}${str}`;
34331
34515
  getNames() {
34332
34516
  return Object.keys(this.map);
34333
34517
  }
34334
- getNode(name2) {
34335
- return this.map[name2];
34518
+ getNode(name) {
34519
+ return this.map[name];
34336
34520
  }
34337
34521
  newName(prefix) {
34338
34522
  if (!prefix)
34339
34523
  prefix = this.prefix;
34340
34524
  const names = Object.keys(this.map);
34341
34525
  for (let i = 1; true; ++i) {
34342
- const name2 = `${prefix}${i}`;
34343
- if (!names.includes(name2))
34344
- return name2;
34526
+ const name = `${prefix}${i}`;
34527
+ if (!names.includes(name))
34528
+ return name;
34345
34529
  }
34346
34530
  }
34347
34531
  resolveNodes() {
@@ -34357,11 +34541,11 @@ ${ctx.indent}${str}`;
34357
34541
  });
34358
34542
  delete this._cstAliases;
34359
34543
  }
34360
- setAnchor(node, name2) {
34544
+ setAnchor(node, name) {
34361
34545
  if (node != null && !Anchors.validAnchorNode(node)) {
34362
34546
  throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");
34363
34547
  }
34364
- if (name2 && /[\x00-\x19\s,[\]{}]/.test(name2)) {
34548
+ if (name && /[\x00-\x19\s,[\]{}]/.test(name)) {
34365
34549
  throw new Error("Anchor names must not contain whitespace or control characters");
34366
34550
  }
34367
34551
  const {
@@ -34369,21 +34553,21 @@ ${ctx.indent}${str}`;
34369
34553
  } = this;
34370
34554
  const prev = node && Object.keys(map).find((a) => map[a] === node);
34371
34555
  if (prev) {
34372
- if (!name2) {
34556
+ if (!name) {
34373
34557
  return prev;
34374
- } else if (prev !== name2) {
34558
+ } else if (prev !== name) {
34375
34559
  delete map[prev];
34376
- map[name2] = node;
34560
+ map[name] = node;
34377
34561
  }
34378
34562
  } else {
34379
- if (!name2) {
34563
+ if (!name) {
34380
34564
  if (!node)
34381
34565
  return null;
34382
- name2 = this.newName();
34566
+ name = this.newName();
34383
34567
  }
34384
- map[name2] = node;
34568
+ map[name] = node;
34385
34569
  }
34386
- return name2;
34570
+ return name;
34387
34571
  }
34388
34572
  };
34389
34573
  var visit = (node, tags) => {
@@ -34468,19 +34652,19 @@ ${cbNode.commentBefore}` : cb;
34468
34652
  };
34469
34653
  }
34470
34654
  function resolveYamlDirective(doc, directive) {
34471
- let [version2] = directive.parameters;
34655
+ let [version] = directive.parameters;
34472
34656
  if (directive.name === "YAML:1.0")
34473
- version2 = "1.0";
34474
- if (!version2) {
34657
+ version = "1.0";
34658
+ if (!version) {
34475
34659
  const msg = "Insufficient parameters given for %YAML directive";
34476
34660
  throw new PlainValue.YAMLSemanticError(directive, msg);
34477
34661
  }
34478
- if (!documentOptions[version2]) {
34662
+ if (!documentOptions[version]) {
34479
34663
  const v0 = doc.version || doc.options.version;
34480
- const msg = `Document will be parsed as YAML ${v0} rather than YAML ${version2}`;
34664
+ const msg = `Document will be parsed as YAML ${v0} rather than YAML ${version}`;
34481
34665
  doc.warnings.push(new PlainValue.YAMLWarning(directive, msg));
34482
34666
  }
34483
- return version2;
34667
+ return version;
34484
34668
  }
34485
34669
  function parseDirectives(doc, directives, prevDoc) {
34486
34670
  const directiveComments = [];
@@ -34488,9 +34672,9 @@ ${cbNode.commentBefore}` : cb;
34488
34672
  for (const directive of directives) {
34489
34673
  const {
34490
34674
  comment,
34491
- name: name2
34675
+ name
34492
34676
  } = directive;
34493
- switch (name2) {
34677
+ switch (name) {
34494
34678
  case "TAG":
34495
34679
  try {
34496
34680
  doc.tagPrefixes.push(resolveTagDirective(doc, directive));
@@ -34513,15 +34697,15 @@ ${cbNode.commentBefore}` : cb;
34513
34697
  hasDirectives = true;
34514
34698
  break;
34515
34699
  default:
34516
- if (name2) {
34517
- const msg = `YAML only supports %TAG and %YAML directives, and not %${name2}`;
34700
+ if (name) {
34701
+ const msg = `YAML only supports %TAG and %YAML directives, and not %${name}`;
34518
34702
  doc.warnings.push(new PlainValue.YAMLWarning(directive, msg));
34519
34703
  }
34520
34704
  }
34521
34705
  if (comment)
34522
34706
  directiveComments.push(comment);
34523
34707
  }
34524
- if (prevDoc && !hasDirectives && (doc.version || prevDoc.version || doc.options.version) === "1.1") {
34708
+ if (prevDoc && !hasDirectives && "1.1" === (doc.version || prevDoc.version || doc.options.version)) {
34525
34709
  const copyTagPrefix = ({
34526
34710
  handle,
34527
34711
  prefix
@@ -34696,7 +34880,7 @@ ${cbNode.commentBefore}` : cb;
34696
34880
  };
34697
34881
  const anchorNames = Object.keys(this.anchors.map);
34698
34882
  if (anchorNames.length > 0)
34699
- ctx.anchors = new Map(anchorNames.map((name2) => [this.anchors.map[name2], {
34883
+ ctx.anchors = new Map(anchorNames.map((name) => [this.anchors.map[name], {
34700
34884
  alias: [],
34701
34885
  aliasCount: 0,
34702
34886
  count: 1
@@ -35335,10 +35519,10 @@ var require_colors = __commonJS({
35335
35519
  };
35336
35520
  function init() {
35337
35521
  var ret = {};
35338
- Object.keys(styles).forEach(function(name2) {
35339
- ret[name2] = {
35522
+ Object.keys(styles).forEach(function(name) {
35523
+ ret[name] = {
35340
35524
  get: function() {
35341
- return build([name2]);
35525
+ return build([name]);
35342
35526
  }
35343
35527
  };
35344
35528
  });
@@ -35507,9 +35691,11 @@ var require_lib4 = __commonJS({
35507
35691
  });
35508
35692
  }
35509
35693
  ;
35510
- totalWidth = (colWidths.length == 1 ? colWidths[0] : colWidths.reduce(function(a, b) {
35511
- return a + b;
35512
- })) + colWidths.length + 1;
35694
+ totalWidth = (colWidths.length == 1 ? colWidths[0] : colWidths.reduce(
35695
+ function(a, b) {
35696
+ return a + b;
35697
+ }
35698
+ )) + colWidths.length + 1;
35513
35699
  function extractColumnWidths(arr, offset) {
35514
35700
  var offset = offset || 0;
35515
35701
  arr.forEach(function(cell, i) {
@@ -35532,7 +35718,12 @@ var require_lib4 = __commonJS({
35532
35718
  }
35533
35719
  ;
35534
35720
  function lineTop() {
35535
- var l2 = line(chars.top, chars["top-left"] || chars.top, chars["top-right"] || chars.top, chars["top-mid"]);
35721
+ var l2 = line(
35722
+ chars.top,
35723
+ chars["top-left"] || chars.top,
35724
+ chars["top-right"] || chars.top,
35725
+ chars["top-mid"]
35726
+ );
35536
35727
  if (l2)
35537
35728
  ret += l2 + "\n";
35538
35729
  }
@@ -35614,7 +35805,12 @@ var require_lib4 = __commonJS({
35614
35805
  lineTop();
35615
35806
  else {
35616
35807
  if (!style.compact || i < !!head.length ? 1 : cells.length == 0) {
35617
- var l2 = line(chars.mid, chars["left-mid"], chars["right-mid"], chars["mid-mid"]);
35808
+ var l2 = line(
35809
+ chars.mid,
35810
+ chars["left-mid"],
35811
+ chars["right-mid"],
35812
+ chars["mid-mid"]
35813
+ );
35618
35814
  if (l2)
35619
35815
  ret += l2 + "\n";
35620
35816
  }
@@ -35626,7 +35822,12 @@ var require_lib4 = __commonJS({
35626
35822
  }
35627
35823
  ;
35628
35824
  });
35629
- var l = line(chars.bottom, chars["bottom-left"] || chars.bottom, chars["bottom-right"] || chars.bottom, chars["bottom-mid"]);
35825
+ var l = line(
35826
+ chars.bottom,
35827
+ chars["bottom-left"] || chars.bottom,
35828
+ chars["bottom-right"] || chars.bottom,
35829
+ chars["bottom-mid"]
35830
+ );
35630
35831
  if (l)
35631
35832
  ret += l;
35632
35833
  else
@@ -35640,6 +35841,7 @@ var require_lib4 = __commonJS({
35640
35841
 
35641
35842
  // src/index.ts
35642
35843
  var src_exports = {};
35844
+ module.exports = __toCommonJS(src_exports);
35643
35845
 
35644
35846
  // ../../node_modules/yargs/lib/platform-shims/esm.mjs
35645
35847
  var import_assert = require("assert");
@@ -37421,8 +37623,8 @@ function isFunction(arg) {
37421
37623
  function whichModule(exported) {
37422
37624
  if (typeof require === "undefined")
37423
37625
  return null;
37424
- for (let i = 0, files2 = Object.keys(require.cache), mod; i < files2.length; i++) {
37425
- mod = require.cache[files2[i]];
37626
+ for (let i = 0, files = Object.keys(require.cache), mod; i < files.length; i++) {
37627
+ mod = require.cache[files[i]];
37426
37628
  if (mod.exports === exported)
37427
37629
  return mod;
37428
37630
  }
@@ -37462,7 +37664,7 @@ var CommandInstance = class {
37462
37664
  };
37463
37665
  this.shim.requireDirectory({ require: req, filename: callerFile }, dir, opts);
37464
37666
  }
37465
- addHandler(cmd, description2, builder14, handler14, commandMiddleware, deprecated) {
37667
+ addHandler(cmd, description, builder14, handler14, commandMiddleware, deprecated) {
37466
37668
  let aliases = [];
37467
37669
  const middlewares = commandMiddlewareFactory(commandMiddleware);
37468
37670
  handler14 = handler14 || (() => {
@@ -37482,7 +37684,7 @@ var CommandInstance = class {
37482
37684
  this.addHandler(command15, this.extractDesc(cmd), cmd.builder, cmd.handler, cmd.middlewares, cmd.deprecated);
37483
37685
  return;
37484
37686
  } else if (isCommandBuilderDefinition(builder14)) {
37485
- this.addHandler([cmd].concat(aliases), description2, builder14.builder, builder14.handler, builder14.middlewares, builder14.deprecated);
37687
+ this.addHandler([cmd].concat(aliases), description, builder14.builder, builder14.handler, builder14.middlewares, builder14.deprecated);
37486
37688
  return;
37487
37689
  }
37488
37690
  if (typeof cmd === "string") {
@@ -37506,12 +37708,12 @@ var CommandInstance = class {
37506
37708
  aliases.forEach((alias) => {
37507
37709
  this.aliasMap[alias] = parsedCommand.cmd;
37508
37710
  });
37509
- if (description2 !== false) {
37510
- this.usage.command(cmd, description2, isDefault, aliases, deprecated);
37711
+ if (description !== false) {
37712
+ this.usage.command(cmd, description, isDefault, aliases, deprecated);
37511
37713
  }
37512
37714
  this.handlers[parsedCommand.cmd] = {
37513
37715
  original: cmd,
37514
- description: description2,
37716
+ description,
37515
37717
  handler: handler14,
37516
37718
  builder: builder14 || {},
37517
37719
  middlewares,
@@ -37768,8 +37970,8 @@ var CommandInstance = class {
37768
37970
  commandFromFilename(filename) {
37769
37971
  return this.shim.path.basename(filename, this.shim.path.extname(filename));
37770
37972
  }
37771
- extractDesc({ describe: describe14, description: description2, desc }) {
37772
- for (const test of [describe14, description2, desc]) {
37973
+ extractDesc({ describe: describe14, description, desc }) {
37974
+ for (const test of [describe14, description, desc]) {
37773
37975
  if (typeof test === "string" || test === false)
37774
37976
  return test;
37775
37977
  assertNotStrictEqual(test, true, this.shim);
@@ -37910,14 +38112,14 @@ function usage(yargs, shim3) {
37910
38112
  };
37911
38113
  let usages = [];
37912
38114
  let usageDisabled = false;
37913
- self2.usage = (msg, description2) => {
38115
+ self2.usage = (msg, description) => {
37914
38116
  if (msg === null) {
37915
38117
  usageDisabled = true;
37916
38118
  usages = [];
37917
38119
  return self2;
37918
38120
  }
37919
38121
  usageDisabled = false;
37920
- usages.push([msg, description2 || ""]);
38122
+ usages.push([msg, description || ""]);
37921
38123
  return self2;
37922
38124
  };
37923
38125
  self2.getUsage = () => {
@@ -37930,18 +38132,18 @@ function usage(yargs, shim3) {
37930
38132
  return __("Positionals:");
37931
38133
  };
37932
38134
  let examples = [];
37933
- self2.example = (cmd, description2) => {
37934
- examples.push([cmd, description2 || ""]);
38135
+ self2.example = (cmd, description) => {
38136
+ examples.push([cmd, description || ""]);
37935
38137
  };
37936
38138
  let commands = [];
37937
- self2.command = function command15(cmd, description2, isDefault, aliases, deprecated = false) {
38139
+ self2.command = function command15(cmd, description, isDefault, aliases, deprecated = false) {
37938
38140
  if (isDefault) {
37939
38141
  commands = commands.map((cmdArray) => {
37940
38142
  cmdArray[2] = false;
37941
38143
  return cmdArray;
37942
38144
  });
37943
38145
  }
37944
- commands.push([cmd, description2 || "", isDefault, aliases, deprecated]);
38146
+ commands.push([cmd, description || "", isDefault, aliases, deprecated]);
37945
38147
  };
37946
38148
  self2.getCommands = () => commands;
37947
38149
  let descriptions = {};
@@ -38247,8 +38449,8 @@ function usage(yargs, shim3) {
38247
38449
  emit(self2.help());
38248
38450
  };
38249
38451
  self2.functionDescription = (fn) => {
38250
- const description2 = fn.name ? shim3.Parser.decamelize(fn.name, "-") : __("generated-value");
38251
- return ["(", description2, ")"].join("");
38452
+ const description = fn.name ? shim3.Parser.decamelize(fn.name, "-") : __("generated-value");
38453
+ return ["(", description, ")"].join("");
38252
38454
  };
38253
38455
  self2.stringifiedValues = function stringifiedValues(values, separator) {
38254
38456
  let string = "";
@@ -38291,16 +38493,16 @@ function usage(yargs, shim3) {
38291
38493
  return maxWidth2;
38292
38494
  }
38293
38495
  }
38294
- let version2 = null;
38496
+ let version = null;
38295
38497
  self2.version = (ver) => {
38296
- version2 = ver;
38498
+ version = ver;
38297
38499
  };
38298
38500
  self2.showVersion = (level) => {
38299
38501
  const logger = yargs.getInternalMethods().getLoggerInstance();
38300
38502
  if (!level)
38301
38503
  level = "error";
38302
38504
  const emit = typeof level === "function" ? level : logger[level];
38303
- emit(version2);
38505
+ emit(version);
38304
38506
  };
38305
38507
  self2.reset = function reset(localLookup) {
38306
38508
  failMessage = null;
@@ -38597,10 +38799,10 @@ var Completion = class {
38597
38799
  }
38598
38800
  generateCompletionScript($0, cmd) {
38599
38801
  let script = this.zshShell ? completionZshTemplate : completionShTemplate;
38600
- const name2 = this.shim.path.basename($0);
38802
+ const name = this.shim.path.basename($0);
38601
38803
  if ($0.match(/\.js$/))
38602
38804
  $0 = `./${$0}`;
38603
- script = script.replace(/{{app_name}}/g, name2);
38805
+ script = script.replace(/{{app_name}}/g, name);
38604
38806
  script = script.replace(/{{completion_command}}/g, cmd);
38605
38807
  return script.replace(/{{app_path}}/g, $0);
38606
38808
  }
@@ -39278,13 +39480,13 @@ var YargsInstance = class {
39278
39480
  __classPrivateFieldGet(this, _YargsInstance_completion, "f").registerFunction(fn);
39279
39481
  return this;
39280
39482
  }
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);
39483
+ command(cmd, description, builder14, handler14, middlewares, deprecated) {
39484
+ argsert("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]", [cmd, description, builder14, handler14, middlewares, deprecated], arguments.length);
39485
+ __classPrivateFieldGet(this, _YargsInstance_command, "f").addHandler(cmd, description, builder14, handler14, middlewares, deprecated);
39284
39486
  return this;
39285
39487
  }
39286
- commands(cmd, description2, builder14, handler14, middlewares, deprecated) {
39287
- return this.command(cmd, description2, builder14, handler14, middlewares, deprecated);
39488
+ commands(cmd, description, builder14, handler14, middlewares, deprecated) {
39489
+ return this.command(cmd, description, builder14, handler14, middlewares, deprecated);
39288
39490
  }
39289
39491
  commandDir(dir, opts) {
39290
39492
  argsert("<string> [object]", [dir, opts], arguments.length);
@@ -39369,10 +39571,10 @@ var YargsInstance = class {
39369
39571
  __classPrivateFieldGet(this, _YargsInstance_options, "f").deprecatedOptions[option] = message;
39370
39572
  return this;
39371
39573
  }
39372
- describe(keys, description2) {
39373
- argsert("<object|string|array> [string]", [keys, description2], arguments.length);
39574
+ describe(keys, description) {
39575
+ argsert("<object|string|array> [string]", [keys, description], arguments.length);
39374
39576
  this[kSetKey](keys, true);
39375
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").describe(keys, description2);
39577
+ __classPrivateFieldGet(this, _YargsInstance_usage, "f").describe(keys, description);
39376
39578
  return this;
39377
39579
  }
39378
39580
  detectLocale(detect) {
@@ -39396,12 +39598,12 @@ var YargsInstance = class {
39396
39598
  epilog(msg) {
39397
39599
  return this.epilogue(msg);
39398
39600
  }
39399
- example(cmd, description2) {
39400
- argsert("<string|array> [string]", [cmd, description2], arguments.length);
39601
+ example(cmd, description) {
39602
+ argsert("<string|array> [string]", [cmd, description], arguments.length);
39401
39603
  if (Array.isArray(cmd)) {
39402
39604
  cmd.forEach((exampleParams) => this.example(...exampleParams));
39403
39605
  } else {
39404
- __classPrivateFieldGet(this, _YargsInstance_usage, "f").example(cmd, description2);
39606
+ __classPrivateFieldGet(this, _YargsInstance_usage, "f").example(cmd, description);
39405
39607
  }
39406
39608
  return this;
39407
39609
  }
@@ -39883,12 +40085,12 @@ var YargsInstance = class {
39883
40085
  __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.updateLocale(obj);
39884
40086
  return this;
39885
40087
  }
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) {
40088
+ usage(msg, description, builder14, handler14) {
40089
+ argsert("<string|null|undefined> [string|boolean] [function|object] [function]", [msg, description, builder14, handler14], arguments.length);
40090
+ if (description !== void 0) {
39889
40091
  assertNotStrictEqual(msg, null, __classPrivateFieldGet(this, _YargsInstance_shim, "f"));
39890
40092
  if ((msg || "").match(/^\$0( |$)/)) {
39891
- return this.command(msg, description2, builder14, handler14);
40093
+ return this.command(msg, description, builder14, handler14);
39892
40094
  } else {
39893
40095
  throw new YError(".usage() description must start with $0 if being used as alias for .command()");
39894
40096
  }
@@ -40462,6 +40664,9 @@ function isYargsInstance(y) {
40462
40664
  var Yargs = YargsFactory(esm_default);
40463
40665
  var yargs_default = Yargs;
40464
40666
 
40667
+ // src/index.ts
40668
+ var import_api_schemas7 = __toESM(require_src2());
40669
+
40465
40670
  // src/commands/login.ts
40466
40671
  var login_exports = {};
40467
40672
  __export(login_exports, {
@@ -40502,7 +40707,11 @@ async function saveAuthToken(token) {
40502
40707
  } catch (ex) {
40503
40708
  await import_fs5.default.promises.mkdir(goldSkyDir);
40504
40709
  }
40505
- await import_fs5.default.promises.writeFile(import_path5.default.join(goldSkyDir, "auth_token"), token, "utf8");
40710
+ await import_fs5.default.promises.writeFile(
40711
+ import_path5.default.join(goldSkyDir, "auth_token"),
40712
+ token,
40713
+ "utf8"
40714
+ );
40506
40715
  }
40507
40716
  async function clearAuthToken() {
40508
40717
  const homeDir = import_os.default.homedir();
@@ -40531,12 +40740,20 @@ async function checkToken(token, opts) {
40531
40740
  });
40532
40741
  if (response.status === 200 && response.data.success) {
40533
40742
  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`);
40743
+ spinner.succeed(
40744
+ `${import_chalk.default.bold(
40745
+ `Logged in to project '${response.data.project.name}'`
40746
+ )} You can now run any authenticated commands on Goldsky from this computer`
40747
+ );
40535
40748
  return;
40536
40749
  }
40537
40750
  } catch (ex) {
40538
40751
  }
40539
- spinner.fail(`${import_chalk.default.bold("Login failed")}. Make sure you entered your API token correctly - or contact Goldsky for more assistance`);
40752
+ spinner.fail(
40753
+ `${import_chalk.default.bold(
40754
+ "Login failed"
40755
+ )}. Make sure you entered your API token correctly - or contact Goldsky for more assistance`
40756
+ );
40540
40757
  }
40541
40758
  async function login(opts) {
40542
40759
  if (opts.token) {
@@ -40559,7 +40776,11 @@ async function login(opts) {
40559
40776
  }
40560
40777
  async function logout(_opts) {
40561
40778
  clearAuthToken();
40562
- console.log(`${import_chalk.default.bold("Logged out")}. You will need to log in again if you want to run authenticated commands on this computer in future`);
40779
+ console.log(
40780
+ `${import_chalk.default.bold(
40781
+ "Logged out"
40782
+ )}. You will need to log in again if you want to run authenticated commands on this computer in future`
40783
+ );
40563
40784
  }
40564
40785
 
40565
40786
  // src/commands/login.ts
@@ -40614,16 +40835,21 @@ var import_api_schemas2 = __toESM(require_src2());
40614
40835
  var import_ora2 = __toESM(require_ora());
40615
40836
  async function remove(opts) {
40616
40837
  const spinner = (0, import_ora2.default)("Removing subgraph").start();
40617
- const [err, _data] = await import_api_schemas2.ApiFetch.delete_((params) => `/api/admin/subgraph/v1/subgraphs/${params.name}/deployments/${params.version_label}`, {
40618
- params: {
40619
- name: opts.name,
40620
- version_label: opts.v
40838
+ const [err, _data] = await import_api_schemas2.ApiFetch.delete_(
40839
+ (params) => `/api/admin/subgraph/v1/subgraphs/${params.name}/deployments/${params.version_label}`,
40840
+ {
40841
+ params: {
40842
+ name: opts.name,
40843
+ version_label: opts.v
40844
+ }
40621
40845
  }
40622
- });
40846
+ );
40623
40847
  if (!err) {
40624
40848
  spinner.succeed(import_chalk2.default.bold("Removed subgraph"));
40625
40849
  } else {
40626
- spinner.fail(`${import_chalk2.default.bold("Subgraph removal failed:")} ${import_chalk2.default.red(err.message)}`);
40850
+ spinner.fail(
40851
+ `${import_chalk2.default.bold("Subgraph removal failed:")} ${import_chalk2.default.red(err.message)}`
40852
+ );
40627
40853
  }
40628
40854
  }
40629
40855
 
@@ -40665,11 +40891,11 @@ async function validateBuild(buildPath) {
40665
40891
  const spinner = (0, import_ora3.default)(`Validating build path`).start();
40666
40892
  const result = { isValid: false, buildPath };
40667
40893
  try {
40668
- const files2 = await Promise.all([
40894
+ const files = await Promise.all([
40669
40895
  import_fs6.default.promises.stat(import_path6.default.join(buildPath, "package.json")),
40670
40896
  import_fs6.default.promises.stat(import_path6.default.join(buildPath, "build"))
40671
40897
  ]);
40672
- if (files2[0].isFile() && files2[1].isDirectory()) {
40898
+ if (files[0].isFile() && files[1].isDirectory()) {
40673
40899
  result.buildPath = import_path6.default.join(buildPath, "build");
40674
40900
  }
40675
40901
  } catch (ex) {
@@ -40698,29 +40924,42 @@ async function deploy_default(opts) {
40698
40924
  console.log(import_chalk3.default.bold(`Deploying Subgraph:`));
40699
40925
  const buildValidation = await validateBuild(opts.path);
40700
40926
  if (!buildValidation.isValid) {
40701
- console.log(`Deployment failed: This path doesn't point to a subgraph build path`);
40927
+ console.log(
40928
+ `Deployment failed: This path doesn't point to a subgraph build path`
40929
+ );
40702
40930
  return;
40703
40931
  }
40704
40932
  const bundle = await packageBuild(buildValidation.buildPath);
40705
40933
  const spinner = (0, import_ora4.default)("Deploying to Goldsky").start();
40706
40934
  const form = import_api_schemas3.ApiFetch.FormData();
40707
- form.append("bundle", bundle.generateNodeStream({ streamFiles: true }), "bundle.zip");
40935
+ form.append(
40936
+ "bundle",
40937
+ bundle.generateNodeStream({ streamFiles: true }),
40938
+ "bundle.zip"
40939
+ );
40708
40940
  form.append("overwrite", opts.overwrite ? "1" : "0");
40709
- const [err, data] = await import_api_schemas3.ApiFetch.put((params) => `/api/admin/subgraph/v1/subgraphs/${params.name}/deployments/${params.version_label}`, {
40710
- params: {
40711
- name: opts.name,
40712
- version_label: opts.v
40713
- },
40714
- body: form
40715
- });
40941
+ const [err, data] = await import_api_schemas3.ApiFetch.put(
40942
+ (params) => `/api/admin/subgraph/v1/subgraphs/${params.name}/deployments/${params.version_label}`,
40943
+ {
40944
+ params: {
40945
+ name: opts.name,
40946
+ version_label: opts.v
40947
+ },
40948
+ body: form
40949
+ }
40950
+ );
40716
40951
  if (!err) {
40717
40952
  spinner.succeed();
40718
40953
  console.log();
40719
- console.log(`${import_chalk3.default.bold("Deployed subgraph API:")} ${opts.apiHost}${data.data.subgraph.graphql_endpoint}`);
40954
+ console.log(
40955
+ `${import_chalk3.default.bold("Deployed subgraph API:")} ${opts.apiHost}${data.data.subgraph.graphql_endpoint}`
40956
+ );
40720
40957
  } else {
40721
40958
  spinner.fail();
40722
40959
  console.log();
40723
- console.log(`${import_chalk3.default.bold("Deployment failed:")} ${import_chalk3.default.red(err.message)}`);
40960
+ console.log(
40961
+ `${import_chalk3.default.bold("Deployment failed:")} ${import_chalk3.default.red(err.message)}`
40962
+ );
40724
40963
  }
40725
40964
  }
40726
40965
  async function packageBuild(buildPath) {
@@ -40731,13 +40970,18 @@ async function packageBuild(buildPath) {
40731
40970
  type: "nodebuffer",
40732
40971
  streamFiles: true
40733
40972
  });
40734
- const subgraphContent = await import_fs7.default.promises.readFile(import_path7.default.join(buildPath, "subgraph.yaml"), {
40735
- encoding: "utf8"
40736
- });
40973
+ const subgraphContent = await import_fs7.default.promises.readFile(
40974
+ import_path7.default.join(buildPath, "subgraph.yaml"),
40975
+ {
40976
+ encoding: "utf8"
40977
+ }
40978
+ );
40737
40979
  const subgraph = import_yaml.default.parse(subgraphContent);
40738
40980
  bundle.file("subgraph.yaml", subgraphContent);
40739
40981
  const schemaFile = subgraph.schema.file;
40740
- const schemaContent = await import_fs7.default.promises.readFile(import_path7.default.join(buildPath, schemaFile));
40982
+ const schemaContent = await import_fs7.default.promises.readFile(
40983
+ import_path7.default.join(buildPath, schemaFile)
40984
+ );
40741
40985
  bundle.file(schemaFile, schemaContent);
40742
40986
  for (let dataSource of subgraph.dataSources) {
40743
40987
  const mapping = dataSource.mapping;
@@ -40746,7 +40990,9 @@ async function packageBuild(buildPath) {
40746
40990
  ...mapping.abis.map((a) => a.file)
40747
40991
  ];
40748
40992
  for (let abiFile of abiFiles) {
40749
- const abiContent = await import_fs7.default.promises.readFile(import_path7.default.join(buildPath, abiFile));
40993
+ const abiContent = await import_fs7.default.promises.readFile(
40994
+ import_path7.default.join(buildPath, abiFile)
40995
+ );
40750
40996
  bundle.file(abiFile, abiContent);
40751
40997
  }
40752
40998
  }
@@ -40817,37 +41063,74 @@ async function list_default(opts) {
40817
41063
  if (!err) {
40818
41064
  spinner.stop();
40819
41065
  if (data.data.length === 0) {
40820
- console.log(import_chalk4.default.bold("No subgraphs found."), "Run 'goldsky subgraph deploy --help' for information on deploying a subgraph");
41066
+ console.log(
41067
+ import_chalk4.default.bold("No subgraphs found."),
41068
+ "Run 'goldsky subgraph deploy --help' for information on deploying a subgraph"
41069
+ );
40821
41070
  } else {
40822
41071
  console.log(import_chalk4.default.bold("Subgraphs"));
40823
41072
  for (const sg of data.data) {
40824
41073
  if (sg.tag) {
40825
41074
  if (sg.tag.target_version) {
40826
- console.log(import_chalk4.default.bold(`* ${sg.name}/${sg.version} -> ${sg.name}/${sg.tag.target_version}`));
41075
+ console.log(
41076
+ import_chalk4.default.bold(
41077
+ `* ${sg.name}/${sg.version} -> ${sg.name}/${sg.tag.target_version}`
41078
+ )
41079
+ );
40827
41080
  } else {
40828
- console.log(import_chalk4.default.bold(`* ${sg.name}/${sg.version} -> [no target]`));
41081
+ console.log(
41082
+ import_chalk4.default.bold(`* ${sg.name}/${sg.version} -> [no target]`)
41083
+ );
40829
41084
  }
40830
41085
  } else {
40831
41086
  console.log(import_chalk4.default.bold(`* ${sg.name}/${sg.version}`));
40832
41087
  }
40833
41088
  if (opts.details && sg.deployments.length) {
40834
41089
  const detail = sg.deployments[0];
40835
- console.log(" ", "GraphQL API:", import_api_schemas4.ApiFetch.getPath(sg.graphql_endpoint, {}));
40836
- console.log(" ", "Created:", new Date(detail.created_at * 1e3).toLocaleString());
40837
- console.log(" ", "Status:", `${import_chalk4.default[detail.health === "healthy" ? "green" : "red"](detail.health)}`);
41090
+ console.log(
41091
+ " ",
41092
+ "GraphQL API:",
41093
+ import_api_schemas4.ApiFetch.getPath(sg.graphql_endpoint, {})
41094
+ );
41095
+ console.log(
41096
+ " ",
41097
+ "Created:",
41098
+ new Date(detail.created_at * 1e3).toLocaleString()
41099
+ );
41100
+ console.log(
41101
+ " ",
41102
+ "Status:",
41103
+ `${import_chalk4.default[detail.health === "healthy" ? "green" : "red"](
41104
+ detail.health
41105
+ )}`
41106
+ );
40838
41107
  if (detail.fatal_error) {
40839
- console.log(" ", "Fatal error:", import_chalk4.default.red(detail.fatal_error.replace(/\t/g, "\r\n ")));
40840
- }
40841
- console.log(" ", "Synced:", `${detail.synced ? import_chalk4.default.green("\u2714") : `${((_a = detail.indexing_progress) == null ? void 0 : _a.progress_percent.toPrecision(3)) || 0}%`}`);
41108
+ console.log(
41109
+ " ",
41110
+ "Fatal error:",
41111
+ import_chalk4.default.red(detail.fatal_error.replace(/\t/g, "\r\n "))
41112
+ );
41113
+ }
41114
+ console.log(
41115
+ " ",
41116
+ "Synced:",
41117
+ `${detail.synced ? import_chalk4.default.green("\u2714") : `${((_a = detail.indexing_progress) == null ? void 0 : _a.progress_percent.toPrecision(3)) || 0}%`}`
41118
+ );
40842
41119
  if (detail.indexing_progress) {
40843
- console.log(" ", "Blocks indexed:", `${detail.indexing_progress.deployment_start_block} -> ${detail.indexing_progress.deployment_head_block}`);
41120
+ console.log(
41121
+ " ",
41122
+ "Blocks indexed:",
41123
+ `${detail.indexing_progress.deployment_start_block} -> ${detail.indexing_progress.deployment_head_block}`
41124
+ );
40844
41125
  console.log(" ", "Chain:", (_b = detail.indexing_progress) == null ? void 0 : _b.network);
40845
41126
  }
40846
41127
  }
40847
41128
  }
40848
41129
  }
40849
41130
  } else {
40850
- spinner.fail(`${import_chalk4.default.bold("Subgraph listing failed:")} ${import_chalk4.default.red(err.message)}`);
41131
+ spinner.fail(
41132
+ `${import_chalk4.default.bold("Subgraph listing failed:")} ${import_chalk4.default.red(err.message)}`
41133
+ );
40851
41134
  }
40852
41135
  }
40853
41136
 
@@ -40904,40 +41187,54 @@ async function tag_default(opts) {
40904
41187
  const apiPath = (params) => `/api/admin/subgraph/v1/subgraphs/${params.name}/tags/${params.version_label}`;
40905
41188
  if (opts.remove) {
40906
41189
  const spinner = (0, import_ora6.default)("Removing tag").start();
40907
- const [err, _data] = await import_api_schemas5.ApiFetch.delete_(apiPath, {
40908
- params: {
40909
- name: opts.name,
40910
- version_label: opts.v
41190
+ const [err, _data] = await import_api_schemas5.ApiFetch.delete_(
41191
+ apiPath,
41192
+ {
41193
+ params: {
41194
+ name: opts.name,
41195
+ version_label: opts.v
41196
+ }
40911
41197
  }
40912
- });
41198
+ );
40913
41199
  if (!err) {
40914
- spinner.succeed(`${import_chalk5.default.bold("Removed tag:")} ${apiPath({
40915
- name: opts.name,
40916
- version_label: opts.v
40917
- })}`);
41200
+ spinner.succeed(
41201
+ `${import_chalk5.default.bold("Removed tag:")} ${apiPath({
41202
+ name: opts.name,
41203
+ version_label: opts.v
41204
+ })}`
41205
+ );
40918
41206
  } else {
40919
- spinner.fail(`${import_chalk5.default.bold("Tag removal failed:")} ${import_chalk5.default.red(err.message)}`);
41207
+ spinner.fail(
41208
+ `${import_chalk5.default.bold("Tag removal failed:")} ${import_chalk5.default.red(err.message)}`
41209
+ );
40920
41210
  }
40921
41211
  } else {
40922
41212
  const spinner = (0, import_ora6.default)("Tagging subgraph").start();
40923
- const [err, data] = await import_api_schemas5.ApiFetch.put(apiPath, {
40924
- params: {
40925
- name: opts.name,
40926
- version_label: opts.v
40927
- },
40928
- body: {
40929
- target_version: opts.t
41213
+ const [err, data] = await import_api_schemas5.ApiFetch.put(
41214
+ apiPath,
41215
+ {
41216
+ params: {
41217
+ name: opts.name,
41218
+ version_label: opts.v
41219
+ },
41220
+ body: {
41221
+ target_version: opts.t
41222
+ }
40930
41223
  }
40931
- });
41224
+ );
40932
41225
  if (!err) {
40933
41226
  spinner.succeed(`${import_chalk5.default.bold("Tagged subgraph:")}
40934
41227
  ${apiPath({ name: opts.name, version_label: opts.v })} ->
40935
41228
  ${opts.t ? apiPath({ name: opts.name, version_label: opts.t }) : "null"}`);
40936
41229
  if (data.data.subgraph.deployments.length) {
40937
- console.log(`${import_chalk5.default.bold("GraphQL API:")} ${opts.apiHost}${data.data.subgraph.graphql_endpoint}`);
41230
+ console.log(
41231
+ `${import_chalk5.default.bold("GraphQL API:")} ${opts.apiHost}${data.data.subgraph.graphql_endpoint}`
41232
+ );
40938
41233
  }
40939
41234
  } else {
40940
- spinner.fail(`${import_chalk5.default.bold("Tagging failed:")} ${import_chalk5.default.red(err.message)}`);
41235
+ spinner.fail(
41236
+ `${import_chalk5.default.bold("Tagging failed:")} ${import_chalk5.default.red(err.message)}`
41237
+ );
40941
41238
  }
40942
41239
  }
40943
41240
  }
@@ -41036,35 +41333,47 @@ var import_chalk6 = __toESM(require_source());
41036
41333
  var import_cli_table = __toESM(require_lib4());
41037
41334
  async function createWebhook(opts) {
41038
41335
  const spinner = (0, import_ora7.default)("Creating webhook").start();
41039
- const [err, data] = await import_api_schemas6.ApiFetch.post((params) => `/api/admin/subgraph/v1/webhooks/${params.subgraphName}/${params.subgraphVersion}`, {
41040
- params: {
41041
- subgraphName: opts.subgraphName,
41042
- subgraphVersion: opts.subgraphVersion
41043
- },
41044
- body: {
41045
- name: opts.name,
41046
- webhookUrl: opts.webhookUrl,
41047
- entity: opts.entity
41336
+ const [err, data] = await import_api_schemas6.ApiFetch.post(
41337
+ (params) => `/api/admin/subgraph/v1/webhooks/${params.subgraphName}/${params.subgraphVersion}`,
41338
+ {
41339
+ params: {
41340
+ subgraphName: opts.subgraphName,
41341
+ subgraphVersion: opts.subgraphVersion
41342
+ },
41343
+ body: {
41344
+ name: opts.name,
41345
+ webhookUrl: opts.webhookUrl,
41346
+ entity: opts.entity
41347
+ }
41048
41348
  }
41049
- });
41349
+ );
41050
41350
  if (!err) {
41051
41351
  spinner.succeed();
41052
41352
  console.log();
41053
41353
  console.log(`Webhook '${import_chalk6.default.bold(data.data.name)}' created.`);
41054
- console.log(`Make sure calls to your endpoint have the following value for the 'goldsky-webhook-secret' header: ${import_chalk6.default.bold(`${data.data.webhookSecret}`)}`);
41354
+ console.log(
41355
+ `Make sure calls to your endpoint have the following value for the 'goldsky-webhook-secret' header: ${import_chalk6.default.bold(
41356
+ `${data.data.webhookSecret}`
41357
+ )}`
41358
+ );
41055
41359
  } else {
41056
41360
  spinner.fail();
41057
41361
  console.log();
41058
- console.log(`${import_chalk6.default.bold("Webhook creation failed:")} ${import_chalk6.default.red(err.message)}`);
41362
+ console.log(
41363
+ `${import_chalk6.default.bold("Webhook creation failed:")} ${import_chalk6.default.red(err.message)}`
41364
+ );
41059
41365
  }
41060
41366
  }
41061
41367
  async function deleteWebhook(opts) {
41062
41368
  const spinner = (0, import_ora7.default)("Deleting webhook").start();
41063
- const [err] = await import_api_schemas6.ApiFetch.delete_((params) => `/api/admin/subgraph/v1/webhooks/${params.name}`, {
41064
- params: {
41065
- name: opts.name
41369
+ const [err] = await import_api_schemas6.ApiFetch.delete_(
41370
+ (params) => `/api/admin/subgraph/v1/webhooks/${params.name}`,
41371
+ {
41372
+ params: {
41373
+ name: opts.name
41374
+ }
41066
41375
  }
41067
- });
41376
+ );
41068
41377
  if (!err) {
41069
41378
  spinner.succeed();
41070
41379
  console.log();
@@ -41072,7 +41381,9 @@ async function deleteWebhook(opts) {
41072
41381
  } else {
41073
41382
  spinner.fail();
41074
41383
  console.log();
41075
- console.log(`${import_chalk6.default.bold("Webhook deletion failed:")} ${import_chalk6.default.red(err.message)}`);
41384
+ console.log(
41385
+ `${import_chalk6.default.bold("Webhook deletion failed:")} ${import_chalk6.default.red(err.message)}`
41386
+ );
41076
41387
  }
41077
41388
  }
41078
41389
  async function listWebhooks() {
@@ -41104,12 +41415,18 @@ async function listWebhooks() {
41104
41415
  });
41105
41416
  console.log(table.toString());
41106
41417
  } else {
41107
- console.log(`No webhooks found. Create one with ${import_chalk6.default.bold("goldsky subgraph webhook create")}.`);
41418
+ console.log(
41419
+ `No webhooks found. Create one with ${import_chalk6.default.bold(
41420
+ "goldsky subgraph webhook create"
41421
+ )}.`
41422
+ );
41108
41423
  }
41109
41424
  } else {
41110
41425
  spinner.fail();
41111
41426
  console.log();
41112
- console.log(`${import_chalk6.default.bold("Could not list webhooks:")} ${import_chalk6.default.red(err.message)}`);
41427
+ console.log(
41428
+ `${import_chalk6.default.bold("Could not list webhooks:")} ${import_chalk6.default.red(err.message)}`
41429
+ );
41113
41430
  }
41114
41431
  }
41115
41432
 
@@ -41135,12 +41452,12 @@ var builder9 = (yargs) => yargs.positional("nameAndVersion", {
41135
41452
  });
41136
41453
  var handler9 = async ({
41137
41454
  entity,
41138
- name: name2,
41455
+ name,
41139
41456
  nameAndVersion,
41140
41457
  url
41141
41458
  }) => {
41142
41459
  await createWebhook({
41143
- name: name2,
41460
+ name,
41144
41461
  subgraphName: extractNameAndVersion(nameAndVersion)[0],
41145
41462
  subgraphVersion: extractNameAndVersion(nameAndVersion)[1],
41146
41463
  webhookUrl: url,
@@ -41164,9 +41481,9 @@ var builder10 = (yargs) => yargs.option("name", {
41164
41481
  type: "string",
41165
41482
  demandOption: true
41166
41483
  });
41167
- var handler10 = async ({ apiHost, name: name2 }) => {
41484
+ var handler10 = async ({ apiHost, name }) => {
41168
41485
  await deleteWebhook({
41169
- name: name2
41486
+ name
41170
41487
  });
41171
41488
  };
41172
41489
 
@@ -41204,87 +41521,83 @@ var handler13 = async () => {
41204
41521
  var import_chalk11 = __toESM(require_source());
41205
41522
 
41206
41523
  // 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
41524
  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
41525
+ name: "@goldskycom/cli",
41526
+ version: "0.2.1",
41527
+ description: "The Goldsky CLI to deploy subgraphs, index & transform blockchain data, configure webhooks, and access your data in real-time.",
41528
+ main: "dist/index.js",
41529
+ keywords: [
41530
+ "goldsky",
41531
+ "web3",
41532
+ "blockchain",
41533
+ "real-time",
41534
+ "data pipelines",
41535
+ "streams",
41536
+ "webhooks"
41537
+ ],
41538
+ author: "Goldsky",
41539
+ scripts: {
41540
+ test: 'echo "Error: no test specified" && exit 1',
41541
+ clean: "rimraf ./dist && rimraf tsconfig.tsbuildinfo",
41542
+ build: "npm run clean && tsc --noEmit --skipLibCheck && node ./scripts/build.js && chmod a+x bin/goldsky",
41543
+ "build:sdk": "npx pkg -t linux,macos,win . -o sdk/goldsky",
41544
+ "dev:debug": "ts-node src/index.ts",
41545
+ prepublishOnly: "npm run build"
41546
+ },
41547
+ bin: {
41548
+ goldsky: "bin/goldsky"
41549
+ },
41550
+ files: [
41551
+ "bin/goldsky",
41552
+ "dist"
41553
+ ],
41554
+ devDependencies: {
41555
+ "@types/axios": "^0.14.0",
41556
+ "@types/cli-table": "^0.3.0",
41557
+ "@types/form-data": "^2.5.0",
41558
+ "@types/jszip": "^3.4.1",
41559
+ "@types/node": "^16.11.11",
41560
+ "@types/update-notifier": "^6.0.1",
41561
+ "@types/yaml": "^1.9.7",
41562
+ "@types/yargs": "^17.0.7",
41563
+ axios: "^0.24.0",
41564
+ chalk: "^4.1.2",
41565
+ "cli-table": "^0.3.11",
41566
+ "form-data": "^4.0.0",
41567
+ jszip: "^3.7.1",
41568
+ ora: "^4.1.1",
41569
+ yaml: "^1.10.2",
41570
+ yargs: "^17.5.1"
41571
+ },
41572
+ license: "",
41573
+ dependencies: {
41574
+ "update-notifier": "^6.0.2"
41575
+ }
41268
41576
  };
41269
41577
 
41270
41578
  // src/lib/update-notifier.ts
41271
41579
  var runUpdateNotifier = async () => {
41272
- const updateNotifier = Function('return import("update-notifier")')();
41580
+ const updateNotifier = Function(
41581
+ 'return import("update-notifier")'
41582
+ )();
41273
41583
  (await updateNotifier).default({ pkg: package_default }).notify({
41274
41584
  message: `\u{1F389} A new version of the Goldsky CLI is available \u{1F389}
41275
41585
 
41276
- Run {updateCommand} to update (${import_chalk11.default.dim("{currentVersion}")}${import_chalk11.default.reset(" \u2192 ")}${import_chalk11.default.green("{latestVersion}")})`
41586
+ Run {updateCommand} to update (${import_chalk11.default.dim("{currentVersion}")}${import_chalk11.default.reset(
41587
+ " \u2192 "
41588
+ )}${import_chalk11.default.green("{latestVersion}")})`
41277
41589
  });
41278
41590
  };
41279
41591
 
41280
41592
  // src/index.ts
41281
- var import_api_schemas7 = __toESM(require_src2());
41282
41593
  var doesCommandAcceptSubgraphNameWithoutVersion = (command15) => ["subgraph list", "subgraph tag delete"].includes(command15);
41283
41594
  var argv = hideBin(process.argv);
41284
41595
  runUpdateNotifier().then(loadAndApplyAuthToken).then(() => {
41285
41596
  yargs_default(argv).scriptName("goldsky").usage("$0 <cmd> args").check((argv2) => {
41286
41597
  if (argv2.nameAndVersion && !doesCommandAcceptSubgraphNameWithoutVersion(argv2._.join(" ")) && !argv2.nameAndVersion.match(/^.*\/.*$/)) {
41287
- throw new Error(`The provided <nameAndValue> "${argv2.nameAndVersion}" does not match the "name/version" pattern, such as "my-subgraph/1.0.0".`);
41598
+ throw new Error(
41599
+ `The provided <nameAndValue> "${argv2.nameAndVersion}" does not match the "name/version" pattern, such as "my-subgraph/1.0.0".`
41600
+ );
41288
41601
  }
41289
41602
  return true;
41290
41603
  }).option("apiHost", {
@@ -41293,13 +41606,12 @@ runUpdateNotifier().then(loadAndApplyAuthToken).then(() => {
41293
41606
  type: "string",
41294
41607
  default: import_api_schemas7.API_URL,
41295
41608
  hidden: true
41296
- }).command(login_exports).command(logout_exports).command(subgraph_exports).version().alias("v", "version").alias("h", "help").strict().demandCommand(1).middleware([
41609
+ }).command(login_exports).command(logout_exports).command(subgraph_exports).version(package_default.version).alias("v", "version").alias("h", "help").strict().demandCommand(1).middleware([
41297
41610
  (argv2) => {
41298
41611
  import_api_schemas7.ApiFetch.setApiHost(argv2.apiHost);
41299
41612
  }
41300
41613
  ]).showHelpOnFail(true).argv;
41301
41614
  });
41302
- module.exports = __toCommonJS(src_exports);
41303
41615
  /*!
41304
41616
  * mime-db
41305
41617
  * Copyright(c) 2014 Jonathan Ong