server-act 1.2.0 → 1.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/dist/index.js CHANGED
@@ -63,7 +63,7 @@ function createServerActionBuilder(initDef = {}) {
63
63
  return /*#__PURE__*/ _async_to_generator(function*(input) {
64
64
  const ctx = yield _def.middleware == null ? void 0 : _def.middleware.call(_def);
65
65
  if (_def.input) {
66
- const result = _def.input.safeParse(input);
66
+ const result = yield _def.input.safeParseAsync(input);
67
67
  if (!result.success) {
68
68
  console.error("❌ Input validation error:", result.error.errors);
69
69
  throw new Error("Input validation error");
package/dist/index.mjs CHANGED
@@ -61,7 +61,7 @@ function createServerActionBuilder(initDef = {}) {
61
61
  return /*#__PURE__*/ _async_to_generator(function*(input) {
62
62
  const ctx = yield _def.middleware == null ? void 0 : _def.middleware.call(_def);
63
63
  if (_def.input) {
64
- const result = _def.input.safeParse(input);
64
+ const result = yield _def.input.safeParseAsync(input);
65
65
  if (!result.success) {
66
66
  console.error("❌ Input validation error:", result.error.errors);
67
67
  throw new Error("Input validation error");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "server-act",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "homepage": "https://github.com/chungweileong94/server-act#readme",
5
5
  "author": "chungweileong94",
6
6
  "license": "MIT",