@shapeshift-labs/frontier-lang-parser 0.3.29 → 0.3.30
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/README.md +4 -4
- package/dist/application-surface.js +7 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -347,10 +347,10 @@ plugin WeatherWidget @id("plugin_weather_widget") {
|
|
|
347
347
|
The parser stores these blocks in `metadata.applicationSurfaces` and mirrors
|
|
348
348
|
them under `metadata.universalAst.applicationSurfaces`. They are composition
|
|
349
349
|
contracts, not compatibility proof: `runtimeEquivalenceClaim`,
|
|
350
|
-
`
|
|
351
|
-
`pluginCompatibilityClaim`, and
|
|
352
|
-
higher layer supplies source-bound
|
|
353
|
-
evidence.
|
|
350
|
+
`autoMergeClaim`, `semanticEquivalenceClaim`, `abiCompatibilityClaim`,
|
|
351
|
+
`projectionEquivalenceClaim`, `pluginCompatibilityClaim`, and
|
|
352
|
+
`sandboxSafetyClaim` remain false until a higher layer supplies source-bound
|
|
353
|
+
runtime, ABI, projection, sandbox, and admission evidence.
|
|
354
354
|
|
|
355
355
|
## Authored target projection syntax
|
|
356
356
|
|
|
@@ -57,6 +57,11 @@ export function parseApplicationSurfaceBlock(block) {
|
|
|
57
57
|
|
|
58
58
|
export function mergeApplicationSurfaceBlocks(blocks) {
|
|
59
59
|
const records = blocks.flatMap((block) => block.records ?? []);
|
|
60
|
+
const evidenceIds = [
|
|
61
|
+
...blocks.flatMap((block) => ids(block.evidence)),
|
|
62
|
+
...records.flatMap((record) => record.evidenceIds ?? []),
|
|
63
|
+
...records.flatMap((record) => record.proofEvidenceIds ?? [])
|
|
64
|
+
];
|
|
60
65
|
return {
|
|
61
66
|
id: blocks.length === 1 ? blocks[0].id : 'applicationSurfaces:source',
|
|
62
67
|
surfaces: blocks,
|
|
@@ -69,7 +74,7 @@ export function mergeApplicationSurfaceBlocks(blocks) {
|
|
|
69
74
|
eventIds: idsByRecordKind(records, 'event'),
|
|
70
75
|
assetIds: idsByRecordKind(records, 'asset'),
|
|
71
76
|
gateIds: idsByRecordKind(records, 'gate'),
|
|
72
|
-
evidenceIds:
|
|
77
|
+
evidenceIds: [...new Set(evidenceIds.filter(Boolean))],
|
|
73
78
|
proofGapCodes: [...new Set(blocks.flatMap((block) => (block.proofGaps ?? []).map((gap) => gap.code).filter(Boolean)))],
|
|
74
79
|
summary: {
|
|
75
80
|
surfaceCount: blocks.length,
|
|
@@ -100,7 +105,7 @@ function applicationRecord(kind, name, text, context) {
|
|
|
100
105
|
surfaceName: context.surfaceName,
|
|
101
106
|
role: context.role,
|
|
102
107
|
identityKey: readInlineWord('identity', text) ?? readInlineWord('identityKey', text) ?? `${kind}:${context.role}:${recordName}`,
|
|
103
|
-
sourcePath: readInlineWord('sourcePath', text) ??
|
|
108
|
+
sourcePath: readInlineWord('sourcePath', text) ?? context.sourcePath,
|
|
104
109
|
sourceHash: readInlineWord('sourceHash', text) ?? context.sourceHash,
|
|
105
110
|
sourceSpan: parseSpan(readInlineWord('sourceSpan', text)),
|
|
106
111
|
evidenceIds: readInlineList(text, 'evidence', 'evidenceIds'),
|