@neocompose/cli 0.73.2 → 0.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/neo.mjs
CHANGED
|
@@ -368,27 +368,27 @@ var init_member_subtree_distribution = __esm({
|
|
|
368
368
|
}
|
|
369
369
|
});
|
|
370
370
|
|
|
371
|
-
// node_modules/uuid/dist-node/regex.js
|
|
371
|
+
// ../node_modules/uuid/dist-node/regex.js
|
|
372
372
|
var regex_default;
|
|
373
373
|
var init_regex = __esm({
|
|
374
|
-
"node_modules/uuid/dist-node/regex.js"() {
|
|
374
|
+
"../node_modules/uuid/dist-node/regex.js"() {
|
|
375
375
|
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;
|
|
376
376
|
}
|
|
377
377
|
});
|
|
378
378
|
|
|
379
|
-
// node_modules/uuid/dist-node/validate.js
|
|
379
|
+
// ../node_modules/uuid/dist-node/validate.js
|
|
380
380
|
function validate(uuid) {
|
|
381
381
|
return typeof uuid === "string" && regex_default.test(uuid);
|
|
382
382
|
}
|
|
383
383
|
var validate_default;
|
|
384
384
|
var init_validate = __esm({
|
|
385
|
-
"node_modules/uuid/dist-node/validate.js"() {
|
|
385
|
+
"../node_modules/uuid/dist-node/validate.js"() {
|
|
386
386
|
init_regex();
|
|
387
387
|
validate_default = validate;
|
|
388
388
|
}
|
|
389
389
|
});
|
|
390
390
|
|
|
391
|
-
// node_modules/uuid/dist-node/parse.js
|
|
391
|
+
// ../node_modules/uuid/dist-node/parse.js
|
|
392
392
|
function parse(uuid) {
|
|
393
393
|
if (!validate_default(uuid)) {
|
|
394
394
|
throw TypeError("Invalid UUID");
|
|
@@ -398,19 +398,19 @@ function parse(uuid) {
|
|
|
398
398
|
}
|
|
399
399
|
var parse_default;
|
|
400
400
|
var init_parse = __esm({
|
|
401
|
-
"node_modules/uuid/dist-node/parse.js"() {
|
|
401
|
+
"../node_modules/uuid/dist-node/parse.js"() {
|
|
402
402
|
init_validate();
|
|
403
403
|
parse_default = parse;
|
|
404
404
|
}
|
|
405
405
|
});
|
|
406
406
|
|
|
407
|
-
// node_modules/uuid/dist-node/stringify.js
|
|
407
|
+
// ../node_modules/uuid/dist-node/stringify.js
|
|
408
408
|
function unsafeStringify(arr, offset = 0) {
|
|
409
409
|
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();
|
|
410
410
|
}
|
|
411
411
|
var byteToHex;
|
|
412
412
|
var init_stringify = __esm({
|
|
413
|
-
"node_modules/uuid/dist-node/stringify.js"() {
|
|
413
|
+
"../node_modules/uuid/dist-node/stringify.js"() {
|
|
414
414
|
byteToHex = [];
|
|
415
415
|
for (let i2 = 0; i2 < 256; ++i2) {
|
|
416
416
|
byteToHex.push((i2 + 256).toString(16).slice(1));
|
|
@@ -418,18 +418,18 @@ var init_stringify = __esm({
|
|
|
418
418
|
}
|
|
419
419
|
});
|
|
420
420
|
|
|
421
|
-
// node_modules/uuid/dist-node/rng.js
|
|
421
|
+
// ../node_modules/uuid/dist-node/rng.js
|
|
422
422
|
function rng() {
|
|
423
423
|
return crypto.getRandomValues(rnds8);
|
|
424
424
|
}
|
|
425
425
|
var rnds8;
|
|
426
426
|
var init_rng = __esm({
|
|
427
|
-
"node_modules/uuid/dist-node/rng.js"() {
|
|
427
|
+
"../node_modules/uuid/dist-node/rng.js"() {
|
|
428
428
|
rnds8 = new Uint8Array(16);
|
|
429
429
|
}
|
|
430
430
|
});
|
|
431
431
|
|
|
432
|
-
// node_modules/uuid/dist-node/v35.js
|
|
432
|
+
// ../node_modules/uuid/dist-node/v35.js
|
|
433
433
|
function stringToBytes(str) {
|
|
434
434
|
str = unescape(encodeURIComponent(str));
|
|
435
435
|
const bytes = new Uint8Array(str.length);
|
|
@@ -467,7 +467,7 @@ function v35(version, hash, value, namespace, buf, offset) {
|
|
|
467
467
|
}
|
|
468
468
|
var DNS, URL2;
|
|
469
469
|
var init_v35 = __esm({
|
|
470
|
-
"node_modules/uuid/dist-node/v35.js"() {
|
|
470
|
+
"../node_modules/uuid/dist-node/v35.js"() {
|
|
471
471
|
init_parse();
|
|
472
472
|
init_stringify();
|
|
473
473
|
DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
|
|
@@ -475,7 +475,7 @@ var init_v35 = __esm({
|
|
|
475
475
|
}
|
|
476
476
|
});
|
|
477
477
|
|
|
478
|
-
// node_modules/uuid/dist-node/v4.js
|
|
478
|
+
// ../node_modules/uuid/dist-node/v4.js
|
|
479
479
|
function v4(options, buf, offset) {
|
|
480
480
|
if (!buf && !options && crypto.randomUUID) {
|
|
481
481
|
return crypto.randomUUID();
|
|
@@ -504,14 +504,14 @@ function _v4(options, buf, offset) {
|
|
|
504
504
|
}
|
|
505
505
|
var v4_default;
|
|
506
506
|
var init_v4 = __esm({
|
|
507
|
-
"node_modules/uuid/dist-node/v4.js"() {
|
|
507
|
+
"../node_modules/uuid/dist-node/v4.js"() {
|
|
508
508
|
init_rng();
|
|
509
509
|
init_stringify();
|
|
510
510
|
v4_default = v4;
|
|
511
511
|
}
|
|
512
512
|
});
|
|
513
513
|
|
|
514
|
-
// node_modules/uuid/dist-node/sha1.js
|
|
514
|
+
// ../node_modules/uuid/dist-node/sha1.js
|
|
515
515
|
import { createHash } from "node:crypto";
|
|
516
516
|
function sha1(bytes) {
|
|
517
517
|
if (Array.isArray(bytes)) {
|
|
@@ -523,18 +523,18 @@ function sha1(bytes) {
|
|
|
523
523
|
}
|
|
524
524
|
var sha1_default;
|
|
525
525
|
var init_sha1 = __esm({
|
|
526
|
-
"node_modules/uuid/dist-node/sha1.js"() {
|
|
526
|
+
"../node_modules/uuid/dist-node/sha1.js"() {
|
|
527
527
|
sha1_default = sha1;
|
|
528
528
|
}
|
|
529
529
|
});
|
|
530
530
|
|
|
531
|
-
// node_modules/uuid/dist-node/v5.js
|
|
531
|
+
// ../node_modules/uuid/dist-node/v5.js
|
|
532
532
|
function v5(value, namespace, buf, offset) {
|
|
533
533
|
return v35(80, sha1_default, value, namespace, buf, offset);
|
|
534
534
|
}
|
|
535
535
|
var v5_default;
|
|
536
536
|
var init_v5 = __esm({
|
|
537
|
-
"node_modules/uuid/dist-node/v5.js"() {
|
|
537
|
+
"../node_modules/uuid/dist-node/v5.js"() {
|
|
538
538
|
init_sha1();
|
|
539
539
|
init_v35();
|
|
540
540
|
v5.DNS = DNS;
|
|
@@ -543,9 +543,9 @@ var init_v5 = __esm({
|
|
|
543
543
|
}
|
|
544
544
|
});
|
|
545
545
|
|
|
546
|
-
// node_modules/uuid/dist-node/index.js
|
|
546
|
+
// ../node_modules/uuid/dist-node/index.js
|
|
547
547
|
var init_dist_node = __esm({
|
|
548
|
-
"node_modules/uuid/dist-node/index.js"() {
|
|
548
|
+
"../node_modules/uuid/dist-node/index.js"() {
|
|
549
549
|
init_parse();
|
|
550
550
|
init_v4();
|
|
551
551
|
init_v5();
|
|
@@ -28491,6 +28491,15 @@ function inspectListenerAnnotation(annotation2, parameters) {
|
|
|
28491
28491
|
return;
|
|
28492
28492
|
}
|
|
28493
28493
|
const parameter4 = parameters.byName.get(name);
|
|
28494
|
+
if (!parameter4 && parameters.getters.has(name)) {
|
|
28495
|
+
errors.push(
|
|
28496
|
+
new CompileError(
|
|
28497
|
+
`'${name}' is a getter. Getter listeners can't be authored. Subscribe with '+=' from a function.`,
|
|
28498
|
+
expression.pos
|
|
28499
|
+
)
|
|
28500
|
+
);
|
|
28501
|
+
return;
|
|
28502
|
+
}
|
|
28494
28503
|
if (!parameter4) {
|
|
28495
28504
|
errors.push(
|
|
28496
28505
|
new CompileError(
|
|
@@ -28534,7 +28543,10 @@ function createListenerAnnotationProvider(project, context = {}) {
|
|
|
28534
28543
|
if (cached) return cached;
|
|
28535
28544
|
const parameters = [];
|
|
28536
28545
|
const byName = /* @__PURE__ */ new Map();
|
|
28546
|
+
const getters = /* @__PURE__ */ new Set();
|
|
28537
28547
|
for (const symbol of declaration.members) {
|
|
28548
|
+
if (symbol.kind === "property" && symbol.computed === true && symbol.static !== true)
|
|
28549
|
+
getters.add(symbol.name);
|
|
28538
28550
|
if (!isChangeListenerSymbol(symbol)) continue;
|
|
28539
28551
|
if (memberAccessFailure({ project, context, owner: declaration, symbol }))
|
|
28540
28552
|
continue;
|
|
@@ -28558,7 +28570,8 @@ function createListenerAnnotationProvider(project, context = {}) {
|
|
|
28558
28570
|
const result = {
|
|
28559
28571
|
namedOnly: true,
|
|
28560
28572
|
parameters,
|
|
28561
|
-
byName
|
|
28573
|
+
byName,
|
|
28574
|
+
getters
|
|
28562
28575
|
};
|
|
28563
28576
|
cache.set(key, result);
|
|
28564
28577
|
return result;
|
|
@@ -32778,9 +32791,26 @@ var init_strict_resolver = __esm({
|
|
|
32778
32791
|
"OnChanged requires a declared member, not a local variable.",
|
|
32779
32792
|
statement.pos
|
|
32780
32793
|
);
|
|
32794
|
+
if (observed.pointer.type === "staticMember" /* StaticMember */ || observed.pointer.type === "callGetter" /* CallGetter */ && observed.pointer.receiver.kind === "static") {
|
|
32795
|
+
const access = statement.target.receiver;
|
|
32796
|
+
const name = access.kind === "member" && access.receiver.kind === "ident" ? `${access.receiver.name}.${member.name}` : member.name;
|
|
32797
|
+
throw new CompileError(
|
|
32798
|
+
`OnChanged requires an instance member. '${name}' is static.`,
|
|
32799
|
+
statement.pos
|
|
32800
|
+
);
|
|
32801
|
+
}
|
|
32802
|
+
if (observed.pointer.type === "callGetter" /* CallGetter */)
|
|
32803
|
+
return this.resolveGetterSubscription(
|
|
32804
|
+
statement,
|
|
32805
|
+
statement.target.receiver,
|
|
32806
|
+
observed,
|
|
32807
|
+
observed.pointer,
|
|
32808
|
+
member,
|
|
32809
|
+
scope
|
|
32810
|
+
);
|
|
32781
32811
|
if (observed.pointer.type !== "keyOf" /* KeyOf */)
|
|
32782
32812
|
throw new CompileError(
|
|
32783
|
-
"OnChanged requires a
|
|
32813
|
+
"OnChanged requires a declared member slot.",
|
|
32784
32814
|
statement.pos
|
|
32785
32815
|
);
|
|
32786
32816
|
if (!observed.pointer.memberId)
|
|
@@ -32854,6 +32884,60 @@ var init_strict_resolver = __esm({
|
|
|
32854
32884
|
listener
|
|
32855
32885
|
};
|
|
32856
32886
|
}
|
|
32887
|
+
/**
|
|
32888
|
+
* P106. A getter subscription lives only in the running client's memory:
|
|
32889
|
+
* nothing persists it, so construction replay would silently drop one.
|
|
32890
|
+
*/
|
|
32891
|
+
resolveGetterSubscription(statement, getterRead, observed, pointer, member, scope) {
|
|
32892
|
+
if (pointer.dispatch === "base") {
|
|
32893
|
+
throw new CompileError(
|
|
32894
|
+
`OnChanged can't observe a base getter. Subscribe to '${member.name}' on the instance.`,
|
|
32895
|
+
statement.pos
|
|
32896
|
+
);
|
|
32897
|
+
}
|
|
32898
|
+
if (pointer.receiver.kind !== "instance") {
|
|
32899
|
+
throw new CompileError(
|
|
32900
|
+
`OnChanged requires an instance receiver for getter '${member.name}'.`,
|
|
32901
|
+
statement.pos
|
|
32902
|
+
);
|
|
32903
|
+
}
|
|
32904
|
+
const kind = this.context.kind;
|
|
32905
|
+
if (isNeoScriptConstructionDocumentKind(kind) || kind === "migration") {
|
|
32906
|
+
throw new CompileError(
|
|
32907
|
+
`A getter subscription lives only for the play session, so ${dialogueBodyKindLabel(kind)} can't make one. Subscribe from a function.`,
|
|
32908
|
+
statement.pos
|
|
32909
|
+
);
|
|
32910
|
+
}
|
|
32911
|
+
if (!statement.value) {
|
|
32912
|
+
throw new CompileError(
|
|
32913
|
+
"OnChanged subscription requires a handler member.",
|
|
32914
|
+
statement.pos
|
|
32915
|
+
);
|
|
32916
|
+
}
|
|
32917
|
+
const getterType = this.assignmentStorageType(
|
|
32918
|
+
getterRead,
|
|
32919
|
+
observed,
|
|
32920
|
+
null,
|
|
32921
|
+
scope
|
|
32922
|
+
);
|
|
32923
|
+
const listener = this.resolveActionListener(
|
|
32924
|
+
statement.value,
|
|
32925
|
+
{ kind: "action", parameterTypes: [getterType] },
|
|
32926
|
+
scope,
|
|
32927
|
+
true,
|
|
32928
|
+
true
|
|
32929
|
+
);
|
|
32930
|
+
return {
|
|
32931
|
+
type: statement.op === "+=" ? "addChangeListener" /* AddChangeListener */ : "removeChangeListener" /* RemoveChangeListener */,
|
|
32932
|
+
target: {
|
|
32933
|
+
owner: pointer.receiver.pointer,
|
|
32934
|
+
memberId: member.canonicalMemberId ?? pointer.memberId,
|
|
32935
|
+
typeInfo: toWireType(getterType, this.project),
|
|
32936
|
+
writability: "session" /* Session */
|
|
32937
|
+
},
|
|
32938
|
+
listener
|
|
32939
|
+
};
|
|
32940
|
+
}
|
|
32857
32941
|
/**
|
|
32858
32942
|
* P62 §3.2. `+=` / `-=` on an NSAction member are subscription operators,
|
|
32859
32943
|
* not arithmetic: the listener set *is* the member's value, so each one
|
|
@@ -51689,7 +51773,7 @@ var init_registry = __esm({
|
|
|
51689
51773
|
"../packages/manifest/schema-contract/registry.mjs"() {
|
|
51690
51774
|
"use strict";
|
|
51691
51775
|
PROJECT_SCHEMA_CONTRACT = Object.freeze({
|
|
51692
|
-
cliVersion: "0.
|
|
51776
|
+
cliVersion: "0.74.0",
|
|
51693
51777
|
projectFileUploadBatchSize: 32,
|
|
51694
51778
|
documentRecords: {
|
|
51695
51779
|
member: {
|
|
@@ -54292,7 +54376,7 @@ var init_document_contracts2 = __esm({
|
|
|
54292
54376
|
}
|
|
54293
54377
|
});
|
|
54294
54378
|
|
|
54295
|
-
// node_modules/valibot/dist/index.mjs
|
|
54379
|
+
// ../node_modules/valibot/dist/index.mjs
|
|
54296
54380
|
// @__NO_SIDE_EFFECTS__
|
|
54297
54381
|
function getGlobalConfig(config$1) {
|
|
54298
54382
|
if (!config$1 && !store$4) return DEFAULT_CONFIG;
|
|
@@ -55038,11 +55122,6 @@ function variant(key, options, message$1) {
|
|
|
55038
55122
|
}
|
|
55039
55123
|
});
|
|
55040
55124
|
}
|
|
55041
|
-
function parse2(schema, input, config$1) {
|
|
55042
|
-
const dataset = schema["~run"]({ value: input }, /* @__PURE__ */ getGlobalConfig(config$1));
|
|
55043
|
-
if (dataset.issues) throw new ValiError(dataset.issues);
|
|
55044
|
-
return dataset.value;
|
|
55045
|
-
}
|
|
55046
55125
|
// @__NO_SIDE_EFFECTS__
|
|
55047
55126
|
function pipe(...pipe$1) {
|
|
55048
55127
|
return _standardSchema({
|
|
@@ -55070,27 +55149,15 @@ function safeParse(schema, input, config$1) {
|
|
|
55070
55149
|
issues: dataset.issues
|
|
55071
55150
|
};
|
|
55072
55151
|
}
|
|
55073
|
-
var store$4, DEFAULT_CONFIG, store$3, store$2, store$1,
|
|
55152
|
+
var store$4, DEFAULT_CONFIG, store$3, store$2, store$1, EMOJI_REGEX, ABORT_EARLY_CONFIG;
|
|
55074
55153
|
var init_dist = __esm({
|
|
55075
|
-
"node_modules/valibot/dist/index.mjs"() {
|
|
55154
|
+
"../node_modules/valibot/dist/index.mjs"() {
|
|
55076
55155
|
DEFAULT_CONFIG = {
|
|
55077
55156
|
lang: void 0,
|
|
55078
55157
|
message: void 0,
|
|
55079
55158
|
abortEarly: void 0,
|
|
55080
55159
|
abortPipeEarly: void 0
|
|
55081
55160
|
};
|
|
55082
|
-
ValiError = class extends Error {
|
|
55083
|
-
/**
|
|
55084
|
-
* Creates a Valibot error with useful information.
|
|
55085
|
-
*
|
|
55086
|
-
* @param issues The error issues.
|
|
55087
|
-
*/
|
|
55088
|
-
constructor(issues) {
|
|
55089
|
-
super(issues[0].message);
|
|
55090
|
-
this.name = "ValiError";
|
|
55091
|
-
this.issues = issues;
|
|
55092
|
-
}
|
|
55093
|
-
};
|
|
55094
55161
|
EMOJI_REGEX = new RegExp("^(?:[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|(?![\\p{Emoji_Modifier_Base}\\u{1F1E6}-\\u{1F1FF}])\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|(?![\\p{Emoji_Modifier_Base}\\u{1F1E6}-\\u{1F1FF}])\\p{Emoji_Presentation}))*)+$", "u");
|
|
55095
55162
|
ABORT_EARLY_CONFIG = { abortEarly: true };
|
|
55096
55163
|
}
|
|
@@ -55890,6 +55957,47 @@ var init_schema_member = __esm({
|
|
|
55890
55957
|
}
|
|
55891
55958
|
});
|
|
55892
55959
|
|
|
55960
|
+
// node_modules/valibot/dist/index.mjs
|
|
55961
|
+
// @__NO_SIDE_EFFECTS__
|
|
55962
|
+
function getGlobalConfig2(config$1) {
|
|
55963
|
+
if (!config$1 && !store$42) return DEFAULT_CONFIG2;
|
|
55964
|
+
return {
|
|
55965
|
+
lang: config$1?.lang ?? store$42?.lang,
|
|
55966
|
+
message: config$1?.message,
|
|
55967
|
+
abortEarly: config$1?.abortEarly ?? store$42?.abortEarly,
|
|
55968
|
+
abortPipeEarly: config$1?.abortPipeEarly ?? store$42?.abortPipeEarly
|
|
55969
|
+
};
|
|
55970
|
+
}
|
|
55971
|
+
function parse2(schema, input, config$1) {
|
|
55972
|
+
const dataset = schema["~run"]({ value: input }, /* @__PURE__ */ getGlobalConfig2(config$1));
|
|
55973
|
+
if (dataset.issues) throw new ValiError(dataset.issues);
|
|
55974
|
+
return dataset.value;
|
|
55975
|
+
}
|
|
55976
|
+
var store$42, DEFAULT_CONFIG2, ValiError, EMOJI_REGEX2;
|
|
55977
|
+
var init_dist2 = __esm({
|
|
55978
|
+
"node_modules/valibot/dist/index.mjs"() {
|
|
55979
|
+
DEFAULT_CONFIG2 = {
|
|
55980
|
+
lang: void 0,
|
|
55981
|
+
message: void 0,
|
|
55982
|
+
abortEarly: void 0,
|
|
55983
|
+
abortPipeEarly: void 0
|
|
55984
|
+
};
|
|
55985
|
+
ValiError = class extends Error {
|
|
55986
|
+
/**
|
|
55987
|
+
* Creates a Valibot error with useful information.
|
|
55988
|
+
*
|
|
55989
|
+
* @param issues The error issues.
|
|
55990
|
+
*/
|
|
55991
|
+
constructor(issues) {
|
|
55992
|
+
super(issues[0].message);
|
|
55993
|
+
this.name = "ValiError";
|
|
55994
|
+
this.issues = issues;
|
|
55995
|
+
}
|
|
55996
|
+
};
|
|
55997
|
+
EMOJI_REGEX2 = new RegExp("^(?:[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|(?![\\p{Emoji_Modifier_Base}\\u{1F1E6}-\\u{1F1FF}])\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|(?![\\p{Emoji_Modifier_Base}\\u{1F1E6}-\\u{1F1FF}])\\p{Emoji_Presentation}))*)+$", "u");
|
|
55998
|
+
}
|
|
55999
|
+
});
|
|
56000
|
+
|
|
55893
56001
|
// src/project-manifest/record-adapters/codecs.ts
|
|
55894
56002
|
function inferMemberOwners(classes, members) {
|
|
55895
56003
|
const owners = /* @__PURE__ */ new Map();
|
|
@@ -57385,7 +57493,7 @@ var init_codecs = __esm({
|
|
|
57385
57493
|
"use strict";
|
|
57386
57494
|
init_document_contracts2();
|
|
57387
57495
|
init_schema_member();
|
|
57388
|
-
|
|
57496
|
+
init_dist2();
|
|
57389
57497
|
init_docs_text2();
|
|
57390
57498
|
MEMBER_KIND = {
|
|
57391
57499
|
Null: 0,
|
|
@@ -79618,6 +79726,151 @@ var init_world_grid_query = __esm({
|
|
|
79618
79726
|
}
|
|
79619
79727
|
});
|
|
79620
79728
|
|
|
79729
|
+
// ../src/runtime/neoscript/getter-subscriptions.ts
|
|
79730
|
+
function* readKeys(reads) {
|
|
79731
|
+
yield* reads.valueIds;
|
|
79732
|
+
yield* reads.containerIds;
|
|
79733
|
+
yield* reads.containerEntryReadIds;
|
|
79734
|
+
for (const id2 of reads.staticMemberIds) yield staticReadKey(id2);
|
|
79735
|
+
}
|
|
79736
|
+
var NeoScriptGetterSubscription, NO_SUBSCRIPTIONS, staticReadKey, NeoScriptGetterSubscriptions;
|
|
79737
|
+
var init_getter_subscriptions = __esm({
|
|
79738
|
+
"../src/runtime/neoscript/getter-subscriptions.ts"() {
|
|
79739
|
+
"use strict";
|
|
79740
|
+
init_initializer_context();
|
|
79741
|
+
NeoScriptGetterSubscription = class {
|
|
79742
|
+
constructor(rowId, getterId, classId) {
|
|
79743
|
+
this.rowId = rowId;
|
|
79744
|
+
this.getterId = getterId;
|
|
79745
|
+
this.classId = classId;
|
|
79746
|
+
}
|
|
79747
|
+
rowId;
|
|
79748
|
+
getterId;
|
|
79749
|
+
classId;
|
|
79750
|
+
targets = [];
|
|
79751
|
+
reads = new InitializerReadSet();
|
|
79752
|
+
queued = false;
|
|
79753
|
+
/** Queued only to arm: its first read calls no handler. */
|
|
79754
|
+
arming = true;
|
|
79755
|
+
/** Its handlers are running. */
|
|
79756
|
+
handling = false;
|
|
79757
|
+
};
|
|
79758
|
+
NO_SUBSCRIPTIONS = [];
|
|
79759
|
+
staticReadKey = (memberId) => `static:${memberId}`;
|
|
79760
|
+
NeoScriptGetterSubscriptions = class _NeoScriptGetterSubscriptions {
|
|
79761
|
+
byRow = /* @__PURE__ */ new Map();
|
|
79762
|
+
byRead = /* @__PURE__ */ new Map();
|
|
79763
|
+
/** Reads no row id names, such as corpus or world queries, hear every write. */
|
|
79764
|
+
readingEverything = /* @__PURE__ */ new Set();
|
|
79765
|
+
pending = [];
|
|
79766
|
+
get empty() {
|
|
79767
|
+
return this.byRow.size === 0;
|
|
79768
|
+
}
|
|
79769
|
+
get(rowId, getterId) {
|
|
79770
|
+
return this.byRow.get(rowId)?.get(getterId);
|
|
79771
|
+
}
|
|
79772
|
+
add(subscription) {
|
|
79773
|
+
this.register(subscription);
|
|
79774
|
+
this.queue(subscription);
|
|
79775
|
+
}
|
|
79776
|
+
drop(subscription) {
|
|
79777
|
+
const getters = this.byRow.get(subscription.rowId);
|
|
79778
|
+
if (getters?.get(subscription.getterId) !== subscription) return;
|
|
79779
|
+
getters.delete(subscription.getterId);
|
|
79780
|
+
if (getters.size === 0) this.byRow.delete(subscription.rowId);
|
|
79781
|
+
this.unindex(subscription);
|
|
79782
|
+
}
|
|
79783
|
+
noteValueWrite(rowId) {
|
|
79784
|
+
this.noteRead(rowId);
|
|
79785
|
+
}
|
|
79786
|
+
noteStaticBinding(memberId) {
|
|
79787
|
+
this.noteRead(staticReadKey(memberId));
|
|
79788
|
+
}
|
|
79789
|
+
/** Replace what the subscription's last read touched. */
|
|
79790
|
+
setReads(subscription, reads) {
|
|
79791
|
+
this.unindex(subscription);
|
|
79792
|
+
subscription.reads = reads;
|
|
79793
|
+
if (this.get(subscription.rowId, subscription.getterId) !== subscription)
|
|
79794
|
+
return;
|
|
79795
|
+
if (reads.corpusReadReasons.size > 0 || reads.worldQueries.size > 0)
|
|
79796
|
+
this.readingEverything.add(subscription);
|
|
79797
|
+
for (const key of readKeys(reads)) {
|
|
79798
|
+
let subscriptions = this.byRead.get(key);
|
|
79799
|
+
if (subscriptions === void 0) {
|
|
79800
|
+
subscriptions = /* @__PURE__ */ new Set();
|
|
79801
|
+
this.byRead.set(key, subscriptions);
|
|
79802
|
+
}
|
|
79803
|
+
subscriptions.add(subscription);
|
|
79804
|
+
}
|
|
79805
|
+
}
|
|
79806
|
+
takePending() {
|
|
79807
|
+
if (this.pending.length === 0) return NO_SUBSCRIPTIONS;
|
|
79808
|
+
const pending = this.pending;
|
|
79809
|
+
this.pending = [];
|
|
79810
|
+
return pending;
|
|
79811
|
+
}
|
|
79812
|
+
/** A throw skipped `drained` from `next` on. They stay queued, so none goes deaf. */
|
|
79813
|
+
requeue(drained, next) {
|
|
79814
|
+
for (let index = next; index < drained.length; index += 1)
|
|
79815
|
+
this.pending.push(drained[index]);
|
|
79816
|
+
}
|
|
79817
|
+
/** A copy for a fresh runtime over the same rows, armed exactly as these are. */
|
|
79818
|
+
clone() {
|
|
79819
|
+
const cloned = new _NeoScriptGetterSubscriptions();
|
|
79820
|
+
const copies = /* @__PURE__ */ new Map();
|
|
79821
|
+
for (const getters of this.byRow.values()) {
|
|
79822
|
+
for (const source of getters.values()) {
|
|
79823
|
+
const copy = new NeoScriptGetterSubscription(
|
|
79824
|
+
source.rowId,
|
|
79825
|
+
source.getterId,
|
|
79826
|
+
source.classId
|
|
79827
|
+
);
|
|
79828
|
+
copy.targets.push(...source.targets);
|
|
79829
|
+
copy.arming = source.arming;
|
|
79830
|
+
copies.set(source, copy);
|
|
79831
|
+
cloned.register(copy);
|
|
79832
|
+
cloned.setReads(copy, source.reads);
|
|
79833
|
+
}
|
|
79834
|
+
}
|
|
79835
|
+
for (const source of this.pending) {
|
|
79836
|
+
const copy = copies.get(source);
|
|
79837
|
+
if (copy !== void 0) cloned.queue(copy);
|
|
79838
|
+
}
|
|
79839
|
+
return cloned;
|
|
79840
|
+
}
|
|
79841
|
+
register(subscription) {
|
|
79842
|
+
let getters = this.byRow.get(subscription.rowId);
|
|
79843
|
+
if (getters === void 0) {
|
|
79844
|
+
getters = /* @__PURE__ */ new Map();
|
|
79845
|
+
this.byRow.set(subscription.rowId, getters);
|
|
79846
|
+
}
|
|
79847
|
+
getters.set(subscription.getterId, subscription);
|
|
79848
|
+
}
|
|
79849
|
+
queue(subscription) {
|
|
79850
|
+
if (subscription.queued) return;
|
|
79851
|
+
subscription.queued = true;
|
|
79852
|
+
this.pending.push(subscription);
|
|
79853
|
+
}
|
|
79854
|
+
noteRead(key) {
|
|
79855
|
+
const subscriptions = this.byRead.get(key);
|
|
79856
|
+
if (subscriptions !== void 0)
|
|
79857
|
+
for (const subscription of subscriptions) this.queue(subscription);
|
|
79858
|
+
for (const subscription of this.readingEverything)
|
|
79859
|
+
if (!subscription.handling) this.queue(subscription);
|
|
79860
|
+
}
|
|
79861
|
+
unindex(subscription) {
|
|
79862
|
+
this.readingEverything.delete(subscription);
|
|
79863
|
+
for (const key of readKeys(subscription.reads)) {
|
|
79864
|
+
const subscriptions = this.byRead.get(key);
|
|
79865
|
+
if (subscriptions === void 0) continue;
|
|
79866
|
+
subscriptions.delete(subscription);
|
|
79867
|
+
if (subscriptions.size === 0) this.byRead.delete(key);
|
|
79868
|
+
}
|
|
79869
|
+
}
|
|
79870
|
+
};
|
|
79871
|
+
}
|
|
79872
|
+
});
|
|
79873
|
+
|
|
79621
79874
|
// ../src/models/decimal/decimal-math.ts
|
|
79622
79875
|
function pow10(exponent) {
|
|
79623
79876
|
return TEN ** BigInt(exponent);
|
|
@@ -80115,6 +80368,7 @@ function evalMemberById(vm, id2) {
|
|
|
80115
80368
|
return vm.members.find((a) => a.id === id2) ?? null;
|
|
80116
80369
|
}
|
|
80117
80370
|
function evalValueById(ctx, id2, runtimeValues, overlayValues) {
|
|
80371
|
+
ctx.__getterReads?.add(id2);
|
|
80118
80372
|
if (ctx.__removedValueIds?.has(id2)) {
|
|
80119
80373
|
ctx.valueDependencies?.add(id2);
|
|
80120
80374
|
return null;
|
|
@@ -80787,8 +81041,13 @@ function bindThisValue(ctx, thisValue) {
|
|
|
80787
81041
|
const rowId = thisValue === ctx.thisValue ? ctx.thisValueRowId : trackedRowForValueReference(thisValue, ctx)?.id;
|
|
80788
81042
|
return { ...ctx, thisValue, thisValueRowId: rowId };
|
|
80789
81043
|
}
|
|
81044
|
+
function observeValueWrite(ctx, row) {
|
|
81045
|
+
ctx.beforeValueWrite?.(row);
|
|
81046
|
+
ctx.__getterSubscriptions?.noteValueWrite(row.id);
|
|
81047
|
+
}
|
|
80790
81048
|
function assertStoredReplayMutableValue(value, ctx, label, key) {
|
|
80791
|
-
|
|
81049
|
+
const observesWrites = ctx.beforeValueWrite !== void 0 || ctx.__getterSubscriptions?.empty === false;
|
|
81050
|
+
if (ctx.storedConstructionReplay !== true && !ctx.assertValueWritable && !observesWrites)
|
|
80792
81051
|
return;
|
|
80793
81052
|
let rowId = findKnownRowIdByValueReference(value, ctx);
|
|
80794
81053
|
if (rowId === null) return;
|
|
@@ -80807,7 +81066,7 @@ function assertStoredReplayMutableValue(value, ctx, label, key) {
|
|
|
80807
81066
|
);
|
|
80808
81067
|
if (ctx.__runtimeSessionValues?.has(rowId) !== true)
|
|
80809
81068
|
ctx.assertValueWritable?.(rowId);
|
|
80810
|
-
if (row) ctx
|
|
81069
|
+
if (row) observeValueWrite(ctx, row);
|
|
80811
81070
|
if (ctx.__runtimeSessionValues?.has(rowId) === true) return;
|
|
80812
81071
|
if (ctx.storedConstructionReplay !== true) return;
|
|
80813
81072
|
throw new NSGetterRuntimeError(
|
|
@@ -81390,10 +81649,14 @@ function inspectNeoScriptValueReference(ctx, value, collection, index) {
|
|
|
81390
81649
|
const row = readNeoScriptRuntimeRow(ctx, id2);
|
|
81391
81650
|
return row === null ? null : { row, member: memberForValueRow(row, ctx) };
|
|
81392
81651
|
}
|
|
81652
|
+
function getterSubscriptionsFor(ctx) {
|
|
81653
|
+
return ctx.getterDispatch === "afterEntryStatement" /* AfterEntryStatement */ ? new NeoScriptGetterSubscriptions() : void 0;
|
|
81654
|
+
}
|
|
81393
81655
|
function withEvaluationRuntime(ctx, writes) {
|
|
81394
81656
|
if (ctx.__runtimeSessionValues !== void 0 && ctx.__executionState !== void 0 && ctx.__valueOverlay !== void 0) {
|
|
81395
81657
|
ctx.__unorderedListProjections ??= createUnorderedListProjectionCache();
|
|
81396
81658
|
ctx.__runtimeClassOverrides ??= /* @__PURE__ */ new Map();
|
|
81659
|
+
ctx.__getterSubscriptions ??= getterSubscriptionsFor(ctx);
|
|
81397
81660
|
return ctx;
|
|
81398
81661
|
}
|
|
81399
81662
|
const overlay = ctx.__valueOverlay ?? (ctx.storedConstructionReplay === true ? /* @__PURE__ */ new Map() : buildValueOverlay(ctx.vm));
|
|
@@ -81418,6 +81681,7 @@ function withEvaluationRuntime(ctx, writes) {
|
|
|
81418
81681
|
trigger: remap(ctx.dialogueContext.trigger)
|
|
81419
81682
|
},
|
|
81420
81683
|
__runtimeSessionValues: runtimeSessionValues,
|
|
81684
|
+
__getterSubscriptions: ctx.__getterSubscriptions ?? getterSubscriptionsFor(ctx),
|
|
81421
81685
|
__copiedChangeListeners: ctx.__copiedChangeListeners ?? /* @__PURE__ */ new Map(),
|
|
81422
81686
|
__runtimeClassOverrides: ctx.__runtimeClassOverrides ?? /* @__PURE__ */ new Map(),
|
|
81423
81687
|
__saveStaticBindings: ctx.__saveStaticBindings ?? staticBindingMap(ctx.saveStaticBindings),
|
|
@@ -82308,6 +82572,7 @@ function validateTryInstruction(instruction) {
|
|
|
82308
82572
|
function evalBody(body, scope, ctx, options, preparedFrame) {
|
|
82309
82573
|
const state = ctx.__executionState;
|
|
82310
82574
|
if (!state) return evalInstructions(body.instructions, scope, ctx, options);
|
|
82575
|
+
const hostBody = state.frames.length === 0 && ctx.__getterSubscriptions !== void 0;
|
|
82311
82576
|
state.frames.push(
|
|
82312
82577
|
preparedFrame ?? {
|
|
82313
82578
|
name: body.source?.name ?? "<body>",
|
|
@@ -82316,7 +82581,14 @@ function evalBody(body, scope, ctx, options, preparedFrame) {
|
|
|
82316
82581
|
}
|
|
82317
82582
|
);
|
|
82318
82583
|
try {
|
|
82319
|
-
|
|
82584
|
+
if (!hostBody)
|
|
82585
|
+
return evalInstructions(body.instructions, scope, ctx, options);
|
|
82586
|
+
const result = evalInstructions(body.instructions, scope, ctx, {
|
|
82587
|
+
...options,
|
|
82588
|
+
dispatchesGetterChanges: true
|
|
82589
|
+
});
|
|
82590
|
+
dispatchGetterSubscriptions(ctx);
|
|
82591
|
+
return result;
|
|
82320
82592
|
} catch (error) {
|
|
82321
82593
|
attachNeoScriptTrace(error, state);
|
|
82322
82594
|
throw error;
|
|
@@ -82695,6 +82967,8 @@ function evalInstructions(instructions, scope, ctx, options) {
|
|
|
82695
82967
|
return { kind: "continue" };
|
|
82696
82968
|
}
|
|
82697
82969
|
void touchUnknown(ins);
|
|
82970
|
+
if (options.dispatchesGetterChanges === true)
|
|
82971
|
+
dispatchGetterSubscriptions(ctx);
|
|
82698
82972
|
} catch (error) {
|
|
82699
82973
|
positionNeoScriptFrame(ctx, ins.source);
|
|
82700
82974
|
if (ctx.__executionState)
|
|
@@ -82778,6 +83052,30 @@ function resolveNeoScriptChangeListenerSlot(ownerId, memberId, ctx) {
|
|
|
82778
83052
|
typeInfo: changeListenerObservedType(raw, member, env, ctx)
|
|
82779
83053
|
};
|
|
82780
83054
|
}
|
|
83055
|
+
function resolveNeoScriptGetterListenerSlot(ownerId, memberId, ctx) {
|
|
83056
|
+
const owner = evalValueById(
|
|
83057
|
+
ctx,
|
|
83058
|
+
ownerId,
|
|
83059
|
+
ctx.__runtimeSessionValues,
|
|
83060
|
+
ctx.__valueOverlay
|
|
83061
|
+
);
|
|
83062
|
+
if (owner === null || owner.value === null) return null;
|
|
83063
|
+
const entry = changeListenerMemberOnOwner(owner, memberId, ctx);
|
|
83064
|
+
if (entry === void 0) return null;
|
|
83065
|
+
const member = evalMemberById(ctx.vm, entry.memberId);
|
|
83066
|
+
if (member === null || !isMemberNSProperty(member)) return null;
|
|
83067
|
+
if (isStaticMember(member)) return null;
|
|
83068
|
+
const env = runtimeGenericEnvForValueRow(owner, ctx, /* @__PURE__ */ new Set());
|
|
83069
|
+
const typeInfo = substituteRuntimeTypeInfo(member.returnTypeInfo, env, ctx);
|
|
83070
|
+
if (typeInfo.type === NS_TYPE_VOID) return null;
|
|
83071
|
+
return {
|
|
83072
|
+
owner,
|
|
83073
|
+
member,
|
|
83074
|
+
memberId: evaluatorResolutionCache(ctx).canonicalMemberId(member.id),
|
|
83075
|
+
schemaKey: entry.schemaKey,
|
|
83076
|
+
typeInfo
|
|
83077
|
+
};
|
|
83078
|
+
}
|
|
82781
83079
|
function changeListenerObservedType(raw, member, env, ctx) {
|
|
82782
83080
|
const runtime = runtimeTypeInfoForMember(raw, env, ctx, /* @__PURE__ */ new Set());
|
|
82783
83081
|
if (!isMemberLookup(member)) return runtime;
|
|
@@ -82800,6 +83098,18 @@ function changeListenerObservedType(raw, member, env, ctx) {
|
|
|
82800
83098
|
required: isRequiredMember(member)
|
|
82801
83099
|
};
|
|
82802
83100
|
}
|
|
83101
|
+
function readNeoScriptChangeListenerValue(slot, ctx) {
|
|
83102
|
+
const result = dispatchSchemaMember(
|
|
83103
|
+
readRowValue(slot.owner, ctx),
|
|
83104
|
+
slot.schemaKey,
|
|
83105
|
+
ctx
|
|
83106
|
+
);
|
|
83107
|
+
if (result.kind !== "ok")
|
|
83108
|
+
throw new NSGetterRuntimeError(
|
|
83109
|
+
`OnChanged cannot read '${slot.owner.id}/${slot.memberId}'.`
|
|
83110
|
+
);
|
|
83111
|
+
return result.value;
|
|
83112
|
+
}
|
|
82803
83113
|
function resolveNeoScriptChangeListenerHandler(slot, target, ctx) {
|
|
82804
83114
|
const raw = evalMemberById(ctx.vm, target.memberId);
|
|
82805
83115
|
if (raw === null) return null;
|
|
@@ -82861,14 +83171,16 @@ function evalChangeListenerInstruction(ins, scope, ctx, options) {
|
|
|
82861
83171
|
throw new NSGetterRuntimeError(
|
|
82862
83172
|
"OnChanged requires an existing logical owner."
|
|
82863
83173
|
);
|
|
82864
|
-
const
|
|
83174
|
+
const stored = resolveNeoScriptChangeListenerSlot(
|
|
82865
83175
|
owner.id,
|
|
82866
83176
|
ins.target.memberId,
|
|
82867
83177
|
ctx
|
|
82868
83178
|
);
|
|
83179
|
+
const getter = stored === null ? resolveNeoScriptGetterListenerSlot(owner.id, ins.target.memberId, ctx) : null;
|
|
83180
|
+
const slot = stored ?? getter;
|
|
82869
83181
|
if (slot === null)
|
|
82870
83182
|
throw new NSGetterRuntimeError(
|
|
82871
|
-
`OnChanged member '${ins.target.memberId}' is not an observable
|
|
83183
|
+
`OnChanged member '${ins.target.memberId}' is not an observable member or getter of owner '${owner.id}'.`
|
|
82872
83184
|
);
|
|
82873
83185
|
const listener = evalPointer(ins.listener, scope, ctx);
|
|
82874
83186
|
if (!isMemberDelegateTarget(listener))
|
|
@@ -82880,6 +83192,15 @@ function evalChangeListenerInstruction(ins, scope, ctx, options) {
|
|
|
82880
83192
|
throw new NSGetterRuntimeError(
|
|
82881
83193
|
`OnChanged handler '${listener.memberId}' cannot accept the value of '${slot.member.name}' on '${owner.id}'.`
|
|
82882
83194
|
);
|
|
83195
|
+
if (getter !== null) {
|
|
83196
|
+
editGetterSubscription(
|
|
83197
|
+
getter,
|
|
83198
|
+
handler.target,
|
|
83199
|
+
ins.type === "addChangeListener" /* addChangeListener */,
|
|
83200
|
+
ctx
|
|
83201
|
+
);
|
|
83202
|
+
return;
|
|
83203
|
+
}
|
|
82883
83204
|
options.writes.push({
|
|
82884
83205
|
kind: "changeListener",
|
|
82885
83206
|
target: ins.target,
|
|
@@ -82889,6 +83210,95 @@ function evalChangeListenerInstruction(ins, scope, ctx, options) {
|
|
|
82889
83210
|
listener: handler.target
|
|
82890
83211
|
});
|
|
82891
83212
|
}
|
|
83213
|
+
function editGetterSubscription(slot, target, add, ctx) {
|
|
83214
|
+
if ((ctx.__executionState?.constructionStack.length ?? 0) > 0)
|
|
83215
|
+
throw new NSGetterRuntimeError(
|
|
83216
|
+
"A getter subscription lives only for the play session, so a constructor can't make one. Subscribe from a function."
|
|
83217
|
+
);
|
|
83218
|
+
const subscriptions = ctx.__getterSubscriptions;
|
|
83219
|
+
if (subscriptions === void 0) return;
|
|
83220
|
+
let subscription = subscriptions.get(slot.owner.id, slot.memberId);
|
|
83221
|
+
const found = subscription?.targets.findIndex(
|
|
83222
|
+
(existing) => existing.memberId === target.memberId && existing.valueId === target.valueId
|
|
83223
|
+
) ?? -1;
|
|
83224
|
+
if (!add) {
|
|
83225
|
+
if (subscription === void 0 || found < 0) return;
|
|
83226
|
+
subscription.targets.splice(found, 1);
|
|
83227
|
+
if (subscription.targets.length === 0) subscriptions.drop(subscription);
|
|
83228
|
+
return;
|
|
83229
|
+
}
|
|
83230
|
+
if (found >= 0) return;
|
|
83231
|
+
if (subscription === void 0) {
|
|
83232
|
+
subscription = new NeoScriptGetterSubscription(
|
|
83233
|
+
slot.owner.id,
|
|
83234
|
+
slot.memberId,
|
|
83235
|
+
slot.owner.classId
|
|
83236
|
+
);
|
|
83237
|
+
subscriptions.add(subscription);
|
|
83238
|
+
}
|
|
83239
|
+
subscription.targets.push(target);
|
|
83240
|
+
}
|
|
83241
|
+
function dispatchGetterSubscriptions(ctx) {
|
|
83242
|
+
const subscriptions = ctx.__getterSubscriptions;
|
|
83243
|
+
if (subscriptions === void 0) return;
|
|
83244
|
+
const draining = subscriptions.takePending();
|
|
83245
|
+
let next = 0;
|
|
83246
|
+
try {
|
|
83247
|
+
while (next < draining.length)
|
|
83248
|
+
dispatchGetterSubscription(draining[next++], subscriptions, ctx);
|
|
83249
|
+
} finally {
|
|
83250
|
+
subscriptions.requeue(draining, next);
|
|
83251
|
+
}
|
|
83252
|
+
}
|
|
83253
|
+
function dispatchGetterSubscription(subscription, subscriptions, ctx) {
|
|
83254
|
+
subscription.queued = false;
|
|
83255
|
+
const notify = !subscription.arming;
|
|
83256
|
+
subscription.arming = false;
|
|
83257
|
+
if (subscription.targets.length === 0) return;
|
|
83258
|
+
const slot = resolveNeoScriptGetterListenerSlot(
|
|
83259
|
+
subscription.rowId,
|
|
83260
|
+
subscription.getterId,
|
|
83261
|
+
ctx
|
|
83262
|
+
);
|
|
83263
|
+
if (slot === null || slot.owner.classId !== subscription.classId) {
|
|
83264
|
+
subscriptions.drop(subscription);
|
|
83265
|
+
return;
|
|
83266
|
+
}
|
|
83267
|
+
const reads = new InitializerReadSet();
|
|
83268
|
+
let value;
|
|
83269
|
+
try {
|
|
83270
|
+
value = readNeoScriptChangeListenerValue(slot, {
|
|
83271
|
+
...ctx,
|
|
83272
|
+
__getterReads: reads.valueIds,
|
|
83273
|
+
containerDependencies: reads.containerIds,
|
|
83274
|
+
staticMemberDependencies: reads.staticMemberIds,
|
|
83275
|
+
worldQueryDependencies: reads.worldQueries,
|
|
83276
|
+
onUnattributableValueRead: reads.recordUnattributableValueRead
|
|
83277
|
+
});
|
|
83278
|
+
} finally {
|
|
83279
|
+
subscriptions.setReads(subscription, reads);
|
|
83280
|
+
}
|
|
83281
|
+
if (!notify) return;
|
|
83282
|
+
const owner = readRowValue(slot.owner, ctx);
|
|
83283
|
+
subscription.handling = true;
|
|
83284
|
+
try {
|
|
83285
|
+
for (const target of [...subscription.targets]) {
|
|
83286
|
+
const handler = resolveNeoScriptChangeListenerHandler(slot, target, ctx);
|
|
83287
|
+
if (handler === null) continue;
|
|
83288
|
+
invokeDelegateValue(
|
|
83289
|
+
handler.invocation,
|
|
83290
|
+
[value],
|
|
83291
|
+
ctx,
|
|
83292
|
+
void 0,
|
|
83293
|
+
owner,
|
|
83294
|
+
"discarded",
|
|
83295
|
+
() => dispatchGetterSubscriptions(ctx)
|
|
83296
|
+
);
|
|
83297
|
+
}
|
|
83298
|
+
} finally {
|
|
83299
|
+
subscription.handling = false;
|
|
83300
|
+
}
|
|
83301
|
+
}
|
|
82892
83302
|
function evalActionListenerInstruction(ins, scope, ctx, options) {
|
|
82893
83303
|
const operator = ins.type === "addActionListener" /* addActionListener */ ? "+=" : "-=";
|
|
82894
83304
|
if (ins.target.pointer.type === "variable" /* variable */) {
|
|
@@ -83065,6 +83475,7 @@ function applyOverlayStaticAssignment(memberId, value, ctx) {
|
|
|
83065
83475
|
);
|
|
83066
83476
|
}
|
|
83067
83477
|
const bindings = writableStaticBindingMap(member, ctx);
|
|
83478
|
+
ctx.__getterSubscriptions?.noteStaticBinding(member.id);
|
|
83068
83479
|
if (value === null || value === void 0) {
|
|
83069
83480
|
if (isRequiredMember(member)) {
|
|
83070
83481
|
throw new NSGetterRuntimeError(
|
|
@@ -83103,7 +83514,7 @@ function applyOverlayStaticAssignment(memberId, value, ctx) {
|
|
|
83103
83514
|
`Static member '${member.name}' is bound to missing value '${currentId}'.`
|
|
83104
83515
|
);
|
|
83105
83516
|
}
|
|
83106
|
-
ctx
|
|
83517
|
+
observeValueWrite(ctx, row2);
|
|
83107
83518
|
row2.value = value;
|
|
83108
83519
|
row2.updatedAt = Date.now();
|
|
83109
83520
|
invalidateEvaluatorIndexes(ctx);
|
|
@@ -89904,14 +90315,14 @@ function evalVariantApply(info, scope, ctx) {
|
|
|
89904
90315
|
});
|
|
89905
90316
|
for (const valueId of resolution.clearedValueIds) {
|
|
89906
90317
|
const previous = readNeoScriptRuntimeRow(ctx, valueId);
|
|
89907
|
-
if (previous) ctx
|
|
90318
|
+
if (previous) observeValueWrite(ctx, previous);
|
|
89908
90319
|
deleteRuntimeSessionValue(ctx, valueId);
|
|
89909
90320
|
ctx.__valueOverlay?.delete(valueId);
|
|
89910
90321
|
}
|
|
89911
90322
|
for (const row of resolution.rows) {
|
|
89912
90323
|
if (row.id === rootRow.id) continue;
|
|
89913
90324
|
const previous = readNeoScriptRuntimeRow(ctx, row.id);
|
|
89914
|
-
if (previous) ctx
|
|
90325
|
+
if (previous) observeValueWrite(ctx, previous);
|
|
89915
90326
|
ctx.__valueOverlay?.set(row.id, deepClonePlainData(row));
|
|
89916
90327
|
}
|
|
89917
90328
|
if (typeof receiver !== "object" || receiver === null || Array.isArray(receiver) || typeof resolution.root.value !== "object" || resolution.root.value === null || Array.isArray(resolution.root.value)) {
|
|
@@ -91373,6 +91784,8 @@ var init_evaluateNSGetter = __esm({
|
|
|
91373
91784
|
init_cell_pattern();
|
|
91374
91785
|
init_cell_pattern2();
|
|
91375
91786
|
init_world_grid_query();
|
|
91787
|
+
init_initializer_context();
|
|
91788
|
+
init_getter_subscriptions();
|
|
91376
91789
|
init_classes();
|
|
91377
91790
|
init_core();
|
|
91378
91791
|
init_construction_requirements();
|
|
@@ -107269,6 +107682,7 @@ var init_neoscript2 = __esm({
|
|
|
107269
107682
|
init_evaluateNSGetter();
|
|
107270
107683
|
init_evaluateInitializer();
|
|
107271
107684
|
init_initializer_context();
|
|
107685
|
+
init_getter_subscriptions();
|
|
107272
107686
|
}
|
|
107273
107687
|
});
|
|
107274
107688
|
|
|
@@ -154561,7 +154975,7 @@ var init_project_transaction = __esm({
|
|
|
154561
154975
|
}
|
|
154562
154976
|
});
|
|
154563
154977
|
|
|
154564
|
-
// node_modules/fflate/esm/index.mjs
|
|
154978
|
+
// ../node_modules/fflate/esm/index.mjs
|
|
154565
154979
|
import { createRequire } from "module";
|
|
154566
154980
|
function gzipSync(data, opts) {
|
|
154567
154981
|
if (!opts)
|
|
@@ -154573,7 +154987,7 @@ function gzipSync(data, opts) {
|
|
|
154573
154987
|
}
|
|
154574
154988
|
var require2, _a, Worker4, isMarkedAsUntransferable, u8, u16, i32, fleb, fdeb, clim, freb, _a, fl, revfl, _b, fd, revfd, rev, x, i, hMap, flt, i, i, i, i, fdt, i, flm, fdm, shft, slc, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, deo, et, dflt, crct, crc, dopt, wbytes, gzh, gzhl, td, tds;
|
|
154575
154989
|
var init_esm = __esm({
|
|
154576
|
-
"node_modules/fflate/esm/index.mjs"() {
|
|
154990
|
+
"../node_modules/fflate/esm/index.mjs"() {
|
|
154577
154991
|
require2 = createRequire("/");
|
|
154578
154992
|
try {
|
|
154579
154993
|
_a = require2("worker_threads"), Worker4 = _a.Worker, isMarkedAsUntransferable = _a.isMarkedAsUntransferable;
|
|
@@ -156718,7 +157132,7 @@ var init_neoscript_file_references = __esm({
|
|
|
156718
157132
|
}
|
|
156719
157133
|
});
|
|
156720
157134
|
|
|
156721
|
-
// node_modules/@formatjs/icu-
|
|
157135
|
+
// ../node_modules/@formatjs/icu-skeleton-parser/index.js
|
|
156722
157136
|
function parseDateTimeSkeleton(skeleton) {
|
|
156723
157137
|
const result = {};
|
|
156724
157138
|
skeleton.replace(DATE_TIME_REGEX, (match) => {
|
|
@@ -157087,7 +157501,7 @@ function parseNumberSkeleton(tokens) {
|
|
|
157087
157501
|
}
|
|
157088
157502
|
var DATE_TIME_REGEX, WHITE_SPACE_REGEX, FRACTION_PRECISION_REGEX, SIGNIFICANT_PRECISION_REGEX, INTEGER_WIDTH_REGEX, CONCISE_INTEGER_WIDTH_REGEX;
|
|
157089
157503
|
var init_icu_skeleton_parser = __esm({
|
|
157090
|
-
"node_modules/@formatjs/icu-
|
|
157504
|
+
"../node_modules/@formatjs/icu-skeleton-parser/index.js"() {
|
|
157091
157505
|
DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
|
|
157092
157506
|
WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
157093
157507
|
FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
|
|
@@ -157097,7 +157511,7 @@ var init_icu_skeleton_parser = __esm({
|
|
|
157097
157511
|
}
|
|
157098
157512
|
});
|
|
157099
157513
|
|
|
157100
|
-
// node_modules/@formatjs/icu-messageformat-parser/index.js
|
|
157514
|
+
// ../node_modules/@formatjs/icu-messageformat-parser/index.js
|
|
157101
157515
|
function isArgumentElement(el) {
|
|
157102
157516
|
return el.type === 1;
|
|
157103
157517
|
}
|
|
@@ -157265,7 +157679,7 @@ function parse3(message, opts = {}) {
|
|
|
157265
157679
|
}
|
|
157266
157680
|
var ErrorKind, SPACE_SEPARATOR_REGEX, IDENTIFIER_PREFIX_REGEX, timeData, SPACE_SEPARATOR_START_REGEX, SPACE_SEPARATOR_END_REGEX, hasNativeFromEntries, hasTrimStart, hasTrimEnd, fromEntries, trimStart, trimEnd, IDENTIFIER_PREFIX_RE, Parser2;
|
|
157267
157681
|
var init_icu_messageformat_parser = __esm({
|
|
157268
|
-
"node_modules/@formatjs/icu-messageformat-parser/index.js"() {
|
|
157682
|
+
"../node_modules/@formatjs/icu-messageformat-parser/index.js"() {
|
|
157269
157683
|
init_icu_skeleton_parser();
|
|
157270
157684
|
ErrorKind = /* @__PURE__ */ (function(ErrorKind2) {
|
|
157271
157685
|
ErrorKind2[ErrorKind2["EXPECT_ARGUMENT_CLOSING_BRACE"] = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE";
|
|
@@ -171758,7 +172172,7 @@ var init_project_unity_export_types = __esm({
|
|
|
171758
172172
|
"../src/models/exports/project-unity-export-types.ts"() {
|
|
171759
172173
|
"use strict";
|
|
171760
172174
|
init_unity_codegen_revision();
|
|
171761
|
-
PROJECT_UNITY_EXPORT_SCHEMA_VERSION =
|
|
172175
|
+
PROJECT_UNITY_EXPORT_SCHEMA_VERSION = 40;
|
|
171762
172176
|
}
|
|
171763
172177
|
});
|
|
171764
172178
|
|
|
@@ -182955,7 +183369,8 @@ function makeEvaluatorContext(rawDocument, interceptor) {
|
|
|
182955
183369
|
rootValue: base.rootValue,
|
|
182956
183370
|
dialogueContext: null,
|
|
182957
183371
|
callInterceptor: interceptor,
|
|
182958
|
-
nativeFunctionErrorCheckBehavior: "strict"
|
|
183372
|
+
nativeFunctionErrorCheckBehavior: "strict",
|
|
183373
|
+
getterDispatch: "afterEntryStatement" /* AfterEntryStatement */
|
|
182959
183374
|
});
|
|
182960
183375
|
}
|
|
182961
183376
|
function documentRecord(document) {
|
|
@@ -183829,6 +184244,7 @@ function copyMocks(source, target) {
|
|
|
183829
184244
|
function cloneTestEnvironment(source) {
|
|
183830
184245
|
const cloned = createTestEnvironment(snapshotEnvironmentDocument(source));
|
|
183831
184246
|
copyMocks(source, cloned);
|
|
184247
|
+
cloned.context.__getterSubscriptions = source.context.__getterSubscriptions?.clone();
|
|
183832
184248
|
return cloned;
|
|
183833
184249
|
}
|
|
183834
184250
|
function runCallback(environment, delegate, deadlineMs) {
|
|
@@ -191491,7 +191907,7 @@ There is no --keep-current: preserving current semantic state defines flatten.
|
|
|
191491
191907
|
async function main() {
|
|
191492
191908
|
const args = parseArgs(process.argv.slice(2));
|
|
191493
191909
|
if (args.command === "--version") {
|
|
191494
|
-
console.log("0.
|
|
191910
|
+
console.log("0.74.0");
|
|
191495
191911
|
return;
|
|
191496
191912
|
}
|
|
191497
191913
|
if (args.command === null || args.command === "help" || args.command === "--help" || args.command === "-h") {
|