keycloakify 11.8.7 → 11.8.8

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/355.index.js CHANGED
@@ -233,9 +233,17 @@ async function initializeSpa(params) {
233
233
  return match[1];
234
234
  })();
235
235
  const moduleName = `@keycloakify/keycloak-${themeType}-ui`;
236
- const version = JSON.parse(child_process__WEBPACK_IMPORTED_MODULE_6__.execSync(`npm show ${moduleName} versions --json`)
237
- .toString("utf8")
238
- .trim())
236
+ const version = (() => {
237
+ const cmdOutput = child_process__WEBPACK_IMPORTED_MODULE_6__.execSync(`npm show ${moduleName} versions --json`)
238
+ .toString("utf8")
239
+ .trim();
240
+ const versions = JSON.parse(cmdOutput);
241
+ // NOTE: Bug in some older npm versions
242
+ if (typeof versions === "string") {
243
+ return [versions];
244
+ }
245
+ return versions;
246
+ })()
239
247
  .reverse()
240
248
  .filter(version => !version.includes("-"))
241
249
  .find(version => uiSharedMajor === undefined ? true : version.startsWith(`${uiSharedMajor}.`));
package/bin/656.index.js CHANGED
@@ -78,9 +78,17 @@ async function initializeSpa(params) {
78
78
  return match[1];
79
79
  })();
80
80
  const moduleName = `@keycloakify/keycloak-${themeType}-ui`;
81
- const version = JSON.parse(child_process__WEBPACK_IMPORTED_MODULE_6__.execSync(`npm show ${moduleName} versions --json`)
82
- .toString("utf8")
83
- .trim())
81
+ const version = (() => {
82
+ const cmdOutput = child_process__WEBPACK_IMPORTED_MODULE_6__.execSync(`npm show ${moduleName} versions --json`)
83
+ .toString("utf8")
84
+ .trim();
85
+ const versions = JSON.parse(cmdOutput);
86
+ // NOTE: Bug in some older npm versions
87
+ if (typeof versions === "string") {
88
+ return [versions];
89
+ }
90
+ return versions;
91
+ })()
84
92
  .reverse()
85
93
  .filter(version => !version.includes("-"))
86
94
  .find(version => uiSharedMajor === undefined ? true : version.startsWith(`${uiSharedMajor}.`));
package/bin/932.index.js CHANGED
@@ -92,9 +92,17 @@ async function command(params) {
92
92
  buildContext
93
93
  });
94
94
  const moduleName = `@keycloakify/email-native`;
95
- const [version] = JSON.parse(child_process__WEBPACK_IMPORTED_MODULE_9__.execSync(`npm show ${moduleName} versions --json`)
96
- .toString("utf8")
97
- .trim())
95
+ const [version] = (() => {
96
+ const cmdOutput = child_process__WEBPACK_IMPORTED_MODULE_9__.execSync(`npm show ${moduleName} versions --json`)
97
+ .toString("utf8")
98
+ .trim();
99
+ const versions = JSON.parse(cmdOutput);
100
+ // NOTE: Bug in some older npm versions
101
+ if (typeof versions === "string") {
102
+ return [versions];
103
+ }
104
+ return versions;
105
+ })()
98
106
  .reverse()
99
107
  .filter(version => !version.includes("-"));
100
108
  (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_5__/* .assert */ .h)(version !== undefined);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keycloakify",
3
- "version": "11.8.7",
3
+ "version": "11.8.8",
4
4
  "description": "Framework to create custom Keycloak UIs",
5
5
  "repository": {
6
6
  "type": "git",
@@ -103,14 +103,21 @@ export async function command(params: { buildContext: BuildContext }) {
103
103
 
104
104
  const moduleName = `@keycloakify/email-native`;
105
105
 
106
- const [version] = (
107
- JSON.parse(
108
- child_process
109
- .execSync(`npm show ${moduleName} versions --json`)
110
- .toString("utf8")
111
- .trim()
112
- ) as string[]
113
- )
106
+ const [version] = ((): string[] => {
107
+ const cmdOutput = child_process
108
+ .execSync(`npm show ${moduleName} versions --json`)
109
+ .toString("utf8")
110
+ .trim();
111
+
112
+ const versions = JSON.parse(cmdOutput) as string | string[];
113
+
114
+ // NOTE: Bug in some older npm versions
115
+ if (typeof versions === "string") {
116
+ return [versions];
117
+ }
118
+
119
+ return versions;
120
+ })()
114
121
  .reverse()
115
122
  .filter(version => !version.includes("-"));
116
123
 
@@ -105,14 +105,21 @@ export async function initializeSpa(params: {
105
105
 
106
106
  const moduleName = `@keycloakify/keycloak-${themeType}-ui`;
107
107
 
108
- const version = (
109
- JSON.parse(
110
- child_process
111
- .execSync(`npm show ${moduleName} versions --json`)
112
- .toString("utf8")
113
- .trim()
114
- ) as string[]
115
- )
108
+ const version = ((): string[] => {
109
+ const cmdOutput = child_process
110
+ .execSync(`npm show ${moduleName} versions --json`)
111
+ .toString("utf8")
112
+ .trim();
113
+
114
+ const versions = JSON.parse(cmdOutput) as string | string[];
115
+
116
+ // NOTE: Bug in some older npm versions
117
+ if (typeof versions === "string") {
118
+ return [versions];
119
+ }
120
+
121
+ return versions;
122
+ })()
116
123
  .reverse()
117
124
  .filter(version => !version.includes("-"))
118
125
  .find(version =>