mirror of
https://github.com/morluto/rea.git
synced 2026-11-10 16:57:19 +00:00
fix(javascript): separate endpoint syntax correspondence from target identity
This commit is contained in:
1 parent
6c307e9c86
commit
f6b525d3af
6 files changed
+451
-28
No files matched your search
@@ -5,6 +5,7 @@ import {
|
||||
} from "../unicodeCodePointOrder.js";
|
||||
import type { ApplicationNode } from "./javascriptApplicationGraphSchemas.js";
|
||||
import type { JsonValue } from "../jsonValue.js";
|
||||
import { applicationEndpointCorrespondence } from "./javascriptApplicationEndpointCorrespondence.js";
|
||||
|
||||
/** One deterministic one-to-one match between two graph versions. */
|
||||
type ApplicationVersionPairMatch =
|
||||
@@ -253,11 +254,8 @@ const semanticValue = (
|
||||
node: ApplicationNode,
|
||||
properties: Readonly<Record<string, JsonValue>>,
|
||||
): string | null => {
|
||||
if (node.kind === "endpoint") {
|
||||
const kind = nonEmptyString(properties.endpoint_kind);
|
||||
const value = exactString(properties.value);
|
||||
return kind === null || value === null ? null : `${kind}\0${value}`;
|
||||
}
|
||||
if (node.kind === "endpoint")
|
||||
return applicationEndpointCorrespondence(node).semanticKey;
|
||||
if (node.kind === "storage")
|
||||
return joined(
|
||||
properties.storage_kind,
|
||||
|
||||
Reference in new issue
Block a user