@glutinum/cli 0.9.0 → 0.11.0

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 (130) hide show
  1. package/dist/Glutinum.Converter/FsharpAST.js +57 -17
  2. package/dist/Glutinum.Converter/FsharpAST.js.map +1 -1
  3. package/dist/Glutinum.Converter/Generate.js +6 -8
  4. package/dist/Glutinum.Converter/Generate.js.map +1 -1
  5. package/dist/Glutinum.Converter/GlueAST.js +100 -23
  6. package/dist/Glutinum.Converter/GlueAST.js.map +1 -1
  7. package/dist/Glutinum.Converter/Log.js +5 -5
  8. package/dist/Glutinum.Converter/Log.js.map +1 -1
  9. package/dist/Glutinum.Converter/Merge.js +86 -0
  10. package/dist/Glutinum.Converter/Merge.js.map +1 -0
  11. package/dist/Glutinum.Converter/Printer.js +153 -73
  12. package/dist/Glutinum.Converter/Printer.js.map +1 -1
  13. package/dist/Glutinum.Converter/Read.js +5 -2
  14. package/dist/Glutinum.Converter/Read.js.map +1 -1
  15. package/dist/Glutinum.Converter/Reader/ClassDeclaration.js +1 -1
  16. package/dist/Glutinum.Converter/Reader/Declaration.js +20 -19
  17. package/dist/Glutinum.Converter/Reader/Declaration.js.map +1 -1
  18. package/dist/Glutinum.Converter/Reader/EnumDeclaration.js +4 -3
  19. package/dist/Glutinum.Converter/Reader/EnumDeclaration.js.map +1 -1
  20. package/dist/Glutinum.Converter/Reader/ExportAssignment.js +1 -1
  21. package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js +2 -2
  22. package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js.map +1 -1
  23. package/dist/Glutinum.Converter/Reader/IndexedAccessType.js +5 -6
  24. package/dist/Glutinum.Converter/Reader/IndexedAccessType.js.map +1 -1
  25. package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js +2 -2
  26. package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js.map +1 -1
  27. package/dist/Glutinum.Converter/Reader/MappedTypeNode.js +42 -0
  28. package/dist/Glutinum.Converter/Reader/MappedTypeNode.js.map +1 -0
  29. package/dist/Glutinum.Converter/Reader/NamedTupleMember.js +1 -1
  30. package/dist/Glutinum.Converter/Reader/Node.js +9 -6
  31. package/dist/Glutinum.Converter/Reader/Node.js.map +1 -1
  32. package/dist/Glutinum.Converter/Reader/Parameters.js +7 -4
  33. package/dist/Glutinum.Converter/Reader/Parameters.js.map +1 -1
  34. package/dist/Glutinum.Converter/Reader/Report.js +35 -0
  35. package/dist/Glutinum.Converter/Reader/Report.js.map +1 -0
  36. package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js +5 -0
  37. package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js.map +1 -1
  38. package/dist/Glutinum.Converter/Reader/TypeNode.js +109 -38
  39. package/dist/Glutinum.Converter/Reader/TypeNode.js.map +1 -1
  40. package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js +31 -26
  41. package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js.map +1 -1
  42. package/dist/Glutinum.Converter/Reader/TypeQueryNode.js +127 -0
  43. package/dist/Glutinum.Converter/Reader/TypeQueryNode.js.map +1 -0
  44. package/dist/Glutinum.Converter/Reader/TypeScriptReader.js +15 -3
  45. package/dist/Glutinum.Converter/Reader/TypeScriptReader.js.map +1 -1
  46. package/dist/Glutinum.Converter/Reader/UnionTypeNode.js +6 -9
  47. package/dist/Glutinum.Converter/Reader/UnionTypeNode.js.map +1 -1
  48. package/dist/Glutinum.Converter/Reader/Utils.js +11 -14
  49. package/dist/Glutinum.Converter/Reader/Utils.js.map +1 -1
  50. package/dist/Glutinum.Converter/Reader/VariableStatement.js +2 -2
  51. package/dist/Glutinum.Converter/Reader/VariableStatement.js.map +1 -1
  52. package/dist/Glutinum.Converter/Transform.js +483 -217
  53. package/dist/Glutinum.Converter/Transform.js.map +1 -1
  54. package/dist/Glutinum.Converter/TypeScript.Extensions.js +735 -0
  55. package/dist/Glutinum.Converter/TypeScript.Extensions.js.map +1 -0
  56. package/dist/Glutinum.Converter/Utils/Naming.js +6 -2
  57. package/dist/Glutinum.Converter/Utils/Naming.js.map +1 -1
  58. package/dist/Program.js +2 -2
  59. package/dist/Program.js.map +1 -1
  60. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AssemblyInfo.fs +19 -0
  61. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs +207 -0
  62. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js +127 -0
  63. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js.map +1 -0
  64. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOption.fs +81 -0
  65. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs +183 -0
  66. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js +37 -0
  67. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js.map +1 -0
  68. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionOp.fs +24 -0
  69. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResult.fs +439 -0
  70. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs +217 -0
  71. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js +18 -0
  72. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js.map +1 -0
  73. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOp.fs +24 -0
  74. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs +75 -0
  75. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js +26 -0
  76. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js.map +1 -0
  77. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs +238 -0
  78. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js +18 -0
  79. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js.map +1 -0
  80. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionOp.fs +24 -0
  81. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidation.fs +190 -0
  82. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs +194 -0
  83. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js +18 -0
  84. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js.map +1 -0
  85. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationOp.fs +35 -0
  86. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/FsToolkit.ErrorHandling.fableproj +51 -0
  87. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs +218 -0
  88. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js +358 -0
  89. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js.map +1 -0
  90. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Option.fs +331 -0
  91. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs +186 -0
  92. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js +18 -0
  93. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js.map +1 -0
  94. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionOp.fs +21 -0
  95. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs +644 -0
  96. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js +45 -0
  97. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js.map +1 -0
  98. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs +155 -0
  99. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js +23 -0
  100. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js.map +1 -0
  101. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOp.fs +45 -0
  102. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs +201 -0
  103. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js +65 -0
  104. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js.map +1 -0
  105. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs +146 -0
  106. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js +18 -0
  107. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js.map +1 -0
  108. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionOp.fs +57 -0
  109. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs +19 -0
  110. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js +31 -0
  111. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js.map +1 -0
  112. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs +22 -0
  113. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js +18 -0
  114. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js.map +1 -0
  115. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Validation.fs +172 -0
  116. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs +148 -0
  117. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js +18 -0
  118. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js.map +1 -0
  119. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationOp.fs +35 -0
  120. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOption.fs +151 -0
  121. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOptionCE.fs +165 -0
  122. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Debug/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +3 -0
  123. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Debug/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +20 -0
  124. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  125. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.0/FsToolkit.ErrorHandling.AssemblyInfo.fs +20 -0
  126. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +3 -0
  127. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +20 -0
  128. package/dist/fable_modules/project_cracked.json +1 -1
  129. package/package.json +3 -2
  130. package/src/Glutinum.Converter/js/bootstrap.js +16 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/Glutinum.Converter/TypeScript.Extensions.fs"],"names":["this"],"mappings":";;YAQcA;aAAA;mBACqB;aADrB;mBAE4B;aAF5B;mBAGqC;aAHrC;mBAIoC;aAJpC;mBAK2B;aAL3B;mBAM8B;aAN9B;mBAO2B;aAP3B;mBAQkC;aARlC;mBASqC;aATrC;mBAU4B;aAV5B;mBAW2B;aAX3B;mB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W0B;aA3W1B;mBA4W\u002BB;aA5W/B;mBA6W4B;aA7W5B;mBA8W0B;aA9W1B;mBA\u002BW0B;aA/W1B;mBAgX8B;aAhX9B;mBAiX6B;aAjX7B;mBAkXyB;aAlXzB;mBAmX8B;aAnX9B;mBAoX4B;aApX5B;mBAqX\u002BB;aArX/B;mBAsXwB;aAtXxB;mBAuXiC;aAvXjC;mBAyXF;aAzXE;mBA0XiC;aA1XjC;mBA4XF;aA5XE;mBA6XmB;;mBACZ,WAAAA","file":null,"sourcesContent":null,"sourceRoot":null}
