keycloakify 11.5.1 → 11.5.3

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.
package/bin/40.index.js CHANGED
@@ -155,6 +155,91 @@ function maybeDelegateCommandToCustomHandler(params) {
155
155
 
156
156
  /***/ }),
157
157
 
158
+ /***/ 12171:
159
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
160
+
161
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
162
+ /* harmony export */ "h": () => (/* binding */ SemVer)
163
+ /* harmony export */ });
164
+ var SemVer;
165
+ (function (SemVer) {
166
+ const bumpTypes = ["major", "minor", "patch", "rc", "no bump"];
167
+ function parse(versionStr) {
168
+ const match = versionStr.match(/^v?([0-9]+)\.([0-9]+)(?:\.([0-9]+))?(?:-rc.([0-9]+))?$/);
169
+ if (!match) {
170
+ throw new Error(`${versionStr} is not a valid semantic version`);
171
+ }
172
+ const semVer = Object.assign({ major: parseInt(match[1]), minor: parseInt(match[2]), patch: (() => {
173
+ const str = match[3];
174
+ return str === undefined ? 0 : parseInt(str);
175
+ })() }, (() => {
176
+ const str = match[4];
177
+ return str === undefined ? {} : { rc: parseInt(str) };
178
+ })());
179
+ const initialStr = stringify(semVer);
180
+ Object.defineProperty(semVer, "parsedFrom", {
181
+ enumerable: true,
182
+ get: function () {
183
+ const currentStr = stringify(this);
184
+ if (currentStr !== initialStr) {
185
+ throw new Error(`SemVer.parsedFrom can't be read anymore, the version have been modified from ${initialStr} to ${currentStr}`);
186
+ }
187
+ return versionStr;
188
+ }
189
+ });
190
+ return semVer;
191
+ }
192
+ SemVer.parse = parse;
193
+ function stringify(v) {
194
+ return `${v.major}.${v.minor}.${v.patch}${v.rc === undefined ? "" : `-rc.${v.rc}`}`;
195
+ }
196
+ SemVer.stringify = stringify;
197
+ /**
198
+ *
199
+ * v1 < v2 => -1
200
+ * v1 === v2 => 0
201
+ * v1 > v2 => 1
202
+ *
203
+ */
204
+ function compare(v1, v2) {
205
+ const sign = (diff) => (diff === 0 ? 0 : diff < 0 ? -1 : 1);
206
+ const noUndefined = (n) => n !== null && n !== void 0 ? n : Infinity;
207
+ for (const level of ["major", "minor", "patch", "rc"]) {
208
+ if (noUndefined(v1[level]) !== noUndefined(v2[level])) {
209
+ return sign(noUndefined(v1[level]) - noUndefined(v2[level]));
210
+ }
211
+ }
212
+ return 0;
213
+ }
214
+ SemVer.compare = compare;
215
+ /*
216
+ console.log(compare(parse("3.0.0-rc.3"), parse("3.0.0")) === -1 )
217
+ console.log(compare(parse("3.0.0-rc.3"), parse("3.0.0-rc.4")) === -1 )
218
+ console.log(compare(parse("3.0.0-rc.3"), parse("4.0.0")) === -1 )
219
+ */
220
+ function bumpType(params) {
221
+ const versionAhead = typeof params.versionAhead === "string"
222
+ ? parse(params.versionAhead)
223
+ : params.versionAhead;
224
+ const versionBehind = typeof params.versionBehind === "string"
225
+ ? parse(params.versionBehind)
226
+ : params.versionBehind;
227
+ if (compare(versionBehind, versionAhead) === 1) {
228
+ throw new Error(`Version regression ${stringify(versionBehind)} -> ${stringify(versionAhead)}`);
229
+ }
230
+ for (const level of ["major", "minor", "patch", "rc"]) {
231
+ if (versionBehind[level] !== versionAhead[level]) {
232
+ return level;
233
+ }
234
+ }
235
+ return "no bump";
236
+ }
237
+ SemVer.bumpType = bumpType;
238
+ })(SemVer || (SemVer = {}));
239
+ //# sourceMappingURL=SemVer.js.map
240
+
241
+ /***/ }),
242
+
158
243
  /***/ 89693:
