@grafana/plugin-ui 0.17.9 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/cjs/index.cjs +97 -2934
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/cjs/index.d.cts +19 -23
  4. package/dist/esm/async-query-data/DatasourceWithAsyncBackend.js +2 -2
  5. package/dist/esm/async-query-data/DatasourceWithAsyncBackend.js.map +1 -1
  6. package/dist/esm/components/DataSourcePicker/DataSourcePicker.js +88 -87
  7. package/dist/esm/components/DataSourcePicker/DataSourcePicker.js.map +1 -1
  8. package/dist/esm/datasource/SqlDatasource.js +5 -3
  9. package/dist/esm/datasource/SqlDatasource.js.map +1 -1
  10. package/dist/esm/index.d.ts +19 -23
  11. package/dist/esm/index.js +0 -1
  12. package/dist/esm/index.js.map +1 -1
  13. package/dist/esm/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js +2 -2
  14. package/dist/esm/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js.map +1 -1
  15. package/package.json +5 -2
  16. package/dist/esm/_virtual/index.js +0 -6
  17. package/dist/esm/_virtual/index.js.map +0 -1
  18. package/dist/esm/_virtual/re.js +0 -4
  19. package/dist/esm/_virtual/re.js.map +0 -1
  20. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/resolvePluginName.js +0 -30
  21. package/dist/esm/components/ConfigEditor/DatasourceConfigWizard/resolvePluginName.js.map +0 -1
  22. package/dist/esm/node_modules/semver/classes/comparator.js +0 -160
  23. package/dist/esm/node_modules/semver/classes/comparator.js.map +0 -1
  24. package/dist/esm/node_modules/semver/classes/range.js +0 -595
  25. package/dist/esm/node_modules/semver/classes/range.js.map +0 -1
  26. package/dist/esm/node_modules/semver/classes/semver.js +0 -366
  27. package/dist/esm/node_modules/semver/classes/semver.js.map +0 -1
  28. package/dist/esm/node_modules/semver/functions/clean.js +0 -20
  29. package/dist/esm/node_modules/semver/functions/clean.js.map +0 -1
  30. package/dist/esm/node_modules/semver/functions/cmp.js +0 -71
  31. package/dist/esm/node_modules/semver/functions/cmp.js.map +0 -1
  32. package/dist/esm/node_modules/semver/functions/coerce.js +0 -76
  33. package/dist/esm/node_modules/semver/functions/coerce.js.map +0 -1
  34. package/dist/esm/node_modules/semver/functions/compare-build.js +0 -21
  35. package/dist/esm/node_modules/semver/functions/compare-build.js.map +0 -1
  36. package/dist/esm/node_modules/semver/functions/compare-loose.js +0 -17
  37. package/dist/esm/node_modules/semver/functions/compare-loose.js.map +0 -1
  38. package/dist/esm/node_modules/semver/functions/compare.js +0 -19
  39. package/dist/esm/node_modules/semver/functions/compare.js.map +0 -1
  40. package/dist/esm/node_modules/semver/functions/diff.js +0 -72
  41. package/dist/esm/node_modules/semver/functions/diff.js.map +0 -1
  42. package/dist/esm/node_modules/semver/functions/eq.js +0 -17
  43. package/dist/esm/node_modules/semver/functions/eq.js.map +0 -1
  44. package/dist/esm/node_modules/semver/functions/gt.js +0 -17
  45. package/dist/esm/node_modules/semver/functions/gt.js.map +0 -1
  46. package/dist/esm/node_modules/semver/functions/gte.js +0 -17
  47. package/dist/esm/node_modules/semver/functions/gte.js.map +0 -1
  48. package/dist/esm/node_modules/semver/functions/inc.js +0 -33
  49. package/dist/esm/node_modules/semver/functions/inc.js.map +0 -1
  50. package/dist/esm/node_modules/semver/functions/lt.js +0 -17
  51. package/dist/esm/node_modules/semver/functions/lt.js.map +0 -1
  52. package/dist/esm/node_modules/semver/functions/lte.js +0 -17
  53. package/dist/esm/node_modules/semver/functions/lte.js.map +0 -1
  54. package/dist/esm/node_modules/semver/functions/major.js +0 -17
  55. package/dist/esm/node_modules/semver/functions/major.js.map +0 -1
  56. package/dist/esm/node_modules/semver/functions/minor.js +0 -17
  57. package/dist/esm/node_modules/semver/functions/minor.js.map +0 -1
  58. package/dist/esm/node_modules/semver/functions/neq.js +0 -17
  59. package/dist/esm/node_modules/semver/functions/neq.js.map +0 -1
  60. package/dist/esm/node_modules/semver/functions/parse.js +0 -30
  61. package/dist/esm/node_modules/semver/functions/parse.js.map +0 -1
  62. package/dist/esm/node_modules/semver/functions/patch.js +0 -17
  63. package/dist/esm/node_modules/semver/functions/patch.js.map +0 -1
  64. package/dist/esm/node_modules/semver/functions/prerelease.js +0 -20
  65. package/dist/esm/node_modules/semver/functions/prerelease.js.map +0 -1
  66. package/dist/esm/node_modules/semver/functions/rcompare.js +0 -17
  67. package/dist/esm/node_modules/semver/functions/rcompare.js.map +0 -1
  68. package/dist/esm/node_modules/semver/functions/rsort.js +0 -17
  69. package/dist/esm/node_modules/semver/functions/rsort.js.map +0 -1
  70. package/dist/esm/node_modules/semver/functions/satisfies.js +0 -24
  71. package/dist/esm/node_modules/semver/functions/satisfies.js.map +0 -1
  72. package/dist/esm/node_modules/semver/functions/sort.js +0 -17
  73. package/dist/esm/node_modules/semver/functions/sort.js.map +0 -1
  74. package/dist/esm/node_modules/semver/functions/truncate.js +0 -62
  75. package/dist/esm/node_modules/semver/functions/truncate.js.map +0 -1
  76. package/dist/esm/node_modules/semver/functions/valid.js +0 -20
  77. package/dist/esm/node_modules/semver/functions/valid.js.map +0 -1
  78. package/dist/esm/node_modules/semver/index.js +0 -146
  79. package/dist/esm/node_modules/semver/index.js.map +0 -1
  80. package/dist/esm/node_modules/semver/internal/constants.js +0 -47
  81. package/dist/esm/node_modules/semver/internal/constants.js.map +0 -1
  82. package/dist/esm/node_modules/semver/internal/debug.js +0 -21
  83. package/dist/esm/node_modules/semver/internal/debug.js.map +0 -1
  84. package/dist/esm/node_modules/semver/internal/identifiers.js +0 -39
  85. package/dist/esm/node_modules/semver/internal/identifiers.js.map +0 -1
  86. package/dist/esm/node_modules/semver/internal/lrucache.js +0 -52
  87. package/dist/esm/node_modules/semver/internal/lrucache.js.map +0 -1
  88. package/dist/esm/node_modules/semver/internal/parse-options.js +0 -27
  89. package/dist/esm/node_modules/semver/internal/parse-options.js.map +0 -1
  90. package/dist/esm/node_modules/semver/internal/re.js +0 -238
  91. package/dist/esm/node_modules/semver/internal/re.js.map +0 -1
  92. package/dist/esm/node_modules/semver/ranges/gtr.js +0 -18
  93. package/dist/esm/node_modules/semver/ranges/gtr.js.map +0 -1
  94. package/dist/esm/node_modules/semver/ranges/intersects.js +0 -21
  95. package/dist/esm/node_modules/semver/ranges/intersects.js.map +0 -1
  96. package/dist/esm/node_modules/semver/ranges/ltr.js +0 -18
  97. package/dist/esm/node_modules/semver/ranges/ltr.js.map +0 -1
  98. package/dist/esm/node_modules/semver/ranges/max-satisfying.js +0 -40
  99. package/dist/esm/node_modules/semver/ranges/max-satisfying.js.map +0 -1
  100. package/dist/esm/node_modules/semver/ranges/min-satisfying.js +0 -39
  101. package/dist/esm/node_modules/semver/ranges/min-satisfying.js.map +0 -1
  102. package/dist/esm/node_modules/semver/ranges/min-version.js +0 -77
  103. package/dist/esm/node_modules/semver/ranges/min-version.js.map +0 -1
  104. package/dist/esm/node_modules/semver/ranges/outside.js +0 -101
  105. package/dist/esm/node_modules/semver/ranges/outside.js.map +0 -1
  106. package/dist/esm/node_modules/semver/ranges/simplify.js +0 -62
  107. package/dist/esm/node_modules/semver/ranges/simplify.js.map +0 -1
  108. package/dist/esm/node_modules/semver/ranges/subset.js +0 -264
  109. package/dist/esm/node_modules/semver/ranges/subset.js.map +0 -1
  110. package/dist/esm/node_modules/semver/ranges/to-comparators.js +0 -22
  111. package/dist/esm/node_modules/semver/ranges/to-comparators.js.map +0 -1
  112. package/dist/esm/node_modules/semver/ranges/valid.js +0 -25
  113. package/dist/esm/node_modules/semver/ranges/valid.js.map +0 -1
@@ -8,10 +8,11 @@ var data = require('@grafana/data');
8
8
  var Calendar = require('react-calendar');
9
9
  var css = require('@emotion/css');
10
10
  var e2eSelectors = require('@grafana/e2e-selectors');
11
- var runtime = require('@grafana/runtime');
11
+ var datasources = require('@grafana/plugin-compat/datasources');
12
12
  var reactUse = require('react-use');
13
13
  var ui$1 = require('@react-awesome-query-builder/ui');
14
14
  var uuid = require('uuid');
15
+ var runtime = require('@grafana/runtime');
15
16
  var lodash = require('lodash');
16
17
  var AutoSizer = require('react-virtualized-auto-sizer');
17
18
  var sqlFormatter = require('sql-formatter');
@@ -19,6 +20,7 @@ var celJs = require('@marcbachmann/cel-js');
19
20
  var dnd = require('@hello-pangea/dnd');
20
21
  var reactPopperTooltip = require('react-popper-tooltip');
21
22
  var Prism = require('prismjs');
23
+ var semver = require('semver');
22
24
 
23
25
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
24
26
 
@@ -337,99 +339,100 @@ function getSignatureDisplayModel(signature) {
337
339
  }
338
340
  PluginSignatureBadge.displayName = "PluginSignatureBadge";
339
341
 
