@keycloakify/svelte 0.1.5 → 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.
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keycloakify/svelte",
3
- "version": "0.1.5",
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"