@blogmcp/sdk 0.6.0 → 0.7.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 (208) hide show
  1. package/dist/consultations/channel-text.d.ts +118 -0
  2. package/dist/consultations/channel-text.js +40 -0
  3. package/dist/consultations/index.d.ts +28 -0
  4. package/dist/consultations/index.js +60 -0
  5. package/dist/consultations/messages.cs.d.ts +149 -0
  6. package/dist/consultations/messages.cs.js +143 -0
  7. package/dist/consultations/messages.d.ts +34 -0
  8. package/dist/consultations/messages.en.d.ts +143 -0
  9. package/dist/consultations/messages.en.js +141 -0
  10. package/dist/consultations/messages.js +48 -0
  11. package/dist/consultations/outcome.d.ts +121 -0
  12. package/dist/consultations/outcome.js +161 -0
  13. package/dist/consultations/public-config.d.ts +71 -0
  14. package/dist/consultations/public-config.js +104 -0
  15. package/dist/consultations/reader.d.ts +83 -0
  16. package/dist/consultations/reader.js +128 -0
  17. package/dist/consultations/routes.d.ts +214 -0
  18. package/dist/consultations/routes.js +149 -0
  19. package/dist/consultations/server/client-ip.d.ts +50 -0
  20. package/dist/consultations/server/client-ip.js +44 -0
  21. package/dist/consultations/server/contact.d.ts +23 -0
  22. package/dist/consultations/server/contact.js +138 -0
  23. package/dist/consultations/server/context.d.ts +246 -0
  24. package/dist/consultations/server/context.js +152 -0
  25. package/dist/consultations/server/cookie.d.ts +60 -0
  26. package/dist/consultations/server/cookie.js +57 -0
  27. package/dist/consultations/server/env.d.ts +20 -0
  28. package/dist/consultations/server/env.js +35 -0
  29. package/dist/consultations/server/http.d.ts +59 -0
  30. package/dist/consultations/server/http.js +64 -0
  31. package/dist/consultations/server/index.d.ts +37 -0
  32. package/dist/consultations/server/index.js +19 -0
  33. package/dist/consultations/server/origin.d.ts +39 -0
  34. package/dist/consultations/server/origin.js +31 -0
  35. package/dist/consultations/server/server.d.ts +106 -0
  36. package/dist/consultations/server/server.js +122 -0
  37. package/dist/consultations/server/session.d.ts +38 -0
  38. package/dist/consultations/server/session.js +210 -0
  39. package/dist/consultations/server/transport.d.ts +69 -0
  40. package/dist/consultations/server/transport.js +117 -0
  41. package/dist/consultations/server/turnstile.d.ts +44 -0
  42. package/dist/consultations/server/turnstile.js +31 -0
  43. package/dist/consultations/site.d.ts +100 -0
  44. package/dist/consultations/site.js +60 -0
  45. package/dist/consultations/submit-new.d.ts +103 -0
  46. package/dist/consultations/submit-new.js +72 -0
  47. package/dist/core/auth.d.ts +2 -2
  48. package/dist/core/client.d.ts +25 -4
  49. package/dist/core/client.js +35 -30
  50. package/dist/core/consultation-adapter.d.ts +2 -2
  51. package/dist/core/consultations.d.ts +1 -1
  52. package/dist/core/errors.d.ts +1 -1
  53. package/dist/core/errors.js +16 -15
  54. package/dist/core/index.d.ts +31 -31
  55. package/dist/core/index.js +35 -34
  56. package/dist/core/markdown.d.ts +1 -1
  57. package/dist/core/queries.d.ts +4 -1
  58. package/dist/core/queries.js +131 -86
  59. package/dist/core/review/format.d.ts +1 -1
  60. package/dist/core/review/index.d.ts +2 -2
  61. package/dist/core/seo.d.ts +1 -1
  62. package/dist/core/translations/cs.json.js +1 -1
  63. package/dist/core/translations/en.json.js +1 -1
  64. package/dist/core/types.d.ts +50 -1
  65. package/dist/core/view-model.d.ts +12 -2
  66. package/dist/core/view-model.js +40 -34
  67. package/dist/{packages/tripmap-core/node_modules → node_modules}/pmtiles/dist/esm/index.js +1 -1
  68. package/dist/nuxt/composables/useAsyncKb.d.ts +4 -4
  69. package/dist/nuxt/index.d.ts +1 -1
  70. package/dist/packages/mdx-render-vue/dist/composables/useGallery.js +12 -11
  71. package/dist/packages/mdx-render-vue/dist/composables/useTripMap.js +16 -16
  72. package/dist/packages/mdx-render-vue/dist/edit/TripMapEdit.vue.js +1 -1
  73. package/dist/packages/mdx-render-vue/dist/registry.js +21 -22
  74. package/dist/packages/mdx-render-vue/dist/render/alert/Alert.vue2.js +1 -1
  75. package/dist/packages/mdx-render-vue/dist/render/badge/Badge.vue2.js +1 -1
  76. package/dist/packages/mdx-render-vue/dist/render/button/Button.vue2.js +1 -1
  77. package/dist/packages/mdx-render-vue/dist/render/callout/CalloutDefault.vue.js +1 -1
  78. package/dist/packages/mdx-render-vue/dist/render/callout/CalloutMinimal.vue.js +1 -1
  79. package/dist/packages/mdx-render-vue/dist/render/tripmap/TripMapDefault.vue.js +2 -2
  80. package/dist/packages/tripmap-core/dist/engine.js +3 -3
  81. package/dist/packages/tripmap-core/dist/generated/maplibre-worker.bundle.js +1 -1
  82. package/dist/react/KbMdxContent.d.ts +1 -1
  83. package/dist/react/KbMdxContent.js +7 -8
  84. package/dist/react/context.d.ts +4 -4
  85. package/dist/react/hooks/useImageRenderer.d.ts +1 -1
  86. package/dist/react/hooks/useKbClient.d.ts +1 -1
  87. package/dist/react/hooks/useKbContext.d.ts +1 -1
  88. package/dist/react/hooks/useKbI18n.d.ts +1 -1
  89. package/dist/react/hooks/useKbLanguage.d.ts +1 -1
  90. package/dist/react/hooks/useKbSearch.d.ts +1 -1
  91. package/dist/react/hooks/useMdxContent.d.ts +1 -1
  92. package/dist/react/index.d.ts +15 -15
  93. package/dist/react/provider.d.ts +2 -2
  94. package/dist/react/server/index.d.ts +2 -2
  95. package/dist/vue/components/KbAccessGate.vue.d.ts +4 -1
  96. package/dist/vue/components/KbAccessGate.vue.js +42 -32
  97. package/dist/vue/components/KbArticleCard.vue.d.ts +3 -1
  98. package/dist/vue/components/KbArticleCard.vue.js +67 -39
  99. package/dist/vue/components/KbMdxContent.vue2.js +6 -7
  100. package/dist/vue/composables/useArticles.d.ts +1 -1
  101. package/dist/vue/composables/useImageRenderer.d.ts +1 -1
  102. package/dist/vue/composables/useKbAuth.d.ts +1 -1
  103. package/dist/vue/composables/useKbClient.d.ts +1 -1
  104. package/dist/vue/composables/useKbComments.d.ts +1 -1
  105. package/dist/vue/composables/useKbI18n.d.ts +1 -1
  106. package/dist/vue/composables/useKbLanguage.d.ts +1 -1
  107. package/dist/vue/composables/useNavigation.d.ts +1 -1
  108. package/dist/vue/composables/useSearch.d.ts +1 -1
  109. package/dist/vue/composables/useTags.d.ts +1 -1
  110. package/dist/vue/index.d.ts +19 -19
  111. package/dist/vue/plugin.d.ts +4 -4
  112. package/package.json +15 -5
  113. package/src/consultations/channel-text.ts +168 -0
  114. package/src/consultations/index.ts +87 -0
  115. package/src/consultations/messages.cs.ts +175 -0
  116. package/src/consultations/messages.en.ts +171 -0
  117. package/src/consultations/messages.ts +91 -0
  118. package/src/consultations/outcome.ts +278 -0
  119. package/src/consultations/public-config.ts +246 -0
  120. package/src/consultations/reader.ts +281 -0
  121. package/src/consultations/routes.ts +341 -0
  122. package/src/consultations/server/client-ip.ts +106 -0
  123. package/src/consultations/server/contact.ts +267 -0
  124. package/src/consultations/server/context.ts +403 -0
  125. package/src/consultations/server/cookie.ts +129 -0
  126. package/src/consultations/server/env.ts +66 -0
  127. package/src/consultations/server/http.ts +148 -0
  128. package/src/consultations/server/index.ts +55 -0
  129. package/src/consultations/server/origin.ts +71 -0
  130. package/src/consultations/server/server.ts +322 -0
  131. package/src/consultations/server/session.ts +414 -0
  132. package/src/consultations/server/transport.ts +196 -0
  133. package/src/consultations/server/turnstile.ts +98 -0
  134. package/src/consultations/site.ts +183 -0
  135. package/src/consultations/submit-new.ts +266 -0
  136. package/src/core/auth.ts +1 -1
  137. package/src/core/client.ts +32 -1
  138. package/src/core/errors.ts +5 -2
  139. package/src/core/index.ts +3 -0
  140. package/src/core/queries.ts +56 -0
  141. package/src/core/translations/cs.json +2 -1
  142. package/src/core/translations/en.json +2 -1
  143. package/src/core/types.ts +51 -0
  144. package/src/core/view-model.ts +18 -0
  145. package/src/vue/components/KbAccessGate.vue +14 -1
  146. package/src/vue/components/KbArticleCard.vue +25 -0
  147. package/dist/_virtual/constants.js +0 -4
  148. package/dist/_virtual/index.js +0 -2
  149. package/dist/_virtual/index2.js +0 -4
  150. package/dist/_virtual/index3.js +0 -2
  151. package/dist/_virtual/re.js +0 -4
  152. package/dist/node_modules/@braintree/sanitize-url/dist/constants.js +0 -8
  153. package/dist/node_modules/@braintree/sanitize-url/dist/index.js +0 -60
  154. package/dist/node_modules/dompurify/dist/purify.es.js +0 -662
  155. package/dist/node_modules/semver/classes/comparator.js +0 -56
  156. package/dist/node_modules/semver/classes/range.js +0 -148
  157. package/dist/node_modules/semver/classes/semver.js +0 -169
  158. package/dist/node_modules/semver/functions/clean.js +0 -14
  159. package/dist/node_modules/semver/functions/cmp.js +0 -39
  160. package/dist/node_modules/semver/functions/coerce.js +0 -33
  161. package/dist/node_modules/semver/functions/compare-build.js +0 -14
  162. package/dist/node_modules/semver/functions/compare-loose.js +0 -11
  163. package/dist/node_modules/semver/functions/compare.js +0 -11
  164. package/dist/node_modules/semver/functions/diff.js +0 -24
  165. package/dist/node_modules/semver/functions/eq.js +0 -11
  166. package/dist/node_modules/semver/functions/gt.js +0 -11
  167. package/dist/node_modules/semver/functions/gte.js +0 -11
  168. package/dist/node_modules/semver/functions/inc.js +0 -21
  169. package/dist/node_modules/semver/functions/lt.js +0 -11
  170. package/dist/node_modules/semver/functions/lte.js +0 -11
  171. package/dist/node_modules/semver/functions/major.js +0 -11
  172. package/dist/node_modules/semver/functions/minor.js +0 -11
  173. package/dist/node_modules/semver/functions/neq.js +0 -11
  174. package/dist/node_modules/semver/functions/parse.js +0 -21
  175. package/dist/node_modules/semver/functions/patch.js +0 -11
  176. package/dist/node_modules/semver/functions/prerelease.js +0 -14
  177. package/dist/node_modules/semver/functions/rcompare.js +0 -11
  178. package/dist/node_modules/semver/functions/rsort.js +0 -11
  179. package/dist/node_modules/semver/functions/satisfies.js +0 -18
  180. package/dist/node_modules/semver/functions/sort.js +0 -11
  181. package/dist/node_modules/semver/functions/valid.js +0 -14
  182. package/dist/node_modules/semver/index.js +0 -97
  183. package/dist/node_modules/semver/internal/constants.js +0 -28
  184. package/dist/node_modules/semver/internal/debug.js +0 -8
  185. package/dist/node_modules/semver/internal/identifiers.js +0 -18
  186. package/dist/node_modules/semver/internal/lrucache.js +0 -32
  187. package/dist/node_modules/semver/internal/parse-options.js +0 -10
  188. package/dist/node_modules/semver/internal/re.js +0 -32
  189. package/dist/node_modules/semver/ranges/gtr.js +0 -11
  190. package/dist/node_modules/semver/ranges/intersects.js +0 -11
  191. package/dist/node_modules/semver/ranges/ltr.js +0 -11
  192. package/dist/node_modules/semver/ranges/max-satisfying.js +0 -22
  193. package/dist/node_modules/semver/ranges/min-satisfying.js +0 -22
  194. package/dist/node_modules/semver/ranges/min-version.js +0 -42
  195. package/dist/node_modules/semver/ranges/outside.js +0 -44
  196. package/dist/node_modules/semver/ranges/simplify.js +0 -24
  197. package/dist/node_modules/semver/ranges/subset.js +0 -94
  198. package/dist/node_modules/semver/ranges/to-comparators.js +0 -11
  199. package/dist/node_modules/semver/ranges/valid.js +0 -17
  200. package/dist/packages/mdx-schema/dist/composables/useMdxParsing.js +0 -389
  201. package/dist/packages/mdx-schema/dist/metadata/index.js +0 -526
  202. package/dist/packages/mdx-schema/dist/prepareProps.js +0 -46
  203. package/dist/packages/mdx-schema/dist/styles/index.js +0 -147
  204. package/dist/packages/mdx-schema/dist/tripmap.js +0 -101
  205. package/dist/packages/mdx-schema/dist/types/index.js +0 -26
  206. package/dist/packages/sanitize/dist/html.js +0 -89
  207. /package/dist/{packages/tripmap-core/node_modules → node_modules}/maplibre-gl/dist/maplibre-gl-shared.js +0 -0
  208. /package/dist/{packages/tripmap-core/node_modules → node_modules}/maplibre-gl/dist/maplibre-gl.js +0 -0
