@mirascript/mirascript 0.1.4 → 0.1.6

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.
Files changed (60) hide show
  1. package/dist/{chunk-RYSPVMVZ.js → chunk-OU3K5EYB.js} +26 -5
  2. package/dist/chunk-OU3K5EYB.js.map +6 -0
  3. package/dist/cli/execute.d.ts.map +1 -1
  4. package/dist/cli/index.js +25 -16
  5. package/dist/cli/index.js.map +2 -2
  6. package/dist/cli/print.d.ts.map +1 -1
  7. package/dist/index.js +1 -1
  8. package/dist/subtle.js +1 -1
  9. package/dist/vm/lib/_helpers.d.ts +1 -1
  10. package/dist/vm/lib/_helpers.d.ts.map +1 -1
  11. package/dist/vm/lib/global/bit.d.ts +7 -8
  12. package/dist/vm/lib/global/bit.d.ts.map +1 -1
  13. package/dist/vm/lib/global/debug.d.ts +6 -3
  14. package/dist/vm/lib/global/debug.d.ts.map +1 -1
  15. package/dist/vm/lib/global/json.d.ts +2 -3
  16. package/dist/vm/lib/global/json.d.ts.map +1 -1
  17. package/dist/vm/lib/global/math-additional.d.ts +1 -2
  18. package/dist/vm/lib/global/math-additional.d.ts.map +1 -1
  19. package/dist/vm/lib/global/math-arr.d.ts +5 -6
  20. package/dist/vm/lib/global/math-arr.d.ts.map +1 -1
  21. package/dist/vm/lib/global/math-unary.d.ts +26 -27
  22. package/dist/vm/lib/global/math-unary.d.ts.map +1 -1
  23. package/dist/vm/lib/global/math.d.ts +3 -4
  24. package/dist/vm/lib/global/math.d.ts.map +1 -1
  25. package/dist/vm/lib/global/mod/matrix.d.ts +13 -14
  26. package/dist/vm/lib/global/mod/matrix.d.ts.map +1 -1
  27. package/dist/vm/lib/global/sequence/all-any.d.ts +2 -3
  28. package/dist/vm/lib/global/sequence/all-any.d.ts.map +1 -1
  29. package/dist/vm/lib/global/sequence/entries.d.ts +4 -5
  30. package/dist/vm/lib/global/sequence/entries.d.ts.map +1 -1
  31. package/dist/vm/lib/global/sequence/find.d.ts +2 -3
  32. package/dist/vm/lib/global/sequence/find.d.ts.map +1 -1
  33. package/dist/vm/lib/global/sequence/flatten.d.ts +1 -2
  34. package/dist/vm/lib/global/sequence/flatten.d.ts.map +1 -1
  35. package/dist/vm/lib/global/sequence/len.d.ts +1 -2
  36. package/dist/vm/lib/global/sequence/len.d.ts.map +1 -1
  37. package/dist/vm/lib/global/sequence/map-filter.d.ts +3 -4
  38. package/dist/vm/lib/global/sequence/map-filter.d.ts.map +1 -1
  39. package/dist/vm/lib/global/sequence/repeat.d.ts +1 -2
  40. package/dist/vm/lib/global/sequence/repeat.d.ts.map +1 -1
  41. package/dist/vm/lib/global/sequence/reverse.d.ts +1 -2
  42. package/dist/vm/lib/global/sequence/reverse.d.ts.map +1 -1
  43. package/dist/vm/lib/global/sequence/sort.d.ts +2 -3
  44. package/dist/vm/lib/global/sequence/sort.d.ts.map +1 -1
  45. package/dist/vm/lib/global/sequence/with.d.ts +1 -2
  46. package/dist/vm/lib/global/sequence/with.d.ts.map +1 -1
  47. package/dist/vm/lib/global/sequence/zip.d.ts +1 -2
  48. package/dist/vm/lib/global/sequence/zip.d.ts.map +1 -1
  49. package/dist/vm/lib/global/string.d.ts +10 -11
  50. package/dist/vm/lib/global/string.d.ts.map +1 -1
  51. package/dist/vm/lib/global/time.d.ts +4 -5
  52. package/dist/vm/lib/global/time.d.ts.map +1 -1
  53. package/dist/vm/lib/global/to-primitive.d.ts +4 -5
  54. package/dist/vm/lib/global/to-primitive.d.ts.map +1 -1
  55. package/package.json +4 -3
  56. package/src/cli/execute.ts +8 -5
  57. package/src/cli/print.ts +35 -23
  58. package/src/vm/lib/_helpers.ts +8 -3
  59. package/src/vm/lib/global/debug.ts +24 -3
  60. package/dist/chunk-RYSPVMVZ.js.map +0 -6
@@ -1,29 +1,28 @@
1
1
  import type { VmAny } from '../../index.js';
