From 2375978759a9f3872e47b7f2380a9b5f4660d294 Mon Sep 17 00:00:00 2001 From: "coderabbitai[bot]" <136622811+coderabbitai[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 02:41:24 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20CodeRabbit=20Chat:=20Add=20diagn?= =?UTF-8?q?osticLinks=20to=20TypeScript=20ErrorOptions=20defaults?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ts/src/index.ts | 7 +- types/generated/Instructions.d.ts | 226 +++++++++++++++------------- types/generated/PrimitiveTypes.d.ts | 2 +- types/utils/isMusl.d.ts | 2 +- 4 files changed, 132 insertions(+), 105 deletions(-) diff --git a/ts/src/index.ts b/ts/src/index.ts index b1918cbb..6ea80703 100644 --- a/ts/src/index.ts +++ b/ts/src/index.ts @@ -57,7 +57,12 @@ export class LightVM { private static readonly DEFAULTS: VMConfig = { caps: [Capability.Observe], runtimeConfig: { nightly: false }, - errorOptions: { backtrace: false, explain: false, hint: true }, + errorOptions: { + backtrace: false, + explain: false, + hint: true, + diagnosticLinks: true, + }, securityConfig: { maxIo: 100, maxImport: 3, diff --git a/types/generated/Instructions.d.ts b/types/generated/Instructions.d.ts index 6b35b83d..3fe32a11 100644 --- a/types/generated/Instructions.d.ts +++ b/types/generated/Instructions.d.ts @@ -1,195 +1,217 @@ import type { PrimitiveTypes } from './PrimitiveTypes.js'; import type { Value } from './Value.js'; export type Instructions = { - push_int16: number; + "push_int16": number; } | { - push_int32: number; + "push_int32": number; } | { - push_int64: number; + "push_int64": number; } | { - push_int128: number; + "push_int128": number; } | { - push_float16: number; + "push_float16": number; } | { - push_float32: number; + "push_float32": number; } | { - push_float64: number; + "push_float64": number; } | { - push_string: string; + "push_string": string; } | { - push_array: any[]; + "push_array": any[]; } | { - push_object: Record; + "push_object": Record; } | { - push_bool: boolean; -} | 'push_null' | 'push_undefined' | 'push_na_n' | { - push: Value; + "push_bool": boolean; +} | "push_null" | "push_undefined" | "push_na_n" | { + "push": Value; } | { - val: string; + "val": string; } | { - val_idx: number; + "val_idx": number; } | { - set: string; + "set": string; } | { - set_idx: number; + "set_idx": number; } | { - get: string; + "get": string; } | { - get_idx: number; + "get_idx": number; } | { - add: PrimitiveTypes; + "add": PrimitiveTypes; } | { - addv: PrimitiveTypes; + "addv": PrimitiveTypes; } | { - sub: PrimitiveTypes; + "sub": PrimitiveTypes; } | { - subv: PrimitiveTypes; + "subv": PrimitiveTypes; } | { - mul: PrimitiveTypes; + "mul": PrimitiveTypes; } | { - mulv: PrimitiveTypes; + "mulv": PrimitiveTypes; } | { - div: PrimitiveTypes; + "div": PrimitiveTypes; } | { - divv: PrimitiveTypes; + "divv": PrimitiveTypes; } | { - mod: PrimitiveTypes; + "mod": PrimitiveTypes; } | { - modv: PrimitiveTypes; + "modv": PrimitiveTypes; } | { - shl: PrimitiveTypes; + "shl": PrimitiveTypes; } | { - shr: PrimitiveTypes; + "shlv": PrimitiveTypes; } | { - ror: PrimitiveTypes; + "shr": PrimitiveTypes; } | { - rol: PrimitiveTypes; + "shrv": PrimitiveTypes; } | { - sin: PrimitiveTypes; + "ror": PrimitiveTypes; } | { - cos: PrimitiveTypes; + "rorv": PrimitiveTypes; } | { - tan: PrimitiveTypes; + "rol": PrimitiveTypes; } | { - sinv: PrimitiveTypes; + "rolv": PrimitiveTypes; } | { - cosv: PrimitiveTypes; + "sin": PrimitiveTypes; } | { - tanv: PrimitiveTypes; + "cos": PrimitiveTypes; } | { - asin: PrimitiveTypes; + "tan": PrimitiveTypes; } | { - acos: PrimitiveTypes; + "sinv": PrimitiveTypes; } | { - atan: PrimitiveTypes; + "cosv": PrimitiveTypes; } | { - atan2: PrimitiveTypes; + "tanv": PrimitiveTypes; } | { - asinv: PrimitiveTypes; + "asin": PrimitiveTypes; } | { - acosv: PrimitiveTypes; + "acos": PrimitiveTypes; } | { - atanv: PrimitiveTypes; + "atan": PrimitiveTypes; } | { - atan2v: PrimitiveTypes; + "atan2": PrimitiveTypes; } | { - sinh: PrimitiveTypes; + "asinv": PrimitiveTypes; } | { - cosh: PrimitiveTypes; + "acosv": PrimitiveTypes; } | { - tanh: PrimitiveTypes; + "atanv": PrimitiveTypes; } | { - sinhv: PrimitiveTypes; + "atan2v": PrimitiveTypes; } | { - coshv: PrimitiveTypes; + "sinh": PrimitiveTypes; } | { - tanhv: PrimitiveTypes; + "cosh": PrimitiveTypes; } | { - asinh: PrimitiveTypes; + "tanh": PrimitiveTypes; } | { - acosh: PrimitiveTypes; + "sinhv": PrimitiveTypes; } | { - atanh: PrimitiveTypes; + "coshv": PrimitiveTypes; } | { - asinhv: PrimitiveTypes; + "tanhv": PrimitiveTypes; } | { - acoshv: PrimitiveTypes; + "asinh": PrimitiveTypes; } | { - atanhv: PrimitiveTypes; + "acosh": PrimitiveTypes; } | { - sqrt: PrimitiveTypes; + "atanh": PrimitiveTypes; } | { - cbrt: PrimitiveTypes; + "asinhv": PrimitiveTypes; } | { - neg: PrimitiveTypes; + "acoshv": PrimitiveTypes; } | { - negv: PrimitiveTypes; + "atanhv": PrimitiveTypes; } | { - ln: PrimitiveTypes; + "sqrt": PrimitiveTypes; } | { - exp: PrimitiveTypes; + "sqrtv": PrimitiveTypes; } | { - log2: PrimitiveTypes; + "cbrt": PrimitiveTypes; } | { - log10: PrimitiveTypes; + "cbrtv": PrimitiveTypes; } | { - pow: PrimitiveTypes; + "neg": PrimitiveTypes; } | { - powi: PrimitiveTypes; + "negv": PrimitiveTypes; } | { - powf: PrimitiveTypes; + "ln": PrimitiveTypes; } | { - powv: PrimitiveTypes; + "lnv": PrimitiveTypes; } | { - powiv: PrimitiveTypes; + "exp": PrimitiveTypes; } | { - powfv: PrimitiveTypes; + "expv": PrimitiveTypes; } | { - gt: PrimitiveTypes; + "log2": PrimitiveTypes; } | { - lt: PrimitiveTypes; + "log2v": PrimitiveTypes; } | { - ge: PrimitiveTypes; + "log10": PrimitiveTypes; } | { - le: PrimitiveTypes; + "log10v": PrimitiveTypes; } | { - eq: PrimitiveTypes; + "pow": PrimitiveTypes; } | { - neq: PrimitiveTypes; + "powi": PrimitiveTypes; } | { - dot: PrimitiveTypes; + "powf": PrimitiveTypes; } | { - cross: PrimitiveTypes; -} | 'and' | 'or' | 'xor' | 'not' | 'print' | 'println' | 'stdout' | 'stdoutln' | 'stdin' | 'clear_screen' | { - if_false: number; + "powv": PrimitiveTypes; } | { - jump: number; + "powiv": PrimitiveTypes; } | { - inc: [string, PrimitiveTypes]; + "powfv": PrimitiveTypes; } | { - inc_idx: [number, PrimitiveTypes]; + "gt": PrimitiveTypes; } | { - dec: [string, PrimitiveTypes]; + "lt": PrimitiveTypes; } | { - dec_idx: [number, PrimitiveTypes]; + "ge": PrimitiveTypes; } | { - call: [string, PrimitiveTypes]; + "le": PrimitiveTypes; } | { - func: [string, number, number, number, string[]]; -} | 'stop' | 'return' | { - break: number; + "eq": PrimitiveTypes; } | { - access: string; -} | 'access_index' | 'to_string' | 'to_short' | 'to_integer' | 'to_long' | 'to_octa' | 'to_half' | 'to_float' | 'to_double' | { - make_obj: number; + "neq": PrimitiveTypes; } | { - make_array: number; -} | 'type_of' | 'inspect_obj' | 'inspect_arr' | 'length' | 'concat' | 'dup' | 'swap' | { - set_prop: string; + "dot": PrimitiveTypes; } | { - import: [string, number]; + "cross": PrimitiveTypes; } | { - export: string; + "normalize": PrimitiveTypes; +} | "and" | "or" | "xor" | "not" | "print" | "println" | "stdout" | "stdoutln" | "stdin" | "clear_screen" | { + "if_false": number; } | { - instantiate: [string, number]; -} | 'nop' | 'truncate' | 'shrink'; + "jump": number; +} | { + "inc": [string, PrimitiveTypes]; +} | { + "inc_idx": [number, PrimitiveTypes]; +} | { + "dec": [string, PrimitiveTypes]; +} | { + "dec_idx": [number, PrimitiveTypes]; +} | { + "call": [string, PrimitiveTypes]; +} | { + "func": [string, number, number, number, string[]]; +} | "stop" | "return" | { + "break": number; +} | { + "access": string; +} | "access_index" | "to_string" | "to_short" | "to_integer" | "to_long" | "to_octa" | "to_half" | "to_float" | "to_double" | { + "make_obj": number; +} | { + "make_array": number; +} | "type_of" | "inspect_obj" | "inspect_arr" | "length" | "concat" | "dup" | "swap" | { + "set_prop": string; +} | { + "import": [string, number]; +} | { + "export": string; +} | { + "instantiate": [string, number]; +} | "nop" | "truncate" | "shrink"; diff --git a/types/generated/PrimitiveTypes.d.ts b/types/generated/PrimitiveTypes.d.ts index 4e5b141f..aa31afbd 100644 --- a/types/generated/PrimitiveTypes.d.ts +++ b/types/generated/PrimitiveTypes.d.ts @@ -1 +1 @@ -export type PrimitiveTypes = 'Sht' | 'Int' | 'Lng' | 'Oct' | 'Hlf' | 'Flt' | 'Dbl' | 'Str'; +export type PrimitiveTypes = "Sht" | "Int" | "Lng" | "Oct" | "Hlf" | "Flt" | "Dbl" | "Str"; diff --git a/types/utils/isMusl.d.ts b/types/utils/isMusl.d.ts index 9ede6fb5..3156968c 100644 --- a/types/utils/isMusl.d.ts +++ b/types/utils/isMusl.d.ts @@ -7,4 +7,4 @@ * * http://www.apache.org/licenses/LICENSE-2.0 */ -export declare function isMusl(reportProvider?: NodeJS.ProcessReport): boolean; +export declare function isMusl(reportProvider?: any): any;