@@ -1,56 +0,0 @@
1
- import { __require as q } from "../internal/parse-options.js";
2
- import { __require as p } from "../internal/re.js";
3
- import { __require as _ } from "../functions/cmp.js";
4
- import { __require as d } from "../internal/debug.js";
5
- import { __require as W } from "./semver.js";
6
- import { __require as R } from "./range.js";
7
- var o, m;
8
- function S() {
9
- if (m) return o;
10
- m = 1;
11
- const t = /* @__PURE__ */ Symbol("SemVer ANY");
12
- class i {
13
- static get ANY() {
14
- return t;
15
- }
16
- constructor(r, e) {
17
- if (e = h(e), r instanceof i) {
18
- if (r.loose === !!e.loose)
19
- return r;
20
- r = r.value;
21
- }
22
- r = r.trim().split(/\s+/).join(" "), u("comparator", r, e), this.options = e, this.loose = !!e.loose, this.parse(r), this.semver === t ? this.value = "" : this.value = this.operator + this.semver.version, u("comp", this);
23
- }
24
- parse(r) {
25
- const e = this.options.loose ? n[l.COMPARATORLOOSE] : n[l.COMPARATOR], s = r.match(e);
26
- if (!s)
27
- throw new TypeError(`Invalid comparator: ${r}`);
28
- this.operator = s[1] !== void 0 ? s[1] : "", this.operator === "=" && (this.operator = ""), s[2] ? this.semver = new f(s[2], this.options.loose) : this.semver = t;
29
- }
30
- toString() {
31
- return this.value;
32
- }
33
- test(r) {
34
- if (u("Comparator.test", r, this.options.loose), this.semver === t || r === t)
35
- return !0;
36
- if (typeof r == "string")
37
- try {
38
- r = new f(r, this.options);
39
- } catch {
40
- return !1;
41
- }
42
- return a(r, this.operator, this.semver, this.options);
43
- }
44
- intersects(r, e) {
45
- if (!(r instanceof i))
46
- throw new TypeError("a Comparator is required");
47
- return this.operator === "" ? this.value === "" ? !0 : new v(r.value, e).test(this.value) : r.operator === "" ? r.value === "" ? !0 : new v(this.value, e).test(r.semver) : (e = h(e), e.includePrerelease && (this.value === "<0.0.0-0" || r.value === "<0.0.0-0") || !e.includePrerelease && (this.value.startsWith("<0.0.0") || r.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && r.operator.startsWith(">") || this.operator.startsWith("<") && r.operator.startsWith("<") || this.semver.version === r.semver.version && this.operator.includes("=") && r.operator.includes("=") || a(this.semver, "<", r.semver, e) && this.operator.startsWith(">") && r.operator.startsWith("<") || a(this.semver, ">", r.semver, e) && this.operator.startsWith("<") && r.operator.startsWith(">")));
48
- }
49
- }
50
- o = i;
51
- const h = q(), { safeRe: n, t: l } = p(), a = _(), u = d(), f = W(), v = R();
52
- return o;
53
- }
54
- export {
55
- S as __require
56
- };
@@ -1,148 +0,0 @@
1
- import { __require as F } from "../internal/lrucache.js";
2
- import { __require as V } from "../internal/parse-options.js";
3
- import { __require as B } from "./comparator.js";
4
- import { __require as K } from "../internal/debug.js";
5
- import { __require as J } from "./semver.js";
6
- import { __require as Q } from "../internal/re.js";
7
- import { __require as W } from "../internal/constants.js";
8
- var A, L;
9
- function le() {
10
- if (L) return A;
11
- L = 1;
12
- const w = /\s+/g;
13
- class E {
14
- constructor(e, i) {
15
- if (i = _(i), e instanceof E)
16
- return e.loose === !!i.loose && e.includePrerelease === !!i.includePrerelease ? e : new E(e.raw, i);
17
- if (e instanceof p)
18
- return this.raw = e.value, this.set = [[e]], this.formatted = void 0, this;
19
- if (this.options = i, this.loose = !!i.loose, this.includePrerelease = !!i.includePrerelease, this.raw = e.trim().replace(w, " "), this.set = this.raw.split("||").map((t) => this.parseRange(t.trim())).filter((t) => t.length), !this.set.length)
20
- throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
21
- if (this.set.length > 1) {
22
- const t = this.set[0];
23
- if (this.set = this.set.filter((l) => !S(l[0])), this.set.length === 0)
24
- this.set = [t];
25
- else if (this.set.length > 1) {
26
- for (const l of this.set)
27
- if (l.length === 1 && x(l[0])) {
28
- this.set = [l];
29
- break;
30
- }
31
- }
32
- }
33
- this.formatted = void 0;
34
- }
35
- get range() {
36
- if (this.formatted === void 0) {
37
- this.formatted = "";
38
- for (let e = 0; e < this.set.length; e++) {
39
- e > 0 && (this.formatted += "||");
40
- const i = this.set[e];
41
- for (let t = 0; t < i.length; t++)
42
- t > 0 && (this.formatted += " "), this.formatted += i[t].toString().trim();
43
- }
44
- }
45
- return this.formatted;
46
- }
47
- format() {
48
- return this.range;
49
- }
50
- toString() {
51
- return this.range;
52
- }
53
- parseRange(e) {
54
- const t = ((this.options.includePrerelease && I) | (this.options.loose && N)) + ":" + e, l = O.get(t);
55
- if (l)
56
- return l;
57
- const s = this.options.loose, n = s ? h[o.HYPHENRANGELOOSE] : h[o.HYPHENRANGE];
58
- e = e.replace(n, k(this.options.includePrerelease)), f("hyphen replace", e), e = e.replace(h[o.COMPARATORTRIM], y), f("comparator trim", e), e = e.replace(h[o.TILDETRIM], G), f("tilde trim", e), e = e.replace(h[o.CARETTRIM], v), f("caret trim", e);
59
- let $ = e.split(" ").map((u) => m(u, this.options)).join(" ").split(/\s+/).map((u) => Y(u, this.options));
60
- s && ($ = $.filter((u) => (f("loose invalid filter", u, this.options), !!u.match(h[o.COMPARATORLOOSE])))), f("range list", $);
61
- const a = /* @__PURE__ */ new Map(), c = $.map((u) => new p(u, this.options));
62
- for (const u of c) {
63
- if (S(u))
64
- return [u];
65
- a.set(u.value, u);
66
- }
67
- a.size > 1 && a.has("") && a.delete("");
68
- const R = [...a.values()];
69
- return O.set(t, R), R;
70
- }
71
- intersects(e, i) {
72
- if (!(e instanceof E))
73
- throw new TypeError("a Range is required");
74
- return this.set.some((t) => q(t, i) && e.set.some((l) => q(l, i) && t.every((s) => l.every((n) => s.intersects(n, i)))));
75
- }
76
- // if ANY of the sets match ALL of its comparators, then pass
77
- test(e) {
78
- if (!e)
79
- return !1;
80
- if (typeof e == "string")
81
- try {
82
- e = new P(e, this.options);
83
- } catch {
84
- return !1;
85
- }
86
- for (let i = 0; i < this.set.length; i++)
87
- if (z(this.set[i], e, this.options))
88
- return !0;
89
- return !1;
90
- }
91
- }
92
- A = E;
93
- const C = F(), O = new C(), _ = V(), p = B(), f = K(), P = J(), {
94
- safeRe: h,
95
- t: o,
96
- comparatorTrimReplace: y,
97
- tildeTrimReplace: G,
98
- caretTrimReplace: v
99
- } = Q(), { FLAG_INCLUDE_PRERELEASE: I, FLAG_LOOSE: N } = W(), S = (r) => r.value === "<0.0.0-0", x = (r) => r.value === "", q = (r, e) => {
100
- let i = !0;
101
- const t = r.slice();
102
- let l = t.pop();
103
- for (; i && t.length; )
104
- i = t.every((s) => l.intersects(s, e)), l = t.pop();
105
- return i;
106
- }, m = (r, e) => (r = r.replace(h[o.BUILD], ""), f("comp", r, e), r = j(r, e), f("caret", r), r = X(r, e), f("tildes", r), r = b(r, e), f("xrange", r), r = U(r, e), f("stars", r), r), d = (r) => !r || r.toLowerCase() === "x" || r === "*", X = (r, e) => r.trim().split(/\s+/).map((i) => g(i, e)).join(" "), g = (r, e) => {
107
- const i = e.loose ? h[o.TILDELOOSE] : h[o.TILDE];
108
- return r.replace(i, (t, l, s, n, $) => {
109
- f("tilde", r, t, l, s, n, $);
110
- let a;
111
- return d(l) ? a = "" : d(s) ? a = `>=${l}.0.0 <${+l + 1}.0.0-0` : d(n) ? a = `>=${l}.${s}.0 <${l}.${+s + 1}.0-0` : $ ? (f("replaceTilde pr", $), a = `>=${l}.${s}.${n}-${$} <${l}.${+s + 1}.0-0`) : a = `>=${l}.${s}.${n} <${l}.${+s + 1}.0-0`, f("tilde return", a), a;
112
- });
113
- }, j = (r, e) => r.trim().split(/\s+/).map((i) => D(i, e)).join(" "), D = (r, e) => {
114
- f("caret", r, e);
115
- const i = e.loose ? h[o.CARETLOOSE] : h[o.CARET], t = e.includePrerelease ? "-0" : "";
116
- return r.replace(i, (l, s, n, $, a) => {
117
- f("caret", r, l, s, n, $, a);
118
- let c;
119
- return d(s) ? c = "" : d(n) ? c = `>=${s}.0.0${t} <${+s + 1}.0.0-0` : d($) ? s === "0" ? c = `>=${s}.${n}.0${t} <${s}.${+n + 1}.0-0` : c = `>=${s}.${n}.0${t} <${+s + 1}.0.0-0` : a ? (f("replaceCaret pr", a), s === "0" ? n === "0" ? c = `>=${s}.${n}.${$}-${a} <${s}.${n}.${+$ + 1}-0` : c = `>=${s}.${n}.${$}-${a} <${s}.${+n + 1}.0-0` : c = `>=${s}.${n}.${$}-${a} <${+s + 1}.0.0-0`) : (f("no pr"), s === "0" ? n === "0" ? c = `>=${s}.${n}.${$}${t} <${s}.${n}.${+$ + 1}-0` : c = `>=${s}.${n}.${$}${t} <${s}.${+n + 1}.0-0` : c = `>=${s}.${n}.${$} <${+s + 1}.0.0-0`), f("caret return", c), c;
120
- });
121
- }, b = (r, e) => (f("replaceXRanges", r, e), r.split(/\s+/).map((i) => H(i, e)).join(" ")), H = (r, e) => {
122
- r = r.trim();
123
- const i = e.loose ? h[o.XRANGELOOSE] : h[o.XRANGE];
124
- return r.replace(i, (t, l, s, n, $, a) => {
125
- f("xRange", r, t, l, s, n, $, a);
126
- const c = d(s), R = c || d(n), u = R || d($), T = u;
127
- return l === "=" && T && (l = ""), a = e.includePrerelease ? "-0" : "", c ? l === ">" || l === "<" ? t = "<0.0.0-0" : t = "*" : l && T ? (R && (n = 0), $ = 0, l === ">" ? (l = ">=", R ? (s = +s + 1, n = 0, $ = 0) : (n = +n + 1, $ = 0)) : l === "<=" && (l = "<", R ? s = +s + 1 : n = +n + 1), l === "<" && (a = "-0"), t = `${l + s}.${n}.${$}${a}`) : R ? t = `>=${s}.0.0${a} <${+s + 1}.0.0-0` : u && (t = `>=${s}.${n}.0${a} <${s}.${+n + 1}.0-0`), f("xRange return", t), t;
128
- });
129
- }, U = (r, e) => (f("replaceStars", r, e), r.trim().replace(h[o.STAR], "")), Y = (r, e) => (f("replaceGTE0", r, e), r.trim().replace(h[e.includePrerelease ? o.GTE0PRE : o.GTE0], "")), k = (r) => (e, i, t, l, s, n, $, a, c, R, u, T) => (d(t) ? i = "" : d(l) ? i = `>=${t}.0.0${r ? "-0" : ""}` : d(s) ? i = `>=${t}.${l}.0${r ? "-0" : ""}` : n ? i = `>=${i}` : i = `>=${i}${r ? "-0" : ""}`, d(c) ? a = "" : d(R) ? a = `<${+c + 1}.0.0-0` : d(u) ? a = `<${c}.${+R + 1}.0-0` : T ? a = `<=${c}.${R}.${u}-${T}` : r ? a = `<${c}.${R}.${+u + 1}-0` : a = `<=${a}`, `${i} ${a}`.trim()), z = (r, e, i) => {
130
- for (let t = 0; t < r.length; t++)
131
- if (!r[t].test(e))
132
- return !1;
133
- if (e.prerelease.length && !i.includePrerelease) {
134
- for (let t = 0; t < r.length; t++)
135
- if (f(r[t].semver), r[t].semver !== p.ANY && r[t].semver.prerelease.length > 0) {
136
- const l = r[t].semver;
137
- if (l.major === e.major && l.minor === e.minor && l.patch === e.patch)
138
- return !0;
139
- }
140
- return !1;
141
- }
142
- return !0;
143
- };
144
- return A;
145
- }
146
- export {
147
- le as __require
148
- };
@@ -1,169 +0,0 @@
1
- import { __require as w } from "../internal/debug.js";
2
- import { __require as g } from "../internal/constants.js";
3
- import { __require as E } from "../internal/re.js";
4
- import { __require as b } from "../internal/parse-options.js";
5
- import { __require as d } from "../internal/identifiers.js";
6
- var c, f;
7
- function k() {
8
- if (f) return c;
9
- f = 1;
10
- const a = w(), { MAX_LENGTH: u, MAX_SAFE_INTEGER: h } = g(), { safeRe: l, t: o } = E(), m = b(), { compareIdentifiers: p } = d();
11
- class n {
12
- constructor(e, r) {
13
- if (r = m(r), e instanceof n) {
14
- if (e.loose === !!r.loose && e.includePrerelease === !!r.includePrerelease)
15
- return e;
16
- e = e.version;
17
- } else if (typeof e != "string")
18
- throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);
19
- if (e.length > u)
20
- throw new TypeError(
21
- `version is longer than ${u} characters`
22
- );
23
- a("SemVer", e, r), this.options = r, this.loose = !!r.loose, this.includePrerelease = !!r.includePrerelease;
24
- const s = e.trim().match(r.loose ? l[o.LOOSE] : l[o.FULL]);
25
- if (!s)
26
- throw new TypeError(`Invalid Version: ${e}`);
27
- if (this.raw = e, this.major = +s[1], this.minor = +s[2], this.patch = +s[3], this.major > h || this.major < 0)
28
- throw new TypeError("Invalid major version");
29
- if (this.minor > h || this.minor < 0)
30
- throw new TypeError("Invalid minor version");
31
- if (this.patch > h || this.patch < 0)
32
- throw new TypeError("Invalid patch version");
33
- s[4] ? this.prerelease = s[4].split(".").map((t) => {
34
- if (/^[0-9]+$/.test(t)) {
35
- const i = +t;
36
- if (i >= 0 && i < h)
37
- return i;
38
- }
39
- return t;
40
- }) : this.prerelease = [], this.build = s[5] ? s[5].split(".") : [], this.format();
41
- }
42
- format() {
43
- return this.version = `${this.major}.${this.minor}.${this.patch}`, this.prerelease.length && (this.version += `-${this.prerelease.join(".")}`), this.version;
44
- }
45
- toString() {
46
- return this.version;
47
- }
48
- compare(e) {
49
- if (a("SemVer.compare", this.version, this.options, e), !(e instanceof n)) {
50
- if (typeof e == "string" && e === this.version)
51
- return 0;
52
- e = new n(e, this.options);
53
- }
54
- return e.version === this.version ? 0 : this.compareMain(e) || this.comparePre(e);
55
- }
56
- compareMain(e) {
57
- return e instanceof n || (e = new n(e, this.options)), this.major < e.major ? -1 : this.major > e.major ? 1 : this.minor < e.minor ? -1 : this.minor > e.minor ? 1 : this.patch < e.patch ? -1 : this.patch > e.patch ? 1 : 0;
58
- }
59
- comparePre(e) {
60
- if (e instanceof n || (e = new n(e, this.options)), this.prerelease.length && !e.prerelease.length)
61
- return -1;
62
- if (!this.prerelease.length && e.prerelease.length)
63
- return 1;
64
- if (!this.prerelease.length && !e.prerelease.length)
65
- return 0;
66
- let r = 0;
67
- do {
68
- const s = this.prerelease[r], t = e.prerelease[r];
69
- if (a("prerelease compare", r, s, t), s === void 0 && t === void 0)
70
- return 0;
71
- if (t === void 0)
72
- return 1;
73
- if (s === void 0)
74
- return -1;
75
- if (s === t)
76
- continue;
77
- return p(s, t);
78
- } while (++r);
79
- }
80
- compareBuild(e) {
81
- e instanceof n || (e = new n(e, this.options));
82
- let r = 0;
83
- do {
84
- const s = this.build[r], t = e.build[r];
85
- if (a("build compare", r, s, t), s === void 0 && t === void 0)
86
- return 0;
87
- if (t === void 0)
88
- return 1;
89
- if (s === void 0)
90
- return -1;
91
- if (s === t)
92
- continue;
93
- return p(s, t);
94
- } while (++r);
95
- }
96
- // preminor will bump the version up to the next minor release, and immediately
97
- // down to pre-release. premajor and prepatch work the same way.
98
- inc(e, r, s) {
99
- if (e.startsWith("pre")) {
100
- if (!r && s === !1)
101
- throw new Error("invalid increment argument: identifier is empty");
102
- if (r) {
103
- const t = `-${r}`.match(this.options.loose ? l[o.PRERELEASELOOSE] : l[o.PRERELEASE]);
104
- if (!t || t[1] !== r)
105
- throw new Error(`invalid identifier: ${r}`);
106
- }
107
- }
108
- switch (e) {
109
- case "premajor":
110
- this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", r, s);
111
- break;
112
- case "preminor":
113
- this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", r, s);
114
- break;
115
- case "prepatch":
116
- this.prerelease.length = 0, this.inc("patch", r, s), this.inc("pre", r, s);
117
- break;
118
- // If the input is a non-prerelease version, this acts the same as
119
- // prepatch.
120
- case "prerelease":
121
- this.prerelease.length === 0 && this.inc("patch", r, s), this.inc("pre", r, s);
122
- break;
123
- case "release":
124
- if (this.prerelease.length === 0)
125
- throw new Error(`version ${this.raw} is not a prerelease`);
126
- this.prerelease.length = 0;
127
- break;
128
- case "major":
129
- (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) && this.major++, this.minor = 0, this.patch = 0, this.prerelease = [];
130
- break;
131
- case "minor":
132
- (this.patch !== 0 || this.prerelease.length === 0) && this.minor++, this.patch = 0, this.prerelease = [];
133
- break;
134
- case "patch":
135
- this.prerelease.length === 0 && this.patch++, this.prerelease = [];
136
- break;
137
- // This probably shouldn't be used publicly.
138
- // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
139
- case "pre": {
140
- const t = Number(s) ? 1 : 0;
141
- if (this.prerelease.length === 0)
142
- this.prerelease = [t];
143
- else {
144
- let i = this.prerelease.length;
145
- for (; --i >= 0; )
146
- typeof this.prerelease[i] == "number" && (this.prerelease[i]++, i = -2);
147
- if (i === -1) {
148
- if (r === this.prerelease.join(".") && s === !1)
149
- throw new Error("invalid increment argument: identifier already exists");
150
- this.prerelease.push(t);
151
- }
152
- }
153
- if (r) {
154
- let i = [r, t];
155
- s === !1 && (i = [r]), p(this.prerelease[0], r) === 0 ? isNaN(this.prerelease[1]) && (this.prerelease = i) : this.prerelease = i;
156
- }
157
- break;
158
- }
159
- default:
160
- throw new Error(`invalid increment argument: ${e}`);
161
- }
162
- return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
163
- }
164
- }
165
- return c = n, c;
166
- }
167
- export {
168
- k as __require
169
- };
@@ -1,14 +0,0 @@
1
- import { __require as t } from "./parse.js";
2
- var r, n;
3
- function l() {
4
- if (n) return r;
5
- n = 1;
6
- const a = t();
7
- return r = (i, s) => {
8
- const e = a(i.trim().replace(/^[=v]+/, ""), s);
9
- return e ? e.version : null;
10
- }, r;
11
- }
12
- export {
13
- l as __require
14
- };
@@ -1,39 +0,0 @@
1
- import { __require as p } from "./eq.js";
2
- import { __require as _ } from "./neq.js";
3
- import { __require as a } from "./gt.js";
4
- import { __require as v } from "./gte.js";
5
- import { __require as y } from "./lt.js";
6
- import { __require as j } from "./lte.js";
7
- var i, c;
8
- function L() {
9
- if (c) return i;
10
- c = 1;
11
- const n = p(), o = _(), s = a(), q = v(), f = y(), m = j();
12
- return i = (r, u, e, t) => {
13
- switch (u) {
14
- case "===":
15
- return typeof r == "object" && (r = r.version), typeof e == "object" && (e = e.version), r === e;
16
- case "!==":
17
- return typeof r == "object" && (r = r.version), typeof e == "object" && (e = e.version), r !== e;
18
- case "":
19
- case "=":
20
- case "==":
21
- return n(r, e, t);
22
- case "!=":
23
- return o(r, e, t);
24
- case ">":
25
- return s(r, e, t);
26
- case ">=":
27
- return q(r, e, t);
28
- case "<":
29
- return f(r, e, t);
30
- case "<=":
31
- return m(r, e, t);
32
- default:
33
- throw new TypeError(`Invalid operator: ${u}`);
34
- }
35
- }, i;
36
- }
37
- export {
38
- L as __require
39
- };
@@ -1,33 +0,0 @@
1
- import { __require as C } from "../classes/semver.js";
2
- import { __require as g } from "./parse.js";
3
- import { __require as q } from "../internal/re.js";
4
- var a, i;
5
- function L() {
6
- if (i) return a;
7
- i = 1;
8
- const f = C(), m = g(), { safeRe: c, t: n } = q();
9
- return a = (r, t) => {
10
- if (r instanceof f)
11
- return r;
12
- if (typeof r == "number" && (r = String(r)), typeof r != "string")
13
- return null;
14
- t = t || {};
15
- let e = null;
16
- if (!t.rtl)
17
- e = r.match(t.includePrerelease ? c[n.COERCEFULL] : c[n.COERCE]);
18
- else {
19
- const u = t.includePrerelease ? c[n.COERCERTLFULL] : c[n.COERCERTL];
20
- let l;
21
- for (; (l = u.exec(r)) && (!e || e.index + e[0].length !== r.length); )
22
- (!e || l.index + l[0].length !== e.index + e[0].length) && (e = l), u.lastIndex = l.index + l[1].length + l[2].length;
23
- u.lastIndex = -1;
24
- }
25
- if (e === null)
26
- return null;
27
- const s = e[2], d = e[3] || "0", h = e[4] || "0", R = t.includePrerelease && e[5] ? `-${e[5]}` : "", x = t.includePrerelease && e[6] ? `+${e[6]}` : "";
28
- return m(`${s}.${d}.${h}${R}${x}`, t);
29
- }, a;
30
- }
31
- export {
32
- L as __require
33
- };
@@ -1,14 +0,0 @@
1
- import { __require as c } from "../classes/semver.js";
2
- var r, n;
3
- function s() {
4
- if (n) return r;
5
- n = 1;
6
- const e = c();
7
- return r = (a, m, i) => {
8
- const o = new e(a, i), u = new e(m, i);
9
- return o.compare(u) || o.compareBuild(u);
10
- }, r;
11
- }
12
- export {
13
- s as __require
14
- };
@@ -1,11 +0,0 @@
1
- import { __require as m } from "./compare.js";
2
- var e, r;
3
- function i() {
4
- if (r) return e;
5
- r = 1;
6
- const o = m();
7
- return e = (a, s) => o(a, s, !0), e;
8
- }
9
- export {
10
- i as __require
11
- };
@@ -1,11 +0,0 @@
1
- import { __require as n } from "../classes/semver.js";
2
- var r, m;
3
- function c() {
4
- if (m) return r;
5
- m = 1;
6
- const e = n();
7
- return r = (o, i, a) => new e(o, a).compare(new e(i, a)), r;
8
- }
9
- export {
10
- c as __require
11
- };
@@ -1,24 +0,0 @@
1
- import { __require as h } from "./parse.js";
2
- var o, u;
3
- function v() {
4
- if (u) return o;
5
- u = 1;
6
- const t = h();
7
- return o = (p, m) => {
8
- const r = t(p, null, !0), e = t(m, null, !0), a = r.compare(e);
9
- if (a === 0)
10
- return null;
11
- const s = a > 0, f = s ? r : e, n = s ? e : r, c = !!f.prerelease.length;
12
- if (!!n.prerelease.length && !c) {
13
- if (!n.patch && !n.minor)
14
- return "major";
15
- if (n.compareMain(f) === 0)
16
- return n.minor && !n.patch ? "minor" : "patch";
17
- }
18
- const i = c ? "pre" : "";
19
- return r.major !== e.major ? i + "major" : r.minor !== e.minor ? i + "minor" : r.patch !== e.patch ? i + "patch" : "prerelease";
20
- }, o;
21
- }
22
- export {
23
- v as __require
24
- };
@@ -1,11 +0,0 @@
1
- import { __require as a } from "./compare.js";
2
- var r, e;
3
- function s() {
4
- if (e) return r;
5
- e = 1;
6
- const q = a();
7
- return r = (i, o, u) => q(i, o, u) === 0, r;
8
- }
9
- export {
10
- s as __require
11
- };
@@ -1,11 +0,0 @@
1
- import { __require as a } from "./compare.js";
2
- var r, e;
3
- function s() {
4
- if (e) return r;
5
- e = 1;
6
- const t = a();
7
- return r = (i, o, u) => t(i, o, u) > 0, r;
8
- }
9
- export {
10
- s as __require
11
- };
@@ -1,11 +0,0 @@
1
- import { __require as a } from "./compare.js";
2
- var e, r;
3
- function s() {
4
- if (r) return e;
5
- r = 1;
6
- const t = a();
7
- return e = (i, o, u) => t(i, o, u) >= 0, e;
8
- }
9
- export {
10
- s as __require
11
- };
@@ -1,21 +0,0 @@
1
- import { __require as _ } from "../classes/semver.js";
2
- var c, a;
3
- function s() {
4
- if (a) return c;
5
- a = 1;
6
- const u = _();
7
- return c = (e, q, r, n, t) => {
8
- typeof r == "string" && (t = n, n = r, r = void 0);
9
- try {
10
- return new u(
11
- e instanceof u ? e.version : e,
12
- r
13
- ).inc(q, n, t).version;
14
- } catch {
15
- return null;
16
- }
17
- }, c;
18
- }
19
- export {
20
- s as __require
21
- };
@@ -1,11 +0,0 @@
1
- import { __require as a } from "./compare.js";
2
- var r, e;
3
- function s() {
4
- if (e) return r;
5
- e = 1;
6
- const t = a();
7
- return r = (i, o, u) => t(i, o, u) < 0, r;
8
- }
9
- export {
10
- s as __require
11
- };
@@ -1,11 +0,0 @@
1
- import { __require as a } from "./compare.js";
2
- var e, r;
3
- function s() {
4
- if (r) return e;
5
- r = 1;
6
- const t = a();
7
- return e = (i, o, u) => t(i, o, u) <= 0, e;
8
- }
9
- export {
10
- s as __require
11
- };
@@ -1,11 +0,0 @@
1
- import { __require as m } from "../classes/semver.js";
2
- var r, e;
3
- function t() {
4
- if (e) return r;
5
- e = 1;
6
- const o = m();
7
- return r = (a, i) => new o(a, i).major, r;
8
- }
9
- export {
10
- t as __require
11
- };
@@ -1,11 +0,0 @@
1
- import { __require as m } from "../classes/semver.js";
2
- var r, e;
3
- function a() {
4
- if (e) return r;
5
- e = 1;
6
- const i = m();
7
- return r = (n, o) => new i(n, o).minor, r;
8
- }
9
- export {
10
- a as __require
11
- };
@@ -1,11 +0,0 @@
1
- import { __require as u } from "./compare.js";
2
- var e, r;
3
- function s() {
4
- if (r) return e;
5
- r = 1;
6
- const q = u();
7
- return e = (n, i, o) => q(n, i, o) !== 0, e;
8
- }
9
- export {
10
- s as __require
11
- };
@@ -1,21 +0,0 @@
1
- import { __require as i } from "../classes/semver.js";
2
- var e, a;
3
- function o() {
4
- if (a) return e;
5
- a = 1;
6
- const t = i();
7
- return e = (r, u, n = !1) => {
8
- if (r instanceof t)
9
- return r;
10
- try {
11
- return new t(r, u);
12
- } catch (s) {
13
- if (!n)
14
- return null;
15
- throw s;
16
- }
17
- }, e;
18
- }
19
- export {
20
- o as __require
21
- };