keycloakify 11.5.0 → 11.5.2
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 +85 -0
- package/bin/490.index.js +85 -0
- package/bin/573.index.js +85 -0
- package/bin/653.index.js +85 -0
- package/bin/658.index.js +85 -0
- package/bin/682.index.js +246 -39
- package/bin/735.index.js +85 -0
- package/bin/main.js +1 -118
- package/bin/start-keycloak/getSupportedDockerImageTags.d.ts +4 -1
- package/bin/start-keycloak/realmConfig/ParsedRealmJson.d.ts +8 -1
- package/package.json +1 -1
- package/src/bin/main.ts +2 -41
- package/src/bin/start-keycloak/getSupportedDockerImageTags.ts +51 -14
- package/src/bin/start-keycloak/realmConfig/ParsedRealmJson.ts +20 -2
- package/src/bin/start-keycloak/realmConfig/defaultConfig/realm-kc-26.json +27 -9
- package/src/bin/start-keycloak/realmConfig/dumpContainerConfig.ts +71 -24
- package/src/bin/start-keycloak/realmConfig/prepareRealmConfig.ts +64 -1
- package/src/bin/start-keycloak/realmConfig/realmConfig.ts +13 -5
- package/src/bin/start-keycloak/start-keycloak.ts +3 -3
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
|
|