🎉 Add malli based validation and coersion subsystem

This commit is contained in:
Andrey Antukh 2023-03-18 10:32:26 +01:00
parent dbc08ba80f
commit 5ca3d01ea1
125 changed files with 4984 additions and 2762 deletions

View file

@ -7,11 +7,11 @@
(ns app.main.data.workspace.interactions
(:require
[app.common.data :as d]
[app.common.data.macros :as dm]
[app.common.geom.point :as gpt]
[app.common.pages :as cp]
[app.common.pages.changes-builder :as pcb]
[app.common.pages.helpers :as cph]
[app.common.spec :as us]
[app.common.types.page :as ctp]
[app.common.types.shape-tree :as ctst]
[app.common.types.shape.interactions :as ctsi]
@ -55,7 +55,7 @@
(defn remove-flow
[flow-id]
(us/verify ::us/uuid flow-id)
(dm/assert! (uuid? flow-id))
(ptk/reify ::remove-flow
ptk/WatchEvent
(watch [it state _]
@ -67,8 +67,8 @@
(defn rename-flow
[flow-id name]
(us/verify ::us/uuid flow-id)
(us/verify ::us/string name)
(dm/assert! (uuid? flow-id))
(dm/assert! (string? name))
(ptk/reify ::rename-flow
ptk/WatchEvent
(watch [it state _]
@ -81,7 +81,7 @@
(defn start-rename-flow
[id]
(us/verify ::us/uuid id)
(dm/assert! (uuid? id))
(ptk/reify ::start-rename-flow
ptk/UpdateEvent
(update [_ state]