340
- var __defProp$6 = Object.defineProperty;
341
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
342
- var __publicField$6 = (obj, key, value) => __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
343
- class DataSourcePicker extends React.PureComponent {
344
- constructor(props) {
345
- super(props);
346
- __publicField$6(this, "dataSourceSrv", runtime.getDataSourceSrv());
347
- __publicField$6(this, "state", {});
348
- __publicField$6(this, "onChange", (item) => {
349
- const dsSettings = this.dataSourceSrv.getInstanceSettings(item.value);
350
- if (dsSettings) {
351
- this.props.onChange(dsSettings);
352
- this.setState({ error: void 0 });
342
+ function DataSourcePicker({
343
+ onChange,
344
+ current: currentProp,
345
+ hideTextValue,
346
+ onBlur,
347
+ autoFocus = false,
348
+ openMenuOnFocus = false,
349
+ placeholder = "Select datasource",
350
+ noDefault
351
+ }) {
352
+ const current = currentProp != null ? currentProp : null;
353
+ const showNoDatasources = !current && !!noDefault;
354
+ const { items, isLoading: isListLoading, error: listError } = datasources.useDataSourceInstanceList();
355
+ const currentResult = datasources.useDataSourceInstanceListItem(current);
356
+ const selected = currentResult.item;
357
+ const isCurrentLoading = !showNoDatasources && currentResult.isLoading;
358
+ const isLoading = isListLoading || isCurrentLoading;
359
+ const notFound = !selected && !isCurrentLoading && !showNoDatasources;
360
+ const handleChange = (option) => {
361
+ const item = items.find((ds) => ds.uid === option.value);
362
+ if (item) {
363
+ onChange(item);
364
+ }
365
+ };
366
+ const options = items.map((ds) => ({
367
+ value: ds.uid,
368
+ label: ds.name,
369
+ imgUrl: ds.meta.info.logos.small,
370
+ meta: ds.meta
371
+ }));
372
+ const value = getCurrentValue({ current, selected, notFound, showNoDatasources, hideTextValue });
373
+ const invalid = !!listError || notFound;
374
+ return /* @__PURE__ */ React__default.default.createElement("div", { "aria-label": e2eSelectors.selectors.components.DataSourcePicker.container }, /* @__PURE__ */ React__default.default.createElement(
375
+ ui.Select,
376
+ {
377
+ className: "ds-picker select-container",
378
+ isMulti: false,
379
+ isClearable: false,
380
+ backspaceRemovesValue: false,
381
+ onChange: handleChange,
382
+ options,
383
+ isLoading,
384
+ autoFocus,
385
+ onBlur,
386
+ openMenuOnFocus,
387
+ maxMenuHeight: 500,
388
+ placeholder,
389
+ noOptionsMessage: listError ? "Could not load data sources" : "No datasources found",
390
+ value,
391
+ invalid,
392
+ "aria-invalid": invalid,
393
+ getOptionLabel: (o) => {
394
+ if (o.meta && isUnsignedPluginSignature(o.meta.signature) && o !== value) {
395
+ return /* @__PURE__ */ React__default.default.createElement(ui.Stack, { alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React__default.default.createElement("span", null, o.label), " ", /* @__PURE__ */ React__default.default.createElement(PluginSignatureBadge, { status: o.meta.signature }));
396
+ }
397
+ return o.label || "";
353
398
  }
354
- });
355
- }
356
- componentDidMount() {
357
- const { current } = this.props;
358
- const dsSettings = this.dataSourceSrv.getInstanceSettings(current);
359
- if (!dsSettings) {
360
- this.setState({ error: "Could not find data source " + current });
361
- }
362
- }
363
- getCurrentValue() {
364
- const { current, hideTextValue, noDefault } = this.props;
365
- if (!current && noDefault) {
366
- return {
367
- label: "No datasources found"
368
- };
369
- }
370
- const ds = this.dataSourceSrv.getInstanceSettings(current);
371
- if (ds) {
372
- return {
373
- label: ds.name.substr(0, 37),
374
- value: ds.name,
375
- imgUrl: ds.meta.info.logos.small,
376
- hideText: hideTextValue,
377
- meta: ds.meta
378
- };
379
399
  }
400
+ ));
401
+ }
402
+ function getCurrentValue({
403
+ current,
404
+ selected,
405
+ notFound,
406
+ showNoDatasources,
407
+ hideTextValue
408
+ }) {
409
+ if (showNoDatasources) {
380
410
  return {
381
- label: (current != null ? current : "no name") + " - not found",
382
- value: (current != null ? current : "no name") + " - not found",
383
- imgUrl: "",
384
- hideText: hideTextValue
411
+ label: "No datasources found"
385
412
  };
386
413
  }
387
- getDataSourceOptions() {
388
- const options = this.dataSourceSrv.getList().map((ds) => ({
389
- value: ds.uid,
390
- label: ds.name,
391
- imgUrl: ds.meta.info.logos.small,
392
- meta: ds.meta
393
- }));
394
- return options;
414
+ if (selected) {
415
+ return toOption$1(selected, hideTextValue);
395
416
  }
396
- render() {
397
- const { autoFocus, onBlur, openMenuOnFocus, placeholder } = this.props;
398
- const { error } = this.state;
399
- const options = this.getDataSourceOptions();
400
- const value = this.getCurrentValue();
401
- return /* @__PURE__ */ React__default.default.createElement("div", { "aria-label": e2eSelectors.selectors.components.DataSourcePicker.container }, /* @__PURE__ */ React__default.default.createElement(
402
- ui.Select,
403
- {
404
- className: "ds-picker select-container",
405
- isMulti: false,
406
- isClearable: false,
407
- backspaceRemovesValue: false,
408
- onChange: this.onChange,
409
- options,
410
- autoFocus,
411
- onBlur,
412
- openMenuOnFocus,
413
- maxMenuHeight: 500,
414
- placeholder,
415
- noOptionsMessage: "No datasources found",
416
- value,
417
- invalid: !!error,
418
- getOptionLabel: (o) => {
419
- if (o.meta && isUnsignedPluginSignature(o.meta.signature) && o !== value) {
420
- return /* @__PURE__ */ React__default.default.createElement(ui.Stack, { alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React__default.default.createElement("span", null, o.label), " ", /* @__PURE__ */ React__default.default.createElement(PluginSignatureBadge, { status: o.meta.signature }));
421
- }
422
- return o.label || "";
423
- }
424
- }
425
- ));
417
+ if (!notFound) {
418
+ return void 0;
426
419
  }
420
+ return {
421
+ label: (current != null ? current : "no name") + " - not found",
422
+ value: (current != null ? current : "no name") + " - not found",
423
+ imgUrl: "",
424
+ hideText: hideTextValue
425
+ };
426
+ }
427
+ function toOption$1(ds, hideTextValue) {
428
+ return {
429
+ label: ds.name.substr(0, 37),
430
+ value: ds.name,
431
+ imgUrl: ds.meta.info.logos.small,
432
+ hideText: hideTextValue,
433
+ meta: ds.meta
434
+ };
427
435
  }
428
- __publicField$6(DataSourcePicker, "defaultProps", {
429
- autoFocus: false,
430
- openMenuOnFocus: false,
431
- placeholder: "Select datasource"
432
- });
433
436
 
434
437
  const { FormField, Switch } = ui.LegacyForms;
435
438
  const getStyles$u = ui.stylesFactory(() => ({
@@ -14075,13 +14078,13 @@ function fromIterable(iterable) {
14075
14078
  }
14076
14079
  function fromAsyncIterable(asyncIterable) {
14077
14080
  return new Observable(function (subscriber) {
14078
- process$1(asyncIterable, subscriber).catch(function (err) { return subscriber.error(err); });
14081
+ process(asyncIterable, subscriber).catch(function (err) { return subscriber.error(err); });
14079
14082
  });
14080
14083
  }
14081
14084
  function fromReadableStreamLike(readableStream) {
14082
14085
  return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));
14083
14086
  }
14084
- function process$1(asyncIterable, subscriber) {
14087
+ function process(asyncIterable, subscriber) {
14085
14088
  var asyncIterable_1, asyncIterable_1_1;
14086
14089
  var e_2, _a;
14087
14090
  return __awaiter(this, void 0, void 0, function () {
@@ -14457,7 +14460,7 @@ class SqlDatasource extends runtime.DataSourceWithBackend {
14457
14460
  const result = this.getQueryModel().quoteLiteral(value);
14458
14461
  return result;
14459
14462
  } else {
14460
- return value;
14463
+ return value.replace(/'/g, "''");
14461
14464
  }
14462
14465
  }
14463
14466
  if (typeof value === "number") {
@@ -14495,14 +14498,16 @@ class SqlDatasource extends runtime.DataSourceWithBackend {
14495
14498
  }
14496
14499
  applyTemplateVariables(target, scopedVars) {
14497
14500
  const queryModel = this.getQueryModel(target, this.templateSrv, scopedVars);
14498
- const rawSql = this.clean(queryModel.interpolate());
14499
14501
  return {
14500
14502
  refId: target.refId,
14501
14503
  datasource: this.getRef(),
14502
- rawSql,
14504
+ rawSql: queryModel.interpolate(),
14503
14505
  format: target.format
14504
14506
  };
14505
14507
  }
14508
+ /**
14509
+ * @deprecated `applyTemplateVariables` no longer calls this. Collapsing `''` to `'` breaks valid SQL string literals.
14510
+ */
14506
14511
  clean(value) {
14507
14512
  return value.replace(/''/g, "'");
14508
14513
  }
@@ -24697,32 +24702,6 @@ function useHealthChecks() {
24697
24702
  return { healthMap, checkUids, retry };
24698
24703
  }
24699
24704
 
24700
- let pluginNameCache = null;
24701
- function buildPluginNameCache() {
24702
- var _a;
24703
- if (pluginNameCache) {
24704
- return pluginNameCache;
24705
- }
24706
- const map = /* @__PURE__ */ new Map();
24707
- try {
24708
- const list = runtime.getDataSourceSrv().getList();
24709
- for (const ds of list) {
24710
- if (((_a = ds.meta) == null ? void 0 : _a.name) && ds.type && !map.has(ds.type)) {
24711
- map.set(ds.type, ds.meta.name);
24712
- }
24713
- }
24714
- } catch (ex) {
24715
- console.error(ex);
24716
- }
24717
- pluginNameCache = map;
24718
- return map;
24719
- }
24720
- function resolvePluginName(pluginType) {
24721
- var _a;
24722
- const cache = buildPluginNameCache();
24723
- return (_a = cache.get(pluginType)) != null ? _a : pluginType;
24724
- }
24725
-
24726
24705
  function useDatasourceSchema(pluginType) {
24727
24706
  const [schema, setSchema] = React.useState(null);
24728
24707
  const [loading, setLoading] = React.useState(false);
@@ -26217,2821 +26196,6 @@ const convertUnits = (queryStats) => {
26217
26196
  return text + suffix;
26218
26197
  };
26219
26198
 
26220
- var re = {exports: {}};
26221
-
26222
- var constants;
26223
- var hasRequiredConstants;
26224
-
26225
- function requireConstants () {
26226
- if (hasRequiredConstants) return constants;
26227
- hasRequiredConstants = 1;
26228
-
26229
- // Note: this is the semver.org version of the spec that it implements
26230
- // Not necessarily the package version of this code.
26231
- const SEMVER_SPEC_VERSION = '2.0.0';
26232
-
26233
- const MAX_LENGTH = 256;
26234
- const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
26235
- /* istanbul ignore next */ 9007199254740991;
26236
-
26237
- // Max safe segment length for coercion.
26238
- const MAX_SAFE_COMPONENT_LENGTH = 16;
26239
-
26240
- // Max safe length for a build identifier. The max length minus 6 characters for
26241
- // the shortest version with a build 0.0.0+BUILD.
26242
- const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
26243
-
26244
- const RELEASE_TYPES = [
26245
- 'major',
26246
- 'premajor',
26247
- 'minor',
26248
- 'preminor',
26249
- 'patch',
26250
- 'prepatch',
26251
- 'prerelease',
26252
- ];
26253
-
26254
- constants = {
26255
- MAX_LENGTH,
26256
- MAX_SAFE_COMPONENT_LENGTH,
26257
- MAX_SAFE_BUILD_LENGTH,
26258
- MAX_SAFE_INTEGER,
26259
- RELEASE_TYPES,
26260
- SEMVER_SPEC_VERSION,
26261
- FLAG_INCLUDE_PRERELEASE: 0b001,
26262
- FLAG_LOOSE: 0b010,
26263
- };
26264
- return constants;
26265
- }
26266
-
26267
- var debug_1;
26268
- var hasRequiredDebug;
26269
-
26270
- function requireDebug () {
26271
- if (hasRequiredDebug) return debug_1;
26272
- hasRequiredDebug = 1;
26273
-
26274
- const debug = (
26275
- typeof process === 'object' &&
26276
- process.env &&
26277
- process.env.NODE_DEBUG &&
26278
- /\bsemver\b/i.test(process.env.NODE_DEBUG)
26279
- ) ? (...args) => console.error('SEMVER', ...args)
26280
- : () => {};
26281
-
26282
- debug_1 = debug;
26283
- return debug_1;
26284
- }
26285
-
26286
- var hasRequiredRe;
26287
-
26288
- function requireRe () {
26289
- if (hasRequiredRe) return re.exports;
26290
- hasRequiredRe = 1;
26291
- (function (module, exports$1) {
26292
-
26293
- const {
26294
- MAX_SAFE_COMPONENT_LENGTH,
26295
- MAX_SAFE_BUILD_LENGTH,
26296
- MAX_LENGTH,
26297
- } = requireConstants();
26298
- const debug = requireDebug();
26299
- exports$1 = module.exports = {};
26300
-
26301
- // The actual regexps go on exports.re
26302
- const re = exports$1.re = [];
26303
- const safeRe = exports$1.safeRe = [];
26304
- const src = exports$1.src = [];
26305
- const safeSrc = exports$1.safeSrc = [];
26306
- const t = exports$1.t = {};
26307
- let R = 0;
26308
-
26309
- const LETTERDASHNUMBER = '[a-zA-Z0-9-]';
26310
-
26311
- // Replace some greedy regex tokens to prevent regex dos issues. These regex are
26312
- // used internally via the safeRe object since all inputs in this library get
26313
- // normalized first to trim and collapse all extra whitespace. The original
26314
- // regexes are exported for userland consumption and lower level usage. A
26315
- // future breaking change could export the safer regex only with a note that
26316
- // all input should have extra whitespace removed.
26317
- const safeRegexReplacements = [
26318
- ['\\s', 1],
26319
- ['\\d', MAX_LENGTH],
26320
- [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],
26321
- ];
26322
-
26323
- const makeSafeRegex = (value) => {
26324
- for (const [token, max] of safeRegexReplacements) {
26325
- value = value
26326
- .split(`${token}*`).join(`${token}{0,${max}}`)
26327
- .split(`${token}+`).join(`${token}{1,${max}}`);
26328
- }
26329
- return value
26330
- };
26331
-
26332
- const createToken = (name, value, isGlobal) => {
26333
- const safe = makeSafeRegex(value);
26334
- const index = R++;
26335
- debug(name, index, value);
26336
- t[name] = index;
26337
- src[index] = value;
26338
- safeSrc[index] = safe;
26339
- re[index] = new RegExp(value, isGlobal ? 'g' : undefined);
26340
- safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined);
26341
- };
26342
-
26343
- // The following Regular Expressions can be used for tokenizing,
26344
- // validating, and parsing SemVer version strings.
26345
-
26346
- // ## Numeric Identifier
26347
- // A single `0`, or a non-zero digit followed by zero or more digits.
26348
-
26349
- createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*');
26350
- createToken('NUMERICIDENTIFIERLOOSE', '\\d+');
26351
-
26352
- // ## Non-numeric Identifier
26353
- // Zero or more digits, followed by a letter or hyphen, and then zero or
26354
- // more letters, digits, or hyphens.
26355
-
26356
- createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
26357
-
26358
- // ## Main Version
26359
- // Three dot-separated numeric identifiers.
26360
-
26361
- createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` +
26362
- `(${src[t.NUMERICIDENTIFIER]})\\.` +
26363
- `(${src[t.NUMERICIDENTIFIER]})`);
26364
-
26365
- createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
26366
- `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
26367
- `(${src[t.NUMERICIDENTIFIERLOOSE]})`);
26368
-
26369
- // ## Pre-release Version Identifier
26370
- // A numeric identifier, or a non-numeric identifier.
26371
- // Non-numeric identifiers include numeric identifiers but can be longer.
26372
- // Therefore non-numeric identifiers must go first.
26373
-
26374
- createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]
26375
- }|${src[t.NUMERICIDENTIFIER]})`);
26376
-
26377
- createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER]
26378
- }|${src[t.NUMERICIDENTIFIERLOOSE]})`);
26379
-
26380
- // ## Pre-release Version
26381
- // Hyphen, followed by one or more dot-separated pre-release version
26382
- // identifiers.
26383
-
26384
- createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]
26385
- }(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
26386
-
26387
- createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]
26388
- }(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
26389
-
26390
- // ## Build Metadata Identifier
26391
- // Any combination of digits, letters, or hyphens.
26392
-
26393
- createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`);
26394
-
26395
- // ## Build Metadata
26396
- // Plus sign, followed by one or more period-separated build metadata
26397
- // identifiers.
26398
-
26399
- createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER]
26400
- }(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
26401
-
26402
- // ## Full Version String
26403
- // A main version, followed optionally by a pre-release version and
26404
- // build metadata.
26405
-
26406
- // Note that the only major, minor, patch, and pre-release sections of
26407
- // the version string are capturing groups. The build metadata is not a
26408
- // capturing group, because it should not ever be used in version
26409
- // comparison.
26410
-
26411
- createToken('FULLPLAIN', `v?${src[t.MAINVERSION]
26412
- }${src[t.PRERELEASE]}?${
26413
- src[t.BUILD]}?`);
26414
-
26415
- createToken('FULL', `^${src[t.FULLPLAIN]}$`);
26416
-
26417
- // like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
26418
- // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
26419
- // common in the npm registry.
26420
- createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE]
26421
- }${src[t.PRERELEASELOOSE]}?${
26422
- src[t.BUILD]}?`);
26423
-
26424
- createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`);
26425
-
26426
- createToken('GTLT', '((?:<|>)?=?)');
26427
-
26428
- // Something like "2.*" or "1.2.x".
26429
- // Note that "x.x" is a valid xRange identifier, meaning "any version"
26430
- // Only the first item is strictly required.
26431
- createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
26432
- createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
26433
-
26434
- createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` +
26435
- `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
26436
- `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
26437
- `(?:${src[t.PRERELEASE]})?${
26438
- src[t.BUILD]}?` +
26439
- `)?)?`);
26440
-
26441
- createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +
26442
- `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
26443
- `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
26444
- `(?:${src[t.PRERELEASELOOSE]})?${
26445
- src[t.BUILD]}?` +
26446
- `)?)?`);
26447
-
26448
- createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
26449
- createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
26450
-
26451
- // Coercion.
26452
- // Extract anything that could conceivably be a part of a valid semver
26453
- createToken('COERCEPLAIN', `${'(^|[^\\d])' +
26454
- '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
26455
- `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
26456
- `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
26457
- createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
26458
- createToken('COERCEFULL', src[t.COERCEPLAIN] +
26459
- `(?:${src[t.PRERELEASE]})?` +
26460
- `(?:${src[t.BUILD]})?` +
26461
- `(?:$|[^\\d])`);
26462
- createToken('COERCERTL', src[t.COERCE], true);
26463
- createToken('COERCERTLFULL', src[t.COERCEFULL], true);
26464
-
26465
- // Tilde ranges.
26466
- // Meaning is "reasonably at or greater than"
26467
- createToken('LONETILDE', '(?:~>?)');
26468
-
26469
- createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true);
26470
- exports$1.tildeTrimReplace = '$1~';
26471
-
26472
- createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
26473
- createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
26474
-
26475
- // Caret ranges.
26476
- // Meaning is "at least and backwards compatible with"
26477
- createToken('LONECARET', '(?:\\^)');
26478
-
26479
- createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true);
26480
- exports$1.caretTrimReplace = '$1^';
26481
-
26482
- createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
26483
- createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
26484
-
26485
- // A simple gt/lt/eq thing, or just "" to indicate "any version"
26486
- createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
26487
- createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
26488
-
26489
- // An expression to strip any whitespace between the gtlt and the thing
26490
- // it modifies, so that `> 1.2.3` ==> `>1.2.3`
26491
- createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT]
26492
- }\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
26493
- exports$1.comparatorTrimReplace = '$1$2$3';
26494
-
26495
- // Something like `1.2.3 - 1.2.4`
26496
- // Note that these all use the loose form, because they'll be
26497
- // checked against either the strict or loose comparator form
26498
- // later.
26499
- createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` +
26500
- `\\s+-\\s+` +
26501
- `(${src[t.XRANGEPLAIN]})` +
26502
- `\\s*$`);
26503
-
26504
- createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` +
26505
- `\\s+-\\s+` +
26506
- `(${src[t.XRANGEPLAINLOOSE]})` +
26507
- `\\s*$`);
26508
-
26509
- // Star ranges basically just allow anything at all.
26510
- createToken('STAR', '(<|>)?=?\\s*\\*');
26511
- // >=0.0.0 is like a star
26512
- createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$');
26513
- createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$');
26514
- } (re, re.exports));
26515
- return re.exports;
26516
- }
26517
-
26518
- var parseOptions_1;
26519
- var hasRequiredParseOptions;
26520
-
26521
- function requireParseOptions () {
26522
- if (hasRequiredParseOptions) return parseOptions_1;
26523
- hasRequiredParseOptions = 1;
26524
-
26525
- // parse out just the options we care about
26526
- const looseOption = Object.freeze({ loose: true });
26527
- const emptyOpts = Object.freeze({ });
26528
- const parseOptions = options => {
26529
- if (!options) {
26530
- return emptyOpts
26531
- }
26532
-
26533
- if (typeof options !== 'object') {
26534
- return looseOption
26535
- }
26536
-
26537
- return options
26538
- };
26539
- parseOptions_1 = parseOptions;
26540
- return parseOptions_1;
26541
- }
26542
-
26543
- var identifiers;
26544
- var hasRequiredIdentifiers;
26545
-
26546
- function requireIdentifiers () {
26547
- if (hasRequiredIdentifiers) return identifiers;
26548
- hasRequiredIdentifiers = 1;
26549
-
26550
- const numeric = /^[0-9]+$/;
26551
- const compareIdentifiers = (a, b) => {
26552
- if (typeof a === 'number' && typeof b === 'number') {
26553
- return a === b ? 0 : a < b ? -1 : 1
26554
- }
26555
-
26556
- const anum = numeric.test(a);
26557
- const bnum = numeric.test(b);
26558
-
26559
- if (anum && bnum) {
26560
- a = +a;
26561
- b = +b;
26562
- }
26563
-
26564
- return a === b ? 0
26565
- : (anum && !bnum) ? -1
26566
- : (bnum && !anum) ? 1
26567
- : a < b ? -1
26568
- : 1
26569
- };
26570
-
26571
- const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
26572
-
26573
- identifiers = {
26574
- compareIdentifiers,
26575
- rcompareIdentifiers,
26576
- };
26577
- return identifiers;
26578
- }
26579
-
26580
- var semver$1;
26581
- var hasRequiredSemver$1;
26582
-
26583
- function requireSemver$1 () {
26584
- if (hasRequiredSemver$1) return semver$1;
26585
- hasRequiredSemver$1 = 1;
26586
-
26587
- const debug = requireDebug();
26588
- const { MAX_LENGTH, MAX_SAFE_INTEGER } = requireConstants();
26589
- const { safeRe: re, t } = requireRe();
26590
-
26591
- const parseOptions = requireParseOptions();
26592
- const { compareIdentifiers } = requireIdentifiers();
26593
-
26594
- const isPrereleaseIdentifier = (prerelease, identifier) => {
26595
- const identifiers = identifier.split('.');
26596
- if (identifiers.length > prerelease.length) {
26597
- return false
26598
- }
26599
-
26600
- for (let i = 0; i < identifiers.length; i++) {
26601
- if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) {
26602
- return false
26603
- }
26604
- }
26605
-
26606
- return true
26607
- };
26608
-
26609
- class SemVer {
26610
- constructor (version, options) {
26611
- options = parseOptions(options);
26612
-
26613
- if (version instanceof SemVer) {
26614
- if (version.loose === !!options.loose &&
26615
- version.includePrerelease === !!options.includePrerelease) {
26616
- return version
26617
- } else {
26618
- version = version.version;
26619
- }
26620
- } else if (typeof version !== 'string') {
26621
- throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`)
26622
- }
26623
-
26624
- if (version.length > MAX_LENGTH) {
26625
- throw new TypeError(
26626
- `version is longer than ${MAX_LENGTH} characters`
26627
- )
26628
- }
26629
-
26630
- debug('SemVer', version, options);
26631
- this.options = options;
26632
- this.loose = !!options.loose;
26633
- // this isn't actually relevant for versions, but keep it so that we
26634
- // don't run into trouble passing this.options around.
26635
- this.includePrerelease = !!options.includePrerelease;
26636
-
26637
- const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
26638
-
26639
- if (!m) {
26640
- throw new TypeError(`Invalid Version: ${version}`)
26641
- }
26642
-
26643
- this.raw = version;
26644
-
26645
- // these are actually numbers
26646
- this.major = +m[1];
26647
- this.minor = +m[2];
26648
- this.patch = +m[3];
26649
-
26650
- if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
26651
- throw new TypeError('Invalid major version')
26652
- }
26653
-
26654
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
26655
- throw new TypeError('Invalid minor version')
26656
- }
26657
-
26658
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
26659
- throw new TypeError('Invalid patch version')
26660
- }
26661
-
26662
- // numberify any prerelease numeric ids
26663
- if (!m[4]) {
26664
- this.prerelease = [];
26665
- } else {
26666
- this.prerelease = m[4].split('.').map((id) => {
26667
- if (/^[0-9]+$/.test(id)) {
26668
- const num = +id;
26669
- if (num >= 0 && num < MAX_SAFE_INTEGER) {
26670
- return num
26671
- }
26672
- }
26673
- return id
26674
- });
26675
- }
26676
-
26677
- this.build = m[5] ? m[5].split('.') : [];
26678
- this.format();
26679
- }
26680
-
26681
- format () {
26682
- this.version = `${this.major}.${this.minor}.${this.patch}`;
26683
- if (this.prerelease.length) {
26684
- this.version += `-${this.prerelease.join('.')}`;
26685
- }
26686
- return this.version
26687
- }
26688
-
26689
- toString () {
26690
- return this.version
26691
- }
26692
-
26693
- compare (other) {
26694
- debug('SemVer.compare', this.version, this.options, other);
26695
- if (!(other instanceof SemVer)) {
26696
- if (typeof other === 'string' && other === this.version) {
26697
- return 0
26698
- }
26699
- other = new SemVer(other, this.options);
26700
- }
26701
-
26702
- if (other.version === this.version) {
26703
- return 0
26704
- }
26705
-
26706
- return this.compareMain(other) || this.comparePre(other)
26707
- }
26708
-
26709
- compareMain (other) {
26710
- if (!(other instanceof SemVer)) {
26711
- other = new SemVer(other, this.options);
26712
- }
26713
-
26714
- if (this.major < other.major) {
26715
- return -1
26716
- }
26717
- if (this.major > other.major) {
26718
- return 1
26719
- }
26720
- if (this.minor < other.minor) {
26721
- return -1
26722
- }
26723
- if (this.minor > other.minor) {
26724
- return 1
26725
- }
26726
- if (this.patch < other.patch) {
26727
- return -1
26728
- }
26729
- if (this.patch > other.patch) {
26730
- return 1
26731
- }
26732
- return 0
26733
- }
26734
-
26735
- comparePre (other) {
26736
- if (!(other instanceof SemVer)) {
26737
- other = new SemVer(other, this.options);
26738
- }
26739
-
26740
- // NOT having a prerelease is > having one
26741
- if (this.prerelease.length && !other.prerelease.length) {
26742
- return -1
26743
- } else if (!this.prerelease.length && other.prerelease.length) {
26744
- return 1
26745
- } else if (!this.prerelease.length && !other.prerelease.length) {
26746
- return 0
26747
- }
26748
-
26749
- let i = 0;
26750
- do {
26751
- const a = this.prerelease[i];
26752
- const b = other.prerelease[i];
26753
- debug('prerelease compare', i, a, b);
26754
- if (a === undefined && b === undefined) {
26755
- return 0
26756
- } else if (b === undefined) {
26757
- return 1
26758
- } else if (a === undefined) {
26759
- return -1
26760
- } else if (a === b) {
26761
- continue
26762
- } else {
26763
- return compareIdentifiers(a, b)
26764
- }
26765
- } while (++i)
26766
- }
26767
-
26768
- compareBuild (other) {
26769
- if (!(other instanceof SemVer)) {
26770
- other = new SemVer(other, this.options);
26771
- }
26772
-
26773
- let i = 0;
26774
- do {
26775
- const a = this.build[i];
26776
- const b = other.build[i];
26777
- debug('build compare', i, a, b);
26778
- if (a === undefined && b === undefined) {
26779
- return 0
26780
- } else if (b === undefined) {
26781
- return 1
26782
- } else if (a === undefined) {
26783
- return -1
26784
- } else if (a === b) {
26785
- continue
26786
- } else {
26787
- return compareIdentifiers(a, b)
26788
- }
26789
- } while (++i)
26790
- }
26791
-
26792
- // preminor will bump the version up to the next minor release, and immediately
26793
- // down to pre-release. premajor and prepatch work the same way.
26794
- inc (release, identifier, identifierBase) {
26795
- if (release.startsWith('pre')) {
26796
- if (!identifier && identifierBase === false) {
26797
- throw new Error('invalid increment argument: identifier is empty')
26798
- }
26799
- // Avoid an invalid semver results
26800
- if (identifier) {
26801
- const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
26802
- if (!match || match[1] !== identifier) {
26803
- throw new Error(`invalid identifier: ${identifier}`)
26804
- }
26805
- }
26806
- }
26807
-
26808
- switch (release) {
26809
- case 'premajor':
26810
- this.prerelease.length = 0;
26811
- this.patch = 0;
26812
- this.minor = 0;
26813
- this.major++;
26814
- this.inc('pre', identifier, identifierBase);
26815
- break
26816
- case 'preminor':
26817
- this.prerelease.length = 0;
26818
- this.patch = 0;
26819
- this.minor++;
26820
- this.inc('pre', identifier, identifierBase);
26821
- break
26822
- case 'prepatch':
26823
- // If this is already a prerelease, it will bump to the next version
26824
- // drop any prereleases that might already exist, since they are not
26825
- // relevant at this point.
26826
- this.prerelease.length = 0;
26827
- this.inc('patch', identifier, identifierBase);
26828
- this.inc('pre', identifier, identifierBase);
26829
- break
26830
- // If the input is a non-prerelease version, this acts the same as
26831
- // prepatch.
26832
- case 'prerelease':
26833
- if (this.prerelease.length === 0) {
26834
- this.inc('patch', identifier, identifierBase);
26835
- }
26836
- this.inc('pre', identifier, identifierBase);
26837
- break
26838
- case 'release':
26839
- if (this.prerelease.length === 0) {
26840
- throw new Error(`version ${this.raw} is not a prerelease`)
26841
- }
26842
- this.prerelease.length = 0;
26843
- break
26844
-
26845
- case 'major':
26846
- // If this is a pre-major version, bump up to the same major version.
26847
- // Otherwise increment major.
26848
- // 1.0.0-5 bumps to 1.0.0
26849
- // 1.1.0 bumps to 2.0.0
26850
- if (
26851
- this.minor !== 0 ||
26852
- this.patch !== 0 ||
26853
- this.prerelease.length === 0
26854
- ) {
26855
- this.major++;
26856
- }
26857
- this.minor = 0;
26858
- this.patch = 0;
26859
- this.prerelease = [];
26860
- break
26861
- case 'minor':
26862
- // If this is a pre-minor version, bump up to the same minor version.
26863
- // Otherwise increment minor.
26864
- // 1.2.0-5 bumps to 1.2.0
26865
- // 1.2.1 bumps to 1.3.0
26866
- if (this.patch !== 0 || this.prerelease.length === 0) {
26867
- this.minor++;
26868
- }
26869
- this.patch = 0;
26870
- this.prerelease = [];
26871
- break
26872
- case 'patch':
26873
- // If this is not a pre-release version, it will increment the patch.
26874
- // If it is a pre-release it will bump up to the same patch version.
26875
- // 1.2.0-5 patches to 1.2.0
26876
- // 1.2.0 patches to 1.2.1
26877
- if (this.prerelease.length === 0) {
26878
- this.patch++;
26879
- }
26880
- this.prerelease = [];
26881
- break
26882
- // This probably shouldn't be used publicly.
26883
- // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
26884
- case 'pre': {
26885
- const base = Number(identifierBase) ? 1 : 0;
26886
-
26887
- if (this.prerelease.length === 0) {
26888
- this.prerelease = [base];
26889
- } else {
26890
- let i = this.prerelease.length;
26891
- while (--i >= 0) {
26892
- if (typeof this.prerelease[i] === 'number') {
26893
- this.prerelease[i]++;
26894
- i = -2;
26895
- }
26896
- }
26897
- if (i === -1) {
26898
- // didn't increment anything
26899
- if (identifier === this.prerelease.join('.') && identifierBase === false) {
26900
- throw new Error('invalid increment argument: identifier already exists')
26901
- }
26902
- this.prerelease.push(base);
26903
- }
26904
- }
26905
- if (identifier) {
26906
- // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
26907
- // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
26908
- let prerelease = [identifier, base];
26909
- if (identifierBase === false) {
26910
- prerelease = [identifier];
26911
- }
26912
- if (isPrereleaseIdentifier(this.prerelease, identifier)) {
26913
- const prereleaseBase = this.prerelease[identifier.split('.').length];
26914
- if (isNaN(prereleaseBase)) {
26915
- this.prerelease = prerelease;
26916
- }
26917
- } else {
26918
- this.prerelease = prerelease;
26919
- }
26920
- }
26921
- break
26922
- }
26923
- default:
26924
- throw new Error(`invalid increment argument: ${release}`)
26925
- }
26926
- this.raw = this.format();
26927
- if (this.build.length) {
26928
- this.raw += `+${this.build.join('.')}`;
26929
- }
26930
- return this
26931
- }
26932
- }
26933
-
26934
- semver$1 = SemVer;
26935
- return semver$1;
26936
- }
26937
-
26938
- var parse_1;
26939
- var hasRequiredParse;
26940
-
26941
- function requireParse () {
26942
- if (hasRequiredParse) return parse_1;
26943
- hasRequiredParse = 1;
26944
-
26945
- const SemVer = requireSemver$1();
26946
- const parse = (version, options, throwErrors = false) => {
26947
- if (version instanceof SemVer) {
26948
- return version
26949
- }
26950
- try {
26951
- return new SemVer(version, options)
26952
- } catch (er) {
26953
- if (!throwErrors) {
26954
- return null
26955
- }
26956
- throw er
26957
- }
26958
- };
26959
-
26960
- parse_1 = parse;
26961
- return parse_1;
26962
- }
26963
-
26964
- var valid_1;
26965
- var hasRequiredValid$1;
26966
-
26967
- function requireValid$1 () {
26968
- if (hasRequiredValid$1) return valid_1;
26969
- hasRequiredValid$1 = 1;
26970
-
26971
- const parse = requireParse();
26972
- const valid = (version, options) => {
26973
- const v = parse(version, options);
26974
- return v ? v.version : null
26975
- };
26976
- valid_1 = valid;
26977
- return valid_1;
26978
- }
26979
-
26980
- var clean_1;
26981
- var hasRequiredClean;
26982
-
26983
- function requireClean () {
26984
- if (hasRequiredClean) return clean_1;
26985
- hasRequiredClean = 1;
26986
-
26987
- const parse = requireParse();
26988
- const clean = (version, options) => {
26989
- const s = parse(version.trim().replace(/^[=v]+/, ''), options);
26990
- return s ? s.version : null
26991
- };
26992
- clean_1 = clean;
26993
- return clean_1;
26994
- }
26995
-
26996
- var inc_1;
26997
- var hasRequiredInc;
26998
-
26999
- function requireInc () {
27000
- if (hasRequiredInc) return inc_1;
27001
- hasRequiredInc = 1;
27002
-
27003
- const SemVer = requireSemver$1();
27004
-
27005
- const inc = (version, release, options, identifier, identifierBase) => {
27006
- if (typeof (options) === 'string') {
27007
- identifierBase = identifier;
27008
- identifier = options;
27009
- options = undefined;
27010
- }
27011
-
27012
- try {
27013
- return new SemVer(
27014
- version instanceof SemVer ? version.version : version,
27015
- options
27016
- ).inc(release, identifier, identifierBase).version
27017
- } catch (er) {
27018
- return null
27019
- }
27020
- };
27021
- inc_1 = inc;
27022
- return inc_1;
27023
- }
27024
-
27025
- var diff_1;
27026
- var hasRequiredDiff;
27027
-
27028
- function requireDiff () {
27029
- if (hasRequiredDiff) return diff_1;
27030
- hasRequiredDiff = 1;
27031
-
27032
- const parse = requireParse();
27033
-
27034
- const diff = (version1, version2) => {
27035
- const v1 = parse(version1, null, true);
27036
- const v2 = parse(version2, null, true);
27037
- const comparison = v1.compare(v2);
27038
-
27039
- if (comparison === 0) {
27040
- return null
27041
- }
27042
-
27043
- const v1Higher = comparison > 0;
27044
- const highVersion = v1Higher ? v1 : v2;
27045
- const lowVersion = v1Higher ? v2 : v1;
27046
- const highHasPre = !!highVersion.prerelease.length;
27047
- const lowHasPre = !!lowVersion.prerelease.length;
27048
-
27049
- if (lowHasPre && !highHasPre) {
27050
- // Going from prerelease -> no prerelease requires some special casing
27051
-
27052
- // If the low version has only a major, then it will always be a major
27053
- // Some examples:
27054
- // 1.0.0-1 -> 1.0.0
27055
- // 1.0.0-1 -> 1.1.1
27056
- // 1.0.0-1 -> 2.0.0
27057
- if (!lowVersion.patch && !lowVersion.minor) {
27058
- return 'major'
27059
- }
27060
-
27061
- // If the main part has no difference
27062
- if (lowVersion.compareMain(highVersion) === 0) {
27063
- if (lowVersion.minor && !lowVersion.patch) {
27064
- return 'minor'
27065
- }
27066
- return 'patch'
27067
- }
27068
- }
27069
-
27070
- // add the `pre` prefix if we are going to a prerelease version
27071
- const prefix = highHasPre ? 'pre' : '';
27072
-
27073
- if (v1.major !== v2.major) {
27074
- return prefix + 'major'
27075
- }
27076
-
27077
- if (v1.minor !== v2.minor) {
27078
- return prefix + 'minor'
27079
- }
27080
-
27081
- if (v1.patch !== v2.patch) {
27082
- return prefix + 'patch'
27083
- }
27084
-
27085
- // high and low are prereleases
27086
- return 'prerelease'
27087
- };
27088
-
27089
- diff_1 = diff;
27090
- return diff_1;
27091
- }
27092
-
27093
- var major_1;
27094
- var hasRequiredMajor;
27095
-
27096
- function requireMajor () {
27097
- if (hasRequiredMajor) return major_1;
27098
- hasRequiredMajor = 1;
27099
-
27100
- const SemVer = requireSemver$1();
27101
- const major = (a, loose) => new SemVer(a, loose).major;
27102
- major_1 = major;
27103
- return major_1;
27104
- }
27105
-
27106
- var minor_1;
27107
- var hasRequiredMinor;
27108
-
27109
- function requireMinor () {
27110
- if (hasRequiredMinor) return minor_1;
27111
- hasRequiredMinor = 1;
27112
-
27113
- const SemVer = requireSemver$1();
27114
- const minor = (a, loose) => new SemVer(a, loose).minor;
27115
- minor_1 = minor;
27116
- return minor_1;
27117
- }
27118
-
27119
- var patch_1;
27120
- var hasRequiredPatch;
27121
-
27122
- function requirePatch () {
27123
- if (hasRequiredPatch) return patch_1;
27124
- hasRequiredPatch = 1;
27125
-
27126
- const SemVer = requireSemver$1();
27127
- const patch = (a, loose) => new SemVer(a, loose).patch;
27128
- patch_1 = patch;
27129
- return patch_1;
27130
- }
27131
-
27132
- var prerelease_1;
27133
- var hasRequiredPrerelease;
27134
-
27135
- function requirePrerelease () {
27136
- if (hasRequiredPrerelease) return prerelease_1;
27137
- hasRequiredPrerelease = 1;
27138
-
27139
- const parse = requireParse();
27140
- const prerelease = (version, options) => {
27141
- const parsed = parse(version, options);
27142
- return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
27143
- };
27144
- prerelease_1 = prerelease;
27145
- return prerelease_1;
27146
- }
27147
-
27148
- var compare_1;
27149
- var hasRequiredCompare;
27150
-
27151
- function requireCompare () {
27152
- if (hasRequiredCompare) return compare_1;
27153
- hasRequiredCompare = 1;
27154
-
27155
- const SemVer = requireSemver$1();
27156
- const compare = (a, b, loose) =>
27157
- new SemVer(a, loose).compare(new SemVer(b, loose));
27158
-
27159
- compare_1 = compare;
27160
- return compare_1;
27161
- }
27162
-
27163
- var rcompare_1;
27164
- var hasRequiredRcompare;
27165
-
27166
- function requireRcompare () {
27167
- if (hasRequiredRcompare) return rcompare_1;
27168
- hasRequiredRcompare = 1;
27169
-
27170
- const compare = requireCompare();
27171
- const rcompare = (a, b, loose) => compare(b, a, loose);
27172
- rcompare_1 = rcompare;
27173
- return rcompare_1;
27174
- }
27175
-
27176
- var compareLoose_1;
27177
- var hasRequiredCompareLoose;
27178
-
27179
- function requireCompareLoose () {
27180
- if (hasRequiredCompareLoose) return compareLoose_1;
27181
- hasRequiredCompareLoose = 1;
27182
-
27183
- const compare = requireCompare();
27184
- const compareLoose = (a, b) => compare(a, b, true);
27185
- compareLoose_1 = compareLoose;
27186
- return compareLoose_1;
27187
- }
27188
-
27189
- var compareBuild_1;
27190
- var hasRequiredCompareBuild;
27191
-
27192
- function requireCompareBuild () {
27193
- if (hasRequiredCompareBuild) return compareBuild_1;
27194
- hasRequiredCompareBuild = 1;
27195
-
27196
- const SemVer = requireSemver$1();
27197
- const compareBuild = (a, b, loose) => {
27198
- const versionA = new SemVer(a, loose);
27199
- const versionB = new SemVer(b, loose);
27200
- return versionA.compare(versionB) || versionA.compareBuild(versionB)
27201
- };
27202
- compareBuild_1 = compareBuild;
27203
- return compareBuild_1;
27204
- }
27205
-
27206
- var sort_1;
27207
- var hasRequiredSort;
27208
-
27209
- function requireSort () {
27210
- if (hasRequiredSort) return sort_1;
27211
- hasRequiredSort = 1;
27212
-
27213
- const compareBuild = requireCompareBuild();
27214
- const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
27215
- sort_1 = sort;
27216
- return sort_1;
27217
- }
27218
-
27219
- var rsort_1;
27220
- var hasRequiredRsort;
27221
-
27222
- function requireRsort () {
27223
- if (hasRequiredRsort) return rsort_1;
27224
- hasRequiredRsort = 1;
27225
-
27226
- const compareBuild = requireCompareBuild();
27227
- const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
27228
- rsort_1 = rsort;
27229
- return rsort_1;
27230
- }
27231
-
27232
- var gt_1;
27233
- var hasRequiredGt;
27234
-
27235
- function requireGt () {
27236
- if (hasRequiredGt) return gt_1;
27237
- hasRequiredGt = 1;
27238
-
27239
- const compare = requireCompare();
27240
- const gt = (a, b, loose) => compare(a, b, loose) > 0;
27241
- gt_1 = gt;
27242
- return gt_1;
27243
- }
27244
-
27245
- var lt_1;
27246
- var hasRequiredLt;
27247
-
27248
- function requireLt () {
27249
- if (hasRequiredLt) return lt_1;
27250
- hasRequiredLt = 1;
27251
-
27252
- const compare = requireCompare();
27253
- const lt = (a, b, loose) => compare(a, b, loose) < 0;
27254
- lt_1 = lt;
27255
- return lt_1;
27256
- }
27257
-
27258
- var eq_1;
27259
- var hasRequiredEq;
27260
-
27261
- function requireEq () {
27262
- if (hasRequiredEq) return eq_1;
27263
- hasRequiredEq = 1;
27264
-
27265
- const compare = requireCompare();
27266
- const eq = (a, b, loose) => compare(a, b, loose) === 0;
27267
- eq_1 = eq;
27268
- return eq_1;
27269
- }
27270
-
27271
- var neq_1;
27272
- var hasRequiredNeq;
27273
-
27274
- function requireNeq () {
27275
- if (hasRequiredNeq) return neq_1;
27276
- hasRequiredNeq = 1;
27277
-
27278
- const compare = requireCompare();
27279
- const neq = (a, b, loose) => compare(a, b, loose) !== 0;
27280
- neq_1 = neq;
27281
- return neq_1;
27282
- }
27283
-
27284
- var gte_1;
27285
- var hasRequiredGte;
27286
-
27287
- function requireGte () {
27288
- if (hasRequiredGte) return gte_1;
27289
- hasRequiredGte = 1;
27290
-
27291
- const compare = requireCompare();
27292
- const gte = (a, b, loose) => compare(a, b, loose) >= 0;
27293
- gte_1 = gte;
27294
- return gte_1;
27295
- }
27296
-
27297
- var lte_1;
27298
- var hasRequiredLte;
27299
-
27300
- function requireLte () {
27301
- if (hasRequiredLte) return lte_1;
27302
- hasRequiredLte = 1;
27303
-
27304
- const compare = requireCompare();
27305
- const lte = (a, b, loose) => compare(a, b, loose) <= 0;
27306
- lte_1 = lte;
27307
- return lte_1;
27308
- }
27309
-
27310
- var cmp_1;
27311
- var hasRequiredCmp;
27312
-
27313
- function requireCmp () {
27314
- if (hasRequiredCmp) return cmp_1;
27315
- hasRequiredCmp = 1;
27316
-
27317
- const eq = requireEq();
27318
- const neq = requireNeq();
27319
- const gt = requireGt();
27320
- const gte = requireGte();
27321
- const lt = requireLt();
27322
- const lte = requireLte();
27323
-
27324
- const cmp = (a, op, b, loose) => {
27325
- switch (op) {
27326
- case '===':
27327
- if (typeof a === 'object') {
27328
- a = a.version;
27329
- }
27330
- if (typeof b === 'object') {
27331
- b = b.version;
27332
- }
27333
- return a === b
27334
-
27335
- case '!==':
27336
- if (typeof a === 'object') {
27337
- a = a.version;
27338
- }
27339
- if (typeof b === 'object') {
27340
- b = b.version;
27341
- }
27342
- return a !== b
27343
-
27344
- case '':
27345
- case '=':
27346
- case '==':
27347
- return eq(a, b, loose)
27348
-
27349
- case '!=':
27350
- return neq(a, b, loose)
27351
-
27352
- case '>':
27353
- return gt(a, b, loose)
27354
-
27355
- case '>=':
27356
- return gte(a, b, loose)
27357
-
27358
- case '<':
27359
- return lt(a, b, loose)
27360
-
27361
- case '<=':
27362
- return lte(a, b, loose)
27363
-
27364
- default:
27365
- throw new TypeError(`Invalid operator: ${op}`)
27366
- }
27367
- };
27368
- cmp_1 = cmp;
27369
- return cmp_1;
27370
- }
27371
-
27372
- var coerce_1;
27373
- var hasRequiredCoerce;
27374
-
27375
- function requireCoerce () {
27376
- if (hasRequiredCoerce) return coerce_1;
27377
- hasRequiredCoerce = 1;
27378
-
27379
- const SemVer = requireSemver$1();
27380
- const parse = requireParse();
27381
- const { safeRe: re, t } = requireRe();
27382
-
27383
- const coerce = (version, options) => {
27384
- if (version instanceof SemVer) {
27385
- return version
27386
- }
27387
-
27388
- if (typeof version === 'number') {
27389
- version = String(version);
27390
- }
27391
-
27392
- if (typeof version !== 'string') {
27393
- return null
27394
- }
27395
-
27396
- options = options || {};
27397
-
27398
- let match = null;
27399
- if (!options.rtl) {
27400
- match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
27401
- } else {
27402
- // Find the right-most coercible string that does not share
27403
- // a terminus with a more left-ward coercible string.
27404
- // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
27405
- // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'
27406
- //
27407
- // Walk through the string checking with a /g regexp
27408
- // Manually set the index so as to pick up overlapping matches.
27409
- // Stop when we get a match that ends at the string end, since no
27410
- // coercible string can be more right-ward without the same terminus.
27411
- const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
27412
- let next;
27413
- while ((next = coerceRtlRegex.exec(version)) &&
27414
- (!match || match.index + match[0].length !== version.length)
27415
- ) {
27416
- if (!match ||
27417
- next.index + next[0].length !== match.index + match[0].length) {
27418
- match = next;
27419
- }
27420
- coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
27421
- }
27422
- // leave it in a clean state
27423
- coerceRtlRegex.lastIndex = -1;
27424
- }
27425
-
27426
- if (match === null) {
27427
- return null
27428
- }
27429
-
27430
- const major = match[2];
27431
- const minor = match[3] || '0';
27432
- const patch = match[4] || '0';
27433
- const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : '';
27434
- const build = options.includePrerelease && match[6] ? `+${match[6]}` : '';
27435
-
27436
- return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)
27437
- };
27438
- coerce_1 = coerce;
27439
- return coerce_1;
27440
- }
27441
-
27442
- var truncate_1;
27443
- var hasRequiredTruncate;
27444
-
27445
- function requireTruncate () {
27446
- if (hasRequiredTruncate) return truncate_1;
27447
- hasRequiredTruncate = 1;
27448
-
27449
- const parse = requireParse();
27450
- const constants = requireConstants();
27451
- const SemVer = requireSemver$1();
27452
-
27453
- const truncate = (version, truncation, options) => {
27454
- if (!constants.RELEASE_TYPES.includes(truncation)) {
27455
- return null
27456
- }
27457
-
27458
- const clonedVersion = cloneInputVersion(version, options);
27459
- return clonedVersion && doTruncation(clonedVersion, truncation)
27460
- };
27461
-
27462
- const cloneInputVersion = (version, options) => {
27463
- const versionStringToParse = (
27464
- version instanceof SemVer ? version.version : version
27465
- );
27466
-
27467
- return parse(versionStringToParse, options)
27468
- };
27469
-
27470
- const doTruncation = (version, truncation) => {
27471
- if (isPrerelease(truncation)) {
27472
- return version.version
27473
- }
27474
-
27475
- version.prerelease = [];
27476
-
27477
- switch (truncation) {
27478
- case 'major':
27479
- version.minor = 0;
27480
- version.patch = 0;
27481
- break
27482
- case 'minor':
27483
- version.patch = 0;
27484
- break
27485
- }
27486
-
27487
- return version.format()
27488
- };
27489
-
27490
- const isPrerelease = (type) => {
27491
- return type.startsWith('pre')
27492
- };
27493
-
27494
- truncate_1 = truncate;
27495
- return truncate_1;
27496
- }
27497
-
27498
- var lrucache;
27499
- var hasRequiredLrucache;
27500
-
27501
- function requireLrucache () {
27502
- if (hasRequiredLrucache) return lrucache;
27503
- hasRequiredLrucache = 1;
27504
-
27505
- class LRUCache {
27506
- constructor () {
27507
- this.max = 1000;
27508
- this.map = new Map();
27509
- }
27510
-
27511
- get (key) {
27512
- const value = this.map.get(key);
27513
- if (value === undefined) {
27514
- return undefined
27515
- } else {
27516
- // Remove the key from the map and add it to the end
27517
- this.map.delete(key);
27518
- this.map.set(key, value);
27519
- return value
27520
- }
27521
- }
27522
-
27523
- delete (key) {
27524
- return this.map.delete(key)
27525
- }
27526
-
27527
- set (key, value) {
27528
- const deleted = this.delete(key);
27529
-
27530
- if (!deleted && value !== undefined) {
27531
- // If cache is full, delete the least recently used item
27532
- if (this.map.size >= this.max) {
27533
- const firstKey = this.map.keys().next().value;
27534
- this.delete(firstKey);
27535
- }
27536
-
27537
- this.map.set(key, value);
27538
- }
27539
-
27540
- return this
27541
- }
27542
- }
27543
-
27544
- lrucache = LRUCache;
27545
- return lrucache;
27546
- }
27547
-
27548
- var range;
27549
- var hasRequiredRange;
27550
-
27551
- function requireRange () {
27552
- if (hasRequiredRange) return range;
27553
- hasRequiredRange = 1;
27554
-
27555
- const SPACE_CHARACTERS = /\s+/g;
27556
-
27557
- // hoisted class for cyclic dependency
27558
- class Range {
27559
- constructor (range, options) {
27560
- options = parseOptions(options);
27561
-
27562
- if (range instanceof Range) {
27563
- if (
27564
- range.loose === !!options.loose &&
27565
- range.includePrerelease === !!options.includePrerelease
27566
- ) {
27567
- return range
27568
- } else {
27569
- return new Range(range.raw, options)
27570
- }
27571
- }
27572
-
27573
- if (range instanceof Comparator) {
27574
- // just put it in the set and return
27575
- this.raw = range.value;
27576
- this.set = [[range]];
27577
- this.formatted = undefined;
27578
- return this
27579
- }
27580
-
27581
- this.options = options;
27582
- this.loose = !!options.loose;
27583
- this.includePrerelease = !!options.includePrerelease;
27584
-
27585
- // First reduce all whitespace as much as possible so we do not have to rely
27586
- // on potentially slow regexes like \s*. This is then stored and used for
27587
- // future error messages as well.
27588
- this.raw = range.trim().replace(SPACE_CHARACTERS, ' ');
27589
-
27590
- // First, split on ||
27591
- this.set = this.raw
27592
- .split('||')
27593
- // map the range to a 2d array of comparators
27594
- .map(r => this.parseRange(r.trim()))
27595
- // throw out any comparator lists that are empty
27596
- // this generally means that it was not a valid range, which is allowed
27597
- // in loose mode, but will still throw if the WHOLE range is invalid.
27598
- .filter(c => c.length);
27599
-
27600
- if (!this.set.length) {
27601
- throw new TypeError(`Invalid SemVer Range: ${this.raw}`)
27602
- }
27603
-
27604
- // if we have any that are not the null set, throw out null sets.
27605
- if (this.set.length > 1) {
27606
- // keep the first one, in case they're all null sets
27607
- const first = this.set[0];
27608
- this.set = this.set.filter(c => !isNullSet(c[0]));
27609
- if (this.set.length === 0) {
27610
- this.set = [first];
27611
- } else if (this.set.length > 1) {
27612
- // if we have any that are *, then the range is just *
27613
- for (const c of this.set) {
27614
- if (c.length === 1 && isAny(c[0])) {
27615
- this.set = [c];
27616
- break
27617
- }
27618
- }
27619
- }
27620
- }
27621
-
27622
- this.formatted = undefined;
27623
- }
27624
-
27625
- get range () {
27626
- if (this.formatted === undefined) {
27627
- this.formatted = '';
27628
- for (let i = 0; i < this.set.length; i++) {
27629
- if (i > 0) {
27630
- this.formatted += '||';
27631
- }
27632
- const comps = this.set[i];
27633
- for (let k = 0; k < comps.length; k++) {
27634
- if (k > 0) {
27635
- this.formatted += ' ';
27636
- }
27637
- this.formatted += comps[k].toString().trim();
27638
- }
27639
- }
27640
- }
27641
- return this.formatted
27642
- }
27643
-
27644
- format () {
27645
- return this.range
27646
- }
27647
-
27648
- toString () {
27649
- return this.range
27650
- }
27651
-
27652
- parseRange (range) {
27653
- // strip build metadata so it can't bleed into the version
27654
- range = range.replace(BUILDSTRIPRE, '');
27655
-
27656
- // memoize range parsing for performance.
27657
- // this is a very hot path, and fully deterministic.
27658
- const memoOpts =
27659
- (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |
27660
- (this.options.loose && FLAG_LOOSE);
27661
- const memoKey = memoOpts + ':' + range;
27662
- const cached = cache.get(memoKey);
27663
- if (cached) {
27664
- return cached
27665
- }
27666
-
27667
- const loose = this.options.loose;
27668
- // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
27669
- const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
27670
- range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
27671
- debug('hyphen replace', range);
27672
-
27673
- // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
27674
- range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
27675
- debug('comparator trim', range);
27676
-
27677
- // `~ 1.2.3` => `~1.2.3`
27678
- range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
27679
- debug('tilde trim', range);
27680
-
27681
- // `^ 1.2.3` => `^1.2.3`
27682
- range = range.replace(re[t.CARETTRIM], caretTrimReplace);
27683
- debug('caret trim', range);
27684
-
27685
- // At this point, the range is completely trimmed and
27686
- // ready to be split into comparators.
27687
-
27688
- let rangeList = range
27689
- .split(' ')
27690
- .map(comp => parseComparator(comp, this.options))
27691
- .join(' ')
27692
- .split(/\s+/)
27693
- // >=0.0.0 is equivalent to *
27694
- .map(comp => replaceGTE0(comp, this.options));
27695
-
27696
- if (loose) {
27697
- // in loose mode, throw out any that are not valid comparators
27698
- rangeList = rangeList.filter(comp => {
27699
- debug('loose invalid filter', comp, this.options);
27700
- return !!comp.match(re[t.COMPARATORLOOSE])
27701
- });
27702
- }
27703
- debug('range list', rangeList);
27704
-
27705
- // if any comparators are the null set, then replace with JUST null set
27706
- // if more than one comparator, remove any * comparators
27707
- // also, don't include the same comparator more than once
27708
- const rangeMap = new Map();
27709
- const comparators = rangeList.map(comp => new Comparator(comp, this.options));
27710
- for (const comp of comparators) {
27711
- if (isNullSet(comp)) {
27712
- return [comp]
27713
- }
27714
- rangeMap.set(comp.value, comp);
27715
- }
27716
- if (rangeMap.size > 1 && rangeMap.has('')) {
27717
- rangeMap.delete('');
27718
- }
27719
-
27720
- const result = [...rangeMap.values()];
27721
- cache.set(memoKey, result);
27722
- return result
27723
- }
27724
-
27725
- intersects (range, options) {
27726
- if (!(range instanceof Range)) {
27727
- throw new TypeError('a Range is required')
27728
- }
27729
-
27730
- return this.set.some((thisComparators) => {
27731
- return (
27732
- isSatisfiable(thisComparators, options) &&
27733
- range.set.some((rangeComparators) => {
27734
- return (
27735
- isSatisfiable(rangeComparators, options) &&
27736
- thisComparators.every((thisComparator) => {
27737
- return rangeComparators.every((rangeComparator) => {
27738
- return thisComparator.intersects(rangeComparator, options)
27739
- })
27740
- })
27741
- )
27742
- })
27743
- )
27744
- })
27745
- }
27746
-
27747
- // if ANY of the sets match ALL of its comparators, then pass
27748
- test (version) {
27749
- if (!version) {
27750
- return false
27751
- }
27752
-
27753
- if (typeof version === 'string') {
27754
- try {
27755
- version = new SemVer(version, this.options);
27756
- } catch (er) {
27757
- return false
27758
- }
27759
- }
27760
-
27761
- for (let i = 0; i < this.set.length; i++) {
27762
- if (testSet(this.set[i], version, this.options)) {
27763
- return true
27764
- }
27765
- }
27766
- return false
27767
- }
27768
- }
27769
-
27770
- range = Range;
27771
-
27772
- const LRU = requireLrucache();
27773
- const cache = new LRU();
27774
-
27775
- const parseOptions = requireParseOptions();
27776
- const Comparator = requireComparator();
27777
- const debug = requireDebug();
27778
- const SemVer = requireSemver$1();
27779
- const {
27780
- safeRe: re,
27781
- src,
27782
- t,
27783
- comparatorTrimReplace,
27784
- tildeTrimReplace,
27785
- caretTrimReplace,
27786
- } = requireRe();
27787
- const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = requireConstants();
27788
-
27789
- // unbounded global build-metadata stripper used by parseRange
27790
- const BUILDSTRIPRE = new RegExp(src[t.BUILD], 'g');
27791
-
27792
- const isNullSet = c => c.value === '<0.0.0-0';
27793
- const isAny = c => c.value === '';
27794
-
27795
- // take a set of comparators and determine whether there
27796
- // exists a version which can satisfy it
27797
- const isSatisfiable = (comparators, options) => {
27798
- let result = true;
27799
- const remainingComparators = comparators.slice();
27800
- let testComparator = remainingComparators.pop();
27801
-
27802
- while (result && remainingComparators.length) {
27803
- result = remainingComparators.every((otherComparator) => {
27804
- return testComparator.intersects(otherComparator, options)
27805
- });
27806
-
27807
- testComparator = remainingComparators.pop();
27808
- }
27809
-
27810
- return result
27811
- };
27812
-
27813
- // comprised of xranges, tildes, stars, and gtlt's at this point.
27814
- // already replaced the hyphen ranges
27815
- // turn into a set of JUST comparators.
27816
- const parseComparator = (comp, options) => {
27817
- comp = comp.replace(re[t.BUILD], '');
27818
- debug('comp', comp, options);
27819
- comp = replaceCarets(comp, options);
27820
- debug('caret', comp);
27821
- comp = replaceTildes(comp, options);
27822
- debug('tildes', comp);
27823
- comp = replaceXRanges(comp, options);
27824
- debug('xrange', comp);
27825
- comp = replaceStars(comp, options);
27826
- debug('stars', comp);
27827
- return comp
27828
- };
27829
-
27830
- const isX = id => !id || id.toLowerCase() === 'x' || id === '*';
27831
-
27832
- const invalidXRangeOrder = (M, m, p) => (
27833
- (isX(M) && !isX(m)) ||
27834
- (isX(m) && p && !isX(p))
27835
- );
27836
-
27837
- // ~, ~> --> * (any, kinda silly)
27838
- // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
27839
- // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
27840
- // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0
27841
- // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0
27842
- // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0
27843
- // ~0.0.1 --> >=0.0.1 <0.1.0-0
27844
- const replaceTildes = (comp, options) => {
27845
- return comp
27846
- .trim()
27847
- .split(/\s+/)
27848
- .map((c) => replaceTilde(c, options))
27849
- .join(' ')
27850
- };
27851
-
27852
- const replaceTilde = (comp, options) => {
27853
- const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
27854
- // if we're including prereleases in the match, then the lower bound is
27855
- // -0, the lowest possible prerelease value, just like x-ranges and carets.
27856
- // this keeps `~1.2` equivalent to the `1.2.x` x-range it's documented as.
27857
- const z = options.includePrerelease ? '-0' : '';
27858
- return comp.replace(r, (_, M, m, p, pr) => {
27859
- debug('tilde', comp, _, M, m, p, pr);
27860
- let ret;
27861
-
27862
- if (isX(M)) {
27863
- ret = '';
27864
- } else if (isX(m)) {
27865
- ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
27866
- } else if (isX(p)) {
27867
- // ~1.2 == >=1.2.0 <1.3.0-0
27868
- ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
27869
- } else if (pr) {
27870
- debug('replaceTilde pr', pr);
27871
- ret = `>=${M}.${m}.${p}-${pr
27872
- } <${M}.${+m + 1}.0-0`;
27873
- } else {
27874
- // ~1.2.3 == >=1.2.3 <1.3.0-0
27875
- ret = `>=${M}.${m}.${p
27876
- } <${M}.${+m + 1}.0-0`;
27877
- }
27878
-
27879
- debug('tilde return', ret);
27880
- return ret
27881
- })
27882
- };
27883
-
27884
- // ^ --> * (any, kinda silly)
27885
- // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0
27886
- // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0
27887
- // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0
27888
- // ^1.2.3 --> >=1.2.3 <2.0.0-0
27889
- // ^1.2.0 --> >=1.2.0 <2.0.0-0
27890
- // ^0.0.1 --> >=0.0.1 <0.0.2-0
27891
- // ^0.1.0 --> >=0.1.0 <0.2.0-0
27892
- const replaceCarets = (comp, options) => {
27893
- return comp
27894
- .trim()
27895
- .split(/\s+/)
27896
- .map((c) => replaceCaret(c, options))
27897
- .join(' ')
27898
- };
27899
-
27900
- const replaceCaret = (comp, options) => {
27901
- debug('caret', comp, options);
27902
- const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
27903
- const z = options.includePrerelease ? '-0' : '';
27904
- return comp.replace(r, (_, M, m, p, pr) => {
27905
- debug('caret', comp, _, M, m, p, pr);
27906
- let ret;
27907
-
27908
- if (isX(M)) {
27909
- ret = '';
27910
- } else if (isX(m)) {
27911
- ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
27912
- } else if (isX(p)) {
27913
- if (M === '0') {
27914
- ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
27915
- } else {
27916
- ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
27917
- }
27918
- } else if (pr) {
27919
- debug('replaceCaret pr', pr);
27920
- if (M === '0') {
27921
- if (m === '0') {
27922
- ret = `>=${M}.${m}.${p}-${pr
27923
- } <${M}.${m}.${+p + 1}-0`;
27924
- } else {
27925
- ret = `>=${M}.${m}.${p}-${pr
27926
- } <${M}.${+m + 1}.0-0`;
27927
- }
27928
- } else {
27929
- ret = `>=${M}.${m}.${p}-${pr
27930
- } <${+M + 1}.0.0-0`;
27931
- }
27932
- } else {
27933
- debug('no pr');
27934
- if (M === '0') {
27935
- if (m === '0') {
27936
- ret = `>=${M}.${m}.${p
27937
- } <${M}.${m}.${+p + 1}-0`;
27938
- } else {
27939
- ret = `>=${M}.${m}.${p
27940
- } <${M}.${+m + 1}.0-0`;
27941
- }
27942
- } else {
27943
- ret = `>=${M}.${m}.${p
27944
- } <${+M + 1}.0.0-0`;
27945
- }
27946
- }
27947
-
27948
- debug('caret return', ret);
27949
- return ret
27950
- })
27951
- };
27952
-
27953
- const replaceXRanges = (comp, options) => {
27954
- debug('replaceXRanges', comp, options);
27955
- return comp
27956
- .split(/\s+/)
27957
- .map((c) => replaceXRange(c, options))
27958
- .join(' ')
27959
- };
27960
-
27961
- const replaceXRange = (comp, options) => {
27962
- comp = comp.trim();
27963
- const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
27964
- return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
27965
- debug('xRange', comp, ret, gtlt, M, m, p, pr);
27966
- if (invalidXRangeOrder(M, m, p)) {
27967
- return comp
27968
- }
27969
-
27970
- const xM = isX(M);
27971
- const xm = xM || isX(m);
27972
- const xp = xm || isX(p);
27973
- const anyX = xp;
27974
-
27975
- if (gtlt === '=' && anyX) {
27976
- gtlt = '';
27977
- }
27978
-
27979
- // if we're including prereleases in the match, then we need
27980
- // to fix this to -0, the lowest possible prerelease value
27981
- pr = options.includePrerelease ? '-0' : '';
27982
-
27983
- if (xM) {
27984
- if (gtlt === '>' || gtlt === '<') {
27985
- // nothing is allowed
27986
- ret = '<0.0.0-0';
27987
- } else {
27988
- // nothing is forbidden
27989
- ret = '*';
27990
- }
27991
- } else if (gtlt && anyX) {
27992
- // we know patch is an x, because we have any x at all.
27993
- // replace X with 0
27994
- if (xm) {
27995
- m = 0;
27996
- }
27997
- p = 0;
27998
-
27999
- if (gtlt === '>') {
28000
- // >1 => >=2.0.0
28001
- // >1.2 => >=1.3.0
28002
- gtlt = '>=';
28003
- if (xm) {
28004
- M = +M + 1;
28005
- m = 0;
28006
- p = 0;
28007
- } else {
28008
- m = +m + 1;
28009
- p = 0;
28010
- }
28011
- } else if (gtlt === '<=') {
28012
- // <=0.7.x is actually <0.8.0, since any 0.7.x should
28013
- // pass. Similarly, <=7.x is actually <8.0.0, etc.
28014
- gtlt = '<';
28015
- if (xm) {
28016
- M = +M + 1;
28017
- } else {
28018
- m = +m + 1;
28019
- }
28020
- }
28021
-
28022
- if (gtlt === '<') {
28023
- pr = '-0';
28024
- }
28025
-
28026
- ret = `${gtlt + M}.${m}.${p}${pr}`;
28027
- } else if (xm) {
28028
- ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
28029
- } else if (xp) {
28030
- ret = `>=${M}.${m}.0${pr
28031
- } <${M}.${+m + 1}.0-0`;
28032
- }
28033
-
28034
- debug('xRange return', ret);
28035
-
28036
- return ret
28037
- })
28038
- };
28039
-
28040
- // Because * is AND-ed with everything else in the comparator,
28041
- // and '' means "any version", just remove the *s entirely.
28042
- const replaceStars = (comp, options) => {
28043
- debug('replaceStars', comp, options);
28044
- // Looseness is ignored here. star is always as loose as it gets!
28045
- return comp
28046
- .trim()
28047
- .replace(re[t.STAR], '')
28048
- };
28049
-
28050
- const replaceGTE0 = (comp, options) => {
28051
- debug('replaceGTE0', comp, options);
28052
- return comp
28053
- .trim()
28054
- .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')
28055
- };
28056
-
28057
- // This function is passed to string.replace(re[t.HYPHENRANGE])
28058
- // M, m, patch, prerelease, build
28059
- // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
28060
- // 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
28061
- // 1.2 - 3.4 => >=1.2.0 <3.5.0-0
28062
- // TODO build?
28063
- const hyphenReplace = incPr => ($0,
28064
- from, fM, fm, fp, fpr, fb,
28065
- to, tM, tm, tp, tpr) => {
28066
- if (isX(fM)) {
28067
- from = '';
28068
- } else if (isX(fm)) {
28069
- from = `>=${fM}.0.0${incPr ? '-0' : ''}`;
28070
- } else if (isX(fp)) {
28071
- from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`;
28072
- } else if (fpr) {
28073
- from = `>=${from}`;
28074
- } else {
28075
- from = `>=${from}${incPr ? '-0' : ''}`;
28076
- }
28077
-
28078
- if (isX(tM)) {
28079
- to = '';
28080
- } else if (isX(tm)) {
28081
- to = `<${+tM + 1}.0.0-0`;
28082
- } else if (isX(tp)) {
28083
- to = `<${tM}.${+tm + 1}.0-0`;
28084
- } else if (tpr) {
28085
- to = `<=${tM}.${tm}.${tp}-${tpr}`;
28086
- } else if (incPr) {
28087
- to = `<${tM}.${tm}.${+tp + 1}-0`;
28088
- } else {
28089
- to = `<=${to}`;
28090
- }
28091
-
28092
- return `${from} ${to}`.trim()
28093
- };
28094
-
28095
- const testSet = (set, version, options) => {
28096
- for (let i = 0; i < set.length; i++) {
28097
- if (!set[i].test(version)) {
28098
- return false
28099
- }
28100
- }
28101
-
28102
- if (version.prerelease.length && !options.includePrerelease) {
28103
- // Find the set of versions that are allowed to have prereleases
28104
- // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
28105
- // That should allow `1.2.3-pr.2` to pass.
28106
- // However, `1.2.4-alpha.notready` should NOT be allowed,
28107
- // even though it's within the range set by the comparators.
28108
- for (let i = 0; i < set.length; i++) {
28109
- debug(set[i].semver);
28110
- if (set[i].semver === Comparator.ANY) {
28111
- continue
28112
- }
28113
-
28114
- if (set[i].semver.prerelease.length > 0) {
28115
- const allowed = set[i].semver;
28116
- if (allowed.major === version.major &&
28117
- allowed.minor === version.minor &&
28118
- allowed.patch === version.patch) {
28119
- return true
28120
- }
28121
- }
28122
- }
28123
-
28124
- // Version has a -pre, but it's not one of the ones we like.
28125
- return false
28126
- }
28127
-
28128
- return true
28129
- };
28130
- return range;
28131
- }
28132
-
28133
- var comparator;
28134
- var hasRequiredComparator;
28135
-
28136
- function requireComparator () {
28137
- if (hasRequiredComparator) return comparator;
28138
- hasRequiredComparator = 1;
28139
-
28140
- const ANY = Symbol('SemVer ANY');
28141
- // hoisted class for cyclic dependency
28142
- class Comparator {
28143
- static get ANY () {
28144
- return ANY
28145
- }
28146
-
28147
- constructor (comp, options) {
28148
- options = parseOptions(options);
28149
-
28150
- if (comp instanceof Comparator) {
28151
- if (comp.loose === !!options.loose) {
28152
- return comp
28153
- } else {
28154
- comp = comp.value;
28155
- }
28156
- }
28157
-
28158
- comp = comp.trim().split(/\s+/).join(' ');
28159
- debug('comparator', comp, options);
28160
- this.options = options;
28161
- this.loose = !!options.loose;
28162
- this.parse(comp);
28163
-
28164
- if (this.semver === ANY) {
28165
- this.value = '';
28166
- } else {
28167
- this.value = this.operator + this.semver.version;
28168
- }
28169
-
28170
- debug('comp', this);
28171
- }
28172
-
28173
- parse (comp) {
28174
- const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
28175
- const m = comp.match(r);
28176
-
28177
- if (!m) {
28178
- throw new TypeError(`Invalid comparator: ${comp}`)
28179
- }
28180
-
28181
- this.operator = m[1] !== undefined ? m[1] : '';
28182
- if (this.operator === '=') {
28183
- this.operator = '';
28184
- }
28185
-
28186
- // if it literally is just '>' or '' then allow anything.
28187
- if (!m[2]) {
28188
- this.semver = ANY;
28189
- } else {
28190
- this.semver = new SemVer(m[2], this.options.loose);
28191
- }
28192
- }
28193
-
28194
- toString () {
28195
- return this.value
28196
- }
28197
-
28198
- test (version) {
28199
- debug('Comparator.test', version, this.options.loose);
28200
-
28201
- if (this.semver === ANY || version === ANY) {
28202
- return true
28203
- }
28204
-
28205
- if (typeof version === 'string') {
28206
- try {
28207
- version = new SemVer(version, this.options);
28208
- } catch (er) {
28209
- return false
28210
- }
28211
- }
28212
-
28213
- return cmp(version, this.operator, this.semver, this.options)
28214
- }
28215
-
28216
- intersects (comp, options) {
28217
- if (!(comp instanceof Comparator)) {
28218
- throw new TypeError('a Comparator is required')
28219
- }
28220
-
28221
- if (this.operator === '') {
28222
- if (this.value === '') {
28223
- return true
28224
- }
28225
- return new Range(comp.value, options).test(this.value)
28226
- } else if (comp.operator === '') {
28227
- if (comp.value === '') {
28228
- return true
28229
- }
28230
- return new Range(this.value, options).test(comp.semver)
28231
- }
28232
-
28233
- options = parseOptions(options);
28234
-
28235
- // Special cases where nothing can possibly be lower
28236
- if (options.includePrerelease &&
28237
- (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {
28238
- return false
28239
- }
28240
- if (!options.includePrerelease &&
28241
- (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {
28242
- return false
28243
- }
28244
-
28245
- // Same direction increasing (> or >=)
28246
- if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {
28247
- return true
28248
- }
28249
- // Same direction decreasing (< or <=)
28250
- if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {
28251
- return true
28252
- }
28253
- // same SemVer and both sides are inclusive (<= or >=)
28254
- if (
28255
- (this.semver.version === comp.semver.version) &&
28256
- this.operator.includes('=') && comp.operator.includes('=')) {
28257
- return true
28258
- }
28259
- // opposite directions less than
28260
- if (cmp(this.semver, '<', comp.semver, options) &&
28261
- this.operator.startsWith('>') && comp.operator.startsWith('<')) {
28262
- return true
28263
- }
28264
- // opposite directions greater than
28265
- if (cmp(this.semver, '>', comp.semver, options) &&
28266
- this.operator.startsWith('<') && comp.operator.startsWith('>')) {
28267
- return true
28268
- }
28269
- return false
28270
- }
28271
- }
28272
-
28273
- comparator = Comparator;
28274
-
28275
- const parseOptions = requireParseOptions();
28276
- const { safeRe: re, t } = requireRe();
28277
- const cmp = requireCmp();
28278
- const debug = requireDebug();
28279
- const SemVer = requireSemver$1();
28280
- const Range = requireRange();
28281
- return comparator;
28282
- }
28283
-
28284
- var satisfies_1;
28285
- var hasRequiredSatisfies;
28286
-
28287
- function requireSatisfies () {
28288
- if (hasRequiredSatisfies) return satisfies_1;
28289
- hasRequiredSatisfies = 1;
28290
-
28291
- const Range = requireRange();
28292
- const satisfies = (version, range, options) => {
28293
- try {
28294
- range = new Range(range, options);
28295
- } catch (er) {
28296
- return false
28297
- }
28298
- return range.test(version)
28299
- };
28300
- satisfies_1 = satisfies;
28301
- return satisfies_1;
28302
- }
28303
-
28304
- var toComparators_1;
28305
- var hasRequiredToComparators;
28306
-
28307
- function requireToComparators () {
28308
- if (hasRequiredToComparators) return toComparators_1;
28309
- hasRequiredToComparators = 1;
28310
-
28311
- const Range = requireRange();
28312
-
28313
- // Mostly just for testing and legacy API reasons
28314
- const toComparators = (range, options) =>
28315
- new Range(range, options).set
28316
- .map(comp => comp.map(c => c.value).join(' ').trim().split(' '));
28317
-
28318
- toComparators_1 = toComparators;
28319
- return toComparators_1;
28320
- }
28321
-
28322
- var maxSatisfying_1;
28323
- var hasRequiredMaxSatisfying;
28324
-
28325
- function requireMaxSatisfying () {
28326
- if (hasRequiredMaxSatisfying) return maxSatisfying_1;
28327
- hasRequiredMaxSatisfying = 1;
28328
-
28329
- const SemVer = requireSemver$1();
28330
- const Range = requireRange();
28331
-
28332
- const maxSatisfying = (versions, range, options) => {
28333
- let max = null;
28334
- let maxSV = null;
28335
- let rangeObj = null;
28336
- try {
28337
- rangeObj = new Range(range, options);
28338
- } catch (er) {
28339
- return null
28340
- }
28341
- versions.forEach((v) => {
28342
- if (rangeObj.test(v)) {
28343
- // satisfies(v, range, options)
28344
- if (!max || maxSV.compare(v) === -1) {
28345
- // compare(max, v, true)
28346
- max = v;
28347
- maxSV = new SemVer(max, options);
28348
- }
28349
- }
28350
- });
28351
- return max
28352
- };
28353
- maxSatisfying_1 = maxSatisfying;
28354
- return maxSatisfying_1;
28355
- }
28356
-
28357
- var minSatisfying_1;
28358
- var hasRequiredMinSatisfying;
28359
-
28360
- function requireMinSatisfying () {
28361
- if (hasRequiredMinSatisfying) return minSatisfying_1;
28362
- hasRequiredMinSatisfying = 1;
28363
-
28364
- const SemVer = requireSemver$1();
28365
- const Range = requireRange();
28366
- const minSatisfying = (versions, range, options) => {
28367
- let min = null;
28368
- let minSV = null;
28369
- let rangeObj = null;
28370
- try {
28371
- rangeObj = new Range(range, options);
28372
- } catch (er) {
28373
- return null
28374
- }
28375
- versions.forEach((v) => {
28376
- if (rangeObj.test(v)) {
28377
- // satisfies(v, range, options)
28378
- if (!min || minSV.compare(v) === 1) {
28379
- // compare(min, v, true)
28380
- min = v;
28381
- minSV = new SemVer(min, options);
28382
- }
28383
- }
28384
- });
28385
- return min
28386
- };
28387
- minSatisfying_1 = minSatisfying;
28388
- return minSatisfying_1;
28389
- }
28390
-
28391
- var minVersion_1;
28392
- var hasRequiredMinVersion;
28393
-
28394
- function requireMinVersion () {
28395
- if (hasRequiredMinVersion) return minVersion_1;
28396
- hasRequiredMinVersion = 1;
28397
-
28398
- const SemVer = requireSemver$1();
28399
- const Range = requireRange();
28400
- const gt = requireGt();
28401
-
28402
- const minVersion = (range, loose) => {
28403
- range = new Range(range, loose);
28404
-
28405
- let minver = new SemVer('0.0.0');
28406
- if (range.test(minver)) {
28407
- return minver
28408
- }
28409
-
28410
- minver = new SemVer('0.0.0-0');
28411
- if (range.test(minver)) {
28412
- return minver
28413
- }
28414
-
28415
- minver = null;
28416
- for (let i = 0; i < range.set.length; ++i) {
28417
- const comparators = range.set[i];
28418
-
28419
- let setMin = null;
28420
- comparators.forEach((comparator) => {
28421
- // Clone to avoid manipulating the comparator's semver object.
28422
- const compver = new SemVer(comparator.semver.version);
28423
- switch (comparator.operator) {
28424
- case '>':
28425
- if (compver.prerelease.length === 0) {
28426
- compver.patch++;
28427
- } else {
28428
- compver.prerelease.push(0);
28429
- }
28430
- compver.raw = compver.format();
28431
- /* fallthrough */
28432
- case '':
28433
- case '>=':
28434
- if (!setMin || gt(compver, setMin)) {
28435
- setMin = compver;
28436
- }
28437
- break
28438
- case '<':
28439
- case '<=':
28440
- /* Ignore maximum versions */
28441
- break
28442
- /* istanbul ignore next */
28443
- default:
28444
- throw new Error(`Unexpected operation: ${comparator.operator}`)
28445
- }
28446
- });
28447
- if (setMin && (!minver || gt(minver, setMin))) {
28448
- minver = setMin;
28449
- }
28450
- }
28451
-
28452
- if (minver && range.test(minver)) {
28453
- return minver
28454
- }
28455
-
28456
- return null
28457
- };
28458
- minVersion_1 = minVersion;
28459
- return minVersion_1;
28460
- }
28461
-
28462
- var valid;
28463
- var hasRequiredValid;
28464
-
28465
- function requireValid () {
28466
- if (hasRequiredValid) return valid;
28467
- hasRequiredValid = 1;
28468
-
28469
- const Range = requireRange();
28470
- const validRange = (range, options) => {
28471
- try {
28472
- // Return '*' instead of '' so that truthiness works.
28473
- // This will throw if it's invalid anyway
28474
- return new Range(range, options).range || '*'
28475
- } catch (er) {
28476
- return null
28477
- }
28478
- };
28479
- valid = validRange;
28480
- return valid;
28481
- }
28482
-
28483
- var outside_1;
28484
- var hasRequiredOutside;
28485
-
28486
- function requireOutside () {
28487
- if (hasRequiredOutside) return outside_1;
28488
- hasRequiredOutside = 1;
28489
-
28490
- const SemVer = requireSemver$1();
28491
- const Comparator = requireComparator();
28492
- const { ANY } = Comparator;
28493
- const Range = requireRange();
28494
- const satisfies = requireSatisfies();
28495
- const gt = requireGt();
28496
- const lt = requireLt();
28497
- const lte = requireLte();
28498
- const gte = requireGte();
28499
-
28500
- const outside = (version, range, hilo, options) => {
28501
- version = new SemVer(version, options);
28502
- range = new Range(range, options);
28503
-
28504
- let gtfn, ltefn, ltfn, comp, ecomp;
28505
- switch (hilo) {
28506
- case '>':
28507
- gtfn = gt;
28508
- ltefn = lte;
28509
- ltfn = lt;
28510
- comp = '>';
28511
- ecomp = '>=';
28512
- break
28513
- case '<':
28514
- gtfn = lt;
28515
- ltefn = gte;
28516
- ltfn = gt;
28517
- comp = '<';
28518
- ecomp = '<=';
28519
- break
28520
- default:
28521
- throw new TypeError('Must provide a hilo val of "<" or ">"')
28522
- }
28523
-
28524
- // If it satisfies the range it is not outside
28525
- if (satisfies(version, range, options)) {
28526
- return false
28527
- }
28528
-
28529
- // From now on, variable terms are as if we're in "gtr" mode.
28530
- // but note that everything is flipped for the "ltr" function.
28531
-
28532
- for (let i = 0; i < range.set.length; ++i) {
28533
- const comparators = range.set[i];
28534
-
28535
- let high = null;
28536
- let low = null;
28537
-
28538
- comparators.forEach((comparator) => {
28539
- if (comparator.semver === ANY) {
28540
- comparator = new Comparator('>=0.0.0');
28541
- }
28542
- high = high || comparator;
28543
- low = low || comparator;
28544
- if (gtfn(comparator.semver, high.semver, options)) {
28545
- high = comparator;
28546
- } else if (ltfn(comparator.semver, low.semver, options)) {
28547
- low = comparator;
28548
- }
28549
- });
28550
-
28551
- // If the edge version comparator has a operator then our version
28552
- // isn't outside it
28553
- if (high.operator === comp || high.operator === ecomp) {
28554
- return false
28555
- }
28556
-
28557
- // If the lowest version comparator has an operator and our version
28558
- // is less than it then it isn't higher than the range
28559
- if ((!low.operator || low.operator === comp) &&
28560
- ltefn(version, low.semver)) {
28561
- return false
28562
- } else if (low.operator === ecomp && ltfn(version, low.semver)) {
28563
- return false
28564
- }
28565
- }
28566
- return true
28567
- };
28568
-
28569
- outside_1 = outside;
28570
- return outside_1;
28571
- }
28572
-
28573
- var gtr_1;
28574
- var hasRequiredGtr;
28575
-
28576
- function requireGtr () {
28577
- if (hasRequiredGtr) return gtr_1;
28578
- hasRequiredGtr = 1;
28579
-
28580
- // Determine if version is greater than all the versions possible in the range.
28581
- const outside = requireOutside();
28582
- const gtr = (version, range, options) => outside(version, range, '>', options);
28583
- gtr_1 = gtr;
28584
- return gtr_1;
28585
- }
28586
-
28587
- var ltr_1;
28588
- var hasRequiredLtr;
28589
-
28590
- function requireLtr () {
28591
- if (hasRequiredLtr) return ltr_1;
28592
- hasRequiredLtr = 1;
28593
-
28594
- const outside = requireOutside();
28595
- // Determine if version is less than all the versions possible in the range
28596
- const ltr = (version, range, options) => outside(version, range, '<', options);
28597
- ltr_1 = ltr;
28598
- return ltr_1;
28599
- }
28600
-
28601
- var intersects_1;
28602
- var hasRequiredIntersects;
28603
-
28604
- function requireIntersects () {
28605
- if (hasRequiredIntersects) return intersects_1;
28606
- hasRequiredIntersects = 1;
28607
-
28608
- const Range = requireRange();
28609
- const intersects = (r1, r2, options) => {
28610
- r1 = new Range(r1, options);
28611
- r2 = new Range(r2, options);
28612
- return r1.intersects(r2, options)
28613
- };
28614
- intersects_1 = intersects;
28615
- return intersects_1;
28616
- }
28617
-
28618
- var simplify;
28619
- var hasRequiredSimplify;
28620
-
28621
- function requireSimplify () {
28622
- if (hasRequiredSimplify) return simplify;
28623
- hasRequiredSimplify = 1;
28624
-
28625
- // given a set of versions and a range, create a "simplified" range
28626
- // that includes the same versions that the original range does
28627
- // If the original range is shorter than the simplified one, return that.
28628
- const satisfies = requireSatisfies();
28629
- const compare = requireCompare();
28630
- simplify = (versions, range, options) => {
28631
- const set = [];
28632
- let first = null;
28633
- let prev = null;
28634
- const v = versions.sort((a, b) => compare(a, b, options));
28635
- for (const version of v) {
28636
- const included = satisfies(version, range, options);
28637
- if (included) {
28638
- prev = version;
28639
- if (!first) {
28640
- first = version;
28641
- }
28642
- } else {
28643
- if (prev) {
28644
- set.push([first, prev]);
28645
- }
28646
- prev = null;
28647
- first = null;
28648
- }
28649
- }
28650
- if (first) {
28651
- set.push([first, null]);
28652
- }
28653
-
28654
- const ranges = [];
28655
- for (const [min, max] of set) {
28656
- if (min === max) {
28657
- ranges.push(min);
28658
- } else if (!max && min === v[0]) {
28659
- ranges.push('*');
28660
- } else if (!max) {
28661
- ranges.push(`>=${min}`);
28662
- } else if (min === v[0]) {
28663
- ranges.push(`<=${max}`);
28664
- } else {
28665
- ranges.push(`${min} - ${max}`);
28666
- }
28667
- }
28668
- const simplified = ranges.join(' || ');
28669
- const original = typeof range.raw === 'string' ? range.raw : String(range);
28670
- return simplified.length < original.length ? simplified : range
28671
- };
28672
- return simplify;
28673
- }
28674
-
28675
- var subset_1;
28676
- var hasRequiredSubset;
28677
-
28678
- function requireSubset () {
28679
- if (hasRequiredSubset) return subset_1;
28680
- hasRequiredSubset = 1;
28681
-
28682
- const Range = requireRange();
28683
- const Comparator = requireComparator();
28684
- const { ANY } = Comparator;
28685
- const satisfies = requireSatisfies();
28686
- const compare = requireCompare();
28687
-
28688
- // Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:
28689
- // - Every simple range `r1, r2, ...` is a null set, OR
28690
- // - Every simple range `r1, r2, ...` which is not a null set is a subset of
28691
- // some `R1, R2, ...`
28692
- //
28693
- // Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:
28694
- // - If c is only the ANY comparator
28695
- // - If C is only the ANY comparator, return true
28696
- // - Else if in prerelease mode, return false
28697
- // - else replace c with `[>=0.0.0]`
28698
- // - If C is only the ANY comparator
28699
- // - if in prerelease mode, return true
28700
- // - else replace C with `[>=0.0.0]`
28701
- // - Let EQ be the set of = comparators in c
28702
- // - If EQ is more than one, return true (null set)
28703
- // - Let GT be the highest > or >= comparator in c
28704
- // - Let LT be the lowest < or <= comparator in c
28705
- // - If GT and LT, and GT.semver > LT.semver, return true (null set)
28706
- // - If any C is a = range, and GT or LT are set, return false
28707
- // - If EQ
28708
- // - If GT, and EQ does not satisfy GT, return true (null set)
28709
- // - If LT, and EQ does not satisfy LT, return true (null set)
28710
- // - If EQ satisfies every C, return true
28711
- // - Else return false
28712
- // - If GT
28713
- // - If GT.semver is lower than any > or >= comp in C, return false
28714
- // - If GT is >=, and GT.semver does not satisfy every C, return false
28715
- // - If GT.semver has a prerelease, and not in prerelease mode
28716
- // - If no C has a prerelease and the GT.semver tuple, return false
28717
- // - If LT
28718
- // - If LT.semver is greater than any < or <= comp in C, return false
28719
- // - If LT is <=, and LT.semver does not satisfy every C, return false
28720
- // - If LT.semver has a prerelease, and not in prerelease mode
28721
- // - If no C has a prerelease and the LT.semver tuple, return false
28722
- // - Else return true
28723
-
28724
- const subset = (sub, dom, options = {}) => {
28725
- if (sub === dom) {
28726
- return true
28727
- }
28728
-
28729
- sub = new Range(sub, options);
28730
- dom = new Range(dom, options);
28731
- let sawNonNull = false;
28732
-
28733
- OUTER: for (const simpleSub of sub.set) {
28734
- for (const simpleDom of dom.set) {
28735
- const isSub = simpleSubset(simpleSub, simpleDom, options);
28736
- sawNonNull = sawNonNull || isSub !== null;
28737
- if (isSub) {
28738
- continue OUTER
28739
- }
28740
- }
28741
- // the null set is a subset of everything, but null simple ranges in
28742
- // a complex range should be ignored. so if we saw a non-null range,
28743
- // then we know this isn't a subset, but if EVERY simple range was null,
28744
- // then it is a subset.
28745
- if (sawNonNull) {
28746
- return false
28747
- }
28748
- }
28749
- return true
28750
- };
28751
-
28752
- const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')];
28753
- const minimumVersion = [new Comparator('>=0.0.0')];
28754
-
28755
- const simpleSubset = (sub, dom, options) => {
28756
- if (sub === dom) {
28757
- return true
28758
- }
28759
-
28760
- if (sub.length === 1 && sub[0].semver === ANY) {
28761
- if (dom.length === 1 && dom[0].semver === ANY) {
28762
- return true
28763
- } else if (options.includePrerelease) {
28764
- sub = minimumVersionWithPreRelease;
28765
- } else {
28766
- sub = minimumVersion;
28767
- }
28768
- }
28769
-
28770
- if (dom.length === 1 && dom[0].semver === ANY) {
28771
- if (options.includePrerelease) {
28772
- return true
28773
- } else {
28774
- dom = minimumVersion;
28775
- }
28776
- }
28777
-
28778
- const eqSet = new Set();
28779
- let gt, lt;
28780
- for (const c of sub) {
28781
- if (c.operator === '>' || c.operator === '>=') {
28782
- gt = higherGT(gt, c, options);
28783
- } else if (c.operator === '<' || c.operator === '<=') {
28784
- lt = lowerLT(lt, c, options);
28785
- } else {
28786
- eqSet.add(c.semver);
28787
- }
28788
- }
28789
-
28790
- if (eqSet.size > 1) {
28791
- return null
28792
- }
28793
-
28794
- let gtltComp;
28795
- if (gt && lt) {
28796
- gtltComp = compare(gt.semver, lt.semver, options);
28797
- if (gtltComp > 0) {
28798
- return null
28799
- } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {
28800
- return null
28801
- }
28802
- }
28803
-
28804
- // will iterate one or zero times
28805
- for (const eq of eqSet) {
28806
- if (gt && !satisfies(eq, String(gt), options)) {
28807
- return null
28808
- }
28809
-
28810
- if (lt && !satisfies(eq, String(lt), options)) {
28811
- return null
28812
- }
28813
-
28814
- for (const c of dom) {
28815
- if (!satisfies(eq, String(c), options)) {
28816
- return false
28817
- }
28818
- }
28819
-
28820
- return true
28821
- }
28822
-
28823
- let higher, lower;
28824
- let hasDomLT, hasDomGT;
28825
- // if the subset has a prerelease, we need a comparator in the superset
28826
- // with the same tuple and a prerelease, or it's not a subset
28827
- let needDomLTPre = lt &&
28828
- !options.includePrerelease &&
28829
- lt.semver.prerelease.length ? lt.semver : false;
28830
- let needDomGTPre = gt &&
28831
- !options.includePrerelease &&
28832
- gt.semver.prerelease.length ? gt.semver : false;
28833
- // exception: <1.2.3-0 is the same as <1.2.3
28834
- if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&
28835
- lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {
28836
- needDomLTPre = false;
28837
- }
28838
-
28839
- for (const c of dom) {
28840
- hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=';
28841
- hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=';
28842
- if (gt) {
28843
- if (needDomGTPre) {
28844
- if (c.semver.prerelease && c.semver.prerelease.length &&
28845
- c.semver.major === needDomGTPre.major &&
28846
- c.semver.minor === needDomGTPre.minor &&
28847
- c.semver.patch === needDomGTPre.patch) {
28848
- needDomGTPre = false;
28849
- }
28850
- }
28851
- if (c.operator === '>' || c.operator === '>=') {
28852
- higher = higherGT(gt, c, options);
28853
- if (higher === c && higher !== gt) {
28854
- return false
28855
- }
28856
- } else if (gt.operator === '>=' && !c.test(gt.semver)) {
28857
- return false
28858
- }
28859
- }
28860
- if (lt) {
28861
- if (needDomLTPre) {
28862
- if (c.semver.prerelease && c.semver.prerelease.length &&
28863
- c.semver.major === needDomLTPre.major &&
28864
- c.semver.minor === needDomLTPre.minor &&
28865
- c.semver.patch === needDomLTPre.patch) {
28866
- needDomLTPre = false;
28867
- }
28868
- }
28869
- if (c.operator === '<' || c.operator === '<=') {
28870
- lower = lowerLT(lt, c, options);
28871
- if (lower === c && lower !== lt) {
28872
- return false
28873
- }
28874
- } else if (lt.operator === '<=' && !c.test(lt.semver)) {
28875
- return false
28876
- }
28877
- }
28878
- if (!c.operator && (lt || gt) && gtltComp !== 0) {
28879
- return false
28880
- }
28881
- }
28882
-
28883
- // if there was a < or >, and nothing in the dom, then must be false
28884
- // UNLESS it was limited by another range in the other direction.
28885
- // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0
28886
- if (gt && hasDomLT && !lt && gtltComp !== 0) {
28887
- return false
28888
- }
28889
-
28890
- if (lt && hasDomGT && !gt && gtltComp !== 0) {
28891
- return false
28892
- }
28893
-
28894
- // we needed a prerelease range in a specific tuple, but didn't get one
28895
- // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,
28896
- // because it includes prereleases in the 1.2.3 tuple
28897
- if (needDomGTPre || needDomLTPre) {
28898
- return false
28899
- }
28900
-
28901
- return true
28902
- };
28903
-
28904
- // >=1.2.3 is lower than >1.2.3
28905
- const higherGT = (a, b, options) => {
28906
- if (!a) {
28907
- return b
28908
- }
28909
- const comp = compare(a.semver, b.semver, options);
28910
- return comp > 0 ? a
28911
- : comp < 0 ? b
28912
- : b.operator === '>' && a.operator === '>=' ? b
28913
- : a
28914
- };
28915
-
28916
- // <=1.2.3 is higher than <1.2.3
28917
- const lowerLT = (a, b, options) => {
28918
- if (!a) {
28919
- return b
28920
- }
28921
- const comp = compare(a.semver, b.semver, options);
28922
- return comp < 0 ? a
28923
- : comp > 0 ? b
28924
- : b.operator === '<' && a.operator === '<=' ? b
28925
- : a
28926
- };
28927
-
28928
- subset_1 = subset;
28929
- return subset_1;
28930
- }
28931
-
28932
- var semver;
28933
- var hasRequiredSemver;
28934
-
28935
- function requireSemver () {
28936
- if (hasRequiredSemver) return semver;
28937
- hasRequiredSemver = 1;
28938
-
28939
- // just pre-load all the stuff that index.js lazily exports
28940
- const internalRe = requireRe();
28941
- const constants = requireConstants();
28942
- const SemVer = requireSemver$1();
28943
- const identifiers = requireIdentifiers();
28944
- const parse = requireParse();
28945
- const valid = requireValid$1();
28946
- const clean = requireClean();
28947
- const inc = requireInc();
28948
- const diff = requireDiff();
28949
- const major = requireMajor();
28950
- const minor = requireMinor();
28951
- const patch = requirePatch();
28952
- const prerelease = requirePrerelease();
28953
- const compare = requireCompare();
28954
- const rcompare = requireRcompare();
28955
- const compareLoose = requireCompareLoose();
28956
- const compareBuild = requireCompareBuild();
28957
- const sort = requireSort();
28958
- const rsort = requireRsort();
28959
- const gt = requireGt();
28960
- const lt = requireLt();
28961
- const eq = requireEq();
28962
- const neq = requireNeq();
28963
- const gte = requireGte();
28964
- const lte = requireLte();
28965
- const cmp = requireCmp();
28966
- const coerce = requireCoerce();
28967
- const truncate = requireTruncate();
28968
- const Comparator = requireComparator();
28969
- const Range = requireRange();
28970
- const satisfies = requireSatisfies();
28971
- const toComparators = requireToComparators();
28972
- const maxSatisfying = requireMaxSatisfying();
28973
- const minSatisfying = requireMinSatisfying();
28974
- const minVersion = requireMinVersion();
28975
- const validRange = requireValid();
28976
- const outside = requireOutside();
28977
- const gtr = requireGtr();
28978
- const ltr = requireLtr();
28979
- const intersects = requireIntersects();
28980
- const simplifyRange = requireSimplify();
28981
- const subset = requireSubset();
28982
- semver = {
28983
- parse,
28984
- valid,
28985
- clean,
28986
- inc,
28987
- diff,
28988
- major,
28989
- minor,
28990
- patch,
28991
- prerelease,
28992
- compare,
28993
- rcompare,
28994
- compareLoose,
28995
- compareBuild,
28996
- sort,
28997
- rsort,
28998
- gt,
28999
- lt,
29000
- eq,
29001
- neq,
29002
- gte,
29003
- lte,
29004
- cmp,
29005
- coerce,
29006
- truncate,
29007
- Comparator,
29008
- Range,
29009
- satisfies,
29010
- toComparators,
29011
- maxSatisfying,
29012
- minSatisfying,
29013
- minVersion,
29014
- validRange,
29015
- outside,
29016
- gtr,
29017
- ltr,
29018
- intersects,
29019
- simplifyRange,
29020
- subset,
29021
- SemVer,
29022
- re: internalRe.re,
29023
- src: internalRe.src,
29024
- tokens: internalRe.t,
29025
- SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
29026
- RELEASE_TYPES: constants.RELEASE_TYPES,
29027
- compareIdentifiers: identifiers.compareIdentifiers,
29028
- rcompareIdentifiers: identifiers.rcompareIdentifiers,
29029
- };
29030
- return semver;
29031
- }
29032
-
29033
- var semverExports = requireSemver();
29034
-
29035
26199
  const DELAY_INTERVAL_MS = 10;
29036
26200
  const MAX_NEXT_REQUEST_DELAY = 1e4 / DELAY_INTERVAL_MS;
29037
26201
  function getRequestLooper(req, options) {
@@ -29194,7 +26358,7 @@ class DatasourceWithAsyncBackend extends runtime.DataSourceWithBackend {
29194
26358
  };
29195
26359
  const cachingDisabled = !runtime.config.featureToggles.awsAsyncQueryCaching;
29196
26360
  if (cachingDisabled && isRunning(status)) {
29197
- const requestSkipQueryCacheUnsupported = semverExports.lt(runtime.config.buildInfo.version, "10.2.3");
26361
+ const requestSkipQueryCacheUnsupported = semver.lt(runtime.config.buildInfo.version, "10.2.3");
29198
26362
  if (requestSkipQueryCacheUnsupported) {
29199
26363
  return runtime.getBackendSrv().fetch({
29200
26364
  method: "POST",
@@ -29400,7 +26564,6 @@ exports.isValidCelExpression = isValidCelExpression;
29400
26564
  exports.parseDependsOn = parseDependsOn;
29401
26565
  exports.resolveActiveOverride = resolveActiveOverride;
29402
26566
  exports.resolveGroups = resolveGroups;
29403
- exports.resolvePluginName = resolvePluginName;
29404
26567
  exports.resolveRequiredFieldsGroup = resolveRequiredFieldsGroup;
29405
26568
  exports.toOption = toOption;
29406
26569
  exports.useDatasourceSchema = useDatasourceSchema;