@neocompose/cli 0.7.6 → 0.8.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 +64 -110
- package/package.json +1 -1
package/dist/neo.mjs
CHANGED
|
@@ -11812,7 +11812,7 @@ var init_project_schema_contract_generated = __esm({
|
|
|
11812
11812
|
"../packages/neoscript-language/src/project-schema-contract.generated.ts"() {
|
|
11813
11813
|
"use strict";
|
|
11814
11814
|
PROJECT_SCHEMA_MANIFEST_FORMAT_VERSION = 3;
|
|
11815
|
-
PROJECT_SCHEMA_MANIFEST_CONTRACT_VERSION = "3.
|
|
11815
|
+
PROJECT_SCHEMA_MANIFEST_CONTRACT_VERSION = "3.4";
|
|
11816
11816
|
NEO_PROJECT_SOURCE_RECORD_CONTRACT = {
|
|
11817
11817
|
"recordFields": {
|
|
11818
11818
|
"member": [
|
|
@@ -12041,11 +12041,13 @@ var init_project_schema_contract_generated = __esm({
|
|
|
12041
12041
|
"Audio",
|
|
12042
12042
|
"Generic"
|
|
12043
12043
|
],
|
|
12044
|
-
"
|
|
12045
|
-
"
|
|
12046
|
-
"
|
|
12047
|
-
"
|
|
12048
|
-
"
|
|
12044
|
+
"NeoSystemProtectionKind": [
|
|
12045
|
+
"WorldAuthoring",
|
|
12046
|
+
"DialogueMemorySchema",
|
|
12047
|
+
"DialogueMemoryContainer",
|
|
12048
|
+
"DialoguePriorityDefault",
|
|
12049
|
+
"PolicyImmutable",
|
|
12050
|
+
"PolicyDeleteBlocked"
|
|
12049
12051
|
],
|
|
12050
12052
|
"NeoWorldKind": [
|
|
12051
12053
|
"None",
|
|
@@ -12354,23 +12356,17 @@ var init_project_schema_contract_generated = __esm({
|
|
|
12354
12356
|
],
|
|
12355
12357
|
"constructor": [
|
|
12356
12358
|
{
|
|
12357
|
-
"type": "
|
|
12358
|
-
"name": "
|
|
12359
|
-
"
|
|
12360
|
-
"assigns": "Disallow"
|
|
12359
|
+
"type": "NeoSystemProtectionKind",
|
|
12360
|
+
"name": "kind",
|
|
12361
|
+
"assigns": "Kind"
|
|
12361
12362
|
}
|
|
12362
12363
|
],
|
|
12363
12364
|
"properties": [
|
|
12364
12365
|
{
|
|
12365
|
-
"type": "
|
|
12366
|
-
"name": "
|
|
12366
|
+
"type": "NeoSystemProtectionKind",
|
|
12367
|
+
"name": "Kind",
|
|
12367
12368
|
"access": "get"
|
|
12368
12369
|
},
|
|
12369
|
-
{
|
|
12370
|
-
"type": "string?",
|
|
12371
|
-
"name": "Reason",
|
|
12372
|
-
"access": "set"
|
|
12373
|
-
},
|
|
12374
12370
|
{
|
|
12375
12371
|
"type": "NeoWorldKind",
|
|
12376
12372
|
"name": "WorldKind",
|
|
@@ -13257,13 +13253,9 @@ var init_project_schema_contract_generated = __esm({
|
|
|
13257
13253
|
"constructors": [],
|
|
13258
13254
|
"properties": [
|
|
13259
13255
|
{
|
|
13260
|
-
"type": "
|
|
13261
|
-
"name": "
|
|
13262
|
-
"default": "
|
|
13263
|
-
},
|
|
13264
|
-
{
|
|
13265
|
-
"type": "string?",
|
|
13266
|
-
"name": "Reason"
|
|
13256
|
+
"type": "NeoSystemProtectionKind",
|
|
13257
|
+
"name": "Kind",
|
|
13258
|
+
"default": "NeoSystemProtectionKind.WorldAuthoring"
|
|
13267
13259
|
},
|
|
13268
13260
|
{
|
|
13269
13261
|
"type": "NeoWorldKind?",
|
|
@@ -22797,8 +22789,7 @@ function documentValuesEqual(left, right) {
|
|
|
22797
22789
|
function systemToDocument(system) {
|
|
22798
22790
|
if (system === null) return void 0;
|
|
22799
22791
|
return omitUndefined({
|
|
22800
|
-
|
|
22801
|
-
reason: system.reason ?? void 0,
|
|
22792
|
+
kind: system.kind,
|
|
22802
22793
|
worldKind: system.worldKind ?? void 0
|
|
22803
22794
|
});
|
|
22804
22795
|
}
|
|
@@ -23152,12 +23143,8 @@ function jsonValue(value, record3, path) {
|
|
|
23152
23143
|
function systemFromDocument(value, record3, path) {
|
|
23153
23144
|
if (value === null || value === void 0) return null;
|
|
23154
23145
|
const system = requireRecordValue(value, record3, path);
|
|
23155
|
-
const disallow = optionalArray(system.disallow).map(
|
|
23156
|
-
(entry, index) => requiredStringValue(entry, record3, `${path}.disallow[${index}]`)
|
|
23157
|
-
);
|
|
23158
23146
|
const candidate = {
|
|
23159
|
-
|
|
23160
|
-
reason: optionalStringOrNull(system.reason),
|
|
23147
|
+
kind: requiredStringValue(system.kind, record3, `${path}.kind`),
|
|
23161
23148
|
worldKind: optionalStringOrNull(system.worldKind)
|
|
23162
23149
|
};
|
|
23163
23150
|
if (!isSchemaSystemMetadata(candidate)) {
|
|
@@ -23167,11 +23154,13 @@ function systemFromDocument(value, record3, path) {
|
|
|
23167
23154
|
}
|
|
23168
23155
|
function isSchemaSystemMetadata(value) {
|
|
23169
23156
|
if (!isRecord2(value)) return false;
|
|
23170
|
-
const
|
|
23171
|
-
"
|
|
23172
|
-
"
|
|
23173
|
-
"
|
|
23174
|
-
"
|
|
23157
|
+
const kinds = /* @__PURE__ */ new Set([
|
|
23158
|
+
"worldAuthoring",
|
|
23159
|
+
"dialogueMemorySchema",
|
|
23160
|
+
"dialogueMemoryContainer",
|
|
23161
|
+
"dialoguePriorityDefault",
|
|
23162
|
+
"policyImmutable",
|
|
23163
|
+
"policyDeleteBlocked"
|
|
23175
23164
|
]);
|
|
23176
23165
|
const worlds = /* @__PURE__ */ new Set([
|
|
23177
23166
|
"tileGrid",
|
|
@@ -23192,9 +23181,7 @@ function isSchemaSystemMetadata(value) {
|
|
|
23192
23181
|
"smartTileRule",
|
|
23193
23182
|
"smartTileNeighbor"
|
|
23194
23183
|
]);
|
|
23195
|
-
return
|
|
23196
|
-
(entry) => typeof entry === "string" && operations.has(entry)
|
|
23197
|
-
) && (value.reason === null || typeof value.reason === "string") && (value.worldKind === null || typeof value.worldKind === "string" && worlds.has(value.worldKind));
|
|
23184
|
+
return typeof value.kind === "string" && kinds.has(value.kind) && (value.worldKind === null || typeof value.worldKind === "string" && worlds.has(value.worldKind));
|
|
23198
23185
|
}
|
|
23199
23186
|
function genericBindingsFromDocument(value, record3, path) {
|
|
23200
23187
|
if (value === void 0 || value === null) return {};
|
|
@@ -25019,11 +25006,8 @@ function assertPosition(value, path) {
|
|
|
25019
25006
|
}
|
|
25020
25007
|
function assertSystem(value, path) {
|
|
25021
25008
|
if (value === null) return;
|
|
25022
|
-
const system = objectAt(value, path, ["
|
|
25023
|
-
|
|
25024
|
-
stringIn(entry, SYSTEM_OPERATIONS, entryPath);
|
|
25025
|
-
});
|
|
25026
|
-
nullableString2(system.reason, `${path}.reason`);
|
|
25009
|
+
const system = objectAt(value, path, ["kind", "worldKind"]);
|
|
25010
|
+
stringIn(system.kind, SYSTEM_PROTECTION_KINDS, `${path}.kind`);
|
|
25027
25011
|
if (system.worldKind !== null) {
|
|
25028
25012
|
stringIn(system.worldKind, WORLD_KINDS, `${path}.worldKind`);
|
|
25029
25013
|
}
|
|
@@ -26243,7 +26227,7 @@ function exactValue(value, expected, path) {
|
|
|
26243
26227
|
function invalid(path, message) {
|
|
26244
26228
|
throw new ProjectSchemaManifestValidationError(path, message);
|
|
26245
26229
|
}
|
|
26246
|
-
var ProjectSchemaManifestValidationError, WORLD_RELATION_CONTRACTS, MANIFEST_ENDPOINT_KINDS, PROJECT_RECORD_KINDS, SOURCE_KINDS,
|
|
26230
|
+
var ProjectSchemaManifestValidationError, WORLD_RELATION_CONTRACTS, MANIFEST_ENDPOINT_KINDS, PROJECT_RECORD_KINDS, SOURCE_KINDS, SYSTEM_PROTECTION_KINDS, WORLD_KINDS, MEMBER_COMMON_KEYS, MEMBER_KEYS_BY_KIND, PRIMITIVE_TYPE_KINDS, TEXTURE_TYPES, ALPHA_SOURCES, NPOT_SCALES, WRAP_MODES, RESIZE_ALGORITHMS, TEXTURE_COMPRESSIONS, PLATFORM_FORMATS, SPRITE_ALIGNMENTS;
|
|
26247
26231
|
var init_validate = __esm({
|
|
26248
26232
|
"src/project-manifest/validate.ts"() {
|
|
26249
26233
|
"use strict";
|
|
@@ -26404,11 +26388,13 @@ var init_validate = __esm({
|
|
|
26404
26388
|
"localizationStatus",
|
|
26405
26389
|
"internalRecordRelation"
|
|
26406
26390
|
]);
|
|
26407
|
-
|
|
26408
|
-
"
|
|
26409
|
-
"
|
|
26410
|
-
"
|
|
26411
|
-
"
|
|
26391
|
+
SYSTEM_PROTECTION_KINDS = /* @__PURE__ */ new Set([
|
|
26392
|
+
"worldAuthoring",
|
|
26393
|
+
"dialogueMemorySchema",
|
|
26394
|
+
"dialogueMemoryContainer",
|
|
26395
|
+
"dialoguePriorityDefault",
|
|
26396
|
+
"policyImmutable",
|
|
26397
|
+
"policyDeleteBlocked"
|
|
26412
26398
|
]);
|
|
26413
26399
|
WORLD_KINDS = /* @__PURE__ */ new Set([
|
|
26414
26400
|
"tileGrid",
|
|
@@ -27022,15 +27008,13 @@ function contextualEnumArgument(value, name) {
|
|
|
27022
27008
|
function systemMetadata(annotations) {
|
|
27023
27009
|
const system = annotation(annotations, "system");
|
|
27024
27010
|
if (!system) return null;
|
|
27025
|
-
const
|
|
27026
|
-
|
|
27027
|
-
|
|
27028
|
-
|
|
27029
|
-
).map((entry) => lowerFirst2(entry.name)) : [];
|
|
27011
|
+
const kind = contextualEnumArgument(system, "kind");
|
|
27012
|
+
if (kind === null) {
|
|
27013
|
+
throw new Error("@system requires a kind inferred enum argument.");
|
|
27014
|
+
}
|
|
27030
27015
|
const worldKind = contextualEnumArgument(system, "worldKind");
|
|
27031
27016
|
return {
|
|
27032
|
-
|
|
27033
|
-
reason: stringArgument(system, "reason"),
|
|
27017
|
+
kind: lowerFirst2(kind),
|
|
27034
27018
|
worldKind: worldKind ? lowerFirst2(worldKind) : null
|
|
27035
27019
|
};
|
|
27036
27020
|
}
|
|
@@ -30753,11 +30737,8 @@ function genericName(context, idValue) {
|
|
|
30753
30737
|
}
|
|
30754
30738
|
function systemAnnotation(system) {
|
|
30755
30739
|
const args = [
|
|
30756
|
-
|
|
30757
|
-
...system.
|
|
30758
|
-
`disallow: [${system.disallow.map((entry) => `.${enumCase(entry)}`).join(", ")}]`
|
|
30759
|
-
] : [],
|
|
30760
|
-
...system.reason ? [`reason: ${quote(system.reason)}`] : []
|
|
30740
|
+
`kind: .${enumCase(system.kind)}`,
|
|
30741
|
+
...system.worldKind ? [`worldKind: .${enumCase(system.worldKind)}`] : []
|
|
30761
30742
|
];
|
|
30762
30743
|
return `@system(${args.join(", ")})`;
|
|
30763
30744
|
}
|
|
@@ -32846,15 +32827,12 @@ function reference(value, names, type) {
|
|
|
32846
32827
|
return names.get(value) ?? `Reference<${type}>(id: ${quote2(value)})`;
|
|
32847
32828
|
}
|
|
32848
32829
|
function emitSystemAnnotation(system) {
|
|
32849
|
-
|
|
32850
|
-
(
|
|
32851
|
-
|
|
32830
|
+
if (typeof system.kind !== "string") {
|
|
32831
|
+
throw new Error("System metadata requires a protection kind.");
|
|
32832
|
+
}
|
|
32852
32833
|
const args = [
|
|
32853
|
-
|
|
32854
|
-
...
|
|
32855
|
-
`disallow: [${disallow.map((entry) => `.${enumCase2(entry)}`).join(", ")}]`
|
|
32856
|
-
] : [],
|
|
32857
|
-
...typeof system.reason === "string" ? [`reason: ${quote2(system.reason)}`] : []
|
|
32834
|
+
`kind: .${enumCase2(system.kind)}`,
|
|
32835
|
+
...typeof system.worldKind === "string" ? [`worldKind: .${enumCase2(system.worldKind)}`] : []
|
|
32858
32836
|
];
|
|
32859
32837
|
return `@system(${args.join(", ")})`;
|
|
32860
32838
|
}
|
|
@@ -32867,26 +32845,16 @@ function lowerSystemMetadata(annotations) {
|
|
|
32867
32845
|
)?.expression;
|
|
32868
32846
|
return raw === void 0 ? void 0 : parseExpression(raw);
|
|
32869
32847
|
};
|
|
32870
|
-
const
|
|
32871
|
-
|
|
32872
|
-
|
|
32873
|
-
throw new Error("@system disallow entries must be inferred enums.");
|
|
32874
|
-
}
|
|
32875
|
-
return lowerFirst3(entry.name);
|
|
32876
|
-
}) : [];
|
|
32877
|
-
const reasonExpression = argument2("reason");
|
|
32878
|
-
const worldKindExpression = argument2("worldKind");
|
|
32879
|
-
if (reasonExpression !== void 0 && reasonExpression.kind !== "litString" && reasonExpression.kind !== "litNull") {
|
|
32880
|
-
throw new Error("@system reason must be a string or null.");
|
|
32848
|
+
const kindExpression = argument2("kind");
|
|
32849
|
+
if (kindExpression?.kind !== "contextualEnum") {
|
|
32850
|
+
throw new Error("@system kind must be an inferred enum.");
|
|
32881
32851
|
}
|
|
32852
|
+
const worldKindExpression = argument2("worldKind");
|
|
32882
32853
|
if (worldKindExpression !== void 0 && worldKindExpression.kind !== "contextualEnum" && worldKindExpression.kind !== "litNull") {
|
|
32883
32854
|
throw new Error("@system worldKind must be an inferred enum or null.");
|
|
32884
32855
|
}
|
|
32885
32856
|
return {
|
|
32886
|
-
|
|
32887
|
-
...reasonExpression === void 0 ? {} : {
|
|
32888
|
-
reason: reasonExpression.kind === "litString" ? reasonExpression.value : null
|
|
32889
|
-
},
|
|
32857
|
+
kind: lowerFirst3(kindExpression.name),
|
|
32890
32858
|
...worldKindExpression === void 0 ? {} : {
|
|
32891
32859
|
worldKind: worldKindExpression.kind === "contextualEnum" ? lowerFirst3(worldKindExpression.name) : null
|
|
32892
32860
|
}
|
|
@@ -32949,8 +32917,8 @@ function isEpochMillis(value) {
|
|
|
32949
32917
|
if (typeof value !== "number") return false;
|
|
32950
32918
|
return Number.isFinite(value);
|
|
32951
32919
|
}
|
|
32952
|
-
function
|
|
32953
|
-
return value ===
|
|
32920
|
+
function isSystemProtectionKind(value) {
|
|
32921
|
+
return value === SystemProtectionKind.WorldAuthoring || value === SystemProtectionKind.DialogueMemorySchema || value === SystemProtectionKind.DialogueMemoryContainer || value === SystemProtectionKind.DialoguePriorityDefault || value === SystemProtectionKind.PolicyImmutable || value === SystemProtectionKind.PolicyDeleteBlocked;
|
|
32954
32922
|
}
|
|
32955
32923
|
function isNeoWorldSystemClassKind(value) {
|
|
32956
32924
|
return value === NeoWorldSystemClassKind.TileGrid || value === NeoWorldSystemClassKind.TileLayer || value === NeoWorldSystemClassKind.ObjectLayer || value === NeoWorldSystemClassKind.Tile || value === NeoWorldSystemClassKind.ObjectBase || value === NeoWorldSystemClassKind.LayerGroupBase || value === NeoWorldSystemClassKind.SpriteObject || value === NeoWorldSystemClassKind.Object || value === NeoWorldSystemClassKind.TileLayerLink || value === NeoWorldSystemClassKind.ObjectLayerLink || value === NeoWorldSystemClassKind.ObjectPlacementTile || value === NeoWorldSystemClassKind.TileInstance || value === NeoWorldSystemClassKind.ObjectCollider || value === NeoWorldSystemClassKind.SortingLayer || value === NeoWorldSystemClassKind.SmartTile || value === NeoWorldSystemClassKind.SmartTileRule || value === NeoWorldSystemClassKind.SmartTileNeighbor;
|
|
@@ -32959,11 +32927,7 @@ function isSystemMetadata(value) {
|
|
|
32959
32927
|
const v = value;
|
|
32960
32928
|
if (typeof v !== "object") return false;
|
|
32961
32929
|
if (v === null) return false;
|
|
32962
|
-
if (!
|
|
32963
|
-
if (!v.disallow.every(isSystemDisallowedOperation)) return false;
|
|
32964
|
-
if (v.reason !== void 0 && v.reason !== null) {
|
|
32965
|
-
if (typeof v.reason !== "string") return false;
|
|
32966
|
-
}
|
|
32930
|
+
if (!isSystemProtectionKind(v.kind)) return false;
|
|
32967
32931
|
if (v.worldKind !== void 0 && v.worldKind !== null) {
|
|
32968
32932
|
return isNeoWorldSystemClassKind(v.worldKind);
|
|
32969
32933
|
}
|
|
@@ -32972,27 +32936,17 @@ function isSystemMetadata(value) {
|
|
|
32972
32936
|
function isWithName(value) {
|
|
32973
32937
|
return typeof value?.name === "string";
|
|
32974
32938
|
}
|
|
32975
|
-
var
|
|
32939
|
+
var SystemProtectionKind, NeoWorldSystemClassKind;
|
|
32976
32940
|
var init_core_types = __esm({
|
|
32977
32941
|
"../src/models/core/core-types.ts"() {
|
|
32978
32942
|
"use strict";
|
|
32979
|
-
|
|
32980
|
-
|
|
32981
|
-
|
|
32982
|
-
|
|
32983
|
-
|
|
32984
|
-
|
|
32985
|
-
|
|
32986
|
-
*/
|
|
32987
|
-
DeleteRecord: "deleteRecord",
|
|
32988
|
-
/**
|
|
32989
|
-
* Removes the record from normal creation/selection affordances.
|
|
32990
|
-
*/
|
|
32991
|
-
SelectRecord: "selectRecord",
|
|
32992
|
-
/**
|
|
32993
|
-
* Blocks replacing the value row attached to a member as a whole.
|
|
32994
|
-
*/
|
|
32995
|
-
ReplaceValue: "replaceValue"
|
|
32943
|
+
SystemProtectionKind = {
|
|
32944
|
+
WorldAuthoring: "worldAuthoring",
|
|
32945
|
+
DialogueMemorySchema: "dialogueMemorySchema",
|
|
32946
|
+
DialogueMemoryContainer: "dialogueMemoryContainer",
|
|
32947
|
+
DialoguePriorityDefault: "dialoguePriorityDefault",
|
|
32948
|
+
PolicyImmutable: "policyImmutable",
|
|
32949
|
+
PolicyDeleteBlocked: "policyDeleteBlocked"
|
|
32996
32950
|
};
|
|
32997
32951
|
NeoWorldSystemClassKind = {
|
|
32998
32952
|
TileGrid: "tileGrid",
|