@objectstack/objectql 9.5.1 → 9.7.0
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 +18 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -5,8 +5,13 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __esm = (fn, res) => function __init() {
|
|
9
|
-
|
|
8
|
+
var __esm = (fn, res, err) => function __init() {
|
|
9
|
+
if (err) throw err[0];
|
|
10
|
+
try {
|
|
11
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
12
|
+
} catch (e) {
|
|
13
|
+
throw err = [e], e;
|
|
14
|
+
}
|
|
10
15
|
};
|
|
11
16
|
var __export = (target, all) => {
|
|
12
17
|
for (var name in all)
|
|
@@ -6706,9 +6711,7 @@ var SKIP_FIELDS = /* @__PURE__ */ new Set([
|
|
|
6706
6711
|
"created_at",
|
|
6707
6712
|
"created_by",
|
|
6708
6713
|
"updated_at",
|
|
6709
|
-
"updated_by"
|
|
6710
|
-
"organization_id",
|
|
6711
|
-
"tenant_id"
|
|
6714
|
+
"updated_by"
|
|
6712
6715
|
]);
|
|
6713
6716
|
var EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
6714
6717
|
var URL_RE = /^[a-z][a-z0-9+.\-]*:\/\/[^\s]+$/i;
|
|
@@ -6890,6 +6893,11 @@ function evaluateValidationRules(objectSchema, data, mode, opts = {}) {
|
|
|
6890
6893
|
if (!hasRules && !hasFieldRules) return;
|
|
6891
6894
|
const previous = opts.previous ?? void 0;
|
|
6892
6895
|
const merged = { ...previous ?? {}, ...data };
|
|
6896
|
+
if (mode === "insert" && fields) {
|
|
6897
|
+
for (const name of Object.keys(fields)) {
|
|
6898
|
+
if (!(name in merged)) merged[name] = null;
|
|
6899
|
+
}
|
|
6900
|
+
}
|
|
6893
6901
|
const ctx = { data, merged, previous, mode, logger: opts.logger };
|
|
6894
6902
|
const errors = [];
|
|
6895
6903
|
if (hasFieldRules && fields) {
|
|
@@ -7897,7 +7905,9 @@ var _ObjectQL = class _ObjectQL {
|
|
|
7897
7905
|
// Integration Protocol
|
|
7898
7906
|
"connectors",
|
|
7899
7907
|
// System Protocol — package documentation (ADR-0046); inert data
|
|
7900
|
-
"docs"
|
|
7908
|
+
"docs",
|
|
7909
|
+
// Documentation navigation spine (ADR-0046 §6)
|
|
7910
|
+
"books"
|
|
7901
7911
|
];
|
|
7902
7912
|
for (const key of metadataArrayKeys) {
|
|
7903
7913
|
const items = manifest[key];
|
|
@@ -8034,7 +8044,8 @@ var _ObjectQL = class _ObjectQL {
|
|
|
8034
8044
|
"mappings",
|
|
8035
8045
|
"analyticsCubes",
|
|
8036
8046
|
"connectors",
|
|
8037
|
-
"docs"
|
|
8047
|
+
"docs",
|
|
8048
|
+
"books"
|
|
8038
8049
|
];
|
|
8039
8050
|
for (const key of metadataArrayKeys) {
|
|
8040
8051
|
const items = plugin[key];
|