@neocompose/cli 0.69.0 → 0.70.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 +14 -0
- package/README.md +2 -2
- package/dist/neo.mjs +38258 -37778
- package/dist/test-worker.mjs +127 -33
- 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/commands-and-sync.md +18 -5
package/dist/test-worker.mjs
CHANGED
|
@@ -1831,36 +1831,36 @@ function createWritableAncestorLookup(memberById) {
|
|
|
1831
1831
|
}
|
|
1832
1832
|
|
|
1833
1833
|
// ../src/models/members/member-kind-enum.ts
|
|
1834
|
-
var MemberKind = /* @__PURE__ */ ((
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
return
|
|
1834
|
+
var MemberKind = /* @__PURE__ */ ((MemberKind13) => {
|
|
1835
|
+
MemberKind13[MemberKind13["Null"] = 0] = "Null";
|
|
1836
|
+
MemberKind13[MemberKind13["Bool"] = 1] = "Bool";
|
|
1837
|
+
MemberKind13[MemberKind13["Int"] = 2] = "Int";
|
|
1838
|
+
MemberKind13[MemberKind13["String"] = 3] = "String";
|
|
1839
|
+
MemberKind13[MemberKind13["Float"] = 4] = "Float";
|
|
1840
|
+
MemberKind13[MemberKind13["Dictionary"] = 5] = "Dictionary";
|
|
1841
|
+
MemberKind13[MemberKind13["List"] = 6] = "List";
|
|
1842
|
+
MemberKind13[MemberKind13["Class"] = 7] = "Class";
|
|
1843
|
+
MemberKind13[MemberKind13["Enum"] = 8] = "Enum";
|
|
1844
|
+
MemberKind13[MemberKind13["Lookup"] = 9] = "Lookup";
|
|
1845
|
+
MemberKind13[MemberKind13["NSProperty"] = 10] = "NSProperty";
|
|
1846
|
+
MemberKind13[MemberKind13["Sprite"] = 11] = "Sprite";
|
|
1847
|
+
MemberKind13[MemberKind13["Audio"] = 12] = "Audio";
|
|
1848
|
+
MemberKind13[MemberKind13["Function"] = 13] = "Function";
|
|
1849
|
+
MemberKind13[MemberKind13["Vector2"] = 14] = "Vector2";
|
|
1850
|
+
MemberKind13[MemberKind13["Vector2Int"] = 15] = "Vector2Int";
|
|
1851
|
+
MemberKind13[MemberKind13["Vector3"] = 16] = "Vector3";
|
|
1852
|
+
MemberKind13[MemberKind13["Vector3Int"] = 17] = "Vector3Int";
|
|
1853
|
+
MemberKind13[MemberKind13["DialogueLookup"] = 18] = "DialogueLookup";
|
|
1854
|
+
MemberKind13[MemberKind13["Color"] = 19] = "Color";
|
|
1855
|
+
MemberKind13[MemberKind13["Decimal"] = 20] = "Decimal";
|
|
1856
|
+
MemberKind13[MemberKind13["Generic"] = 21] = "Generic";
|
|
1857
|
+
MemberKind13[MemberKind13["Interface"] = 22] = "Interface";
|
|
1858
|
+
MemberKind13[MemberKind13["NSFunction"] = 23] = "NSFunction";
|
|
1859
|
+
MemberKind13[MemberKind13["FunctionRef"] = 24] = "FunctionRef";
|
|
1860
|
+
MemberKind13[MemberKind13["NSDelegate"] = 25] = "NSDelegate";
|
|
1861
|
+
MemberKind13[MemberKind13["NSAction"] = 26] = "NSAction";
|
|
1862
|
+
MemberKind13[MemberKind13["Variant"] = 27] = "Variant";
|
|
1863
|
+
return MemberKind13;
|
|
1864
1864
|
})(MemberKind || {});
|
|
1865
1865
|
|
|
1866
1866
|
// ../src/models/members/member-kind-taxonomy.ts
|
|
@@ -14657,7 +14657,7 @@ function layerEvaluatorLookups(base, overlay) {
|
|
|
14657
14657
|
return merged.length === 0 ? void 0 : merged;
|
|
14658
14658
|
};
|
|
14659
14659
|
const unorderedMembership = /* @__PURE__ */ new Map();
|
|
14660
|
-
const
|
|
14660
|
+
const unorderedListEntryIds2 = (containerId) => {
|
|
14661
14661
|
const cached = unorderedMembership.get(containerId);
|
|
14662
14662
|
if (cached !== void 0) return cached;
|
|
14663
14663
|
const own = localUnorderedMembership.get(containerId) ?? [];
|
|
@@ -14724,7 +14724,7 @@ function layerEvaluatorLookups(base, overlay) {
|
|
|
14724
14724
|
memberById: (id) => base.memberById(id),
|
|
14725
14725
|
valueById: (id) => overlay.rows.get(id) ?? (overlay.hiddenIds.has(id) ? null : base.valueById(id)),
|
|
14726
14726
|
hasStoredValueId: (id) => overlay.rows.has(id) || !overlay.hiddenIds.has(id) && (base.hasStoredValueId?.(id) ?? false),
|
|
14727
|
-
unorderedListEntryIds,
|
|
14727
|
+
unorderedListEntryIds: unorderedListEntryIds2,
|
|
14728
14728
|
virtualInstanceRowsForValue: () => [],
|
|
14729
14729
|
rowForValueReference: (value) => evaluatorIndexes2.rowByValueReference.get(value) ?? null,
|
|
14730
14730
|
evaluatorIndexes: evaluatorIndexes2,
|
|
@@ -37258,6 +37258,17 @@ var StrictNeoScriptResolver = class _StrictNeoScriptResolver {
|
|
|
37258
37258
|
targetType,
|
|
37259
37259
|
schemaClass
|
|
37260
37260
|
);
|
|
37261
|
+
if (memberType.kind === "action") {
|
|
37262
|
+
return {
|
|
37263
|
+
schemaKey: member.schemaKey ?? member.name,
|
|
37264
|
+
memberId: member.id,
|
|
37265
|
+
valuePointer: this.resolveReplayedListenerSet(
|
|
37266
|
+
entry.value,
|
|
37267
|
+
memberType,
|
|
37268
|
+
scope
|
|
37269
|
+
)
|
|
37270
|
+
};
|
|
37271
|
+
}
|
|
37261
37272
|
const value = this.resolveExpression(entry.value, scope, memberType);
|
|
37262
37273
|
if (!isNeoScriptTypeAssignable(value.type, memberType, this.project)) {
|
|
37263
37274
|
throw new CompileError(
|
|
@@ -37272,6 +37283,43 @@ var StrictNeoScriptResolver = class _StrictNeoScriptResolver {
|
|
|
37272
37283
|
};
|
|
37273
37284
|
});
|
|
37274
37285
|
}
|
|
37286
|
+
/**
|
|
37287
|
+
* P62 §2. A stored action slot replays as the listener list it stores. Each
|
|
37288
|
+
* entry resolves to the same static (member, row) identity the authored list
|
|
37289
|
+
* lowers to. Executable script cannot reassign a listener set (§3.2).
|
|
37290
|
+
*/
|
|
37291
|
+
resolveReplayedListenerSet(expression, actionType, scope) {
|
|
37292
|
+
if (this.context.storedConstructionReplay !== true) {
|
|
37293
|
+
throw new CompileError(
|
|
37294
|
+
`Cannot assign to ${this.describe(actionType)}; a listener set is not reassignable from script. Use '+=' to add a listener or '-=' to remove one.`,
|
|
37295
|
+
expression.pos
|
|
37296
|
+
);
|
|
37297
|
+
}
|
|
37298
|
+
if (expression.kind !== "litList") {
|
|
37299
|
+
throw new CompileError(
|
|
37300
|
+
`A stored ${this.describe(actionType)} replays as a bracketed listener list.`,
|
|
37301
|
+
expression.pos
|
|
37302
|
+
);
|
|
37303
|
+
}
|
|
37304
|
+
const listeners = [];
|
|
37305
|
+
for (const element of expression.elements) {
|
|
37306
|
+
const listener = this.resolveActionListener(element, actionType, scope);
|
|
37307
|
+
if (listener.type !== "value" /* Value */) {
|
|
37308
|
+
throw new CompileError(
|
|
37309
|
+
"A stored listener must name a stable (member, row) target.",
|
|
37310
|
+
element.pos
|
|
37311
|
+
);
|
|
37312
|
+
}
|
|
37313
|
+
listeners.push(listener.value.value);
|
|
37314
|
+
}
|
|
37315
|
+
return {
|
|
37316
|
+
type: "value" /* Value */,
|
|
37317
|
+
value: {
|
|
37318
|
+
typeInfo: toWireType(actionType, this.project),
|
|
37319
|
+
value: { listeners }
|
|
37320
|
+
}
|
|
37321
|
+
};
|
|
37322
|
+
}
|
|
37275
37323
|
resolveTileConversion(callee, args, typeArguments, scope, pos) {
|
|
37276
37324
|
const receiver = this.resolveExpression(callee.receiver, scope);
|
|
37277
37325
|
const owner = receiver.type.kind === "named" ? this.project.typeById.get(receiver.type.typeId) : void 0;
|
|
@@ -43398,7 +43446,6 @@ var project_document_read_exports = {};
|
|
|
43398
43446
|
__export(project_document_read_exports, {
|
|
43399
43447
|
DOCUMENT_MANIFEST_PAGE_SIZE: () => DOCUMENT_MANIFEST_PAGE_SIZE,
|
|
43400
43448
|
assembleProjectDocumentRaw: () => assembleProjectDocumentRaw,
|
|
43401
|
-
createDocumentPageReader: () => createDocumentPageReader,
|
|
43402
43449
|
fetchProjectDocumentPartitionRecords: () => fetchProjectDocumentPartitionRecords,
|
|
43403
43450
|
fetchProjectDocumentRawChunked: () => fetchProjectDocumentRawChunked,
|
|
43404
43451
|
fetchProjectDocumentRawChunkedOnce: () => fetchProjectDocumentRawChunkedOnce,
|
|
@@ -50882,6 +50929,53 @@ var PRESIGN_BATCH_SIZE = Math.min(
|
|
|
50882
50929
|
PROJECT_FILE_UPLOAD_BATCH_SIZE
|
|
50883
50930
|
);
|
|
50884
50931
|
|
|
50932
|
+
// node_modules/@formatjs/icu-messageformat-parser/index.js
|
|
50933
|
+
var SPACE_SEPARATOR_REGEX = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
50934
|
+
var IDENTIFIER_PREFIX_REGEX = /([^\t-\r -\/:-@\[-\^`\{-~\x85\xA0-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u1680\u2000-\u200A\u2010-\u2029\u202F-\u203E\u2041-\u2053\u2055-\u205F\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3000-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]*)/g;
|
|
50935
|
+
var SPACE_SEPARATOR_START_REGEX = new RegExp(`^${SPACE_SEPARATOR_REGEX.source}*`);
|
|
50936
|
+
var SPACE_SEPARATOR_END_REGEX = new RegExp(`${SPACE_SEPARATOR_REGEX.source}*$`);
|
|
50937
|
+
var hasTrimStart = !!String.prototype.trimStart;
|
|
50938
|
+
var hasTrimEnd = !!String.prototype.trimEnd;
|
|
50939
|
+
var IDENTIFIER_PREFIX_RE = createIdentifierPrefixRegex();
|
|
50940
|
+
function createIdentifierPrefixRegex() {
|
|
50941
|
+
try {
|
|
50942
|
+
const regex = new RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
50943
|
+
if (regex.exec("a ")?.[1] === "a") return regex;
|
|
50944
|
+
} catch {
|
|
50945
|
+
}
|
|
50946
|
+
return IDENTIFIER_PREFIX_REGEX;
|
|
50947
|
+
}
|
|
50948
|
+
|
|
50949
|
+
// ../src/models/exports/project-unity-export-utils.ts
|
|
50950
|
+
var ANIMATION_OWNED_VALUE_KINDS = /* @__PURE__ */ new Set([
|
|
50951
|
+
NeoWorldSystemClassKind.AnimationFrame,
|
|
50952
|
+
NeoWorldSystemClassKind.AnimationChildOverride,
|
|
50953
|
+
NeoWorldSystemClassKind.AnimationChildTrack
|
|
50954
|
+
]);
|
|
50955
|
+
|
|
50956
|
+
// ../src/models/exports/unity-codegen/generate-unity-classes.ts
|
|
50957
|
+
var SMART_TILE_CONTRACT_WORLD_KINDS = /* @__PURE__ */ new Set([
|
|
50958
|
+
NeoWorldSystemClassKind.Tile,
|
|
50959
|
+
NeoWorldSystemClassKind.SmartTile,
|
|
50960
|
+
NeoWorldSystemClassKind.SmartTileRule,
|
|
50961
|
+
NeoWorldSystemClassKind.SmartTileNeighbor
|
|
50962
|
+
]);
|
|
50963
|
+
var WORLD_OBJECT_CONTRACT_WORLD_KINDS = /* @__PURE__ */ new Set([
|
|
50964
|
+
NeoWorldSystemClassKind.ObjectBase,
|
|
50965
|
+
NeoWorldSystemClassKind.Object,
|
|
50966
|
+
NeoWorldSystemClassKind.ObjectCollider,
|
|
50967
|
+
NeoWorldSystemClassKind.SortingGroup,
|
|
50968
|
+
NeoWorldSystemClassKind.SpriteObject
|
|
50969
|
+
]);
|
|
50970
|
+
|
|
50971
|
+
// src/export-state.ts
|
|
50972
|
+
import { join } from "node:path";
|
|
50973
|
+
var EXPORT_STATE_FILE = join(".neo", "export.json");
|
|
50974
|
+
|
|
50975
|
+
// src/commands/export.ts
|
|
50976
|
+
var PARTITIONS_DIRECTORY = "Partitions";
|
|
50977
|
+
var MAIN_PARTITION_FILE = `${PARTITIONS_DIRECTORY}/main.json`;
|
|
50978
|
+
|
|
50885
50979
|
// src/commands/push.ts
|
|
50886
50980
|
var {
|
|
50887
50981
|
compileNSVoidBody: compileNSVoidBody2,
|
package/package.json
CHANGED
|
@@ -110,7 +110,7 @@ wrappers.
|
|
|
110
110
|
The marker near the top of `SKILL.md` must exactly match the package version:
|
|
111
111
|
|
|
112
112
|
```html
|
|
113
|
-
<!-- reviewed-through-cli: 0.
|
|
113
|
+
<!-- reviewed-through-cli: 0.70.0 -->
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
The quoted version above is checked too, so this instruction cannot go stale
|
|
@@ -292,22 +292,35 @@ machine-readable output and do not depend on interactive pickers or confirms.
|
|
|
292
292
|
|
|
293
293
|
## Unity export
|
|
294
294
|
|
|
295
|
-
`neo export` builds the Unity export from the
|
|
296
|
-
into the directories the Unity project's `NeoComposeConfig` asset names:
|
|
295
|
+
`neo export` builds the Unity export from the working copy, offline, and writes
|
|
296
|
+
it into the directories the Unity project's `NeoComposeConfig` asset names:
|
|
297
297
|
`project.json` with a partition index, `Partitions/*.json` holding value rows
|
|
298
298
|
by storage partition, localization files, and generated C# under
|
|
299
299
|
`<generatedTypesDirectory>/Generated/`. It writes only files whose bytes
|
|
300
300
|
changed, skips codegen when only values changed since the last export into
|
|
301
301
|
that Unity project, and writes `Library/NeoCompose/export.json` last for
|
|
302
|
-
Unity to ingest.
|
|
302
|
+
Unity to ingest.
|
|
303
|
+
|
|
304
|
+
- A clean working copy exports the last pull. Local edits, `Files/` bytes
|
|
305
|
+
included, make the export local: `project.json` gets
|
|
306
|
+
`metadata.localExport`, Unity fails player builds and keeps saves under
|
|
307
|
+
`NeoCompose/LocalExport`, and a push or a clean export ends it.
|
|
308
|
+
- Ids minted for local declarations are kept in `.neo/export.json`'s
|
|
309
|
+
`identityLedger`, so the push commits the ids Unity already saw. A push
|
|
310
|
+
re-exports into the Unity project a local export went to.
|
|
311
|
+
- `neo dev` runs `neo export` after every change to source, `Files/`,
|
|
312
|
+
`neo.json`, `.neo/state.json` or the config asset. It never pulls or pushes.
|
|
313
|
+
- Pull, push, branch, merge, resolve, init and export take turns through
|
|
314
|
+
`.neo/workspace.lock`; a lock whose process died is taken over.
|
|
303
315
|
|
|
304
316
|
- The Unity project comes from `unityConfigPath`. Without it, an interactive
|
|
305
317
|
export offers to link the one config asset naming this project; scripts get
|
|
306
318
|
an error with the line to add.
|
|
307
319
|
- `--unity-project <dir>` exports into another Unity project without linking
|
|
308
320
|
it. Agent rigs use it.
|
|
309
|
-
-
|
|
310
|
-
|
|
321
|
+
- A source error, a file conflict, a `download` file action, an error
|
|
322
|
+
diagnostic, or an unchanged project file whose bytes differ from the pulled
|
|
323
|
+
file stops the export before anything is written.
|
|
311
324
|
- `NeoGeneratedFiles.json` keeps `.meta` GUIDs across type renames. Keep it
|
|
312
325
|
with the generated files.
|
|
313
326
|
|