@keycloakify/angular 0.2.10 → 0.2.12
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 -6
- package/bin/187.index.js +3 -3
- package/bin/{811.index.js → 279.index.js} +196 -724
- package/bin/476.index.js +1 -675
- package/bin/671.index.js +618 -3
- package/bin/942.index.js +617 -2
- package/bin/index.js +686 -21
- package/fesm2022/keycloakify-angular-account-directives-kc-class.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-account.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-applications.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-federatedIdentity.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-log.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-password.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-sessions.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-totp.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-services-account-resource-injector.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-services-i18n.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-template.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-directives-attributes.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-pipes-input-type.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-pipes-is-array-with-empty-object.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-pipes-kc-sanitize.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-pipes-to-array.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-pipes-to-number.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-services-resource-injector.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-add-remove-buttons-multi-valued-attribute.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-field-errors.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-group-label.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-input-field-by-type.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-input-tag-selects.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-input-tag.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-logout-other-sessions.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-password-wrapper.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-select-tag.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-textarea-tag.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-user-profile-form-fields.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-directives-kc-class.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-code.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-delete-account-confirm.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-delete-credential.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-error.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-frontchannel-logout.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-idp-review-user-profile.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-info.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-config-totp.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm-override.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-email.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-oauth-grant.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-oauth2-device-verify-user-code.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-otp.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-page-expired.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-passkeys-conditional-authenticate.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-password.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-config.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-input.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-reset-otp.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-reset-password.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-update-password.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-update-profile.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-username.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-verify-email.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-x509-info.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-logout-confirm.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-register.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-saml-post-form.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-select-authenticator.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-terms.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-update-email.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-webauthn-authenticate.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-webauthn-error.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-webauthn-register.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-services-i18n.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-services-login-resource-injector.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-services-user-profile-form.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-template.mjs +3 -3
- package/package.json +2 -2
- package/src/bin/main.ts +9 -0
- package/bin/986.index.js +0 -1294
package/bin/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "module";
|
|
|
12
12
|
/* harmony export */ qA: () => (/* binding */ THEME_TYPES),
|
|
13
13
|
/* harmony export */ yp: () => (/* binding */ CUSTOM_HANDLER_ENV_NAMES)
|
|
14
14
|
/* harmony export */ });
|
|
15
|
-
/* unused harmony exports WELL_KNOWN_DIRECTORY_BASE_NAME, VITE_PLUGIN_SUB_SCRIPTS_ENV_NAMES, BUILD_FOR_KEYCLOAK_MAJOR_VERSION_ENV_NAME, CONTAINER_NAME, FALLBACK_LANGUAGE_TAG, KEYCLOAK_THEME, KEYCLOAKIFY_SPA_DEV_SERVER_PORT */
|
|
15
|
+
/* unused harmony exports WELL_KNOWN_DIRECTORY_BASE_NAME, VITE_PLUGIN_SUB_SCRIPTS_ENV_NAMES, BUILD_FOR_KEYCLOAK_MAJOR_VERSION_ENV_NAME, CONTAINER_NAME, FALLBACK_LANGUAGE_TAG, KEYCLOAK_THEME, KEYCLOAKIFY_SPA_DEV_SERVER_PORT, KEYCLOAKIFY_LOGGING_VERSION, KEYCLOAKIFY_LOGIN_JAR_BASENAME, TEST_APP_URL */
|
|
16
16
|
const WELL_KNOWN_DIRECTORY_BASE_NAME = {
|
|
17
17
|
KEYCLOAKIFY_DEV_RESOURCES: "keycloakify-dev-resources",
|
|
18
18
|
RESOURCES_COMMON: "resources-common",
|
|
@@ -80,6 +80,9 @@ const CUSTOM_HANDLER_ENV_NAMES = {
|
|
|
80
80
|
};
|
|
81
81
|
const KEYCLOAK_THEME = "keycloak-theme";
|
|
82
82
|
const KEYCLOAKIFY_SPA_DEV_SERVER_PORT = "KEYCLOAKIFY_SPA_DEV_SERVER_PORT";
|
|
83
|
+
const KEYCLOAKIFY_LOGGING_VERSION = "1.0.3";
|
|
84
|
+
const KEYCLOAKIFY_LOGIN_JAR_BASENAME = (/* unused pure expression or super */ null && (`keycloakify-logging-${KEYCLOAKIFY_LOGGING_VERSION}.jar`));
|
|
85
|
+
const TEST_APP_URL = "https://my-theme.keycloakify.dev";
|
|
83
86
|
//# sourceMappingURL=constants.js.map
|
|
84
87
|
|
|
85
88
|
/***/ }),
|
|
@@ -119,45 +122,698 @@ module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("fs/promises"
|
|
|
119
122
|
|
|
120
123
|
/***/ }),
|
|
121
124
|
|
|
122
|
-
/***/
|
|
125
|
+
/***/ 928:
|
|
123
126
|
/***/ ((module) => {
|
|
124
127
|
|
|
125
|
-
module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("
|
|
128
|
+
module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("path");
|
|
126
129
|
|
|
127
130
|
/***/ }),
|
|
128
131
|
|
|
129
|
-
/***/
|
|
132
|
+
/***/ 785:
|
|
130
133
|
/***/ ((module) => {
|
|
131
134
|
|
|
132
|
-
module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("
|
|
135
|
+
module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("readline");
|
|
133
136
|
|
|
134
137
|
/***/ }),
|
|
135
138
|
|
|
136
|
-
/***/
|
|
139
|
+
/***/ 16:
|
|
137
140
|
/***/ ((module) => {
|
|
138
141
|
|
|
139
|
-
module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("
|
|
142
|
+
module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("url");
|
|
140
143
|
|
|
141
144
|
/***/ }),
|
|
142
145
|
|
|
143
|
-
/***/
|
|
144
|
-
/***/ ((
|
|
146
|
+
/***/ 276:
|
|
147
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
145
148
|
|
|
146
|
-
module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("path");
|
|
147
149
|
|
|
148
|
-
|
|
150
|
+
// EXPORTS
|
|
151
|
+
__nccwpck_require__.d(__webpack_exports__, {
|
|
152
|
+
Ay: () => (/* binding */ source)
|
|
153
|
+
});
|
|
149
154
|
|
|
150
|
-
|
|
151
|
-
/***/ ((module) => {
|
|
155
|
+
// UNUSED EXPORTS: Chalk, backgroundColorNames, backgroundColors, chalkStderr, colorNames, colors, foregroundColorNames, foregroundColors, modifierNames, modifiers, supportsColor, supportsColorStderr
|
|
152
156
|
|
|
153
|
-
|
|
157
|
+
;// CONCATENATED MODULE: ./node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
158
|
+
const ANSI_BACKGROUND_OFFSET = 10;
|
|
154
159
|
|
|
155
|
-
|
|
160
|
+
const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`;
|
|
156
161
|
|
|
157
|
-
|
|
158
|
-
|
|
162
|
+
const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`;
|
|
163
|
+
|
|
164
|
+
const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
|
|
165
|
+
|
|
166
|
+
const styles = {
|
|
167
|
+
modifier: {
|
|
168
|
+
reset: [0, 0],
|
|
169
|
+
// 21 isn't widely supported and 22 does the same thing
|
|
170
|
+
bold: [1, 22],
|
|
171
|
+
dim: [2, 22],
|
|
172
|
+
italic: [3, 23],
|
|
173
|
+
underline: [4, 24],
|
|
174
|
+
overline: [53, 55],
|
|
175
|
+
inverse: [7, 27],
|
|
176
|
+
hidden: [8, 28],
|
|
177
|
+
strikethrough: [9, 29],
|
|
178
|
+
},
|
|
179
|
+
color: {
|
|
180
|
+
black: [30, 39],
|
|
181
|
+
red: [31, 39],
|
|
182
|
+
green: [32, 39],
|
|
183
|
+
yellow: [33, 39],
|
|
184
|
+
blue: [34, 39],
|
|
185
|
+
magenta: [35, 39],
|
|
186
|
+
cyan: [36, 39],
|
|
187
|
+
white: [37, 39],
|
|
188
|
+
|
|
189
|
+
// Bright color
|
|
190
|
+
blackBright: [90, 39],
|
|
191
|
+
gray: [90, 39], // Alias of `blackBright`
|
|
192
|
+
grey: [90, 39], // Alias of `blackBright`
|
|
193
|
+
redBright: [91, 39],
|
|
194
|
+
greenBright: [92, 39],
|
|
195
|
+
yellowBright: [93, 39],
|
|
196
|
+
blueBright: [94, 39],
|
|
197
|
+
magentaBright: [95, 39],
|
|
198
|
+
cyanBright: [96, 39],
|
|
199
|
+
whiteBright: [97, 39],
|
|
200
|
+
},
|
|
201
|
+
bgColor: {
|
|
202
|
+
bgBlack: [40, 49],
|
|
203
|
+
bgRed: [41, 49],
|
|
204
|
+
bgGreen: [42, 49],
|
|
205
|
+
bgYellow: [43, 49],
|
|
206
|
+
bgBlue: [44, 49],
|
|
207
|
+
bgMagenta: [45, 49],
|
|
208
|
+
bgCyan: [46, 49],
|
|
209
|
+
bgWhite: [47, 49],
|
|
210
|
+
|
|
211
|
+
// Bright color
|
|
212
|
+
bgBlackBright: [100, 49],
|
|
213
|
+
bgGray: [100, 49], // Alias of `bgBlackBright`
|
|
214
|
+
bgGrey: [100, 49], // Alias of `bgBlackBright`
|
|
215
|
+
bgRedBright: [101, 49],
|
|
216
|
+
bgGreenBright: [102, 49],
|
|
217
|
+
bgYellowBright: [103, 49],
|
|
218
|
+
bgBlueBright: [104, 49],
|
|
219
|
+
bgMagentaBright: [105, 49],
|
|
220
|
+
bgCyanBright: [106, 49],
|
|
221
|
+
bgWhiteBright: [107, 49],
|
|
222
|
+
},
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
const modifierNames = Object.keys(styles.modifier);
|
|
226
|
+
const foregroundColorNames = Object.keys(styles.color);
|
|
227
|
+
const backgroundColorNames = Object.keys(styles.bgColor);
|
|
228
|
+
const colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
229
|
+
|
|
230
|
+
function assembleStyles() {
|
|
231
|
+
const codes = new Map();
|
|
232
|
+
|
|
233
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
234
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
235
|
+
styles[styleName] = {
|
|
236
|
+
open: `\u001B[${style[0]}m`,
|
|
237
|
+
close: `\u001B[${style[1]}m`,
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
group[styleName] = styles[styleName];
|
|
241
|
+
|
|
242
|
+
codes.set(style[0], style[1]);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
Object.defineProperty(styles, groupName, {
|
|
246
|
+
value: group,
|
|
247
|
+
enumerable: false,
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
Object.defineProperty(styles, 'codes', {
|
|
252
|
+
value: codes,
|
|
253
|
+
enumerable: false,
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
styles.color.close = '\u001B[39m';
|
|
257
|
+
styles.bgColor.close = '\u001B[49m';
|
|
258
|
+
|
|
259
|
+
styles.color.ansi = wrapAnsi16();
|
|
260
|
+
styles.color.ansi256 = wrapAnsi256();
|
|
261
|
+
styles.color.ansi16m = wrapAnsi16m();
|
|
262
|
+
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
263
|
+
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
264
|
+
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
265
|
+
|
|
266
|
+
// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
|
|
267
|
+
Object.defineProperties(styles, {
|
|
268
|
+
rgbToAnsi256: {
|
|
269
|
+
value(red, green, blue) {
|
|
270
|
+
// We use the extended greyscale palette here, with the exception of
|
|
271
|
+
// black and white. normal palette only has 4 greyscale shades.
|
|
272
|
+
if (red === green && green === blue) {
|
|
273
|
+
if (red < 8) {
|
|
274
|
+
return 16;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
if (red > 248) {
|
|
278
|
+
return 231;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
return Math.round(((red - 8) / 247) * 24) + 232;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
return 16
|
|
285
|
+
+ (36 * Math.round(red / 255 * 5))
|
|
286
|
+
+ (6 * Math.round(green / 255 * 5))
|
|
287
|
+
+ Math.round(blue / 255 * 5);
|
|
288
|
+
},
|
|
289
|
+
enumerable: false,
|
|
290
|
+
},
|
|
291
|
+
hexToRgb: {
|
|
292
|
+
value(hex) {
|
|
293
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
294
|
+
if (!matches) {
|
|
295
|
+
return [0, 0, 0];
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
let [colorString] = matches;
|
|
299
|
+
|
|
300
|
+
if (colorString.length === 3) {
|
|
301
|
+
colorString = [...colorString].map(character => character + character).join('');
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
const integer = Number.parseInt(colorString, 16);
|
|
305
|
+
|
|
306
|
+
return [
|
|
307
|
+
/* eslint-disable no-bitwise */
|
|
308
|
+
(integer >> 16) & 0xFF,
|
|
309
|
+
(integer >> 8) & 0xFF,
|
|
310
|
+
integer & 0xFF,
|
|
311
|
+
/* eslint-enable no-bitwise */
|
|
312
|
+
];
|
|
313
|
+
},
|
|
314
|
+
enumerable: false,
|
|
315
|
+
},
|
|
316
|
+
hexToAnsi256: {
|
|
317
|
+
value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
318
|
+
enumerable: false,
|
|
319
|
+
},
|
|
320
|
+
ansi256ToAnsi: {
|
|
321
|
+
value(code) {
|
|
322
|
+
if (code < 8) {
|
|
323
|
+
return 30 + code;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
if (code < 16) {
|
|
327
|
+
return 90 + (code - 8);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
let red;
|
|
331
|
+
let green;
|
|
332
|
+
let blue;
|
|
333
|
+
|
|
334
|
+
if (code >= 232) {
|
|
335
|
+
red = (((code - 232) * 10) + 8) / 255;
|
|
336
|
+
green = red;
|
|
337
|
+
blue = red;
|
|
338
|
+
} else {
|
|
339
|
+
code -= 16;
|
|
340
|
+
|
|
341
|
+
const remainder = code % 36;
|
|
342
|
+
|
|
343
|
+
red = Math.floor(code / 36) / 5;
|
|
344
|
+
green = Math.floor(remainder / 6) / 5;
|
|
345
|
+
blue = (remainder % 6) / 5;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
const value = Math.max(red, green, blue) * 2;
|
|
349
|
+
|
|
350
|
+
if (value === 0) {
|
|
351
|
+
return 30;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
// eslint-disable-next-line no-bitwise
|
|
355
|
+
let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));
|
|
356
|
+
|
|
357
|
+
if (value === 2) {
|
|
358
|
+
result += 60;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
return result;
|
|
362
|
+
},
|
|
363
|
+
enumerable: false,
|
|
364
|
+
},
|
|
365
|
+
rgbToAnsi: {
|
|
366
|
+
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
367
|
+
enumerable: false,
|
|
368
|
+
},
|
|
369
|
+
hexToAnsi: {
|
|
370
|
+
value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
371
|
+
enumerable: false,
|
|
372
|
+
},
|
|
373
|
+
});
|
|
374
|
+
|
|
375
|
+
return styles;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
const ansiStyles = assembleStyles();
|
|
379
|
+
|
|
380
|
+
/* harmony default export */ const ansi_styles = (ansiStyles);
|
|
381
|
+
|
|
382
|
+
;// CONCATENATED MODULE: external "node:process"
|
|
383
|
+
const external_node_process_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:process");
|
|
384
|
+
;// CONCATENATED MODULE: external "node:os"
|
|
385
|
+
const external_node_os_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:os");
|
|
386
|
+
;// CONCATENATED MODULE: external "node:tty"
|
|
387
|
+
const external_node_tty_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:tty");
|
|
388
|
+
;// CONCATENATED MODULE: ./node_modules/chalk/source/vendor/supports-color/index.js
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
// From: https://github.com/sindresorhus/has-flag/blob/main/index.js
|
|
394
|
+
/// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {
|
|
395
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : external_node_process_namespaceObject.argv) {
|
|
396
|
+
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
|
|
397
|
+
const position = argv.indexOf(prefix + flag);
|
|
398
|
+
const terminatorPosition = argv.indexOf('--');
|
|
399
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
const {env} = external_node_process_namespaceObject;
|
|
403
|
+
|
|
404
|
+
let flagForceColor;
|
|
405
|
+
if (
|
|
406
|
+
hasFlag('no-color')
|
|
407
|
+
|| hasFlag('no-colors')
|
|
408
|
+
|| hasFlag('color=false')
|
|
409
|
+
|| hasFlag('color=never')
|
|
410
|
+
) {
|
|
411
|
+
flagForceColor = 0;
|
|
412
|
+
} else if (
|
|
413
|
+
hasFlag('color')
|
|
414
|
+
|| hasFlag('colors')
|
|
415
|
+
|| hasFlag('color=true')
|
|
416
|
+
|| hasFlag('color=always')
|
|
417
|
+
) {
|
|
418
|
+
flagForceColor = 1;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
function envForceColor() {
|
|
422
|
+
if ('FORCE_COLOR' in env) {
|
|
423
|
+
if (env.FORCE_COLOR === 'true') {
|
|
424
|
+
return 1;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
if (env.FORCE_COLOR === 'false') {
|
|
428
|
+
return 0;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
function translateLevel(level) {
|
|
436
|
+
if (level === 0) {
|
|
437
|
+
return false;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
return {
|
|
441
|
+
level,
|
|
442
|
+
hasBasic: true,
|
|
443
|
+
has256: level >= 2,
|
|
444
|
+
has16m: level >= 3,
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
|
|
449
|
+
const noFlagForceColor = envForceColor();
|
|
450
|
+
if (noFlagForceColor !== undefined) {
|
|
451
|
+
flagForceColor = noFlagForceColor;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
455
|
+
|
|
456
|
+
if (forceColor === 0) {
|
|
457
|
+
return 0;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
if (sniffFlags) {
|
|
461
|
+
if (hasFlag('color=16m')
|
|
462
|
+
|| hasFlag('color=full')
|
|
463
|
+
|| hasFlag('color=truecolor')) {
|
|
464
|
+
return 3;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
if (hasFlag('color=256')) {
|
|
468
|
+
return 2;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
// Check for Azure DevOps pipelines.
|
|
473
|
+
// Has to be above the `!streamIsTTY` check.
|
|
474
|
+
if ('TF_BUILD' in env && 'AGENT_NAME' in env) {
|
|
475
|
+
return 1;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
479
|
+
return 0;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
const min = forceColor || 0;
|
|
483
|
+
|
|
484
|
+
if (env.TERM === 'dumb') {
|
|
485
|
+
return min;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
if (external_node_process_namespaceObject.platform === 'win32') {
|
|
489
|
+
// Windows 10 build 10586 is the first Windows release that supports 256 colors.
|
|
490
|
+
// Windows 10 build 14931 is the first release that supports 16m/TrueColor.
|
|
491
|
+
const osRelease = external_node_os_namespaceObject.release().split('.');
|
|
492
|
+
if (
|
|
493
|
+
Number(osRelease[0]) >= 10
|
|
494
|
+
&& Number(osRelease[2]) >= 10_586
|
|
495
|
+
) {
|
|
496
|
+
return Number(osRelease[2]) >= 14_931 ? 3 : 2;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
return 1;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
if ('CI' in env) {
|
|
503
|
+
if ('GITHUB_ACTIONS' in env || 'GITEA_ACTIONS' in env) {
|
|
504
|
+
return 3;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
|
508
|
+
return 1;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
return min;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
if ('TEAMCITY_VERSION' in env) {
|
|
515
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
if (env.COLORTERM === 'truecolor') {
|
|
519
|
+
return 3;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
if (env.TERM === 'xterm-kitty') {
|
|
523
|
+
return 3;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
if ('TERM_PROGRAM' in env) {
|
|
527
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
|
|
528
|
+
|
|
529
|
+
switch (env.TERM_PROGRAM) {
|
|
530
|
+
case 'iTerm.app': {
|
|
531
|
+
return version >= 3 ? 3 : 2;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
case 'Apple_Terminal': {
|
|
535
|
+
return 2;
|
|
536
|
+
}
|
|
537
|
+
// No default
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
542
|
+
return 2;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
546
|
+
return 1;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
if ('COLORTERM' in env) {
|
|
550
|
+
return 1;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
return min;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
function createSupportsColor(stream, options = {}) {
|
|
557
|
+
const level = _supportsColor(stream, {
|
|
558
|
+
streamIsTTY: stream && stream.isTTY,
|
|
559
|
+
...options,
|
|
560
|
+
});
|
|
561
|
+
|
|
562
|
+
return translateLevel(level);
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
const supportsColor = {
|
|
566
|
+
stdout: createSupportsColor({isTTY: external_node_tty_namespaceObject.isatty(1)}),
|
|
567
|
+
stderr: createSupportsColor({isTTY: external_node_tty_namespaceObject.isatty(2)}),
|
|
568
|
+
};
|
|
569
|
+
|
|
570
|
+
/* harmony default export */ const supports_color = (supportsColor);
|
|
571
|
+
|
|
572
|
+
;// CONCATENATED MODULE: ./node_modules/chalk/source/utilities.js
|
|
573
|
+
// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.
|
|
574
|
+
function stringReplaceAll(string, substring, replacer) {
|
|
575
|
+
let index = string.indexOf(substring);
|
|
576
|
+
if (index === -1) {
|
|
577
|
+
return string;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
const substringLength = substring.length;
|
|
581
|
+
let endIndex = 0;
|
|
582
|
+
let returnValue = '';
|
|
583
|
+
do {
|
|
584
|
+
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
585
|
+
endIndex = index + substringLength;
|
|
586
|
+
index = string.indexOf(substring, endIndex);
|
|
587
|
+
} while (index !== -1);
|
|
588
|
+
|
|
589
|
+
returnValue += string.slice(endIndex);
|
|
590
|
+
return returnValue;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
594
|
+
let endIndex = 0;
|
|
595
|
+
let returnValue = '';
|
|
596
|
+
do {
|
|
597
|
+
const gotCR = string[index - 1] === '\r';
|
|
598
|
+
returnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\r\n' : '\n') + postfix;
|
|
599
|
+
endIndex = index + 1;
|
|
600
|
+
index = string.indexOf('\n', endIndex);
|
|
601
|
+
} while (index !== -1);
|
|
602
|
+
|
|
603
|
+
returnValue += string.slice(endIndex);
|
|
604
|
+
return returnValue;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
;// CONCATENATED MODULE: ./node_modules/chalk/source/index.js
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
const {stdout: stdoutColor, stderr: stderrColor} = supports_color;
|
|
613
|
+
|
|
614
|
+
const GENERATOR = Symbol('GENERATOR');
|
|
615
|
+
const STYLER = Symbol('STYLER');
|
|
616
|
+
const IS_EMPTY = Symbol('IS_EMPTY');
|
|
617
|
+
|
|
618
|
+
// `supportsColor.level` → `ansiStyles.color[name]` mapping
|
|
619
|
+
const levelMapping = [
|
|
620
|
+
'ansi',
|
|
621
|
+
'ansi',
|
|
622
|
+
'ansi256',
|
|
623
|
+
'ansi16m',
|
|
624
|
+
];
|
|
625
|
+
|
|
626
|
+
const source_styles = Object.create(null);
|
|
627
|
+
|
|
628
|
+
const applyOptions = (object, options = {}) => {
|
|
629
|
+
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
630
|
+
throw new Error('The `level` option should be an integer from 0 to 3');
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
// Detect level if not set manually
|
|
634
|
+
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
635
|
+
object.level = options.level === undefined ? colorLevel : options.level;
|
|
636
|
+
};
|
|
637
|
+
|
|
638
|
+
class Chalk {
|
|
639
|
+
constructor(options) {
|
|
640
|
+
// eslint-disable-next-line no-constructor-return
|
|
641
|
+
return chalkFactory(options);
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
const chalkFactory = options => {
|
|
646
|
+
const chalk = (...strings) => strings.join(' ');
|
|
647
|
+
applyOptions(chalk, options);
|
|
648
|
+
|
|
649
|
+
Object.setPrototypeOf(chalk, createChalk.prototype);
|
|
650
|
+
|
|
651
|
+
return chalk;
|
|
652
|
+
};
|
|
653
|
+
|
|
654
|
+
function createChalk(options) {
|
|
655
|
+
return chalkFactory(options);
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
659
|
+
|
|
660
|
+
for (const [styleName, style] of Object.entries(ansi_styles)) {
|
|
661
|
+
source_styles[styleName] = {
|
|
662
|
+
get() {
|
|
663
|
+
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
664
|
+
Object.defineProperty(this, styleName, {value: builder});
|
|
665
|
+
return builder;
|
|
666
|
+
},
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
source_styles.visible = {
|
|
671
|
+
get() {
|
|
672
|
+
const builder = createBuilder(this, this[STYLER], true);
|
|
673
|
+
Object.defineProperty(this, 'visible', {value: builder});
|
|
674
|
+
return builder;
|
|
675
|
+
},
|
|
676
|
+
};
|
|
677
|
+
|
|
678
|
+
const getModelAnsi = (model, level, type, ...arguments_) => {
|
|
679
|
+
if (model === 'rgb') {
|
|
680
|
+
if (level === 'ansi16m') {
|
|
681
|
+
return ansi_styles[type].ansi16m(...arguments_);
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
if (level === 'ansi256') {
|
|
685
|
+
return ansi_styles[type].ansi256(ansi_styles.rgbToAnsi256(...arguments_));
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
return ansi_styles[type].ansi(ansi_styles.rgbToAnsi(...arguments_));
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
if (model === 'hex') {
|
|
692
|
+
return getModelAnsi('rgb', level, type, ...ansi_styles.hexToRgb(...arguments_));
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
return ansi_styles[type][model](...arguments_);
|
|
696
|
+
};
|
|
697
|
+
|
|
698
|
+
const usedModels = ['rgb', 'hex', 'ansi256'];
|
|
699
|
+
|
|
700
|
+
for (const model of usedModels) {
|
|
701
|
+
source_styles[model] = {
|
|
702
|
+
get() {
|
|
703
|
+
const {level} = this;
|
|
704
|
+
return function (...arguments_) {
|
|
705
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansi_styles.color.close, this[STYLER]);
|
|
706
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
707
|
+
};
|
|
708
|
+
},
|
|
709
|
+
};
|
|
710
|
+
|
|
711
|
+
const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
|
|
712
|
+
source_styles[bgModel] = {
|
|
713
|
+
get() {
|
|
714
|
+
const {level} = this;
|
|
715
|
+
return function (...arguments_) {
|
|
716
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansi_styles.bgColor.close, this[STYLER]);
|
|
717
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
718
|
+
};
|
|
719
|
+
},
|
|
720
|
+
};
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
const proto = Object.defineProperties(() => {}, {
|
|
724
|
+
...source_styles,
|
|
725
|
+
level: {
|
|
726
|
+
enumerable: true,
|
|
727
|
+
get() {
|
|
728
|
+
return this[GENERATOR].level;
|
|
729
|
+
},
|
|
730
|
+
set(level) {
|
|
731
|
+
this[GENERATOR].level = level;
|
|
732
|
+
},
|
|
733
|
+
},
|
|
734
|
+
});
|
|
735
|
+
|
|
736
|
+
const createStyler = (open, close, parent) => {
|
|
737
|
+
let openAll;
|
|
738
|
+
let closeAll;
|
|
739
|
+
if (parent === undefined) {
|
|
740
|
+
openAll = open;
|
|
741
|
+
closeAll = close;
|
|
742
|
+
} else {
|
|
743
|
+
openAll = parent.openAll + open;
|
|
744
|
+
closeAll = close + parent.closeAll;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
return {
|
|
748
|
+
open,
|
|
749
|
+
close,
|
|
750
|
+
openAll,
|
|
751
|
+
closeAll,
|
|
752
|
+
parent,
|
|
753
|
+
};
|
|
754
|
+
};
|
|
755
|
+
|
|
756
|
+
const createBuilder = (self, _styler, _isEmpty) => {
|
|
757
|
+
// Single argument is hot path, implicit coercion is faster than anything
|
|
758
|
+
// eslint-disable-next-line no-implicit-coercion
|
|
759
|
+
const builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));
|
|
760
|
+
|
|
761
|
+
// We alter the prototype because we must return a function, but there is
|
|
762
|
+
// no way to create a function with a different prototype
|
|
763
|
+
Object.setPrototypeOf(builder, proto);
|
|
764
|
+
|
|
765
|
+
builder[GENERATOR] = self;
|
|
766
|
+
builder[STYLER] = _styler;
|
|
767
|
+
builder[IS_EMPTY] = _isEmpty;
|
|
768
|
+
|
|
769
|
+
return builder;
|
|
770
|
+
};
|
|
771
|
+
|
|
772
|
+
const applyStyle = (self, string) => {
|
|
773
|
+
if (self.level <= 0 || !string) {
|
|
774
|
+
return self[IS_EMPTY] ? '' : string;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
let styler = self[STYLER];
|
|
778
|
+
|
|
779
|
+
if (styler === undefined) {
|
|
780
|
+
return string;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
const {openAll, closeAll} = styler;
|
|
784
|
+
if (string.includes('\u001B')) {
|
|
785
|
+
while (styler !== undefined) {
|
|
786
|
+
// Replace any instances already present with a re-opening code
|
|
787
|
+
// otherwise only the part of the string until said closing code
|
|
788
|
+
// will be colored, and the rest will simply be 'plain'.
|
|
789
|
+
string = stringReplaceAll(string, styler.close, styler.open);
|
|
790
|
+
|
|
791
|
+
styler = styler.parent;
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
// We can move both next actions out of loop, because remaining actions in loop won't have
|
|
796
|
+
// any/visible effect on parts we add here. Close the styling before a linebreak and reopen
|
|
797
|
+
// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92
|
|
798
|
+
const lfIndex = string.indexOf('\n');
|
|
799
|
+
if (lfIndex !== -1) {
|
|
800
|
+
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
return openAll + string + closeAll;
|
|
804
|
+
};
|
|
805
|
+
|
|
806
|
+
Object.defineProperties(createChalk.prototype, source_styles);
|
|
807
|
+
|
|
808
|
+
const chalk = createChalk();
|
|
809
|
+
const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
|
|
814
|
+
|
|
815
|
+
/* harmony default export */ const source = (chalk);
|
|
159
816
|
|
|
160
|
-
module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("url");
|
|
161
817
|
|
|
162
818
|
/***/ }),
|
|
163
819
|
|
|
@@ -452,20 +1108,23 @@ function readParams(params) {
|
|
|
452
1108
|
return { commandName, buildContext };
|
|
453
1109
|
}
|
|
454
1110
|
//# sourceMappingURL=customHandler.js.map
|
|
1111
|
+
// EXTERNAL MODULE: ./node_modules/chalk/source/index.js + 6 modules
|
|
1112
|
+
var source = __nccwpck_require__(276);
|
|
455
1113
|
;// CONCATENATED MODULE: ./dist/bin/main.ts
|
|
456
1114
|
|
|
1115
|
+
|
|
457
1116
|
const { buildContext, commandName } = readParams({ apiVersion: 'v1' });
|
|
458
1117
|
(async () => {
|
|
459
1118
|
switch (commandName) {
|
|
460
1119
|
case 'add-story':
|
|
461
1120
|
{
|
|
462
|
-
const { command } = await
|
|
1121
|
+
const { command } = await __nccwpck_require__.e(/* import() */ 942).then(__nccwpck_require__.bind(__nccwpck_require__, 942));
|
|
463
1122
|
command({ buildContext });
|
|
464
1123
|
}
|
|
465
1124
|
return;
|
|
466
1125
|
case 'eject-page':
|
|
467
1126
|
{
|
|
468
|
-
const { command } = await
|
|
1127
|
+
const { command } = await __nccwpck_require__.e(/* import() */ 671).then(__nccwpck_require__.bind(__nccwpck_require__, 671));
|
|
469
1128
|
command({ buildContext });
|
|
470
1129
|
}
|
|
471
1130
|
return;
|
|
@@ -477,10 +1136,16 @@ const { buildContext, commandName } = readParams({ apiVersion: 'v1' });
|
|
|
477
1136
|
return;
|
|
478
1137
|
case 'initialize-account-theme':
|
|
479
1138
|
{
|
|
480
|
-
const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(
|
|
1139
|
+
const { command } = await Promise.all(/* import() */[__nccwpck_require__.e(279), __nccwpck_require__.e(187)]).then(__nccwpck_require__.bind(__nccwpck_require__, 187));
|
|
481
1140
|
command({ buildContext });
|
|
482
1141
|
}
|
|
483
1142
|
return;
|
|
1143
|
+
case 'initialize-admin-theme':
|
|
1144
|
+
{
|
|
1145
|
+
console.log(source/* default */.Ay.red('Cannot create an admin theme when using Angular.'));
|
|
1146
|
+
process.exit(1);
|
|
1147
|
+
}
|
|
1148
|
+
return;
|
|
484
1149
|
default:
|
|
485
1150
|
process.exit(NOT_IMPLEMENTED_EXIT_CODE);
|
|
486
1151
|
}
|