@inf-monkeys-tech/monkeys 1.1.34 → 1.1.36
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/README.md +13 -1
- package/lib/contracts/declarative-control-http.d.ts +1774 -208
- package/lib/contracts/declarative-control-http.d.ts.map +1 -1
- package/lib/contracts/declarative-control.d.ts +235 -13
- package/lib/contracts/declarative-control.d.ts.map +1 -1
- package/lib/contracts/declarative-control.js +18 -12
- package/lib/contracts/declarative-control.js.map +1 -1
- package/lib/contracts/declarative-publication-job.d.ts +472 -0
- package/lib/contracts/declarative-publication-job.d.ts.map +1 -1
- package/lib/contracts/design-board.d.ts +357 -0
- package/lib/contracts/design-board.d.ts.map +1 -0
- package/lib/contracts/design-board.js +75 -0
- package/lib/contracts/design-board.js.map +1 -0
- package/lib/contracts/index.d.ts +2 -0
- package/lib/contracts/index.d.ts.map +1 -1
- package/lib/contracts/index.js +2 -0
- package/lib/contracts/index.js.map +1 -1
- package/lib/contracts/materialized-model.d.ts +42 -0
- package/lib/contracts/materialized-model.d.ts.map +1 -0
- package/lib/contracts/materialized-model.js +37 -0
- package/lib/contracts/materialized-model.js.map +1 -0
- package/lib/contracts/menu.d.ts +5 -5
- package/lib/contracts/tenant.d.ts +1 -1
- package/lib/esm/{chunk-DDEMQXTP.mjs → chunk-2YGFLKSP.mjs} +7 -3
- package/lib/esm/{chunk-DDEMQXTP.mjs.map → chunk-2YGFLKSP.mjs.map} +1 -1
- package/lib/esm/{chunk-ZN3TO3U7.mjs → chunk-AGT4MIWF.mjs} +209 -6
- package/lib/esm/chunk-AGT4MIWF.mjs.map +1 -0
- package/lib/esm/{chunk-L5CYU6K4.mjs → chunk-GT5OGNJE.mjs} +2250 -2090
- package/lib/esm/chunk-GT5OGNJE.mjs.map +1 -0
- package/lib/esm/{chunk-IJ2W77NR.mjs → chunk-HLW3X2NX.mjs} +2 -2
- package/lib/esm/{chunk-EKT45BA4.mjs → chunk-LYWJTAAM.mjs} +2 -2
- package/lib/esm/{chunk-UWGXMF6O.mjs → chunk-UF5TNIAZ.mjs} +2 -2
- package/lib/esm/contracts/index.mjs +28 -4
- package/lib/esm/index.mjs +40 -6
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +13 -3
- package/lib/esm/schemas/index.mjs +7 -3
- package/lib/json-schema/design-board-commit-command.schema.json +408 -0
- package/lib/json-schema/design-board-document.schema.json +380 -0
- package/lib/json-schema/index.json +2 -0
- package/lib/json-schema/page-runtime-bundle.schema.json +493 -100
- package/lib/json-schema/page.schema.json +261 -9
- package/lib/runtime/design-board.d.ts +4 -0
- package/lib/runtime/design-board.d.ts.map +1 -0
- package/lib/runtime/design-board.js +57 -0
- package/lib/runtime/design-board.js.map +1 -0
- package/lib/runtime/index.d.ts +2 -0
- package/lib/runtime/index.d.ts.map +1 -1
- package/lib/runtime/index.js +2 -0
- package/lib/runtime/index.js.map +1 -1
- package/lib/runtime/materialized-model.d.ts +23 -0
- package/lib/runtime/materialized-model.d.ts.map +1 -0
- package/lib/runtime/materialized-model.js +187 -0
- package/lib/runtime/materialized-model.js.map +1 -0
- package/lib/runtime/runtime-definition-wire.d.ts +118 -0
- package/lib/runtime/runtime-definition-wire.d.ts.map +1 -1
- package/lib/schemas/index.d.ts +210 -4
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +7 -1
- package/lib/schemas/index.js.map +1 -1
- package/package.json +1 -1
- package/lib/esm/chunk-L5CYU6K4.mjs.map +0 -1
- package/lib/esm/chunk-ZN3TO3U7.mjs.map +0 -1
- /package/lib/esm/{chunk-IJ2W77NR.mjs.map → chunk-HLW3X2NX.mjs.map} +0 -0
- /package/lib/esm/{chunk-EKT45BA4.mjs.map → chunk-LYWJTAAM.mjs.map} +0 -0
- /package/lib/esm/{chunk-UWGXMF6O.mjs.map → chunk-UF5TNIAZ.mjs.map} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
PAGE_STREAM_MAX_FRAME_BYTES,
|
|
5
5
|
PageStreamDescriptorSchema,
|
|
6
6
|
PageStreamEventSchema
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HLW3X2NX.mjs";
|
|
8
8
|
import {
|
|
9
9
|
AccessPolicySchema,
|
|
10
10
|
ActionProgramDefinitionSchema,
|
|
@@ -26,6 +26,8 @@ import {
|
|
|
26
26
|
DeclarativeRuntimeResolveResultSchema,
|
|
27
27
|
DeclarativeShellResourceDocumentSchema,
|
|
28
28
|
DeclarativeWorkbenchCatalogSchema,
|
|
29
|
+
DesignBoardChangesSchema,
|
|
30
|
+
DesignBoardDocumentSchema,
|
|
29
31
|
DesignCapabilityCatalogArtifactSchema,
|
|
30
32
|
DomainCommandDefinitionSchema,
|
|
31
33
|
DomainCommandSchema,
|
|
@@ -39,6 +41,7 @@ import {
|
|
|
39
41
|
LegacyRouteTakeoverAuthorizationSchema,
|
|
40
42
|
MENU_ACTIVATION_QUERY_PARAMETER,
|
|
41
43
|
MENU_CONTRACT_VERSION,
|
|
44
|
+
MaterializedModelProjectionSchema,
|
|
42
45
|
MenuAccessRequirementSchema,
|
|
43
46
|
MenuActionRegistrationSchema,
|
|
44
47
|
MenuBoundedInputSchema,
|
|
@@ -110,7 +113,7 @@ import {
|
|
|
110
113
|
require_validation,
|
|
111
114
|
require_validation_error,
|
|
112
115
|
resolveThemeTokens
|
|
113
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-GT5OGNJE.mjs";
|
|
114
117
|
import {
|
|
115
118
|
__commonJS,
|
|
116
119
|
__toESM
|
|
@@ -2419,7 +2422,7 @@ var singleByStableIdentity = (registrations, kind, id, path) => {
|
|
|
2419
2422
|
var usesResultValue = (mapping) => Object.values(mapping).some(
|
|
2420
2423
|
(source) => source.kind === "result-field" || source.kind === "expression" && source.expression !== void 0 && collectPageExpressionReads(
|
|
2421
2424
|
source.expression
|
|
2422
|
-
).some((
|
|
2425
|
+
).some((read2) => read2.root === "result")
|
|
2423
2426
|
);
|
|
2424
2427
|
var simpleEntityRef = (revisionRef) => ({
|
|
2425
2428
|
kind: revisionRef.kind,
|
|
@@ -6180,6 +6183,55 @@ function resolveWorkflowColumnResult(binding, payload, nowMs = Date.now()) {
|
|
|
6180
6183
|
return { value, expiresAt };
|
|
6181
6184
|
}
|
|
6182
6185
|
|
|
6186
|
+
// src/runtime/design-board.ts
|
|
6187
|
+
var stable = (value) => JSON.stringify(value, (_key, item) => item && typeof item === "object" && !Array.isArray(item) ? Object.fromEntries(Object.keys(item).sort().map((key) => [key, item[key]])) : item);
|
|
6188
|
+
var changed = (before, after, identity) => {
|
|
6189
|
+
const previous = new Map(before.map((value) => [identity(value), stable(value)]));
|
|
6190
|
+
return after.filter((value) => previous.get(identity(value)) !== stable(value));
|
|
6191
|
+
};
|
|
6192
|
+
function diffDesignBoardDocuments(before, after) {
|
|
6193
|
+
const pageElements = (document, id) => document.document.elements.filter((element) => String(element.customData?.designBoard?.pageId || document.domain.pages[0]?.id) === id);
|
|
6194
|
+
const removed = (left, right, identity) => {
|
|
6195
|
+
const kept = new Set(right.map(identity));
|
|
6196
|
+
return left.map(identity).filter((id) => !kept.has(id));
|
|
6197
|
+
};
|
|
6198
|
+
return DesignBoardChangesSchema.parse({
|
|
6199
|
+
...stable(before.document.appState) !== stable(after.document.appState) ? { appState: after.document.appState ?? {} } : {},
|
|
6200
|
+
...stable(before.domain.pages) !== stable(after.domain.pages) ? { pages: after.domain.pages } : {},
|
|
6201
|
+
scenes: after.domain.pages.filter((page) => stable(pageElements(before, page.id)) !== stable(pageElements(after, page.id))).map((page) => ({ pageId: page.id, elements: pageElements(after, page.id) })),
|
|
6202
|
+
nodes: changed(before.domain.nodes, after.domain.nodes, (node) => node.id),
|
|
6203
|
+
removedNodeIds: removed(before.domain.nodes, after.domain.nodes, (node) => node.id),
|
|
6204
|
+
connections: changed(before.domain.connections, after.domain.connections, (edge) => edge.id),
|
|
6205
|
+
removedConnectionIds: removed(before.domain.connections, after.domain.connections, (edge) => edge.id),
|
|
6206
|
+
files: changed(before.domain.files, after.domain.files, (file) => file.canonicalUri),
|
|
6207
|
+
removedFileUris: removed(before.domain.files, after.domain.files, (file) => file.canonicalUri)
|
|
6208
|
+
});
|
|
6209
|
+
}
|
|
6210
|
+
function applyDesignBoardChanges(document, changes) {
|
|
6211
|
+
changes = DesignBoardChangesSchema.parse(changes);
|
|
6212
|
+
const identities = [changes.scenes.map((scene) => scene.pageId), changes.nodes.map((node) => node.id), changes.connections.map((edge) => edge.id), changes.files.map((file) => file.canonicalUri)];
|
|
6213
|
+
if (identities.some((ids) => new Set(ids).size !== ids.length)) throw new Error("DESIGN_BOARD_CHANGE_IDENTITIES_DUPLICATE");
|
|
6214
|
+
const apply = (previous, updates, removed, identity) => {
|
|
6215
|
+
const values = new Map(previous.map((item) => [identity(item), item]));
|
|
6216
|
+
removed.forEach((id) => values.delete(id));
|
|
6217
|
+
updates.forEach((item) => values.set(identity(item), item));
|
|
6218
|
+
return [...values.values()];
|
|
6219
|
+
};
|
|
6220
|
+
const pages = changes.pages || document.domain.pages;
|
|
6221
|
+
const pageIds = new Set(pages.map((page) => page.id));
|
|
6222
|
+
if (changes.scenes.some((scene) => !pageIds.has(scene.pageId))) throw new Error("DESIGN_BOARD_CHANGE_PAGE_MISSING");
|
|
6223
|
+
const scenes = new Map(changes.scenes.map((scene) => [scene.pageId, scene.elements]));
|
|
6224
|
+
const elements = pages.flatMap((page) => scenes.get(page.id) ?? document.document.elements.filter((element) => String(element.customData?.designBoard?.pageId || document.domain.pages[0]?.id) === page.id));
|
|
6225
|
+
const result = { ...document, document: { ...document.document, elements, files: {}, ...changes.appState === void 0 ? {} : { appState: changes.appState } }, domain: {
|
|
6226
|
+
...document.domain,
|
|
6227
|
+
pages,
|
|
6228
|
+
nodes: apply(document.domain.nodes, changes.nodes, changes.removedNodeIds, (node) => node.id).filter((node) => pageIds.has(node.pageId)),
|
|
6229
|
+
connections: apply(document.domain.connections, changes.connections, changes.removedConnectionIds, (edge) => edge.id).filter((edge) => pageIds.has(edge.pageId)),
|
|
6230
|
+
files: apply(document.domain.files, changes.files, changes.removedFileUris, (file) => file.canonicalUri)
|
|
6231
|
+
} };
|
|
6232
|
+
return DesignBoardDocumentSchema.parse(result);
|
|
6233
|
+
}
|
|
6234
|
+
|
|
6183
6235
|
// src/runtime/access-compiler.ts
|
|
6184
6236
|
var uniqueBy = (values, key, label) => {
|
|
6185
6237
|
const result = /* @__PURE__ */ new Map();
|
|
@@ -6604,6 +6656,152 @@ var preparePagePropertyProjection = (bindings) => {
|
|
|
6604
6656
|
};
|
|
6605
6657
|
var projectPageProperties = (base, bindings, context) => projectParsedProperties(base, parsePropertyBindings(bindings), context);
|
|
6606
6658
|
|
|
6659
|
+
// src/runtime/materialized-model.ts
|
|
6660
|
+
var unsafe2 = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
|
|
6661
|
+
function fail2(code) {
|
|
6662
|
+
throw Object.assign(new Error(code), { code });
|
|
6663
|
+
}
|
|
6664
|
+
var object2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : fail2("MATERIALIZED_MODEL_INVALID");
|
|
6665
|
+
var read = (value, path) => {
|
|
6666
|
+
let current = value;
|
|
6667
|
+
for (const key of path) {
|
|
6668
|
+
if (unsafe2.has(key)) fail2("MATERIALIZED_MODEL_UNSAFE_PATH");
|
|
6669
|
+
if (!current || typeof current !== "object" || !Object.prototype.hasOwnProperty.call(current, key)) fail2("MATERIALIZED_MODEL_PATH_MISSING");
|
|
6670
|
+
current = current[key];
|
|
6671
|
+
}
|
|
6672
|
+
return current;
|
|
6673
|
+
};
|
|
6674
|
+
var integer = (value, min, max) => Number.isSafeInteger(value) && Number(value) >= min && Number(value) <= max ? Number(value) : fail2("MATERIALIZED_MODEL_INCOMPLETE");
|
|
6675
|
+
function assertMaterializedModelBudget(value, budget) {
|
|
6676
|
+
const pending = [{ value, depth: 0 }];
|
|
6677
|
+
let nodes = 0, bytes2 = 0;
|
|
6678
|
+
while (pending.length) {
|
|
6679
|
+
const item = pending.pop();
|
|
6680
|
+
if (++nodes > budget.maxNodes || item.depth > 64) fail2("MATERIALIZED_MODEL_BUDGET");
|
|
6681
|
+
bytes2 += 32;
|
|
6682
|
+
const current = item.value;
|
|
6683
|
+
if (typeof current === "string") bytes2 += current.length * 2;
|
|
6684
|
+
else if (typeof current === "number" && !Number.isFinite(current)) fail2("MATERIALIZED_MODEL_INVALID");
|
|
6685
|
+
else if (current !== null && typeof current === "object") {
|
|
6686
|
+
if (Array.isArray(current) && current.length > Math.max(budget.maxItems, budget.maxRows)) fail2("MATERIALIZED_MODEL_BUDGET");
|
|
6687
|
+
const prototype = Object.getPrototypeOf(current);
|
|
6688
|
+
if (prototype !== Object.prototype && prototype !== Array.prototype && prototype !== null) fail2("MATERIALIZED_MODEL_INVALID");
|
|
6689
|
+
for (const [key, child] of Object.entries(current)) {
|
|
6690
|
+
if (unsafe2.has(key)) fail2("MATERIALIZED_MODEL_UNSAFE_PATH");
|
|
6691
|
+
bytes2 += key.length * 2;
|
|
6692
|
+
if (pending.length >= budget.maxNodes) fail2("MATERIALIZED_MODEL_BUDGET");
|
|
6693
|
+
pending.push({ value: child, depth: item.depth + 1 });
|
|
6694
|
+
}
|
|
6695
|
+
} else if (current !== null && !["string", "number", "boolean"].includes(typeof current)) fail2("MATERIALIZED_MODEL_INVALID");
|
|
6696
|
+
if (bytes2 > budget.maxBytes) fail2("MATERIALIZED_MODEL_BUDGET");
|
|
6697
|
+
}
|
|
6698
|
+
}
|
|
6699
|
+
function assign(root, path, value) {
|
|
6700
|
+
let target = root;
|
|
6701
|
+
for (const key of path.slice(0, -1)) {
|
|
6702
|
+
if (unsafe2.has(key) || !target || typeof target !== "object" || !Object.prototype.hasOwnProperty.call(target, key)) fail2("MATERIALIZED_MODEL_PATH_MISSING");
|
|
6703
|
+
target = target[key];
|
|
6704
|
+
}
|
|
6705
|
+
const last = path[path.length - 1];
|
|
6706
|
+
if (unsafe2.has(last) || !target || typeof target !== "object" || !Object.prototype.hasOwnProperty.call(target, last)) fail2("MATERIALIZED_MODEL_PATH_MISSING");
|
|
6707
|
+
target[last] = value;
|
|
6708
|
+
}
|
|
6709
|
+
var overlaps = (a, b) => a.slice(0, Math.min(a.length, b.length)).every((key, index) => key === b[index]);
|
|
6710
|
+
var canonical = (value) => value && typeof value === "object" ? Array.isArray(value) ? "[" + value.map(canonical).join(",") + "]" : "{" + Object.keys(value).sort().map((key) => JSON.stringify(key) + ":" + canonical(value[key])).join(",") + "}" : JSON.stringify(value);
|
|
6711
|
+
function prepareMaterializedModelProjection(input) {
|
|
6712
|
+
const config = MaterializedModelProjectionSchema.parse(input);
|
|
6713
|
+
if (config.kind === "value") return (raw) => {
|
|
6714
|
+
const selected = object2(read(raw, config.path));
|
|
6715
|
+
assertMaterializedModelBudget(selected, config.budget);
|
|
6716
|
+
return structuredClone(selected);
|
|
6717
|
+
};
|
|
6718
|
+
for (let i = 0; i < config.collections.length; i++)
|
|
6719
|
+
if (config.collections.slice(i + 1).some((other) => overlaps(config.collections[i].path, other.path))) fail2("MATERIALIZED_MODEL_COLLECTION_OVERLAP");
|
|
6720
|
+
return (raw) => {
|
|
6721
|
+
const rows = read(raw, config.rowsPath);
|
|
6722
|
+
if (!Array.isArray(rows) || !rows.length || rows.length > config.budget.maxRows) fail2("MATERIALIZED_MODEL_INCOMPLETE");
|
|
6723
|
+
const parts = rows.map((row) => object2(read(row, config.valuePath)));
|
|
6724
|
+
assertMaterializedModelBudget(parts, config.budget);
|
|
6725
|
+
const batch = read(parts[0], config.batchPath);
|
|
6726
|
+
if (typeof batch !== "string" || !batch.trim() || batch.length > 256) fail2("MATERIALIZED_MODEL_BATCH_MISMATCH");
|
|
6727
|
+
const count = integer(read(parts[0], config.countPath), 1, config.budget.maxRows);
|
|
6728
|
+
if (parts.length !== count) fail2("MATERIALIZED_MODEL_INCOMPLETE");
|
|
6729
|
+
const ordered = new Array(count);
|
|
6730
|
+
for (const part of parts) {
|
|
6731
|
+
if (read(part, config.batchPath) !== batch || read(part, config.countPath) !== count) fail2("MATERIALIZED_MODEL_BATCH_MISMATCH");
|
|
6732
|
+
const position = integer(read(part, config.indexPath), 0, count - 1);
|
|
6733
|
+
if (ordered[position]) fail2("MATERIALIZED_MODEL_DUPLICATE_CHUNK");
|
|
6734
|
+
ordered[position] = part;
|
|
6735
|
+
}
|
|
6736
|
+
const collections = config.collections.map((collection) => ({
|
|
6737
|
+
config: collection,
|
|
6738
|
+
expected: integer(read(ordered[0], collection.totalPath), 0, config.budget.maxItems),
|
|
6739
|
+
items: [],
|
|
6740
|
+
keys: /* @__PURE__ */ new Set()
|
|
6741
|
+
}));
|
|
6742
|
+
let base, header;
|
|
6743
|
+
for (const part of ordered) {
|
|
6744
|
+
const model = structuredClone(object2(read(part, config.modelPath)));
|
|
6745
|
+
for (const collection of collections) {
|
|
6746
|
+
if (read(part, collection.config.totalPath) !== collection.expected) fail2("MATERIALIZED_MODEL_COUNT_MISMATCH");
|
|
6747
|
+
const items = read(model, collection.config.path);
|
|
6748
|
+
if (!Array.isArray(items)) fail2("MATERIALIZED_MODEL_INVALID");
|
|
6749
|
+
if (collection.items.length + items.length > config.budget.maxItems) fail2("MATERIALIZED_MODEL_BUDGET");
|
|
6750
|
+
for (const item of items) {
|
|
6751
|
+
if (collection.config.keyPath) {
|
|
6752
|
+
const key = read(item, collection.config.keyPath);
|
|
6753
|
+
if (typeof key !== "string" && !(typeof key === "number" && Number.isFinite(key))) fail2("MATERIALIZED_MODEL_INVALID_KEY");
|
|
6754
|
+
const identity = typeof key + ":" + key;
|
|
6755
|
+
if (collection.keys.has(identity)) fail2("MATERIALIZED_MODEL_DUPLICATE_ITEM");
|
|
6756
|
+
collection.keys.add(identity);
|
|
6757
|
+
}
|
|
6758
|
+
collection.items.push(item);
|
|
6759
|
+
}
|
|
6760
|
+
assign(model, collection.config.path, []);
|
|
6761
|
+
}
|
|
6762
|
+
const currentHeader = canonical(model);
|
|
6763
|
+
if (header !== void 0 && header !== currentHeader) fail2("MATERIALIZED_MODEL_HEADER_MISMATCH");
|
|
6764
|
+
header = currentHeader;
|
|
6765
|
+
base ?? (base = model);
|
|
6766
|
+
}
|
|
6767
|
+
for (const collection of collections) {
|
|
6768
|
+
if (collection.items.length !== collection.expected) fail2("MATERIALIZED_MODEL_COUNT_MISMATCH");
|
|
6769
|
+
assign(base, collection.config.path, collection.items);
|
|
6770
|
+
}
|
|
6771
|
+
assertMaterializedModelBudget(base, config.budget);
|
|
6772
|
+
return base;
|
|
6773
|
+
};
|
|
6774
|
+
}
|
|
6775
|
+
async function collectMaterializedModelPages(input) {
|
|
6776
|
+
const config = MaterializedModelProjectionSchema.parse(input.projection);
|
|
6777
|
+
if (config.kind !== "chunks" || !config.pagination) return input.first;
|
|
6778
|
+
const rows = read(input.first.model, config.rowsPath);
|
|
6779
|
+
if (!Array.isArray(rows)) fail2("MATERIALIZED_MODEL_INVALID");
|
|
6780
|
+
if (rows.length > config.budget.maxRows) fail2("MATERIALIZED_MODEL_BUDGET");
|
|
6781
|
+
let all = [...rows], current = input.first, pages = 1;
|
|
6782
|
+
const cursors = /* @__PURE__ */ new Set();
|
|
6783
|
+
assertMaterializedModelBudget(all, config.budget);
|
|
6784
|
+
while (current.pageInfo?.hasMore) {
|
|
6785
|
+
input.signal.throwIfAborted();
|
|
6786
|
+
const cursor = current.pageInfo.nextCursor;
|
|
6787
|
+
if (!cursor || cursors.has(cursor)) fail2("MATERIALIZED_MODEL_CURSOR_INVALID");
|
|
6788
|
+
if (pages >= config.pagination.maxPages) fail2("MATERIALIZED_MODEL_PAGE_LIMIT");
|
|
6789
|
+
cursors.add(cursor);
|
|
6790
|
+
current = await input.query(cursor, input.signal);
|
|
6791
|
+
input.signal.throwIfAborted();
|
|
6792
|
+
const nextRows = read(current.model, config.rowsPath);
|
|
6793
|
+
if (!Array.isArray(nextRows) || !nextRows.length) fail2("MATERIALIZED_MODEL_CURSOR_INVALID");
|
|
6794
|
+
if (all.length + nextRows.length > config.budget.maxRows) fail2("MATERIALIZED_MODEL_BUDGET");
|
|
6795
|
+
all.push(...nextRows);
|
|
6796
|
+
pages++;
|
|
6797
|
+
assertMaterializedModelBudget(all, config.budget);
|
|
6798
|
+
}
|
|
6799
|
+
input.signal.throwIfAborted();
|
|
6800
|
+
const model = structuredClone(input.first.model);
|
|
6801
|
+
assign(model, config.rowsPath, all);
|
|
6802
|
+
return { ...input.first, model, pageInfo: { ...current.pageInfo, hasMore: false, nextCursor: void 0, returned: all.length } };
|
|
6803
|
+
}
|
|
6804
|
+
|
|
6607
6805
|
// src/runtime/record-editor-draft.ts
|
|
6608
6806
|
var own = (value, key) => Object.prototype.hasOwnProperty.call(value, key);
|
|
6609
6807
|
var recordEditorValuesEqual = (left, right) => {
|
|
@@ -7064,7 +7262,7 @@ var PageCompositionSchema = z2.object({
|
|
|
7064
7262
|
body: SourceNode
|
|
7065
7263
|
}).strict();
|
|
7066
7264
|
var forbidden = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
|
|
7067
|
-
function
|
|
7265
|
+
function assign2(root, path, value) {
|
|
7068
7266
|
let target = root;
|
|
7069
7267
|
for (const [index, key] of path.entries()) {
|
|
7070
7268
|
if (forbidden.has(String(key)) || ["id", "children", "data", "actions", "programActions", "on", "effects"].includes(String(path[0])))
|
|
@@ -7112,7 +7310,7 @@ function compilePageComposition(input) {
|
|
|
7112
7310
|
for (const [name, binding] of Object.entries(definition.inputs ?? {})) {
|
|
7113
7311
|
const supplied = Object.prototype.hasOwnProperty.call(value.inputs ?? {}, name) ? value.inputs[name] : binding.default;
|
|
7114
7312
|
if (supplied === void 0) throw new TypeError(`Missing component input ${name}.`);
|
|
7115
|
-
|
|
7313
|
+
assign2(root, binding.path, supplied);
|
|
7116
7314
|
}
|
|
7117
7315
|
for (const name of Object.keys(value.slots ?? {}))
|
|
7118
7316
|
if (!definition.slots?.[name]) throw new TypeError(`Unknown component slot ${name}.`);
|
|
@@ -7221,6 +7419,8 @@ export {
|
|
|
7221
7419
|
compileWorkflowPersistenceProjection,
|
|
7222
7420
|
parseWorkflowColumnBinding,
|
|
7223
7421
|
resolveWorkflowColumnResult,
|
|
7422
|
+
diffDesignBoardDocuments,
|
|
7423
|
+
applyDesignBoardChanges,
|
|
7224
7424
|
compileProductAccessDeclaration,
|
|
7225
7425
|
compileComponentAssemblyValidator,
|
|
7226
7426
|
readPageValue,
|
|
@@ -7230,6 +7430,9 @@ export {
|
|
|
7230
7430
|
preparePageExpression,
|
|
7231
7431
|
preparePagePropertyProjection,
|
|
7232
7432
|
projectPageProperties,
|
|
7433
|
+
assertMaterializedModelBudget,
|
|
7434
|
+
prepareMaterializedModelProjection,
|
|
7435
|
+
collectMaterializedModelPages,
|
|
7233
7436
|
recordEditorValuesEqual,
|
|
7234
7437
|
recordEditorPathKey,
|
|
7235
7438
|
createRecordEditorDraft,
|
|
@@ -7256,4 +7459,4 @@ export {
|
|
|
7256
7459
|
PageCompositionSchema,
|
|
7257
7460
|
compilePageComposition
|
|
7258
7461
|
};
|
|
7259
|
-
//# sourceMappingURL=chunk-
|
|
7462
|
+
//# sourceMappingURL=chunk-AGT4MIWF.mjs.map
|