@keycloakify/svelte 0.1.4 → 0.1.6

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.
@@ -19,7 +19,7 @@ export const modules = {
19
19
 
20
20
  const __dirname = path__WEBPACK_IMPORTED_MODULE_1__.dirname(url__WEBPACK_IMPORTED_MODULE_2__.fileURLToPath(import.meta.url));
21
21
  function getThisCodebaseRootDirPath_rec(dirPath) {
22
- if (!dirPath.includes('/bin') && fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, 'package.json'))) {
22
+ if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, 'LICENSE'))) {
23
23
  return dirPath;
24
24
  }
25
25
  return getThisCodebaseRootDirPath_rec(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, '..'));
@@ -695,7 +695,7 @@ async function command(params) {
695
695
 
696
696
  const __dirname = path__WEBPACK_IMPORTED_MODULE_1__.dirname(url__WEBPACK_IMPORTED_MODULE_2__.fileURLToPath(import.meta.url));
697
697
  function getThisCodebaseRootDirPath_rec(dirPath) {
698
- if (!dirPath.includes('/bin') && fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, 'package.json'))) {
698
+ if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, 'LICENSE'))) {
699
699
  return dirPath;
700
700
  }
701
701
  return getThisCodebaseRootDirPath_rec(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, '..'));
@@ -4201,7 +4201,23 @@ ZodReadonly.create = (type, params) => {
4201
4201
  ...processCreateParams(params),
4202
4202
  });
4203
4203
  };
