You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@fable-org/fable-compiler-js

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fable-org/fable-compiler-js - npm Package Compare versions

Comparing version

to
1.1.0

4

CHANGELOG.md

@@ -10,2 +10,6 @@ # Changelog

## 1.1.0 - 2024-02-20
* Add `NPM_PACKAGE_FABLE_COMPILER_JAVASCRIPT` compiler directive (by @MangelMaxime)
## 1.0.0 - 2024-02-12

@@ -12,0 +16,0 @@

3

dist/fable-library-js/Array.d.ts

@@ -91,3 +91,4 @@ import { int32 } from "./Int32.js";

export declare function tail<T>(array: T[]): T[];
export declare function item<$a>(index: int32, array: $a[]): $a;
export declare function item<T>(index: int32, array: T[]): T;
export declare function setItem<T>(array: T[], index: int32, value: T): void;
export declare function tryItem<T>(index: int32, array: T[]): Option<T>;

@@ -94,0 +95,0 @@ export declare function foldBackIndexed<T, State>(folder: ((arg0: int32, arg1: T, arg2: State) => State), array: T[], state: State): State;

import { Helpers_allocateArrayFromCons } from "./Native.js";
import { setItem as setItem_1, item as item_2 } from "./Array.js";
import { value as value_2, map as map_1, defaultArg, some } from "./Option.js";

@@ -17,6 +18,6 @@ import { min as min_1, max as max_1 } from "./Double.js";

for (let i = 0; i <= (len1 - 1); i++) {
newArray[i] = array1[i];
setItem_1(newArray, i, item_2(i, array1));
}
for (let i_1 = 0; i_1 <= (len2 - 1); i_1++) {
newArray[i_1 + len1] = array2[i_1];
setItem_1(newArray, i_1 + len1, item_2(i_1, array2));
}

@@ -40,3 +41,3 @@ return newArray;

}
return array[array.length - 1];
return item_2(array.length - 1, array);
}

@@ -48,3 +49,3 @@ export function tryLast(array) {

else {
return some(array[array.length - 1]);
return some(item_2(array.length - 1, array));
}

@@ -56,3 +57,3 @@ }

for (let i = 0; i <= (len - 1); i++) {
target[i] = f(i, source[i]);
setItem_1(target, i, f(i, item_2(i, source)));
}

@@ -65,3 +66,3 @@ return target;

for (let i = 0; i <= (len - 1); i++) {
target[i] = f(source[i]);
setItem_1(target, i, f(item_2(i, source)));
}

@@ -76,3 +77,3 @@ return target;

for (let i = 0; i <= (source1.length - 1); i++) {
result[i] = f(i, source1[i], source2[i]);
setItem_1(result, i, f(i, item_2(i, source1), item_2(i, source2)));
}

@@ -87,3 +88,3 @@ return result;

for (let i = 0; i <= (source1.length - 1); i++) {
result[i] = f(source1[i], source2[i]);
setItem_1(result, i, f(item_2(i, source1), item_2(i, source2)));
}

@@ -98,3 +99,3 @@ return result;

for (let i = 0; i <= (source1.length - 1); i++) {
result[i] = f(i, source1[i], source2[i], source3[i]);
setItem_1(result, i, f(i, item_2(i, source1), item_2(i, source2), item_2(i, source3)));
}

@@ -109,3 +110,3 @@ return result;

for (let i = 0; i <= (source1.length - 1); i++) {
result[i] = f(source1[i], source2[i], source3[i]);
setItem_1(result, i, f(item_2(i, source1), item_2(i, source2), item_2(i, source3)));
}

@@ -123,4 +124,4 @@ return result;

for (let i = 0; i <= (array.length - 1); i++) {
const patternInput = mapping(acc, array[i]);
res[i] = patternInput[0];
const patternInput = mapping(acc, item_2(i, array));
setItem_1(res, i, patternInput[0]);
acc = patternInput[1];

@@ -140,4 +141,4 @@ }

for (let i = array.length - 1; i >= 0; i--) {
const patternInput = mapping(array[i], acc);
res[i] = patternInput[0];
const patternInput = mapping(item_2(i, array), acc);
setItem_1(res, i, patternInput[0]);
acc = patternInput[1];

@@ -152,3 +153,3 @@ }

for (let i = 0; i <= (len - 1); i++) {
target[i] = [i, source[i]];
setItem_1(target, i, [i, item_2(i, source)]);
}

@@ -168,3 +169,3 @@ return target;

