@hyperscale0/hsx 2.0.3 → 2.0.5
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 +21 -0
- package/dist/src/cli.d.ts +1 -1
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +6 -2
- package/dist/src/cli.js.map +1 -1
- package/dist/src/diagnostics.d.ts.map +1 -1
- package/dist/src/diagnostics.js +9 -0
- package/dist/src/diagnostics.js.map +1 -1
- package/dist/src/std-bundle.js +1 -1
- package/dist/src/std-bundle.js.map +1 -1
- package/dist/src/typecheck.d.ts.map +1 -1
- package/dist/src/typecheck.js +126 -5
- package/dist/src/typecheck.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/docs/llms-full.txt +10 -2
- package/docs/llms.txt +2 -2
- package/docs/reference/cli.md +2 -2
- package/docs/reference/diagnostics.md +9 -1
- package/docs/reference/grammar.md +1 -1
- package/docs/reference/std/advance.md +1 -1
- package/docs/reference/std/cancellable_booking.md +1 -1
- package/docs/reference/std/captured_payment.md +1 -1
- package/docs/reference/std/conditional_disbursement.md +1 -1
- package/docs/reference/std/credit_facility.md +1 -1
- package/docs/reference/std/held_payment.md +1 -1
- package/docs/reference/std/instant_transfer.md +1 -1
- package/docs/reference/std/metered.md +1 -1
- package/docs/reference/std/pooled_split.md +1 -1
- package/docs/reference/std/premium_forward.md +1 -1
- package/docs/reference/std/reconciled_payout.md +1 -1
- package/docs/reference/std/recurring_collection.md +1 -1
- package/docs/reference/std/rotating_pool.md +1 -1
- package/docs/reference/std/scheduled.md +1 -1
- package/docs/reference/std/security_deposit.md +1 -1
- package/docs/reference/std/settlement_batch.md +1 -1
- package/docs/reference/std/swap.md +1 -1
- package/docs/reference/std/threshold_pool.md +1 -1
- package/docs/reference/std/weighted_distribution.md +1 -1
- package/docs/reference/types.md +1 -1
- package/docs/reference/udl-output.md +1 -1
- package/package.json +3 -3
- package/src/cli.ts +8 -5
- package/src/diagnostics.ts +9 -0
- package/src/std-bundle.ts +1 -1
- package/src/typecheck.ts +170 -5
- package/src/version.ts +1 -1
- package/std/money_flows/held_payment.hsx +23 -10
package/dist/src/version.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Package version reported by the command line. */
|
|
2
|
-
export declare const HSX_VERSION = "2.0.
|
|
2
|
+
export declare const HSX_VERSION = "2.0.5";
|
|
3
3
|
/** Canonical UDL contract version emitted by this compiler. */
|
|
4
4
|
export declare const HSX_TARGET_UDL_VERSION = 1;
|
|
5
5
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/src/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Package version reported by the command line. */
|
|
2
|
-
export const HSX_VERSION = "2.0.
|
|
2
|
+
export const HSX_VERSION = "2.0.5";
|
|
3
3
|
/** Canonical UDL contract version emitted by this compiler. */
|
|
4
4
|
export const HSX_TARGET_UDL_VERSION = 1;
|
|
5
5
|
//# sourceMappingURL=version.js.map
|
package/docs/llms-full.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Generated by scripts/docs/build.ts for HSX 2.0.
|
|
1
|
+
<!-- Generated by scripts/docs/build.ts for HSX 2.0.5. Do not edit. -->
|
|
2
2
|
|
|
3
3
|
# HSX full documentation
|
|
4
4
|
|
|
@@ -374,7 +374,7 @@ Exit code `0` means the command accepted the program. Exit code `1` means compil
|
|
|
374
374
|
# CLI
|
|
375
375
|
|
|
376
376
|
```text
|
|
377
|
-
hsx 2.0.
|
|
377
|
+
hsx 2.0.5, the HSX compiler
|
|
378
378
|
|
|
379
379
|
Usage:
|
|
380
380
|
hsx check <file.hsx> [--strict]
|
|
@@ -721,6 +721,14 @@ port report_damage { allowed: [seller] shape { damageAmount: money(SAR) } }
|
|
|
721
721
|
port pass_inspection { allowed: [seller] shape { invalidField: mystery_type } }
|
|
722
722
|
```
|
|
723
723
|
|
|
724
|
+
## HSX1026: Decision port input type mismatch with instrument capture field
|
|
725
|
+
|
|
726
|
+
Stage: `typecheck`
|
|
727
|
+
|
|
728
|
+
Fix: Declare the decision port input field with the type expected by the instrument capture field.
|
|
729
|
+
|
|
730
|
+
No source-only witness exists. This refusal requires a compiler-host published catalog.
|
|
731
|
+
|
|
724
732
|
## HSX1101: Currency mismatch
|
|
725
733
|
|
|
726
734
|
Stage: `typecheck`
|
package/docs/llms.txt
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<!-- Generated by scripts/docs/build.ts for HSX 2.0.
|
|
1
|
+
<!-- Generated by scripts/docs/build.ts for HSX 2.0.5. Do not edit. -->
|
|
2
2
|
|
|
3
3
|
# HSX documentation
|
|
4
4
|
|
|
5
|
-
> Repository guide and generated compiler reference for HSX 2.0.
|
|
5
|
+
> Repository guide and generated compiler reference for HSX 2.0.5.
|
|
6
6
|
|
|
7
7
|
## Guide
|
|
8
8
|
|
package/docs/reference/cli.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<!-- Generated by scripts/docs/build.ts for HSX 2.0.
|
|
1
|
+
<!-- Generated by scripts/docs/build.ts for HSX 2.0.5. Do not edit. -->
|
|
2
2
|
|
|
3
3
|
# CLI
|
|
4
4
|
|
|
5
5
|
```text
|
|
6
|
-
hsx 2.0.
|
|
6
|
+
hsx 2.0.5, the HSX compiler
|
|
7
7
|
|
|
8
8
|
Usage:
|
|
9
9
|
hsx check <file.hsx> [--strict]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Generated by scripts/docs/build.ts for HSX 2.0.
|
|
1
|
+
<!-- Generated by scripts/docs/build.ts for HSX 2.0.5. Do not edit. -->
|
|
2
2
|
|
|
3
3
|
# Diagnostics
|
|
4
4
|
|
|
@@ -316,6 +316,14 @@ port report_damage { allowed: [seller] shape { damageAmount: money(SAR) } }
|
|
|
316
316
|
port pass_inspection { allowed: [seller] shape { invalidField: mystery_type } }
|
|
317
317
|
```
|
|
318
318
|
|
|
319
|
+
## HSX1026: Decision port input type mismatch with instrument capture field
|
|
320
|
+
|
|
321
|
+
Stage: `typecheck`
|
|
322
|
+
|
|
323
|
+
Fix: Declare the decision port input field with the type expected by the instrument capture field.
|
|
324
|
+
|
|
325
|
+
No source-only witness exists. This refusal requires a compiler-host published catalog.
|
|
326
|
+
|
|
319
327
|
## HSX1101: Currency mismatch
|
|
320
328
|
|
|
321
329
|
Stage: `typecheck`
|
package/docs/reference/types.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperscale0/hsx",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"description": "The strictly typed HSX language: compile total financial programs into canonical UDL.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hsx",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"typecheck": "tsc -p tsconfig.json"
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@hyperscale0/udl": "2.0.
|
|
88
|
+
"@hyperscale0/udl": "2.0.4"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
91
|
"bun-types": "1.4.2",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"Amir Ayub",
|
|
97
97
|
"Sara AlBakaawi"
|
|
98
98
|
],
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "7c00e694bad0797575b9ebb68f5815664476b7b6"
|
|
100
100
|
}
|
package/src/cli.ts
CHANGED
|
@@ -116,7 +116,10 @@ export async function runCli(argv: readonly string[], io: Io): Promise<number> {
|
|
|
116
116
|
const result = format(source);
|
|
117
117
|
if (!result.ok) {
|
|
118
118
|
for (const diagnostic of result.diagnostics) {
|
|
119
|
-
|
|
119
|
+
const codePrefix = diagnostic.code ? `${diagnostic.code}: ` : "";
|
|
120
|
+
io.err(
|
|
121
|
+
`${parsed.file}:1:1: error [parse] ${codePrefix}${diagnostic.message}`,
|
|
122
|
+
);
|
|
120
123
|
}
|
|
121
124
|
return REFUSED;
|
|
122
125
|
}
|
|
@@ -321,10 +324,10 @@ function diagnosticLines(
|
|
|
321
324
|
file: string,
|
|
322
325
|
result: CompileResult,
|
|
323
326
|
): readonly string[] {
|
|
324
|
-
return result.diagnostics.map(
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
);
|
|
327
|
+
return result.diagnostics.map((diagnostic) => {
|
|
328
|
+
const codePrefix = diagnostic.code ? `${diagnostic.code}: ` : "";
|
|
329
|
+
return `${diagnostic.file ?? file}:${diagnostic.line}:${diagnostic.column}: ${diagnostic.severity} [${diagnostic.stage}] ${codePrefix}${diagnostic.message}`;
|
|
330
|
+
});
|
|
328
331
|
}
|
|
329
332
|
|
|
330
333
|
function messageOf(cause: unknown): string {
|
package/src/diagnostics.ts
CHANGED
|
@@ -257,6 +257,15 @@ settlement hold = security_deposit {
|
|
|
257
257
|
port report_damage { allowed: [seller] shape { damageAmount: money(SAR) } }
|
|
258
258
|
port pass_inspection { allowed: [seller] shape { invalidField: mystery_type } }`,
|
|
259
259
|
},
|
|
260
|
+
{
|
|
261
|
+
code: "HSX1026",
|
|
262
|
+
stage: "typecheck",
|
|
263
|
+
title: "Decision port input type mismatch with instrument capture field",
|
|
264
|
+
fix: "Declare the decision port input field with the type expected by the instrument capture field.",
|
|
265
|
+
// This diagnostic requires a compiler-host published catalog.
|
|
266
|
+
example: null,
|
|
267
|
+
reason: "This refusal requires a compiler-host published catalog.",
|
|
268
|
+
},
|
|
260
269
|
{
|
|
261
270
|
code: "HSX1101",
|
|
262
271
|
stage: "typecheck",
|