159
244
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
160
245
 
package/bin/490.index.js CHANGED
@@ -501,6 +501,91 @@ async function getLatestsSemVersionedTag(_a) {
501
501
 
502
502
  /***/ }),
503
503
 
504
+ /***/ 12171:
505
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
506
+
507
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
508
+ /* harmony export */ "h": () => (/* binding */ SemVer)
509
+ /* harmony export */ });
510
+ var SemVer;
511
+ (function (SemVer) {
512
+ const bumpTypes = ["major", "minor", "patch", "rc", "no bump"];
513
+ function parse(versionStr) {
514
+ const match = versionStr.match(/^v?([0-9]+)\.([0-9]+)(?:\.([0-9]+))?(?:-rc.([0-9]+))?$/);
515
+ if (!match) {
516
+ throw new Error(`${versionStr} is not a valid semantic version`);
517
+ }
518
+ const semVer = Object.assign({ major: parseInt(match[1]), minor: parseInt(match[2]), patch: (() => {
519
+ const str = match[3];
520
+ return str === undefined ? 0 : parseInt(str);
521
+ })() }, (() => {
522
+ const str = match[4];
523
+ return str === undefined ? {} : { rc: parseInt(str) };
524
+ })());
525
+ const initialStr = stringify(semVer);
526
+ Object.defineProperty(semVer, "parsedFrom", {
527
+ enumerable: true,
528
+ get: function () {
529
+ const currentStr = stringify(this);
530
+ if (currentStr !== initialStr) {
531
+ throw new Error(`SemVer.parsedFrom can't be read anymore, the version have been modified from ${initialStr} to ${currentStr}`);
532
+ }
533
+ return versionStr;
534
+ }
535
+ });
536
+ return semVer;
537
+ }
538
+ SemVer.parse = parse;
539
+ function stringify(v) {
540
+ return `${v.major}.${v.minor}.${v.patch}${v.rc === undefined ? "" : `-rc.${v.rc}`}`;
541
+ }
542
+ SemVer.stringify = stringify;
543
+ /**
544
+ *
545
+ * v1 < v2 => -1
546
+ * v1 === v2 => 0
547
+ * v1 > v2 => 1
548
+ *
549
+ */
550
+ function compare(v1, v2) {
551
+ const sign = (diff) => (diff === 0 ? 0 : diff < 0 ? -1 : 1);
552
+ const noUndefined = (n) => n !== null && n !== void 0 ? n : Infinity;
553
+ for (const level of ["major", "minor", "patch", "rc"]) {
554
+ if (noUndefined(v1[level]) !== noUndefined(v2[level])) {
555
+ return sign(noUndefined(v1[level]) - noUndefined(v2[level]));
556
+ }
557
+ }
558
+ return 0;
559
+ }
560
+ SemVer.compare = compare;
561
+ /*
562
+ console.log(compare(parse("3.0.0-rc.3"), parse("3.0.0")) === -1 )
563
+ console.log(compare(parse("3.0.0-rc.3"), parse("3.0.0-rc.4")) === -1 )
564
+ console.log(compare(parse("3.0.0-rc.3"), parse("4.0.0")) === -1 )
565
+ */
566
+ function bumpType(params) {
567
+ const versionAhead = typeof params.versionAhead === "string"
568
+ ? parse(params.versionAhead)
569
+ : params.versionAhead;
570
+ const versionBehind = typeof params.versionBehind === "string"
571
+ ? parse(params.versionBehind)
572
+ : params.versionBehind;
573
+ if (compare(versionBehind, versionAhead) === 1) {
574
+ throw new Error(`Version regression ${stringify(versionBehind)} -> ${stringify(versionAhead)}`);
575
+ }
576
+ for (const level of ["major", "minor", "patch", "rc"]) {
577
+ if (versionBehind[level] !== versionAhead[level]) {
578
+ return level;
579
+ }
580
+ }
581
+ return "no bump";
582
+ }
583
+ SemVer.bumpType = bumpType;
584
+ })(SemVer || (SemVer = {}));
585
+ //# sourceMappingURL=SemVer.js.map
586
+
587
+ /***/ }),
588
+
504
589
  /***/ 38367:
