@ultimat3/entity
Advanced tools
+5
-5
| { | ||
| "name": "@ultimat3/entity", | ||
| "version": "9.0.0", | ||
| "version": "10.0.0", | ||
| "description": "A table + its domain type + invariants the database also enforces", | ||
@@ -34,7 +34,7 @@ "license": "MIT", | ||
| "dependencies": { | ||
| "@ultimat3/core": "9.0.0", | ||
| "@ultimat3/db": "9.0.0", | ||
| "@ultimat3/schema": "9.0.0", | ||
| "@ultimat3/time": "9.0.0" | ||
| "@ultimat3/core": "10.0.0", | ||
| "@ultimat3/db": "10.0.0", | ||
| "@ultimat3/schema": "10.0.0", | ||
| "@ultimat3/time": "10.0.0" | ||
| } | ||
| } |
+8
-3
@@ -6,2 +6,3 @@ // `entity(name, { columns })` is the first primitive. The row type is DERIVED from the columns — | ||
| import { renderThrowable } from '@ultimat3/core'; | ||
| import { describeValue, type StandardSchemaV1 } from '@ultimat3/schema'; | ||
@@ -288,5 +289,9 @@ import { entityNow } from './clock'; | ||
| } catch (error) { | ||
| return { | ||
| issues: [{ message: error instanceof Error ? error.message : String(error) }], | ||
| }; | ||
| // `renderThrowable`, never `error instanceof Error ? error.message : String(error)`: | ||
| // both halves of that read the caught value directly. `instanceof` consults | ||
| // `getPrototypeOf` and `String()` runs the value's own coercion, so a `Proxy` or a | ||
| // null-prototype throwable raised a SECOND, uncatchable `TypeError` out of the | ||
| // validator — where a rejection belongs. A column parser is app-reachable and an | ||
| // app's `$parse` may throw anything at all. | ||
| return { issues: [{ message: renderThrowable(error) }] }; | ||
| } | ||
@@ -293,0 +298,0 @@ }, |
+8
-1
@@ -64,2 +64,10 @@ // The entity layer's stable error codes. Each factory produces the exact command | ||
| /** | ||
| * Base for every error this package throws. No `docs:` — `UltimateError` fills it from | ||
| * `describeErrorCode(code).docs`, which is `@ultimat3/core`'s `ERROR_DOCS_URL`: one page for every | ||
| * code, never one per code, because `wiki/` is the framework's only public documentation surface | ||
| * and a code lives there in a TABLE ROW, which has no anchor. The | ||
| * `https://ultimate.dev/errors/<code>` links this class built until 9.x answered 404, host | ||
| * included, on every refusal it has ever raised. | ||
| */ | ||
| export class EntityError extends UltimateError { | ||
@@ -73,3 +81,2 @@ override readonly name = 'EntityError'; | ||
| fix: init.fix, | ||
| docs: `https://ultimate.dev/errors/${init.code}`, | ||
| }); | ||
@@ -76,0 +83,0 @@ } |
+5
-3
@@ -6,2 +6,3 @@ // `posts.$view(['id', 'title'])` — the hop between an entity and an action's `output`: a Standard | ||
| import { renderThrowable } from '@ultimat3/core'; | ||
| import { describeValue, type StandardSchemaV1 } from '@ultimat3/schema'; | ||
@@ -87,5 +88,6 @@ import { invariantViolated } from './errors'; | ||
| } catch (error) { | ||
| return { | ||
| issues: [{ message: error instanceof Error ? error.message : String(error) }], | ||
| }; | ||
| // The entity's rule, for the same reason: `instanceof` and `String()` are both reads of | ||
| // a caught value, and a throwable that fights being read turned a rejected projection | ||
| // into an uncatchable `TypeError`. `renderThrowable` is total. | ||
| return { issues: [{ message: renderThrowable(error) }] }; | ||
| } | ||
@@ -92,0 +94,0 @@ }, |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
505579
0.25%7833
0.18%0
-100%+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated
Updated