2
- import { VmLib } from '../_helpers.js';
3
- export declare const trunc: VmLib<(x: VmAny) => number>;
4
- export declare const floor: VmLib<(x: VmAny) => number>;
5
- export declare const ceil: VmLib<(x: VmAny) => number>;
6
- export declare const round: VmLib<(x: VmAny) => number>;
7
- export declare const sign: VmLib<(x: VmAny) => number>;
8
- export declare const abs: VmLib<(x: VmAny) => number>;
9
- export declare const acos: VmLib<(x: VmAny) => number>;
10
- export declare const acosh: VmLib<(x: VmAny) => number>;
11
- export declare const asin: VmLib<(x: VmAny) => number>;
12
- export declare const asinh: VmLib<(x: VmAny) => number>;
13
- export declare const atan: VmLib<(x: VmAny) => number>;
14
- export declare const atanh: VmLib<(x: VmAny) => number>;
15
- export declare const cos: VmLib<(x: VmAny) => number>;
16
- export declare const cosh: VmLib<(x: VmAny) => number>;
17
- export declare const sin: VmLib<(x: VmAny) => number>;
18
- export declare const sinh: VmLib<(x: VmAny) => number>;
19
- export declare const tan: VmLib<(x: VmAny) => number>;
20
- export declare const tanh: VmLib<(x: VmAny) => number>;
21
- export declare const exp: VmLib<(x: VmAny) => number>;
22
- export declare const expm1: VmLib<(x: VmAny) => number>;
23
- export declare const log: VmLib<(x: VmAny) => number>;
24
- export declare const log10: VmLib<(x: VmAny) => number>;
25
- export declare const log1p: VmLib<(x: VmAny) => number>;
26
- export declare const log2: VmLib<(x: VmAny) => number>;
27
- export declare const sqrt: VmLib<(x: VmAny) => number>;
28
- export declare const cbrt: VmLib<(x: VmAny) => number>;
2
+ export declare const trunc: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
3
+ export declare const floor: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
4
+ export declare const ceil: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
5
+ export declare const round: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
6
+ export declare const sign: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
7
+ export declare const abs: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
8
+ export declare const acos: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
9
+ export declare const acosh: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
10
+ export declare const asin: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
11
+ export declare const asinh: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
12
+ export declare const atan: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
13
+ export declare const atanh: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
14
+ export declare const cos: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
15
+ export declare const cosh: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
16
+ export declare const sin: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
17
+ export declare const sinh: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
18
+ export declare const tan: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
19
+ export declare const tanh: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
20
+ export declare const exp: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
21
+ export declare const expm1: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
22
+ export declare const log: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
23
+ export declare const log10: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
24
+ export declare const log1p: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
25
+ export declare const log2: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
26
+ export declare const sqrt: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
27
+ export declare const cbrt: ((x: VmAny) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
29
28
  //# sourceMappingURL=math-unary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"math-unary.d.ts","sourceRoot":"","sources":["../../../../src/vm/lib/global/math-unary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAY,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAUjD,eAAO,MAAM,KAAK,YAP4B,KAAK,KAAK,MAAM,CAY5D,CAAC;AACH,eAAO,MAAM,KAAK,YAb4B,KAAK,KAAK,MAAM,CAkB5D,CAAC;AACH,eAAO,MAAM,IAAI,YAnB6B,KAAK,KAAK,MAAM,CAwB5D,CAAC;AACH,eAAO,MAAM,KAAK,YAzB4B,KAAK,KAAK,MAAM,CA8B5D,CAAC;AACH,eAAO,MAAM,IAAI,YA/B6B,KAAK,KAAK,MAAM,CAoC5D,CAAC;AACH,eAAO,MAAM,GAAG,YArC8B,KAAK,KAAK,MAAM,CA0C5D,CAAC;AAEH,eAAO,MAAM,IAAI,YA5C6B,KAAK,KAAK,MAAM,CAiD5D,CAAC;AACH,eAAO,MAAM,KAAK,YAlD4B,KAAK,KAAK,MAAM,CAuD5D,CAAC;AACH,eAAO,MAAM,IAAI,YAxD6B,KAAK,KAAK,MAAM,CA6D5D,CAAC;AACH,eAAO,MAAM,KAAK,YA9D4B,KAAK,KAAK,MAAM,CAmE5D,CAAC;AACH,eAAO,MAAM,IAAI,YApE6B,KAAK,KAAK,MAAM,CAyE5D,CAAC;AACH,eAAO,MAAM,KAAK,YA1E4B,KAAK,KAAK,MAAM,CA+E5D,CAAC;AACH,eAAO,MAAM,GAAG,YAhF8B,KAAK,KAAK,MAAM,CAqF5D,CAAC;AACH,eAAO,MAAM,IAAI,YAtF6B,KAAK,KAAK,MAAM,CA2F5D,CAAC;AACH,eAAO,MAAM,GAAG,YA5F8B,KAAK,KAAK,MAAM,CAiG5D,CAAC;AACH,eAAO,MAAM,IAAI,YAlG6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,IAAI,OAhK6B,KAAK,KAAK,MAAM,kEAqK5D,CAAC"}
@@ -1,7 +1,6 @@
1
- import { VmLib } from '../_helpers.js';
2
- export declare const atan2: VmLib<(x: import("../../index.js").VmValue | undefined, y: import("../../index.js").VmValue | undefined) => number>;
3
- export declare const pow: VmLib<(x: import("../../index.js").VmValue | undefined, y: import("../../index.js").VmValue | undefined) => number>;
4
- export declare const random: VmLib<() => number>;
1
+ export declare const atan2: ((x: import("../../index.js").VmValue | undefined, y: import("../../index.js").VmValue | undefined) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
2
+ export declare const pow: ((x: import("../../index.js").VmValue | undefined, y: import("../../index.js").VmValue | undefined) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
3
+ export declare const random: (() => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
5
4
  export * from './math-arr.js';
6
5
  export * from './math-const.js';
7
6
  export * from './math-unary.js';
@@ -1 +1 @@
1
- {"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../../../src/vm/lib/global/math.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGvC,eAAO,MAAM,KAAK,qHAKhB,CAAC;AACH,eAAO,MAAM,GAAG,qHAKd,CAAC;AACH,eAAO,MAAM,MAAM,qBAKjB,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../../../src/vm/lib/global/math.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,KAAK,iLAKhB,CAAC;AACH,eAAO,MAAM,GAAG,iLAKd,CAAC;AACH,eAAO,MAAM,MAAM,iFAKjB,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC"}
@@ -1,16 +1,15 @@
1
1
  import { type VmArray, type VmConst, type VmValue } from '../../../types/index.js';
2
- import { VmLib } from '../../_helpers.js';
3
- export declare const size: VmLib<(matrix: VmValue | undefined) => [] | [number, number] | [number]>;
4
- export declare const transpose: VmLib<(matrix: VmValue | undefined) => string | number | boolean | import("../../../types/index.js").VmRecord | VmArray | import("../../../types/function.js").VmFunction | import("../../../types/module.js").VmModule<Record<string, VmValue>> | import("../../../types/extern.js").VmExtern<object> | null>;
5
- export declare const entrywise: VmLib<(a: VmValue | undefined, b: VmValue | undefined, f: VmValue | undefined) => VmConst>;
6
- export declare const add: VmLib<(a: VmValue | undefined, b: VmValue | undefined) => VmConst>;
7
- export declare const subtract: VmLib<(a: VmValue | undefined, b: VmValue | undefined) => VmConst>;
8
- export declare const entrywise_multiply: VmLib<(a: VmValue | undefined, b: VmValue | undefined) => VmConst>;
9
- export declare const entrywise_divide: VmLib<(a: VmValue | undefined, b: VmValue | undefined) => VmConst>;
10
- export declare const multiply: VmLib<(a: VmValue | undefined, b: VmValue | undefined) => VmConst>;
11
- export declare const invert: VmLib<(a: VmValue | undefined) => VmConst>;
12
- export declare const zeros: VmLib<(...size: readonly (VmValue | undefined)[]) => VmArray>;
13
- export declare const ones: VmLib<(...size: readonly (VmValue | undefined)[]) => VmArray>;
14
- export declare const identity: VmLib<(...size: readonly (VmValue | undefined)[]) => number[][]>;
15
- export declare const diagonal: VmLib<(x: VmValue | undefined, k?: VmValue | undefined) => VmConst[]>;
2
+ export declare const size: ((matrix: VmValue | undefined) => [] | [number, number] | [number]) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
3
+ export declare const transpose: ((matrix: VmValue | undefined) => string | number | boolean | import("../../../types/index.js").VmRecord | VmArray | import("../../../types/function.js").VmFunction | import("../../../types/module.js").VmModule<Record<string, VmValue>> | import("../../../types/extern.js").VmExtern<object> | null) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
4
+ export declare const entrywise: ((a: VmValue | undefined, b: VmValue | undefined, f: VmValue | undefined) => VmConst) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
5
+ export declare const add: ((a: VmValue | undefined, b: VmValue | undefined) => VmConst) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
6
+ export declare const subtract: ((a: VmValue | undefined, b: VmValue | undefined) => VmConst) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
7
+ export declare const entrywise_multiply: ((a: VmValue | undefined, b: VmValue | undefined) => VmConst) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
8
+ export declare const entrywise_divide: ((a: VmValue | undefined, b: VmValue | undefined) => VmConst) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
9
+ export declare const multiply: ((a: VmValue | undefined, b: VmValue | undefined) => VmConst) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
10
+ export declare const invert: ((a: VmValue | undefined) => VmConst) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
11
+ export declare const zeros: ((...size: readonly (VmValue | undefined)[]) => VmArray) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
12
+ export declare const ones: ((...size: readonly (VmValue | undefined)[]) => VmArray) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
13
+ export declare const identity: ((...size: readonly (VmValue | undefined)[]) => number[][]) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
14
+ export declare const diagonal: ((x: VmValue | undefined, k?: VmValue | undefined) => VmConst[]) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
16
15
  //# sourceMappingURL=matrix.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"matrix.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/mod/matrix.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoC,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACrH,OAAO,EACH,KAAK,EASR,MAAM,mBAAmB,CAAC;AA0B3B,eAAO,MAAM,IAAI,0EAYhB,CAA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
- export declare const all: VmLib<(data: import("../../../types/index.js").VmValue | undefined, predicate: import("../../../types/index.js").VmValue | undefined) => boolean>;
3
- export declare const any: VmLib<(data: import("../../../types/index.js").VmValue | undefined, predicate: import("../../../types/index.js").VmValue | undefined) => boolean>;
1
+ export declare const all: ((data: import("../../../types/index.js").VmValue | undefined, predicate: import("../../../types/index.js").VmValue | undefined) => boolean) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
2
+ export declare const any: ((data: import("../../../types/index.js").VmValue | undefined, predicate: import("../../../types/index.js").VmValue | undefined) => boolean) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
4
3
  //# sourceMappingURL=all-any.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"all-any.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/all-any.ts"],"names":[],"mappings":"AAIA,OAAO,EAAuC,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/E,eAAO,MAAM,GAAG,mJAgCf,CAAC;AAEF,eAAO,MAAM,GAAG,mJAgCf,CAAC"}
1
+ {"version":3,"file":"all-any.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/all-any.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,GAAG,kNAgCf,CAAC;AAEF,eAAO,MAAM,GAAG,kNAgCf,CAAC"}
@@ -1,12 +1,11 @@
1
1
  import { type VmConst } from '../../../types/index.js';
2
- import { VmLib } from '../../_helpers.js';
3
- export declare const keys: VmLib<(data: import("../../../types/index.js").VmValue | undefined) => string[] | number[]>;
4
- export declare const values: VmLib<(data: import("../../../types/index.js").VmValue | undefined) => import("../../../types/index.js").VmArray>;
5
- export declare const entries: VmLib<(data: import("../../../types/index.js").VmValue | undefined) => {
2
+ export declare const keys: ((data: import("../../../types/index.js").VmValue | undefined) => string[] | number[]) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
3
+ export declare const values: ((data: import("../../../types/index.js").VmValue | undefined) => import("../../../types/index.js").VmArray) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
4
+ export declare const entries: ((data: import("../../../types/index.js").VmValue | undefined) => {
6
5
  0: number;
7
6
  1: VmConst;
8
7
  }[] | {
9
8
  0: string;
10
9
  1: string | number | boolean | import("../../../types/index.js").VmRecord | import("../../../types/index.js").VmArray | null;
11
- }[]>;
10
+ }[]) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
12
11
  //# sourceMappingURL=entries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"entries.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/entries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,KAAK,EAAuC,MAAM,mBAAmB,CAAC;AAG/E,eAAO,MAAM,IAAI,6FAuBhB,CAAC;AAEF,eAAO,MAAM,MAAM,mHAelB,CAAC;AAEF,eAAO,MAAM,OAAO;OAIc,MAAM;OAAK,OAAO;;;;IAgBnD,CAAC"}
1
+ {"version":3,"file":"entries.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/entries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAI9E,eAAO,MAAM,IAAI,4JAuBhB,CAAC;AAEF,eAAO,MAAM,MAAM,kLAelB,CAAC;AAEF,eAAO,MAAM,OAAO;OAIc,MAAM;OAAK,OAAO;;;;wEAgBnD,CAAC"}
@@ -1,10 +1,9 @@
1
1
  import { type VmValue } from '../../../types/index.js';
2
- import { VmLib } from '../../_helpers.js';
3
- export declare const find: VmLib<(data: VmValue | undefined, predicate: VmValue | undefined) => {
2
+ export declare const find: ((data: VmValue | undefined, predicate: VmValue | undefined) => {
4
3
  0: number;
5
4
  1: string | number | boolean | import("../../../types/index.js").VmRecord | import("../../../types/index.js").VmArray | null;
6
5
  } | {
7
6
  0: string;
8
7
  1: string | number | boolean | import("../../../types/index.js").VmRecord | import("../../../types/index.js").VmArray | null;
9
- } | null>;
8
+ } | null) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
10
9
  //# sourceMappingURL=find.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/find.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,OAAO,EAA2B,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,KAAK,EAAiC,MAAM,mBAAmB,CAAC;AAEzE,eAAO,MAAM,IAAI;;;;;;SA4ChB,CAAC"}
1
+ {"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/find.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,OAAO,EAA2B,MAAM,yBAAyB,CAAC;AAGhF,eAAO,MAAM,IAAI;;;;;;6EA4ChB,CAAC"}
@@ -1,3 +1,2 @@
1
- import { VmLib } from '../../_helpers.js';
2
- export declare const flatten: VmLib<(data: import("../../../index.js").VmValue | undefined, depth?: import("../../../index.js").VmValue | undefined) => (string | number | boolean | import("../../../index.js").VmRecord | import("../../../index.js").VmArray | null | undefined)[]>;
1
+ export declare const flatten: ((data: import("../../../index.js").VmValue | undefined, depth?: import("../../../index.js").VmValue | undefined) => (string | number | boolean | import("../../../index.js").VmRecord | import("../../../index.js").VmArray | null | undefined)[]) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
3
2
  //# sourceMappingURL=flatten.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"flatten.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/flatten.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAe,MAAM,mBAAmB,CAAC;AAEvD,eAAO,MAAM,OAAO,0PAYnB,CAAC"}
1
+ {"version":3,"file":"flatten.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/flatten.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,yTAYnB,CAAC"}
@@ -1,3 +1,2 @@
1
- import { VmLib } from '../../_helpers.js';
2
- export declare const len: VmLib<(arr: import("../../../index.js").VmValue | undefined) => number>;
1
+ export declare const len: ((arr: import("../../../index.js").VmValue | undefined) => number) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
3
2
  //# sourceMappingURL=len.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"len.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/len.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAe,MAAM,mBAAmB,CAAC;AAEvD,eAAO,MAAM,GAAG,yEAYf,CAAC"}
1
+ {"version":3,"file":"len.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/len.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,wIAYf,CAAC"}
@@ -1,9 +1,8 @@
1
1
  import { type VmValue } from '../../../types/index.js';
2
- import { VmLib } from '../../_helpers.js';
3
2
  export * from './with.js';
4
3
  export * from './entries.js';
5
4
  export * from './len.js';
6
- export declare const map: VmLib<(data: VmValue | undefined, f: VmValue | undefined) => VmValue>;
7
- export declare const filter: VmLib<(data: VmValue | undefined, predicate: VmValue | undefined) => VmValue>;
8
- export declare const filter_map: VmLib<(data: VmValue | undefined, f: VmValue | undefined) => VmValue>;
5
+ export declare const map: ((data: VmValue | undefined, f: VmValue | undefined) => VmValue) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
6
+ export declare const filter: ((data: VmValue | undefined, predicate: VmValue | undefined) => VmValue) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
7
+ export declare const filter_map: ((data: VmValue | undefined, f: VmValue | undefined) => VmValue) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
9
8
  //# sourceMappingURL=map-filter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"map-filter.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/map-filter.ts"],"names":[],"mappings":"AACA,OAAO,EAAyB,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,KAAK,EAA+C,MAAM,mBAAmB,CAAC;AAEvF,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AAkBzB,eAAO,MAAM,GAAG,uEAef,CAAC;AAEF,eAAO,MAAM,MAAM,+EAmBlB,CAAC;AAEF,eAAO,MAAM,UAAU,uEAmBtB,CAAC"}
1
+ {"version":3,"file":"map-filter.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/map-filter.ts"],"names":[],"mappings":"AACA,OAAO,EAAyB,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAG9E,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AAkBzB,eAAO,MAAM,GAAG,sIAef,CAAC;AAEF,eAAO,MAAM,MAAM,8IAmBlB,CAAC;AAEF,eAAO,MAAM,UAAU,sIAmBtB,CAAC"}
@@ -1,4 +1,3 @@
1
1
  import type { VmConst } from '../../../types/index.js';
2
- import { VmLib } from '../../_helpers.js';
3
- export declare const repeat: VmLib<(data: import("../../../types/index.js").VmValue | undefined, times: import("../../../types/index.js").VmValue | undefined) => VmConst[]>;
2
+ export declare const repeat: ((data: import("../../../types/index.js").VmValue | undefined, times: import("../../../types/index.js").VmValue | undefined) => VmConst[]) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
4
3
  //# sourceMappingURL=repeat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"repeat.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/repeat.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAmC,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE3E,eAAO,MAAM,MAAM,iJAuBlB,CAAC"}
1
+ {"version":3,"file":"repeat.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/repeat.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAGvD,eAAO,MAAM,MAAM,gNAuBlB,CAAC"}
@@ -1,3 +1,2 @@
1
- import { VmLib } from '../../_helpers.js';
2
- export declare const reverse: VmLib<(arr: import("../../../index.js").VmValue | undefined) => (import("../../../index.js").VmConst | undefined)[]>;
1
+ export declare const reverse: ((arr: import("../../../index.js").VmValue | undefined) => (import("../../../index.js").VmConst | undefined)[]) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
3
2
  //# sourceMappingURL=reverse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reverse.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/reverse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAe,MAAM,mBAAmB,CAAC;AAEvD,eAAO,MAAM,OAAO,sHAcnB,CAAC"}
1
+ {"version":3,"file":"reverse.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/reverse.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,qLAcnB,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import type { VmConst, VmValue } from '../../../types/index.js';
2
- import { VmLib } from '../../_helpers.js';
3
- export declare const sort: VmLib<(data: VmValue | undefined, comparator: VmValue | undefined) => VmConst[]>;
4
- export declare const sort_by: VmLib<(data: VmValue | undefined, key_fn: VmValue | undefined, comparator: VmValue | undefined) => VmConst[]>;
2
+ export declare const sort: ((data: VmValue | undefined, comparator: VmValue | undefined) => VmConst[]) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
3
+ export declare const sort_by: ((data: VmValue | undefined, key_fn: VmValue | undefined, comparator: VmValue | undefined) => VmConst[]) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
5
4
  //# sourceMappingURL=sort.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/sort.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAS,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,KAAK,EAA+B,MAAM,mBAAmB,CAAC;AA2BvE,eAAO,MAAM,IAAI,kFAwBhB,CAAC;AAEF,eAAO,MAAM,OAAO,+GAgCnB,CAAC"}
1
+ {"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/sort.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAS,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AA4BvE,eAAO,MAAM,IAAI,iJAwBhB,CAAC;AAEF,eAAO,MAAM,OAAO,8KAgCnB,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { type VmArray, type VmValue } from '../../../types/index.js';
2
- import { VmLib } from '../../_helpers.js';
3
- declare const _with: VmLib<(data: VmValue | undefined, ...entries: (VmValue | undefined)[]) => import("../../../types/index.js").VmRecord | VmArray>;
2
+ declare const _with: ((data: VmValue | undefined, ...entries: (VmValue | undefined)[]) => import("../../../types/index.js").VmRecord | VmArray) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
4
3
  export { _with as 'with' };
5
4
  //# sourceMappingURL=with.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"with.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/with.ts"],"names":[],"mappings":"AAGA,OAAO,EAIH,KAAK,OAAO,EAEZ,KAAK,OAAO,EACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,KAAK,EAAgD,MAAM,mBAAmB,CAAC;AA8DxF,QAAA,MAAM,KAAK,iIA8DV,CAAC;AACF,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"with.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/with.ts"],"names":[],"mappings":"AAGA,OAAO,EAIH,KAAK,OAAO,EAEZ,KAAK,OAAO,EACf,MAAM,yBAAyB,CAAC;AA+DjC,QAAA,MAAM,KAAK,gMA8DV,CAAC;AACF,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,CAAC"}
@@ -1,4 +1,3 @@
1
1
  import { type VmConst } from '../../../types/index.js';
2
- import { VmLib } from '../../_helpers.js';
3
- export declare const zip: VmLib<(data: import("../../../types/index.js").VmValue | undefined) => Record<string | number, VmConst>[]>;
2
+ export declare const zip: ((data: import("../../../types/index.js").VmValue | undefined) => Record<string | number, VmConst>[]) & import("../../_helpers.js").VmLibOption & Record<string, unknown>;
4
3
  //# sourceMappingURL=zip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"zip.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/zip.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,KAAK,OAAO,EAAgB,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,KAAK,EAAc,MAAM,mBAAmB,CAAC;AAGtD,eAAO,MAAM,GAAG,4GAiCf,CAAC"}
1
+ {"version":3,"file":"zip.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/zip.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,KAAK,OAAO,EAAgB,MAAM,yBAAyB,CAAC;AAIhF,eAAO,MAAM,GAAG,2KAiCf,CAAC"}
@@ -1,12 +1,11 @@
1
- import { VmLib } from '../_helpers.js';
2
- export declare const chars: VmLib<(str: import("../../index.js").VmValue | undefined) => string[]>;
3
- export declare const starts_with: VmLib<(str: import("../../index.js").VmValue | undefined, search: import("../../index.js").VmValue | undefined) => boolean>;
4
- export declare const ends_with: VmLib<(str: import("../../index.js").VmValue | undefined, search: import("../../index.js").VmValue | undefined) => boolean>;
5
- export declare const contains: VmLib<(str: import("../../index.js").VmValue | undefined, search: import("../../index.js").VmValue | undefined) => boolean>;
6
- export declare const trim_start: VmLib<(str: import("../../index.js").VmValue | undefined) => string>;
7
- export declare const trim_end: VmLib<(str: import("../../index.js").VmValue | undefined) => string>;
8
- export declare const trim: VmLib<(str: import("../../index.js").VmValue | undefined) => string>;
9
- export declare const replace: VmLib<(str: import("../../index.js").VmValue | undefined, search: import("../../index.js").VmValue | undefined, replacement?: import("../../index.js").VmValue | undefined) => string>;
10
- export declare const split: VmLib<(str: import("../../index.js").VmValue | undefined, separator?: import("../../index.js").VmValue | undefined) => string[]>;
11
- export declare const join: VmLib<(arr: import("../../index.js").VmValue | undefined, separator?: import("../../index.js").VmValue | undefined) => string>;
1
+ export declare const chars: ((str: import("../../index.js").VmValue | undefined) => string[]) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
2
+ export declare const starts_with: ((str: import("../../index.js").VmValue | undefined, search: import("../../index.js").VmValue | undefined) => boolean) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
3
+ export declare const ends_with: ((str: import("../../index.js").VmValue | undefined, search: import("../../index.js").VmValue | undefined) => boolean) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
4
+ export declare const contains: ((str: import("../../index.js").VmValue | undefined, search: import("../../index.js").VmValue | undefined) => boolean) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
5
+ export declare const trim_start: ((str: import("../../index.js").VmValue | undefined) => string) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
6
+ export declare const trim_end: ((str: import("../../index.js").VmValue | undefined) => string) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
7
+ export declare const trim: ((str: import("../../index.js").VmValue | undefined) => string) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
8
+ export declare const replace: ((str: import("../../index.js").VmValue | undefined, search: import("../../index.js").VmValue | undefined, replacement?: import("../../index.js").VmValue | undefined) => string) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
9
+ export declare const split: ((str: import("../../index.js").VmValue | undefined, separator?: import("../../index.js").VmValue | undefined) => string[]) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
10
+ export declare const join: ((arr: import("../../index.js").VmValue | undefined, separator?: import("../../index.js").VmValue | undefined) => string) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
12
11
  //# sourceMappingURL=string.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../../src/vm/lib/global/string.ts"],"names":[],"mappings":"AACA,OAAO,EAAyB,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE9D,eAAO,MAAM,KAAK,wEAYjB,CAAC;AAEF,eAAO,MAAM,WAAW,6HAavB,CAAC;AACF,eAAO,MAAM,SAAS,6HAarB,CAAC;AAEF,eAAO,MAAM,QAAQ,6HAapB,CAAC;AAEF,eAAO,MAAM,UAAU,sEAYtB,CAAC;AAEF,eAAO,MAAM,QAAQ,sEAYpB,CAAC;AAEF,eAAO,MAAM,IAAI,sEAYhB,CAAC;AAEF,eAAO,MAAM,OAAO,wLAanB,CAAC;AAEF,eAAO,MAAM,KAAK,kIAejB,CAAC;AAEF,eAAO,MAAM,IAAI,gIAahB,CAAC"}
1
+ {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../../src/vm/lib/global/string.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK,oIAYjB,CAAC;AAEF,eAAO,MAAM,WAAW,yLAavB,CAAC;AACF,eAAO,MAAM,SAAS,yLAarB,CAAC;AAEF,eAAO,MAAM,QAAQ,yLAapB,CAAC;AAEF,eAAO,MAAM,UAAU,kIAYtB,CAAC;AAEF,eAAO,MAAM,QAAQ,kIAYpB,CAAC;AAEF,eAAO,MAAM,IAAI,kIAYhB,CAAC;AAEF,eAAO,MAAM,OAAO,oPAanB,CAAC;AAEF,eAAO,MAAM,KAAK,8LAejB,CAAC;AAEF,eAAO,MAAM,IAAI,4LAahB,CAAC"}
@@ -1,6 +1,5 @@
1
- import { VmLib } from '../_helpers.js';
2
- export declare const to_timestamp: VmLib<(datetime: import("../../index.js").VmValue | undefined) => number>;
3
- export declare const to_datetime: VmLib<(datetime: import("../../index.js").VmValue | undefined, offset: import("../../index.js").VmValue | undefined) => {
1
+ export declare const to_timestamp: ((datetime: import("../../index.js").VmValue | undefined) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
2
+ export declare const to_datetime: ((datetime: import("../../index.js").VmValue | undefined, offset: import("../../index.js").VmValue | undefined) => {
4
3
  year: number;
5
4
  month: number;
6
5
  day: number;
@@ -10,6 +9,6 @@ export declare const to_datetime: VmLib<(datetime: import("../../index.js").VmVa
10
9
  millisecond: number;
11
10
  dayOfWeek: number;
12
11
  offset: number;
13
- } | null>;
14
- export declare const to_iso8601: VmLib<(datetime: import("../../index.js").VmValue | undefined) => string | null>;
12
+ } | null) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
13
+ export declare const to_iso8601: ((datetime: import("../../index.js").VmValue | undefined) => string | null) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
15
14
  //# sourceMappingURL=time.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../../../src/vm/lib/global/time.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGvC,eAAO,MAAM,YAAY,2EAqBxB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;SA8BvB,CAAC;AAEF,eAAO,MAAM,UAAU,kFAatB,CAAC"}
1
+ {"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../../../src/vm/lib/global/time.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,uIAqBxB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;0EA8BvB,CAAC;AAEF,eAAO,MAAM,UAAU,8IAatB,CAAC"}
@@ -1,6 +1,5 @@
1
- import { VmLib } from '../_helpers.js';
2
- export declare const to_string: VmLib<(data: import("../../index.js").VmValue | undefined) => string>;
3
- export declare const to_number: VmLib<(data: import("../../index.js").VmValue | undefined) => number>;
4
- export declare const to_boolean: VmLib<(data: import("../../index.js").VmValue | undefined) => boolean>;
5
- export declare const format: VmLib<(data: import("../../index.js").VmValue | undefined, format: import("../../index.js").VmValue | undefined) => string>;
1
+ export declare const to_string: ((data: import("../../index.js").VmValue | undefined) => string) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
2
+ export declare const to_number: ((data: import("../../index.js").VmValue | undefined) => number) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
3
+ export declare const to_boolean: ((data: import("../../index.js").VmValue | undefined) => boolean) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
4
+ export declare const format: ((data: import("../../index.js").VmValue | undefined, format: import("../../index.js").VmValue | undefined) => string) & import("../_helpers.js").VmLibOption & Record<string, unknown>;
6
5
  //# sourceMappingURL=to-primitive.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"to-primitive.d.ts","sourceRoot":"","sources":["../../../../src/vm/lib/global/to-primitive.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEjD,eAAO,MAAM,SAAS,uEAYrB,CAAC;AAEF,eAAO,MAAM,SAAS,uEAYrB,CAAC;AAEF,eAAO,MAAM,UAAU,wEAYtB,CAAC;AAEF,eAAO,MAAM,MAAM,6HAYlB,CAAC"}
1
+ {"version":3,"file":"to-primitive.d.ts","sourceRoot":"","sources":["../../../../src/vm/lib/global/to-primitive.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,mIAYrB,CAAC;AAEF,eAAO,MAAM,SAAS,mIAYrB,CAAC;AAEF,eAAO,MAAM,UAAU,oIAYtB,CAAC;AAEF,eAAO,MAAM,MAAM,yLAYlB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirascript/mirascript",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "description": "An expression based scripting language.",
6
6
  "main": "./dist/index.js",
@@ -36,8 +36,9 @@
36
36
  "commander": "^14.0.2",
37
37
  "js-base64": "^3.7.8",
38
38
  "source-map-js": "^1.2.1",
39
- "@mirascript/wasm": "~0.1.4",
40
- "@mirascript/napi": "~0.1.4"
39
+ "supports-color": "^10.2.2",
40
+ "@mirascript/napi": "~0.1.6",
41
+ "@mirascript/wasm": "~0.1.6"
41
42
  },
42
43
  "devDependencies": {
43
44
  "@types/node": "^24.10.0",
@@ -1,5 +1,6 @@
1
1
  /* eslint-disable no-console */
2
2
  import styles from 'ansi-styles';
3
+ import supportsColor from 'supports-color';
3
4
  import { compile } from '../index.js';
4
5
  import { createVmContext, VmFunction, type VmValue } from '../vm/index.js';
5
6
  import { debug_print } from '../vm/lib/global/debug.js';
@@ -17,10 +18,7 @@ export async function execute(
17
18
  const r = f(
18
19
  createVmContext({
19
20
  debug_print: VmFunction((...values) => {
20
- console.log(
21
- '\u001B[46;30m MiraScript \u001B[0m',
22
- ...values.map((v) => (typeof v == 'string' ? v : print(v))),
23
- );
21
+ console.log(...debug_print.prefix, ...values.map((v) => (typeof v == 'string' ? v : print(v))));
24
22
  }, debug_print),
25
23
  ...variables,
26
24
  }),
@@ -31,7 +29,12 @@ export async function execute(
31
29
  console.log(print(r));
32
30
  }
33
31
  } catch (ex) {
34
- console.error(styles.red.open + (ex as Error).stack + styles.red.close);
32
+ const { stack } = ex as Error;
33
+ if (supportsColor.stderr) {
34
+ console.error(styles.red.open + stack + styles.red.close);
35
+ } else {
36
+ console.error(stack);
37
+ }
35
38
  process.exitCode = 2;
36
39
  }
37
40
  }
package/src/cli/print.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import styles from 'ansi-styles';
2
+ import supportsColor from 'supports-color';
2
3
  import {
3
4
  serialize,
4
5
  serializeNumber,
@@ -9,36 +10,47 @@ import {
9
10
  } from '../subtle.js';
10
11
  import type { VmAny, VmRecord } from '../vm/index.js';
11
12
 
13
+ const noColor = !supportsColor.stdout;
14
+
12
15
  const options: Partial<SerializeOptions> = {
13
16
  maxDepth: 3,
14
- serializeNil: () => styles.gray.open + serializeNil() + styles.gray.close,
15
- serializeBoolean: (v) => styles.blue.open + serializeBoolean(v) + styles.blue.close,
16
- serializeNumber: (v) => styles.yellow.open + serializeNumber(v) + styles.yellow.close,
17
- serializeStringQuote: (v, open) => {
18
- const q = styles.dim.open + v + styles.dim.close;
19
- if (open) {
20
- return styles.green.open + q;
21
- } else {
22
- return q + styles.green.close;
23
- }
24
- },
25
- serializeStringEscape: (v) => styles.bold.open + v + styles.bold.close,
26
- serializeFunction: (v) => styles.cyan.open + operations.$ToString(v) + styles.cyan.close,
27
- serializePropName: (v) => styles.whiteBright.open + String(v) + styles.whiteBright.close,
28
- serializeModule: (v, depth, options) => {
29
- return (
30
- styles.magenta.open +
31
- operations.$ToString(v) +
32
- styles.magenta.close +
33
- ' ' +
34
- options.serializeRecord(v.value as VmRecord, depth, options)
35
- );
36
- },
17
+ serializeNil: noColor ? undefined : () => styles.gray.open + serializeNil() + styles.gray.close,
18
+ serializeBoolean: noColor ? undefined : (v) => styles.blue.open + serializeBoolean(v) + styles.blue.close,
19
+ serializeNumber: noColor ? undefined : (v) => styles.yellow.open + serializeNumber(v) + styles.yellow.close,
20
+ serializeStringQuote: noColor
21
+ ? undefined
22
+ : (v, open) => {
23
+ const q = styles.dim.open + v + styles.dim.close;
24
+ if (open) {
25
+ return styles.green.open + q;
26
+ } else {
27
+ return q + styles.green.close;
28
+ }
29
+ },
30
+ serializeStringEscape: noColor ? undefined : (v) => styles.bold.open + v + styles.bold.close,
31
+ serializePropName: noColor ? undefined : (v) => styles.whiteBright.open + String(v) + styles.whiteBright.close,
32
+ serializeFunction: noColor
33
+ ? operations.$ToString
34
+ : (v) => styles.cyan.open + operations.$ToString(v) + styles.cyan.close,
35
+ serializeModule: noColor
36
+ ? (v, depth, options) => {
37
+ return operations.$ToString(v) + ' ' + options.serializeRecord(v.value as VmRecord, depth, options);
38
+ }
39
+ : (v, depth, options) => {
40
+ return (
41
+ styles.magenta.open +
42
+ operations.$ToString(v) +
43
+ styles.magenta.close +
44
+ ' ' +
45
+ options.serializeRecord(v.value as VmRecord, depth, options)
46
+ );
47
+ },
37
48
  };
38
49
 
39
50
  /** 序列化值 */
40
51
  export function print(value: VmAny, depth = 3): string {
41
52
  if (value === undefined) {
53
+ if (noColor) return '<uninitialized>';
42
54
  return styles.gray.open + '<uninitialized>' + styles.gray.close;
43
55
  }
44
56
  return serialize(value, { ...options, maxDepth: depth });
@@ -191,17 +191,22 @@ export type VmLibOption = Pick<
191
191
  export type VmLib<T extends VmFunctionLike = VmFunctionLike> = T & VmLibOption;
192
192
 
193
193
  /** 创建库函数 */
194
- export function VmLib<T extends VmFunctionLike>(fn: T, option: VmLibOption): VmLib<T> {
194
+ export function VmLib<T extends VmFunctionLike, P extends Record<string, unknown>>(
195
+ fn: T,
196
+ option: VmLibOption,
197
+ properties?: P,
198
+ ): VmLib<T> & P {
195
199
  /* c8 ignore next 2 */
196
200
  if (typeof fn != 'function') throw new TypeError('Invalid function');
197
201
  if (isVmFunction(fn)) throw new TypeError('Cannot create VmLib from a VmFunction');
198
202
 
199
- const ret = fn as T & VmLibOption as Writable<VmLibOption>;
203
+ const ret = fn as T & VmLibOption & P as Writable<T & VmLibOption & P>;
204
+ Object.assign(ret, properties);
200
205
  ret.params = option.params;
201
206
  ret.paramsType = option.paramsType;
202
207
  ret.returns = option.returns;
203
208
  ret.returnsType = option.returnsType;
204
209
  ret.summary = option.summary;
205
210
  ret.examples = option.examples;
206
- return ret as T & VmLibOption;
211
+ return ret as T & VmLibOption & P;
207
212
  }