4204
- function custom(check, params = {},
4204
+ ////////////////////////////////////////
4205
+ ////////////////////////////////////////
4206
+ ////////// //////////
4207
+ ////////// z.custom //////////
4208
+ ////////// //////////
4209
+ ////////////////////////////////////////
4210
+ ////////////////////////////////////////
4211
+ function cleanParams(params, data) {
4212
+ const p = typeof params === "function"
4213
+ ? params(data)
4214
+ : typeof params === "string"
4215
+ ? { message: params }
4216
+ : params;
4217
+ const p2 = typeof p === "string" ? { message: p } : p;
4218
+ return p2;
4219
+ }
4220
+ function custom(check, _params = {},
4205
4221
  /**
4206
4222
  * @deprecated
4207
4223
  *
@@ -4216,16 +4232,23 @@ fatal) {
4216
4232
  if (check)
4217
4233
  return ZodAny.create().superRefine((data, ctx) => {
4218
4234
  var _a, _b;
4219
- if (!check(data)) {
4220
- const p = typeof params === "function"
4221
- ? params(data)
4222
- : typeof params === "string"
4223
- ? { message: params }
4224
- : params;
4225
- const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
4226
- const p2 = typeof p === "string" ? { message: p } : p;
4227
- ctx.addIssue({ code: "custom", ...p2, fatal: _fatal });
4235
+ const r = check(data);
4236
+ if (r instanceof Promise) {
4237
+ return r.then((r) => {
4238
+ var _a, _b;
4239
+ if (!r) {
4240
+ const params = cleanParams(_params, data);
4241
+ const _fatal = (_b = (_a = params.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
4242
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
4243
+ }
4244
+ });
4245
+ }
4246
+ if (!r) {
4247
+ const params = cleanParams(_params, data);
4248
+ const _fatal = (_b = (_a = params.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
4249
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
4228
4250
  }
4251
+ return;
4229
4252
  });
4230
4253
  return ZodAny.create();
4231
4254
  }
@@ -160,7 +160,7 @@ async function command(params) {
160
160
 
161
161
  const __dirname = path__WEBPACK_IMPORTED_MODULE_1__.dirname(url__WEBPACK_IMPORTED_MODULE_2__.fileURLToPath(import.meta.url));
162
162
  function getThisCodebaseRootDirPath_rec(dirPath) {
163
- if (!dirPath.includes('/bin') && fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, 'package.json'))) {
163
+ if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, 'LICENSE'))) {
164
164
  return dirPath;
165
165
  }
166
166
  return getThisCodebaseRootDirPath_rec(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, '..'));
@@ -776,7 +776,7 @@ async function command(params) {
776
776
 
777
777
  const __dirname = path__WEBPACK_IMPORTED_MODULE_1__.dirname(url__WEBPACK_IMPORTED_MODULE_2__.fileURLToPath(import.meta.url));
778
778
  function getThisCodebaseRootDirPath_rec(dirPath) {
779
- if (!dirPath.includes('/bin') && fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, 'package.json'))) {
779
+ if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, 'LICENSE'))) {
780
780
  return dirPath;
781
781
  }
782
782
  return getThisCodebaseRootDirPath_rec(path__WEBPACK_IMPORTED_MODULE_1__.join(dirPath, '..'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keycloakify/svelte",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Svelte Components for Keycloakify",
5
5
  "keywords": [
6
6
  "keycloak",
@@ -437,33 +437,33 @@
437
437
  },
438
438
  "devDependencies": {
439
439
  "@sveltejs/adapter-auto": "^4.0.0",
440
- "@sveltejs/kit": "^2.16.1",
441
- "@sveltejs/package": "^2.3.9",
440
+ "@sveltejs/kit": "^2.19.0",
441
+ "@sveltejs/package": "^2.3.10",
442
442
  "@sveltejs/vite-plugin-svelte": "^5.0.3",
443
443
  "@types/eslint": "^9.6.1",
444
- "@types/node": "^22.10.7",
444
+ "@types/node": "^22.13.10",
445
445
  "@vercel/ncc": "^0.38.3",
446
446
  "conventional-changelog-cli": "^5.0.0",
447
447
  "cz-conventional-changelog": "^3.3.0",
448
448
  "cli-select": "^1.1.2",
449
- "eslint": "9.18.0",
450
- "eslint-config-prettier": "^10.0.1",
449
+ "eslint": "9.22.0",
450
+ "eslint-config-prettier": "^10.1.1",
451
451
  "eslint-plugin-prettier": "^5.2.3",
452
- "eslint-plugin-svelte": "^2.46.1",
452
+ "eslint-plugin-svelte": "^3.1.0",
453
453
  "eslint-plugin-unused-imports": "^4.1.4",
454
- "globals": "^15.14.0",
455
- "keycloakify": "^11.8.9",
456
- "npm-check-updates": "^17.1.14",
457
- "prettier": "^3.4.2",
454
+ "globals": "^16.0.0",
455
+ "keycloakify": "^11.8.17",
456
+ "npm-check-updates": "^17.1.15",
457
+ "prettier": "^3.5.3",
458
458
  "prettier-plugin-svelte": "^3.3.3",
459
459
  "publint": "0.2.12",
460
- "svelte": "^5.19.1",
461
- "svelte-check": "^4.1.4",
462
- "tsx": "^4.19.2",
463
- "typescript": "~5.6.3",
464
- "typescript-eslint": "^8.21.0",
465
- "vite": "^6.0.11",
466
- "zod": "^3.24.1"
460
+ "svelte": "^5.22.6",
461
+ "svelte-check": "^4.1.5",
462
+ "tsx": "^4.19.3",
463
+ "typescript": "~5.8.2",
464
+ "typescript-eslint": "^8.26.0",
465
+ "vite": "^6.2.1",
466
+ "zod": "^3.24.2"
467
467
  },
468
468
  "bin": {
469
469
  "_keycloakify-custom-handler": "keycloakify-svelte/bin/index.js"
@@ -5,7 +5,7 @@ import * as url from 'url';
5
5
  const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
6
6
 
7
7
  function getThisCodebaseRootDirPath_rec(dirPath: string): string {
8
- if (!dirPath.includes('/bin') && fs.existsSync(path.join(dirPath, 'package.json'))) {
8
+ if (fs.existsSync(path.join(dirPath, 'LICENSE'))) {
9
9
  return dirPath;
10
10
  }
11
11
  return getThisCodebaseRootDirPath_rec(path.join(dirPath, '..'));