@hyperscale0/hsx 1.0.248 → 1.0.256
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 +2 -3
- package/SECURITY.md +1 -1
- package/dist/src/compile.d.ts.map +1 -1
- package/dist/src/compile.js +16 -0
- package/dist/src/compile.js.map +1 -1
- package/docs/README.md +7 -127
- package/examples/cost-table.json +0 -492
- package/package.json +4 -4
- package/src/compile.ts +27 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperscale0/hsx",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.256",
|
|
4
4
|
"description": "The strictly typed HSX language: compile total financial programs into canonical UDL.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hsx",
|
|
@@ -84,8 +84,8 @@
|
|
|
84
84
|
"examples:bundle": "bun scripts/bundle-examples.ts"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@hyperscale0/adl": "1.0.
|
|
88
|
-
"@hyperscale0/udl": "1.0.
|
|
87
|
+
"@hyperscale0/adl": "1.0.256",
|
|
88
|
+
"@hyperscale0/udl": "1.0.256",
|
|
89
89
|
"fast-sha256": "1.3.0"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"Amir Ayub",
|
|
98
98
|
"Sara AlBakaawi"
|
|
99
99
|
],
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "07ad8468f0b168abd6f6950c8f70c3201d62fa40"
|
|
101
101
|
}
|
package/src/compile.ts
CHANGED
|
@@ -2658,6 +2658,33 @@ export function compile(
|
|
|
2658
2658
|
"write party_name: 70%",
|
|
2659
2659
|
);
|
|
2660
2660
|
total += Number(literal(rate));
|
|
2661
|
+
const recipientRole = subjectPartyRoles.includes(
|
|
2662
|
+
recipient.value as SubjectPartyRole,
|
|
2663
|
+
);
|
|
2664
|
+
if (
|
|
2665
|
+
attachmentInfo &&
|
|
2666
|
+
(recipientRole ||
|
|
2667
|
+
document.parties[recipient.value]?.kind ===
|
|
2668
|
+
"business") &&
|
|
2669
|
+
!Object.values(attachmentInfo.parties).some(
|
|
2670
|
+
(binding) =>
|
|
2671
|
+
("role" in binding &&
|
|
2672
|
+
binding.role === recipient.value) ||
|
|
2673
|
+
("party" in binding &&
|
|
2674
|
+
binding.party === recipient.value),
|
|
2675
|
+
)
|
|
2676
|
+
) {
|
|
2677
|
+
let binding = "splitRecipient";
|
|
2678
|
+
for (
|
|
2679
|
+
let index = 2;
|
|
2680
|
+
Object.hasOwn(attachmentInfo.parties, binding);
|
|
2681
|
+
index++
|
|
2682
|
+
)
|
|
2683
|
+
binding = `splitRecipient${index}`;
|
|
2684
|
+
attachmentInfo.parties[binding] = recipientRole
|
|
2685
|
+
? { role: recipient.value as SubjectPartyRole }
|
|
2686
|
+
: { party: recipient.value };
|
|
2687
|
+
}
|
|
2661
2688
|
const target = `${name}_${key}_share${index + 1}`;
|
|
2662
2689
|
if (fields.some((f) => f.name === target))
|
|
2663
2690
|
fail(
|