@neocompose/cli 0.39.0 → 0.40.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/CHANGELOG.md +18 -0
- package/dist/neo.mjs +515 -1032
- package/package.json +1 -1
- package/skills/neocompose-cli/SKILL.md +1 -1
- package/skills/neocompose-cli/references/cli-development.md +1 -1
package/dist/neo.mjs
CHANGED
|
@@ -42381,193 +42381,7 @@ var init_source_format = __esm({
|
|
|
42381
42381
|
}
|
|
42382
42382
|
});
|
|
42383
42383
|
|
|
42384
|
-
// node_modules/uuid/dist-node/regex.js
|
|
42385
|
-
var regex_default;
|
|
42386
|
-
var init_regex = __esm({
|
|
42387
|
-
"node_modules/uuid/dist-node/regex.js"() {
|
|
42388
|
-
regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
|
|
42389
|
-
}
|
|
42390
|
-
});
|
|
42391
|
-
|
|
42392
|
-
// node_modules/uuid/dist-node/validate.js
|
|
42393
|
-
function validate(uuid) {
|
|
42394
|
-
return typeof uuid === "string" && regex_default.test(uuid);
|
|
42395
|
-
}
|
|
42396
|
-
var validate_default;
|
|
42397
|
-
var init_validate2 = __esm({
|
|
42398
|
-
"node_modules/uuid/dist-node/validate.js"() {
|
|
42399
|
-
init_regex();
|
|
42400
|
-
validate_default = validate;
|
|
42401
|
-
}
|
|
42402
|
-
});
|
|
42403
|
-
|
|
42404
|
-
// node_modules/uuid/dist-node/parse.js
|
|
42405
|
-
function parse(uuid) {
|
|
42406
|
-
if (!validate_default(uuid)) {
|
|
42407
|
-
throw TypeError("Invalid UUID");
|
|
42408
|
-
}
|
|
42409
|
-
let v;
|
|
42410
|
-
return Uint8Array.of((v = parseInt(uuid.slice(0, 8), 16)) >>> 24, v >>> 16 & 255, v >>> 8 & 255, v & 255, (v = parseInt(uuid.slice(9, 13), 16)) >>> 8, v & 255, (v = parseInt(uuid.slice(14, 18), 16)) >>> 8, v & 255, (v = parseInt(uuid.slice(19, 23), 16)) >>> 8, v & 255, (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255, v / 4294967296 & 255, v >>> 24 & 255, v >>> 16 & 255, v >>> 8 & 255, v & 255);
|
|
42411
|
-
}
|
|
42412
|
-
var parse_default;
|
|
42413
|
-
var init_parse = __esm({
|
|
42414
|
-
"node_modules/uuid/dist-node/parse.js"() {
|
|
42415
|
-
init_validate2();
|
|
42416
|
-
parse_default = parse;
|
|
42417
|
-
}
|
|
42418
|
-
});
|
|
42419
|
-
|
|
42420
|
-
// node_modules/uuid/dist-node/stringify.js
|
|
42421
|
-
function unsafeStringify(arr, offset = 0) {
|
|
42422
|
-
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
42423
|
-
}
|
|
42424
|
-
var byteToHex;
|
|
42425
|
-
var init_stringify = __esm({
|
|
42426
|
-
"node_modules/uuid/dist-node/stringify.js"() {
|
|
42427
|
-
byteToHex = [];
|
|
42428
|
-
for (let i = 0; i < 256; ++i) {
|
|
42429
|
-
byteToHex.push((i + 256).toString(16).slice(1));
|
|
42430
|
-
}
|
|
42431
|
-
}
|
|
42432
|
-
});
|
|
42433
|
-
|
|
42434
|
-
// node_modules/uuid/dist-node/rng.js
|
|
42435
|
-
function rng() {
|
|
42436
|
-
return crypto.getRandomValues(rnds8);
|
|
42437
|
-
}
|
|
42438
|
-
var rnds8;
|
|
42439
|
-
var init_rng = __esm({
|
|
42440
|
-
"node_modules/uuid/dist-node/rng.js"() {
|
|
42441
|
-
rnds8 = new Uint8Array(16);
|
|
42442
|
-
}
|
|
42443
|
-
});
|
|
42444
|
-
|
|
42445
|
-
// node_modules/uuid/dist-node/v35.js
|
|
42446
|
-
function stringToBytes(str) {
|
|
42447
|
-
str = unescape(encodeURIComponent(str));
|
|
42448
|
-
const bytes = new Uint8Array(str.length);
|
|
42449
|
-
for (let i = 0; i < str.length; ++i) {
|
|
42450
|
-
bytes[i] = str.charCodeAt(i);
|
|
42451
|
-
}
|
|
42452
|
-
return bytes;
|
|
42453
|
-
}
|
|
42454
|
-
function v35(version, hash, value, namespace, buf, offset) {
|
|
42455
|
-
const valueBytes = typeof value === "string" ? stringToBytes(value) : value;
|
|
42456
|
-
const namespaceBytes = typeof namespace === "string" ? parse_default(namespace) : namespace;
|
|
42457
|
-
if (typeof namespace === "string") {
|
|
42458
|
-
namespace = parse_default(namespace);
|
|
42459
|
-
}
|
|
42460
|
-
if (namespace?.length !== 16) {
|
|
42461
|
-
throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
|
|
42462
|
-
}
|
|
42463
|
-
let bytes = new Uint8Array(16 + valueBytes.length);
|
|
42464
|
-
bytes.set(namespaceBytes);
|
|
42465
|
-
bytes.set(valueBytes, namespaceBytes.length);
|
|
42466
|
-
bytes = hash(bytes);
|
|
42467
|
-
bytes[6] = bytes[6] & 15 | version;
|
|
42468
|
-
bytes[8] = bytes[8] & 63 | 128;
|
|
42469
|
-
if (buf) {
|
|
42470
|
-
offset ??= 0;
|
|
42471
|
-
if (offset < 0 || offset + 16 > buf.length) {
|
|
42472
|
-
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
42473
|
-
}
|
|
42474
|
-
for (let i = 0; i < 16; ++i) {
|
|
42475
|
-
buf[offset + i] = bytes[i];
|
|
42476
|
-
}
|
|
42477
|
-
return buf;
|
|
42478
|
-
}
|
|
42479
|
-
return unsafeStringify(bytes);
|
|
42480
|
-
}
|
|
42481
|
-
var DNS, URL2;
|
|
42482
|
-
var init_v35 = __esm({
|
|
42483
|
-
"node_modules/uuid/dist-node/v35.js"() {
|
|
42484
|
-
init_parse();
|
|
42485
|
-
init_stringify();
|
|
42486
|
-
DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
|
|
42487
|
-
URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
42488
|
-
}
|
|
42489
|
-
});
|
|
42490
|
-
|
|
42491
|
-
// node_modules/uuid/dist-node/v4.js
|
|
42492
|
-
function v4(options, buf, offset) {
|
|
42493
|
-
if (!buf && !options && crypto.randomUUID) {
|
|
42494
|
-
return crypto.randomUUID();
|
|
42495
|
-
}
|
|
42496
|
-
return _v4(options, buf, offset);
|
|
42497
|
-
}
|
|
42498
|
-
function _v4(options, buf, offset) {
|
|
42499
|
-
options = options || {};
|
|
42500
|
-
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
42501
|
-
if (rnds.length < 16) {
|
|
42502
|
-
throw new Error("Random bytes length must be >= 16");
|
|
42503
|
-
}
|
|
42504
|
-
rnds[6] = rnds[6] & 15 | 64;
|
|
42505
|
-
rnds[8] = rnds[8] & 63 | 128;
|
|
42506
|
-
if (buf) {
|
|
42507
|
-
offset = offset || 0;
|
|
42508
|
-
if (offset < 0 || offset + 16 > buf.length) {
|
|
42509
|
-
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
42510
|
-
}
|
|
42511
|
-
for (let i = 0; i < 16; ++i) {
|
|
42512
|
-
buf[offset + i] = rnds[i];
|
|
42513
|
-
}
|
|
42514
|
-
return buf;
|
|
42515
|
-
}
|
|
42516
|
-
return unsafeStringify(rnds);
|
|
42517
|
-
}
|
|
42518
|
-
var v4_default;
|
|
42519
|
-
var init_v4 = __esm({
|
|
42520
|
-
"node_modules/uuid/dist-node/v4.js"() {
|
|
42521
|
-
init_rng();
|
|
42522
|
-
init_stringify();
|
|
42523
|
-
v4_default = v4;
|
|
42524
|
-
}
|
|
42525
|
-
});
|
|
42526
|
-
|
|
42527
|
-
// node_modules/uuid/dist-node/sha1.js
|
|
42528
|
-
import { createHash as createHash2 } from "node:crypto";
|
|
42529
|
-
function sha1(bytes) {
|
|
42530
|
-
if (Array.isArray(bytes)) {
|
|
42531
|
-
bytes = Buffer.from(bytes);
|
|
42532
|
-
} else if (typeof bytes === "string") {
|
|
42533
|
-
bytes = Buffer.from(bytes, "utf8");
|
|
42534
|
-
}
|
|
42535
|
-
return createHash2("sha1").update(bytes).digest();
|
|
42536
|
-
}
|
|
42537
|
-
var sha1_default;
|
|
42538
|
-
var init_sha1 = __esm({
|
|
42539
|
-
"node_modules/uuid/dist-node/sha1.js"() {
|
|
42540
|
-
sha1_default = sha1;
|
|
42541
|
-
}
|
|
42542
|
-
});
|
|
42543
|
-
|
|
42544
|
-
// node_modules/uuid/dist-node/v5.js
|
|
42545
|
-
function v5(value, namespace, buf, offset) {
|
|
42546
|
-
return v35(80, sha1_default, value, namespace, buf, offset);
|
|
42547
|
-
}
|
|
42548
|
-
var v5_default;
|
|
42549
|
-
var init_v5 = __esm({
|
|
42550
|
-
"node_modules/uuid/dist-node/v5.js"() {
|
|
42551
|
-
init_sha1();
|
|
42552
|
-
init_v35();
|
|
42553
|
-
v5.DNS = DNS;
|
|
42554
|
-
v5.URL = URL2;
|
|
42555
|
-
v5_default = v5;
|
|
42556
|
-
}
|
|
42557
|
-
});
|
|
42558
|
-
|
|
42559
|
-
// node_modules/uuid/dist-node/index.js
|
|
42560
|
-
var init_dist_node = __esm({
|
|
42561
|
-
"node_modules/uuid/dist-node/index.js"() {
|
|
42562
|
-
init_v4();
|
|
42563
|
-
init_v5();
|
|
42564
|
-
}
|
|
42565
|
-
});
|
|
42566
|
-
|
|
42567
42384
|
// src/project-source/ui-action-source.ts
|
|
42568
|
-
function uiLogicFunctionSourceId(storedFunctionId, useId) {
|
|
42569
|
-
return storedFunctionId.startsWith("legacy-function:") ? v5_default(`dialogue-ui-condition:${useId}`, UI_LOGIC_SOURCE_NAMESPACE) : storedFunctionId;
|
|
42570
|
-
}
|
|
42571
42385
|
function isCompleteUIAction(rawAction) {
|
|
42572
42386
|
const action = object(rawAction);
|
|
42573
42387
|
if (!action || !Array.isArray(action.instructions)) return false;
|
|
@@ -42766,13 +42580,11 @@ function object(value) {
|
|
|
42766
42580
|
function identifier(value) {
|
|
42767
42581
|
return /^[A-Za-z_][A-Za-z0-9_]*$/u.test(value);
|
|
42768
42582
|
}
|
|
42769
|
-
var
|
|
42583
|
+
var conditionOperator;
|
|
42770
42584
|
var init_ui_action_source = __esm({
|
|
42771
42585
|
"src/project-source/ui-action-source.ts"() {
|
|
42772
42586
|
"use strict";
|
|
42773
42587
|
init_source_format();
|
|
42774
|
-
init_dist_node();
|
|
42775
|
-
UI_LOGIC_SOURCE_NAMESPACE = "0b03137f-573a-5dc2-b7b5-8105c3a734a0";
|
|
42776
42588
|
conditionOperator = {
|
|
42777
42589
|
greaterThan: ">",
|
|
42778
42590
|
greaterThanOrEqualTo: ">=",
|
|
@@ -45255,7 +45067,9 @@ function isMemberNSFunctionBase(value) {
|
|
|
45255
45067
|
if (v.defaultValue !== void 0 && v.defaultValue !== null) return false;
|
|
45256
45068
|
if (v.storage !== void 0 && v.storage !== null) return false;
|
|
45257
45069
|
if (v.storageKey !== void 0 && v.storageKey !== null) return false;
|
|
45258
|
-
if (v.valueId !== void 0
|
|
45070
|
+
if (v.valueId !== void 0) {
|
|
45071
|
+
return false;
|
|
45072
|
+
}
|
|
45259
45073
|
if (!isNSFunctionReturnTypeInfo(v.returnTypeInfo)) return false;
|
|
45260
45074
|
if (!Array.isArray(v.argumentTypes)) return false;
|
|
45261
45075
|
if (v.dispatch !== void 0 && v.dispatch !== 0 /* Synchronous */ && v.dispatch !== 1 /* Asynchronous */)
|
|
@@ -45523,7 +45337,7 @@ function isMemberBase(value) {
|
|
|
45523
45337
|
if (typeof v?.name !== "string") return false;
|
|
45524
45338
|
if (v.requirement !== void 0 && v.requirement !== 0 /* Optional */ && v.requirement !== 1 /* Required */)
|
|
45525
45339
|
return false;
|
|
45526
|
-
if (v.mutability !== void 0 && v.mutability !==
|
|
45340
|
+
if (v.mutability !== void 0 && v.mutability !== 1 /* ReadOnly */) {
|
|
45527
45341
|
return false;
|
|
45528
45342
|
}
|
|
45529
45343
|
if (v.access !== void 0 && !isMemberAccessKind(v.access)) return false;
|
|
@@ -45545,7 +45359,7 @@ function isMemberBase(value) {
|
|
|
45545
45359
|
function isMemberProps(value) {
|
|
45546
45360
|
const v = value;
|
|
45547
45361
|
const valueIdField = v?.valueId;
|
|
45548
|
-
const valueIdOk = typeof valueIdField === "string" || valueIdField === void 0
|
|
45362
|
+
const valueIdOk = typeof valueIdField === "string" || valueIdField === void 0;
|
|
45549
45363
|
return isMemberBase(value) && valueIdOk && typeof v?.projectId === "string" && isEpochMillis(v?.createdAt) && isEpochMillis(v?.updatedAt);
|
|
45550
45364
|
}
|
|
45551
45365
|
function isMember(value) {
|
|
@@ -45598,12 +45412,12 @@ function isMemberValueBase(value) {
|
|
|
45598
45412
|
}
|
|
45599
45413
|
function isMemberValueProps(value) {
|
|
45600
45414
|
const v = value;
|
|
45601
|
-
const containerIdOk = v?.containerId === void 0 ||
|
|
45602
|
-
const mapKeyOk = v?.mapKey === void 0 ||
|
|
45603
|
-
const genericBindingsOk = v?.genericBindings === void 0 || v?.genericBindings
|
|
45415
|
+
const containerIdOk = v?.containerId === void 0 || typeof v?.containerId === "string";
|
|
45416
|
+
const mapKeyOk = v?.mapKey === void 0 || typeof v?.mapKey === "string";
|
|
45417
|
+
const genericBindingsOk = v?.genericBindings === void 0 || v?.genericBindings !== null && typeof v?.genericBindings === "object" && !Array.isArray(v.genericBindings) && Object.values(v.genericBindings).every(
|
|
45604
45418
|
(bindingId) => typeof bindingId === "string" && bindingId.length > 0
|
|
45605
45419
|
);
|
|
45606
|
-
const sourceValueIdOk = v?.sourceValueId === void 0 ||
|
|
45420
|
+
const sourceValueIdOk = v?.sourceValueId === void 0 || typeof v?.sourceValueId === "string" && v.sourceValueId.length > 0;
|
|
45607
45421
|
return isMemberValueBase(value) && containerIdOk && mapKeyOk && genericBindingsOk && sourceValueIdOk && typeof v?.id === "string" && typeof v?.projectId === "string" && isEpochMillis(v?.createdAt) && isEpochMillis(v?.updatedAt);
|
|
45608
45422
|
}
|
|
45609
45423
|
function isMemberValue(value) {
|
|
@@ -45621,7 +45435,7 @@ function isMemberOverrideBase(value) {
|
|
|
45621
45435
|
if (!isValidDocsText(v.docsText)) return false;
|
|
45622
45436
|
if (v.requirement !== void 0 && v.requirement !== 0 /* Optional */ && v.requirement !== 1 /* Required */)
|
|
45623
45437
|
return false;
|
|
45624
|
-
if (v.mutability !== void 0 && v.mutability !==
|
|
45438
|
+
if (v.mutability !== void 0 && v.mutability !== 1 /* ReadOnly */) {
|
|
45625
45439
|
return false;
|
|
45626
45440
|
}
|
|
45627
45441
|
if (v.access !== void 0 && !isMemberAccessKind(v.access)) return false;
|
|
@@ -45760,7 +45574,9 @@ function isMemberOverrideProps(value) {
|
|
|
45760
45574
|
if (!isMemberOverrideBase(value)) return false;
|
|
45761
45575
|
if (typeof v?.id !== "string") return false;
|
|
45762
45576
|
if (typeof v?.projectId !== "string") return false;
|
|
45763
|
-
if (typeof v?.valueId !== "string" && v?.valueId !== void 0)
|
|
45577
|
+
if (typeof v?.valueId !== "string" && v?.valueId !== void 0) {
|
|
45578
|
+
return false;
|
|
45579
|
+
}
|
|
45764
45580
|
if (!isEpochMillis(v?.createdAt)) return false;
|
|
45765
45581
|
if (!isEpochMillis(v?.updatedAt)) return false;
|
|
45766
45582
|
if (v.getter !== void 0 && !isNSGetter(v.getter)) return false;
|
|
@@ -45791,7 +45607,9 @@ function isMemberOverrideProps(value) {
|
|
|
45791
45607
|
if (v.requirement === 1 /* Required */) return false;
|
|
45792
45608
|
if (v.defaultValue !== void 0 && v.defaultValue !== null) return false;
|
|
45793
45609
|
if (v.storageKey !== void 0 && v.storageKey !== null) return false;
|
|
45794
|
-
if (v.valueId !== void 0
|
|
45610
|
+
if (v.valueId !== void 0) {
|
|
45611
|
+
return false;
|
|
45612
|
+
}
|
|
45795
45613
|
if (v.bodyMode === 1 /* UI */) {
|
|
45796
45614
|
if (!isNSFunctionUIBody(v.uiAction)) return false;
|
|
45797
45615
|
if (v.code !== void 0 && v.code !== null) return false;
|
|
@@ -45831,7 +45649,9 @@ function isUncompiledMemberNSFunctionOverride(value) {
|
|
|
45831
45649
|
if (typeof v.projectId !== "string") return false;
|
|
45832
45650
|
if (!isEpochMillis(v.createdAt)) return false;
|
|
45833
45651
|
if (!isEpochMillis(v.updatedAt)) return false;
|
|
45834
|
-
if (v.valueId !== void 0)
|
|
45652
|
+
if (v.valueId !== void 0) {
|
|
45653
|
+
return false;
|
|
45654
|
+
}
|
|
45835
45655
|
if (v.returnTypeInfo !== void 0) return false;
|
|
45836
45656
|
if (v.argumentTypes !== void 0) return false;
|
|
45837
45657
|
if (v.dispatch !== void 0) return false;
|
|
@@ -46225,6 +46045,189 @@ var init_inheritance = __esm({
|
|
|
46225
46045
|
}
|
|
46226
46046
|
});
|
|
46227
46047
|
|
|
46048
|
+
// node_modules/uuid/dist-node/regex.js
|
|
46049
|
+
var regex_default;
|
|
46050
|
+
var init_regex = __esm({
|
|
46051
|
+
"node_modules/uuid/dist-node/regex.js"() {
|
|
46052
|
+
regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
|
|
46053
|
+
}
|
|
46054
|
+
});
|
|
46055
|
+
|
|
46056
|
+
// node_modules/uuid/dist-node/validate.js
|
|
46057
|
+
function validate(uuid) {
|
|
46058
|
+
return typeof uuid === "string" && regex_default.test(uuid);
|
|
46059
|
+
}
|
|
46060
|
+
var validate_default;
|
|
46061
|
+
var init_validate2 = __esm({
|
|
46062
|
+
"node_modules/uuid/dist-node/validate.js"() {
|
|
46063
|
+
init_regex();
|
|
46064
|
+
validate_default = validate;
|
|
46065
|
+
}
|
|
46066
|
+
});
|
|
46067
|
+
|
|
46068
|
+
// node_modules/uuid/dist-node/parse.js
|
|
46069
|
+
function parse(uuid) {
|
|
46070
|
+
if (!validate_default(uuid)) {
|
|
46071
|
+
throw TypeError("Invalid UUID");
|
|
46072
|
+
}
|
|
46073
|
+
let v;
|
|
46074
|
+
return Uint8Array.of((v = parseInt(uuid.slice(0, 8), 16)) >>> 24, v >>> 16 & 255, v >>> 8 & 255, v & 255, (v = parseInt(uuid.slice(9, 13), 16)) >>> 8, v & 255, (v = parseInt(uuid.slice(14, 18), 16)) >>> 8, v & 255, (v = parseInt(uuid.slice(19, 23), 16)) >>> 8, v & 255, (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255, v / 4294967296 & 255, v >>> 24 & 255, v >>> 16 & 255, v >>> 8 & 255, v & 255);
|
|
46075
|
+
}
|
|
46076
|
+
var parse_default;
|
|
46077
|
+
var init_parse = __esm({
|
|
46078
|
+
"node_modules/uuid/dist-node/parse.js"() {
|
|
46079
|
+
init_validate2();
|
|
46080
|
+
parse_default = parse;
|
|
46081
|
+
}
|
|
46082
|
+
});
|
|
46083
|
+
|
|
46084
|
+
// node_modules/uuid/dist-node/stringify.js
|
|
46085
|
+
function unsafeStringify(arr, offset = 0) {
|
|
46086
|
+
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
46087
|
+
}
|
|
46088
|
+
var byteToHex;
|
|
46089
|
+
var init_stringify = __esm({
|
|
46090
|
+
"node_modules/uuid/dist-node/stringify.js"() {
|
|
46091
|
+
byteToHex = [];
|
|
46092
|
+
for (let i = 0; i < 256; ++i) {
|
|
46093
|
+
byteToHex.push((i + 256).toString(16).slice(1));
|
|
46094
|
+
}
|
|
46095
|
+
}
|
|
46096
|
+
});
|
|
46097
|
+
|
|
46098
|
+
// node_modules/uuid/dist-node/rng.js
|
|
46099
|
+
function rng() {
|
|
46100
|
+
return crypto.getRandomValues(rnds8);
|
|
46101
|
+
}
|
|
46102
|
+
var rnds8;
|
|
46103
|
+
var init_rng = __esm({
|
|
46104
|
+
"node_modules/uuid/dist-node/rng.js"() {
|
|
46105
|
+
rnds8 = new Uint8Array(16);
|
|
46106
|
+
}
|
|
46107
|
+
});
|
|
46108
|
+
|
|
46109
|
+
// node_modules/uuid/dist-node/v35.js
|
|
46110
|
+
function stringToBytes(str) {
|
|
46111
|
+
str = unescape(encodeURIComponent(str));
|
|
46112
|
+
const bytes = new Uint8Array(str.length);
|
|
46113
|
+
for (let i = 0; i < str.length; ++i) {
|
|
46114
|
+
bytes[i] = str.charCodeAt(i);
|
|
46115
|
+
}
|
|
46116
|
+
return bytes;
|
|
46117
|
+
}
|
|
46118
|
+
function v35(version, hash, value, namespace, buf, offset) {
|
|
46119
|
+
const valueBytes = typeof value === "string" ? stringToBytes(value) : value;
|
|
46120
|
+
const namespaceBytes = typeof namespace === "string" ? parse_default(namespace) : namespace;
|
|
46121
|
+
if (typeof namespace === "string") {
|
|
46122
|
+
namespace = parse_default(namespace);
|
|
46123
|
+
}
|
|
46124
|
+
if (namespace?.length !== 16) {
|
|
46125
|
+
throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
|
|
46126
|
+
}
|
|
46127
|
+
let bytes = new Uint8Array(16 + valueBytes.length);
|
|
46128
|
+
bytes.set(namespaceBytes);
|
|
46129
|
+
bytes.set(valueBytes, namespaceBytes.length);
|
|
46130
|
+
bytes = hash(bytes);
|
|
46131
|
+
bytes[6] = bytes[6] & 15 | version;
|
|
46132
|
+
bytes[8] = bytes[8] & 63 | 128;
|
|
46133
|
+
if (buf) {
|
|
46134
|
+
offset ??= 0;
|
|
46135
|
+
if (offset < 0 || offset + 16 > buf.length) {
|
|
46136
|
+
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
46137
|
+
}
|
|
46138
|
+
for (let i = 0; i < 16; ++i) {
|
|
46139
|
+
buf[offset + i] = bytes[i];
|
|
46140
|
+
}
|
|
46141
|
+
return buf;
|
|
46142
|
+
}
|
|
46143
|
+
return unsafeStringify(bytes);
|
|
46144
|
+
}
|
|
46145
|
+
var DNS, URL2;
|
|
46146
|
+
var init_v35 = __esm({
|
|
46147
|
+
"node_modules/uuid/dist-node/v35.js"() {
|
|
46148
|
+
init_parse();
|
|
46149
|
+
init_stringify();
|
|
46150
|
+
DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
|
|
46151
|
+
URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
46152
|
+
}
|
|
46153
|
+
});
|
|
46154
|
+
|
|
46155
|
+
// node_modules/uuid/dist-node/v4.js
|
|
46156
|
+
function v4(options, buf, offset) {
|
|
46157
|
+
if (!buf && !options && crypto.randomUUID) {
|
|
46158
|
+
return crypto.randomUUID();
|
|
46159
|
+
}
|
|
46160
|
+
return _v4(options, buf, offset);
|
|
46161
|
+
}
|
|
46162
|
+
function _v4(options, buf, offset) {
|
|
46163
|
+
options = options || {};
|
|
46164
|
+
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
46165
|
+
if (rnds.length < 16) {
|
|
46166
|
+
throw new Error("Random bytes length must be >= 16");
|
|
46167
|
+
}
|
|
46168
|
+
rnds[6] = rnds[6] & 15 | 64;
|
|
46169
|
+
rnds[8] = rnds[8] & 63 | 128;
|
|
46170
|
+
if (buf) {
|
|
46171
|
+
offset = offset || 0;
|
|
46172
|
+
if (offset < 0 || offset + 16 > buf.length) {
|
|
46173
|
+
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
46174
|
+
}
|
|
46175
|
+
for (let i = 0; i < 16; ++i) {
|
|
46176
|
+
buf[offset + i] = rnds[i];
|
|
46177
|
+
}
|
|
46178
|
+
return buf;
|
|
46179
|
+
}
|
|
46180
|
+
return unsafeStringify(rnds);
|
|
46181
|
+
}
|
|
46182
|
+
var v4_default;
|
|
46183
|
+
var init_v4 = __esm({
|
|
46184
|
+
"node_modules/uuid/dist-node/v4.js"() {
|
|
46185
|
+
init_rng();
|
|
46186
|
+
init_stringify();
|
|
46187
|
+
v4_default = v4;
|
|
46188
|
+
}
|
|
46189
|
+
});
|
|
46190
|
+
|
|
46191
|
+
// node_modules/uuid/dist-node/sha1.js
|
|
46192
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
46193
|
+
function sha1(bytes) {
|
|
46194
|
+
if (Array.isArray(bytes)) {
|
|
46195
|
+
bytes = Buffer.from(bytes);
|
|
46196
|
+
} else if (typeof bytes === "string") {
|
|
46197
|
+
bytes = Buffer.from(bytes, "utf8");
|
|
46198
|
+
}
|
|
46199
|
+
return createHash2("sha1").update(bytes).digest();
|
|
46200
|
+
}
|
|
46201
|
+
var sha1_default;
|
|
46202
|
+
var init_sha1 = __esm({
|
|
46203
|
+
"node_modules/uuid/dist-node/sha1.js"() {
|
|
46204
|
+
sha1_default = sha1;
|
|
46205
|
+
}
|
|
46206
|
+
});
|
|
46207
|
+
|
|
46208
|
+
// node_modules/uuid/dist-node/v5.js
|
|
46209
|
+
function v5(value, namespace, buf, offset) {
|
|
46210
|
+
return v35(80, sha1_default, value, namespace, buf, offset);
|
|
46211
|
+
}
|
|
46212
|
+
var v5_default;
|
|
46213
|
+
var init_v5 = __esm({
|
|
46214
|
+
"node_modules/uuid/dist-node/v5.js"() {
|
|
46215
|
+
init_sha1();
|
|
46216
|
+
init_v35();
|
|
46217
|
+
v5.DNS = DNS;
|
|
46218
|
+
v5.URL = URL2;
|
|
46219
|
+
v5_default = v5;
|
|
46220
|
+
}
|
|
46221
|
+
});
|
|
46222
|
+
|
|
46223
|
+
// node_modules/uuid/dist-node/index.js
|
|
46224
|
+
var init_dist_node = __esm({
|
|
46225
|
+
"node_modules/uuid/dist-node/index.js"() {
|
|
46226
|
+
init_v4();
|
|
46227
|
+
init_v5();
|
|
46228
|
+
}
|
|
46229
|
+
});
|
|
46230
|
+
|
|
46228
46231
|
// ../src/models/system-record-id.ts
|
|
46229
46232
|
function isSystemRecordId(id2) {
|
|
46230
46233
|
return id2.startsWith(SYSTEM_RECORD_ID_PREFIX2);
|
|
@@ -46517,20 +46520,20 @@ var init_world_system_classes_generated = __esm({
|
|
|
46517
46520
|
memberKind: "vector2",
|
|
46518
46521
|
defaultValue: { x: 1, y: 1 },
|
|
46519
46522
|
requirement: 1 /* Required */,
|
|
46520
|
-
schemaKey: "
|
|
46523
|
+
schemaKey: "Size"
|
|
46521
46524
|
},
|
|
46522
46525
|
{
|
|
46523
46526
|
memberId: "system_ec5b5d5e-7053-4378-87d1-9cceec30ff1a",
|
|
46524
46527
|
memberKind: "vector2",
|
|
46525
46528
|
defaultValue: { x: 0.5, y: 0.5 },
|
|
46526
46529
|
docsText: "Offset from the object's origin-cell corner, measured in cells, matching Unity's BoxCollider2D model. (0.5, 0.5) centers a 1x1 collider on the origin cell.",
|
|
46527
|
-
schemaKey: "
|
|
46530
|
+
schemaKey: "Offset"
|
|
46528
46531
|
},
|
|
46529
46532
|
{
|
|
46530
46533
|
memberId: "system_6ed1890b-0ae6-4979-bf5b-6f216d69f432",
|
|
46531
46534
|
memberKind: "bool",
|
|
46532
46535
|
defaultValue: false,
|
|
46533
|
-
schemaKey: "
|
|
46536
|
+
schemaKey: "IsTrigger"
|
|
46534
46537
|
}
|
|
46535
46538
|
],
|
|
46536
46539
|
worldKind: "objectCollider"
|
|
@@ -50883,6 +50886,10 @@ function buildDefaultMemberValue(args) {
|
|
|
50883
50886
|
evaluated.provisionalRootId,
|
|
50884
50887
|
value2.id
|
|
50885
50888
|
);
|
|
50889
|
+
args.document.retargetProvisionalRoot?.(
|
|
50890
|
+
evaluated.provisionalRootId,
|
|
50891
|
+
value2.id
|
|
50892
|
+
);
|
|
50886
50893
|
}
|
|
50887
50894
|
args.createdValues.push(value2);
|
|
50888
50895
|
recordStorageKeyDeclaration(args.storageKeyDeclarations, value2.id, member);
|
|
@@ -51335,6 +51342,10 @@ function cloneDefaultValueForMember(args) {
|
|
|
51335
51342
|
evaluated.provisionalRootId,
|
|
51336
51343
|
evaluatedRow.id
|
|
51337
51344
|
);
|
|
51345
|
+
args.document.retargetProvisionalRoot?.(
|
|
51346
|
+
evaluated.provisionalRootId,
|
|
51347
|
+
evaluatedRow.id
|
|
51348
|
+
);
|
|
51338
51349
|
}
|
|
51339
51350
|
evaluatedRow.sourceValueId = sourceValue.sourceValueId ?? args.sourceValueId;
|
|
51340
51351
|
args.createdValues.push(evaluatedRow);
|
|
@@ -55364,7 +55375,7 @@ function collectDialogueGroupFunctions(data, groupId, resolver) {
|
|
|
55364
55375
|
"sourceFunctionId",
|
|
55365
55376
|
`Dialogue group ${groupId} condition ${useId}`
|
|
55366
55377
|
);
|
|
55367
|
-
const functionId =
|
|
55378
|
+
const functionId = storedFunctionId;
|
|
55368
55379
|
const requestedName = requiredStringField(
|
|
55369
55380
|
value,
|
|
55370
55381
|
"sourceFunctionName",
|
|
@@ -57856,9 +57867,7 @@ function emitDialogue(args) {
|
|
|
57856
57867
|
mainLocaleText(args.localizedTexts, descriptionId, args.mainLocale)
|
|
57857
57868
|
)
|
|
57858
57869
|
]);
|
|
57859
|
-
|
|
57860
|
-
localizedTextIds.add(descriptionId);
|
|
57861
|
-
}
|
|
57870
|
+
localizedTextIds.add(descriptionId);
|
|
57862
57871
|
}
|
|
57863
57872
|
const rawSettings = isObjectRecord2(args.dialogue.settings) ? args.dialogue.settings : {};
|
|
57864
57873
|
settings.push([
|
|
@@ -57973,7 +57982,7 @@ function emitTextNode(context, node) {
|
|
|
57973
57982
|
nodeBindings,
|
|
57974
57983
|
prosePrimaryAlias
|
|
57975
57984
|
);
|
|
57976
|
-
const localizedTextIds = textId
|
|
57985
|
+
const localizedTextIds = textId ? [textId] : [];
|
|
57977
57986
|
const lines = [];
|
|
57978
57987
|
lines.push(
|
|
57979
57988
|
...[...nodeBindings.values()].map(
|
|
@@ -58051,7 +58060,7 @@ ${indentNeoSource(
|
|
|
58051
58060
|
|
|
58052
58061
|
return ${destination};
|
|
58053
58062
|
}`,
|
|
58054
|
-
localizedTextIds: textId
|
|
58063
|
+
localizedTextIds: textId ? [textId] : []
|
|
58055
58064
|
};
|
|
58056
58065
|
}
|
|
58057
58066
|
function emitActionsNode(context, node) {
|
|
@@ -58264,7 +58273,6 @@ TODO: ${reason.replaceAll('"""', "triple quote")}
|
|
|
58264
58273
|
}
|
|
58265
58274
|
function mainLocaleText(records2, id2, locale) {
|
|
58266
58275
|
const record3 = records2.get(id2);
|
|
58267
|
-
if (record3 === void 0 && isLegacyInlineText(id2)) return id2;
|
|
58268
58276
|
const localeValues = record3 && isObjectRecord2(record3.localeValues) ? record3.localeValues : null;
|
|
58269
58277
|
const value = localeValues && isObjectRecord2(localeValues[locale]) ? localeValues[locale].value : null;
|
|
58270
58278
|
if (typeof value !== "string") {
|
|
@@ -58272,12 +58280,6 @@ function mainLocaleText(records2, id2, locale) {
|
|
|
58272
58280
|
}
|
|
58273
58281
|
return value;
|
|
58274
58282
|
}
|
|
58275
|
-
function isLegacyInlineLocalizedText(records2, value) {
|
|
58276
|
-
return !records2.has(value) && isLegacyInlineText(value);
|
|
58277
|
-
}
|
|
58278
|
-
function isLegacyInlineText(value) {
|
|
58279
|
-
return /[\s.,!?;:'"\u2026]/u.test(value);
|
|
58280
|
-
}
|
|
58281
58283
|
function collectFunctions(args) {
|
|
58282
58284
|
const functions = /* @__PURE__ */ new Map();
|
|
58283
58285
|
const byUse = /* @__PURE__ */ new Map();
|
|
@@ -58307,14 +58309,7 @@ function collectFunctions(args) {
|
|
|
58307
58309
|
const useId = stringField(condition, "id");
|
|
58308
58310
|
const projected = condition.type === 0 ? uiConditionSource(condition.getter, resolver) : null;
|
|
58309
58311
|
add(
|
|
58310
|
-
projected === null ? condition : {
|
|
58311
|
-
...condition,
|
|
58312
|
-
sourceFunctionId: uiLogicFunctionSourceId(
|
|
58313
|
-
stringField(condition, "sourceFunctionId"),
|
|
58314
|
-
useId
|
|
58315
|
-
),
|
|
58316
|
-
code: projected
|
|
58317
|
-
},
|
|
58312
|
+
projected === null ? condition : { ...condition, code: projected },
|
|
58318
58313
|
`condition:${useId}`,
|
|
58319
58314
|
"bool"
|
|
58320
58315
|
);
|
|
@@ -66277,6 +66272,8 @@ function resolveOwnerMembersForValues(document, targetValueIds, additionalRoots,
|
|
|
66277
66272
|
}
|
|
66278
66273
|
}
|
|
66279
66274
|
function overlayStamp(env, stamp) {
|
|
66275
|
+
if (stamp === null || stamp === void 0 || Object.keys(stamp).length === 0)
|
|
66276
|
+
return env;
|
|
66280
66277
|
return new Map([...env, ...envFromStamp(stamp)]);
|
|
66281
66278
|
}
|
|
66282
66279
|
function searchChildren(member, rootOwner, body, ambientEnv, rootKind) {
|
|
@@ -66286,11 +66283,12 @@ function resolveOwnerMembersForValues(document, targetValueIds, additionalRoots,
|
|
|
66286
66283
|
const schemaClass2 = classesById2.get(effectiveClassId);
|
|
66287
66284
|
if (schemaClass2 === void 0) return;
|
|
66288
66285
|
const merged = storedSchema(effectiveClassId);
|
|
66289
|
-
const
|
|
66286
|
+
const instanceEnv = member.classArguments === void 0 || member.classArguments === null ? defaultInstanceEnv(effectiveClassId) : resolveInstanceEnv(
|
|
66290
66287
|
effectiveClassId,
|
|
66291
66288
|
member.classArguments,
|
|
66292
66289
|
document.classes
|
|
66293
66290
|
);
|
|
66291
|
+
const env = overlayStamp(instanceEnv, body.genericBindings);
|
|
66294
66292
|
for (const entry of merged) {
|
|
66295
66293
|
if (entry.memberId === null) continue;
|
|
66296
66294
|
const childValueId = body.value[entry.schemaKey];
|
|
@@ -67062,7 +67060,7 @@ var init_constructor_argument_ownership = __esm({
|
|
|
67062
67060
|
id: rewriteId(row.id),
|
|
67063
67061
|
value,
|
|
67064
67062
|
...typeof row.containerId !== "string" ? {} : { containerId: rewriteId(row.containerId) },
|
|
67065
|
-
...row.sourceValueId === void 0
|
|
67063
|
+
...row.sourceValueId === void 0 ? {} : { sourceValueId: rewriteId(row.sourceValueId) },
|
|
67066
67064
|
...constructorArgs === void 0 ? {} : { constructorArgs }
|
|
67067
67065
|
};
|
|
67068
67066
|
}
|
|
@@ -68559,21 +68557,6 @@ function indexEvaluatorRow(indexes, row, allowBaseShadow = false, sharedCachesAl
|
|
|
68559
68557
|
}
|
|
68560
68558
|
indexes.ownedValueAttachmentsByValueId.delete(row.id);
|
|
68561
68559
|
indexes.constructorOwnershipDirtyValueIds.add(row.id);
|
|
68562
|
-
if (Array.isArray(row.value)) {
|
|
68563
|
-
for (const childId of row.value) {
|
|
68564
|
-
if (typeof childId === "string") {
|
|
68565
|
-
indexes.ownedValueAttachmentsByValueId.delete(childId);
|
|
68566
|
-
indexes.constructorOwnershipDirtyValueIds.add(childId);
|
|
68567
|
-
}
|
|
68568
|
-
}
|
|
68569
|
-
} else if (typeof row.value === "object" && row.value !== null) {
|
|
68570
|
-
for (const childId of Object.values(row.value)) {
|
|
68571
|
-
if (typeof childId === "string") {
|
|
68572
|
-
indexes.ownedValueAttachmentsByValueId.delete(childId);
|
|
68573
|
-
indexes.constructorOwnershipDirtyValueIds.add(childId);
|
|
68574
|
-
}
|
|
68575
|
-
}
|
|
68576
|
-
}
|
|
68577
68560
|
indexes.indexedRowIds.add(row.id);
|
|
68578
68561
|
if (typeof row.sourceValueId === "string") {
|
|
68579
68562
|
const rows = indexes.rowsBySourceValueId.get(row.sourceValueId) ?? [];
|
|
@@ -68586,20 +68569,11 @@ function indexEvaluatorRow(indexes, row, allowBaseShadow = false, sharedCachesAl
|
|
|
68586
68569
|
if (typeof row.value === "object" && row.value !== null) {
|
|
68587
68570
|
indexes.rowByValueReference.set(row.value, row);
|
|
68588
68571
|
}
|
|
68589
|
-
|
|
68590
|
-
|
|
68591
|
-
|
|
68592
|
-
|
|
68593
|
-
|
|
68594
|
-
}
|
|
68595
|
-
return;
|
|
68596
|
-
}
|
|
68597
|
-
if (typeof row.value !== "object" || row.value === null) return;
|
|
68598
|
-
for (const [key, childId] of Object.entries(row.value)) {
|
|
68599
|
-
if (typeof childId === "string") {
|
|
68600
|
-
addEvaluatorParentLink(indexes, childId, row.id, key);
|
|
68601
|
-
}
|
|
68602
|
-
}
|
|
68572
|
+
visitEvaluatorRecordOwnershipEdges(indexes, row, (childId, key) => {
|
|
68573
|
+
indexes.ownedValueAttachmentsByValueId.delete(childId);
|
|
68574
|
+
indexes.constructorOwnershipDirtyValueIds.add(childId);
|
|
68575
|
+
addEvaluatorParentLink(indexes, childId, row.id, key);
|
|
68576
|
+
});
|
|
68603
68577
|
}
|
|
68604
68578
|
function indexEvaluatorRows(indexes, rows, allowBaseShadow = false, liveOverlayRowById) {
|
|
68605
68579
|
let sharedCachesInvalidated = false;
|
|
@@ -68631,54 +68605,63 @@ function indexEvaluatorRows(indexes, rows, allowBaseShadow = false, liveOverlayR
|
|
|
68631
68605
|
}
|
|
68632
68606
|
}
|
|
68633
68607
|
function evaluatorOwnershipEdgesAreComplete(indexes, row) {
|
|
68634
|
-
|
|
68608
|
+
return visitEvaluatorRecordOwnershipEdges(indexes, row, (childId, key) => {
|
|
68635
68609
|
const links = evaluatorParentLinks(indexes, childId);
|
|
68636
68610
|
if (!links.some((link) => link.parentId === row.id && link.key === key)) {
|
|
68637
68611
|
return false;
|
|
68638
68612
|
}
|
|
68639
|
-
}
|
|
68640
|
-
return true;
|
|
68613
|
+
});
|
|
68641
68614
|
}
|
|
68642
68615
|
function augmentEvaluatorOwnershipEdges(indexes, row, liveRow) {
|
|
68643
|
-
const liveChildIdsByKey = liveRow === null || liveRow === row ? null : liveEdgeChildIdsByKey(liveRow);
|
|
68644
|
-
|
|
68616
|
+
const liveChildIdsByKey = liveRow === null || liveRow === row ? null : liveEdgeChildIdsByKey(indexes, liveRow);
|
|
68617
|
+
visitEvaluatorRecordOwnershipEdges(indexes, row, (childId, key) => {
|
|
68645
68618
|
const liveChildIds = liveChildIdsByKey?.get(key);
|
|
68646
|
-
if (liveChildIds !== void 0 && !liveChildIds.has(childId))
|
|
68619
|
+
if (liveChildIds !== void 0 && !liveChildIds.has(childId)) return;
|
|
68647
68620
|
const links = evaluatorParentLinks(indexes, childId);
|
|
68648
68621
|
if (links.some((link) => link.parentId === row.id && link.key === key)) {
|
|
68649
|
-
|
|
68622
|
+
return;
|
|
68650
68623
|
}
|
|
68651
68624
|
addEvaluatorParentLink(indexes, childId, row.id, key);
|
|
68652
68625
|
indexes.ownedValueAttachmentsByValueId.delete(childId);
|
|
68653
68626
|
indexes.constructorOwnershipDirtyValueIds.add(childId);
|
|
68654
|
-
}
|
|
68627
|
+
});
|
|
68655
68628
|
}
|
|
68656
|
-
function liveEdgeChildIdsByKey(liveRow) {
|
|
68629
|
+
function liveEdgeChildIdsByKey(indexes, liveRow) {
|
|
68657
68630
|
const childIdsByKey = /* @__PURE__ */ new Map();
|
|
68658
|
-
|
|
68659
|
-
|
|
68660
|
-
|
|
68661
|
-
|
|
68662
|
-
|
|
68631
|
+
visitEvaluatorRecordOwnershipEdges(
|
|
68632
|
+
indexes,
|
|
68633
|
+
liveRow,
|
|
68634
|
+
(liveChildId, liveKey) => {
|
|
68635
|
+
const bucket = childIdsByKey.get(liveKey);
|
|
68636
|
+
if (bucket === void 0) {
|
|
68637
|
+
childIdsByKey.set(liveKey, /* @__PURE__ */ new Set([liveChildId]));
|
|
68638
|
+
return;
|
|
68639
|
+
}
|
|
68640
|
+
bucket.add(liveChildId);
|
|
68663
68641
|
}
|
|
68664
|
-
|
|
68665
|
-
}
|
|
68642
|
+
);
|
|
68666
68643
|
return childIdsByKey;
|
|
68667
68644
|
}
|
|
68668
|
-
function
|
|
68645
|
+
function visitEvaluatorRecordOwnershipEdges(indexes, row, visit) {
|
|
68646
|
+
const directMember = indexes.memberByValueId.get(row.id);
|
|
68647
|
+
const sourceMember = typeof row.sourceValueId === "string" ? indexes.memberByValueId.get(row.sourceValueId) : void 0;
|
|
68648
|
+
const classBacked = typeof row.classId === "string" || directMember !== void 0 && isMemberClassBase(directMember) || sourceMember !== void 0 && isMemberClassBase(sourceMember);
|
|
68649
|
+
if (!classBacked && isMemberDelegateTarget(row.value)) return true;
|
|
68669
68650
|
if (Array.isArray(row.value)) {
|
|
68670
|
-
const edges2 = [];
|
|
68671
68651
|
for (const childId of row.value) {
|
|
68672
|
-
if (typeof childId === "string"
|
|
68652
|
+
if (typeof childId === "string" && visit(childId, "") === false) {
|
|
68653
|
+
return false;
|
|
68654
|
+
}
|
|
68673
68655
|
}
|
|
68674
|
-
return
|
|
68656
|
+
return true;
|
|
68675
68657
|
}
|
|
68676
|
-
if (typeof row.value !== "object" || row.value === null) return
|
|
68677
|
-
const edges = [];
|
|
68658
|
+
if (typeof row.value !== "object" || row.value === null) return true;
|
|
68678
68659
|
for (const [key, childId] of Object.entries(row.value)) {
|
|
68679
|
-
if (typeof childId === "string"
|
|
68660
|
+
if (typeof childId === "string" && visit(childId, key) === false) {
|
|
68661
|
+
return false;
|
|
68662
|
+
}
|
|
68680
68663
|
}
|
|
68681
|
-
return
|
|
68664
|
+
return true;
|
|
68682
68665
|
}
|
|
68683
68666
|
function unindexEvaluatorRow(indexes, row) {
|
|
68684
68667
|
indexes.indexedRowIds.delete(row.id);
|
|
@@ -68699,9 +68682,7 @@ function unindexEvaluatorRow(indexes, row) {
|
|
|
68699
68682
|
}
|
|
68700
68683
|
}
|
|
68701
68684
|
}
|
|
68702
|
-
|
|
68703
|
-
for (const childId of childIds) {
|
|
68704
|
-
if (typeof childId !== "string") continue;
|
|
68685
|
+
visitEvaluatorRecordOwnershipEdges(indexes, row, (childId) => {
|
|
68705
68686
|
const links = indexes.parentLinksByChildId.get(childId);
|
|
68706
68687
|
if (links !== void 0) {
|
|
68707
68688
|
const retained = links.filter((link) => link.parentId !== row.id);
|
|
@@ -68710,7 +68691,7 @@ function unindexEvaluatorRow(indexes, row) {
|
|
|
68710
68691
|
}
|
|
68711
68692
|
indexes.ownedValueAttachmentsByValueId.delete(childId);
|
|
68712
68693
|
indexes.constructorOwnershipDirtyValueIds.add(childId);
|
|
68713
|
-
}
|
|
68694
|
+
});
|
|
68714
68695
|
indexes.ownershipRootIdsByRowId.clear();
|
|
68715
68696
|
indexes.ownershipDistancesByRowId.clear();
|
|
68716
68697
|
indexes.memberByRowId.clear();
|
|
@@ -74271,6 +74252,11 @@ function constructClassValueWithinFrame(descriptor, scope, ctx) {
|
|
|
74271
74252
|
body,
|
|
74272
74253
|
ctx.__executionState?.constructionTimestamp
|
|
74273
74254
|
),
|
|
74255
|
+
retargetProvisionalRoot: (provisionalRootId, replacementRootId) => retargetConstructorGroupDependencies(
|
|
74256
|
+
provisionalRootId,
|
|
74257
|
+
replacementRootId,
|
|
74258
|
+
ctx
|
|
74259
|
+
),
|
|
74274
74260
|
projectFiles: ctx.vm.projectFiles ?? [],
|
|
74275
74261
|
textureTemplates: ctx.vm.textureTemplates ?? []
|
|
74276
74262
|
},
|
|
@@ -75084,6 +75070,24 @@ function recordConstructorGroupDependency(valueId, destination, ctx) {
|
|
|
75084
75070
|
}
|
|
75085
75071
|
dependencies.add(dependencyRootId);
|
|
75086
75072
|
}
|
|
75073
|
+
function retargetConstructorGroupDependencies(provisionalRootId, replacementRootId, ctx) {
|
|
75074
|
+
const state = ctx.__executionState;
|
|
75075
|
+
if (state === void 0) return;
|
|
75076
|
+
const dependencies = state.constructorGroupDependencies.get(provisionalRootId);
|
|
75077
|
+
if (dependencies === void 0) return;
|
|
75078
|
+
state.constructorGroupDependencies.delete(provisionalRootId);
|
|
75079
|
+
dependencies.delete(replacementRootId);
|
|
75080
|
+
const replacementDependencies = state.constructorGroupDependencies.get(replacementRootId);
|
|
75081
|
+
if (replacementDependencies === void 0) {
|
|
75082
|
+
if (dependencies.size > 0) {
|
|
75083
|
+
state.constructorGroupDependencies.set(replacementRootId, dependencies);
|
|
75084
|
+
}
|
|
75085
|
+
return;
|
|
75086
|
+
}
|
|
75087
|
+
for (const dependencyRootId of dependencies) {
|
|
75088
|
+
replacementDependencies.add(dependencyRootId);
|
|
75089
|
+
}
|
|
75090
|
+
}
|
|
75087
75091
|
function encodeRequiredConstructorArgument(args) {
|
|
75088
75092
|
const trackedId = findKnownRowIdByValueReference(args.value, args.ctx);
|
|
75089
75093
|
const replayedAggregateId = trackedId === null && args.ctx.storedConstructionReplay === true && typeof args.value === "string" && evalValueById(
|
|
@@ -75131,7 +75135,7 @@ function encodeRequiredConstructorArgument(args) {
|
|
|
75131
75135
|
const collectionType = args.typeInfo;
|
|
75132
75136
|
const registerRow = (value, containerId) => {
|
|
75133
75137
|
const row2 = buildNewValue(args.ctx.vm.project.id, { value });
|
|
75134
|
-
row2.containerId = containerId
|
|
75138
|
+
if (containerId !== void 0) row2.containerId = containerId;
|
|
75135
75139
|
args.createdValues.push(row2);
|
|
75136
75140
|
args.storageKeyDeclarations.set(
|
|
75137
75141
|
row2.id,
|
|
@@ -75870,6 +75874,11 @@ function constructDeclaredClassValueWithinFrame(descriptor, record3, info, scope
|
|
|
75870
75874
|
body,
|
|
75871
75875
|
ctx.__executionState?.constructionTimestamp
|
|
75872
75876
|
),
|
|
75877
|
+
retargetProvisionalRoot: (provisionalRootId, replacementRootId) => retargetConstructorGroupDependencies(
|
|
75878
|
+
provisionalRootId,
|
|
75879
|
+
replacementRootId,
|
|
75880
|
+
ctx
|
|
75881
|
+
),
|
|
75873
75882
|
projectFiles: ctx.vm.projectFiles ?? [],
|
|
75874
75883
|
textureTemplates: ctx.vm.textureTemplates ?? []
|
|
75875
75884
|
},
|
|
@@ -76260,7 +76269,7 @@ function cloneConstructorArgumentGraph(args) {
|
|
|
76260
76269
|
// source row; this path builds a fresh body, so it projects it.
|
|
76261
76270
|
...isLiteralValueContent(source) ? clonedConstructorProvenance(source) : {}
|
|
76262
76271
|
});
|
|
76263
|
-
clone.containerId = clonedContainerId
|
|
76272
|
+
if (clonedContainerId !== void 0) clone.containerId = clonedContainerId;
|
|
76264
76273
|
if (isMemberListBase(member) || isMemberDictionaryBase(member)) {
|
|
76265
76274
|
const stamp = computeGenericBindingsStamp(
|
|
76266
76275
|
member,
|
|
@@ -76798,14 +76807,22 @@ function cloneClassValueGraph(receiver, expectedClassId, ctx) {
|
|
|
76798
76807
|
...evaluated.classId === null ? {} : { classId: evaluated.classId },
|
|
76799
76808
|
...evaluated.genericBindings === void 0 ? {} : { genericBindings: { ...evaluated.genericBindings } },
|
|
76800
76809
|
...deepClonePlainData(pickInstanceProvenance(evaluated)),
|
|
76801
|
-
containerId: clonedContainerId
|
|
76810
|
+
...clonedContainerId === void 0 ? {} : { containerId: clonedContainerId }
|
|
76802
76811
|
};
|
|
76812
|
+
if (clonedContainerId === void 0) {
|
|
76813
|
+
Reflect.deleteProperty(clone, "containerId");
|
|
76814
|
+
}
|
|
76803
76815
|
if (evaluated.provisionalRootId !== void 0) {
|
|
76804
76816
|
retargetDelegateReceiverValueIds(
|
|
76805
76817
|
[clone, ...initializerCreatedValues],
|
|
76806
76818
|
evaluated.provisionalRootId,
|
|
76807
76819
|
clone.id
|
|
76808
76820
|
);
|
|
76821
|
+
retargetConstructorGroupDependencies(
|
|
76822
|
+
evaluated.provisionalRootId,
|
|
76823
|
+
clone.id,
|
|
76824
|
+
ctx
|
|
76825
|
+
);
|
|
76809
76826
|
}
|
|
76810
76827
|
registerRuntimeSessionValue(ctx, clone);
|
|
76811
76828
|
clonedBySourceId.set(sourceRow.id, clone);
|
|
@@ -76844,8 +76861,11 @@ function cloneClassValueGraph(receiver, expectedClassId, ctx) {
|
|
|
76844
76861
|
// A clone root is parentless even when the source was an unordered-list
|
|
76845
76862
|
// member. Descendants only retain container ownership when their cloned
|
|
76846
76863
|
// parent explicitly supplies its fresh id.
|
|
76847
|
-
containerId: clonedContainerId
|
|
76864
|
+
...clonedContainerId === void 0 ? {} : { containerId: clonedContainerId }
|
|
76848
76865
|
};
|
|
76866
|
+
if (clonedContainerId === void 0) {
|
|
76867
|
+
Reflect.deleteProperty(clone, "containerId");
|
|
76868
|
+
}
|
|
76849
76869
|
registerRuntimeSessionValue(ctx, clone);
|
|
76850
76870
|
clonedBySourceId.set(sourceRow.id, clone);
|
|
76851
76871
|
if (typeof sourceRow.value === "object" && sourceRow.value !== null && !Array.isArray(sourceRow.value)) {
|
|
@@ -77885,7 +77905,7 @@ function resolveVirtualInstanceGraph(args) {
|
|
|
77885
77905
|
projectId: args.instanceRoot.projectId,
|
|
77886
77906
|
createdAt: args.instanceRoot.createdAt,
|
|
77887
77907
|
updatedAt: args.instanceRoot.updatedAt,
|
|
77888
|
-
mapKey: args.instanceRoot.mapKey
|
|
77908
|
+
...args.instanceRoot.mapKey === void 0 ? {} : { mapKey: args.instanceRoot.mapKey }
|
|
77889
77909
|
} : {}
|
|
77890
77910
|
};
|
|
77891
77911
|
if (isMemberClassBase(indexed.member) && effective.value !== null) {
|
|
@@ -79192,10 +79212,10 @@ function createFromVirtual(location3, value) {
|
|
|
79192
79212
|
value,
|
|
79193
79213
|
...typeof row.classId !== "string" ? {} : { classId: row.classId },
|
|
79194
79214
|
...pickInstanceProvenance(row),
|
|
79195
|
-
...row.containerId === void 0
|
|
79196
|
-
...row.mapKey === void 0
|
|
79215
|
+
...row.containerId === void 0 ? {} : { containerId: row.containerId },
|
|
79216
|
+
...row.mapKey === void 0 ? {} : { mapKey: row.mapKey },
|
|
79197
79217
|
...row.genericBindings === void 0 ? {} : { genericBindings: { ...row.genericBindings } },
|
|
79198
|
-
...row.sourceValueId === void 0
|
|
79218
|
+
...row.sourceValueId === void 0 ? {} : { sourceValueId: row.sourceValueId }
|
|
79199
79219
|
};
|
|
79200
79220
|
if (location3.parentId !== null && location3.parentSegment !== null) {
|
|
79201
79221
|
create.valuePlacement = {
|
|
@@ -80001,7 +80021,7 @@ function evaluateMemberInitializer(args) {
|
|
|
80001
80021
|
if (rootRow === null) return { value: result.value, classId: null };
|
|
80002
80022
|
const constructorArgs = (typeof result.value === "object" && result.value !== null ? ctx.__constructedArgumentsByValue?.get(result.value) : void 0) ?? // An implicit `new()` records its empty args on the row rather than in
|
|
80003
80023
|
// the declared-constructor argument map; the pair must survive either
|
|
80004
|
-
// origin or the recipe reads as
|
|
80024
|
+
// origin or the recipe reads as an unrecorded overload.
|
|
80005
80025
|
rootRow.constructorArgs ?? void 0;
|
|
80006
80026
|
const pinnedRootSchemaKeys = typeof result.value === "object" && result.value !== null ? ctx.__constructedFieldSchemaKeysByValue?.get(result.value) : void 0;
|
|
80007
80027
|
const provenance = pickInstanceProvenance({
|
|
@@ -80412,297 +80432,6 @@ var init_projectRecordBuckets = __esm({
|
|
|
80412
80432
|
});
|
|
80413
80433
|
|
|
80414
80434
|
// ../src/database/project-record-migrations.ts
|
|
80415
|
-
function migrateMemberAccessModifier(data) {
|
|
80416
|
-
if (!isRecord4(data)) return data;
|
|
80417
|
-
if (Object.prototype.hasOwnProperty.call(data, "accessModifierKind")) {
|
|
80418
|
-
return data;
|
|
80419
|
-
}
|
|
80420
|
-
return { ...data, accessModifierKind: "public" };
|
|
80421
|
-
}
|
|
80422
|
-
function migrateInterfaceMemberAccessModifiers(data) {
|
|
80423
|
-
if (!isRecord4(data)) return data;
|
|
80424
|
-
const members = data.members;
|
|
80425
|
-
if (!isRecord4(members)) return data;
|
|
80426
|
-
let nextMembers = members;
|
|
80427
|
-
for (const [memberKey, member] of Object.entries(members)) {
|
|
80428
|
-
if (!isRecord4(member)) continue;
|
|
80429
|
-
if (Object.prototype.hasOwnProperty.call(member, "accessModifierKind")) {
|
|
80430
|
-
continue;
|
|
80431
|
-
}
|
|
80432
|
-
if (nextMembers === members) nextMembers = { ...members };
|
|
80433
|
-
nextMembers[memberKey] = { ...member, accessModifierKind: "public" };
|
|
80434
|
-
}
|
|
80435
|
-
if (nextMembers === members) return data;
|
|
80436
|
-
return { ...data, members: nextMembers };
|
|
80437
|
-
}
|
|
80438
|
-
function migrateMemberRecordShape(data) {
|
|
80439
|
-
if (!isRecord4(data)) return data;
|
|
80440
|
-
const override = typeof data.extendsMemberId === "string";
|
|
80441
|
-
const edit = createRecordEditor(data);
|
|
80442
|
-
assertOptionalLegacyBoolean(edit, "locked");
|
|
80443
|
-
edit.delete("locked");
|
|
80444
|
-
migrateBooleanAxis(edit, "required", "requirement", 1, override);
|
|
80445
|
-
migrateBooleanAxis(edit, "isReadOnly", "mutability", 1, false);
|
|
80446
|
-
migrateBooleanAxis(edit, "localizable", "format", 0, override, {
|
|
80447
|
-
falseOrdinal: 1
|
|
80448
|
-
});
|
|
80449
|
-
migrateBooleanAxis(edit, "searchKey", "searchBy", 1, override);
|
|
80450
|
-
migrateBooleanAxis(edit, "multiselect", "selection", 1, override);
|
|
80451
|
-
migrateBooleanAxis(edit, "deferred", "dispatch", 1, override);
|
|
80452
|
-
migrateBooleanAxis(edit, "partial", "payload", 1, override);
|
|
80453
|
-
migrateMemberModifier(edit, override);
|
|
80454
|
-
migrateStringOrdinal(edit, "accessModifierKind", "access", {
|
|
80455
|
-
public: 0,
|
|
80456
|
-
protected: 1,
|
|
80457
|
-
private: 2
|
|
80458
|
-
});
|
|
80459
|
-
migrateStringOrdinal(
|
|
80460
|
-
edit,
|
|
80461
|
-
"storage",
|
|
80462
|
-
"storage",
|
|
80463
|
-
{ inherit: 0, immutable: 1, save: 2, session: 3 },
|
|
80464
|
-
!override
|
|
80465
|
-
);
|
|
80466
|
-
migrateStringOrdinal(
|
|
80467
|
-
edit,
|
|
80468
|
-
"keyKind",
|
|
80469
|
-
"keyKind",
|
|
80470
|
-
{ string: 0, enum: 1 },
|
|
80471
|
-
!override
|
|
80472
|
-
);
|
|
80473
|
-
migrateStringOrdinal(
|
|
80474
|
-
edit,
|
|
80475
|
-
"listKind",
|
|
80476
|
-
"listKind",
|
|
80477
|
-
{ ordered: 0, unordered: 1 },
|
|
80478
|
-
!override
|
|
80479
|
-
);
|
|
80480
|
-
if (edit.value("bodyMode") === "ui") edit.set("bodyMode", 1);
|
|
80481
|
-
const classArguments2 = migrateGenericBindings(edit.value("classArguments"));
|
|
80482
|
-
edit.setIfChanged("classArguments", classArguments2);
|
|
80483
|
-
if (!override && classArguments2 === null) edit.delete("classArguments");
|
|
80484
|
-
const indexes = edit.value("indexes");
|
|
80485
|
-
if (!override && indexes === null) {
|
|
80486
|
-
edit.delete("indexes");
|
|
80487
|
-
} else if (Array.isArray(indexes)) {
|
|
80488
|
-
edit.setIfChanged(
|
|
80489
|
-
"indexes",
|
|
80490
|
-
mapReferencePreserving(indexes, migrateListIndex)
|
|
80491
|
-
);
|
|
80492
|
-
}
|
|
80493
|
-
const columns = edit.value("columnSettings");
|
|
80494
|
-
if (!override && columns === null) {
|
|
80495
|
-
edit.delete("columnSettings");
|
|
80496
|
-
} else if (Array.isArray(columns)) {
|
|
80497
|
-
edit.setIfChanged(
|
|
80498
|
-
"columnSettings",
|
|
80499
|
-
mapReferencePreserving(columns, migrateListColumn)
|
|
80500
|
-
);
|
|
80501
|
-
}
|
|
80502
|
-
for (const field of ["system", "keyEnumId"]) {
|
|
80503
|
-
if (edit.value(field) === null) edit.delete(field);
|
|
80504
|
-
}
|
|
80505
|
-
if (!override) {
|
|
80506
|
-
for (const field of MEMBER_OVERRIDE_EXPLICIT_CLEAR_FIELDS) {
|
|
80507
|
-
if (edit.value(field) === null) edit.delete(field);
|
|
80508
|
-
}
|
|
80509
|
-
}
|
|
80510
|
-
for (const field of [
|
|
80511
|
-
"declaredTypeInfo",
|
|
80512
|
-
"targetTypeInfo",
|
|
80513
|
-
"valueTypeInfo",
|
|
80514
|
-
"returnTypeInfo",
|
|
80515
|
-
"argumentTypes",
|
|
80516
|
-
"getter",
|
|
80517
|
-
"setter",
|
|
80518
|
-
"action",
|
|
80519
|
-
"uiAction"
|
|
80520
|
-
]) {
|
|
80521
|
-
edit.setIfChanged(
|
|
80522
|
-
field,
|
|
80523
|
-
stripNestedCollectionValueNulls(edit.value(field))
|
|
80524
|
-
);
|
|
80525
|
-
}
|
|
80526
|
-
const defaultValue = edit.value("defaultValue");
|
|
80527
|
-
if (isRecord4(defaultValue) && Object.hasOwn(defaultValue, "init")) {
|
|
80528
|
-
const init = stripNestedCollectionValueNulls(defaultValue.init);
|
|
80529
|
-
if (init !== defaultValue.init) {
|
|
80530
|
-
edit.set("defaultValue", { ...defaultValue, init });
|
|
80531
|
-
}
|
|
80532
|
-
}
|
|
80533
|
-
const overrideDefaults = /* @__PURE__ */ new Set([
|
|
80534
|
-
"requirement",
|
|
80535
|
-
"modifier",
|
|
80536
|
-
"format",
|
|
80537
|
-
"searchBy",
|
|
80538
|
-
"selection",
|
|
80539
|
-
"dispatch",
|
|
80540
|
-
"bodyMode",
|
|
80541
|
-
"payload",
|
|
80542
|
-
"storage",
|
|
80543
|
-
"keyKind",
|
|
80544
|
-
"listKind"
|
|
80545
|
-
]);
|
|
80546
|
-
for (const field of [
|
|
80547
|
-
"requirement",
|
|
80548
|
-
"mutability",
|
|
80549
|
-
"modifier",
|
|
80550
|
-
"access",
|
|
80551
|
-
"format",
|
|
80552
|
-
"searchBy",
|
|
80553
|
-
"selection",
|
|
80554
|
-
"dispatch",
|
|
80555
|
-
"bodyMode",
|
|
80556
|
-
"payload",
|
|
80557
|
-
"storage",
|
|
80558
|
-
"keyKind",
|
|
80559
|
-
"listKind"
|
|
80560
|
-
]) {
|
|
80561
|
-
if (edit.value(field) === null) {
|
|
80562
|
-
edit.delete(field);
|
|
80563
|
-
continue;
|
|
80564
|
-
}
|
|
80565
|
-
if (edit.value(field) === 0 && (!override || !overrideDefaults.has(field))) {
|
|
80566
|
-
edit.delete(field);
|
|
80567
|
-
}
|
|
80568
|
-
}
|
|
80569
|
-
for (const field of [
|
|
80570
|
-
"docsText",
|
|
80571
|
-
"extendsMemberId",
|
|
80572
|
-
"entryMemberId",
|
|
80573
|
-
"classId",
|
|
80574
|
-
"genericParamId",
|
|
80575
|
-
"enumId",
|
|
80576
|
-
"collectionMemberId",
|
|
80577
|
-
"returnTypeInfo",
|
|
80578
|
-
"argumentTypes",
|
|
80579
|
-
"getter",
|
|
80580
|
-
"setter",
|
|
80581
|
-
"action",
|
|
80582
|
-
"valueId"
|
|
80583
|
-
]) {
|
|
80584
|
-
if (edit.value(field) === null) edit.delete(field);
|
|
80585
|
-
}
|
|
80586
|
-
return edit.result();
|
|
80587
|
-
}
|
|
80588
|
-
function migrateClassRecordShape(data) {
|
|
80589
|
-
if (!isRecord4(data)) return data;
|
|
80590
|
-
const edit = createRecordEditor(data);
|
|
80591
|
-
edit.delete("constructorProjections");
|
|
80592
|
-
assertOptionalLegacyBoolean(edit, "isAbstract");
|
|
80593
|
-
assertOptionalLegacyBoolean(edit, "isSealed");
|
|
80594
|
-
const isAbstract = edit.value("isAbstract") === true;
|
|
80595
|
-
const isSealed = edit.value("isSealed") === true;
|
|
80596
|
-
if (Object.hasOwn(data, "isAbstract") || Object.hasOwn(data, "isSealed")) {
|
|
80597
|
-
assertTargetAbsent(data, "modifier", "isAbstract/isSealed");
|
|
80598
|
-
edit.delete("isAbstract");
|
|
80599
|
-
edit.delete("isSealed");
|
|
80600
|
-
if (isAbstract) edit.set("modifier", 1);
|
|
80601
|
-
else if (isSealed) edit.set("modifier", 2);
|
|
80602
|
-
}
|
|
80603
|
-
migrateBooleanAxis(edit, "hiddenInMemberSelector", "uiVisibility", 1, false);
|
|
80604
|
-
migrateStringOrdinal(edit, "allowedStorage", "allowedStorage", {
|
|
80605
|
-
immutable: 1,
|
|
80606
|
-
save: 2,
|
|
80607
|
-
session: 3
|
|
80608
|
-
});
|
|
80609
|
-
const genericParams = edit.value("genericParams");
|
|
80610
|
-
if (genericParams === null) {
|
|
80611
|
-
edit.delete("genericParams");
|
|
80612
|
-
} else if (Array.isArray(genericParams)) {
|
|
80613
|
-
edit.setIfChanged(
|
|
80614
|
-
"genericParams",
|
|
80615
|
-
mapReferencePreserving(genericParams, migrateGenericParam)
|
|
80616
|
-
);
|
|
80617
|
-
}
|
|
80618
|
-
const bindings = migrateGenericBindings(edit.value("extendsGenericBindings"));
|
|
80619
|
-
edit.setIfChanged("extendsGenericBindings", bindings);
|
|
80620
|
-
for (const field of [
|
|
80621
|
-
"docsText",
|
|
80622
|
-
"schemaKeyOrder",
|
|
80623
|
-
"extendsClassId",
|
|
80624
|
-
"implementsInterfaceIds",
|
|
80625
|
-
"system",
|
|
80626
|
-
"allowedStorage",
|
|
80627
|
-
"allowedStorageKeys",
|
|
80628
|
-
"extendsGenericBindings",
|
|
80629
|
-
"constructorIds",
|
|
80630
|
-
"requiredConstructorId",
|
|
80631
|
-
"targetMemberId"
|
|
80632
|
-
]) {
|
|
80633
|
-
if (edit.value(field) === null) edit.delete(field);
|
|
80634
|
-
}
|
|
80635
|
-
if (edit.value("modifier") === 0 || edit.value("modifier") === null) {
|
|
80636
|
-
edit.delete("modifier");
|
|
80637
|
-
}
|
|
80638
|
-
if (edit.value("uiVisibility") === 0 || edit.value("uiVisibility") === null) {
|
|
80639
|
-
edit.delete("uiVisibility");
|
|
80640
|
-
}
|
|
80641
|
-
return edit.result();
|
|
80642
|
-
}
|
|
80643
|
-
function migrateInterfaceRecordShape(data) {
|
|
80644
|
-
if (!isRecord4(data)) return data;
|
|
80645
|
-
const edit = createRecordEditor(data);
|
|
80646
|
-
const members = edit.value("members");
|
|
80647
|
-
if (isRecord4(members)) {
|
|
80648
|
-
const migrated = mapRecordReferencePreserving(members, (member) => {
|
|
80649
|
-
if (!isRecord4(member)) return member;
|
|
80650
|
-
const memberEdit = createRecordEditor(member);
|
|
80651
|
-
migrateStringOrdinal(memberEdit, "kind", "kind", {
|
|
80652
|
-
property: 0,
|
|
80653
|
-
function: 1
|
|
80654
|
-
});
|
|
80655
|
-
if (memberEdit.value("kind") === null) memberEdit.delete("kind");
|
|
80656
|
-
migrateStringOrdinal(memberEdit, "accessModifierKind", "access", {
|
|
80657
|
-
public: 0,
|
|
80658
|
-
protected: 1,
|
|
80659
|
-
private: 2
|
|
80660
|
-
});
|
|
80661
|
-
migrateBooleanAxis(memberEdit, "settable", "accessors", 1, false);
|
|
80662
|
-
migrateBooleanAxis(memberEdit, "deferred", "dispatch", 1, false);
|
|
80663
|
-
for (const field of [
|
|
80664
|
-
"typeInfo",
|
|
80665
|
-
"returnTypeInfo",
|
|
80666
|
-
"argumentTypes"
|
|
80667
|
-
]) {
|
|
80668
|
-
memberEdit.setIfChanged(
|
|
80669
|
-
field,
|
|
80670
|
-
stripNestedCollectionValueNulls(memberEdit.value(field))
|
|
80671
|
-
);
|
|
80672
|
-
}
|
|
80673
|
-
for (const field of ["access", "accessors", "dispatch"]) {
|
|
80674
|
-
if (memberEdit.value(field) === 0 || memberEdit.value(field) === null) {
|
|
80675
|
-
memberEdit.delete(field);
|
|
80676
|
-
}
|
|
80677
|
-
}
|
|
80678
|
-
for (const field of [
|
|
80679
|
-
"docsText",
|
|
80680
|
-
"typeInfo",
|
|
80681
|
-
"returnTypeInfo",
|
|
80682
|
-
"argumentTypes"
|
|
80683
|
-
]) {
|
|
80684
|
-
if (memberEdit.value(field) === null) memberEdit.delete(field);
|
|
80685
|
-
}
|
|
80686
|
-
return memberEdit.result();
|
|
80687
|
-
});
|
|
80688
|
-
edit.setIfChanged("members", migrated);
|
|
80689
|
-
}
|
|
80690
|
-
for (const field of [
|
|
80691
|
-
"docsText",
|
|
80692
|
-
"memberKeyOrder",
|
|
80693
|
-
"extendsInterfaceIds",
|
|
80694
|
-
"system"
|
|
80695
|
-
]) {
|
|
80696
|
-
if (edit.value(field) === null) edit.delete(field);
|
|
80697
|
-
}
|
|
80698
|
-
return edit.result();
|
|
80699
|
-
}
|
|
80700
|
-
function migrateVariantFolderRecordShape(data) {
|
|
80701
|
-
if (!isRecord4(data) || data.binding !== null) return data;
|
|
80702
|
-
const next = { ...data };
|
|
80703
|
-
delete next.binding;
|
|
80704
|
-
return next;
|
|
80705
|
-
}
|
|
80706
80435
|
function migrateProjectRecordData(args) {
|
|
80707
80436
|
const currentVersion = CURRENT_PROJECT_RECORD_DATA_SCHEMA_VERSION[args.recordKind];
|
|
80708
80437
|
if (args.dataSchemaVersion > currentVersion) {
|
|
@@ -80722,257 +80451,7 @@ function migrateProjectRecordData(args) {
|
|
|
80722
80451
|
}
|
|
80723
80452
|
return migratedData;
|
|
80724
80453
|
}
|
|
80725
|
-
|
|
80726
|
-
if (!isRecord4(data)) return data;
|
|
80727
|
-
const nextData = { ...data };
|
|
80728
|
-
if ("rootLocale" in nextData) {
|
|
80729
|
-
if ("mainLocale" in nextData) {
|
|
80730
|
-
throw new Error(
|
|
80731
|
-
"Cannot migrate localization config data because both rootLocale and mainLocale are present."
|
|
80732
|
-
);
|
|
80733
|
-
}
|
|
80734
|
-
nextData.mainLocale = nextData.rootLocale;
|
|
80735
|
-
delete nextData.rootLocale;
|
|
80736
|
-
}
|
|
80737
|
-
if ("rootLocaleDefaultStatusId" in nextData) {
|
|
80738
|
-
if ("mainLocaleDefaultStatusId" in nextData) {
|
|
80739
|
-
throw new Error(
|
|
80740
|
-
"Cannot migrate localization config data because both rootLocaleDefaultStatusId and mainLocaleDefaultStatusId are present."
|
|
80741
|
-
);
|
|
80742
|
-
}
|
|
80743
|
-
nextData.mainLocaleDefaultStatusId = nextData.rootLocaleDefaultStatusId;
|
|
80744
|
-
delete nextData.rootLocaleDefaultStatusId;
|
|
80745
|
-
}
|
|
80746
|
-
return nextData;
|
|
80747
|
-
}
|
|
80748
|
-
function createRecordEditor(source) {
|
|
80749
|
-
let current = source;
|
|
80750
|
-
const writable = () => {
|
|
80751
|
-
if (current === source) current = { ...source };
|
|
80752
|
-
return current;
|
|
80753
|
-
};
|
|
80754
|
-
return {
|
|
80755
|
-
has: (key) => Object.hasOwn(current, key),
|
|
80756
|
-
value: (key) => current[key],
|
|
80757
|
-
set(key, value) {
|
|
80758
|
-
if (current[key] === value && Object.hasOwn(current, key)) return;
|
|
80759
|
-
writable()[key] = value;
|
|
80760
|
-
},
|
|
80761
|
-
setIfChanged(key, value) {
|
|
80762
|
-
if (current[key] === value) return;
|
|
80763
|
-
if (value === void 0 && !Object.hasOwn(current, key)) return;
|
|
80764
|
-
writable()[key] = value;
|
|
80765
|
-
},
|
|
80766
|
-
delete(key) {
|
|
80767
|
-
if (!Object.hasOwn(current, key)) return;
|
|
80768
|
-
delete writable()[key];
|
|
80769
|
-
},
|
|
80770
|
-
result: () => current
|
|
80771
|
-
};
|
|
80772
|
-
}
|
|
80773
|
-
function assertTargetAbsent(data, target, source) {
|
|
80774
|
-
if (!Object.hasOwn(data, target)) return;
|
|
80775
|
-
throw new Error(
|
|
80776
|
-
`Cannot migrate ${source} because the replacement field "${target}" is already present.`
|
|
80777
|
-
);
|
|
80778
|
-
}
|
|
80779
|
-
function migrateBooleanAxis(edit, source, target, trueOrdinal, preserveFalse, options) {
|
|
80780
|
-
if (!edit.has(source)) return;
|
|
80781
|
-
const value = edit.value(source);
|
|
80782
|
-
if (value === null) {
|
|
80783
|
-
if (source !== target) edit.delete(source);
|
|
80784
|
-
else edit.delete(target);
|
|
80785
|
-
return;
|
|
80786
|
-
}
|
|
80787
|
-
if (typeof value !== "boolean") {
|
|
80788
|
-
throw new Error(
|
|
80789
|
-
`Cannot migrate "${source}" because its legacy value is not boolean.`
|
|
80790
|
-
);
|
|
80791
|
-
}
|
|
80792
|
-
if (source !== target && value !== void 0 && edit.has(target)) {
|
|
80793
|
-
throw new Error(
|
|
80794
|
-
`Cannot migrate "${source}" because "${target}" is already present.`
|
|
80795
|
-
);
|
|
80796
|
-
}
|
|
80797
|
-
if (value === true) {
|
|
80798
|
-
edit.set(target, trueOrdinal);
|
|
80799
|
-
} else if (value === false) {
|
|
80800
|
-
const falseOrdinal = options?.falseOrdinal ?? 0;
|
|
80801
|
-
if (preserveFalse || falseOrdinal !== 0) edit.set(target, falseOrdinal);
|
|
80802
|
-
else edit.delete(target);
|
|
80803
|
-
}
|
|
80804
|
-
if (source !== target) edit.delete(source);
|
|
80805
|
-
}
|
|
80806
|
-
function migrateMemberModifier(edit, override) {
|
|
80807
|
-
const legacyModifierFields = ["isStatic", "isAbstract", "isVirtual"];
|
|
80808
|
-
for (const field of legacyModifierFields) {
|
|
80809
|
-
assertOptionalLegacyBoolean(edit, field);
|
|
80810
|
-
}
|
|
80811
|
-
const hadLegacyModifierField = legacyModifierFields.some(
|
|
80812
|
-
(field) => edit.has(field)
|
|
80813
|
-
);
|
|
80814
|
-
const legacyOverride = override && edit.has("accessModifierKind");
|
|
80815
|
-
if (!hadLegacyModifierField && !legacyOverride) return;
|
|
80816
|
-
if (edit.has("modifier")) {
|
|
80817
|
-
throw new Error(
|
|
80818
|
-
'Cannot migrate member modality because "modifier" is already present.'
|
|
80819
|
-
);
|
|
80820
|
-
}
|
|
80821
|
-
const modifier = override ? edit.value("isAbstract") === true ? 2 : edit.value("isVirtual") === false ? 1 : 0 : edit.value("isStatic") === true ? 3 : edit.value("isAbstract") === true ? 2 : edit.value("isVirtual") === false ? 1 : void 0;
|
|
80822
|
-
edit.delete("isStatic");
|
|
80823
|
-
edit.delete("isAbstract");
|
|
80824
|
-
edit.delete("isVirtual");
|
|
80825
|
-
if (modifier !== void 0) edit.set("modifier", modifier);
|
|
80826
|
-
}
|
|
80827
|
-
function assertOptionalLegacyBoolean(edit, field) {
|
|
80828
|
-
if (!edit.has(field)) return;
|
|
80829
|
-
const value = edit.value(field);
|
|
80830
|
-
if (typeof value === "boolean" || value === null) return;
|
|
80831
|
-
throw new Error(
|
|
80832
|
-
`Cannot migrate "${field}" because its legacy value is not boolean.`
|
|
80833
|
-
);
|
|
80834
|
-
}
|
|
80835
|
-
function migrateStringOrdinal(edit, source, target, ordinals, omitDefault = true) {
|
|
80836
|
-
const value = edit.value(source);
|
|
80837
|
-
if (value === null || value === void 0 && edit.has(source)) {
|
|
80838
|
-
if (source !== target) edit.delete(source);
|
|
80839
|
-
else edit.delete(target);
|
|
80840
|
-
return;
|
|
80841
|
-
}
|
|
80842
|
-
if (typeof value !== "string") {
|
|
80843
|
-
if (!edit.has(source)) return;
|
|
80844
|
-
if (source === target && typeof value === "number" && Object.values(ordinals).includes(value)) {
|
|
80845
|
-
if (value === 0 && omitDefault) edit.delete(target);
|
|
80846
|
-
return;
|
|
80847
|
-
}
|
|
80848
|
-
throw new Error(
|
|
80849
|
-
`Cannot migrate "${source}" because its legacy value is not a recognized string or numeric ordinal.`
|
|
80850
|
-
);
|
|
80851
|
-
}
|
|
80852
|
-
const ordinal = ordinals[value];
|
|
80853
|
-
if (ordinal === void 0) {
|
|
80854
|
-
throw new Error(
|
|
80855
|
-
`Cannot migrate "${source}" value ${JSON.stringify(value)} to a numeric ordinal.`
|
|
80856
|
-
);
|
|
80857
|
-
}
|
|
80858
|
-
if (source !== target && edit.has(target)) {
|
|
80859
|
-
throw new Error(
|
|
80860
|
-
`Cannot migrate "${source}" because "${target}" is already present.`
|
|
80861
|
-
);
|
|
80862
|
-
}
|
|
80863
|
-
if (source !== target) edit.delete(source);
|
|
80864
|
-
if (ordinal === 0 && omitDefault) edit.delete(target);
|
|
80865
|
-
else edit.set(target, ordinal);
|
|
80866
|
-
}
|
|
80867
|
-
function migrateListIndex(value) {
|
|
80868
|
-
if (!isRecord4(value)) return value;
|
|
80869
|
-
const edit = createRecordEditor(value);
|
|
80870
|
-
migrateBooleanAxis(edit, "unique", "kind", 1, false);
|
|
80871
|
-
if (edit.value("kind") === 0 || edit.value("kind") === null) {
|
|
80872
|
-
edit.delete("kind");
|
|
80873
|
-
}
|
|
80874
|
-
return edit.result();
|
|
80875
|
-
}
|
|
80876
|
-
function migrateListColumn(value) {
|
|
80877
|
-
if (!isRecord4(value)) return value;
|
|
80878
|
-
const edit = createRecordEditor(value);
|
|
80879
|
-
migrateBooleanAxis(edit, "hidden", "visibility", 1, false);
|
|
80880
|
-
migrateBooleanAxis(edit, "frozen", "pin", 1, false);
|
|
80881
|
-
migrateBooleanAxis(edit, "wrapContent", "overflow", 1, false);
|
|
80882
|
-
if (edit.value("width") === null) edit.delete("width");
|
|
80883
|
-
for (const field of ["visibility", "pin", "overflow"]) {
|
|
80884
|
-
if (edit.value(field) === 0 || edit.value(field) === null) {
|
|
80885
|
-
edit.delete(field);
|
|
80886
|
-
}
|
|
80887
|
-
}
|
|
80888
|
-
return edit.result();
|
|
80889
|
-
}
|
|
80890
|
-
function migrateGenericParam(value) {
|
|
80891
|
-
if (!isRecord4(value)) return value;
|
|
80892
|
-
const edit = createRecordEditor(value);
|
|
80893
|
-
const constraint = edit.value("constraint");
|
|
80894
|
-
if (constraint === null) {
|
|
80895
|
-
edit.delete("constraint");
|
|
80896
|
-
} else {
|
|
80897
|
-
edit.setIfChanged("constraint", migrateGenericConstraint(constraint));
|
|
80898
|
-
}
|
|
80899
|
-
return edit.result();
|
|
80900
|
-
}
|
|
80901
|
-
function migrateGenericConstraint(value) {
|
|
80902
|
-
if (!isRecord4(value)) return value;
|
|
80903
|
-
const edit = createRecordEditor(value);
|
|
80904
|
-
migrateStringOrdinal(edit, "kind", "kind", { class: 0, enum: 1 });
|
|
80905
|
-
if (edit.value("kind") === 0 || edit.value("kind") === null) {
|
|
80906
|
-
edit.delete("kind");
|
|
80907
|
-
}
|
|
80908
|
-
const bindings = migrateGenericBindings(edit.value("classArguments"));
|
|
80909
|
-
edit.setIfChanged("classArguments", bindings);
|
|
80910
|
-
if (bindings === null) edit.delete("classArguments");
|
|
80911
|
-
return edit.result();
|
|
80912
|
-
}
|
|
80913
|
-
function migrateGenericBindings(value) {
|
|
80914
|
-
if (value === null) return null;
|
|
80915
|
-
if (!isRecord4(value)) return value;
|
|
80916
|
-
return mapRecordReferencePreserving(value, (binding) => {
|
|
80917
|
-
if (!isRecord4(binding)) return binding;
|
|
80918
|
-
const edit = createRecordEditor(binding);
|
|
80919
|
-
migrateStringOrdinal(edit, "kind", "kind", { generic: 0, member: 1 });
|
|
80920
|
-
if (edit.value("kind") === 0 || edit.value("kind") === null) {
|
|
80921
|
-
edit.delete("kind");
|
|
80922
|
-
}
|
|
80923
|
-
return edit.result();
|
|
80924
|
-
});
|
|
80925
|
-
}
|
|
80926
|
-
function stripNestedCollectionValueNulls(value) {
|
|
80927
|
-
if (Array.isArray(value)) {
|
|
80928
|
-
return mapReferencePreserving(value, stripNestedCollectionValueNulls);
|
|
80929
|
-
}
|
|
80930
|
-
if (!isRecord4(value)) return value;
|
|
80931
|
-
let next = value;
|
|
80932
|
-
for (const [key, child] of Object.entries(value)) {
|
|
80933
|
-
if (key === "collectionValueId" && child === null) {
|
|
80934
|
-
if (next === value) next = { ...value };
|
|
80935
|
-
delete next[key];
|
|
80936
|
-
continue;
|
|
80937
|
-
}
|
|
80938
|
-
const migrated = stripNestedCollectionValueNulls(child);
|
|
80939
|
-
if (migrated === child) continue;
|
|
80940
|
-
if (next === value) next = { ...value };
|
|
80941
|
-
next[key] = migrated;
|
|
80942
|
-
}
|
|
80943
|
-
return next;
|
|
80944
|
-
}
|
|
80945
|
-
function mapReferencePreserving(values, map) {
|
|
80946
|
-
let next;
|
|
80947
|
-
for (let index = 0; index < values.length; index += 1) {
|
|
80948
|
-
const value = values[index];
|
|
80949
|
-
const migrated = map(value);
|
|
80950
|
-
if (next !== void 0) {
|
|
80951
|
-
next.push(migrated);
|
|
80952
|
-
} else if (migrated !== value) {
|
|
80953
|
-
next = values.slice(0, index);
|
|
80954
|
-
next.push(migrated);
|
|
80955
|
-
}
|
|
80956
|
-
}
|
|
80957
|
-
return next ?? values;
|
|
80958
|
-
}
|
|
80959
|
-
function mapRecordReferencePreserving(values, map) {
|
|
80960
|
-
let next = values;
|
|
80961
|
-
for (const [key, value] of Object.entries(values)) {
|
|
80962
|
-
const migrated = map(value);
|
|
80963
|
-
if (migrated === value) continue;
|
|
80964
|
-
if (next === values) next = { ...values };
|
|
80965
|
-
next[key] = migrated;
|
|
80966
|
-
}
|
|
80967
|
-
return next;
|
|
80968
|
-
}
|
|
80969
|
-
function isRecord4(value) {
|
|
80970
|
-
if (typeof value !== "object") return false;
|
|
80971
|
-
if (value === null) return false;
|
|
80972
|
-
if (Array.isArray(value)) return false;
|
|
80973
|
-
return true;
|
|
80974
|
-
}
|
|
80975
|
-
var CURRENT_PROJECT_RECORD_DATA_SCHEMA_VERSION, PROJECT_RECORD_DATA_MIGRATIONS, MEMBER_OVERRIDE_EXPLICIT_CLEAR_FIELDS;
|
|
80454
|
+
var CURRENT_PROJECT_RECORD_DATA_SCHEMA_VERSION, PROJECT_RECORD_DATA_MIGRATIONS;
|
|
80976
80455
|
var init_project_record_migrations = __esm({
|
|
80977
80456
|
"../src/database/project-record-migrations.ts"() {
|
|
80978
80457
|
"use strict";
|
|
@@ -81002,25 +80481,15 @@ var init_project_record_migrations = __esm({
|
|
|
81002
80481
|
};
|
|
81003
80482
|
PROJECT_RECORD_DATA_MIGRATIONS = {
|
|
81004
80483
|
[ProjectRecordKind.Project]: {},
|
|
81005
|
-
[ProjectRecordKind.Member]: {
|
|
81006
|
-
4: migrateMemberAccessModifier,
|
|
81007
|
-
5: migrateMemberRecordShape
|
|
81008
|
-
},
|
|
80484
|
+
[ProjectRecordKind.Member]: {},
|
|
81009
80485
|
[ProjectRecordKind.Value]: {},
|
|
81010
|
-
[ProjectRecordKind.Class]: {
|
|
81011
|
-
1: migrateClassRecordShape
|
|
81012
|
-
},
|
|
80486
|
+
[ProjectRecordKind.Class]: {},
|
|
81013
80487
|
[ProjectRecordKind.Constructor]: {},
|
|
81014
80488
|
[ProjectRecordKind.Variant]: {},
|
|
81015
|
-
[ProjectRecordKind.VariantFolder]: {
|
|
81016
|
-
1: migrateVariantFolderRecordShape
|
|
81017
|
-
},
|
|
80489
|
+
[ProjectRecordKind.VariantFolder]: {},
|
|
81018
80490
|
[ProjectRecordKind.InternalRecordRelation]: {},
|
|
81019
80491
|
[ProjectRecordKind.Enum]: {},
|
|
81020
|
-
[ProjectRecordKind.Interface]: {
|
|
81021
|
-
2: migrateInterfaceMemberAccessModifiers,
|
|
81022
|
-
3: migrateInterfaceRecordShape
|
|
81023
|
-
},
|
|
80492
|
+
[ProjectRecordKind.Interface]: {},
|
|
81024
80493
|
[ProjectRecordKind.Dialogue]: {},
|
|
81025
80494
|
[ProjectRecordKind.DialogueNode]: {},
|
|
81026
80495
|
[ProjectRecordKind.DialogueGroup]: {},
|
|
@@ -81028,33 +80497,11 @@ var init_project_record_migrations = __esm({
|
|
|
81028
80497
|
[ProjectRecordKind.ProjectFile]: {},
|
|
81029
80498
|
[ProjectRecordKind.UnityTextureTemplate]: {},
|
|
81030
80499
|
[ProjectRecordKind.UnityAudioClipTemplate]: {},
|
|
81031
|
-
[ProjectRecordKind.LocalizationConfig]: {
|
|
81032
|
-
1: migrateLocalizationConfigMainLocale
|
|
81033
|
-
},
|
|
80500
|
+
[ProjectRecordKind.LocalizationConfig]: {},
|
|
81034
80501
|
[ProjectRecordKind.LocalizationStatus]: {},
|
|
81035
80502
|
[ProjectRecordKind.LocalizedText]: {},
|
|
81036
80503
|
[ProjectRecordKind.Migration]: {}
|
|
81037
80504
|
};
|
|
81038
|
-
MEMBER_OVERRIDE_EXPLICIT_CLEAR_FIELDS = [
|
|
81039
|
-
"defaultValue",
|
|
81040
|
-
"storageKey",
|
|
81041
|
-
"minValue",
|
|
81042
|
-
"maxValue",
|
|
81043
|
-
"decimalPoints",
|
|
81044
|
-
"indexes",
|
|
81045
|
-
"columnSettings",
|
|
81046
|
-
"schemaKeyOrder",
|
|
81047
|
-
"classArguments",
|
|
81048
|
-
"collectionValueId",
|
|
81049
|
-
"declaredTypeInfo",
|
|
81050
|
-
"targetTypeInfo",
|
|
81051
|
-
"valueTypeInfo",
|
|
81052
|
-
"dialogueGroupId",
|
|
81053
|
-
"code",
|
|
81054
|
-
"setterCode",
|
|
81055
|
-
"templateId",
|
|
81056
|
-
"uiAction"
|
|
81057
|
-
];
|
|
81058
80505
|
}
|
|
81059
80506
|
});
|
|
81060
80507
|
|
|
@@ -84016,8 +83463,7 @@ function lowerActionLogic(context, prior, fn, fallbackCode, inline, useId, uiRes
|
|
|
84016
83463
|
}
|
|
84017
83464
|
function lowerProse(context, rawProse, baseTextId, baseVariables, baseLinks, bindingTypes, primaryValueId2, owner, textLink, source) {
|
|
84018
83465
|
const textId = baseTextId ?? pendingId("localized-text", source.source.uri, owner, 0, "text");
|
|
84019
|
-
const
|
|
84020
|
-
const baseText = legacyInline ? {} : baseData2(context.state, "localized-text", textId);
|
|
83466
|
+
const baseText = baseData2(context.state, "localized-text", textId);
|
|
84021
83467
|
const variablesByPath = /* @__PURE__ */ new Map();
|
|
84022
83468
|
const links = [
|
|
84023
83469
|
// NeoFlow node scope shadows dialogue scope, including when both bindings
|
|
@@ -84139,9 +83585,9 @@ function lowerProse(context, rawProse, baseTextId, baseVariables, baseLinks, bin
|
|
|
84139
83585
|
return `{{neo-var:${variableId}}}`;
|
|
84140
83586
|
}).join("");
|
|
84141
83587
|
return {
|
|
84142
|
-
textId
|
|
83588
|
+
textId,
|
|
84143
83589
|
variables: Object.keys(variables).length === 0 && (baseVariables === null || baseVariables === void 0) ? baseVariables : variables,
|
|
84144
|
-
textRecord:
|
|
83590
|
+
textRecord: reconstructed2(
|
|
84145
83591
|
"localized-text",
|
|
84146
83592
|
textId,
|
|
84147
83593
|
{
|
|
@@ -84343,7 +83789,6 @@ function lowerDialogueDescription(context, expression, records2) {
|
|
|
84343
83789
|
const value = literalString(expression);
|
|
84344
83790
|
if (value === null) return null;
|
|
84345
83791
|
const existingId = nullableString3(context.baseDialogue.description);
|
|
84346
|
-
if (isLegacyInlineText2(context.state, existingId)) return value;
|
|
84347
83792
|
const id2 = existingId ?? pendingId(
|
|
84348
83793
|
"localized-text",
|
|
84349
83794
|
context.dialogue.source.uri,
|
|
@@ -84372,9 +83817,6 @@ function lowerDialogueDescription(context, expression, records2) {
|
|
|
84372
83817
|
);
|
|
84373
83818
|
return id2;
|
|
84374
83819
|
}
|
|
84375
|
-
function isLegacyInlineText2(state, value) {
|
|
84376
|
-
return value !== null && state[`localized-text:${value}`] === void 0 && /[\s.,!?;:'"\u2026]/u.test(value);
|
|
84377
|
-
}
|
|
84378
83820
|
function lowerBindings(context, bindings, baseLinks) {
|
|
84379
83821
|
const existing = Array.isArray(baseLinks) ? baseLinks.filter(isObjectRecord2) : [];
|
|
84380
83822
|
const explicit = bindings.map((binding) => {
|
|
@@ -85920,7 +85362,7 @@ function assertAnimationClipDocumentValid(document) {
|
|
|
85920
85362
|
context.validateClipMember(member);
|
|
85921
85363
|
}
|
|
85922
85364
|
}
|
|
85923
|
-
function
|
|
85365
|
+
function isRecord4(value) {
|
|
85924
85366
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
85925
85367
|
}
|
|
85926
85368
|
var WORLD_ANIMATION_STRUCTURAL_MEMBER_ROOT_IDS, AnimationValidationContext;
|
|
@@ -86116,7 +85558,7 @@ var init_animation_clips = __esm({
|
|
|
86116
85558
|
const bindingClassName = bindingClassId === null ? "(missing)" : this.classById.get(bindingClassId)?.name ?? bindingClassId;
|
|
86117
85559
|
const childClassName = this.classById.get(childClassId)?.name ?? childClassId;
|
|
86118
85560
|
throw new Error(
|
|
86119
|
-
`Animation clip "${args.clipName}" frame ${args.frameIndex} child override binding is "${bindingClassName}", but its
|
|
85561
|
+
`Animation clip "${args.clipName}" frame ${args.frameIndex} child override binding is "${bindingClassName}", but its Selector target is "${childClassName}".`
|
|
86120
85562
|
);
|
|
86121
85563
|
}
|
|
86122
85564
|
const overrides = this.optionalFieldNode(
|
|
@@ -86187,10 +85629,9 @@ var init_animation_clips = __esm({
|
|
|
86187
85629
|
/**
|
|
86188
85630
|
* `NeoAnimationClip.Tracks` holds `NeoAnimationTrackBase` rows since P48
|
|
86189
85631
|
* §2.1, so a row's kind is a property of the row rather than of the list.
|
|
86190
|
-
* Everything the base declares — `
|
|
86191
|
-
* crop window — is validated once here against the
|
|
86192
|
-
*
|
|
86193
|
-
* per-kind passes below see an already-checked child.
|
|
85632
|
+
* Everything the base declares — `Selector`, `Refresh`, `StartFrame`,
|
|
85633
|
+
* `Direction`, and the crop window — is validated once here against the
|
|
85634
|
+
* base member ids; the per-kind passes below see an already-checked target.
|
|
86194
85635
|
*/
|
|
86195
85636
|
validateTracks(args) {
|
|
86196
85637
|
for (const track of this.requireListField(
|
|
@@ -86419,10 +85860,9 @@ var init_animation_clips = __esm({
|
|
|
86419
85860
|
*
|
|
86420
85861
|
* The write target is schema metadata — `@settings(target: Class.Member)` on
|
|
86421
85862
|
* a concrete track class — so it is resolved from the row's class chain and
|
|
86422
|
-
* checked against the class's *bound* `TChild`, not against
|
|
86423
|
-
* this particular row
|
|
86424
|
-
*
|
|
86425
|
-
* against a class the row cannot deliver.
|
|
85863
|
+
* checked against the class's *bound* `TChild`, not against whichever child
|
|
85864
|
+
* this particular row's `Selector` returns. The runtime validates that the
|
|
85865
|
+
* selected instance has the same bound class before applying the segment.
|
|
86426
85866
|
*
|
|
86427
85867
|
* What stays in the language (phase 2) is everything about the `Segment`
|
|
86428
85868
|
* implementation itself — that every concrete subclass has one, and that a
|
|
@@ -86606,7 +86046,7 @@ var init_animation_clips = __esm({
|
|
|
86606
86046
|
}
|
|
86607
86047
|
args.visited.add(args.overrideNode.id);
|
|
86608
86048
|
try {
|
|
86609
|
-
if (args.overrideNode.classId !== args.targetClassId || !
|
|
86049
|
+
if (args.overrideNode.classId !== args.targetClassId || !isRecord4(args.overrideNode.value)) {
|
|
86610
86050
|
throw new Error(
|
|
86611
86051
|
`Animation clip "${args.clipName}" frame ${args.frameIndex} Partial value must preserve target class "${args.targetClassId}".`
|
|
86612
86052
|
);
|
|
@@ -86672,12 +86112,12 @@ var init_animation_clips = __esm({
|
|
|
86672
86112
|
member
|
|
86673
86113
|
);
|
|
86674
86114
|
const effectiveClassId = typeof definitionChild?.classId === "string" ? definitionChild.classId : member.classId;
|
|
86675
|
-
if (overrideChild.value === null || !
|
|
86115
|
+
if (overrideChild.value === null || !isRecord4(overrideChild.value) || overrideChild.classId !== effectiveClassId) {
|
|
86676
86116
|
throw new Error(
|
|
86677
86117
|
`Animation clip "${args.clipName}" frame ${args.frameIndex} Class member "${path.join(".")}" is a sparse path, not a replacement or null write.`
|
|
86678
86118
|
);
|
|
86679
86119
|
}
|
|
86680
|
-
if (definitionChild === null || !
|
|
86120
|
+
if (definitionChild === null || !isRecord4(definitionChild.value)) {
|
|
86681
86121
|
throw new Error(
|
|
86682
86122
|
`Animation clip "${args.clipName}" frame ${args.frameIndex} cannot descend into null definition member "${path.join(".")}".`
|
|
86683
86123
|
);
|
|
@@ -86771,7 +86211,7 @@ var init_animation_clips = __esm({
|
|
|
86771
86211
|
`${descent}; its value row "${resolution.node.id}" holds null, so a field override has no record to merge into.`
|
|
86772
86212
|
);
|
|
86773
86213
|
}
|
|
86774
|
-
if (!
|
|
86214
|
+
if (!isRecord4(resolution.node.value)) {
|
|
86775
86215
|
throw new Error(`${descent}; its value is not a ${kindLabel} record.`);
|
|
86776
86216
|
}
|
|
86777
86217
|
}
|
|
@@ -86856,7 +86296,7 @@ var init_animation_clips = __esm({
|
|
|
86856
86296
|
* depend on it — so callers that care check `node.value` themselves.
|
|
86857
86297
|
*/
|
|
86858
86298
|
resolveDefinitionChildResolution(definitionNode, schemaKey, member) {
|
|
86859
|
-
const mapped =
|
|
86299
|
+
const mapped = isRecord4(definitionNode?.value) ? definitionNode.value[schemaKey] : void 0;
|
|
86860
86300
|
if (typeof mapped === "string") {
|
|
86861
86301
|
return this.definitionChildRow(mapped);
|
|
86862
86302
|
}
|
|
@@ -86917,7 +86357,7 @@ var init_animation_clips = __esm({
|
|
|
86917
86357
|
optionalMemberRootNode(member) {
|
|
86918
86358
|
if (member.defaultValue !== void 0) {
|
|
86919
86359
|
const value = member.defaultValue.value;
|
|
86920
|
-
if (!
|
|
86360
|
+
if (!isRecord4(value)) return null;
|
|
86921
86361
|
return {
|
|
86922
86362
|
id: `member-default:${member.id}`,
|
|
86923
86363
|
projectId: member.projectId,
|
|
@@ -86934,7 +86374,7 @@ var init_animation_clips = __esm({
|
|
|
86934
86374
|
optionalFieldNode(parent, classId, memberId) {
|
|
86935
86375
|
const field = this.field(classId, memberId);
|
|
86936
86376
|
if (field === null) return null;
|
|
86937
|
-
const mapped =
|
|
86377
|
+
const mapped = isRecord4(parent.value) ? parent.value[field.schemaKey] : null;
|
|
86938
86378
|
if (typeof mapped === "string") return this.valueById.get(mapped) ?? null;
|
|
86939
86379
|
if (field.member.defaultValue !== void 0) {
|
|
86940
86380
|
const value = field.member.defaultValue.value;
|
|
@@ -86968,10 +86408,10 @@ var init_animation_clips = __esm({
|
|
|
86968
86408
|
}
|
|
86969
86409
|
/**
|
|
86970
86410
|
* The raw list payload behind a field: an explicit instance edge wins even
|
|
86971
|
-
* when it is dangling, then the member default, then the
|
|
86411
|
+
* when it is dangling, then the member default, then the retained value row.
|
|
86972
86412
|
*/
|
|
86973
86413
|
listFieldIds(parent, field) {
|
|
86974
|
-
const mapped =
|
|
86414
|
+
const mapped = isRecord4(parent.value) ? parent.value[field.schemaKey] : null;
|
|
86975
86415
|
if (typeof mapped === "string") {
|
|
86976
86416
|
return this.valueById.get(mapped)?.value;
|
|
86977
86417
|
}
|
|
@@ -87035,7 +86475,7 @@ var init_animation_clips = __esm({
|
|
|
87035
86475
|
}
|
|
87036
86476
|
scalarField(parent, classId, memberId) {
|
|
87037
86477
|
const field = this.requireField(classId, memberId, `Class "${classId}"`);
|
|
87038
|
-
const mapped =
|
|
86478
|
+
const mapped = isRecord4(parent.value) ? parent.value[field.schemaKey] : null;
|
|
87039
86479
|
if (typeof mapped === "string") {
|
|
87040
86480
|
return this.valueById.get(mapped)?.value;
|
|
87041
86481
|
}
|
|
@@ -89490,6 +88930,10 @@ function lookupCollectionEntryIds(args) {
|
|
|
89490
88930
|
return listEntryIdsForValue(args.collection, collectionRow, effectiveRows);
|
|
89491
88931
|
}
|
|
89492
88932
|
function validateWorldContentSidecars(args) {
|
|
88933
|
+
assertWorldLayerLinkValueBodiesCanonical({
|
|
88934
|
+
classes: args.classes,
|
|
88935
|
+
values: args.values
|
|
88936
|
+
});
|
|
89493
88937
|
const variants = args.variants;
|
|
89494
88938
|
const valuesById = new Map(args.values.map((value) => [value.id, value]));
|
|
89495
88939
|
const classesById2 = new Map(
|
|
@@ -89709,6 +89153,48 @@ function validateWorldContentSidecars(args) {
|
|
|
89709
89153
|
}
|
|
89710
89154
|
}
|
|
89711
89155
|
}
|
|
89156
|
+
function assertWorldLayerLinkValueBodiesCanonical(args) {
|
|
89157
|
+
const classesById2 = new Map(
|
|
89158
|
+
args.classes.map((schemaClass2) => [schemaClass2.id, schemaClass2])
|
|
89159
|
+
);
|
|
89160
|
+
for (const value of args.values) {
|
|
89161
|
+
const worldKind = worldKindForValue(value, args.classes);
|
|
89162
|
+
if (worldKind !== NeoWorldSystemClassKind.TileLayerLink && worldKind !== NeoWorldSystemClassKind.ObjectLayerLink) {
|
|
89163
|
+
continue;
|
|
89164
|
+
}
|
|
89165
|
+
const body = valueObjectRecord(value);
|
|
89166
|
+
if (body === null) continue;
|
|
89167
|
+
const classId = requiredValueClassId(value, "layer-link");
|
|
89168
|
+
assertWorldLayerLinkBodyCanonical({
|
|
89169
|
+
body,
|
|
89170
|
+
classesById: classesById2,
|
|
89171
|
+
classId,
|
|
89172
|
+
worldKind,
|
|
89173
|
+
label: `Layer link value "${value.id}"`
|
|
89174
|
+
});
|
|
89175
|
+
}
|
|
89176
|
+
}
|
|
89177
|
+
function assertWorldLayerLinkBodyCanonical(args) {
|
|
89178
|
+
const storedKeys = /* @__PURE__ */ new Set([
|
|
89179
|
+
"layerOverrideValueId",
|
|
89180
|
+
args.worldKind === NeoWorldSystemClassKind.TileLayerLink ? "Tiles" : "Objects"
|
|
89181
|
+
]);
|
|
89182
|
+
const visited = /* @__PURE__ */ new Set();
|
|
89183
|
+
let classId = args.classId;
|
|
89184
|
+
while (classId !== null && !visited.has(classId)) {
|
|
89185
|
+
visited.add(classId);
|
|
89186
|
+
const schemaClass2 = args.classesById.get(classId);
|
|
89187
|
+
if (schemaClass2 === void 0) break;
|
|
89188
|
+
for (const key of Object.keys(schemaClass2.schema)) storedKeys.add(key);
|
|
89189
|
+
classId = schemaClass2.extendsClassId ?? null;
|
|
89190
|
+
}
|
|
89191
|
+
for (const key of Object.keys(args.body)) {
|
|
89192
|
+
if (storedKeys.has(key)) continue;
|
|
89193
|
+
throw new Error(
|
|
89194
|
+
`${args.label} class "${args.classId}" has no stored member "${key}".`
|
|
89195
|
+
);
|
|
89196
|
+
}
|
|
89197
|
+
}
|
|
89712
89198
|
function validateWorldPlacementSidecars(args) {
|
|
89713
89199
|
const record3 = valueObjectRecord(args.placement);
|
|
89714
89200
|
if (record3 === null) {
|
|
@@ -90390,7 +89876,7 @@ function assertNoPersistedReadOnlySyntheticLookupId2(value, label) {
|
|
|
90390
89876
|
`${label} cannot persist runtime-only read-only synthetic value id "${syntheticId}".`
|
|
90391
89877
|
);
|
|
90392
89878
|
}
|
|
90393
|
-
function
|
|
89879
|
+
function isRecord5(value) {
|
|
90394
89880
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
90395
89881
|
}
|
|
90396
89882
|
function assertNoRetiredFields(value, retiredFields, label) {
|
|
@@ -90412,7 +89898,7 @@ function omitNullFields(value, fields) {
|
|
|
90412
89898
|
return normalized;
|
|
90413
89899
|
}
|
|
90414
89900
|
function assertOpaqueGenericBindingValid(value, label) {
|
|
90415
|
-
if (!
|
|
89901
|
+
if (!isRecord5(value)) throw new Error(`${label} is invalid.`);
|
|
90416
89902
|
assertOptionalOrdinal(value.kind, GENERIC_BINDING_KINDS, `${label} kind`);
|
|
90417
89903
|
if (value.kind == null || value.kind === 0 /* Generic */) {
|
|
90418
89904
|
if (typeof value.genericParamId !== "string" || value.genericParamId.length === 0 || value.memberId !== void 0) {
|
|
@@ -90426,7 +89912,7 @@ function assertOpaqueGenericBindingValid(value, label) {
|
|
|
90426
89912
|
}
|
|
90427
89913
|
function assertOpaqueGenericBindingsValid(value, label) {
|
|
90428
89914
|
if (value === void 0 || value === null) return;
|
|
90429
|
-
if (!
|
|
89915
|
+
if (!isRecord5(value)) throw new Error(`${label} is invalid.`);
|
|
90430
89916
|
for (const [key, binding] of Object.entries(value)) {
|
|
90431
89917
|
assertOpaqueGenericBindingValid(binding, `${label} "${key}"`);
|
|
90432
89918
|
}
|
|
@@ -90446,7 +89932,7 @@ function abstractReadOnlyContractAncestor(member, membersById2) {
|
|
|
90446
89932
|
return null;
|
|
90447
89933
|
}
|
|
90448
89934
|
function readMember(value) {
|
|
90449
|
-
if (!
|
|
89935
|
+
if (!isRecord5(value)) throw new Error("Member record is not an object.");
|
|
90450
89936
|
if (typeof value.id !== "string") throw new Error("Member id is invalid.");
|
|
90451
89937
|
if (typeof value.name !== "string") {
|
|
90452
89938
|
throw new Error(`Member "${value.id}" name is invalid.`);
|
|
@@ -90530,7 +90016,7 @@ function readMember(value) {
|
|
|
90530
90016
|
if (!Array.isArray(value.indexes))
|
|
90531
90017
|
throw new Error(`${label} indexes is invalid.`);
|
|
90532
90018
|
for (const index of value.indexes) {
|
|
90533
|
-
if (!
|
|
90019
|
+
if (!isRecord5(index)) {
|
|
90534
90020
|
throw new Error(`${label} index is not an object.`);
|
|
90535
90021
|
}
|
|
90536
90022
|
if (typeof index.schemaKey !== "string" || index.schemaKey.length === 0) {
|
|
@@ -90552,7 +90038,7 @@ function readMember(value) {
|
|
|
90552
90038
|
if (!Array.isArray(value.columnSettings))
|
|
90553
90039
|
throw new Error(`${label} columnSettings is invalid.`);
|
|
90554
90040
|
for (const column of value.columnSettings) {
|
|
90555
|
-
if (!
|
|
90041
|
+
if (!isRecord5(column)) {
|
|
90556
90042
|
throw new Error(`${label} column setting is not an object.`);
|
|
90557
90043
|
}
|
|
90558
90044
|
if (typeof column.memberKey !== "string" || column.memberKey.length === 0) {
|
|
@@ -90601,7 +90087,7 @@ function readMember(value) {
|
|
|
90601
90087
|
]);
|
|
90602
90088
|
}
|
|
90603
90089
|
function readClass(value) {
|
|
90604
|
-
if (!
|
|
90090
|
+
if (!isRecord5(value)) throw new Error("Class record is not an object.");
|
|
90605
90091
|
if (typeof value.id !== "string") throw new Error("Class id is invalid.");
|
|
90606
90092
|
if (hasRetiredConstructorProjectionsTombstone(value)) {
|
|
90607
90093
|
throw new Error(
|
|
@@ -90617,7 +90103,7 @@ function readClass(value) {
|
|
|
90617
90103
|
if (typeof value.name !== "string") {
|
|
90618
90104
|
throw new Error(`Class "${value.id}" name is invalid.`);
|
|
90619
90105
|
}
|
|
90620
|
-
if (!
|
|
90106
|
+
if (!isRecord5(value.schema)) {
|
|
90621
90107
|
throw new Error(`Class "${value.id}" schema is invalid.`);
|
|
90622
90108
|
}
|
|
90623
90109
|
for (const memberId of Object.values(value.schema)) {
|
|
@@ -90642,7 +90128,7 @@ function readClass(value) {
|
|
|
90642
90128
|
if (!Array.isArray(value.genericParams))
|
|
90643
90129
|
throw new Error(`${label} genericParams is invalid.`);
|
|
90644
90130
|
for (const param of value.genericParams) {
|
|
90645
|
-
if (!
|
|
90131
|
+
if (!isRecord5(param)) {
|
|
90646
90132
|
throw new Error(`${label} generic parameter is not an object.`);
|
|
90647
90133
|
}
|
|
90648
90134
|
if (typeof param.id !== "string" || param.id.length === 0) {
|
|
@@ -90655,7 +90141,7 @@ function readClass(value) {
|
|
|
90655
90141
|
}
|
|
90656
90142
|
const constraint = param.constraint;
|
|
90657
90143
|
if (constraint === void 0 || constraint === null) continue;
|
|
90658
|
-
if (!
|
|
90144
|
+
if (!isRecord5(constraint))
|
|
90659
90145
|
throw new Error(
|
|
90660
90146
|
`${label} generic parameter "${param.id}" constraint is invalid.`
|
|
90661
90147
|
);
|
|
@@ -90707,7 +90193,7 @@ function readClass(value) {
|
|
|
90707
90193
|
]);
|
|
90708
90194
|
}
|
|
90709
90195
|
function readConstructor(value) {
|
|
90710
|
-
if (!
|
|
90196
|
+
if (!isRecord5(value)) throw new Error("Constructor record is not an object.");
|
|
90711
90197
|
if (typeof value.id !== "string" || value.id.length === 0) {
|
|
90712
90198
|
throw new Error("Constructor id is invalid.");
|
|
90713
90199
|
}
|
|
@@ -90725,17 +90211,17 @@ function readConstructor(value) {
|
|
|
90725
90211
|
return value;
|
|
90726
90212
|
}
|
|
90727
90213
|
function readInterface(value) {
|
|
90728
|
-
if (!
|
|
90214
|
+
if (!isRecord5(value)) throw new Error("Interface record is not an object.");
|
|
90729
90215
|
if (typeof value.id !== "string") throw new Error("Interface id is invalid.");
|
|
90730
90216
|
if (typeof value.name !== "string") {
|
|
90731
90217
|
throw new Error(`Interface "${value.id}" name is invalid.`);
|
|
90732
90218
|
}
|
|
90733
|
-
if (!
|
|
90219
|
+
if (!isRecord5(value.members)) {
|
|
90734
90220
|
throw new Error(`Interface "${value.id}" members are invalid.`);
|
|
90735
90221
|
}
|
|
90736
90222
|
const memberIds = /* @__PURE__ */ new Set();
|
|
90737
90223
|
for (const [memberKey, memberValue] of Object.entries(value.members)) {
|
|
90738
|
-
if (!
|
|
90224
|
+
if (!isRecord5(memberValue)) {
|
|
90739
90225
|
throw new Error(
|
|
90740
90226
|
`Interface "${value.id}" member "${memberKey}" is invalid.`
|
|
90741
90227
|
);
|
|
@@ -90798,14 +90284,14 @@ function opaqueInterfaceFunctionIsAsynchronous(member) {
|
|
|
90798
90284
|
return member.dispatch === 1 /* Asynchronous */;
|
|
90799
90285
|
}
|
|
90800
90286
|
function typeInfoInterfaceIds(value) {
|
|
90801
|
-
if (!
|
|
90287
|
+
if (!isRecord5(value)) return [];
|
|
90802
90288
|
const ids = [];
|
|
90803
90289
|
if (value.type === 22 && typeof value.interfaceId === "string") {
|
|
90804
90290
|
ids.push(value.interfaceId);
|
|
90805
90291
|
}
|
|
90806
90292
|
if ("entryTypeInfo" in value)
|
|
90807
90293
|
ids.push(...typeInfoInterfaceIds(value.entryTypeInfo));
|
|
90808
|
-
if (
|
|
90294
|
+
if (isRecord5(value.typeArguments)) {
|
|
90809
90295
|
for (const argument2 of Object.values(value.typeArguments)) {
|
|
90810
90296
|
ids.push(...typeInfoInterfaceIds(argument2));
|
|
90811
90297
|
}
|
|
@@ -90814,7 +90300,7 @@ function typeInfoInterfaceIds(value) {
|
|
|
90814
90300
|
}
|
|
90815
90301
|
function stableValue(value) {
|
|
90816
90302
|
if (Array.isArray(value)) return value.map(stableValue);
|
|
90817
|
-
if (!
|
|
90303
|
+
if (!isRecord5(value)) return value;
|
|
90818
90304
|
const normalized = Object.fromEntries(
|
|
90819
90305
|
Object.entries(value).filter(([key]) => key !== "name" && key !== "defaultValue").sort(([left], [right]) => left.localeCompare(right)).map(([key, entry]) => [key, stableValue(entry)])
|
|
90820
90306
|
);
|
|
@@ -90839,7 +90325,7 @@ function isOpaqueNSFunctionArgumentIdentifier(value) {
|
|
|
90839
90325
|
return isOpaqueCallableArgumentIdentifier(value) && value !== "value";
|
|
90840
90326
|
}
|
|
90841
90327
|
function isOpaqueNSTypeInfo(value, ancestors = /* @__PURE__ */ new Set()) {
|
|
90842
|
-
if (!
|
|
90328
|
+
if (!isRecord5(value) || typeof value.required !== "boolean") return false;
|
|
90843
90329
|
if (value.type === "Unknown") return true;
|
|
90844
90330
|
if (typeof value.type !== "number") return false;
|
|
90845
90331
|
if ([0, 1, 2, 3, 4, 11, 12, 14, 15, 16, 17, 19, 20].includes(value.type)) {
|
|
@@ -90852,7 +90338,7 @@ function isOpaqueNSTypeInfo(value, ancestors = /* @__PURE__ */ new Set()) {
|
|
|
90852
90338
|
if (value.typeArguments === void 0 || value.typeArguments === null) {
|
|
90853
90339
|
return true;
|
|
90854
90340
|
}
|
|
90855
|
-
if (!
|
|
90341
|
+
if (!isRecord5(value.typeArguments) || ancestors.has(value)) return false;
|
|
90856
90342
|
ancestors.add(value);
|
|
90857
90343
|
try {
|
|
90858
90344
|
return Object.values(value.typeArguments).every(
|
|
@@ -90911,20 +90397,20 @@ function isOpaqueNSTypeInfo(value, ancestors = /* @__PURE__ */ new Set()) {
|
|
|
90911
90397
|
function opaqueTypeInfoContainsUnknown(value) {
|
|
90912
90398
|
if (value.type === "Unknown") return true;
|
|
90913
90399
|
if (value.type === 5 || value.type === 6 || value.type === 9) {
|
|
90914
|
-
return
|
|
90400
|
+
return isRecord5(value.entryTypeInfo) && opaqueTypeInfoContainsUnknown(value.entryTypeInfo);
|
|
90915
90401
|
}
|
|
90916
90402
|
if (value.type === 25) {
|
|
90917
|
-
return
|
|
90918
|
-
(argument2) =>
|
|
90403
|
+
return isRecord5(value.returnTypeInfo) && opaqueTypeInfoContainsUnknown(value.returnTypeInfo) || Array.isArray(value.argumentTypes) && value.argumentTypes.some(
|
|
90404
|
+
(argument2) => isRecord5(argument2) && opaqueTypeInfoContainsUnknown(argument2)
|
|
90919
90405
|
);
|
|
90920
90406
|
}
|
|
90921
|
-
if (value.type !== 7 || !
|
|
90407
|
+
if (value.type !== 7 || !isRecord5(value.typeArguments)) return false;
|
|
90922
90408
|
return Object.values(value.typeArguments).some(
|
|
90923
|
-
(argument2) =>
|
|
90409
|
+
(argument2) => isRecord5(argument2) && opaqueTypeInfoContainsUnknown(argument2)
|
|
90924
90410
|
);
|
|
90925
90411
|
}
|
|
90926
90412
|
function isOpaqueNSFunctionReturnTypeInfo(value) {
|
|
90927
|
-
if (
|
|
90413
|
+
if (isRecord5(value) && value.type === "Void") {
|
|
90928
90414
|
return value.required === true;
|
|
90929
90415
|
}
|
|
90930
90416
|
return isOpaqueNSTypeInfo(value);
|
|
@@ -90933,13 +90419,13 @@ function isOpaqueNSFunctionArgumentTypeInfo(value) {
|
|
|
90933
90419
|
return isOpaqueNSTypeInfo(value) && isOpaqueNSFunctionArgumentIdentifier(value.name) && !opaqueTypeInfoContainsUnknown(value) && hasValidOpaqueParameterDefault(value);
|
|
90934
90420
|
}
|
|
90935
90421
|
function isOpaqueConstructorArgumentTypeInfo(value) {
|
|
90936
|
-
if (!
|
|
90422
|
+
if (!isRecord5(value)) return false;
|
|
90937
90423
|
return isOpaqueNSTypeInfo(value) && isOpaqueCallableArgumentIdentifier(value.name) && !opaqueTypeInfoContainsUnknown(value) && hasValidOpaqueParameterDefault(value);
|
|
90938
90424
|
}
|
|
90939
90425
|
function hasValidOpaqueParameterDefault(value) {
|
|
90940
90426
|
const wrapper = value.defaultValue;
|
|
90941
90427
|
if (wrapper === void 0) return true;
|
|
90942
|
-
if (!
|
|
90428
|
+
if (!isRecord5(wrapper)) return false;
|
|
90943
90429
|
const keys = Object.keys(wrapper);
|
|
90944
90430
|
if (keys.length !== 1 || keys[0] !== "value") return false;
|
|
90945
90431
|
const payload = wrapper.value;
|
|
@@ -90969,7 +90455,7 @@ function opaqueParameterDefaultsPlacedLast(argumentTypes) {
|
|
|
90969
90455
|
}
|
|
90970
90456
|
function opaqueArgumentsHaveDefault(argumentTypes) {
|
|
90971
90457
|
return argumentTypes.some(
|
|
90972
|
-
(argument2) =>
|
|
90458
|
+
(argument2) => isRecord5(argument2) && argument2.defaultValue !== void 0
|
|
90973
90459
|
);
|
|
90974
90460
|
}
|
|
90975
90461
|
function assertOpaqueParameterDefaultsValid(member) {
|
|
@@ -90993,7 +90479,7 @@ function assertOpaqueParameterDefaultsValid(member) {
|
|
|
90993
90479
|
}
|
|
90994
90480
|
const parameters = [];
|
|
90995
90481
|
for (const argument2 of argumentTypes) {
|
|
90996
|
-
if (!
|
|
90482
|
+
if (!isRecord5(argument2) || !hasValidOpaqueParameterDefault(argument2)) {
|
|
90997
90483
|
throw new Error(
|
|
90998
90484
|
`Function "${member.name}" (${member.id}) declares a parameter default value that does not match the parameter's type.`
|
|
90999
90485
|
);
|
|
@@ -91245,7 +90731,7 @@ function assertProjectInterfaceDocumentValid(view, options = {}) {
|
|
|
91245
90731
|
};
|
|
91246
90732
|
const invariantTypeInfo = (left, right) => stableTypeInfo(left) === stableTypeInfo(right);
|
|
91247
90733
|
const typeInfoAssignable = (from, to) => {
|
|
91248
|
-
if (!
|
|
90734
|
+
if (!isRecord5(from) || !isRecord5(to)) return false;
|
|
91249
90735
|
if (to.type === "Unknown") return true;
|
|
91250
90736
|
if (from.type === "Unknown") return false;
|
|
91251
90737
|
if (from.required === false && to.required === true) return false;
|
|
@@ -91604,7 +91090,7 @@ function assertProjectInterfaceDocumentValid(view, options = {}) {
|
|
|
91604
91090
|
return;
|
|
91605
91091
|
}
|
|
91606
91092
|
if (owned.kind !== 7 || typeof owned.classId !== "string") return;
|
|
91607
|
-
const defaultValue =
|
|
91093
|
+
const defaultValue = isRecord5(owned.defaultValue) ? owned.defaultValue : null;
|
|
91608
91094
|
const effectiveClassId = typeof defaultValue?.classId === "string" ? defaultValue.classId : owned.classId;
|
|
91609
91095
|
const ownedClass = classesById2.get(effectiveClassId);
|
|
91610
91096
|
if (ownedClass === void 0) {
|
|
@@ -91691,7 +91177,7 @@ function assertProjectInterfaceDocumentValid(view, options = {}) {
|
|
|
91691
91177
|
current = current.extendsClassId === void 0 ? void 0 : classesById2.get(current.extendsClassId);
|
|
91692
91178
|
}
|
|
91693
91179
|
}
|
|
91694
|
-
const values = (view.values ?? []).filter(
|
|
91180
|
+
const values = (view.values ?? []).filter(isRecord5);
|
|
91695
91181
|
const valuesById = new Map(
|
|
91696
91182
|
values.flatMap(
|
|
91697
91183
|
(value) => typeof value.id === "string" ? [[value.id, value]] : []
|
|
@@ -91735,14 +91221,14 @@ function assertProjectInterfaceDocumentValid(view, options = {}) {
|
|
|
91735
91221
|
}
|
|
91736
91222
|
return;
|
|
91737
91223
|
}
|
|
91738
|
-
if (inspectedMember.kind === 5 &&
|
|
91224
|
+
if (inspectedMember.kind === 5 && isRecord5(body)) {
|
|
91739
91225
|
if (typeof inspectedMember.entryMemberId !== "string") return;
|
|
91740
91226
|
for (const childId of Object.values(body)) {
|
|
91741
91227
|
inspectChild(inspectedMember.entryMemberId, childId);
|
|
91742
91228
|
}
|
|
91743
91229
|
return;
|
|
91744
91230
|
}
|
|
91745
|
-
if (inspectedMember.kind !== 7 || !
|
|
91231
|
+
if (inspectedMember.kind !== 7 || !isRecord5(body)) return;
|
|
91746
91232
|
const effectiveClassId = classId ?? inspectedMember.classId;
|
|
91747
91233
|
if (typeof effectiveClassId !== "string") return;
|
|
91748
91234
|
const schemaClass2 = classesById2.get(effectiveClassId);
|
|
@@ -91762,7 +91248,7 @@ function assertProjectInterfaceDocumentValid(view, options = {}) {
|
|
|
91762
91248
|
}
|
|
91763
91249
|
};
|
|
91764
91250
|
for (const member of members) {
|
|
91765
|
-
if (
|
|
91251
|
+
if (isRecord5(member.defaultValue) && member.defaultValue.init == null) {
|
|
91766
91252
|
inspectValueBody(
|
|
91767
91253
|
member,
|
|
91768
91254
|
member.defaultValue.value,
|
|
@@ -91792,7 +91278,7 @@ function assertProjectInterfaceDocumentValid(view, options = {}) {
|
|
|
91792
91278
|
inspectValueBody(member, placed.value, placed.classId, placed.valueId);
|
|
91793
91279
|
}
|
|
91794
91280
|
for (const value of values) {
|
|
91795
|
-
if (typeof value.classId !== "string" || !
|
|
91281
|
+
if (typeof value.classId !== "string" || !isRecord5(value.value)) {
|
|
91796
91282
|
continue;
|
|
91797
91283
|
}
|
|
91798
91284
|
const syntheticMember2 = {
|
|
@@ -91919,14 +91405,14 @@ function assertProjectInterfaceDocumentValid(view, options = {}) {
|
|
|
91919
91405
|
schemaClass2,
|
|
91920
91406
|
nextVisiting
|
|
91921
91407
|
);
|
|
91922
|
-
if (!
|
|
91408
|
+
if (!isRecord5(collectionTypeInfo) || collectionTypeInfo.type !== 5 && collectionTypeInfo.type !== 6) {
|
|
91923
91409
|
return null;
|
|
91924
91410
|
}
|
|
91925
91411
|
const entryTypeInfo = substituteTypeInfoForClass(
|
|
91926
91412
|
resolved.declaredTypeInfo ?? collectionTypeInfo.entryTypeInfo,
|
|
91927
91413
|
schemaClass2
|
|
91928
91414
|
);
|
|
91929
|
-
if (!
|
|
91415
|
+
if (!isRecord5(entryTypeInfo)) return null;
|
|
91930
91416
|
if (resolved.selection !== 1 /* Multi */) {
|
|
91931
91417
|
return { ...entryTypeInfo, required: required2 };
|
|
91932
91418
|
}
|
|
@@ -91941,7 +91427,7 @@ function assertProjectInterfaceDocumentValid(view, options = {}) {
|
|
|
91941
91427
|
return { type: resolved.kind, required: required2 };
|
|
91942
91428
|
};
|
|
91943
91429
|
const constrainedGenericTypeInfo = (typeInfo) => {
|
|
91944
|
-
if (!
|
|
91430
|
+
if (!isRecord5(typeInfo) || typeInfo.type !== 21 || typeof typeInfo.genericParamId !== "string") {
|
|
91945
91431
|
return null;
|
|
91946
91432
|
}
|
|
91947
91433
|
const constraint = genericParamDeclarationsById.get(
|
|
@@ -92000,7 +91486,7 @@ function assertProjectInterfaceDocumentValid(view, options = {}) {
|
|
|
92000
91486
|
});
|
|
92001
91487
|
};
|
|
92002
91488
|
const substituteTypeInfoForClass = (typeInfo, schemaClass2) => {
|
|
92003
|
-
if (!
|
|
91489
|
+
if (!isRecord5(typeInfo)) return typeInfo;
|
|
92004
91490
|
if (typeInfo.type === 21 && typeof typeInfo.genericParamId === "string") {
|
|
92005
91491
|
const bindingId = genericEnvForClass(schemaClass2).get(
|
|
92006
91492
|
typeInfo.genericParamId
|
|
@@ -92017,7 +91503,7 @@ function assertProjectInterfaceDocumentValid(view, options = {}) {
|
|
|
92017
91503
|
)
|
|
92018
91504
|
};
|
|
92019
91505
|
}
|
|
92020
|
-
if (typeInfo.type !== 7 || !
|
|
91506
|
+
if (typeInfo.type !== 7 || !isRecord5(typeInfo.typeArguments)) {
|
|
92021
91507
|
return typeInfo;
|
|
92022
91508
|
}
|
|
92023
91509
|
return {
|
|
@@ -92211,7 +91697,7 @@ function resolveOpaqueNSFunctionSignature(member, membersById2) {
|
|
|
92211
91697
|
return null;
|
|
92212
91698
|
}
|
|
92213
91699
|
function assertOpaqueCompiledNSFunctionAction(member, signature) {
|
|
92214
|
-
if (!
|
|
91700
|
+
if (!isRecord5(member.action)) {
|
|
92215
91701
|
throw new Error(`NSFunction "${member.id}" requires compiled action.`);
|
|
92216
91702
|
}
|
|
92217
91703
|
if (!Array.isArray(member.action.parameters)) {
|
|
@@ -92219,12 +91705,12 @@ function assertOpaqueCompiledNSFunctionAction(member, signature) {
|
|
|
92219
91705
|
`NSFunction "${member.id}" compiled action parameters are invalid.`
|
|
92220
91706
|
);
|
|
92221
91707
|
}
|
|
92222
|
-
if (!Array.isArray(member.action.instructions) || !member.action.instructions.every(
|
|
91708
|
+
if (!Array.isArray(member.action.instructions) || !member.action.instructions.every(isRecord5)) {
|
|
92223
91709
|
throw new Error(
|
|
92224
91710
|
`NSFunction "${member.id}" compiled action instructions are invalid.`
|
|
92225
91711
|
);
|
|
92226
91712
|
}
|
|
92227
|
-
if (!
|
|
91713
|
+
if (!isRecord5(member.action.typeInfo)) {
|
|
92228
91714
|
throw new Error(
|
|
92229
91715
|
`NSFunction "${member.id}" compiled action return type is invalid.`
|
|
92230
91716
|
);
|
|
@@ -92246,31 +91732,31 @@ function assertOpaqueCompiledNSFunctionAction(member, signature) {
|
|
|
92246
91732
|
`NSFunction "${member.id}" compiled action parameter count is stale.`
|
|
92247
91733
|
);
|
|
92248
91734
|
}
|
|
92249
|
-
if (!
|
|
91735
|
+
if (!isRecord5(parameters[0]) || parameters[0].id !== "__this__") {
|
|
92250
91736
|
throw new Error(
|
|
92251
91737
|
`NSFunction "${member.id}" compiled action is missing __this__.`
|
|
92252
91738
|
);
|
|
92253
91739
|
}
|
|
92254
|
-
if (!
|
|
91740
|
+
if (!isRecord5(parameters[1]) || parameters[1].id !== "__root__") {
|
|
92255
91741
|
throw new Error(
|
|
92256
91742
|
`NSFunction "${member.id}" compiled action is missing __root__.`
|
|
92257
91743
|
);
|
|
92258
91744
|
}
|
|
92259
91745
|
for (let index = 0; index < signature.argumentTypes.length; index += 1) {
|
|
92260
91746
|
const parameter4 = parameters[index + 2];
|
|
92261
|
-
if (!
|
|
91747
|
+
if (!isRecord5(parameter4) || parameter4.id !== `__arg_${index}__`) {
|
|
92262
91748
|
throw new Error(
|
|
92263
91749
|
`NSFunction "${member.id}" compiled action parameter ${index + 1} is stale.`
|
|
92264
91750
|
);
|
|
92265
91751
|
}
|
|
92266
|
-
if (!
|
|
91752
|
+
if (!isRecord5(parameter4.typeInfo) || stableTypeInfo(parameter4.typeInfo) !== stableTypeInfo(signature.argumentTypes[index])) {
|
|
92267
91753
|
throw new Error(
|
|
92268
91754
|
`NSFunction "${member.id}" compiled action parameter ${index + 1} type is stale.`
|
|
92269
91755
|
);
|
|
92270
91756
|
}
|
|
92271
91757
|
}
|
|
92272
91758
|
for (const parameter4 of parameters) {
|
|
92273
|
-
if (!
|
|
91759
|
+
if (!isRecord5(parameter4) || typeof parameter4.id !== "string" || !isRecord5(parameter4.typeInfo) || !isRecord5(parameter4.pointer)) {
|
|
92274
91760
|
throw new Error(
|
|
92275
91761
|
`NSFunction "${member.id}" compiled action parameter shape is invalid.`
|
|
92276
91762
|
);
|
|
@@ -92278,14 +91764,14 @@ function assertOpaqueCompiledNSFunctionAction(member, signature) {
|
|
|
92278
91764
|
}
|
|
92279
91765
|
}
|
|
92280
91766
|
function opaquePositionalTypeSignature(typeInfo) {
|
|
92281
|
-
if (!
|
|
91767
|
+
if (!isRecord5(typeInfo)) return stableTypeInfo(typeInfo);
|
|
92282
91768
|
const { required: _required, ...rest } = typeInfo;
|
|
92283
91769
|
void _required;
|
|
92284
91770
|
return stableTypeInfo(rest);
|
|
92285
91771
|
}
|
|
92286
91772
|
function assertOpaqueCompiledConstructorAction(declaredConstructor, argumentTypes) {
|
|
92287
91773
|
const action = declaredConstructor.action;
|
|
92288
|
-
if (!
|
|
91774
|
+
if (!isRecord5(action)) {
|
|
92289
91775
|
throw new Error(
|
|
92290
91776
|
`Constructor "${declaredConstructor.id}" requires a compiled action.`
|
|
92291
91777
|
);
|
|
@@ -92295,12 +91781,12 @@ function assertOpaqueCompiledConstructorAction(declaredConstructor, argumentType
|
|
|
92295
91781
|
`Constructor "${declaredConstructor.id}" compiled action parameters are invalid.`
|
|
92296
91782
|
);
|
|
92297
91783
|
}
|
|
92298
|
-
if (!Array.isArray(action.instructions) || !action.instructions.every(
|
|
91784
|
+
if (!Array.isArray(action.instructions) || !action.instructions.every(isRecord5)) {
|
|
92299
91785
|
throw new Error(
|
|
92300
91786
|
`Constructor "${declaredConstructor.id}" compiled action instructions are invalid.`
|
|
92301
91787
|
);
|
|
92302
91788
|
}
|
|
92303
|
-
if (!
|
|
91789
|
+
if (!isRecord5(action.typeInfo)) {
|
|
92304
91790
|
throw new Error(
|
|
92305
91791
|
`Constructor "${declaredConstructor.id}" compiled action return type is invalid.`
|
|
92306
91792
|
);
|
|
@@ -92321,24 +91807,24 @@ function assertOpaqueCompiledConstructorAction(declaredConstructor, argumentType
|
|
|
92321
91807
|
`Constructor "${declaredConstructor.id}" compiled action parameter count is stale.`
|
|
92322
91808
|
);
|
|
92323
91809
|
}
|
|
92324
|
-
if (!
|
|
91810
|
+
if (!isRecord5(parameters[0]) || parameters[0].id !== "__this__") {
|
|
92325
91811
|
throw new Error(
|
|
92326
91812
|
`Constructor "${declaredConstructor.id}" compiled action is missing __this__.`
|
|
92327
91813
|
);
|
|
92328
91814
|
}
|
|
92329
|
-
if (!
|
|
91815
|
+
if (!isRecord5(parameters[1]) || parameters[1].id !== "__root__") {
|
|
92330
91816
|
throw new Error(
|
|
92331
91817
|
`Constructor "${declaredConstructor.id}" compiled action is missing __root__.`
|
|
92332
91818
|
);
|
|
92333
91819
|
}
|
|
92334
91820
|
for (let index = 0; index < argumentTypes.length; index += 1) {
|
|
92335
91821
|
const parameter4 = parameters[index + 2];
|
|
92336
|
-
if (!
|
|
91822
|
+
if (!isRecord5(parameter4) || parameter4.id !== `__arg_${index}__`) {
|
|
92337
91823
|
throw new Error(
|
|
92338
91824
|
`Constructor "${declaredConstructor.id}" compiled action parameter ${index + 1} is stale.`
|
|
92339
91825
|
);
|
|
92340
91826
|
}
|
|
92341
|
-
if (!
|
|
91827
|
+
if (!isRecord5(parameter4.typeInfo)) {
|
|
92342
91828
|
throw new Error(
|
|
92343
91829
|
`Constructor "${declaredConstructor.id}" compiled action parameter ${index + 1} has no type.`
|
|
92344
91830
|
);
|
|
@@ -92350,7 +91836,7 @@ function assertOpaqueCompiledConstructorAction(declaredConstructor, argumentType
|
|
|
92350
91836
|
}
|
|
92351
91837
|
}
|
|
92352
91838
|
for (const parameter4 of parameters) {
|
|
92353
|
-
if (!
|
|
91839
|
+
if (!isRecord5(parameter4)) {
|
|
92354
91840
|
throw new Error(
|
|
92355
91841
|
`Constructor "${declaredConstructor.id}" compiled action parameter shape is invalid.`
|
|
92356
91842
|
);
|
|
@@ -92360,7 +91846,7 @@ function assertOpaqueCompiledConstructorAction(declaredConstructor, argumentType
|
|
|
92360
91846
|
`Constructor "${declaredConstructor.id}" compiled action parameter is missing an id.`
|
|
92361
91847
|
);
|
|
92362
91848
|
}
|
|
92363
|
-
if (!
|
|
91849
|
+
if (!isRecord5(parameter4.pointer)) {
|
|
92364
91850
|
throw new Error(
|
|
92365
91851
|
`Constructor "${declaredConstructor.id}" compiled action parameter "${parameter4.id}" is missing a pointer.`
|
|
92366
91852
|
);
|
|
@@ -92386,7 +91872,7 @@ function assertOpaqueBaseClauseListValid(declaredConstructor, spec) {
|
|
|
92386
91872
|
}
|
|
92387
91873
|
const names = /* @__PURE__ */ new Set();
|
|
92388
91874
|
for (const entry of authored) {
|
|
92389
|
-
if (!
|
|
91875
|
+
if (!isRecord5(entry)) {
|
|
92390
91876
|
throw new Error(
|
|
92391
91877
|
`Constructor "${declaredConstructor.id}" has a ${spec.entryLabel} that is not an object.`
|
|
92392
91878
|
);
|
|
@@ -92420,7 +91906,7 @@ function assertOpaqueBaseClauseListValid(declaredConstructor, spec) {
|
|
|
92420
91906
|
);
|
|
92421
91907
|
}
|
|
92422
91908
|
for (const [index, getter] of compiled.entries()) {
|
|
92423
|
-
if (!
|
|
91909
|
+
if (!isRecord5(getter)) {
|
|
92424
91910
|
throw new Error(
|
|
92425
91911
|
`Constructor "${declaredConstructor.id}" compiled ${spec.entryLabel} ${index + 1} is not an object.`
|
|
92426
91912
|
);
|
|
@@ -92435,7 +91921,7 @@ function assertOpaqueBaseClauseListValid(declaredConstructor, spec) {
|
|
|
92435
91921
|
`Constructor "${declaredConstructor.id}" compiled ${spec.entryLabel} ${index + 1} instructions are invalid.`
|
|
92436
91922
|
);
|
|
92437
91923
|
}
|
|
92438
|
-
if (!
|
|
91924
|
+
if (!isRecord5(getter.typeInfo)) {
|
|
92439
91925
|
throw new Error(
|
|
92440
91926
|
`Constructor "${declaredConstructor.id}" compiled ${spec.entryLabel} ${index + 1} return type is invalid.`
|
|
92441
91927
|
);
|
|
@@ -92618,7 +92104,7 @@ function assertOpaqueConstructorsValid(constructors, classesById2) {
|
|
|
92618
92104
|
}
|
|
92619
92105
|
function assertOpaqueMemberDefaultValueValid(member) {
|
|
92620
92106
|
const defaultValue = member.defaultValue;
|
|
92621
|
-
if (!
|
|
92107
|
+
if (!isRecord5(defaultValue)) return;
|
|
92622
92108
|
const init = defaultValue.init;
|
|
92623
92109
|
if (init === void 0 || init === null) return;
|
|
92624
92110
|
if (defaultValue.value !== void 0) {
|
|
@@ -92631,7 +92117,7 @@ function assertOpaqueMemberDefaultValueValid(member) {
|
|
|
92631
92117
|
`Member "${member.id}" initializer-backed defaultValue cannot declare classId; the concrete class comes from evaluating the initializer.`
|
|
92632
92118
|
);
|
|
92633
92119
|
}
|
|
92634
|
-
if (!
|
|
92120
|
+
if (!isRecord5(init)) {
|
|
92635
92121
|
throw new Error(
|
|
92636
92122
|
`Member "${member.id}" defaultValue init is not an object.`
|
|
92637
92123
|
);
|
|
@@ -92649,7 +92135,7 @@ function assertOpaqueMemberDefaultValueValid(member) {
|
|
|
92649
92135
|
}
|
|
92650
92136
|
if (init.compiled === void 0) return;
|
|
92651
92137
|
const compiled = init.compiled;
|
|
92652
|
-
if (!
|
|
92138
|
+
if (!isRecord5(compiled)) {
|
|
92653
92139
|
throw new Error(
|
|
92654
92140
|
`Member "${member.id}" defaultValue init compiled body is not an object.`
|
|
92655
92141
|
);
|
|
@@ -92659,12 +92145,12 @@ function assertOpaqueMemberDefaultValueValid(member) {
|
|
|
92659
92145
|
`Member "${member.id}" defaultValue init compiled parameters are invalid.`
|
|
92660
92146
|
);
|
|
92661
92147
|
}
|
|
92662
|
-
if (!Array.isArray(compiled.instructions) || !compiled.instructions.every(
|
|
92148
|
+
if (!Array.isArray(compiled.instructions) || !compiled.instructions.every(isRecord5)) {
|
|
92663
92149
|
throw new Error(
|
|
92664
92150
|
`Member "${member.id}" defaultValue init compiled instructions are invalid.`
|
|
92665
92151
|
);
|
|
92666
92152
|
}
|
|
92667
|
-
if (!
|
|
92153
|
+
if (!isRecord5(compiled.typeInfo)) {
|
|
92668
92154
|
throw new Error(
|
|
92669
92155
|
`Member "${member.id}" defaultValue init compiled return type is invalid.`
|
|
92670
92156
|
);
|
|
@@ -92684,12 +92170,12 @@ function assertOpaqueNSFunctionValid(member, membersById2) {
|
|
|
92684
92170
|
if (member.defaultValue !== void 0 && member.defaultValue !== null) {
|
|
92685
92171
|
throw new Error(`NSFunction "${member.id}" cannot declare defaultValue.`);
|
|
92686
92172
|
}
|
|
92687
|
-
if (member.valueId !== void 0
|
|
92173
|
+
if (member.valueId !== void 0) {
|
|
92688
92174
|
throw new Error(`NSFunction "${member.id}" cannot own a valueId.`);
|
|
92689
92175
|
}
|
|
92690
92176
|
const hasUIBody = member.bodyMode === 1 /* UI */;
|
|
92691
92177
|
if (hasUIBody) {
|
|
92692
|
-
if (!
|
|
92178
|
+
if (!isRecord5(member.uiAction)) {
|
|
92693
92179
|
throw new Error(`NSFunction "${member.id}" requires a valid UI action.`);
|
|
92694
92180
|
}
|
|
92695
92181
|
if (member.code !== void 0) {
|
|
@@ -92697,7 +92183,7 @@ function assertOpaqueNSFunctionValid(member, membersById2) {
|
|
|
92697
92183
|
`NSFunction "${member.id}" cannot declare code in UI body mode.`
|
|
92698
92184
|
);
|
|
92699
92185
|
}
|
|
92700
|
-
if (!
|
|
92186
|
+
if (!isRecord5(member.action) || !Array.isArray(member.action.instructions) || !Array.isArray(member.uiAction.instructions) || stableTypeInfo(member.action.instructions) !== stableTypeInfo(member.uiAction.instructions)) {
|
|
92701
92187
|
throw new Error(
|
|
92702
92188
|
`NSFunction "${member.id}" compiled action must match its UI action.`
|
|
92703
92189
|
);
|
|
@@ -92751,7 +92237,7 @@ function assertOpaqueNSFunctionValid(member, membersById2) {
|
|
|
92751
92237
|
if (isRequiredMember2(member)) {
|
|
92752
92238
|
throw new Error(`NSFunction "${member.id}" cannot be required.`);
|
|
92753
92239
|
}
|
|
92754
|
-
if (
|
|
92240
|
+
if (isRecord5(member.returnTypeInfo) && member.returnTypeInfo.type === "Void" && member.returnTypeInfo.required !== true) {
|
|
92755
92241
|
throw new Error(
|
|
92756
92242
|
`NSFunction "${member.id}" Void return type must be required.`
|
|
92757
92243
|
);
|
|
@@ -92816,10 +92302,7 @@ var init_projectInterfaceValidation = __esm({
|
|
|
92816
92302
|
0 /* Optional */,
|
|
92817
92303
|
1 /* Required */
|
|
92818
92304
|
];
|
|
92819
|
-
MEMBER_MUTABILITY_KINDS = [
|
|
92820
|
-
0 /* Mutable */,
|
|
92821
|
-
1 /* ReadOnly */
|
|
92822
|
-
];
|
|
92305
|
+
MEMBER_MUTABILITY_KINDS = [1 /* ReadOnly */];
|
|
92823
92306
|
MEMBER_MODIFIER_KINDS = [
|
|
92824
92307
|
0 /* Virtual */,
|
|
92825
92308
|
1 /* Sealed */,
|
|
@@ -92918,7 +92401,7 @@ var init_projectInterfaceValidation = __esm({
|
|
|
92918
92401
|
});
|
|
92919
92402
|
|
|
92920
92403
|
// ../src/database/project-schema-identifier-validation.ts
|
|
92921
|
-
function
|
|
92404
|
+
function isRecord6(value) {
|
|
92922
92405
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
92923
92406
|
}
|
|
92924
92407
|
function assertIdentifier(value, label, predicate) {
|
|
@@ -92931,7 +92414,7 @@ function assertArgumentIdentifiers(value, ownerLabel, predicate) {
|
|
|
92931
92414
|
if (!Array.isArray(value)) return;
|
|
92932
92415
|
for (let index = 0; index < value.length; index += 1) {
|
|
92933
92416
|
const argument2 = value[index];
|
|
92934
|
-
if (!
|
|
92417
|
+
if (!isRecord6(argument2)) continue;
|
|
92935
92418
|
assertIdentifier(
|
|
92936
92419
|
argument2.name,
|
|
92937
92420
|
`${ownerLabel} parameter ${index + 1} name ${JSON.stringify(argument2.name)}`,
|
|
@@ -92940,13 +92423,13 @@ function assertArgumentIdentifiers(value, ownerLabel, predicate) {
|
|
|
92940
92423
|
}
|
|
92941
92424
|
}
|
|
92942
92425
|
function assertClassIdentifiers(recordId, value) {
|
|
92943
|
-
if (!
|
|
92426
|
+
if (!isRecord6(value)) return;
|
|
92944
92427
|
assertIdentifier(
|
|
92945
92428
|
value.name,
|
|
92946
92429
|
`Class "${recordId}" name ${JSON.stringify(value.name)}`,
|
|
92947
92430
|
isValidSchemaAuthoredIdentifier
|
|
92948
92431
|
);
|
|
92949
|
-
if (
|
|
92432
|
+
if (isRecord6(value.schema)) {
|
|
92950
92433
|
for (const schemaKey of Object.keys(value.schema)) {
|
|
92951
92434
|
assertIdentifier(
|
|
92952
92435
|
schemaKey,
|
|
@@ -92958,7 +92441,7 @@ function assertClassIdentifiers(recordId, value) {
|
|
|
92958
92441
|
if (!Array.isArray(value.genericParams)) return;
|
|
92959
92442
|
for (let index = 0; index < value.genericParams.length; index += 1) {
|
|
92960
92443
|
const parameter4 = value.genericParams[index];
|
|
92961
|
-
if (!
|
|
92444
|
+
if (!isRecord6(parameter4)) continue;
|
|
92962
92445
|
assertIdentifier(
|
|
92963
92446
|
parameter4.name,
|
|
92964
92447
|
`Class "${recordId}" generic parameter ${index + 1} name ${JSON.stringify(parameter4.name)}`,
|
|
@@ -92967,16 +92450,16 @@ function assertClassIdentifiers(recordId, value) {
|
|
|
92967
92450
|
}
|
|
92968
92451
|
}
|
|
92969
92452
|
function assertEnumIdentifiers(recordId, value) {
|
|
92970
|
-
if (!
|
|
92453
|
+
if (!isRecord6(value)) return;
|
|
92971
92454
|
assertIdentifier(
|
|
92972
92455
|
value.name,
|
|
92973
92456
|
`Enum "${recordId}" name ${JSON.stringify(value.name)}`,
|
|
92974
92457
|
isValidSchemaAuthoredIdentifier
|
|
92975
92458
|
);
|
|
92976
|
-
if (!
|
|
92459
|
+
if (!isRecord6(value.options)) return;
|
|
92977
92460
|
const optionIdsByFoldedName = /* @__PURE__ */ new Map();
|
|
92978
92461
|
for (const [optionId, option] of Object.entries(value.options)) {
|
|
92979
|
-
if (!
|
|
92462
|
+
if (!isRecord6(option)) continue;
|
|
92980
92463
|
if (!isValidEnumOptionId(optionId)) {
|
|
92981
92464
|
throw new Error(
|
|
92982
92465
|
`Enum "${recordId}" option id ${JSON.stringify(optionId)} must be an RFC 4122 UUID.`
|
|
@@ -93003,20 +92486,20 @@ function assertEnumIdentifiers(recordId, value) {
|
|
|
93003
92486
|
}
|
|
93004
92487
|
}
|
|
93005
92488
|
function assertInterfaceIdentifiers(recordId, value) {
|
|
93006
|
-
if (!
|
|
92489
|
+
if (!isRecord6(value)) return;
|
|
93007
92490
|
assertIdentifier(
|
|
93008
92491
|
value.name,
|
|
93009
92492
|
`Interface "${recordId}" name ${JSON.stringify(value.name)}`,
|
|
93010
92493
|
isValidSchemaAuthoredIdentifier
|
|
93011
92494
|
);
|
|
93012
|
-
if (!
|
|
92495
|
+
if (!isRecord6(value.members)) return;
|
|
93013
92496
|
for (const [memberKey, member] of Object.entries(value.members)) {
|
|
93014
92497
|
assertIdentifier(
|
|
93015
92498
|
memberKey,
|
|
93016
92499
|
`Interface "${recordId}" member name ${JSON.stringify(memberKey)}`,
|
|
93017
92500
|
isValidSchemaMemberIdentifier
|
|
93018
92501
|
);
|
|
93019
|
-
if (!
|
|
92502
|
+
if (!isRecord6(member) || member.kind !== "function") continue;
|
|
93020
92503
|
assertArgumentIdentifiers(
|
|
93021
92504
|
member.argumentTypes,
|
|
93022
92505
|
`Interface "${recordId}" function "${memberKey}"`,
|
|
@@ -93030,7 +92513,7 @@ function isCallableOrPropertyMemberKind(value) {
|
|
|
93030
92513
|
);
|
|
93031
92514
|
}
|
|
93032
92515
|
function assertMemberIdentifiers(recordId, value, directlyAuthoredMemberIds) {
|
|
93033
|
-
if (!
|
|
92516
|
+
if (!isRecord6(value)) return;
|
|
93034
92517
|
if (directlyAuthoredMemberIds.has(recordId) || isCallableOrPropertyMemberKind(value)) {
|
|
93035
92518
|
assertIdentifier(
|
|
93036
92519
|
value.name,
|
|
@@ -93054,7 +92537,7 @@ function assertSchemaIdentifierWriteChangesValid(changes, directlyAuthoredMember
|
|
|
93054
92537
|
assertClassIdentifiers(change.input.recordId, change.storedNextData);
|
|
93055
92538
|
} else if (kind === "enum") {
|
|
93056
92539
|
assertEnumIdentifiers(change.input.recordId, change.storedNextData);
|
|
93057
|
-
if (
|
|
92540
|
+
if (isRecord6(change.storedNextData) && isRecord6(change.storedNextData.options)) {
|
|
93058
92541
|
for (const optionId of Object.keys(change.storedNextData.options)) {
|
|
93059
92542
|
const owner = enumOptionOwners.get(optionId);
|
|
93060
92543
|
if (owner !== void 0 && owner !== change.input.recordId) {
|
|
@@ -93510,7 +92993,7 @@ function projectValueHeadPlacementGraph(args) {
|
|
|
93510
92993
|
});
|
|
93511
92994
|
}
|
|
93512
92995
|
for (const member of members.values()) {
|
|
93513
|
-
if (!
|
|
92996
|
+
if (!isRecord7(member.defaultValue)) continue;
|
|
93514
92997
|
for (const child of directChildEdges({
|
|
93515
92998
|
member: resolvedMember(member),
|
|
93516
92999
|
body: member.defaultValue.value,
|
|
@@ -93659,7 +93142,7 @@ function directChildEdges(args) {
|
|
|
93659
93142
|
const result = [];
|
|
93660
93143
|
if (args.member.kind === 9) return result;
|
|
93661
93144
|
if (args.member.kind === 7) {
|
|
93662
|
-
if (!
|
|
93145
|
+
if (!isRecord7(args.body)) return result;
|
|
93663
93146
|
const classId = args.classId ?? stringOrNull(args.member.classId);
|
|
93664
93147
|
if (classId === null) return result;
|
|
93665
93148
|
const schema = args.effectiveSchema(classId);
|
|
@@ -93682,7 +93165,7 @@ function directChildEdges(args) {
|
|
|
93682
93165
|
}
|
|
93683
93166
|
if (args.member.listKind === 1 /* Unordered */) return result;
|
|
93684
93167
|
}
|
|
93685
|
-
const ids = Array.isArray(args.body) ? args.body :
|
|
93168
|
+
const ids = Array.isArray(args.body) ? args.body : isRecord7(args.body) ? Object.values(args.body) : [];
|
|
93686
93169
|
for (const valueId of ids) {
|
|
93687
93170
|
if (typeof valueId !== "string") continue;
|
|
93688
93171
|
result.push({
|
|
@@ -93728,7 +93211,7 @@ function resolveClassSchema(classId, classes) {
|
|
|
93728
93211
|
}
|
|
93729
93212
|
const schema = /* @__PURE__ */ new Map();
|
|
93730
93213
|
for (const schemaClass2 of chain) {
|
|
93731
|
-
if (!
|
|
93214
|
+
if (!isRecord7(schemaClass2.schema)) continue;
|
|
93732
93215
|
for (const [key, memberId] of Object.entries(schemaClass2.schema)) {
|
|
93733
93216
|
if (typeof memberId === "string") schema.set(key, memberId);
|
|
93734
93217
|
}
|
|
@@ -93738,7 +93221,7 @@ function resolveClassSchema(classId, classes) {
|
|
|
93738
93221
|
function recordMap(values) {
|
|
93739
93222
|
const result = /* @__PURE__ */ new Map();
|
|
93740
93223
|
for (const value of values) {
|
|
93741
|
-
if (!
|
|
93224
|
+
if (!isRecord7(value)) continue;
|
|
93742
93225
|
result.set(requireId(value, "record"), value);
|
|
93743
93226
|
}
|
|
93744
93227
|
return result;
|
|
@@ -93756,7 +93239,7 @@ function joinPath(parent, child) {
|
|
|
93756
93239
|
function placementsEqual(left, right) {
|
|
93757
93240
|
return JSON.stringify(left) === JSON.stringify(right);
|
|
93758
93241
|
}
|
|
93759
|
-
function
|
|
93242
|
+
function isRecord7(value) {
|
|
93760
93243
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
93761
93244
|
}
|
|
93762
93245
|
var init_valueHeadPlacementGraph = __esm({
|
|
@@ -93882,7 +93365,7 @@ function validateCreatedMigrationGraph(args) {
|
|
|
93882
93365
|
if (row.value === null && member !== void 0 && isMemberClassBase(member) && !isRequiredMember2(member)) {
|
|
93883
93366
|
return;
|
|
93884
93367
|
}
|
|
93885
|
-
if (!
|
|
93368
|
+
if (!isRecord8(row.value)) {
|
|
93886
93369
|
throw graphError(
|
|
93887
93370
|
args,
|
|
93888
93371
|
`Class value "${valueId}" does not contain a record`
|
|
@@ -93948,7 +93431,7 @@ function validateCreatedMigrationGraph(args) {
|
|
|
93948
93431
|
`Dictionary value "${valueId}" references missing entry member "${member.entryMemberId}"`
|
|
93949
93432
|
);
|
|
93950
93433
|
}
|
|
93951
|
-
if (!
|
|
93434
|
+
if (!isRecord8(row.value)) {
|
|
93952
93435
|
throw graphError(args, `Dictionary value "${valueId}" is not a record`);
|
|
93953
93436
|
}
|
|
93954
93437
|
for (const [key, childId] of Object.entries(row.value)) {
|
|
@@ -93992,7 +93475,7 @@ function validateCreatedMigrationGraph(args) {
|
|
|
93992
93475
|
}
|
|
93993
93476
|
return [...createdById.values()];
|
|
93994
93477
|
}
|
|
93995
|
-
function
|
|
93478
|
+
function isRecord8(value) {
|
|
93996
93479
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
93997
93480
|
}
|
|
93998
93481
|
function graphError(args, detail) {
|
|
@@ -96451,7 +95934,6 @@ function prepareServerOwnedSchemaCommit(args) {
|
|
|
96451
95934
|
changes: authoredChanges,
|
|
96452
95935
|
contentHashHeads: args.contentHashHeads
|
|
96453
95936
|
});
|
|
96454
|
-
assertNoLegacyWorldLayerBindingFields(authoredChanges);
|
|
96455
95937
|
const hasSchemaChange = authoredChanges.some(
|
|
96456
95938
|
(change) => SCHEMA_RECORD_KINDS.has(change.recordKind)
|
|
96457
95939
|
);
|
|
@@ -96472,6 +95954,17 @@ function prepareServerOwnedSchemaCommit(args) {
|
|
|
96472
95954
|
args.document,
|
|
96473
95955
|
authoredChanges
|
|
96474
95956
|
);
|
|
95957
|
+
const changedValueIds = new Set(
|
|
95958
|
+
authoredChanges.flatMap(
|
|
95959
|
+
(change) => change.recordKind === "value" && change.operation !== "delete" ? [change.recordId] : []
|
|
95960
|
+
)
|
|
95961
|
+
);
|
|
95962
|
+
assertWorldLayerLinkValueBodiesCanonical({
|
|
95963
|
+
classes: authoredPostDocument.classes,
|
|
95964
|
+
values: authoredPostDocument.values.filter(
|
|
95965
|
+
(value) => changedValueIds.has(value.id)
|
|
95966
|
+
)
|
|
95967
|
+
});
|
|
96475
95968
|
const recompileTargets = collectNeoScriptRecompileTargets({
|
|
96476
95969
|
currentDocument: args.document,
|
|
96477
95970
|
postDocument: authoredPostDocument,
|
|
@@ -97563,16 +97056,6 @@ function collectReadOnlyConversionDeletes(args) {
|
|
|
97563
97056
|
expectedBaseContentHash: args.requireValueHash(value.id)
|
|
97564
97057
|
});
|
|
97565
97058
|
}
|
|
97566
|
-
function assertNoLegacyWorldLayerBindingFields(changes) {
|
|
97567
|
-
for (const change of changes) {
|
|
97568
|
-
if (change.recordKind !== "value" || change.operation === "delete" || !isMemberValue(change.nextData) || typeof change.nextData.value !== "object" || change.nextData.value === null || Array.isArray(change.nextData.value) || !Object.hasOwn(change.nextData.value, "layerClassId")) {
|
|
97569
|
-
continue;
|
|
97570
|
-
}
|
|
97571
|
-
throw new Error(
|
|
97572
|
-
`Value "${change.recordId}" contains unsupported legacy field "layerClassId"; declare the class targetLayer relation instead.`
|
|
97573
|
-
);
|
|
97574
|
-
}
|
|
97575
|
-
}
|
|
97576
97059
|
function prepareServerOwnedDialogueBodies(args) {
|
|
97577
97060
|
const postDialogues = new Map(
|
|
97578
97061
|
(args.postDocument.dialogueRecords ?? []).map((dialogue) => [
|
|
@@ -98633,7 +98116,7 @@ function authoredSeedRowMatchesValue(row, value) {
|
|
|
98633
98116
|
classId: value.classId ?? null,
|
|
98634
98117
|
...value.containerId === void 0 ? {} : { containerId: value.containerId },
|
|
98635
98118
|
...value.genericBindings === void 0 ? {} : { genericBindings: value.genericBindings },
|
|
98636
|
-
...row.sourceValueId === void 0 || value.sourceValueId === void 0
|
|
98119
|
+
...row.sourceValueId === void 0 || value.sourceValueId === void 0 ? {} : { sourceValueId: value.sourceValueId },
|
|
98637
98120
|
...seedDeclaresProvenance ? pickInstanceProvenance(value) : {}
|
|
98638
98121
|
}
|
|
98639
98122
|
);
|
|
@@ -119977,7 +119460,7 @@ function assignPendingIds(changes, authoredValueSeeds, reconstructed3, localInit
|
|
|
119977
119460
|
value: rewrittenSeed.value,
|
|
119978
119461
|
classId: typeof rewrittenSeed.classId === "string" ? rewrittenSeed.classId : null,
|
|
119979
119462
|
// The P75 recipe must survive this re-projection verbatim: a seed
|
|
119980
|
-
// that loses it reads as
|
|
119463
|
+
// that loses it reads as an eagerly materialized graph server-side and the
|
|
119981
119464
|
// whole default tree materializes.
|
|
119982
119465
|
...rewrittenSeedProvenance(memberId, rewrittenSeed)
|
|
119983
119466
|
});
|
|
@@ -122813,7 +122296,7 @@ var init_registry2 = __esm({
|
|
|
122813
122296
|
PROJECT_SCHEMA_CONTRACT = Object.freeze({
|
|
122814
122297
|
formatVersion: 4,
|
|
122815
122298
|
contractVersion: "4.0",
|
|
122816
|
-
cliVersion: "0.
|
|
122299
|
+
cliVersion: "0.40.0",
|
|
122817
122300
|
projectFileUploadBatchSize: 32,
|
|
122818
122301
|
documentRecords: {
|
|
122819
122302
|
member: {
|
|
@@ -124252,7 +123735,7 @@ import {
|
|
|
124252
123735
|
sep as sep6
|
|
124253
123736
|
} from "node:path";
|
|
124254
123737
|
import { isDeepStrictEqual } from "node:util";
|
|
124255
|
-
function
|
|
123738
|
+
function isRecord9(value) {
|
|
124256
123739
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
124257
123740
|
}
|
|
124258
123741
|
function expectation(actual, negated = false) {
|
|
@@ -124263,13 +123746,13 @@ function expectation(actual, negated = false) {
|
|
|
124263
123746
|
return value;
|
|
124264
123747
|
}
|
|
124265
123748
|
function readExpectation(value) {
|
|
124266
|
-
if (!
|
|
123749
|
+
if (!isRecord9(value) || value.__neoExpectation !== true) {
|
|
124267
123750
|
throw new NeoTestAssertionError("Matcher receiver is not an expectation.");
|
|
124268
123751
|
}
|
|
124269
123752
|
return value;
|
|
124270
123753
|
}
|
|
124271
123754
|
function readMockHandle(value) {
|
|
124272
|
-
if (!
|
|
123755
|
+
if (!isRecord9(value) || value.__neoMockHandle !== true || typeof value.mockId !== "number") {
|
|
124273
123756
|
throw new NeoTestAssertionError(
|
|
124274
123757
|
"Mock configuration receiver is not a mock handle."
|
|
124275
123758
|
);
|
|
@@ -124380,13 +123863,13 @@ function errorMessage2(error) {
|
|
|
124380
123863
|
return error instanceof Error ? error.message : String(error);
|
|
124381
123864
|
}
|
|
124382
123865
|
function findDelegateTargetMemberId(value) {
|
|
124383
|
-
return
|
|
123866
|
+
return isRecord9(value) && typeof value.memberId === "string" ? value.memberId : null;
|
|
124384
123867
|
}
|
|
124385
123868
|
function sharedEvaluatorBase(rawDocument) {
|
|
124386
123869
|
const cached = SHARED_EVALUATOR_BASES.get(rawDocument);
|
|
124387
123870
|
if (cached !== void 0) return cached;
|
|
124388
123871
|
const document = readDocumentArrays(rawDocument);
|
|
124389
|
-
const constructors = Array.isArray(rawDocument.constructors) ? rawDocument.constructors.filter(
|
|
123872
|
+
const constructors = Array.isArray(rawDocument.constructors) ? rawDocument.constructors.filter(isRecord9) : [];
|
|
124390
123873
|
const runtime = cliEvaluatorRuntime(
|
|
124391
123874
|
{ ...document, constructors },
|
|
124392
123875
|
{ includeValueGraphIndexes: true }
|
|
@@ -124455,7 +123938,7 @@ function preparedHookCandidate(workspace) {
|
|
|
124455
123938
|
const parsed = JSON.parse(
|
|
124456
123939
|
readFileSync16(join15(directory, "candidate.json"), "utf8")
|
|
124457
123940
|
);
|
|
124458
|
-
if (!
|
|
123941
|
+
if (!isRecord9(parsed)) {
|
|
124459
123942
|
throw new NeoTestPreparedCandidateError(
|
|
124460
123943
|
"Configured push hook candidate manifest must be a JSON object."
|
|
124461
123944
|
);
|
|
@@ -124475,7 +123958,7 @@ function preparedHookCandidate(workspace) {
|
|
|
124475
123958
|
"Configured push hook candidate inputs no longer match the workspace."
|
|
124476
123959
|
);
|
|
124477
123960
|
}
|
|
124478
|
-
if (!
|
|
123961
|
+
if (!isRecord9(parsed.document)) {
|
|
124479
123962
|
throw new NeoTestPreparedCandidateError(
|
|
124480
123963
|
"Configured push hook candidate is missing its project document."
|
|
124481
123964
|
);
|
|
@@ -124524,7 +124007,7 @@ function cachedTestCandidate(workspace, inputFingerprint) {
|
|
|
124524
124007
|
try {
|
|
124525
124008
|
const candidatePath = testCandidateCachePath(workspace, inputFingerprint);
|
|
124526
124009
|
const parsed = JSON.parse(readFileSync16(candidatePath, "utf8"));
|
|
124527
|
-
if (!
|
|
124010
|
+
if (!isRecord9(parsed)) return null;
|
|
124528
124011
|
if (parsed.version !== 1) return null;
|
|
124529
124012
|
if (parsed.candidateRevision !== TEST_CANDIDATE_CACHE_REVISION) return null;
|
|
124530
124013
|
if (parsed.cliVersion !== PROJECT_SCHEMA_CONTRACT.cliVersion) return null;
|
|
@@ -124542,7 +124025,7 @@ function cachedTestCandidate(workspace, inputFingerprint) {
|
|
|
124542
124025
|
return null;
|
|
124543
124026
|
}
|
|
124544
124027
|
const document = JSON.parse(documentJson);
|
|
124545
|
-
if (!
|
|
124028
|
+
if (!isRecord9(document)) return null;
|
|
124546
124029
|
return {
|
|
124547
124030
|
document,
|
|
124548
124031
|
sourceHash: parsed.sourceHash,
|
|
@@ -124586,7 +124069,7 @@ function compileSpec(workspace, document, absolutePath, projectCompilationHash2)
|
|
|
124586
124069
|
);
|
|
124587
124070
|
try {
|
|
124588
124071
|
const cached = JSON.parse(readFileSync16(artifactPath, "utf8"));
|
|
124589
|
-
if (
|
|
124072
|
+
if (isRecord9(cached) && cached.version === 1 && cached.compilerRevision === NEOSCRIPT_COMPILER_REVISION && cached.projectCompilationHash === projectCompilationHash2 && cached.sourceHash === sourceHash && isRecord9(cached.action) && typeof cached.artifactSha256 === "string" && createHash11("sha256").update(JSON.stringify(cached.action)).digest("hex") === cached.artifactSha256 && cached.action.compilerRevision === NEOSCRIPT_COMPILER_REVISION && Array.isArray(cached.action.parameters) && Array.isArray(cached.action.instructions) && isRecord9(cached.action.typeInfo)) {
|
|
124590
124073
|
return {
|
|
124591
124074
|
path,
|
|
124592
124075
|
source,
|
|
@@ -124750,7 +124233,7 @@ function portableDelegate(value) {
|
|
|
124750
124233
|
}
|
|
124751
124234
|
}
|
|
124752
124235
|
function callMemberId(value) {
|
|
124753
|
-
if (!
|
|
124236
|
+
if (!isRecord9(value) || value.type !== "callFunction") return null;
|
|
124754
124237
|
return typeof value.memberId === "string" ? value.memberId : null;
|
|
124755
124238
|
}
|
|
124756
124239
|
function assertNoNestedRegistration(value) {
|
|
@@ -124758,7 +124241,7 @@ function assertNoNestedRegistration(value) {
|
|
|
124758
124241
|
for (const entry of value) assertNoNestedRegistration(entry);
|
|
124759
124242
|
return;
|
|
124760
124243
|
}
|
|
124761
|
-
if (!
|
|
124244
|
+
if (!isRecord9(value)) return;
|
|
124762
124245
|
const memberId = callMemberId(value);
|
|
124763
124246
|
if (memberId !== null && REGISTRATION_IDS.has(memberId)) {
|
|
124764
124247
|
throw new NeoTestRegistrationError(
|
|
@@ -124774,8 +124257,8 @@ function compiledDelegateActions(value) {
|
|
|
124774
124257
|
for (const child of entry) visit(child);
|
|
124775
124258
|
return;
|
|
124776
124259
|
}
|
|
124777
|
-
if (!
|
|
124778
|
-
if (
|
|
124260
|
+
if (!isRecord9(entry)) return;
|
|
124261
|
+
if (isRecord9(entry.action) && Array.isArray(entry.action.instructions) && Array.isArray(entry.action.parameters) && isRecord9(entry.action.typeInfo)) {
|
|
124779
124262
|
actions.push(entry.action);
|
|
124780
124263
|
return;
|
|
124781
124264
|
}
|
|
@@ -124786,7 +124269,7 @@ function compiledDelegateActions(value) {
|
|
|
124786
124269
|
}
|
|
124787
124270
|
function validateRegistrationAction(action, allowRegistration) {
|
|
124788
124271
|
for (const instruction of action.instructions) {
|
|
124789
|
-
const record3 =
|
|
124272
|
+
const record3 = isRecord9(instruction) ? instruction : null;
|
|
124790
124273
|
const call = record3?.type === "functionCall" ? record3.call : null;
|
|
124791
124274
|
const memberId = callMemberId(call);
|
|
124792
124275
|
if (memberId !== null && REGISTRATION_IDS.has(memberId)) {
|
|
@@ -124919,8 +124402,8 @@ function mockResponse(environment, mock, selected, call) {
|
|
|
124919
124402
|
};
|
|
124920
124403
|
}
|
|
124921
124404
|
function partialObjectMatch(actual, expected) {
|
|
124922
|
-
if (!
|
|
124923
|
-
if (!
|
|
124405
|
+
if (!isRecord9(expected)) return isDeepStrictEqual(actual, expected);
|
|
124406
|
+
if (!isRecord9(actual)) return false;
|
|
124924
124407
|
return Object.entries(expected).every(
|
|
124925
124408
|
([key, value]) => partialObjectMatch(actual[key], value)
|
|
124926
124409
|
);
|
|
@@ -125112,7 +124595,7 @@ function interceptTestCallCore(environment, call) {
|
|
|
125112
124595
|
const contains2 = typeof actual === "string" ? actual.includes(String(call.args[0])) : Array.isArray(actual) && actual.some((entry) => isDeepStrictEqual(entry, call.args[0]));
|
|
125113
124596
|
assertMatcher(contains2, expectationValue, "toContain", call.args[0]);
|
|
125114
124597
|
} else if (call.memberId === NEO_TEST_IDS.toHaveLength) {
|
|
125115
|
-
const length = typeof actual === "string" || Array.isArray(actual) ? actual.length :
|
|
124598
|
+
const length = typeof actual === "string" || Array.isArray(actual) ? actual.length : isRecord9(actual) ? Object.keys(actual).length : -1;
|
|
125116
124599
|
assertMatcher(
|
|
125117
124600
|
length === call.args[0],
|
|
125118
124601
|
expectationValue,
|
|
@@ -125203,11 +124686,11 @@ function snapshotEnvironmentDocument(environment) {
|
|
|
125203
124686
|
const values = [...baseValues];
|
|
125204
124687
|
const byId = /* @__PURE__ */ new Map();
|
|
125205
124688
|
values.forEach((value, index) => {
|
|
125206
|
-
if (
|
|
124689
|
+
if (isRecord9(value) && typeof value.id === "string")
|
|
125207
124690
|
byId.set(value.id, index);
|
|
125208
124691
|
});
|
|
125209
124692
|
const mergeRow = (row) => {
|
|
125210
|
-
if (!
|
|
124693
|
+
if (!isRecord9(row) || typeof row.id !== "string") return;
|
|
125211
124694
|
const cloned = structuredClone(row);
|
|
125212
124695
|
const index = byId.get(row.id);
|
|
125213
124696
|
if (index === void 0) {
|
|
@@ -125223,7 +124706,7 @@ function snapshotEnvironmentDocument(environment) {
|
|
|
125223
124706
|
if (bindings.size > 0) {
|
|
125224
124707
|
const baseMembers = Array.isArray(snapshot.members) ? snapshot.members : [];
|
|
125225
124708
|
snapshot.members = baseMembers.map((member) => {
|
|
125226
|
-
if (!
|
|
124709
|
+
if (!isRecord9(member) || typeof member.id !== "string" || !bindings.has(member.id)) {
|
|
125227
124710
|
return member;
|
|
125228
124711
|
}
|
|
125229
124712
|
return { ...member, valueId: bindings.get(member.id) ?? null };
|
|
@@ -129634,7 +129117,7 @@ There is no --keep-current: preserving current semantic state defines flatten.
|
|
|
129634
129117
|
async function main() {
|
|
129635
129118
|
const args = parseArgs(process.argv.slice(2));
|
|
129636
129119
|
if (args.command === "--version") {
|
|
129637
|
-
console.log("0.
|
|
129120
|
+
console.log("0.40.0");
|
|
129638
129121
|
return;
|
|
129639
129122
|
}
|
|
129640
129123
|
if (args.command === null || args.command === "help" || args.command === "--help" || args.command === "-h") {
|