@arcote.tech/arc 0.1.9 → 0.1.10
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/elements/object.d.ts +1 -1
- package/dist/index.js +4 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { DatabaseAgnosticColumnInfo } from "../database/database-store";
|
|
1
2
|
import { type objectUtil, type util } from "../utils";
|
|
2
3
|
import { ArcAbstract, type Validators } from "./abstract";
|
|
3
4
|
import type { ArcElement } from "./element";
|
|
4
|
-
import type { DatabaseAgnosticColumnInfo } from "../database/database-store";
|
|
5
5
|
export declare type ArcRawShape = {
|
|
6
6
|
[k: string]: ArcElement;
|
|
7
7
|
};
|
package/dist/index.js
CHANGED
|
@@ -418,8 +418,10 @@ class ArcObject extends ArcAbstract {
|
|
|
418
418
|
const properties = {};
|
|
419
419
|
const required = [];
|
|
420
420
|
for (const [key, element] of Object.entries(this.rawShape)) {
|
|
421
|
-
|
|
422
|
-
|
|
421
|
+
if (element instanceof ArcOptional) {
|
|
422
|
+
properties[key] = element.parent.toJsonSchema?.() ?? {};
|
|
423
|
+
} else {
|
|
424
|
+
properties[key] = element.toJsonSchema?.() ?? {};
|
|
423
425
|
required.push(key);
|
|
424
426
|
}
|
|
425
427
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcote.tech/arc",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.10",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Przemysław Krasiński [arcote.tech]",
|
|
7
7
|
"description": "Arc is a framework designed to align code closely with business logic, streamlining development and enhancing productivity.",
|