@@ -15,7 +15,7 @@ function startWithDigit(name) {
15
15
  }
16
16
 
17
17
  function escapeName(name) {
18
- if (((((name.indexOf("-") >= 0) ? true : (name.indexOf("$") >= 0)) ? true : (name.indexOf("#") >= 0)) ? true : startWithDigit(name)) ? true : FSharpSet__Contains(fsharp, name)) {
18
+ if ((((((((name.indexOf("-") >= 0) ? true : (name.indexOf("$") >= 0)) ? true : (name.indexOf("#") >= 0)) ? true : (name.indexOf("<") >= 0)) ? true : (name.indexOf(">") >= 0)) ? true : (name.indexOf(" ") >= 0)) ? true : startWithDigit(name)) ? true : FSharpSet__Contains(fsharp, name)) {
19
19
  return `\`\`${name}\`\``;
20
20
  }
21
21
  else {
@@ -69,6 +69,10 @@ export function replaceDot(text) {
69
69
  return replace(text, ".", "_");
70
70
  }
71
71
 
72
+ export function replaceAt(text) {
73
+ return replace(text, "@", "_AT_");
74
+ }
75
+
72
76
  export class SanitizeNameResult extends Record {
73
77
  constructor(Name, IsDifferent) {
74
78
  super();
@@ -82,7 +86,7 @@ export function SanitizeNameResult_$reflection() {
82
86
  }
83
87
 
84
88
  export function sanitizeNameWithResult(name) {
85
- const sanitizedName = removeSurroundingQuotes(replaceDot(name));
89
+ const sanitizedName = removeSurroundingQuotes(replaceAt(replaceDot(name)));
86
90
  const isDifferent = name !== sanitizedName;
87
91
  return new SanitizeNameResult(escapeName(sanitizedName), isDifferent);
88
92
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/Glutinum.Converter/Utils/Naming.fs"],"names":["name","startWithDigit","text","startChar","endChar","sanitizedName","removeSurroundingQuotes","replaceDot","isDifferent","escapeName","sanitizeNameWithResult"],"mappings":";;;;;;;;AAQI,QAAA,AAAAA,cAAc;AAAK,eAAA,QAAa,AAAAA,KAAM;;;eAAtC;;;;;AAGA,QACI,CAAA,CAAA,CAAA,CAAA,AAAAA,aAAc,aAAd,QACG,AAAAA,aAAc,cADjB,QAEG,AAAAA,aAAc,cAFjB,OAGG,AAAAC,eAAeD,SAHlB,OAIG,4BAAyBA;eAE5B,OAAOA;;;eAEPA;;;;;AAGJ,QAAG,cAAqBE;eACpB;;SACJ,IAAK,AAAAA,cAAc;eACfA;;;AAGIC,0BAAqB,AAAAD,KAAM;AAAhBE,wBAAoB,AAAAF,KAAM,AAAAA,cAAc;;gBAEjDC;iBAAA;AAAA,oBAAA,AAAWC,YAAX;;;;;;;;iBAAA;AAAA,oBAAA,AAAWA,YAAX;;;;;;;;;;;;;AAEQ,uBAAA,UAAAF,MAAe,GAAG,AAAAA,cAAc;;uBACvCA;;;;;;WAE0B,QAAAA,MAAa,KAAK;;;;;;;;;;;;;;;;AAKnDG,0BAAsC,AAAAC,wBAAd,AAAAC,WAARP;AAMhBQ,wBAAc,AAAAR,SAAQK;AAE1B,WAAA,uBAC4B,AAAAI,WAAjBJ,gBACOG;;;;WAKlB,AADa,AAAAE,uBAAuBV","file":null,"sourcesContent":null,"sourceRoot":null}
1
+ {"version":3,"sources":["../../../src/Glutinum.Converter/Utils/Naming.fs"],"names":["name","startWithDigit","text","startChar","endChar","sanitizedName","removeSurroundingQuotes","replaceAt","replaceDot","isDifferent","escapeName","sanitizeNameWithResult"],"mappings":";;;;;;;;AAQI,QAAA,AAAAA,cAAc;AAAK,eAAA,QAAa,AAAAA,KAAM;;;eAAtC;;;;;AAGA,QACI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,AAAAA,aAAc,aAAd,QACG,AAAAA,aAAc,cADjB,QAEG,AAAAA,aAAc,cAFjB,QAGG,AAAAA,aAAc,cAHjB,QAIG,AAAAA,aAAc,cAJjB,QAKG,AAAAA,aAAc,cALjB,OAMG,AAAAC,eAAeD,SANlB,OAOG,4BAAyBA;eAE5B,OAAOA;;;eAEPA;;;;;AAGJ,QAAG,cAAqBE;eACpB;;SACJ,IAAK,AAAAA,cAAc;eACfA;;;AAGIC,0BAAqB,AAAAD,KAAM;AAAhBE,wBAAoB,AAAAF,KAAM,AAAAA,cAAc;;gBAEjDC;iBAAA;AAAA,oBAAA,AAAWC,YAAX;;;;;;;;iBAAA;AAAA,oBAAA,AAAWA,YAAX;;;;;;;;;;;;;AAEQ,uBAAA,UAAAF,MAAe,GAAG,AAAAA,cAAc;;uBACvCA;;;;;;WAE0B,QAAAA,MAAa,KAAK;;;;WAEnB,QAAAA,MAAa,KAAK;;;;;;;;;;;;;;;;AAKlDG,0BACmC,AAAAC,wBAAb,AAAAC,UAAd,AAAAC,WAARR;AAMAS,wBAAc,AAAAT,SAAQK;AAE1B,WAAA,uBAC4B,AAAAK,WAAjBL,gBACOI;;;;WAKlB,AADa,AAAAE,uBAAuBX","file":null,"sourcesContent":null,"sourceRoot":null}
package/dist/Program.js CHANGED
@@ -104,8 +104,8 @@ function getVersion() {
104
104
  }
105
105
  case 3: {
106
106
  info(`Generating binding file for ${input_1}`);
107
- log(`Generation result:
108
- ${generateBindingFile(input_1)}`);
107
+ const res_1 = generateBindingFile(input_1);
108
+ process.stdout.write(res_1);
109
109
  success("Success!");
110
110
  return 0;
111
111
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/Glutinum.Converter.CLI/Program.fs"],"names":["helpText","argv","input","outFile","printHelp","getVersion","res","outFileDir"],"mappings":";;;;;;;AAQQA,qBACA;AAoBJ,QAAQ,GAAKA;;;;AAGb;;;;AAUIC,mBAAe,QAARA;qBAkBTC,OAAyBC,SAgBzBD;AA9BI,QAAA,CAAA,QAAAD;gBAAA,KAEJA;iBAFI;iBAAA;iBAAA;;;;iBAAA;AAAA,oBAAA,CAAA,QAAA,KAEJA;AAFI,wBAAA,KAcK,KAZTA,aAFI;AAAA,4BAAA,CAAA,QAAA,KAcK,KAZTA;AAFI,gCAAA,QAAA,KAcqB,KAAhB,KAZTA;;AAYAC,wCAdI,KAEJD;AAYyBE,0CAdrB,KAcqB,KAAhB,KAZTF;;;;;;;;;;;;;;;;;;;;AAFI,oBAAA,QAAA,KAEJA;;AA4BAC,8BA9BI,KAEJD;;qBAFI,IAAA,KAcK,KAZTA,aAFI;AAAA,wBAAA,CAAA,QAAA,KAcK,KAZTA;AAFI,4BAAA,QAAA,KAcqB,KAAhB,KAZTA;;AAYAC,oCAdI,KAEJD;AAYyBE,sCAdrB,KAcqB,KAAhB,KAZTF;;;;;;;;;;;;;;;;;;;;AAGE,AAAAG;mBACA;;;AAKA,gBAAQ,GAFM,AAAAC;mBAGd;;;AAIA,iBAAS,\u002BBAAiCH;AACtCI,wBAAM,oBAAoBJ;AAE1BK,\u002BBAAa,aAAcJ;AAC/B,yBAAgBI;2BAA2B;;AAC3C,6BAAkBJ,SAASG;AAI3B,iBAAS,wBAFa,UAAW,eAAoBH;AAGrD,oBAAY;mBAEZ;;;AAGA,iBAAS,\u002BBAAiCD;AAG1C,gBAAQ,sBAFE,oBAAoBA;AAI9B,oBAAY;mBAEZ;;;AAEA,kBAAU;AACV,AAAAE;mBACA","file":null,"sourcesContent":null,"sourceRoot":null}
1
+ {"version":3,"sources":["../src/Glutinum.Converter.CLI/Program.fs"],"names":["helpText","argv","input","outFile","printHelp","getVersion","res","outFileDir"],"mappings":";;;;;;;AASQA,qBACA;AAoBJ,QAAQ,GAAKA;;;;AAGb;;;;AAUIC,mBAAe,QAARA;qBAkBTC,OAAyBC,SAgBzBD;AA9BI,QAAA,CAAA,QAAAD;gBAAA,KAEJA;iBAFI;iBAAA;iBAAA;;;;iBAAA;AAAA,oBAAA,CAAA,QAAA,KAEJA;AAFI,wBAAA,KAcK,KAZTA,aAFI;AAAA,4BAAA,CAAA,QAAA,KAcK,KAZTA;AAFI,gCAAA,QAAA,KAcqB,KAAhB,KAZTA;;AAYAC,wCAdI,KAEJD;AAYyBE,0CAdrB,KAcqB,KAAhB,KAZTF;;;;;;;;;;;;;;;;;;;;AAFI,oBAAA,QAAA,KAEJA;;AA4BAC,8BA9BI,KAEJD;;qBAFI,IAAA,KAcK,KAZTA,aAFI;AAAA,wBAAA,CAAA,QAAA,KAcK,KAZTA;AAFI,4BAAA,QAAA,KAcqB,KAAhB,KAZTA;;AAYAC,oCAdI,KAEJD;AAYyBE,sCAdrB,KAcqB,KAAhB,KAZTF;;;;;;;;;;;;;;;;;;;;AAGE,AAAAG;mBACA;;;AAKA,gBAAQ,GAFM,AAAAC;mBAGd;;;AAIA,iBAAS,\u002BBAAiCH;AACtCI,wBAAM,oBAAoBJ;AAE1BK,\u002BBAAa,aAAcJ;AAC/B,yBAAgBI;2BAA2B;;AAC3C,6BAAkBJ,SAASG;AAI3B,iBAAS,wBAFa,UAAW,eAAoBH;AAGrD,oBAAY;mBAEZ;;;AAGA,iBAAS,\u002BBAAiCD;AACtCI,0BAAM,oBAAoBJ;AAE9B,iCAAyBI;AAEzB,oBAAY;mBAEZ;;;AAEA,kBAAU;AACV,AAAAF;mBACA","file":null,"sourcesContent":null,"sourceRoot":null}
@@ -0,0 +1,19 @@
1
+ // Auto-Generated by FAKE; do not edit
2
+ namespace System
3
+ open System.Reflection
4
+
5
+ [<assembly: AssemblyTitleAttribute("FsToolkit.ErrorHandling")>]
6
+ [<assembly: AssemblyProductAttribute("FsToolkit.ErrorHandling")>]
7
+ [<assembly: AssemblyDescriptionAttribute("FsToolkit.ErrorHandling is a utility library to work with the Result type in F#, and allows you to do clear, simple and powerful error handling.")>]
8
+ [<assembly: AssemblyVersionAttribute("4.16.0")>]
9
+ [<assembly: AssemblyFileVersionAttribute("4.16.0")>]
10
+ [<assembly: AssemblyConfigurationAttribute("Release")>]
11
+ do ()
12
+
13
+ module internal AssemblyVersionInformation =
14
+ let [<Literal>] AssemblyTitle = "FsToolkit.ErrorHandling"
15
+ let [<Literal>] AssemblyProduct = "FsToolkit.ErrorHandling"
16
+ let [<Literal>] AssemblyDescription = "FsToolkit.ErrorHandling is a utility library to work with the Result type in F#, and allows you to do clear, simple and powerful error handling."
17
+ let [<Literal>] AssemblyVersion = "4.16.0"
18
+ let [<Literal>] AssemblyFileVersion = "4.16.0"
19
+ let [<Literal>] AssemblyConfiguration = "Release"
@@ -0,0 +1,207 @@
1
+ namespace FsToolkit.ErrorHandling
2
+
3
+ /// <summary>
4
+ /// Helper functions for working with the <c>Async</c> type.
5
+ /// </summary>
6
+ [<RequireQualifiedAccess>]
7
+ module Async =
8
+
9
+ /// <summary>
10
+ /// Converts a value to an <c>Async</c> value
11
+ /// </summary>
12
+ /// <param name="value">The value to convert to an <c>Async</c> value.</param>
13
+ /// <returns>The <c>Async</c> value.</returns>
14
+ let inline singleton (value: 'value) : Async<'value> =
15
+ value
16
+ |> async.Return
17
+
18
+ /// <summary>
19
+ /// Converts a value to an <c>Async</c> value
20
+ /// </summary>
21
+ /// <param name="value">The value to convert to an <c>Async</c> value.</param>
22
+ /// <returns>The <c>Async</c> value.</returns>
23
+ let inline retn (value: 'value) : Async<'value> =
24
+ value
25
+ |> async.Return
26
+
27
+ /// <summary>
28
+ /// Takes a transformation function and applies it to the value of an <c>Async</c> value.
29
+ /// </summary>
30
+ /// <param name="binder">The function to bind over the <c>Async</c> value.</param>
31
+ /// <param name="input">The <c>Async</c> value to bind over.</param>
32
+ /// <returns>The result of binding the function over the <c>Async</c> value.</returns>
33
+ let inline bind
34
+ ([<InlineIfLambda>] binder: 'input -> Async<'output>)
35
+ (input: Async<'input>)
36
+ : Async<'output> =
37
+ async.Bind(input, binder)
38
+
39
+ /// <summary>
40
+ /// Applies an <c>Async</c> function to an <c>Async</c> value.
41
+ /// </summary>
42
+ /// <param name="applier">The <c>Async</c> function to apply.</param>
43
+ /// <param name="input">The <c>Async</c> value to apply the function to.</param>
44
+ /// <returns>The result of applying the function to the value.</returns>
45
+ let inline apply (applier: Async<'input -> 'output>) (input: Async<'input>) : Async<'output> =
46
+ bind (fun f' -> bind (fun x' -> singleton (f' x')) input) applier
47
+
48
+ /// <summary>
49
+ /// Applies a transformation to the value of an <c>Async</c> value to a new <c>Async</c> value using the provided function.
50
+ /// </summary>
51
+ /// <param name="mapper">The function to apply to the value of the <c>Async</c> value.</param>
52
+ /// <param name="input">The <c>Async</c> value to transform.</param>
53
+ /// <returns>The transformed <c>Async</c> value.</returns>
54
+ let inline map
55
+ ([<InlineIfLambda>] mapper: 'input -> 'output)
56
+ (input: Async<'input>)
57
+ : Async<'output> =
58
+ bind
59
+ (fun x' ->
60
+ mapper x'
61
+ |> singleton
62
+ )
63
+ input
64
+
65
+ /// <summary>
66
+ /// Applies a transformation to the values of two <c>Async</c> values to a new <c>Async</c> value using the provided function.
67
+ /// </summary>
68
+ /// <param name="mapper">The function to apply to the values of the <c>Async</c> values.</param>
69
+ /// <param name="input1">The first <c>Async</c> value to transform.</param>
70
+ /// <param name="input2">The second <c>Async</c> value to transform.</param>
71
+ /// <returns>The transformed <c>Async</c> value.</returns>
72
+ let inline map2
73
+ ([<InlineIfLambda>] mapper: 'input1 -> 'input2 -> 'output)
74
+ (input1: Async<'input1>)
75
+ (input2: Async<'input2>)
76
+ : Async<'output> =
77
+ bind
78
+ (fun x ->
79
+ bind
80
+ (fun y ->
81
+ mapper x y
82
+ |> singleton
83
+ )
84
+ input2
85
+ )
86
+ input1
87
+
88
+ /// <summary>
89
+ /// Applies a transformation to the values of three <c>Async</c> values to a new <c>Async</c> value using the provided function.
90
+ /// </summary>
91
+ /// <param name="mapper">The function to apply to the values of the <c>Async</c> values.</param>
92
+ /// <param name="input1">The first <c>Async</c> value to transform.</param>
93
+ /// <param name="input2">The second <c>Async</c> value to transform.</param>
94
+ /// <param name="input3">The third <c>Async</c> value to transform.</param>
95
+ /// <returns>The transformed <c>Async</c> value.</returns>
96
+ let inline map3
97
+ ([<InlineIfLambda>] mapper: 'input1 -> 'input2 -> 'input3 -> 'output)
98
+ (input1: Async<'input1>)
99
+ (input2: Async<'input2>)
100
+ (input3: Async<'input3>)
101
+ : Async<'output> =
102
+ bind
103
+ (fun x ->
104
+ bind
105
+ (fun y ->
106
+ bind
107
+ (fun z ->
108
+ mapper x y z
109
+ |> singleton
110
+ )
111
+ input3
112
+ )
113
+ input2
114
+ )
115
+ input1
116
+
117
+ /// <summary>
118
+ /// Takes two asyncs and returns a tuple of the pair
119
+ /// </summary>
120
+ /// <param name="left">The first async value.</param>
121
+ /// <param name="right">The second async value.</param>
122
+ /// <returns>The tuple of the pair.</returns>
123
+ let inline zip (left: Async<'left>) (right: Async<'right>) : Async<'left * 'right> =
124
+ bind (fun l -> bind (fun r -> singleton (l, r)) right) left
125
+
126
+ /// <summary>
127
+ /// Operators for working with the <c>Async</c> type.
128
+ /// </summary>
129
+ module AsyncOperators =
130
+
131
+ /// <summary>
132
+ /// Shorthand for <c>Async.map</c>
133
+ /// </summary>
134
+ /// <param name="mapper">The function to map over the <c>Async</c> value.</param>
135
+ /// <param name="input">The <c>Async</c> value to map over.</param>
136
+ /// <returns>The result of mapping the function over the <c>Async</c> value.</returns>
137
+ let inline (<!>)
138
+ ([<InlineIfLambda>] mapper: 'input -> 'output)
139
+ (input: Async<'input>)
140
+ : Async<'output> =
141
+ Async.map mapper input
142
+
143
+ /// <summary>
144
+ /// Shorthand for <c>Async.apply</c>
145
+ /// </summary>
146
+ /// <param name="applier">The <c>Async</c> function to apply.</param>
147
+ /// <param name="input">The <c>Async</c> value to apply the function to.</param>
148
+ /// <returns>The result of applying the function to the value.</returns>
149
+ let inline (<*>) (applier: Async<'input -> 'output>) (input: Async<'input>) : Async<'output> =
150
+ Async.apply applier input
151
+
152
+ /// <summary>
153
+ /// Shorthand for <c>Async.bind</c>
154
+ /// </summary>
155
+ /// <param name="input">The <c>Async</c> value to bind over.</param>
156
+ /// <param name="binder">The function to bind over the <c>Async</c> value.</param>
157
+ /// <returns>The result of binding the function over the <c>Async</c> value.</returns>
158
+ let inline (>>=)
159
+ (input: Async<'input>)
160
+ ([<InlineIfLambda>] binder: 'input -> Async<'output>)
161
+ : Async<'output> =
162
+ Async.bind binder input
163
+
164
+
165
+ [<AutoOpen>]
166
+ module AsyncExt =
167
+ open System
168
+
169
+ type Microsoft.FSharp.Control.Async with
170
+
171
+ static member TryFinallyAsync(comp: Async<'T>, deferred) : Async<'T> =
172
+
173
+ let finish (compResult, deferredResult) (cont, (econt: exn -> unit), ccont) =
174
+ match (compResult, deferredResult) with
175
+ | (Choice1Of3 x, Choice1Of3()) -> cont x
176
+ | (Choice2Of3 compExn, Choice1Of3()) -> econt compExn
177
+ | (Choice3Of3 compExn, Choice1Of3()) -> ccont compExn
178
+ | (Choice1Of3 _, Choice2Of3 deferredExn) -> econt deferredExn
179
+ | (Choice2Of3 compExn, Choice2Of3 deferredExn) ->
180
+ econt
181
+ <| new AggregateException(compExn, deferredExn)
182
+ | (Choice3Of3 compExn, Choice2Of3 deferredExn) -> econt deferredExn
183
+ | (_, Choice3Of3 deferredExn) ->
184
+ econt
185
+ <| new Exception("Unexpected cancellation.", deferredExn)
186
+
187
+ let startDeferred compResult (cont, econt, ccont) =
188
+ Async.StartWithContinuations(
189
+ deferred,
190
+ (fun () -> finish (compResult, Choice1Of3()) (cont, econt, ccont)),
191
+ (fun exn -> finish (compResult, Choice2Of3 exn) (cont, econt, ccont)),
192
+ (fun exn -> finish (compResult, Choice3Of3 exn) (cont, econt, ccont))
193
+ )
194
+
195
+ let startComp ct (cont, econt, ccont) =
196
+ Async.StartWithContinuations(
197
+ comp,
198
+ (fun x -> startDeferred (Choice1Of3(x)) (cont, econt, ccont)),
199
+ (fun exn -> startDeferred (Choice2Of3 exn) (cont, econt, ccont)),
200
+ (fun exn -> startDeferred (Choice3Of3 exn) (cont, econt, ccont)),
201
+ ct
202
+ )
203
+
204
+ async {
205
+ let! ct = Async.CancellationToken
206
+ return! Async.FromContinuations(startComp ct)
207
+ }
@@ -0,0 +1,127 @@
1
+ import { fromContinuations, cancellationToken, startWithContinuations } from "../fable-library-js.4.14.0/Async.js";
2
+ import { FSharpChoice$3 } from "../fable-library-js.4.14.0/Choice.js";
3
+ import { singleton } from "../fable-library-js.4.14.0/AsyncBuilder.js";
4
+
5
+ export function Microsoft_FSharp_Control_FSharpAsync__Async_TryFinallyAsync_Static_Z753D11A1(comp, deferred) {
6
+ const finish = (tupledArg, tupledArg_1) => {
7
+ const compResult = tupledArg[0];
8
+ const deferredResult = tupledArg[1];
9
+ const econt = tupledArg_1[1];
10
+ let matchResult, x, compExn, compExn_1, deferredExn, compExn_2, deferredExn_1, compExn_3, deferredExn_2, deferredExn_3;
11
+ switch (compResult.tag) {
12
+ case 1: {
13
+ switch (deferredResult.tag) {
14
+ case 1: {
15
+ matchResult = 4;
16
+ compExn_2 = compResult.fields[0];
17
+ deferredExn_1 = deferredResult.fields[0];
18
+ break;
19
+ }
20
+ case 2: {
21
+ matchResult = 6;
22
+ deferredExn_3 = deferredResult.fields[0];
23
+ break;
24
+ }
25
+ default: {
26
+ matchResult = 1;
27
+ compExn = compResult.fields[0];
28
+ }
29
+ }
30
+ break;
31
+ }
32
+ case 2: {
33
+ switch (deferredResult.tag) {
34
+ case 1: {
35
+ matchResult = 5;
36
+ compExn_3 = compResult.fields[0];
37
+ deferredExn_2 = deferredResult.fields[0];
38
+ break;
39
+ }
40
+ case 2: {
41
+ matchResult = 6;
42
+ deferredExn_3 = deferredResult.fields[0];
43
+ break;
44
+ }
45
+ default: {
46
+ matchResult = 2;
47
+ compExn_1 = compResult.fields[0];
48
+ }
49
+ }
50
+ break;
51
+ }
52
+ default:
53
+ switch (deferredResult.tag) {
54
+ case 1: {
55
+ matchResult = 3;
56
+ deferredExn = deferredResult.fields[0];
57
+ break;
58
+ }
59
+ case 2: {
60
+ matchResult = 6;
61
+ deferredExn_3 = deferredResult.fields[0];
62
+ break;
63
+ }
64
+ default: {
65
+ matchResult = 0;
66
+ x = compResult.fields[0];
67
+ }
68
+ }
69
+ }
70
+ switch (matchResult) {
71
+ case 0: {
72
+ tupledArg_1[0](x);
73
+ break;
74
+ }
75
+ case 1: {
76
+ econt(compExn);
77
+ break;
78
+ }
79
+ case 2: {
80
+ tupledArg_1[2](compExn_1);
81
+ break;
82
+ }
83
+ case 3: {
84
+ econt(deferredExn);
85
+ break;
86
+ }
87
+ case 4: {
88
+ econt(new Error([compExn_2, deferredExn_1]));
89
+ break;
90
+ }
91
+ case 5: {
92
+ econt(deferredExn_2);
93
+ break;
94
+ }
95
+ case 6: {
96
+ econt(new Error("Unexpected cancellation.", deferredExn_3));
97
+ break;
98
+ }
99
+ }
100
+ };
101
+ const startDeferred = (compResult_1, tupledArg_2) => {
102
+ const cont_1 = tupledArg_2[0];
103
+ const econt_1 = tupledArg_2[1];
104
+ const ccont_1 = tupledArg_2[2];
105
+ startWithContinuations(deferred, () => {
106
+ finish([compResult_1, new FSharpChoice$3(0, [void 0])], [cont_1, econt_1, ccont_1]);
107
+ }, (exn) => {
108
+ finish([compResult_1, new FSharpChoice$3(1, [exn])], [cont_1, econt_1, ccont_1]);
109
+ }, (exn_1) => {
110
+ finish([compResult_1, new FSharpChoice$3(2, [exn_1])], [cont_1, econt_1, ccont_1]);
111
+ });
112
+ };
113
+ return singleton.Delay(() => singleton.Bind(cancellationToken(), (_arg) => singleton.ReturnFrom(fromContinuations((tupledArg_3) => {
114
+ const cont_2 = tupledArg_3[0];
115
+ const econt_2 = tupledArg_3[1];
116
+ const ccont_2 = tupledArg_3[2];
117
+ startWithContinuations(comp, (x_1) => {
118
+ startDeferred(new FSharpChoice$3(0, [x_1]), [cont_2, econt_2, ccont_2]);
119
+ }, (exn_2) => {
120
+ startDeferred(new FSharpChoice$3(1, [exn_2]), [cont_2, econt_2, ccont_2]);
121
+ }, (exn_3) => {
122
+ startDeferred(new FSharpChoice$3(2, [exn_3]), [cont_2, econt_2, ccont_2]);
123
+ }, _arg);
124
+ }))));
125
+ }
126
+
127
+ //# sourceMappingURL=Async.fs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["./Async.fs"],"names":["finish","compResult","tupledArg","deferredResult","econt","x","compExn","deferredExn","startDeferred","cont","ccont","deferred","exn","\u0060\u0060builder@\u0060\u0060","comp","_arg1"],"mappings":";;;;;AA4KgBA;AAAQC,2BAAA,AAAAC;AAAYC,\u002BBAAZ,AAAAD;AAAoCE,sBAAP,AAAAF;yBAEvBG,GACAC,SACAA,WACcC,aACdD,WAAoBC,eAGpBD,WAAoBC,eACjBA;gBATVN;;wBAAYE;;;AAKLG,oCALR,AAACL;AAK2BM,wCAL5B,AAAaJ;;;;;AASFI,wCATX,AAAaJ;;;;;AAELG,kCAFR,AAACL;;;;;;wBAAYE;;;AAQLG,oCARR,AAACL;AAQ2BM,wCAR5B,AAAaJ;;;;;AASFI,wCATX,AAAaJ;;;;;AAGLG,oCAHR,AAACL;;;;;;wBAAYE;;;AAISI,sCAJtB,AAAaJ;;;;;AASFI,wCATX,AAAaJ;;;;;AACLE,4BADR,AAACJ;;;;;;AAC2B,AAFG,AAAAC,\u002BBAEEG;;;;AACC,AAAAD,sBAAME;;;;AACN,AAJH,AAAAJ,\u002BBAISI;;;;AACF,AAAAF,sBAAMG;;;;AAE9C,AAAAH,sBACG,WAAuBE,WAASC;;;;AACW,AAAAH,sBAAMG;;;;AAEpD,AAAAH,sBACG,UAAc,4BAA4BG;;;;;AAEjDC;AAA0BC,uBAAA,AAAAP;AAAME,wBAAN,AAAAF;AAAaQ,wBAAb,AAAAR;AAC1B,\u002BBACIS;AACW,AAAAX,oBAAQC,cAAY,uBAAU,YAAKQ,QAAML,SAAOM;;AAC/C,AAAAV,oBAAQC,cAAY,uBAAWW,SAAMH,QAAML,SAAOM;;AAClD,AAAAV,oBAAQC,cAAY,uBAAWW,WAAMH,QAAML,SAAOM;;;AAYtE,WAAA,AAAAG,sBACI,AAAAA,eAAU,\u002BBACV,AAAAA,qBAAQ;AAXMJ,uBAAA,AAAAP;AAAME,wBAAN,AAAAF;AAAaQ,wBAAb,AAAAR;AACd,\u002BBACIY;AACU,AAAAN,0BAAe,uBAAWH,QAAKI,QAAML,SAAOM;;AAC1C,AAAAF,0BAAe,uBAAWI,UAAMH,QAAML,SAAOM;;AAC7C,AAAAF,0BAAe,uBAAWI,UAAMH,QAAML,SAAOM;WAKxDK","file":null,"sourcesContent":null,"sourceRoot":null}
@@ -0,0 +1,81 @@
1
+ namespace FsToolkit.ErrorHandling
2
+
3
+ [<RequireQualifiedAccess>]
4
+ module AsyncOption =
5
+
6
+ let inline map
7
+ ([<InlineIfLambda>] mapper: 'input -> 'output)
8
+ (input: Async<'input option>)
9
+ : Async<'output option> =
10
+ Async.map (Option.map mapper) input
11
+
12
+ let inline bind
13
+ ([<InlineIfLambda>] binder: 'input -> Async<'output option>)
14
+ (input: Async<'input option>)
15
+ : Async<'output option> =
16
+ Async.bind
17
+ (fun x ->
18
+ match x with
19
+ | Some x -> binder x
20
+ | None -> Async.singleton None
21
+ )
22
+ input
23
+
24
+ let inline retn (value: 'value) : Async<'value option> = Async.singleton (Some value)
25
+
26
+
27
+ let inline some (value: 'value) : Async<'value option> = Async.singleton (Some value)
28
+
29
+ let inline apply
30
+ (applier: Async<('input -> 'output) option>)
31
+ (input: Async<'input option>)
32
+ : Async<'output option> =
33
+ bind (fun f' -> bind (fun x' -> retn (f' x')) input) applier
34
+
35
+ /// <summary>
36
+ /// Returns result of running <paramref name="onSome"/> if it is <c>Some</c>, otherwise returns result of running <paramref name="onNone"/>
37
+ /// </summary>
38
+ /// <param name="onSome">The function to run if <paramref name="input"/> is <c>Some</c></param>
39
+ /// <param name="onNone">The function to run if <paramref name="input"/> is <c>None</c></param>
40
+ /// <param name="input">The input option.</param>
41
+ /// <returns>
42
+ /// The result of running <paramref name="onSome"/> if the input is <c>Some</c>, else returns result of running <paramref name="onNone"/>.
43
+ /// </returns>
44
+ let inline either
45
+ ([<InlineIfLambda>] onSome: 'input -> Async<'output>)
46
+ (onNone: Async<'output>)
47
+ (input: Async<'input option>)
48
+ : Async<'output> =
49
+ input
50
+ |> Async.bind (
51
+ function
52
+ | Some v -> onSome v
53
+ | None -> onNone
54
+ )
55
+
56
+ /// <summary>
57
+ /// Gets the value of the option if the option is <c>Some</c>, otherwise returns the specified default value.
58
+ /// </summary>
59
+ /// <param name="value">The specified default value.</param>
60
+ /// <param name="asyncOption">The input option.</param>
61
+ /// <returns>
62
+ /// The option if the option is <c>Some</c>, else the default value.
63
+ /// </returns>
64
+ let inline defaultValue (value: 'value) (asyncOption: Async<'value option>) =
65
+ asyncOption
66
+ |> Async.map (Option.defaultValue value)
67
+
68
+ /// <summary>
69
+ /// Gets the value of the option if the option is <c>Some</c>, otherwise evaluates <paramref name="defThunk"/> and returns the result.
70
+ /// </summary>
71
+ /// <param name="defThunk">A thunk that provides a default value when evaluated.</param>
72
+ /// <param name="asyncOption">The input option.</param>
73
+ /// <returns>
74
+ /// The option if the option is <c>Some</c>, else the result of evaluating <paramref name="defThunk"/>.
75
+ /// </returns>
76
+ let inline defaultWith
77
+ ([<InlineIfLambda>] defThunk: unit -> 'value)
78
+ (asyncOption: Async<'value option>)
79
+ : Async<'value> =
80
+ asyncOption
81
+ |> Async.map (Option.defaultWith defThunk)