505
590
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
506
591
 
package/bin/573.index.js CHANGED
@@ -1533,6 +1533,91 @@ async function command(params) {
1533
1533
 
1534
1534
  /***/ }),
1535
1535
 
1536
+ /***/ 12171:
1537
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1538
+
1539
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1540
+ /* harmony export */ "h": () => (/* binding */ SemVer)
1541
+ /* harmony export */ });
1542
+ var SemVer;
1543
+ (function (SemVer) {
1544
+ const bumpTypes = ["major", "minor", "patch", "rc", "no bump"];
1545
+ function parse(versionStr) {
1546
+ const match = versionStr.match(/^v?([0-9]+)\.([0-9]+)(?:\.([0-9]+))?(?:-rc.([0-9]+))?$/);
1547
+ if (!match) {
1548
+ throw new Error(`${versionStr} is not a valid semantic version`);
1549
+ }
1550
+ const semVer = Object.assign({ major: parseInt(match[1]), minor: parseInt(match[2]), patch: (() => {
1551
+ const str = match[3];
1552
+ return str === undefined ? 0 : parseInt(str);
1553
+ })() }, (() => {
1554
+ const str = match[4];
1555
+ return str === undefined ? {} : { rc: parseInt(str) };
1556
+ })());
1557
+ const initialStr = stringify(semVer);
1558
+ Object.defineProperty(semVer, "parsedFrom", {
1559
+ enumerable: true,
1560
+ get: function () {
1561
+ const currentStr = stringify(this);
1562
+ if (currentStr !== initialStr) {
1563
+ throw new Error(`SemVer.parsedFrom can't be read anymore, the version have been modified from ${initialStr} to ${currentStr}`);
1564
+ }
1565
+ return versionStr;
1566
+ }
1567
+ });
1568
+ return semVer;
1569
+ }
1570
+ SemVer.parse = parse;
1571
+ function stringify(v) {
1572
+ return `${v.major}.${v.minor}.${v.patch}${v.rc === undefined ? "" : `-rc.${v.rc}`}`;
1573
+ }
1574
+ SemVer.stringify = stringify;
1575
+ /**
1576
+ *
1577
+ * v1 < v2 => -1
1578
+ * v1 === v2 => 0
1579
+ * v1 > v2 => 1
1580
+ *
1581
+ */
1582
+ function compare(v1, v2) {
1583
+ const sign = (diff) => (diff === 0 ? 0 : diff < 0 ? -1 : 1);
1584
+ const noUndefined = (n) => n !== null && n !== void 0 ? n : Infinity;
1585
+ for (const level of ["major", "minor", "patch", "rc"]) {
1586
+ if (noUndefined(v1[level]) !== noUndefined(v2[level])) {
1587
+ return sign(noUndefined(v1[level]) - noUndefined(v2[level]));
1588
+ }
1589
+ }
1590
+ return 0;
1591
+ }
1592
+ SemVer.compare = compare;
1593
+ /*
1594
+ console.log(compare(parse("3.0.0-rc.3"), parse("3.0.0")) === -1 )
1595
+ console.log(compare(parse("3.0.0-rc.3"), parse("3.0.0-rc.4")) === -1 )
1596
+ console.log(compare(parse("3.0.0-rc.3"), parse("4.0.0")) === -1 )
1597
+ */
1598
+ function bumpType(params) {
1599
+ const versionAhead = typeof params.versionAhead === "string"
1600
+ ? parse(params.versionAhead)
1601
+ : params.versionAhead;
1602
+ const versionBehind = typeof params.versionBehind === "string"
1603
+ ? parse(params.versionBehind)
1604
+ : params.versionBehind;
1605
+ if (compare(versionBehind, versionAhead) === 1) {
1606
+ throw new Error(`Version regression ${stringify(versionBehind)} -> ${stringify(versionAhead)}`);
1607
+ }
1608
+ for (const level of ["major", "minor", "patch", "rc"]) {
1609
+ if (versionBehind[level] !== versionAhead[level]) {
1610
+ return level;
1611
+ }
1612
+ }
1613
+ return "no bump";
1614
+ }
1615
+ SemVer.bumpType = bumpType;
1616
+ })(SemVer || (SemVer = {}));
1617
+ //# sourceMappingURL=SemVer.js.map
1618
+
1619
+ /***/ }),
1620
+
1536
1621
  /***/ 27190:
