keycloakify 8.2.0 → 8.2.1
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/keycloakify/generateTheme/downloadKeycloakStaticResources.d.ts +0 -1
- package/bin/keycloakify/generateTheme/downloadKeycloakStaticResources.js.map +1 -1
- package/bin/keycloakify/generateTheme/readStaticResourcesUsage.d.ts +0 -2
- package/bin/keycloakify/generateTheme/readStaticResourcesUsage.js +37 -51
- package/bin/keycloakify/generateTheme/readStaticResourcesUsage.js.map +1 -1
- package/package.json +1 -1
- package/src/bin/keycloakify/generateTheme/downloadKeycloakStaticResources.ts +0 -1
- package/src/bin/keycloakify/generateTheme/readStaticResourcesUsage.ts +21 -28
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"downloadKeycloakStaticResources.js","sourceRoot":"","sources":["../../../src/bin/keycloakify/generateTheme/downloadKeycloakStaticResources.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mEAAkE;AAClE,qCAAyB;AACzB,6BAA0F;AAE1F,yFAAqF;AACrF,2EAIwC;AACxC,6CAAiC;AACjC,uCAAsC;AAEtC,SAAsB,+BAA+B;AACjD,kBAAkB;AAClB,
|
1
|
+
{"version":3,"file":"downloadKeycloakStaticResources.js","sourceRoot":"","sources":["../../../src/bin/keycloakify/generateTheme/downloadKeycloakStaticResources.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mEAAkE;AAClE,qCAAyB;AACzB,6BAA0F;AAE1F,yFAAqF;AACrF,2EAIwC;AACxC,6CAAiC;AACjC,uCAAsC;AAEtC,SAAsB,+BAA+B;AACjD,kBAAkB;AAClB,MAQC;;;;;;oBAEO,cAAc,GAA+C,MAAM,eAArD,EAAE,SAAS,GAAoC,MAAM,UAA1C,EAAE,YA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Y,EAAC,2DAAgC,EAAE,8DAAmC,CAAC,CAAC;qBAC7H,CAAC,CAAC;oBAEH,IAAA,qCAAiB,EAAC;wBACd,YAAY,EAAE,IAAA,WAAQ,EAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,CAAC;wBACrE,aAAa,EAAE,IAAA,WAAQ,EAAC,YAAY,EAAE,IAAA,eAAY,EAAC,2DAAgC,EAAE,oEAAyC,CAAC,CAAC;wBAChI,qBAAqB,EACjB,aAAa,KAAK,SAAS;4BACvB,CAAC,CAAC,SAAS;4BACX,CAAC,CAAC,UAAC,EAAgC;oCAA9B,gBAAgB,sBAAA,EAAE,UAAU,gBAAA;gCAC3B,IAAI,aAAa,CAAC,uBAAuB,CAAC,IAAI,CAAC,UAAA,OAAO,IAAI,OAAA,gBAAgB,CAAC,UAAU,CAAC,OAAO,CAAC,EAApC,CAAoC,CAAC,KAAK,SAAS,EAAE;oCAC3G,OAAO,SAAS,CAAC;iCACpB;gCAED,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,CAAC;4BAChD,CAAC;qBACd,CAAC,CAAC;oBAEH,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;;;;;CAC/D;AAxED,0EAwEC"}
|
@@ -6,12 +6,10 @@ export declare function readStaticResourcesUsage(params: {
|
|
6
6
|
themeType: ThemeType;
|
7
7
|
}): {
|
8
8
|
resourcesCommonFilePaths: string[];
|
9
|
-
resourcesFilePaths: string[];
|
10
9
|
};
|
11
10
|
/** Exported for testing purpose */
|
12
11
|
export declare function readPaths(params: {
|
13
12
|
rawSourceFile: string;
|
14
13
|
}): {
|
15
14
|
resourcesCommonFilePaths: string[];
|
16
|
-
resourcesFilePaths: string[];
|
17
15
|
};
|
@@ -68,7 +68,6 @@ function readStaticResourcesUsage(params) {
|
|
68
68
|
var e_1, _a, e_2, _b;
|
69
69
|
var keycloakifySrcDirPath = params.keycloakifySrcDirPath, themeSrcDirPath = params.themeSrcDirPath, themeType = params.themeType;
|
70
70
|
var resourcesCommonFilePaths = new Set();
|
71
|
-
var resourcesFilePaths = new Set();
|
72
71
|
try {
|
73
72
|
for (var _c = __values([(0, path_1.join)(keycloakifySrcDirPath, themeType), (0, path_1.join)(themeSrcDirPath, themeType)]), _d = _c.next(); !_d.done; _d = _c.next()) {
|
74
73
|
var srcDirPath = _d.value;
|
@@ -82,7 +81,6 @@ function readStaticResourcesUsage(params) {
|
|
82
81
|
}
|
83
82
|
var wrap = readPaths({ rawSourceFile: rawSourceFile });
|
84
83
|
wrap.resourcesCommonFilePaths.forEach(function (filePath) { return resourcesCommonFilePaths.add(filePath); });
|
85
|
-
wrap.resourcesFilePaths.forEach(function (filePath) { return resourcesFilePaths.add(filePath); });
|
86
84
|
}
|
87
85
|
}
|
88
86
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
@@ -102,70 +100,58 @@ function readStaticResourcesUsage(params) {
|
|
102
100
|
finally { if (e_1) throw e_1.error; }
|
103
101
|
}
|
104
102
|
return {
|
105
|
-
"resourcesCommonFilePaths": Array.from(resourcesCommonFilePaths)
|
106
|
-
"resourcesFilePaths": Array.from(resourcesFilePaths)
|
103
|
+
"resourcesCommonFilePaths": Array.from(resourcesCommonFilePaths)
|
107
104
|
};
|
108
105
|
}
|
109
106
|
exports.readStaticResourcesUsage = readStaticResourcesUsage;
|
110
107
|
/** Exported for testing purpose */
|
111
108
|
function readPaths(params) {
|
112
|
-
var e_3, _a, e_4, _b
|
109
|
+
var e_3, _a, e_4, _b;
|
113
110
|
var rawSourceFile = params.rawSourceFile;
|
114
111
|
var resourcesCommonFilePaths = new Set();
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
var
|
120
|
-
|
121
|
-
var
|
122
|
-
|
123
|
-
try {
|
124
|
-
for (var matches_1 = (e_4 = void 0, __values(matches)), matches_1_1 = matches_1.next(); !matches_1_1.done; matches_1_1 = matches_1.next()) {
|
125
|
-
var match = matches_1_1.value;
|
126
|
-
var filePath = match[1];
|
127
|
-
set.add(filePath);
|
128
|
-
}
|
129
|
-
}
|
130
|
-
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
131
|
-
finally {
|
132
|
-
try {
|
133
|
-
if (matches_1_1 && !matches_1_1.done && (_b = matches_1.return)) _b.call(matches_1);
|
134
|
-
}
|
135
|
-
finally { if (e_4) throw e_4.error; }
|
136
|
-
}
|
112
|
+
{
|
113
|
+
var regexp = new RegExp("resourcesCommonPath\\s*}([^`]+)`", "g");
|
114
|
+
var matches = __spreadArray([], __read(rawSourceFile.matchAll(regexp)), false);
|
115
|
+
try {
|
116
|
+
for (var matches_1 = __values(matches), matches_1_1 = matches_1.next(); !matches_1_1.done; matches_1_1 = matches_1.next()) {
|
117
|
+
var match = matches_1_1.value;
|
118
|
+
var filePath = match[1];
|
119
|
+
resourcesCommonFilePaths.add(filePath);
|
137
120
|
}
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
var match = matches_2_1.value;
|
144
|
-
var filePath = match[1];
|
145
|
-
set.add(filePath);
|
146
|
-
}
|
147
|
-
}
|
148
|
-
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
149
|
-
finally {
|
150
|
-
try {
|
151
|
-
if (matches_2_1 && !matches_2_1.done && (_c = matches_2.return)) _c.call(matches_2);
|
152
|
-
}
|
153
|
-
finally { if (e_5) throw e_5.error; }
|
154
|
-
}
|
121
|
+
}
|
122
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
123
|
+
finally {
|
124
|
+
try {
|
125
|
+
if (matches_1_1 && !matches_1_1.done && (_a = matches_1.return)) _a.call(matches_1);
|
155
126
|
}
|
127
|
+
finally { if (e_3) throw e_3.error; }
|
156
128
|
}
|
157
129
|
}
|
158
|
-
|
159
|
-
|
130
|
+
{
|
131
|
+
var regexp = new RegExp("resourcesCommonPath\\s*[+,]\\s*[\"']([^\"'`]+)[\"'`]", "g");
|
132
|
+
var matches = __spreadArray([], __read(rawSourceFile.matchAll(regexp)), false);
|
160
133
|
try {
|
161
|
-
|
134
|
+
for (var matches_2 = __values(matches), matches_2_1 = matches_2.next(); !matches_2_1.done; matches_2_1 = matches_2.next()) {
|
135
|
+
var match = matches_2_1.value;
|
136
|
+
var filePath = match[1];
|
137
|
+
resourcesCommonFilePaths.add(filePath);
|
138
|
+
}
|
139
|
+
}
|
140
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
141
|
+
finally {
|
142
|
+
try {
|
143
|
+
if (matches_2_1 && !matches_2_1.done && (_b = matches_2.return)) _b.call(matches_2);
|
144
|
+
}
|
145
|
+
finally { if (e_4) throw e_4.error; }
|
162
146
|
}
|
163
|
-
finally { if (e_3) throw e_3.error; }
|
164
147
|
}
|
165
|
-
var
|
148
|
+
var normalizePath = function (filePath) {
|
149
|
+
filePath = filePath.startsWith("/") ? filePath.slice(1) : filePath;
|
150
|
+
filePath = filePath.replace(/\//g, path_1.sep);
|
151
|
+
return filePath;
|
152
|
+
};
|
166
153
|
return {
|
167
|
-
"resourcesCommonFilePaths": Array.from(resourcesCommonFilePaths).map(
|
168
|
-
"resourcesFilePaths": Array.from(resourcesFilePaths).map(removePrefixSlash)
|
154
|
+
"resourcesCommonFilePaths": Array.from(resourcesCommonFilePaths).map(normalizePath)
|
169
155
|
};
|
170
156
|
}
|
171
157
|
exports.readPaths = readPaths;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"readStaticResourcesUsage.js","sourceRoot":"","sources":["../../../src/bin/keycloakify/generateTheme/readStaticResourcesUsage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA0C;AAC1C,
|
1
|
+
{"version":3,"file":"readStaticResourcesUsage.js","sourceRoot":"","sources":["../../../src/bin/keycloakify/generateTheme/readStaticResourcesUsage.ts"],"names":[],"m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,CAAC,CAAC,CAAC,QAAQ,CAAC;QACnE,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,UAAO,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC;IACpB,CAAC,CAAC;IAEF,OAAO;QACH,0BAA0B,EAAE,KAAK,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC;KACtF,CAAC;AACN,CAAC;AAxCD,8BAwCC"}
|
package/package.json
CHANGED
@@ -1,17 +1,15 @@
|
|
1
1
|
import { crawl } from "../../tools/crawl";
|
2
|
-
import { join as pathJoin } from "path";
|
2
|
+
import { join as pathJoin, sep as pathSep } from "path";
|
3
3
|
import * as fs from "fs";
|
4
4
|
import type { ThemeType } from "../generateFtl";
|
5
5
|
|
6
6
|
/** Assumes the theme type exists */
|
7
7
|
export function readStaticResourcesUsage(params: { keycloakifySrcDirPath: string; themeSrcDirPath: string; themeType: ThemeType }): {
|
8
8
|
resourcesCommonFilePaths: string[];
|
9
|
-
resourcesFilePaths: string[];
|
10
9
|
} {
|
11
10
|
const { keycloakifySrcDirPath, themeSrcDirPath, themeType } = params;
|
12
11
|
|
13
12
|
const resourcesCommonFilePaths = new Set<string>();
|
14
|
-
const resourcesFilePaths = new Set<string>();
|
15
13
|
|
16
14
|
for (const srcDirPath of [pathJoin(keycloakifySrcDirPath, themeType), pathJoin(themeSrcDirPath, themeType)]) {
|
17
15
|
const filePaths = crawl({ "dirPath": srcDirPath, "returnedPathsType": "absolute" }).filter(filePath => /\.(ts|tsx|js|jsx)$/.test(filePath));
|
@@ -26,58 +24,53 @@ export function readStaticResourcesUsage(params: { keycloakifySrcDirPath: string
|
|
26
24
|
const wrap = readPaths({ rawSourceFile });
|
27
25
|
|
28
26
|
wrap.resourcesCommonFilePaths.forEach(filePath => resourcesCommonFilePaths.add(filePath));
|
29
|
-
wrap.resourcesFilePaths.forEach(filePath => resourcesFilePaths.add(filePath));
|
30
27
|
}
|
31
28
|
}
|
32
29
|
|
33
30
|
return {
|
34
|
-
"resourcesCommonFilePaths": Array.from(resourcesCommonFilePaths)
|
35
|
-
"resourcesFilePaths": Array.from(resourcesFilePaths)
|
31
|
+
"resourcesCommonFilePaths": Array.from(resourcesCommonFilePaths)
|
36
32
|
};
|
37
33
|
}
|
38
34
|
|
39
35
|
/** Exported for testing purpose */
|
40
36
|
export function readPaths(params: { rawSourceFile: string }): {
|
41
37
|
resourcesCommonFilePaths: string[];
|
42
|
-
resourcesFilePaths: string[];
|
43
38
|
} {
|
44
39
|
const { rawSourceFile } = params;
|
45
40
|
|
46
41
|
const resourcesCommonFilePaths = new Set<string>();
|
47
|
-
const resourcesFilePaths = new Set<string>();
|
48
42
|
|
49
|
-
|
50
|
-
const
|
43
|
+
{
|
44
|
+
const regexp = new RegExp(`resourcesCommonPath\\s*}([^\`]+)\``, "g");
|
51
45
|
|
52
|
-
|
53
|
-
const regexp = new RegExp(`resources${isCommon ? "Common" : ""}Path\\s*}([^\`]+)\``, "g");
|
46
|
+
const matches = [...rawSourceFile.matchAll(regexp)];
|
54
47
|
|
55
|
-
|
48
|
+
for (const match of matches) {
|
49
|
+
const filePath = match[1];
|
56
50
|
|
57
|
-
|
58
|
-
const filePath = match[1];
|
59
|
-
|
60
|
-
set.add(filePath);
|
61
|
-
}
|
51
|
+
resourcesCommonFilePaths.add(filePath);
|
62
52
|
}
|
53
|
+
}
|
63
54
|
|
64
|
-
|
65
|
-
|
55
|
+
{
|
56
|
+
const regexp = new RegExp(`resourcesCommonPath\\s*[+,]\\s*["']([^"'\`]+)["'\`]`, "g");
|
66
57
|
|
67
|
-
|
58
|
+
const matches = [...rawSourceFile.matchAll(regexp)];
|
68
59
|
|
69
|
-
|
70
|
-
|
60
|
+
for (const match of matches) {
|
61
|
+
const filePath = match[1];
|
71
62
|
|
72
|
-
|
73
|
-
}
|
63
|
+
resourcesCommonFilePaths.add(filePath);
|
74
64
|
}
|
75
65
|
}
|
76
66
|
|
77
|
-
const
|
67
|
+
const normalizePath = (filePath: string) => {
|
68
|
+
filePath = filePath.startsWith("/") ? filePath.slice(1) : filePath;
|
69
|
+
filePath = filePath.replace(/\//g, pathSep);
|
70
|
+
return filePath;
|
71
|
+
};
|
78
72
|
|
79
73
|
return {
|
80
|
-
"resourcesCommonFilePaths": Array.from(resourcesCommonFilePaths).map(
|
81
|
-
"resourcesFilePaths": Array.from(resourcesFilePaths).map(removePrefixSlash)
|
74
|
+
"resourcesCommonFilePaths": Array.from(resourcesCommonFilePaths).map(normalizePath)
|
82
75
|
};
|
83
76
|
}
|