@shapeshift-labs/frontier-lang-compiler 0.2.93 → 0.2.94

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.
@@ -6,6 +6,9 @@ export type SemanticPatchBundleOverlapKind =
6
6
  | 'semantic-edit-key'
7
7
  | 'semantic-identity'
8
8
  | 'source-identity'
9
+ | 'semantic-edit-replay'
10
+ | 'replay-output'
11
+ | 'replay-current'
9
12
  | 'transform-content'
10
13
  | 'semantic-transform'
11
14
  | 'projection-identity'
@@ -27,6 +30,11 @@ export interface SemanticPatchBundleOverlapShared {
27
30
  readonly semanticEditKeys: readonly string[];
28
31
  readonly semanticIdentityHashes: readonly string[];
29
32
  readonly sourceIdentityHashes: readonly string[];
33
+ readonly semanticEditReplayIds: readonly string[];
34
+ readonly semanticEditReplayStatuses: readonly string[];
35
+ readonly semanticEditReplayActions: readonly string[];
36
+ readonly semanticEditReplayCurrentHashes: readonly string[];
37
+ readonly semanticEditReplayOutputHashes: readonly string[];
30
38
  readonly semanticTransformContentHashes: readonly string[];
31
39
  readonly semanticTransformIdentityHashes: readonly string[];
32
40
  readonly projectionIdentityHashes: readonly string[];
@@ -97,6 +105,16 @@ export interface SemanticPatchBundleOverlapQuery {
97
105
  readonly conflictKeys?: readonly string[];
98
106
  readonly semanticEditKey?: string | readonly string[];
99
107
  readonly semanticEditKeys?: readonly string[];
108
+ readonly semanticEditReplayId?: string | readonly string[];
109
+ readonly semanticEditReplayIds?: readonly string[];
110
+ readonly semanticEditReplayStatus?: string | readonly string[];
111
+ readonly semanticEditReplayStatuses?: readonly string[];
112
+ readonly semanticEditReplayAction?: string | readonly string[];
113
+ readonly semanticEditReplayActions?: readonly string[];
114
+ readonly semanticEditReplayCurrentHash?: string | readonly string[];
115
+ readonly semanticEditReplayCurrentHashes?: readonly string[];
116
+ readonly semanticEditReplayOutputHash?: string | readonly string[];
117
+ readonly semanticEditReplayOutputHashes?: readonly string[];
100
118
  readonly semanticTransformIdentityHash?: string | readonly string[];
101
119
  readonly semanticTransformIdentityHashes?: readonly string[];
102
120
  readonly semanticTransformContentHash?: string | readonly string[];
@@ -6,6 +6,9 @@ export const SemanticPatchBundleOverlapKinds=Object.freeze([
6
6
  'semantic-edit-key',
7
7
  'semantic-identity',
8
8
  'source-identity',
9
+ 'semantic-edit-replay',
10
+ 'replay-output',
11
+ 'replay-current',
9
12
  'transform-content',
10
13
  'semantic-transform',
11
14
  'projection-identity',
@@ -27,6 +30,9 @@ const KIND_FIELDS=Object.freeze({
27
30
  'semantic-edit-key':'semanticEditKeys',
28
31
  'semantic-identity':'semanticIdentityHashes',
29
32
  'source-identity':'sourceIdentityHashes',
33
+ 'semantic-edit-replay':'semanticEditReplayIds',
34
+ 'replay-output':'semanticEditReplayOutputHashes',
35
+ 'replay-current':'semanticEditReplayCurrentHashes',
30
36
  'transform-content':'semanticTransformContentHashes',
31
37
  'semantic-transform':'semanticTransformIdentityHashes',
32
38
  'projection-identity':'projectionIdentityHashes',
@@ -55,9 +61,9 @@ export function compareSemanticPatchBundleRecords(left={},right={},options={}){
55
61
  score:overlapScore(admission.status,shared,admission.reasonCodes),
56
62
  summary:{
57
63
  sharedKeys:countShared(shared),
58
- duplicateSignals:shared.operationContentHashes.length+shared.editContentHashes.length+shared.semanticTransformContentHashes.length,
64
+ duplicateSignals:shared.operationContentHashes.length+shared.editContentHashes.length+shared.semanticTransformContentHashes.length+shared.semanticEditReplayIds.length+shared.semanticEditReplayOutputHashes.length,
59
65
  semanticSignals:shared.semanticEditKeys.length+shared.semanticIdentityHashes.length+shared.sourceIdentityHashes.length+shared.semanticTransformIdentityHashes.length+shared.projectionIdentityHashes.length,
60
- sourceSignals:shared.regionKeys.length+shared.conflictKeys.length+shared.sourcePaths.length,
66
+ sourceSignals:shared.regionKeys.length+shared.conflictKeys.length+shared.sourcePaths.length+shared.semanticEditReplayCurrentHashes.length,
61
67
  baseHashMismatch:admission.reasonCodes.includes('base-hash-mismatch'),
62
68
  targetHashMismatch:admission.reasonCodes.includes('target-hash-mismatch')
63
69
  },
@@ -90,6 +96,11 @@ function sharedIndex(left,right,options){
90
96
  semanticEditKeys:intersect(left.semanticEditKeys,right.semanticEditKeys),
91
97
  semanticIdentityHashes:intersect(left.semanticIdentityHashes,right.semanticIdentityHashes),
92
98
  sourceIdentityHashes:intersect(left.sourceIdentityHashes,right.sourceIdentityHashes),
99
+ semanticEditReplayIds:intersect(left.semanticEditReplayIds,right.semanticEditReplayIds),
100
+ semanticEditReplayStatuses:intersect(left.semanticEditReplayStatuses,right.semanticEditReplayStatuses),
101
+ semanticEditReplayActions:intersect(left.semanticEditReplayActions,right.semanticEditReplayActions),
102
+ semanticEditReplayCurrentHashes:intersect(left.semanticEditReplayCurrentHashes,right.semanticEditReplayCurrentHashes),
103
+ semanticEditReplayOutputHashes:intersect(left.semanticEditReplayOutputHashes,right.semanticEditReplayOutputHashes),
93
104
  semanticTransformContentHashes:intersect(left.semanticTransformContentHashes,right.semanticTransformContentHashes),
94
105
  semanticTransformIdentityHashes:intersect(left.semanticTransformIdentityHashes,right.semanticTransformIdentityHashes),
95
106
  projectionIdentityHashes:intersect(left.projectionIdentityHashes,right.projectionIdentityHashes),
@@ -102,9 +113,9 @@ function sharedIndex(left,right,options){
102
113
  }
103
114
 
104
115
  function overlapAdmission(shared,{leftIndex,rightIndex,options}){
105
- const duplicate=shared.operationContentHashes.length||shared.editContentHashes.length||shared.semanticTransformContentHashes.length;
116
+ const duplicate=shared.operationContentHashes.length||shared.editContentHashes.length||shared.semanticTransformContentHashes.length||shared.semanticEditReplayIds.length||shared.semanticEditReplayOutputHashes.length;
106
117
  const semantic=shared.semanticEditKeys.length||shared.semanticIdentityHashes.length||shared.sourceIdentityHashes.length||shared.semanticTransformIdentityHashes.length||shared.projectionIdentityHashes.length;
107
- const source=shared.regionKeys.length||shared.conflictKeys.length||shared.sourcePaths.length;
118
+ const source=shared.regionKeys.length||shared.conflictKeys.length||shared.sourcePaths.length||shared.semanticEditReplayCurrentHashes.length;
108
119
  const status=duplicate?'duplicate':semantic?'semantic-overlap':source?'source-overlap':'independent';
109
120
  const reasonCodes=uniqueStrings([
110
121
  shared.operationContentHashes.length?'same-operation-content':undefined,
@@ -113,6 +124,9 @@ function overlapAdmission(shared,{leftIndex,rightIndex,options}){
113
124
  shared.semanticEditKeys.length?'same-semantic-edit-key':undefined,
114
125
  shared.semanticIdentityHashes.length?'same-semantic-identity':undefined,
115
126
  shared.sourceIdentityHashes.length?'same-source-identity':undefined,
127
+ shared.semanticEditReplayIds.length?'same-semantic-edit-replay':undefined,
128
+ shared.semanticEditReplayOutputHashes.length?'same-replay-output':undefined,
129
+ shared.semanticEditReplayCurrentHashes.length?'same-replay-current':undefined,
116
130
  shared.semanticTransformIdentityHashes.length?'same-semantic-transform':undefined,
117
131
  shared.projectionIdentityHashes.length?'same-projection-identity':undefined,
118
132
  shared.regionKeys.length?'same-region-key':undefined,
@@ -141,6 +155,11 @@ function bundleIndex(record){
141
155
  semanticEditKeys:uniqueStrings(index.semanticEditKeys),
142
156
  semanticIdentityHashes:uniqueStrings(index.semanticIdentityHashes),
143
157
  sourceIdentityHashes:uniqueStrings(index.sourceIdentityHashes),
158
+ semanticEditReplayIds:uniqueStrings(index.semanticEditReplayIds),
159
+ semanticEditReplayStatuses:uniqueStrings(index.semanticEditReplayStatuses),
160
+ semanticEditReplayActions:uniqueStrings(index.semanticEditReplayActions),
161
+ semanticEditReplayCurrentHashes:uniqueStrings(index.semanticEditReplayCurrentHashes),
162
+ semanticEditReplayOutputHashes:uniqueStrings(index.semanticEditReplayOutputHashes),
144
163
  semanticTransformContentHashes:uniqueStrings(index.semanticTransformContentHashes),
145
164
  semanticTransformIdentityHashes:uniqueStrings(index.semanticTransformIdentityHashes),
146
165
  projectionIdentityHashes:uniqueStrings(index.projectionIdentityHashes),
@@ -161,6 +180,11 @@ function matchesOverlap(overlap,query){
161
180
  &&matchAny(queryValues(query.sourcePath,query.sourcePaths),overlap.shared.sourcePaths)
162
181
  &&matchAny(queryValues(query.conflictKey,query.conflictKeys),overlap.shared.conflictKeys)
163
182
  &&matchAny(queryValues(query.semanticEditKey,query.semanticEditKeys),overlap.shared.semanticEditKeys)
183
+ &&matchAny(queryValues(query.semanticEditReplayId,query.semanticEditReplayIds),overlap.shared.semanticEditReplayIds)
184
+ &&matchAny(queryValues(query.semanticEditReplayStatus,query.semanticEditReplayStatuses),overlap.shared.semanticEditReplayStatuses)
185
+ &&matchAny(queryValues(query.semanticEditReplayAction,query.semanticEditReplayActions),overlap.shared.semanticEditReplayActions)
186
+ &&matchAny(queryValues(query.semanticEditReplayCurrentHash,query.semanticEditReplayCurrentHashes),overlap.shared.semanticEditReplayCurrentHashes)
187
+ &&matchAny(queryValues(query.semanticEditReplayOutputHash,query.semanticEditReplayOutputHashes),overlap.shared.semanticEditReplayOutputHashes)
164
188
  &&matchAny(queryValues(query.semanticTransformIdentityHash,query.semanticTransformIdentityHashes),overlap.shared.semanticTransformIdentityHashes)
165
189
  &&matchAny(queryValues(query.semanticTransformContentHash,query.semanticTransformContentHashes),overlap.shared.semanticTransformContentHashes)
166
190
  &&matchAny(queryValues(query.projectionIdentityHash,query.projectionIdentityHashes),overlap.shared.projectionIdentityHashes)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapeshift-labs/frontier-lang-compiler",
3
- "version": "0.2.93",
3
+ "version": "0.2.94",
4
4
  "description": "Compiler facade for Frontier Lang source documents and language projection adapters.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",