1537
1622
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1538
1623
 
package/bin/653.index.js CHANGED
@@ -250,6 +250,91 @@ async function command(params) {
250
250
 
251
251
  /***/ }),
252
252
 
253
+ /***/ 12171:
254
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
255
+
256
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
257
+ /* harmony export */ "h": () => (/* binding */ SemVer)
258
+ /* harmony export */ });
259
+ var SemVer;
260
+ (function (SemVer) {
261
+ const bumpTypes = ["major", "minor", "patch", "rc", "no bump"];
262
+ function parse(versionStr) {
263
+ const match = versionStr.match(/^v?([0-9]+)\.([0-9]+)(?:\.([0-9]+))?(?:-rc.([0-9]+))?$/);
264
+ if (!match) {
265
+ throw new Error(`${versionStr} is not a valid semantic version`);
266
+ }
267
+ const semVer = Object.assign({ major: parseInt(match[1]), minor: parseInt(match[2]), patch: (() => {
268
+ const str = match[3];
269
+ return str === undefined ? 0 : parseInt(str);
270
+ })() }, (() => {
271
+ const str = match[4];
272
+ return str === undefined ? {} : { rc: parseInt(str) };
273
+ })());
274
+ const initialStr = stringify(semVer);
275
+ Object.defineProperty(semVer, "parsedFrom", {
276
+ enumerable: true,
277
+ get: function () {
278
+ const currentStr = stringify(this);
279
+ if (currentStr !== initialStr) {
280
+ throw new Error(`SemVer.parsedFrom can't be read anymore, the version have been modified from ${initialStr} to ${currentStr}`);
281
+ }
282
+ return versionStr;
283
+ }
284
+ });
285
+ return semVer;
286
+ }
287
+ SemVer.parse = parse;
288
+ function stringify(v) {
289
+ return `${v.major}.${v.minor}.${v.patch}${v.rc === undefined ? "" : `-rc.${v.rc}`}`;
290
+ }
291
+ SemVer.stringify = stringify;
292
+ /**
293
+ *
294
+ * v1 < v2 => -1
295
+ * v1 === v2 => 0
296
+ * v1 > v2 => 1
297
+ *
298
+ */
299
+ function compare(v1, v2) {
300
+ const sign = (diff) => (diff === 0 ? 0 : diff < 0 ? -1 : 1);
301
+ const noUndefined = (n) => n !== null && n !== void 0 ? n : Infinity;
302
+ for (const level of ["major", "minor", "patch", "rc"]) {
303
+ if (noUndefined(v1[level]) !== noUndefined(v2[level])) {
304
+ return sign(noUndefined(v1[level]) - noUndefined(v2[level]));
305
+ }
306
+ }
307
+ return 0;
308
+ }
309
+ SemVer.compare = compare;
310
+ /*
311
+ console.log(compare(parse("3.0.0-rc.3"), parse("3.0.0")) === -1 )
312
+ console.log(compare(parse("3.0.0-rc.3"), parse("3.0.0-rc.4")) === -1 )
313
+ console.log(compare(parse("3.0.0-rc.3"), parse("4.0.0")) === -1 )
314
+ */
315
+ function bumpType(params) {
316
+ const versionAhead = typeof params.versionAhead === "string"
317
+ ? parse(params.versionAhead)
318
+ : params.versionAhead;
319
+ const versionBehind = typeof params.versionBehind === "string"
320
+ ? parse(params.versionBehind)
321
+ : params.versionBehind;
322
+ if (compare(versionBehind, versionAhead) === 1) {
323
+ throw new Error(`Version regression ${stringify(versionBehind)} -> ${stringify(versionAhead)}`);
324
+ }
325
+ for (const level of ["major", "minor", "patch", "rc"]) {
326
+ if (versionBehind[level] !== versionAhead[level]) {
327
+ return level;
328
+ }
329
+ }
330
+ return "no bump";
331
+ }
332
+ SemVer.bumpType = bumpType;
333
+ })(SemVer || (SemVer = {}));
334
+ //# sourceMappingURL=SemVer.js.map
335
+
336
+ /***/ }),
337
+
253
338
  /***/ 89693:
254
339
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
255
340
 
package/bin/658.index.js CHANGED
@@ -82,6 +82,91 @@ async function command(params) {
82
82
 
83
83
  /***/ }),
84
84
 
85
+ /***/ 12171:
86
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
87
+
88
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
89
+ /* harmony export */ "h": () => (/* binding */ SemVer)
90
+ /* harmony export */ });
91
+ var SemVer;
92
+ (function (SemVer) {
93
+ const bumpTypes = ["major", "minor", "patch", "rc", "no bump"];
94
+ function parse(versionStr) {
95
+ const match = versionStr.match(/^v?([0-9]+)\.([0-9]+)(?:\.([0-9]+))?(?:-rc.([0-9]+))?$/);
96
+ if (!match) {
97
+ throw new Error(`${versionStr} is not a valid semantic version`);
98
+ }
99
+ const semVer = Object.assign({ major: parseInt(match[1]), minor: parseInt(match[2]), patch: (() => {
100
+ const str = match[3];
101
+ return str === undefined ? 0 : parseInt(str);
102
+ })() }, (() => {
103
+ const str = match[4];
104
+ return str === undefined ? {} : { rc: parseInt(str) };
105
+ })());
106
+ const initialStr = stringify(semVer);
107
+ Object.defineProperty(semVer, "parsedFrom", {
108
+ enumerable: true,
109
+ get: function () {
110
+ const currentStr = stringify(this);
111
+ if (currentStr !== initialStr) {
112
+ throw new Error(`SemVer.parsedFrom can't be read anymore, the version have been modified from ${initialStr} to ${currentStr}`);
113
+ }
114
+ return versionStr;
115
+ }
116
+ });
117
+ return semVer;
118
+ }
119
+ SemVer.parse = parse;
120
+ function stringify(v) {
121
+ return `${v.major}.${v.minor}.${v.patch}${v.rc === undefined ? "" : `-rc.${v.rc}`}`;
122
+ }
123
+ SemVer.stringify = stringify;
124
+ /**
125
+ *
126
+ * v1 < v2 => -1
127
+ * v1 === v2 => 0
128
+ * v1 > v2 => 1
129
+ *
130
+ */
131
+ function compare(v1, v2) {
132
+ const sign = (diff) => (diff === 0 ? 0 : diff < 0 ? -1 : 1);
133
+ const noUndefined = (n) => n !== null && n !== void 0 ? n : Infinity;
134
+ for (const level of ["major", "minor", "patch", "rc"]) {
135
+ if (noUndefined(v1[level]) !== noUndefined(v2[level])) {
136
+ return sign(noUndefined(v1[level]) - noUndefined(v2[level]));
137
+ }
138
+ }
139
+ return 0;
140
+ }
141
+ SemVer.compare = compare;
142
+ /*
143
+ console.log(compare(parse("3.0.0-rc.3"), parse("3.0.0")) === -1 )
144
+ console.log(compare(parse("3.0.0-rc.3"), parse("3.0.0-rc.4")) === -1 )
145
+ console.log(compare(parse("3.0.0-rc.3"), parse("4.0.0")) === -1 )
146
+ */
147
+ function bumpType(params) {
148
+ const versionAhead = typeof params.versionAhead === "string"
149
+ ? parse(params.versionAhead)
150
+ : params.versionAhead;
151
+ const versionBehind = typeof params.versionBehind === "string"
152
+ ? parse(params.versionBehind)
153
+ : params.versionBehind;
154
+ if (compare(versionBehind, versionAhead) === 1) {
155
+ throw new Error(`Version regression ${stringify(versionBehind)} -> ${stringify(versionAhead)}`);
156
+ }
157
+ for (const level of ["major", "minor", "patch", "rc"]) {
158
+ if (versionBehind[level] !== versionAhead[level]) {
159
+ return level;
160
+ }
161
+ }
162
+ return "no bump";
163
+ }
164
+ SemVer.bumpType = bumpType;
165
+ })(SemVer || (SemVer = {}));
166
+ //# sourceMappingURL=SemVer.js.map
167
+
168
+ /***/ }),
169
+
85
170
  /***/ 89693:
86
171
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
87
172
 
package/bin/682.index.js CHANGED
@@ -407,12 +407,12 @@ async function getSupportedDockerImageTags(params) {
407
407
  return result;
408
408
  }
409
409
  }
410
- const tags = [];
410
+ const tags_queryResponse = [];
411
411
  await (async function callee(url) {
412
412
  const r = await lib_default()(url, buildContext.fetchOptions);
413
413
  await Promise.all([
414
414
  (async () => {
415
- tags.push(...lib.z.object({
415
+ tags_queryResponse.push(...lib.z.object({
416
416
  tags: lib.z.array(lib.z.string())
417
417
  })
418
418
  .parse(await r.json()).tags);
@@ -432,7 +432,8 @@ async function getSupportedDockerImageTags(params) {
432
432
  })()
433
433
  ]);
434
434
  })("https://quay.io/v2/keycloak/keycloak/tags/list");
435
- const arr = tags
435
+ const supportedKeycloakMajorVersions = getSupportedKeycloakMajorVersions();
436
+ const allSupportedTags_withVersion = tags_queryResponse
436
437
  .map(tag => ({
437
438
  tag,
438
439
  version: (() => {
@@ -446,21 +447,27 @@ async function getSupportedDockerImageTags(params) {
446
447
  catch (_a) {
447
448
  return undefined;
448
449
  }
450
+ if (tag.split(".").length !== 3) {
451
+ return undefined;
452
+ }
453
+ if (!supportedKeycloakMajorVersions.includes(version.major)) {
454
+ return undefined;
455
+ }
449
456
  return version;
450
457
  })()
451
458
  }))
452
459
  .map(({ tag, version }) => (version === undefined ? undefined : { tag, version }))
453
- .filter((0,exclude/* exclude */.D)(undefined));
454
- const versionByMajor = {};
455
- for (const { version } of arr) {
456
- const version_current = versionByMajor[version.major];
460
+ .filter((0,exclude/* exclude */.D)(undefined))
461
+ .sort(({ version: a }, { version: b }) => SemVer/* SemVer.compare */.h.compare(b, a));
462
+ const latestTagByMajor = {};
463
+ for (const { version } of allSupportedTags_withVersion) {
464
+ const version_current = latestTagByMajor[version.major];
457
465
  if (version_current === undefined ||
458
466
  SemVer/* SemVer.compare */.h.compare(version_current, version) === -1) {
459
- versionByMajor[version.major] = version;
467
+ latestTagByMajor[version.major] = version;
460
468
  }
461
469
  }
462
- const supportedKeycloakMajorVersions = getSupportedKeycloakMajorVersions();
463
- const result = Object.entries(versionByMajor)
470
+ const latestMajorTags = Object.entries(latestTagByMajor)
464
471
  .sort(([a], [b]) => parseInt(b) - parseInt(a))
465
472
  .map(([, version]) => version)
466
473
  .map(version => {
@@ -471,15 +478,28 @@ async function getSupportedDockerImageTags(params) {
471
478
  return SemVer/* SemVer.stringify */.h.stringify(version);
472
479
  })
473
480
  .filter((0,exclude/* exclude */.D)(undefined));
481
+ const allSupportedTags = allSupportedTags_withVersion.map(({ tag }) => tag);
482
+ const result = {
483
+ latestMajorTags,
484
+ allSupportedTags
485
+ };
474
486
  await setCachedValue({ cacheDirPath: buildContext.cacheDirPath, result });
475
487
  return result;
476
488
  }
477
489
  const { getCachedValue, setCachedValue } = (() => {
490
+ const zResult = (() => {
491
+ const zTargetType = lib.z.object({
492
+ allSupportedTags: lib.z.array(lib.z.string()),
493
+ latestMajorTags: lib.z.array(lib.z.string())
494
+ });
495
+ assert/* assert */.h;
496
+ return (0,id.id)(zTargetType);
497
+ })();
478
498
  const zCache = (() => {
479
499
  const zTargetType = lib.z.object({
480
500
  keycloakifyVersion: lib.z.string(),
481
501
  time: lib.z.number(),
482
- result: lib.z.array(lib.z.string())
502
+ result: zResult
483
503
  });
484
504
  assert/* assert */.h;
485
505
  return (0,id.id)(zTargetType);
@@ -829,7 +849,7 @@ async function dumpContainerConfig(params) {
829
849
  ...["--db", "dev-file"],
830
850
  ...[
831
851
  "--db-url",
832
- "'jdbc:h2:file:/tmp/h2/keycloakdb;NON_KEYWORDS=VALUE'"
852
+ '"jdbc:h2:file:/tmp/h2/keycloakdb;NON_KEYWORDS=VALUE"'
833
853
  ]
834
854
  ])
835
855
  ], { shell: true });
@@ -1077,13 +1097,13 @@ async function command(params) {
1077
1097
  process.exit(1);
1078
1098
  }
1079
1099
  const { cliCommandOptions, buildContext } = params;
1080
- const availableTags = await getSupportedDockerImageTags({
1100
+ const { allSupportedTags, latestMajorTags } = await getSupportedDockerImageTags({
1081
1101
  buildContext
1082
1102
  });
1083
1103
  const { dockerImageTag } = await (async () => {
1084
1104
  if (cliCommandOptions.keycloakVersion !== undefined) {
1085
1105
  const cliCommandOptions_keycloakVersion = cliCommandOptions.keycloakVersion;
1086
- const tag = availableTags.find(tag => tag.startsWith(cliCommandOptions_keycloakVersion));
1106
+ const tag = allSupportedTags.find(tag => tag.startsWith(cliCommandOptions_keycloakVersion));
1087
1107
  if (tag === undefined) {
1088
1108
  console.log(source_default().red([
1089
1109
  `We could not find a Keycloak Docker image for ${cliCommandOptions_keycloakVersion}`,
@@ -1103,7 +1123,7 @@ async function command(params) {
1103
1123
  source_default().gray("You can also explicitly provide the version with `npx keycloakify start-keycloak --keycloak-version 26` (or any other version)")
1104
1124
  ].join("\n"));
1105
1125
  const { value: tag } = await dist_default()({
1106
- values: availableTags
1126
+ values: latestMajorTags
1107
1127
  }).catch(() => {
1108
1128
  process.exit(-1);
1109
1129
  });
@@ -1458,6 +1478,91 @@ async function command(params) {
1458
1478
 
1459
1479
  /***/ }),
1460
1480
 
1481
+ /***/ 12171:
1482
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1483
+
1484
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1485
+ /* harmony export */ "h": () => (/* binding */ SemVer)
1486
+ /* harmony export */ });
1487
+ var SemVer;
1488
+ (function (SemVer) {
1489
+ const bumpTypes = ["major", "minor", "patch", "rc", "no bump"];
1490
+ function parse(versionStr) {
1491
+ const match = versionStr.match(/^v?([0-9]+)\.([0-9]+)(?:\.([0-9]+))?(?:-rc.([0-9]+))?$/);
1492
+ if (!match) {
1493
+ throw new Error(`${versionStr} is not a valid semantic version`);
1494
+ }
1495
+ const semVer = Object.assign({ major: parseInt(match[1]), minor: parseInt(match[2]), patch: (() => {
1496
+ const str = match[3];
1497
+ return str === undefined ? 0 : parseInt(str);
1498
+ })() }, (() => {
1499
+ const str = match[4];
1500
+ return str === undefined ? {} : { rc: parseInt(str) };
1501
+ })());
1502
+ const initialStr = stringify(semVer);
1503
+ Object.defineProperty(semVer, "parsedFrom", {
1504
+ enumerable: true,
1505
+ get: function () {
1506
+ const currentStr = stringify(this);
1507
+ if (currentStr !== initialStr) {
1508
+ throw new Error(`SemVer.parsedFrom can't be read anymore, the version have been modified from ${initialStr} to ${currentStr}`);
1509
+ }
1510
+ return versionStr;
1511
+ }
1512
+ });
1513
+ return semVer;
1514
+ }
1515
+ SemVer.parse = parse;
1516
+ function stringify(v) {
1517
+ return `${v.major}.${v.minor}.${v.patch}${v.rc === undefined ? "" : `-rc.${v.rc}`}`;
1518
+ }
1519
+ SemVer.stringify = stringify;
1520
+ /**
1521
+ *
1522
+ * v1 < v2 => -1
1523
+ * v1 === v2 => 0
1524
+ * v1 > v2 => 1
1525
+ *
1526
+ */
1527
+ function compare(v1, v2) {
1528
+ const sign = (diff) => (diff === 0 ? 0 : diff < 0 ? -1 : 1);
1529
+ const noUndefined = (n) => n !== null && n !== void 0 ? n : Infinity;
1530
+ for (const level of ["major", "minor", "patch", "rc"]) {
1531
+ if (noUndefined(v1[level]) !== noUndefined(v2[level])) {
1532
+ return sign(noUndefined(v1[level]) - noUndefined(v2[level]));
1533
+ }
1534
+ }
1535
+ return 0;
1536
+ }
1537
+ SemVer.compare = compare;
1538
+ /*
1539
+ console.log(compare(parse("3.0.0-rc.3"), parse("3.0.0")) === -1 )
1540
+ console.log(compare(parse("3.0.0-rc.3"), parse("3.0.0-rc.4")) === -1 )
1541
+ console.log(compare(parse("3.0.0-rc.3"), parse("4.0.0")) === -1 )
1542
+ */
1543
+ function bumpType(params) {
1544
+ const versionAhead = typeof params.versionAhead === "string"
1545
+ ? parse(params.versionAhead)
1546
+ : params.versionAhead;
1547
+ const versionBehind = typeof params.versionBehind === "string"
1548
+ ? parse(params.versionBehind)
1549
+ : params.versionBehind;
1550
+ if (compare(versionBehind, versionAhead) === 1) {
1551
+ throw new Error(`Version regression ${stringify(versionBehind)} -> ${stringify(versionAhead)}`);
1552
+ }
1553
+ for (const level of ["major", "minor", "patch", "rc"]) {
1554
+ if (versionBehind[level] !== versionAhead[level]) {
1555
+ return level;
1556
+ }
1557
+ }
1558
+ return "no bump";
1559
+ }
1560
+ SemVer.bumpType = bumpType;
1561
+ })(SemVer || (SemVer = {}));
1562
+ //# sourceMappingURL=SemVer.js.map
1563
+
1564
+ /***/ }),
1565
+
1461
1566
  /***/ 38367:
1462
1567
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1463
1568