case 1:
return arrays_1[0];
return item_2(0, arrays_1);
default: {

@@ -174,3 +175,3 @@ let totalIdx = 0;

for (let idx = 0; idx <= (arrays_1.length - 1); idx++) {
const arr_1 = arrays_1[idx];
const arr_1 = item_2(idx, arrays_1);
totalLength = ((totalLength + arr_1.length) | 0);

@@ -180,5 +181,5 @@ }

for (let idx_1 = 0; idx_1 <= (arrays_1.length - 1); idx_1++) {
const arr_2 = arrays_1[idx_1];
const arr_2 = item_2(idx_1, arrays_1);
for (let j = 0; j <= (arr_2.length - 1); j++) {
result[totalIdx] = arr_2[j];
setItem_1(result, totalIdx, item_2(j, arr_2));
totalIdx = ((totalIdx + 1) | 0);

@@ -206,3 +207,3 @@ }

}
else if (eq.Equals(item_1, array[i])) {
else if (eq.Equals(item_1, item_2(i, array))) {
return i | 0;

@@ -227,3 +228,3 @@ }

const ar = Helpers_allocateArrayFromCons(cons, 1);
ar[0] = value;
setItem_1(ar, 0, value);
return ar;

@@ -237,3 +238,3 @@ }

for (let i = 0; i <= (count - 1); i++) {
result[i] = initializer(i);
setItem_1(result, i, initializer(i));
}

@@ -250,3 +251,3 @@ return result;

for (let i = 0; i <= (count - 1); i++) {
result[i] = [array[i], array[i + 1]];
setItem_1(result, i, [item_2(i, array), item_2(i + 1, array)]);
}

@@ -262,3 +263,3 @@ return result;

for (let i = 0; i <= (result.length - 1); i++) {
result[i] = initial;
setItem_1(result, i, initial);
}

@@ -279,5 +280,5 @@ return result;

const res = Helpers_allocateArrayFromCons(cons, array.length + 1);
res[0] = state;
setItem_1(res, 0, state);
for (let i = 0; i <= (array.length - 1); i++) {
res[i + 1] = folder(res[i], array[i]);
setItem_1(res, i + 1, folder(item_2(i, res), item_2(i, array)));
}

@@ -288,5 +289,5 @@ return res;

const res = Helpers_allocateArrayFromCons(cons, array.length + 1);
res[array.length] = state;
setItem_1(res, array.length, state);
for (let i = array.length - 1; i >= 0; i--) {
res[i] = folder(array[i], res[i + 1]);
setItem_1(res, i, folder(item_2(i, array), item_2(i + 1, res)));
}

@@ -309,3 +310,3 @@ return res;

let count = 0;
while ((count < array.length) && predicate(array[count])) {
while ((count < array.length) && predicate(item_2(count, array))) {
count = ((count + 1) | 0);

@@ -337,3 +338,3 @@ }

let count = 0;
while ((count < array.length) && predicate(array[count])) {
while ((count < array.length) && predicate(item_2(count, array))) {
count = ((count + 1) | 0);

@@ -408,8 +409,8 @@ }

for (let i = 0; i <= (len - 1); i++) {
if (f(source[i])) {
res1[iTrue] = source[i];
if (f(item_2(i, source))) {
setItem_1(res1, iTrue, item_2(i, source));
iTrue = ((iTrue + 1) | 0);
}
else {
res2[iFalse] = source[i];
setItem_1(res2, iFalse, item_2(i, source));
iFalse = ((iFalse + 1) | 0);

@@ -459,3 +460,3 @@ }

else {
const matchValue = chooser(array[i]);
const matchValue = chooser(item_2(i, array));
if (matchValue != null) {

@@ -482,3 +483,3 @@ return value_2(matchValue);

else {
const matchValue = chooser(array[i]);
const matchValue = chooser(item_2(i, array));
if (matchValue == null) {

@@ -504,4 +505,4 @@ i_mut = (i + 1);

}
else if (predicate(array[i])) {
return array[i];
else if (predicate(item_2(i, array))) {
return item_2(i, array);
}

@@ -524,4 +525,4 @@ else {

}
else if (predicate(array[i])) {
return some(array[i]);
else if (predicate(item_2(i, array))) {
return some(item_2(i, array));
}

@@ -544,3 +545,3 @@ else {

}
else if (predicate(array[i])) {
else if (predicate(item_2(i, array))) {
return i | 0;

@@ -565,3 +566,3 @@ }

}
else if (predicate(array[i])) {
else if (predicate(item_2(i, array))) {
return i | 0;

@@ -585,3 +586,3 @@ }

}
else if (predicate(array[i])) {
else if (predicate(item_2(i, array))) {
return i;

@@ -601,3 +602,3 @@ }

for (let i = 0; i <= (array.length - 1); i++) {
const matchValue = chooser(array[i]);
const matchValue = chooser(item_2(i, array));
if (matchValue != null) {

@@ -624,3 +625,3 @@ const y = value_2(matchValue);

for (let i = 0; i <= (array.length - 1); i++) {
action(array[i]);
action(item_2(i, array));
}

@@ -630,3 +631,3 @@ }

for (let i = 0; i <= (array.length - 1); i++) {
action(i, array[i]);
action(i, item_2(i, array));
}

@@ -639,3 +640,3 @@ }

for (let i = 0; i <= (array1.length - 1); i++) {
action(array1[i], array2[i]);
action(item_2(i, array1), item_2(i, array2));
}

@@ -648,3 +649,3 @@ }

for (let i = 0; i <= (array1.length - 1); i++) {
action(i, array1[i], array2[i]);
action(i, item_2(i, array1), item_2(i, array2));
}

@@ -667,4 +668,4 @@ }

}
res[j] = x;
checkFlags[j] = 1;
setItem_1(res, j, x);
setItem_1(checkFlags, j, 1);
}, array);

@@ -681,3 +682,3 @@ if (!(checkFlags.every((y) => (1 === y)))) {

for (let i = 0; i <= length; i++) {
target[i + lower_1] = source[i];
setItem_1(target, i + lower_1, item_2(i, source));
}

@@ -723,3 +724,3 @@ }

for (let j = 0; j <= (ys.length - 1); j++) {
res[(i * len2) + j] = [xs[i], ys[j]];
setItem_1(res, (i * len2) + j, [item_2(i, xs), item_2(j, ys)]);
}

@@ -753,4 +754,4 @@ }

iterateIndexed((i, tupledArg) => {
res1[i] = tupledArg[0];
res2[i] = tupledArg[1];
setItem_1(res1, i, tupledArg[0]);
setItem_1(res2, i, tupledArg[1]);
}, array);

@@ -765,5 +766,5 @@ return [res1, res2];

iterateIndexed((i, tupledArg) => {
res1[i] = tupledArg[0];
res2[i] = tupledArg[1];
res3[i] = tupledArg[2];
setItem_1(res1, i, tupledArg[0]);
setItem_1(res2, i, tupledArg[1]);
setItem_1(res3, i, tupledArg[2]);
}, array);

@@ -778,3 +779,3 @@ return [res1, res2, res3];

for (let i = 0; i <= (array1.length - 1); i++) {
result[i] = [array1[i], array2[i]];
setItem_1(result, i, [item_2(i, array1), item_2(i, array2)]);
}

@@ -789,3 +790,3 @@ return result;

for (let i = 0; i <= (array1.length - 1); i++) {
result[i] = [array1[i], array2[i], array3[i]];
setItem_1(result, i, [item_2(i, array1), item_2(i, array2), item_2(i, array3)]);
}

@@ -837,3 +838,3 @@ return result;

while ((res === 0) && (i < len)) {
res = (comparer(source1[i], source2[i]) | 0);
res = (comparer(item_2(i, source1), item_2(i, source2)) | 0);
i = ((i + 1) | 0);

@@ -880,3 +881,3 @@ }

while ((res === 0) && (i < len1)) {
res = (comparer(source1[i], source2[i]) | 0);
res = (comparer(item_2(i, source1), item_2(i, source2)) | 0);
i = ((i + 1) | 0);

@@ -913,3 +914,3 @@ }

while ((i < length1) && result) {
result = equals(array1[i], array2[i]);
result = equals(item_2(i, array1), item_2(i, array2));
i = ((i + 1) | 0);

@@ -924,3 +925,3 @@ }

case 1:
return array[0];
return item_2(0, array);
case 0:

@@ -934,3 +935,3 @@ throw new Error("The input sequence was empty\\nParameter name: array");

if (array.length === 1) {
return some(array[0]);
return some(item_2(0, array));
}

@@ -946,3 +947,3 @@ else {

else {
return array[0];
return item_2(0, array);
}

@@ -955,3 +956,3 @@ }

else {
return some(array[0]);
return some(item_2(0, array));
}

@@ -966,4 +967,17 @@ }

export function item(index, array) {
return array[index];
if ((index < 0) ? true : (index >= array.length)) {
throw new Error("Index was outside the bounds of the array.\\nParameter name: index");
}
else {
return array[index];
}
}
export function setItem(array, index, value) {
if ((index < 0) ? true : (index >= array.length)) {
throw new Error("Index was outside the bounds of the array.\\nParameter name: index");
}
else {
array[index] = value;
}
}
export function tryItem(index, array) {

@@ -989,3 +1003,3 @@ if ((index < 0) ? true : (index >= array.length)) {

for (let i = 0; i <= (array1.length - 1); i++) {
acc = folder(i, acc, array1[i], array2[i]);
acc = folder(i, acc, item_2(i, array1), item_2(i, array2));
}

@@ -1004,3 +1018,3 @@ return acc;

for (let i = 1; i <= size; i++) {
acc = folder(i - 1, array1[size - i], array2[size - i], acc);
acc = folder(i - 1, item_2(size - i, array1), item_2(size - i, array2), acc);
}

@@ -1035,3 +1049,3 @@ return acc;

}
else if (predicate(array[index])) {
else if (predicate(item_2(index, array))) {
return true;

@@ -1057,3 +1071,3 @@ }

}
else if (predicate(array1[index], array2[index])) {
else if (predicate(item_2(index, array1), item_2(index, array2))) {
return true;

@@ -1080,3 +1094,3 @@ }

for (let i = 0; i <= (array.length - 1); i++) {
acc = adder.Add(acc, array[i]);
acc = adder.Add(acc, item_2(i, array));
}

@@ -1088,3 +1102,3 @@ return acc;

for (let i = 0; i <= (array.length - 1); i++) {
acc = adder.Add(acc, projection(array[i]));
acc = adder.Add(acc, projection(item_2(i, array)));
}

@@ -1111,3 +1125,3 @@ return acc;

for (let i = 0; i <= (array.length - 1); i++) {
total = averager.Add(total, array[i]);
total = averager.Add(total, item_2(i, array));
}

@@ -1122,3 +1136,3 @@ return averager.DivideByInt(total, array.length);

for (let i = 0; i <= (array.length - 1); i++) {
total = averager.Add(total, projection(array[i]));
total = averager.Add(total, projection(item_2(i, array)));
}

@@ -1135,3 +1149,3 @@ return averager.DivideByInt(total, array.length);

for (let i = windowSize; i <= source.length; i++) {
res[i - windowSize] = source.slice(i - windowSize, (i - 1) + 1);
setItem_1(res, i - windowSize, source.slice(i - windowSize, (i - 1) + 1));
}

@@ -1169,3 +1183,3 @@ return res;

else {
const firstArray = arrays_1[0];
const firstArray = item_2(0, arrays_1);
const lenInner = firstArray.length | 0;

@@ -1177,5 +1191,5 @@ if (!forAll((a) => (a.length === lenInner), arrays_1)) {

for (let i = 0; i <= (lenInner - 1); i++) {
result[i] = Helpers_allocateArrayFromCons(cons, len);
setItem_1(result, i, Helpers_allocateArrayFromCons(cons, len));
for (let j = 0; j <= (len - 1); j++) {
result[i][j] = arrays_1[j][i];
item_2(i, result)[j] = item_2(i, item_2(j, arrays_1));
}

@@ -1193,7 +1207,7 @@ }

for (let i = 0; i <= (index - 1); i++) {
target[i] = xs[i];
setItem_1(target, i, item_2(i, xs));
}
target[index] = y;
setItem_1(target, index, y);
for (let i_1 = index; i_1 <= (len - 1); i_1++) {
target[i_1 + 1] = xs[i_1];
setItem_1(target, i_1 + 1, item_2(i_1, xs));
}

@@ -1211,9 +1225,9 @@ return target;

for (let i = 0; i <= (index - 1); i++) {
target[i] = xs[i];
setItem_1(target, i, item_2(i, xs));
}
for (let i_1 = 0; i_1 <= (len2 - 1); i_1++) {
target[index + i_1] = ys_1[i_1];
setItem_1(target, index + i_1, item_2(i_1, ys_1));
}
for (let i_2 = index; i_2 <= (len - 1); i_2++) {
target[i_2 + len2] = xs[i_2];
setItem_1(target, i_2 + len2, item_2(i_2, xs));
}

@@ -1267,3 +1281,3 @@ return target;

for (let i = 0; i <= (len - 1); i++) {
target[i] = ((i === index) ? y : xs[i]);
setItem_1(target, i, (i === index) ? y : item_2(i, xs));
}

@@ -1270,0 +1284,0 @@ return target;

@@ -10,2 +10,16 @@ # Changelog

## 1.1.0 - 2024-02-20
### Added
#### JavaScript
* [GH-3759](https://github.com/fable-compiler/Fable/issues/3759) Add `StringBuilder.Chars` (by @MangelMaxime)
* Add `StringBuilder.AppendFormat` (by @ncave)
* [GH-3748](https://github.com/fable-compiler/Fable/pull/3748) Add `Array.getItem` and `Array.setItem` (by @MangelMaxime)
## 1.0.0 - 2024-02-13
* Release stable version
## 1.0.0-beta-001 - 2024-02-12

@@ -12,0 +26,0 @@

@@ -7,3 +7,3 @@ import { join } from "./String.js";

import { SR_inputSequenceTooLong, SR_inputSequenceEmpty, SR_inputMustBeNonNegative, SR_notEnoughElements, SR_differentLengths, SR_keyNotFoundAlt, SR_indexOutOfBounds, SR_inputWasEmpty } from "./Global.js";
import { transpose as transpose_1, splitInto as splitInto_1, windowed as windowed_1, pairwise as pairwise_1, chunkBySize as chunkBySize_1, map as map_1, permute as permute_1, tryFindIndexBack as tryFindIndexBack_1, tryFindBack as tryFindBack_1, scanBack as scanBack_1, foldBack2 as foldBack2_1, foldBack as foldBack_1, fill } from "./Array.js";
import { transpose as transpose_1, splitInto as splitInto_1, windowed as windowed_1, pairwise as pairwise_1, chunkBySize as chunkBySize_1, map as map_1, permute as permute_1, tryFindIndexBack as tryFindIndexBack_1, tryFindBack as tryFindBack_1, scanBack as scanBack_1, item as item_1, foldBack2 as foldBack2_1, foldBack as foldBack_1, setItem, fill } from "./Array.js";
export class FSharpList extends Record {

@@ -349,3 +349,3 @@ constructor(head, tail) {

if (!FSharpList__get_IsEmpty(xs_1)) {
res[i] = FSharpList__get_Head(xs_1);
setItem(res, i, FSharpList__get_Head(xs_1));
i_mut = (i + 1);

@@ -459,3 +459,3 @@ xs_1_mut = FSharpList__get_Tail(xs_1);

for (let i = xs.length - 1; i >= 0; i--) {
res = FSharpList_Cons_305B8EAC(xs[i], res);
res = FSharpList_Cons_305B8EAC(item_1(i, xs), res);
}

@@ -462,0 +462,0 @@ return res;

@@ -5,3 +5,3 @@ import { record_type, bool_type, list_type, option_type, class_type } from "./Reflection.js";

import { singleton, ofArrayWithTail, head, tail, isEmpty as isEmpty_1, fold as fold_1, empty as empty_1, FSharpList, cons } from "./List.js";
import { map as map_2, fill } from "./Array.js";
import { map as map_2, item, fill, setItem } from "./Array.js";
import { Record } from "./Types.js";

@@ -754,3 +754,3 @@ import { tryPick as tryPick_1, pick as pick_1, iterate as iterate_1, compareWith, map as map_1, unfold } from "./Seq.js";

MapTreeModule_iter((x, y) => {
arr[j] = [x, y];
setItem(arr, j, [x, y]);
j = ((j + 1) | 0);

@@ -787,3 +787,3 @@ }, m);

for (let idx = 0; idx <= (arr.length - 1); idx++) {
const forLoopVar = arr[idx];
const forLoopVar = item(idx, arr);
res = MapTreeModule_add(comparer, forLoopVar[0], forLoopVar[1], res);

@@ -790,0 +790,0 @@ }

import { disposeSafe, defaultOf, equals, toIterator, getEnumerator } from "./Util.js";
import { iterate, map, delay, toArray, iterateIndexed, concat } from "./Seq.js";
import { value as value_1 } from "./Option.js";
import { setItem } from "./Array.js";
import { FSharpRef } from "./Types.js";

@@ -78,3 +79,3 @@ import { class_type } from "./Reflection.js";

iterateIndexed((i, e) => {
array[arrayIndex + i] = e;
setItem(array, arrayIndex + i, e);
}, this$);

@@ -81,0 +82,0 @@ }

import { disposeSafe, defaultOf, toIterator, getEnumerator } from "./Util.js";
import { iterate, map, iterateIndexed, concat } from "./Seq.js";
import { setItem } from "./Array.js";
import { some } from "./Option.js";

@@ -58,3 +59,3 @@ import { FSharpRef } from "./Types.js";

iterateIndexed((i, e) => {
array[arrayIndex + i] = e;
setItem(array, arrayIndex + i, e);
}, this$);

@@ -61,0 +62,0 @@ }

@@ -6,3 +6,3 @@ {

"name": "@fable-org/fable-library-js",
"version": "1.0.0-beta-001",
"version": "1.1.0",
"description": "Core library used by F# projects compiled with fable.io",

@@ -9,0 +9,0 @@ "author": "Fable Contributors",

import { class_type } from "./Reflection.js";
import { fromFloat64, op_Addition, toInt32, toFloat64, compare, fromInt32, toInt64 } from "./BigInt.js";
import { fill } from "./Array.js";
import { item, fill, setItem } from "./Array.js";
function Native_random() {

@@ -76,9 +76,9 @@ return Math.random();

}
mj = (this.seedArray[ii] | 0);
mj = (item(ii, this.seedArray) | 0);
}
for (let k = 1; k <= 4; k++) {
for (let i_1 = 1; i_1 <= 55; i_1++) {
this.seedArray[i_1] = ((this.seedArray[i_1] - this.seedArray[1 + ((i_1 + 30) % 55)]) | 0);
if (this.seedArray[i_1] < 0) {
this.seedArray[i_1] = ((this.seedArray[i_1] + this.MBIG) | 0);
this.seedArray[i_1] = ((item(i_1, this.seedArray) - item(1 + ((i_1 + 30) % 55), this.seedArray)) | 0);
if (item(i_1, this.seedArray) < 0) {
this.seedArray[i_1] = ((item(i_1, this.seedArray) + this.MBIG) | 0);
}

@@ -119,3 +119,3 @@ }

for (let i = 0; i <= (buffer.length - 1); i++) {
buffer[i] = ((Seeded__InternalSample(this$) % (~~255 + 1)) & 0xFF);
setItem(buffer, i, (Seeded__InternalSample(this$) % (~~255 + 1)) & 0xFF);
}

@@ -142,3 +142,3 @@ }

}
retVal = ((_.seedArray[locINext] - _.seedArray[locINextp]) | 0);
retVal = ((item(locINext, _.seedArray) - item(locINextp, _.seedArray)) | 0);
if (retVal === _.MBIG) {

@@ -145,0 +145,0 @@ retVal = ((retVal - 1) | 0);

@@ -41,2 +41,3 @@ export declare function compare(...args: any[]): number;

export declare function substring(str: string, startIndex: number, length?: number): string;
export declare function toCharArray2(str: string, startIndex: number, length: number): string[];
interface FormattableString {

@@ -43,0 +44,0 @@ strs: TemplateStringsArray;

@@ -530,2 +530,5 @@ import { toString as dateToString } from "./Date.js";

}
export function toCharArray2(str, startIndex, length) {
return substring(str, startIndex, length).split("");
}
export function fmt(strs, ...args) {

@@ -532,0 +535,0 @@ return ({ strs, args });

import { disposeSafe, defaultOf, toIterator, getEnumerator, structuralHash, equals as equals_1, compare } from "./Util.js";
import { class_type } from "./Reflection.js";
import { toArray, empty, singleton, append, enumerateWhile, delay } from "./Seq.js";
import { initialize, copyTo, fill } from "./Array.js";
import { setItem, initialize, copyTo, fill, item as item_1 } from "./Array.js";
import { max } from "./Double.js";

@@ -71,3 +71,3 @@ export class Comparer$1 {

let index = _.count - 1;
return enumerateWhile(() => (index >= 0), delay(() => append(singleton(_.contents[index]), delay(() => {
return enumerateWhile(() => (index >= 0), delay(() => append(singleton(item_1(index, _.contents)), delay(() => {
index = ((index - 1) | 0);

@@ -115,6 +115,6 @@ return empty();

_.count = ((_.count - 1) | 0);
return _.contents[_.count];
return item_1(_.count, _.contents);
}
export function Stack$1__Peek(_) {
return _.contents[_.count - 1];
return item_1(_.count - 1, _.contents);
}

@@ -125,3 +125,3 @@ export function Stack$1__Contains_2B595(_, x) {

while ((i < _.count) && !found) {
if (equals_1(x, _.contents[i])) {
if (equals_1(x, item_1(i, _.contents))) {
found = true;

@@ -168,3 +168,3 @@ }

export function Stack$1__ToArray(_) {
return initialize(_.count, (i) => _.contents[(_.count - 1) - i]);
return initialize(_.count, (i) => item_1((_.count - 1) - i, _.contents));
}

@@ -224,3 +224,3 @@ export class Queue$1 {

}
const value = _.contents[_.head];
const value = item_1(_.head, _.contents);
_.head = (((_.head + 1) % Queue$1__size(_)) | 0);

@@ -234,3 +234,3 @@ _.count = ((_.count - 1) | 0);

}
return _.contents[_.head];
return item_1(_.head, _.contents);
}

@@ -259,3 +259,3 @@ export function Queue$1__TryDequeue_1F3DB691(this$, result) {

while ((i < _.count) && !found) {
if (equals_1(x, _.contents[Queue$1__toIndex_Z524259A4(_, i)])) {
if (equals_1(x, item_1(Queue$1__toIndex_Z524259A4(_, i), _.contents))) {
found = true;

@@ -289,3 +289,3 @@ }

const item = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
target[i] = item;
setItem(target, i, item);
i = ((i + 1) | 0);

@@ -320,3 +320,3 @@ }

let i = 0;
return enumerateWhile(() => (i < this$.count), delay(() => append(singleton(this$.contents[Queue$1__toIndex_Z524259A4(this$, i)]), delay(() => {
return enumerateWhile(() => (i < this$.count), delay(() => append(singleton(item_1(Queue$1__toIndex_Z524259A4(this$, i), this$.contents)), delay(() => {
i = ((i + 1) | 0);

@@ -323,0 +323,0 @@ return empty();

@@ -23,5 +23,14 @@ import { float64, int32 } from "./Int32.js";

export declare function StringBuilder__AppendFormat_433E080(x: StringBuilder, fmt: string, o: any): StringBuilder;
export declare function StringBuilder__AppendFormat_Z3B30EC65(x: StringBuilder, fmt: string, o1: any, o2: any): StringBuilder;
export declare function StringBuilder__AppendFormat_10D165E0(x: StringBuilder, fmt: string, o1: any, o2: any, o3: any): StringBuilder;
export declare function StringBuilder__AppendFormat_Z17053F5(x: StringBuilder, fmt: string, arr: any[]): StringBuilder;
export declare function StringBuilder__AppendFormat_Z696D8D1B(x: StringBuilder, provider: any, fmt: string, o: any): StringBuilder;
export declare function StringBuilder__AppendFormat_26802C9E(x: StringBuilder, provider: any, fmt: string, o1: any, o2: any): StringBuilder;
export declare function StringBuilder__AppendFormat_Z471ADCBB(x: StringBuilder, provider: any, fmt: string, o1: any, o2: any, o3: any): StringBuilder;
export declare function StringBuilder__AppendFormat_6C2E3E6E(x: StringBuilder, provider: any, fmt: string, arr: any[]): StringBuilder;
export declare function StringBuilder__AppendLine(x: StringBuilder): StringBuilder;
export declare function StringBuilder__AppendLine_Z721C83C5(x: StringBuilder, s: string): StringBuilder;
export declare function StringBuilder__Clear(x: StringBuilder): StringBuilder;
export declare function StringBuilder__get_Chars_Z524259A4(x: StringBuilder, index: int32): string;
export declare function StringBuilder__set_Chars_413E0D0A(x: StringBuilder, index: int32, value: string): void;
export declare function StringBuilder__Replace_Z766F94C0(x: StringBuilder, oldValue: string, newValue: string): StringBuilder;

@@ -31,2 +40,1 @@ export declare function StringBuilder__Replace_Z384F8060(x: StringBuilder, oldValue: string, newValue: string): StringBuilder;

export declare function StringBuilder__ToString_Z37302880(x: StringBuilder, firstIndex: int32, length: int32): string;
export declare function StringBuilder__Clear(x: StringBuilder): StringBuilder;

@@ -72,2 +72,14 @@ import { replace, format, substring, isNullOrEmpty, join } from "./String.js";

}
export function StringBuilder__AppendFormat_Z3B30EC65(x, fmt, o1, o2) {
void (x.buf.push(format(fmt, o1, o2)));
return x;
}
export function StringBuilder__AppendFormat_10D165E0(x, fmt, o1, o2, o3) {
void (x.buf.push(format(fmt, o1, o2, o3)));
return x;
}
export function StringBuilder__AppendFormat_Z17053F5(x, fmt, arr) {
void (x.buf.push(format(fmt, ...arr)));
return x;
}
export function StringBuilder__AppendFormat_Z696D8D1B(x, provider, fmt, o) {

@@ -77,2 +89,14 @@ void (x.buf.push(format(provider, fmt, o)));

}
export function StringBuilder__AppendFormat_26802C9E(x, provider, fmt, o1, o2) {
void (x.buf.push(format(provider, fmt, o1, o2)));
return x;
}
export function StringBuilder__AppendFormat_Z471ADCBB(x, provider, fmt, o1, o2, o3) {
void (x.buf.push(format(provider, fmt, o1, o2, o3)));
return x;
}
export function StringBuilder__AppendFormat_6C2E3E6E(x, provider, fmt, arr) {
void (x.buf.push(format(provider, fmt, ...arr)));
return x;
}
export function StringBuilder__AppendLine(x) {

@@ -87,2 +111,36 @@ void (x.buf.push("\n"));

}
export function StringBuilder__Clear(x) {
clear(x.buf);
return x;
}
export function StringBuilder__get_Chars_Z524259A4(x, index) {
let len = 0;
let i = -1;
while (((i + 1) < x.buf.length) && (len < index)) {
i = ((i + 1) | 0);
len = ((len + x.buf[i].length) | 0);
}
if (((index < 0) ? true : (i < 0)) ? true : (i >= x.buf.length)) {
throw new Error("Index was outside the bounds of the array");
}
else {
const pos = ((len - index) - 1) | 0;
return x.buf[i][pos];
}
}
export function StringBuilder__set_Chars_413E0D0A(x, index, value) {
let len = 0;
let i = -1;
while (((i + 1) < x.buf.length) && (len < index)) {
i = ((i + 1) | 0);
len = ((len + x.buf[i].length) | 0);
}
if (((index < 0) ? true : (i < 0)) ? true : (i >= x.buf.length)) {
throw new Error("Index was outside the bounds of the array");
}
else {
const pos = ((len - index) - 1) | 0;
x.buf[i] = ((x.buf[i].slice(0, (pos - 1) + 1) + value) + x.buf[i].slice(pos + 1, x.buf[i].length));
}
}
export function StringBuilder__Replace_Z766F94C0(x, oldValue, newValue) {

@@ -95,6 +153,4 @@ for (let i = x.buf.length - 1; i >= 0; i--) {

export function StringBuilder__Replace_Z384F8060(x, oldValue, newValue) {
for (let i = x.buf.length - 1; i >= 0; i--) {
x.buf[i] = replace(x.buf[i], oldValue, newValue);
}
return x;
const str = replace(toString(x), oldValue, newValue);
return StringBuilder__Append_Z721C83C5(StringBuilder__Clear(x), str);
}

@@ -111,5 +167,1 @@ export function StringBuilder__get_Length(x) {

}
export function StringBuilder__Clear(x) {
clear(x.buf);
return x;
}

@@ -5,3 +5,3 @@ {

"private": false,
"version": "1.0.0",
"version": "1.1.0",
"main": "index.js",

@@ -8,0 +8,0 @@ "bin": {

@@ -5,21 +5,21 @@ import { fileURLToPath as fileURLToPath_1 } from "url";

import { coreAssemblies } from "../../Fable.Transforms/Global/Metadata.fs.js";
import { toText, join as join_2, substring, toFail, printf, toConsole, endsWith, replace, trimEnd } from "./fable_modules/fable-library-js.4.11.0/String.js";
import { stringHash, uncurry2, defaultOf, comparePrimitives, Lazy, int32ToString } from "./fable_modules/fable-library-js.4.11.0/Util.js";
import { toText, join as join_2, substring, toFail, printf, toConsole, endsWith, replace, trimEnd } from "./fable_modules/fable-library-js.4.12.2/String.js";
import { stringHash, uncurry2, defaultOf, comparePrimitives, Lazy, int32ToString } from "./fable_modules/fable-library-js.4.12.2/Util.js";
import { runCmdAndExitIfFails, CmdLineOptions, Path_GetFileNameWithoutExtension, serializeToJson, ensureDirExists, writeAllText, readAllBytes as readAllBytes_1, measureTime, getHomePath, readAllText, Path_ChangeExtension, normalizeFullPath, Path_GetFileName, getRelativePath, Path_Combine, Path_GetDirectoryName, normalizePath } from "./Platform.fs.js";
import { ofSeq as ofSeq_1, FSharpSet__Contains } from "./fable_modules/fable-library-js.4.11.0/Set.js";
import { singleton } from "./fable_modules/fable-library-js.4.11.0/AsyncBuilder.js";
import { StringBuilder_$ctor, StringBuilder__Append_Z721C83C5 } from "./fable_modules/fable-library-js.4.11.0/System.Text.js";
import { ofSeq as ofSeq_1, FSharpSet__Contains } from "./fable_modules/fable-library-js.4.12.2/Set.js";
import { singleton } from "./fable_modules/fable-library-js.4.12.2/AsyncBuilder.js";
import { StringBuilder_$ctor, StringBuilder__Append_Z721C83C5 } from "./fable_modules/fable-library-js.4.12.2/System.Text.js";
import { MappingIndex } from "./fable_modules/source-map-sharp.1.0.9/src/Util.fs.js";
import { SourceMapGenerator__toJSON, SourceMapGenerator_$ctor_Z257FAB7, SourceMapGenerator__AddMapping_Z1908099D } from "./fable_modules/source-map-sharp.1.0.9/src/SourceMapGenerator.fs.js";
import { toArray as toArray_1, orElse, map as map_1, defaultArg, unwrap } from "./fable_modules/fable-library-js.4.11.0/Option.js";
import { class_type } from "./fable_modules/fable-library-js.4.11.0/Reflection.js";
import { FSharpRef, toString } from "./fable_modules/fable-library-js.4.11.0/Types.js";
import { item, equalsWith, splitAt, tryFindIndex, contains as contains_1, pairwise, tryFindBack, append, reverse, map, partition } from "./fable_modules/fable-library-js.4.11.0/Array.js";
import { startImmediate } from "./fable_modules/fable-library-js.4.11.0/Async.js";
import { toArray as toArray_1, orElse, map as map_1, defaultArg, unwrap } from "./fable_modules/fable-library-js.4.12.2/Option.js";
import { class_type } from "./fable_modules/fable-library-js.4.12.2/Reflection.js";
import { FSharpRef, toString } from "./fable_modules/fable-library-js.4.12.2/Types.js";
import { item, equalsWith, splitAt, tryFindIndex, contains as contains_1, pairwise, tryFindBack, append, reverse, map, partition } from "./fable_modules/fable-library-js.4.12.2/Array.js";
import { startImmediate } from "./fable_modules/fable-library-js.4.12.2/Async.js";
import { parseProject } from "./ProjectParser.fs.js";
import { tryFind, toArray, ofSeq } from "./fable_modules/fable-library-js.4.11.0/Map.js";
import { addToDict, tryGetValue } from "./fable_modules/fable-library-js.4.11.0/MapUtil.js";
import { ofArray, singleton as singleton_1, contains } from "./fable_modules/fable-library-js.4.11.0/List.js";
import { tryParse } from "./fable_modules/fable-library-js.4.11.0/Boolean.js";
import { iterate } from "./fable_modules/fable-library-js.4.11.0/Seq.js";
import { tryFind, toArray, ofSeq } from "./fable_modules/fable-library-js.4.12.2/Map.js";
import { addToDict, tryGetValue } from "./fable_modules/fable-library-js.4.12.2/MapUtil.js";
import { ofArray, singleton as singleton_1, contains } from "./fable_modules/fable-library-js.4.12.2/List.js";
import { tryParse } from "./fable_modules/fable-library-js.4.12.2/Boolean.js";
import { iterate } from "./fable_modules/fable-library-js.4.12.2/Seq.js";

@@ -26,0 +26,0 @@ export const fileURLToPath = fileURLToPath_1;

@@ -1,3 +0,3 @@

import { Record } from "./fable_modules/fable-library-js.4.11.0/Types.js";
import { record_type, bool_type, option_type, string_type } from "./fable_modules/fable-library-js.4.11.0/Reflection.js";
import { Record } from "./fable_modules/fable-library-js.4.12.2/Types.js";
import { record_type, bool_type, option_type, string_type } from "./fable_modules/fable-library-js.4.12.2/Reflection.js";
import * as fs from "fs";

@@ -8,6 +8,6 @@ import * as os from "os";

import * as util from "./util.js";
import { trimEnd, substring, endsWith, replace, trimStart } from "./fable_modules/fable-library-js.4.11.0/String.js";
import { fromFloat64, toInt64 } from "./fable_modules/fable-library-js.4.11.0/BigInt.js";
import { map, sort, item } from "./fable_modules/fable-library-js.4.11.0/Array.js";
import { comparePrimitives } from "./fable_modules/fable-library-js.4.11.0/Util.js";
import { trimEnd, substring, endsWith, replace, trimStart } from "./fable_modules/fable-library-js.4.12.2/String.js";
import { fromFloat64, toInt64 } from "./fable_modules/fable-library-js.4.12.2/BigInt.js";
import { map, sort, item } from "./fable_modules/fable-library-js.4.12.2/Array.js";
import { comparePrimitives } from "./fable_modules/fable-library-js.4.12.2/Util.js";

@@ -14,0 +14,0 @@ export class CmdLineOptions extends Record {

@@ -1,14 +0,14 @@

import { Union } from "./fable_modules/fable-library-js.4.11.0/Types.js";
import { union_type, string_type } from "./fable_modules/fable-library-js.4.11.0/Reflection.js";
import { matches, replace, create, match } from "./fable_modules/fable-library-js.4.11.0/RegExp.js";
import { empty, singleton, collect, append, toArray, tryHead, map, delay, toList } from "./fable_modules/fable-library-js.4.11.0/Seq.js";
import { endsWith, split, toConsole, replace as replace_1, trimStart, printf, toText } from "./fable_modules/fable-library-js.4.11.0/String.js";
import { map as map_1, defaultArg } from "./fable_modules/fable-library-js.4.11.0/Option.js";
import { Union } from "./fable_modules/fable-library-js.4.12.2/Types.js";
import { union_type, string_type } from "./fable_modules/fable-library-js.4.12.2/Reflection.js";
import { matches, replace, create, match } from "./fable_modules/fable-library-js.4.12.2/RegExp.js";
import { empty, singleton, collect, append, toArray, tryHead, map, delay, toList } from "./fable_modules/fable-library-js.4.12.2/Seq.js";
import { endsWith, split, toConsole, replace as replace_1, trimStart, printf, toText } from "./fable_modules/fable-library-js.4.12.2/String.js";
import { map as map_1, defaultArg } from "./fable_modules/fable-library-js.4.12.2/Option.js";
import { getGlobFiles, Path_GetFileName, Path_GetDirectoryName, normalizeFullPath, getDirFiles, Path_Combine, getHomePath, readAllText } from "./Platform.fs.js";
import { collect as collect_1, map as map_2, append as append_1, fold, tryLast } from "./fable_modules/fable-library-js.4.11.0/Array.js";
import { Array_distinct, distinct, except } from "./fable_modules/fable-library-js.4.11.0/Seq2.js";
import { curry2, stringHash } from "./fable_modules/fable-library-js.4.11.0/Util.js";
import { head, tail, isEmpty } from "./fable_modules/fable-library-js.4.11.0/List.js";
import { HashSet } from "./fable_modules/fable-library-js.4.11.0/MutableSet.js";
import { unionWith } from "./fable_modules/fable-library-js.4.11.0/Set.js";
import { collect as collect_1, map as map_2, append as append_1, fold, tryLast } from "./fable_modules/fable-library-js.4.12.2/Array.js";
import { Array_distinct, distinct, except } from "./fable_modules/fable-library-js.4.12.2/Seq2.js";
import { curry2, stringHash } from "./fable_modules/fable-library-js.4.12.2/Util.js";
import { head, tail, isEmpty } from "./fable_modules/fable-library-js.4.12.2/List.js";
import { HashSet } from "./fable_modules/fable-library-js.4.12.2/MutableSet.js";
import { unionWith } from "./fable_modules/fable-library-js.4.12.2/Set.js";

@@ -103,3 +103,3 @@ export class ReferenceType extends Union {

const treatWarningsAsErrors = getXmlTagContentsFirstOrDefault("TreatWarningsAsErrors", "", projectXml);
const defines = toArray(except(["$(DefineConstants)", ""], distinct(map((s_1) => s_1.trim(), append(["FABLE_COMPILER", "FABLE_COMPILER_4", "FABLE_COMPILER_JAVASCRIPT"], collect((s) => split(s, [";"], void 0, 0), getXmlTagContents("DefineConstants", projectXml)))), {
const defines = toArray(except(["$(DefineConstants)", ""], distinct(map((s_1) => s_1.trim(), append(["FABLE_COMPILER", "FABLE_COMPILER_4", "FABLE_COMPILER_JAVASCRIPT", "NPM_PACKAGE_FABLE_COMPILER_JAVASCRIPT"], collect((s) => split(s, [";"], void 0, 0), getXmlTagContents("DefineConstants", projectXml)))), {
Equals: (x, y) => (x === y),

@@ -214,3 +214,3 @@ GetHashCode: stringHash,

}, [[], []], split(projectXml, ["\n"], void 0, 0));
return [[], patternInput[0], append_1(patternInput[1], [Path_GetFileName(projectFilePath)]), ["--define:FABLE_COMPILER", "--define:FABLE_COMPILER_4", "--define:FABLE_COMPILER_JAVASCRIPT"]];
return [[], patternInput[0], append_1(patternInput[1], [Path_GetFileName(projectFilePath)]), ["--define:FABLE_COMPILER", "--define:FABLE_COMPILER_4", "--define:FABLE_COMPILER_JAVASCRIPT", "--define:NPM_PACKAGE_FABLE_COMPILER_JAVASCRIPT"]];
}

@@ -217,0 +217,0 @@

@@ -5,21 +5,21 @@ import { getAssembliesDir } from "@fable-org/fable-metadata";

import { coreAssemblies } from "./Fable.Transforms/Global/Metadata.js";
import { toText, join, substring, toFail, printf, toConsole, endsWith, replace, trimEnd } from "./fable_modules/fable-library-js.4.12.0/String.js";
import { stringHash, uncurry2, defaultOf, comparePrimitives, Lazy, int32ToString } from "./fable_modules/fable-library-js.4.12.0/Util.js";
import { toText, join, substring, toFail, printf, toConsole, endsWith, replace, trimEnd } from "./fable_modules/fable-library-js.4.12.2/String.js";
import { stringHash, uncurry2, defaultOf, comparePrimitives, Lazy, int32ToString } from "./fable_modules/fable-library-js.4.12.2/Util.js";
import { runCmdAndExitIfFails, CmdLineOptions, Path_GetFileNameWithoutExtension, serializeToJson, ensureDirExists, writeAllText, readAllBytes as readAllBytes_1, measureTime, getHomePath, readAllText, Path_ChangeExtension, normalizeFullPath, Path_GetFileName, getRelativePath, Path_Combine, Path_GetDirectoryName, normalizePath } from "./Platform.js";
import { ofSeq as ofSeq_1, FSharpSet__Contains } from "./fable_modules/fable-library-js.4.12.0/Set.js";
import { singleton } from "./fable_modules/fable-library-js.4.12.0/AsyncBuilder.js";
import { StringBuilder_$ctor, StringBuilder__Append_Z721C83C5 } from "./fable_modules/fable-library-js.4.12.0/System.Text.js";
import { ofSeq as ofSeq_1, FSharpSet__Contains } from "./fable_modules/fable-library-js.4.12.2/Set.js";
import { singleton } from "./fable_modules/fable-library-js.4.12.2/AsyncBuilder.js";
import { StringBuilder_$ctor, StringBuilder__Append_Z721C83C5 } from "./fable_modules/fable-library-js.4.12.2/System.Text.js";
import { MappingIndex } from "./fable_modules/source-map-sharp.1.0.9/src/Util.fs.js";
import { SourceMapGenerator__toJSON, SourceMapGenerator_$ctor_Z257FAB7, SourceMapGenerator__AddMapping_Z1908099D } from "./fable_modules/source-map-sharp.1.0.9/src/SourceMapGenerator.fs.js";
import { toArray as toArray_1, orElse, map as map_1, defaultArg, unwrap } from "./fable_modules/fable-library-js.4.12.0/Option.js";
import { class_type } from "./fable_modules/fable-library-js.4.12.0/Reflection.js";
import { FSharpRef, toString } from "./fable_modules/fable-library-js.4.12.0/Types.js";
import { equalsWith, splitAt, tryFindIndex, contains as contains_1, pairwise, tryFindBack, append, reverse, map, partition } from "./fable_modules/fable-library-js.4.12.0/Array.js";
import { startImmediate } from "./fable_modules/fable-library-js.4.12.0/Async.js";
import { toArray as toArray_1, orElse, map as map_1, defaultArg, unwrap } from "./fable_modules/fable-library-js.4.12.2/Option.js";
import { class_type } from "./fable_modules/fable-library-js.4.12.2/Reflection.js";
import { FSharpRef, toString } from "./fable_modules/fable-library-js.4.12.2/Types.js";
import { item, equalsWith, splitAt, tryFindIndex, contains as contains_1, pairwise, tryFindBack, append, reverse, map, partition } from "./fable_modules/fable-library-js.4.12.2/Array.js";
import { startImmediate } from "./fable_modules/fable-library-js.4.12.2/Async.js";
import { parseProject } from "./ProjectParser.js";
import { tryFind, toArray, ofSeq } from "./fable_modules/fable-library-js.4.12.0/Map.js";
import { addToDict, tryGetValue } from "./fable_modules/fable-library-js.4.12.0/MapUtil.js";
import { ofArray, singleton as singleton_1, contains } from "./fable_modules/fable-library-js.4.12.0/List.js";
import { tryParse } from "./fable_modules/fable-library-js.4.12.0/Boolean.js";
import { iterate } from "./fable_modules/fable-library-js.4.12.0/Seq.js";
import { tryFind, toArray, ofSeq } from "./fable_modules/fable-library-js.4.12.2/Map.js";
import { addToDict, tryGetValue } from "./fable_modules/fable-library-js.4.12.2/MapUtil.js";
import { ofArray, singleton as singleton_1, contains } from "./fable_modules/fable-library-js.4.12.2/List.js";
import { tryParse } from "./fable_modules/fable-library-js.4.12.2/Boolean.js";
import { iterate } from "./fable_modules/fable-library-js.4.12.2/Seq.js";

@@ -392,6 +392,6 @@ export const getMetadataDir = getAssembliesDir;

else if ((testExpr = args, !equalsWith((x, y) => (x === y), testExpr, defaultOf()) && (testExpr.length === 1))) {
run(opts, args[0], void 0);
run(opts, item(0, args), void 0);
}
else if ((testExpr_1 = args, !equalsWith((x_1, y_1) => (x_1 === y_1), testExpr_1, defaultOf()) && (testExpr_1.length === 2))) {
run(opts, args[0], args[1]);
run(opts, item(0, args), item(1, args));
}

@@ -398,0 +398,0 @@ else {

@@ -1,3 +0,3 @@

import { Record } from "../../fable_modules/fable-library-js.4.12.0/Types.js";
import { record_type, bool_type, int32_type, string_type } from "../../fable_modules/fable-library-js.4.12.0/Reflection.js";
import { Record } from "../../fable_modules/fable-library-js.4.12.2/Types.js";
import { record_type, bool_type, int32_type, string_type } from "../../fable_modules/fable-library-js.4.12.2/Reflection.js";

@@ -4,0 +4,0 @@ export class Error$ extends Record {

@@ -1,3 +0,3 @@

import { Record } from "./fable_modules/fable-library-js.4.12.0/Types.js";
import { record_type, bool_type, option_type, string_type } from "./fable_modules/fable-library-js.4.12.0/Reflection.js";
import { Record } from "./fable_modules/fable-library-js.4.12.2/Types.js";
import { record_type, bool_type, option_type, string_type } from "./fable_modules/fable-library-js.4.12.2/Reflection.js";
import * as fs from "fs";

@@ -8,6 +8,6 @@ import * as os from "os";

import * as util from "../src/util.js";
import { trimEnd, substring, endsWith, replace, trimStart } from "./fable_modules/fable-library-js.4.12.0/String.js";
import { fromFloat64, toInt64 } from "./fable_modules/fable-library-js.4.12.0/BigInt.js";
import { map, sort } from "./fable_modules/fable-library-js.4.12.0/Array.js";
import { comparePrimitives } from "./fable_modules/fable-library-js.4.12.0/Util.js";
import { trimEnd, substring, endsWith, replace, trimStart } from "./fable_modules/fable-library-js.4.12.2/String.js";
import { fromFloat64, toInt64 } from "./fable_modules/fable-library-js.4.12.2/BigInt.js";
import { map, sort, item } from "./fable_modules/fable-library-js.4.12.2/Array.js";
import { comparePrimitives } from "./fable_modules/fable-library-js.4.12.2/Util.js";

@@ -58,3 +58,3 @@ export class CmdLineOptions extends Record {

const elapsed = JS_proc.hrtime(startTime);
return [res, toInt64(fromFloat64((elapsed[0] * 1000) + (elapsed[1] / 1000000)))];
return [res, toInt64(fromFloat64((item(0, elapsed) * 1000) + (item(1, elapsed) / 1000000)))];
}

@@ -61,0 +61,0 @@

@@ -1,14 +0,14 @@

import { Union } from "./fable_modules/fable-library-js.4.12.0/Types.js";
import { union_type, string_type } from "./fable_modules/fable-library-js.4.12.0/Reflection.js";
import { matches, replace, create, match } from "./fable_modules/fable-library-js.4.12.0/RegExp.js";
import { empty, singleton, collect, append, toArray, tryHead, map, delay, toList } from "./fable_modules/fable-library-js.4.12.0/Seq.js";
import { endsWith, split, toConsole, replace as replace_1, trimStart, printf, toText } from "./fable_modules/fable-library-js.4.12.0/String.js";
import { map as map_1, defaultArg } from "./fable_modules/fable-library-js.4.12.0/Option.js";
import { Union } from "./fable_modules/fable-library-js.4.12.2/Types.js";
import { union_type, string_type } from "./fable_modules/fable-library-js.4.12.2/Reflection.js";
import { matches, replace, create, match } from "./fable_modules/fable-library-js.4.12.2/RegExp.js";
import { empty, singleton, collect, append, toArray, tryHead, map, delay, toList } from "./fable_modules/fable-library-js.4.12.2/Seq.js";
import { endsWith, split, toConsole, replace as replace_1, trimStart, printf, toText } from "./fable_modules/fable-library-js.4.12.2/String.js";
import { map as map_1, defaultArg } from "./fable_modules/fable-library-js.4.12.2/Option.js";
import { getGlobFiles, Path_GetFileName, Path_GetDirectoryName, normalizeFullPath, getDirFiles, Path_Combine, getHomePath, readAllText } from "./Platform.js";
import { collect as collect_1, map as map_2, append as append_1, fold, tryLast } from "./fable_modules/fable-library-js.4.12.0/Array.js";
import { Array_distinct, distinct, except } from "./fable_modules/fable-library-js.4.12.0/Seq2.js";
import { curry2, stringHash } from "./fable_modules/fable-library-js.4.12.0/Util.js";
import { head, tail, isEmpty } from "./fable_modules/fable-library-js.4.12.0/List.js";
import { HashSet } from "./fable_modules/fable-library-js.4.12.0/MutableSet.js";
import { unionWith } from "./fable_modules/fable-library-js.4.12.0/Set.js";
import { collect as collect_1, map as map_2, append as append_1, fold, tryLast } from "./fable_modules/fable-library-js.4.12.2/Array.js";
import { Array_distinct, distinct, except } from "./fable_modules/fable-library-js.4.12.2/Seq2.js";
import { curry2, stringHash } from "./fable_modules/fable-library-js.4.12.2/Util.js";
import { head, tail, isEmpty } from "./fable_modules/fable-library-js.4.12.2/List.js";
import { HashSet } from "./fable_modules/fable-library-js.4.12.2/MutableSet.js";
import { unionWith } from "./fable_modules/fable-library-js.4.12.2/Set.js";

@@ -103,3 +103,3 @@ export class ReferenceType extends Union {

const treatWarningsAsErrors = getXmlTagContentsFirstOrDefault("TreatWarningsAsErrors", "", projectXml);
const defines = toArray(except(["$(DefineConstants)", ""], distinct(map((s_1) => s_1.trim(), append(["FABLE_COMPILER", "FABLE_COMPILER_4", "FABLE_COMPILER_JAVASCRIPT"], collect((s) => split(s, [";"], void 0, 0), getXmlTagContents("DefineConstants", projectXml)))), {
const defines = toArray(except(["$(DefineConstants)", ""], distinct(map((s_1) => s_1.trim(), append(["FABLE_COMPILER", "FABLE_COMPILER_4", "FABLE_COMPILER_JAVASCRIPT", "NPM_PACKAGE_FABLE_COMPILER_JAVASCRIPT"], collect((s) => split(s, [";"], void 0, 0), getXmlTagContents("DefineConstants", projectXml)))), {
Equals: (x, y) => (x === y),

@@ -214,3 +214,3 @@ GetHashCode: stringHash,

}, [[], []], split(projectXml, ["\n"], void 0, 0));
return [[], patternInput[0], append_1(patternInput[1], [Path_GetFileName(projectFilePath)]), ["--define:FABLE_COMPILER", "--define:FABLE_COMPILER_4", "--define:FABLE_COMPILER_JAVASCRIPT"]];
return [[], patternInput[0], append_1(patternInput[1], [Path_GetFileName(projectFilePath)]), ["--define:FABLE_COMPILER", "--define:FABLE_COMPILER_4", "--define:FABLE_COMPILER_JAVASCRIPT", "--define:NPM_PACKAGE_FABLE_COMPILER_JAVASCRIPT"]];
}

@@ -217,0 +217,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display