@neocompose/cli 0.82.0 → 0.82.2
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 +12 -0
- package/dist/neo.mjs +104 -23
- package/dist/test-worker.mjs +1 -1
- package/package.json +1 -1
- package/skills/neocompose-cli/SKILL.md +1 -1
- package/skills/neocompose-cli/references/cli-development.md +1 -1
- package/skills/neocompose-cli/references/values-identities-and-references.md +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.82.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9e3a8d3: Fix post-push exports of class defaults that spell a field's declared default, such as animation FPS. Keep those fields sparse on subsequent analysis and preserve existing child-row ownership when adding a real default override.
|
|
8
|
+
|
|
9
|
+
## 0.82.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 8d58730: Fix collection-bound Reference<T> and Set<Reference<T>> declarations whose generic target extends a class. Preserve inherited lookup overrides during export, and report authored source diagnostics instead of secondary manifest errors when a base declaration is invalid.
|
|
14
|
+
|
|
3
15
|
## 0.82.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/neo.mjs
CHANGED
|
@@ -45146,6 +45146,7 @@ function contextualAnnotationFields(document, position) {
|
|
|
45146
45146
|
if (annotation2) {
|
|
45147
45147
|
return fieldsForAnnotation(annotation2.name, {
|
|
45148
45148
|
kind: "member",
|
|
45149
|
+
ownerName: declaration.name,
|
|
45149
45150
|
type: semanticType(member.type),
|
|
45150
45151
|
memberKind: member.kind
|
|
45151
45152
|
});
|
|
@@ -45569,6 +45570,7 @@ function validateMember(uri, member, ownerName, documentKind, ownerScope, enviro
|
|
|
45569
45570
|
member.annotations,
|
|
45570
45571
|
documentKind === "flow" ? member.kind === "field" && member.flowInitializer ? { kind: "flowGraph" } : member.kind === "field" ? { kind: "flowBinding", type: memberType2 } : { kind: "flowMember", type: memberType2 } : {
|
|
45571
45572
|
kind: "member",
|
|
45573
|
+
ownerName,
|
|
45572
45574
|
type: memberType2,
|
|
45573
45575
|
memberKind: member.kind,
|
|
45574
45576
|
reference: member.type.name === "Reference"
|
|
@@ -45854,6 +45856,7 @@ function validateAnnotations(uri, annotations, context, environment, diagnostics
|
|
|
45854
45856
|
argument2.text,
|
|
45855
45857
|
argument2.range,
|
|
45856
45858
|
context.type,
|
|
45859
|
+
context.kind === "member" ? context.ownerName : void 0,
|
|
45857
45860
|
environment,
|
|
45858
45861
|
diagnostics
|
|
45859
45862
|
);
|
|
@@ -45871,7 +45874,7 @@ function validateAnnotations(uri, annotations, context, environment, diagnostics
|
|
|
45871
45874
|
}
|
|
45872
45875
|
}
|
|
45873
45876
|
}
|
|
45874
|
-
function validateLookupCollectionType(uri, collection, range2, declared, environment, diagnostics) {
|
|
45877
|
+
function validateLookupCollectionType(uri, collection, range2, declared, ownerName, environment, diagnostics) {
|
|
45875
45878
|
const path = collection.trim().split(".");
|
|
45876
45879
|
const [owner, name] = path;
|
|
45877
45880
|
if (path.length !== 2 || owner === void 0 || name === void 0) return;
|
|
@@ -45885,15 +45888,45 @@ function validateLookupCollectionType(uri, collection, range2, declared, environ
|
|
|
45885
45888
|
const entry = entryIndex === null ? void 0 : collectionType.arguments?.[entryIndex];
|
|
45886
45889
|
const target = declared.name === "List" || declared.name === "Set" ? declared.arguments?.[0] : declared;
|
|
45887
45890
|
if (!entry || !target) return;
|
|
45888
|
-
const
|
|
45889
|
-
|
|
45890
|
-
if (
|
|
45891
|
-
|
|
45892
|
-
|
|
45893
|
-
|
|
45894
|
-
|
|
45895
|
-
|
|
45896
|
-
|
|
45891
|
+
const key = `lookup:${ownerName ?? ""}:${describeType(target)}>${describeType(entry)}`;
|
|
45892
|
+
let assignable = environment.assignability.get(key);
|
|
45893
|
+
if (assignable === void 0) {
|
|
45894
|
+
const declaringClass2 = ownerName === void 0 ? void 0 : environment.projectIndex.typeByName.get(ownerName);
|
|
45895
|
+
const context = {
|
|
45896
|
+
project: environment.project,
|
|
45897
|
+
kind: "initializerExpression",
|
|
45898
|
+
...declaringClass2 ? {
|
|
45899
|
+
declaringType: {
|
|
45900
|
+
kind: "named",
|
|
45901
|
+
typeId: declaringClass2.id
|
|
45902
|
+
}
|
|
45903
|
+
} : {}
|
|
45904
|
+
};
|
|
45905
|
+
const resolve7 = (type) => resolveNeoScriptType(
|
|
45906
|
+
semanticAst({ ...type, nullable: false }, { line: 1, column: 1 }),
|
|
45907
|
+
context,
|
|
45908
|
+
environment.projectIndex
|
|
45909
|
+
);
|
|
45910
|
+
const isClass = (type) => {
|
|
45911
|
+
const bound = neoScriptMemberLookupType(type);
|
|
45912
|
+
return bound.kind === "named" && environment.projectIndex.typeById.get(bound.typeId)?.kind === "class";
|
|
45913
|
+
};
|
|
45914
|
+
try {
|
|
45915
|
+
const targetType = resolve7(target);
|
|
45916
|
+
const entryType = resolve7(entry);
|
|
45917
|
+
const classes = isClass(targetType) && isClass(entryType);
|
|
45918
|
+
assignable = isNeoScriptTypeAssignable(
|
|
45919
|
+
classes ? targetType : entryType,
|
|
45920
|
+
classes ? entryType : targetType,
|
|
45921
|
+
environment.projectIndex
|
|
45922
|
+
);
|
|
45923
|
+
environment.assignability.set(key, assignable);
|
|
45924
|
+
} catch (error) {
|
|
45925
|
+
if (!(error instanceof CompileError)) throw error;
|
|
45926
|
+
return;
|
|
45927
|
+
}
|
|
45928
|
+
}
|
|
45929
|
+
if (assignable) return;
|
|
45897
45930
|
pushDiagnostic(
|
|
45898
45931
|
diagnostics,
|
|
45899
45932
|
uri,
|
|
@@ -55922,7 +55955,7 @@ var init_registry = __esm({
|
|
|
55922
55955
|
"../packages/manifest/schema-contract/registry.mjs"() {
|
|
55923
55956
|
"use strict";
|
|
55924
55957
|
PROJECT_SCHEMA_CONTRACT = Object.freeze({
|
|
55925
|
-
cliVersion: "0.82.
|
|
55958
|
+
cliVersion: "0.82.2",
|
|
55926
55959
|
projectFileUploadBatchSize: 32,
|
|
55927
55960
|
documentRecords: {
|
|
55928
55961
|
member: {
|
|
@@ -121069,6 +121102,7 @@ function* prepareServerOwnedSchemaCommitPasses(args) {
|
|
|
121069
121102
|
);
|
|
121070
121103
|
const pendingConstructedGraphValidations = materializeAuthoredValueSeeds({
|
|
121071
121104
|
document: seedPostDocument,
|
|
121105
|
+
previousMembers: args.document.members,
|
|
121072
121106
|
prepared,
|
|
121073
121107
|
authoredValueSeeds: args.authoredValueSeeds ?? [],
|
|
121074
121108
|
contentHashHeads: args.contentHashHeads,
|
|
@@ -121996,6 +122030,11 @@ function materializeAuthoredValueSeeds(args) {
|
|
|
121996
122030
|
if (seedByMemberId.size !== args.authoredValueSeeds.length) {
|
|
121997
122031
|
throw new Error("Schema commit contains duplicate member value seeds.");
|
|
121998
122032
|
}
|
|
122033
|
+
const previousSeedMembers = /* @__PURE__ */ new Map();
|
|
122034
|
+
for (const member of args.previousMembers) {
|
|
122035
|
+
if (seedByMemberId.has(member.id))
|
|
122036
|
+
previousSeedMembers.set(member.id, member);
|
|
122037
|
+
}
|
|
121999
122038
|
const evaluationDocument = withProspectiveAuthoredSeedValues(
|
|
122000
122039
|
args.document,
|
|
122001
122040
|
args.authoredValueSeeds
|
|
@@ -122014,6 +122053,7 @@ function materializeAuthoredValueSeeds(args) {
|
|
|
122014
122053
|
consumedSeedMemberIds.add(member.id);
|
|
122015
122054
|
materializeInstanceDefaultSeed({
|
|
122016
122055
|
document: evaluationDocument,
|
|
122056
|
+
previousMember: previousSeedMembers.get(member.id),
|
|
122017
122057
|
documentIndex,
|
|
122018
122058
|
prepared: args.prepared,
|
|
122019
122059
|
pendingGraphValidations,
|
|
@@ -122168,6 +122208,7 @@ function materializeAuthoredValueSeeds(args) {
|
|
|
122168
122208
|
if (member !== void 0 && isStaticMember(member) !== true && !isProjectRootMember(args.document.project, member.id)) {
|
|
122169
122209
|
materializeInstanceDefaultSeed({
|
|
122170
122210
|
document: evaluationDocument,
|
|
122211
|
+
previousMember: previousSeedMembers.get(member.id),
|
|
122171
122212
|
documentIndex,
|
|
122172
122213
|
prepared: args.prepared,
|
|
122173
122214
|
pendingGraphValidations,
|
|
@@ -122502,19 +122543,42 @@ function materializeInstanceDefaultSeed(args) {
|
|
|
122502
122543
|
...args.member,
|
|
122503
122544
|
defaultValue: seedValueContent(args.seed)
|
|
122504
122545
|
};
|
|
122546
|
+
const heldChildren = args.documentIndex.heldChildIdsByParentId;
|
|
122547
|
+
const previousHeld = heldChildren.get(args.seed.valueId);
|
|
122548
|
+
const declarationDefault = !isProjectRootMember(
|
|
122549
|
+
args.document.project,
|
|
122550
|
+
args.member.id
|
|
122551
|
+
);
|
|
122552
|
+
if (declarationDefault) {
|
|
122553
|
+
heldChildren.set(
|
|
122554
|
+
args.seed.valueId,
|
|
122555
|
+
storedChildIds(
|
|
122556
|
+
args.previousMember && !isStaticMember(args.previousMember) ? args.previousMember.defaultValue?.value : void 0
|
|
122557
|
+
)
|
|
122558
|
+
);
|
|
122559
|
+
}
|
|
122560
|
+
let materialized;
|
|
122561
|
+
try {
|
|
122562
|
+
materialized = materializeAuthoredStaticSeed({
|
|
122563
|
+
document: args.document,
|
|
122564
|
+
documentIndex: args.documentIndex,
|
|
122565
|
+
member: materializationMember,
|
|
122566
|
+
seed: { ...args.seed, values: args.seed.values },
|
|
122567
|
+
allowExistingRows: args.memberChange === null || args.memberChange.change.operation === "update"
|
|
122568
|
+
});
|
|
122569
|
+
} finally {
|
|
122570
|
+
if (declarationDefault) {
|
|
122571
|
+
if (previousHeld === void 0) heldChildren.delete(args.seed.valueId);
|
|
122572
|
+
else heldChildren.set(args.seed.valueId, previousHeld);
|
|
122573
|
+
}
|
|
122574
|
+
}
|
|
122505
122575
|
const {
|
|
122506
122576
|
createdValues,
|
|
122507
122577
|
localizedTexts,
|
|
122508
122578
|
storageKeyDeclarations,
|
|
122509
122579
|
rootValue,
|
|
122510
122580
|
existingValueIds
|
|
122511
|
-
} =
|
|
122512
|
-
document: args.document,
|
|
122513
|
-
documentIndex: args.documentIndex,
|
|
122514
|
-
member: materializationMember,
|
|
122515
|
-
seed: { ...args.seed, values: args.seed.values },
|
|
122516
|
-
allowExistingRows: args.memberChange === null || args.memberChange.change.operation === "update"
|
|
122517
|
-
});
|
|
122581
|
+
} = materialized;
|
|
122518
122582
|
stampCreatedValuesMapKey(createdValues, null);
|
|
122519
122583
|
applyDeclaredStorageKeyOverrides({
|
|
122520
122584
|
createdValues,
|
|
@@ -137443,18 +137507,32 @@ function lowerRowBackedDefault(context, member, backed, baseData3, binding) {
|
|
|
137443
137507
|
environment
|
|
137444
137508
|
))
|
|
137445
137509
|
continue;
|
|
137446
|
-
|
|
137510
|
+
const rows = /* @__PURE__ */ new Map();
|
|
137511
|
+
const localizedTexts = /* @__PURE__ */ new Map();
|
|
137512
|
+
const childId = lowerSeedChild(
|
|
137447
137513
|
context,
|
|
137448
137514
|
childValueMember,
|
|
137449
137515
|
assignment.value,
|
|
137450
137516
|
binding,
|
|
137451
137517
|
`${binding.label}.${assignment.name}`,
|
|
137452
|
-
|
|
137453
|
-
|
|
137518
|
+
rows,
|
|
137519
|
+
localizedTexts,
|
|
137454
137520
|
void 0,
|
|
137455
137521
|
environment,
|
|
137456
137522
|
childSlice
|
|
137457
137523
|
);
|
|
137524
|
+
if (member.partial !== true && !(assignment.value.kind === "ident" && context.localValues.has(assignment.value.name)) && freshChildReplaysDeclaredDefault({
|
|
137525
|
+
context,
|
|
137526
|
+
childMember,
|
|
137527
|
+
childId,
|
|
137528
|
+
rows,
|
|
137529
|
+
localizedTexts,
|
|
137530
|
+
environment
|
|
137531
|
+
})) {
|
|
137532
|
+
deleteSeedRow(context, rows, childId);
|
|
137533
|
+
continue;
|
|
137534
|
+
}
|
|
137535
|
+
body[assignment.name] = childId;
|
|
137458
137536
|
}
|
|
137459
137537
|
return {
|
|
137460
137538
|
value: body,
|
|
@@ -152354,7 +152432,8 @@ function computeStatus(workspace, options, conflictedFiles, parseErrors, parseWa
|
|
|
152354
152432
|
}
|
|
152355
152433
|
}
|
|
152356
152434
|
} catch (error) {
|
|
152357
|
-
parseErrors.
|
|
152435
|
+
if (!parseErrors.some(isBlockingSchemaSourceError))
|
|
152436
|
+
parseErrors.push(diagnostic(error));
|
|
152358
152437
|
}
|
|
152359
152438
|
invalidSchema = parseErrors.some(isBlockingSchemaSourceError);
|
|
152360
152439
|
}
|
|
@@ -152383,6 +152462,8 @@ function computeStatus(workspace, options, conflictedFiles, parseErrors, parseWa
|
|
|
152383
152462
|
);
|
|
152384
152463
|
return refusedStatus(conflictedFiles, parseErrors, parseWarnings);
|
|
152385
152464
|
}
|
|
152465
|
+
if (schemaDocuments === void 0 && invalidSchema)
|
|
152466
|
+
return refusedStatus(conflictedFiles, parseErrors, parseWarnings);
|
|
152386
152467
|
const sourceByKey = manifestRecordSources(manifest);
|
|
152387
152468
|
const documents = schemaDocuments ?? projectSchemaManifestToDocuments(manifest, documentContext);
|
|
152388
152469
|
const documentsByKey = new Map(
|
|
@@ -205722,7 +205803,7 @@ There is no --keep-current: preserving current semantic state defines flatten.
|
|
|
205722
205803
|
async function main() {
|
|
205723
205804
|
const args = parseArgs(process.argv.slice(2));
|
|
205724
205805
|
if (args.command === "--version") {
|
|
205725
|
-
console.log("0.82.
|
|
205806
|
+
console.log("0.82.2");
|
|
205726
205807
|
return;
|
|
205727
205808
|
}
|
|
205728
205809
|
if (args.command === null || args.command === "help" || args.command === "--help" || args.command === "-h") {
|
package/dist/test-worker.mjs
CHANGED
|
@@ -61885,7 +61885,7 @@ var INITIALIZER_KEY_PLACEHOLDER = new RegExp(
|
|
|
61885
61885
|
|
|
61886
61886
|
// ../packages/manifest/schema-contract/registry.mjs
|
|
61887
61887
|
var PROJECT_SCHEMA_CONTRACT = Object.freeze({
|
|
61888
|
-
cliVersion: "0.82.
|
|
61888
|
+
cliVersion: "0.82.2",
|
|
61889
61889
|
projectFileUploadBatchSize: 32,
|
|
61890
61890
|
documentRecords: {
|
|
61891
61891
|
member: {
|
package/package.json
CHANGED
|
@@ -129,7 +129,7 @@ wrappers.
|
|
|
129
129
|
The marker near the top of `SKILL.md` must exactly match the package version:
|
|
130
130
|
|
|
131
131
|
```html
|
|
132
|
-
<!-- reviewed-through-cli: 0.82.
|
|
132
|
+
<!-- reviewed-through-cli: 0.82.2 -->
|
|
133
133
|
```
|
|
134
134
|
|
|
135
135
|
The quoted version above is checked too, so this instruction cannot go stale
|
|
@@ -196,6 +196,12 @@ not clone it or turn it into a separate wrapper object. An optional generic
|
|
|
196
196
|
argument checks the target type. Lookup assignment still requires an existing
|
|
197
197
|
backing row and enforces its declared target and collection constraints.
|
|
198
198
|
|
|
199
|
+
A class-constrained generic lookup may select from a collection of its bound
|
|
200
|
+
class. For example, `Reference<TAsset>` with `TAsset extends HeldItemAsset`
|
|
201
|
+
may use `@settings(collection: CosmeticAssets.HeldItems)` when that collection
|
|
202
|
+
holds `HeldItemAsset`. Derived classes may specialize the target and override
|
|
203
|
+
the member; retain the collection setting on each override.
|
|
204
|
+
|
|
199
205
|
Use the `Reference` intrinsic. Prefer the most readable form the target
|
|
200
206
|
supports:
|
|
201
207
|
|
|
@@ -259,6 +265,10 @@ that instance. Leaving the emitted construction unchanged creates no redundant
|
|
|
259
265
|
value rows. A nullable member with no default remains bare; an explicit null
|
|
260
266
|
default emits `= null`.
|
|
261
267
|
|
|
268
|
+
Spelling an unchanged child default, such as `FPS = 8`, stays a no-op after
|
|
269
|
+
push even when sibling fields own stored rows. Adding a different child default
|
|
270
|
+
preserves those siblings' row identities; it does not transfer their ownership.
|
|
271
|
+
|
|
262
272
|
Omitted members are virtual projections of the instance's recorded constructor
|
|
263
273
|
or variant. Later edits to that source update every omitted member. Writing a
|
|
264
274
|
member creates a sparse override with its deterministic projected ID; removing
|