keycloakify 9.3.0 → 9.4.0-rc.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.
- package/README.md +5 -0
- package/account/kcContext/getKcContextFromWindow.js +2 -2
- package/account/kcContext/getKcContextFromWindow.js.map +1 -1
- package/bin/constants.d.ts +4 -1
- package/bin/constants.js +5 -2
- package/bin/constants.js.map +1 -1
- package/bin/copy-keycloak-resources-to-public.js +3 -4
- package/bin/copy-keycloak-resources-to-public.js.map +1 -1
- package/bin/download-builtin-keycloak-theme.js +98 -31
- package/bin/download-builtin-keycloak-theme.js.map +1 -1
- package/bin/eject-keycloak-page.js +2 -2
- package/bin/eject-keycloak-page.js.map +1 -1
- package/bin/{getSrcDirPath.js → getThemeSrcDirPath.js} +1 -1
- package/bin/getThemeSrcDirPath.js.map +1 -0
- package/bin/initialize-email-theme.js +6 -5
- package/bin/initialize-email-theme.js.map +1 -1
- package/bin/keycloakify/{BuildOptions.d.ts → buildOptions/buildOptions.d.ts} +2 -1
- package/bin/keycloakify/buildOptions/buildOptions.js +136 -0
- package/bin/keycloakify/buildOptions/buildOptions.js.map +1 -0
- package/bin/keycloakify/buildOptions/getKeycloakifyBuildDirPath.d.ts +7 -0
- package/bin/keycloakify/buildOptions/getKeycloakifyBuildDirPath.js +27 -0
- package/bin/keycloakify/buildOptions/getKeycloakifyBuildDirPath.js.map +1 -0
- package/bin/keycloakify/buildOptions/index.d.ts +1 -0
- package/bin/keycloakify/{generateJavaStackFiles → buildOptions}/index.js +1 -1
- package/bin/keycloakify/buildOptions/index.js.map +1 -0
- package/bin/keycloakify/buildOptions/parsedPackageJson.d.ts +19 -0
- package/bin/keycloakify/{parsedPackageJson.js → buildOptions/parsedPackageJson.js} +6 -7
- package/bin/keycloakify/buildOptions/parsedPackageJson.js.map +1 -0
- package/bin/keycloakify/buildOptions/resolvedViteConfig.d.ts +12 -0
- package/bin/keycloakify/buildOptions/resolvedViteConfig.js +82 -0
- package/bin/keycloakify/buildOptions/resolvedViteConfig.js.map +1 -0
- package/bin/keycloakify/generateFtl/generateFtl.d.ts +4 -1
- package/bin/keycloakify/generateFtl/generateFtl.js +5 -5
- package/bin/keycloakify/generateFtl/generateFtl.js.map +1 -1
- package/bin/keycloakify/generatePom.d.ts +12 -0
- package/bin/keycloakify/generatePom.js +59 -0
- package/bin/keycloakify/generatePom.js.map +1 -0
- package/bin/keycloakify/{generateJavaStackFiles → generateTheme}/bringInAccountV1.d.ts +2 -1
- package/bin/keycloakify/{generateJavaStackFiles → generateTheme}/bringInAccountV1.js +21 -67
- package/bin/keycloakify/generateTheme/bringInAccountV1.js.map +1 -0
- package/bin/keycloakify/generateTheme/downloadKeycloakStaticResources.d.ts +0 -3
- package/bin/keycloakify/generateTheme/downloadKeycloakStaticResources.js +5 -34
- package/bin/keycloakify/generateTheme/downloadKeycloakStaticResources.js.map +1 -1
- package/bin/keycloakify/generateTheme/generateTheme.d.ts +4 -1
- package/bin/keycloakify/generateTheme/generateTheme.js +123 -70
- package/bin/keycloakify/generateTheme/generateTheme.js.map +1 -1
- package/bin/keycloakify/keycloakify.js +13 -72
- package/bin/keycloakify/keycloakify.js.map +1 -1
- package/bin/keycloakify/replacers/replaceImportsInCssCode.js +2 -1
- package/bin/keycloakify/replacers/replaceImportsInCssCode.js.map +1 -1
- package/bin/keycloakify/replacers/replaceImportsInInlineCssCode.js +2 -1
- package/bin/keycloakify/replacers/replaceImportsInInlineCssCode.js.map +1 -1
- package/bin/keycloakify/replacers/replaceImportsInJsCode/index.d.ts +1 -0
- package/bin/keycloakify/replacers/replaceImportsInJsCode/index.js +18 -0
- package/bin/keycloakify/replacers/replaceImportsInJsCode/index.js.map +1 -0
- package/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.d.ts +12 -0
- package/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.js +70 -0
- package/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.js.map +1 -0
- package/bin/keycloakify/replacers/replaceImportsInJsCode/vite.d.ts +13 -0
- package/bin/keycloakify/replacers/replaceImportsInJsCode/vite.js +95 -0
- package/bin/keycloakify/replacers/replaceImportsInJsCode/vite.js.map +1 -0
- package/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.d.ts +12 -0
- package/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.js +108 -0
- package/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.js.map +1 -0
- package/bin/promptKeycloakVersion.js +0 -1
- package/bin/promptKeycloakVersion.js.map +1 -1
- package/bin/tools/OptionalIfCanBeUndefined.d.ts +14 -0
- package/bin/tools/OptionalIfCanBeUndefined.js +3 -0
- package/bin/tools/OptionalIfCanBeUndefined.js.map +1 -0
- package/bin/tools/SemVer.d.ts +26 -0
- package/bin/tools/{NpmModuleVersion.js → SemVer.js} +39 -23
- package/bin/tools/SemVer.js.map +1 -0
- package/bin/tools/String.prototype.replaceAll.d.ts +1 -0
- package/bin/tools/String.prototype.replaceAll.js +29 -0
- package/bin/tools/String.prototype.replaceAll.js.map +1 -0
- package/bin/tools/crawl.js +9 -9
- package/bin/tools/crawl.js.map +1 -1
- package/bin/tools/downloadAndUnzip.js +30 -19
- package/bin/tools/downloadAndUnzip.js.map +1 -1
- package/bin/tools/fs.rm.d.ts +8 -0
- package/bin/tools/fs.rm.js +151 -0
- package/bin/tools/fs.rm.js.map +1 -0
- package/bin/tools/fs.rmSync.d.ts +8 -0
- package/bin/tools/fs.rmSync.js +58 -0
- package/bin/tools/fs.rmSync.js.map +1 -0
- package/bin/tools/getAbsoluteAndInOsFormatPath.js +1 -0
- package/bin/tools/getAbsoluteAndInOsFormatPath.js.map +1 -1
- package/bin/tools/octokit-addons/getLatestsSemVersionedTag.d.ts +2 -3
- package/bin/tools/octokit-addons/getLatestsSemVersionedTag.js +6 -6
- package/bin/tools/octokit-addons/getLatestsSemVersionedTag.js.map +1 -1
- package/bin/tools/transformCodebase.d.ts +5 -1
- package/bin/tools/transformCodebase.js +31 -13
- package/bin/tools/transformCodebase.js.map +1 -1
- package/login/kcContext/getKcContextFromWindow.js +2 -2
- package/login/kcContext/getKcContextFromWindow.js.map +1 -1
- package/login/lib/useGetClassName.js +1 -1
- package/login/lib/useGetClassName.js.map +1 -1
- package/login/pages/LoginOtp.js +5 -43
- package/login/pages/LoginOtp.js.map +1 -1
- package/package.json +104 -53
- package/src/account/kcContext/getKcContextFromWindow.ts +2 -2
- package/src/bin/constants.ts +4 -1
- package/src/bin/copy-keycloak-resources-to-public.ts +2 -3
- package/src/bin/download-builtin-keycloak-theme.ts +96 -48
- package/src/bin/eject-keycloak-page.ts +1 -1
- package/src/bin/initialize-email-theme.ts +4 -3
- package/src/bin/keycloakify/buildOptions/buildOptions.ts +185 -0
- package/src/bin/keycloakify/buildOptions/getKeycloakifyBuildDirPath.ts +33 -0
- package/src/bin/keycloakify/buildOptions/index.ts +1 -0
- package/src/bin/keycloakify/{parsedPackageJson.ts → buildOptions/parsedPackageJson.ts} +4 -6
- package/src/bin/keycloakify/buildOptions/resolvedViteConfig.ts +85 -0
- package/src/bin/keycloakify/generateFtl/generateFtl.ts +12 -8
- package/src/bin/keycloakify/generatePom.ts +70 -0
- package/src/bin/keycloakify/generateStartKeycloakTestingContainer.ts +1 -1
- package/src/bin/keycloakify/generateTheme/bringInAccountV1.ts +83 -0
- package/src/bin/keycloakify/generateTheme/downloadKeycloakStaticResources.ts +11 -52
- package/src/bin/keycloakify/generateTheme/generateTheme.ts +141 -51
- package/src/bin/keycloakify/keycloakify.ts +11 -58
- package/src/bin/keycloakify/replacers/replaceImportsInCssCode.ts +3 -2
- package/src/bin/keycloakify/replacers/replaceImportsInInlineCssCode.ts +3 -2
- package/src/bin/keycloakify/replacers/replaceImportsInJsCode/index.ts +1 -0
- package/src/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.ts +66 -0
- package/src/bin/keycloakify/replacers/replaceImportsInJsCode/vite.ts +85 -0
- package/src/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.ts +90 -0
- package/src/bin/promptKeycloakVersion.ts +0 -1
- package/src/bin/tools/OptionalIfCanBeUndefined.ts +12 -0
- package/src/bin/tools/SemVer.ts +99 -0
- package/src/bin/tools/String.prototype.replaceAll.ts +30 -0
- package/src/bin/tools/crawl.ts +8 -8
- package/src/bin/tools/downloadAndUnzip.ts +11 -4
- package/src/bin/tools/fs.rm.ts +43 -0
- package/src/bin/tools/fs.rmSync.ts +34 -0
- package/src/bin/tools/getAbsoluteAndInOsFormatPath.ts +2 -0
- package/src/bin/tools/octokit-addons/getLatestsSemVersionedTag.ts +9 -9
- package/src/bin/tools/transformCodebase.ts +35 -14
- package/src/login/kcContext/getKcContextFromWindow.ts +2 -2
- package/src/login/lib/useGetClassName.ts +1 -1
- package/src/login/pages/LoginOtp.tsx +64 -94
- package/src/tsconfig.json +1 -1
- package/src/vite-plugin/config.json +232 -0
- package/src/vite-plugin/index.ts +1 -0
- package/src/vite-plugin/tsconfig.json +18 -0
- package/src/vite-plugin/vite-plugin.ts +128 -0
- package/vite-plugin/index.d.ts +1 -0
- package/vite-plugin/index.js +18 -0
- package/vite-plugin/index.js.map +1 -0
- package/vite-plugin/tsconfig.tsbuildinfo +1 -0
- package/vite-plugin/vite-plugin.d.ts +2 -0
- package/vite-plugin/vite-plugin.js +118 -0
- package/vite-plugin/vite-plugin.js.map +1 -0
- package/bin/getSrcDirPath.js.map +0 -1
- package/bin/keycloakify/BuildOptions.js +0 -113
- package/bin/keycloakify/BuildOptions.js.map +0 -1
- package/bin/keycloakify/ftlValuesGlobalName.d.ts +0 -1
- package/bin/keycloakify/ftlValuesGlobalName.js +0 -5
- package/bin/keycloakify/ftlValuesGlobalName.js.map +0 -1
- package/bin/keycloakify/generateJavaStackFiles/bringInAccountV1.js.map +0 -1
- package/bin/keycloakify/generateJavaStackFiles/generateJavaStackFiles.d.ts +0 -16
- package/bin/keycloakify/generateJavaStackFiles/generateJavaStackFiles.js +0 -205
- package/bin/keycloakify/generateJavaStackFiles/generateJavaStackFiles.js.map +0 -1
- package/bin/keycloakify/generateJavaStackFiles/index.d.ts +0 -1
- package/bin/keycloakify/generateJavaStackFiles/index.js.map +0 -1
- package/bin/keycloakify/generateTheme/readStaticResourcesUsage.d.ts +0 -15
- package/bin/keycloakify/generateTheme/readStaticResourcesUsage.js +0 -158
- package/bin/keycloakify/generateTheme/readStaticResourcesUsage.js.map +0 -1
- package/bin/keycloakify/parsedPackageJson.d.ts +0 -108
- package/bin/keycloakify/parsedPackageJson.js.map +0 -1
- package/bin/keycloakify/replacers/replaceImportsFromStaticInJsCode.d.ts +0 -5
- package/bin/keycloakify/replacers/replaceImportsFromStaticInJsCode.js +0 -74
- package/bin/keycloakify/replacers/replaceImportsFromStaticInJsCode.js.map +0 -1
- package/bin/tools/NpmModuleVersion.d.ts +0 -22
- package/bin/tools/NpmModuleVersion.js.map +0 -1
- package/src/bin/keycloakify/BuildOptions.ts +0 -157
- package/src/bin/keycloakify/ftlValuesGlobalName.ts +0 -1
- package/src/bin/keycloakify/generateJavaStackFiles/bringInAccountV1.ts +0 -101
- package/src/bin/keycloakify/generateJavaStackFiles/generateJavaStackFiles.ts +0 -141
- package/src/bin/keycloakify/generateJavaStackFiles/index.ts +0 -1
- package/src/bin/keycloakify/generateTheme/readStaticResourcesUsage.ts +0 -76
- package/src/bin/keycloakify/replacers/replaceImportsFromStaticInJsCode.ts +0 -51
- package/src/bin/tools/NpmModuleVersion.ts +0 -73
- /package/bin/{getSrcDirPath.d.ts → getThemeSrcDirPath.d.ts} +0 -0
- /package/src/bin/{getSrcDirPath.ts → getThemeSrcDirPath.ts} +0 -0
@@ -1,76 +0,0 @@
|
|
1
|
-
import { crawl } from "../../tools/crawl";
|
2
|
-
import { join as pathJoin, sep as pathSep } from "path";
|
3
|
-
import * as fs from "fs";
|
4
|
-
import type { ThemeType } from "../../constants";
|
5
|
-
|
6
|
-
/** Assumes the theme type exists */
|
7
|
-
export function readStaticResourcesUsage(params: { keycloakifySrcDirPath: string; themeSrcDirPath: string; themeType: ThemeType }): {
|
8
|
-
resourcesCommonFilePaths: string[];
|
9
|
-
} {
|
10
|
-
const { keycloakifySrcDirPath, themeSrcDirPath, themeType } = params;
|
11
|
-
|
12
|
-
const resourcesCommonFilePaths = new Set<string>();
|
13
|
-
|
14
|
-
for (const srcDirPath of [pathJoin(keycloakifySrcDirPath, themeType), pathJoin(themeSrcDirPath, themeType)]) {
|
15
|
-
const filePaths = crawl({ "dirPath": srcDirPath, "returnedPathsType": "absolute" }).filter(filePath => /\.(ts|tsx|js|jsx)$/.test(filePath));
|
16
|
-
|
17
|
-
for (const filePath of filePaths) {
|
18
|
-
const rawSourceFile = fs.readFileSync(filePath).toString("utf8");
|
19
|
-
|
20
|
-
if (!rawSourceFile.includes("resourcesCommonPath") && !rawSourceFile.includes("resourcesPath")) {
|
21
|
-
continue;
|
22
|
-
}
|
23
|
-
|
24
|
-
const wrap = readPaths({ rawSourceFile });
|
25
|
-
|
26
|
-
wrap.resourcesCommonFilePaths.forEach(filePath => resourcesCommonFilePaths.add(filePath));
|
27
|
-
}
|
28
|
-
}
|
29
|
-
|
30
|
-
return {
|
31
|
-
"resourcesCommonFilePaths": Array.from(resourcesCommonFilePaths)
|
32
|
-
};
|
33
|
-
}
|
34
|
-
|
35
|
-
/** Exported for testing purpose */
|
36
|
-
export function readPaths(params: { rawSourceFile: string }): {
|
37
|
-
resourcesCommonFilePaths: string[];
|
38
|
-
} {
|
39
|
-
const { rawSourceFile } = params;
|
40
|
-
|
41
|
-
const resourcesCommonFilePaths = new Set<string>();
|
42
|
-
|
43
|
-
{
|
44
|
-
const regexp = new RegExp(`resourcesCommonPath\\s*}([^\`]+)\``, "g");
|
45
|
-
|
46
|
-
const matches = [...rawSourceFile.matchAll(regexp)];
|
47
|
-
|
48
|
-
for (const match of matches) {
|
49
|
-
const filePath = match[1];
|
50
|
-
|
51
|
-
resourcesCommonFilePaths.add(filePath);
|
52
|
-
}
|
53
|
-
}
|
54
|
-
|
55
|
-
{
|
56
|
-
const regexp = new RegExp(`resourcesCommonPath\\s*[+,]\\s*["']([^"'\`]+)["'\`]`, "g");
|
57
|
-
|
58
|
-
const matches = [...rawSourceFile.matchAll(regexp)];
|
59
|
-
|
60
|
-
for (const match of matches) {
|
61
|
-
const filePath = match[1];
|
62
|
-
|
63
|
-
resourcesCommonFilePaths.add(filePath);
|
64
|
-
}
|
65
|
-
}
|
66
|
-
|
67
|
-
const normalizePath = (filePath: string) => {
|
68
|
-
filePath = filePath.startsWith("/") ? filePath.slice(1) : filePath;
|
69
|
-
filePath = filePath.replace(/\//g, pathSep);
|
70
|
-
return filePath;
|
71
|
-
};
|
72
|
-
|
73
|
-
return {
|
74
|
-
"resourcesCommonFilePaths": Array.from(resourcesCommonFilePaths).map(normalizePath)
|
75
|
-
};
|
76
|
-
}
|
@@ -1,51 +0,0 @@
|
|
1
|
-
import { ftlValuesGlobalName } from "../ftlValuesGlobalName";
|
2
|
-
|
3
|
-
export function replaceImportsFromStaticInJsCode(params: { jsCode: string }): { fixedJsCode: string } {
|
4
|
-
/*
|
5
|
-
NOTE:
|
6
|
-
|
7
|
-
When we have urlOrigin defined it means that
|
8
|
-
we are building with --external-assets
|
9
|
-
so we have to make sur that the fixed js code will run
|
10
|
-
inside and outside keycloak.
|
11
|
-
|
12
|
-
When urlOrigin isn't defined we can assume the fixedJsCode
|
13
|
-
will always run in keycloak context.
|
14
|
-
*/
|
15
|
-
|
16
|
-
const { jsCode } = params;
|
17
|
-
|
18
|
-
const getReplaceArgs = (language: "js" | "css"): Parameters<typeof String.prototype.replace> => [
|
19
|
-
new RegExp(`([a-zA-Z_]+)\\.([a-zA-Z]+)=(function\\(([a-z]+)\\){return|([a-z]+)=>)"static\\/${language}\\/"`, "g"),
|
20
|
-
(...[, n, u, matchedFunction, eForFunction]) => {
|
21
|
-
const isArrowFunction = matchedFunction.includes("=>");
|
22
|
-
const e = isArrowFunction ? matchedFunction.replace("=>", "").trim() : eForFunction;
|
23
|
-
|
24
|
-
return `
|
25
|
-
${n}[(function(){
|
26
|
-
var pd = Object.getOwnPropertyDescriptor(${n}, "p");
|
27
|
-
if( pd === undefined || pd.configurable ){
|
28
|
-
Object.defineProperty(${n}, "p", {
|
29
|
-
get: function() { return window.${ftlValuesGlobalName}.url.resourcesPath; },
|
30
|
-
set: function() {}
|
31
|
-
});
|
32
|
-
}
|
33
|
-
return "${u}";
|
34
|
-
})()] = ${isArrowFunction ? `${e} =>` : `function(${e}) { return `} "/build/static/${language}/"`
|
35
|
-
.replace(/\s+/g, " ")
|
36
|
-
.trim();
|
37
|
-
}
|
38
|
-
];
|
39
|
-
|
40
|
-
const fixedJsCode = jsCode
|
41
|
-
.replace(...getReplaceArgs("js"))
|
42
|
-
.replace(...getReplaceArgs("css"))
|
43
|
-
.replace(/[a-zA-Z]+\.[a-zA-Z]+\+"static\//g, `window.${ftlValuesGlobalName}.url.resourcesPath + "/build/static/`)
|
44
|
-
//TODO: Write a test case for this
|
45
|
-
.replace(
|
46
|
-
/".chunk.css",([a-zA-Z])+=[a-zA-Z]+\.[a-zA-Z]+\+([a-zA-Z]+),/,
|
47
|
-
(...[, group1, group2]) => `".chunk.css",${group1} = window.${ftlValuesGlobalName}.url.resourcesPath + "/build/" + ${group2},`
|
48
|
-
);
|
49
|
-
|
50
|
-
return { fixedJsCode };
|
51
|
-
}
|
@@ -1,73 +0,0 @@
|
|
1
|
-
export type NpmModuleVersion = {
|
2
|
-
major: number;
|
3
|
-
minor: number;
|
4
|
-
patch: number;
|
5
|
-
betaPreRelease?: number;
|
6
|
-
};
|
7
|
-
|
8
|
-
export namespace NpmModuleVersion {
|
9
|
-
export function parse(versionStr: string): NpmModuleVersion {
|
10
|
-
const match = versionStr.match(/^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-beta.([0-9]+))?/);
|
11
|
-
|
12
|
-
if (!match) {
|
13
|
-
throw new Error(`${versionStr} is not a valid NPM version`);
|
14
|
-
}
|
15
|
-
|
16
|
-
return {
|
17
|
-
"major": parseInt(match[1]),
|
18
|
-
"minor": parseInt(match[2]),
|
19
|
-
"patch": parseInt(match[3]),
|
20
|
-
...(() => {
|
21
|
-
const str = match[4];
|
22
|
-
return str === undefined ? {} : { "betaPreRelease": parseInt(str) };
|
23
|
-
})()
|
24
|
-
};
|
25
|
-
}
|
26
|
-
|
27
|
-
export function stringify(v: NpmModuleVersion) {
|
28
|
-
return `${v.major}.${v.minor}.${v.patch}${v.betaPreRelease === undefined ? "" : `-beta.${v.betaPreRelease}`}`;
|
29
|
-
}
|
30
|
-
|
31
|
-
/**
|
32
|
-
*
|
33
|
-
* v1 < v2 => -1
|
34
|
-
* v1 === v2 => 0
|
35
|
-
* v1 > v2 => 1
|
36
|
-
*
|
37
|
-
*/
|
38
|
-
export function compare(v1: NpmModuleVersion, v2: NpmModuleVersion): -1 | 0 | 1 {
|
39
|
-
const sign = (diff: number): -1 | 0 | 1 => (diff === 0 ? 0 : diff < 0 ? -1 : 1);
|
40
|
-
const noUndefined = (n: number | undefined) => n ?? Infinity;
|
41
|
-
|
42
|
-
for (const level of ["major", "minor", "patch", "betaPreRelease"] as const) {
|
43
|
-
if (noUndefined(v1[level]) !== noUndefined(v2[level])) {
|
44
|
-
return sign(noUndefined(v1[level]) - noUndefined(v2[level]));
|
45
|
-
}
|
46
|
-
}
|
47
|
-
|
48
|
-
return 0;
|
49
|
-
}
|
50
|
-
|
51
|
-
/*
|
52
|
-
console.log(compare(parse("3.0.0-beta.3"), parse("3.0.0")) === -1 )
|
53
|
-
console.log(compare(parse("3.0.0-beta.3"), parse("3.0.0-beta.4")) === -1 )
|
54
|
-
console.log(compare(parse("3.0.0-beta.3"), parse("4.0.0")) === -1 )
|
55
|
-
*/
|
56
|
-
|
57
|
-
export function bumpType(params: { versionBehindStr: string; versionAheadStr: string }): "major" | "minor" | "patch" | "betaPreRelease" | "same" {
|
58
|
-
const versionAhead = parse(params.versionAheadStr);
|
59
|
-
const versionBehind = parse(params.versionBehindStr);
|
60
|
-
|
61
|
-
if (compare(versionBehind, versionAhead) === 1) {
|
62
|
-
throw new Error(`Version regression ${versionBehind} -> ${versionAhead}`);
|
63
|
-
}
|
64
|
-
|
65
|
-
for (const level of ["major", "minor", "patch", "betaPreRelease"] as const) {
|
66
|
-
if (versionBehind[level] !== versionAhead[level]) {
|
67
|
-
return level;
|
68
|
-
}
|
69
|
-
}
|
70
|
-
|
71
|
-
return "same";
|
72
|
-
}
|
73
|
-
}
|
File without changes
|
File without changes
|