@nstudio/nativescript-compiler 9.2.0-alpha.17 → 9.2.0-alpha.19

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 (207) hide show
  1. package/README.md +3 -0
  2. package/config.js +1 -0
  3. package/dist/kotlin/access.js +8 -7
  4. package/dist/kotlin/arguments.js +6 -0
  5. package/dist/kotlin/assignment.js +22 -13
  6. package/dist/kotlin/builtins.js +67 -0
  7. package/dist/kotlin/calls.js +3 -2
  8. package/dist/kotlin/class-declaration.js +4 -9
  9. package/dist/kotlin/class-methods.js +2 -2
  10. package/dist/kotlin/core-api.js +1 -1
  11. package/dist/kotlin/declarations.js +1 -1
  12. package/dist/kotlin/expression-statements.js +13 -1
  13. package/dist/kotlin/functions.js +1 -0
  14. package/dist/kotlin/literals.js +4 -8
  15. package/dist/kotlin/names.js +4 -4
  16. package/dist/kotlin/native/api.js +1 -1
  17. package/dist/kotlin/operators.js +25 -25
  18. package/dist/kotlin/optional-chains.js +1 -1
  19. package/dist/kotlin/overrides.js +3 -3
  20. package/dist/kotlin/state-backend.js +6 -2
  21. package/dist/kotlin/translator.js +1 -1
  22. package/dist/kotlin/types.js +4 -4
  23. package/dist/semantics/classes.js +15 -0
  24. package/dist/semantics/conversion.js +9 -1
  25. package/dist/semantics/facts.js +1 -1
  26. package/dist/semantics/lang.js +10 -0
  27. package/dist/semantics/lower.js +54 -0
  28. package/dist/semantics/lowering-methods.js +5 -0
  29. package/dist/semantics/placement.js +9 -3
  30. package/dist/semantics/runtime.js +1 -0
  31. package/dist/semantics/signals.js +11 -0
  32. package/dist/semantics/states/missing.js +7 -0
  33. package/dist/semantics/tdz.js +54 -15
  34. package/dist/semantics/throws.js +2 -2
  35. package/dist/semantics/translator-methods.js +1 -1
  36. package/dist/swift/access.js +7 -9
  37. package/dist/swift/arguments.js +14 -9
  38. package/dist/swift/assignment.js +26 -15
  39. package/dist/swift/calls.js +13 -5
  40. package/dist/swift/class-methods.js +2 -1
  41. package/dist/swift/classes.js +7 -9
  42. package/dist/swift/components.js +3 -3
  43. package/dist/swift/control-flow.js +1 -1
  44. package/dist/swift/conversion.js +5 -2
  45. package/dist/swift/core-api.js +2 -2
  46. package/dist/swift/declarations.js +1 -1
  47. package/dist/swift/expressions.js +6 -2
  48. package/dist/swift/from-any.js +1 -1
  49. package/dist/swift/functions.js +5 -6
  50. package/dist/swift/global-calls.js +1 -1
  51. package/dist/swift/lenient.js +1 -6
  52. package/dist/swift/library.js +2 -2
  53. package/dist/swift/literals.js +8 -3
  54. package/dist/swift/method-values.js +2 -1
  55. package/dist/swift/modules.js +3 -3
  56. package/dist/swift/names.js +7 -7
  57. package/dist/swift/native/calls.js +10 -4
  58. package/dist/swift/object-classes.js +84 -1
  59. package/dist/swift/operators.js +31 -29
  60. package/dist/swift/placement.js +22 -6
  61. package/dist/swift/state-backend.js +3 -2
  62. package/dist/swift/static-calls.js +3 -4
  63. package/dist/swift/syntax.js +10 -6
  64. package/dist/swift/translator.js +1 -1
  65. package/dist/swift/type-facts.js +3 -3
  66. package/dist/swift/types.js +5 -5
  67. package/dist/targets/ios/build.js +1 -1
  68. package/kit-android/generated/kotlin/org/nativescript/kit/__Modules.kt +1 -0
  69. package/kit-android/generated/kotlin/org/nativescript/kit/__Objects.kt +525 -99
  70. package/kit-android/generated/kotlin/org/nativescript/kit/accessibility_accessibility_common.kt +2 -2
  71. package/kit-android/generated/kotlin/org/nativescript/kit/application_application_common.kt +29 -6
  72. package/kit-android/generated/kotlin/org/nativescript/kit/application_helpers_common.kt +14 -0
  73. package/kit-android/generated/kotlin/org/nativescript/kit/color_color_utils.kt +3 -3
  74. package/kit-android/generated/kotlin/org/nativescript/kit/css_mediaquery_index.kt +49 -1
  75. package/kit-android/generated/kotlin/org/nativescript/kit/data_observable_array_index.kt +0 -8
  76. package/kit-android/generated/kotlin/org/nativescript/kit/data_observable_index.kt +0 -16
  77. package/kit-android/generated/kotlin/org/nativescript/kit/data_virtual_array_index.kt +6 -4
  78. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_index.kt +19 -7
  79. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_internal_http_request_internal_common.kt +14 -0
  80. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_internal_index.kt +19 -10
  81. package/kit-android/generated/kotlin/org/nativescript/kit/matrix_index.kt +17 -29
  82. package/kit-android/generated/kotlin/org/nativescript/kit/media_query_list_index.kt +144 -22
  83. package/kit-android/generated/kotlin/org/nativescript/kit/npm_css_what_src_parse.kt +8 -3
  84. package/kit-android/generated/kotlin/org/nativescript/kit/org.nativescript.NativeScriptLifecycleCallbacks.kt +2 -10
  85. package/kit-android/generated/kotlin/org/nativescript/kit/ui_builder_index.kt +0 -2
  86. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_bindable_expression_parser.kt +6 -10
  87. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_properties_index.kt +531 -8
  88. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_base_index.kt +0 -9
  89. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_weak_event_listener_index.kt +3 -3
  90. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_index.kt +19 -0
  91. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_properties.kt +5 -2
  92. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_scope.kt +232 -174
  93. package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_view_text_view_common.kt +1 -1
  94. package/kit-android/generated/kotlin/org/nativescript/kit/utils_android_runtime_version.kt +75 -0
  95. package/kit-android/generated/manifest.json +21 -18
  96. package/kit-android/generated/source-lines.json +1 -1
  97. package/kit-android/src/fromcore/kotlin/org/nativescript/kit/NativeScriptApplication.kt +9 -0
  98. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Array.kt +497 -42
  99. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Intl.kt +1 -1
  100. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/JSON.kt +22 -2
  101. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Strings.kt +32 -18
  102. package/kit-apple/Overlays/xml-free/Core/ui.builder.index.swift +7 -3
  103. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity1.swift +14 -10
  104. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity2.swift +3 -9
  105. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity3Plus.swift +20 -21
  106. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_index_section_view_ios_android.swift +5 -7
  107. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_ios_android_.swift +130 -0
  108. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_oldIndex_newIndex.swift +2 -4
  109. package/kit-apple/Sources/NativeScriptKit/Core/Object_specified_substituted_reads.swift +115 -0
  110. package/kit-apple/Sources/NativeScriptKit/Core/Object_substituted_values_reads.swift +113 -0
  111. package/kit-apple/Sources/NativeScriptKit/Core/Object_substituted_values_reads_.swift +113 -0
  112. package/kit-apple/Sources/NativeScriptKit/Core/application.application-common.swift +348 -330
  113. package/kit-apple/Sources/NativeScriptKit/Core/application.application.ios.swift +358 -359
  114. package/kit-apple/Sources/NativeScriptKit/Core/application.helpers-common.swift +47 -29
  115. package/kit-apple/Sources/NativeScriptKit/Core/connectivity.index.ios.swift +3 -1
  116. package/kit-apple/Sources/NativeScriptKit/Core/css-mediaquery.index.swift +95 -53
  117. package/kit-apple/Sources/NativeScriptKit/Core/css.CSS3Parser.swift +1 -1
  118. package/kit-apple/Sources/NativeScriptKit/Core/css.parser.swift +1 -1
  119. package/kit-apple/Sources/NativeScriptKit/Core/data.observable-array.index.swift +3 -3
  120. package/kit-apple/Sources/NativeScriptKit/Core/file-system.file-system-access.ios.swift +58 -49
  121. package/kit-apple/Sources/NativeScriptKit/Core/file-system.index.swift +10 -10
  122. package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.http-request-internal-common.swift +18 -0
  123. package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.index.ios.swift +67 -52
  124. package/kit-apple/Sources/NativeScriptKit/Core/http.index.swift +3 -3
  125. package/kit-apple/Sources/NativeScriptKit/Core/image-source.index.ios.swift +69 -53
  126. package/kit-apple/Sources/NativeScriptKit/Core/js-libs.easysax.easysax.swift +4 -22
  127. package/kit-apple/Sources/NativeScriptKit/Core/kit-index.json +144 -32
  128. package/kit-apple/Sources/NativeScriptKit/Core/manifest.json +30 -19
  129. package/kit-apple/Sources/NativeScriptKit/Core/media-query-list.index.swift +190 -78
  130. package/kit-apple/Sources/NativeScriptKit/Core/native-window.native-window.ios.swift +1 -1
  131. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.parse.swift +205 -201
  132. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.stringify.swift +41 -42
  133. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.types.swift +1 -1
  134. package/kit-apple/Sources/NativeScriptKit/Core/trace.index.swift +2 -2
  135. package/kit-apple/Sources/NativeScriptKit/Core/ui.action-bar.index.ios.swift +33 -21
  136. package/kit-apple/Sources/NativeScriptKit/Core/ui.activity-indicator.index.ios.swift +12 -6
  137. package/kit-apple/Sources/NativeScriptKit/Core/ui.animation.index.ios.swift +77 -65
  138. package/kit-apple/Sources/NativeScriptKit/Core/ui.animation.keyframe-animation.swift +1 -1
  139. package/kit-apple/Sources/NativeScriptKit/Core/ui.builder.index.swift +10 -6
  140. package/kit-apple/Sources/NativeScriptKit/Core/ui.button.index.ios.swift +14 -13
  141. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.properties.index.swift +1273 -824
  142. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view-base.index.swift +2 -2
  143. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.index.ios.swift +87 -67
  144. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.view-common.swift +1 -1
  145. package/kit-apple/Sources/NativeScriptKit/Core/ui.date-picker.index.ios.swift +17 -16
  146. package/kit-apple/Sources/NativeScriptKit/Core/ui.dialogs.index.ios.swift +2 -2
  147. package/kit-apple/Sources/NativeScriptKit/Core/ui.editable-text-base.index.ios.swift +27 -18
  148. package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.frame-common.swift +2 -1
  149. package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.index.ios.swift +6 -6
  150. package/kit-apple/Sources/NativeScriptKit/Core/ui.html-view.index.ios.swift +9 -9
  151. package/kit-apple/Sources/NativeScriptKit/Core/ui.image.index.ios.swift +6 -6
  152. package/kit-apple/Sources/NativeScriptKit/Core/ui.label.index.ios.swift +8 -8
  153. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.flexbox-layout.index.ios.swift +22 -21
  154. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.layout-base.ios.swift +4 -3
  155. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.liquid-glass-container.index.ios.swift +1 -1
  156. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.liquid-glass.index.ios.swift +1 -1
  157. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.root-layout.index.ios.swift +2 -2
  158. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.root-layout.root-layout-common.swift +9 -9
  159. package/kit-apple/Sources/NativeScriptKit/Core/ui.list-picker.index.ios.swift +9 -6
  160. package/kit-apple/Sources/NativeScriptKit/Core/ui.list-view.index.ios.swift +38 -20
  161. package/kit-apple/Sources/NativeScriptKit/Core/ui.page.index.ios.swift +204 -190
  162. package/kit-apple/Sources/NativeScriptKit/Core/ui.progress.index.ios.swift +12 -10
  163. package/kit-apple/Sources/NativeScriptKit/Core/ui.repeater.index.swift +2 -6
  164. package/kit-apple/Sources/NativeScriptKit/Core/ui.scroll-view.index.ios.swift +18 -9
  165. package/kit-apple/Sources/NativeScriptKit/Core/ui.search-bar.index.ios.swift +28 -18
  166. package/kit-apple/Sources/NativeScriptKit/Core/ui.segmented-bar.index.ios.swift +19 -12
  167. package/kit-apple/Sources/NativeScriptKit/Core/ui.slider.index.ios.swift +14 -12
  168. package/kit-apple/Sources/NativeScriptKit/Core/ui.split-view.index.ios.swift +17 -12
  169. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.background.ios.swift +2 -2
  170. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.clip-path-function.swift +1 -1
  171. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-animation-parser.swift +1 -1
  172. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-selector.swift +2 -2
  173. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.font-common.swift +2 -2
  174. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style-scope.swift +869 -838
  175. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style.index.swift +46 -31
  176. package/kit-apple/Sources/NativeScriptKit/Core/ui.switch.index.ios.swift +12 -10
  177. package/kit-apple/Sources/NativeScriptKit/Core/ui.tab-view.index.ios.swift +36 -20
  178. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.formatted-string.swift +3 -4
  179. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.index.ios.swift +25 -22
  180. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.text-base-common.swift +2 -3
  181. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-field.index.ios.swift +21 -14
  182. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-view.index.ios.swift +33 -21
  183. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-view.text-view-common.swift +1 -1
  184. package/kit-apple/Sources/NativeScriptKit/Core/ui.time-picker.index.ios.swift +22 -18
  185. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.index.ios.swift +2 -2
  186. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.modal-transition.ios.swift +4 -4
  187. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.page-transition.ios.swift +2 -2
  188. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.shared-transition-helper.ios.swift +32 -32
  189. package/kit-apple/Sources/NativeScriptKit/Core/ui.web-view.index.ios.swift +1 -1
  190. package/kit-apple/Sources/NativeScriptKit/Core/ui.web-view.web-view-common.swift +2 -2
  191. package/kit-apple/Sources/NativeScriptKit/Core/utils.android-runtime-version.swift +77 -0
  192. package/kit-apple/Sources/NativeScriptKit/Core/utils.debug-source.swift +2 -2
  193. package/kit-apple/Sources/NativeScriptKit/Core/utils.index.ios.swift +2 -2
  194. package/kit-apple/Sources/NativeScriptKit/Core/xhr.index.swift +62 -61
  195. package/kit-apple/Sources/NativeScriptKit/Runtime/Array.swift +4 -0
  196. package/kit-apple/Sources/NativeScriptKit/Runtime/Dynamic.swift +2 -0
  197. package/kit-apple/Sources/NativeScriptKit/Runtime/Interop.swift +1 -1
  198. package/kit-apple/Sources/NativeScriptKit/Runtime/Intl.swift +1 -1
  199. package/kit-apple/Sources/NativeScriptKit/Runtime/Iterators.swift +1 -1
  200. package/kit-apple/Sources/NativeScriptKit/Runtime/JSON.swift +280 -9
  201. package/kit-apple/Sources/NativeScriptKit/Runtime/Lowering.swift +3 -2
  202. package/kit-apple/Sources/NativeScriptKit/Runtime/Native.swift +2 -1
  203. package/kit-apple/Sources/NativeScriptKit/Runtime/Prototypes.swift +1 -0
  204. package/kit-apple/Sources/NativeScriptKit/Runtime/Symbol.swift +1 -0
  205. package/kit-apple/Sources/NativeScriptKit/Runtime/Values.swift +1 -0
  206. package/kit-apple/Sources/NativeScriptKit/Runtime/Views.swift +2 -0
  207. package/package.json +6 -4
@@ -471,53 +471,62 @@ open class FileSystemAccess: JSDynamic, JSExpando, JSStaticKeyed {
471
471
  #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:296)
472
472
  return JSPromise<Bool> { (__resolvers1: JSResolvers<Bool>) throws -> Void in
473
473
  let reject: (Any?) -> Void = { __resolvers1.reject($0) }
474
- #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:298)
475
- NSData.data(
476
- withContentsOfFile: src,
477
- completion: jsEnter { (__b0: Data) -> Void in
478
- let data: NSData = (__b0 as NSData)
479
- jsReport {
480
- try
481
- ({ (data: NSData?) throws -> Void in
482
- #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:299)
483
- if !jsTruthy(data) {
484
- #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:300)
485
- try jsCallable(reject, "reject")(JSError("Failed to read file at path '" + src))
486
- } else {
487
- #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:302)
488
- try jsUnwrap(data, "writeToFileAtomicallyCompletion").write(
489
- toFile: dest, atomically: true,
490
- completion: jsEnter { () -> Void in
491
- jsReport {
492
- try
493
- ({ () throws -> Void in
494
- #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:303)
495
- if try self.fileExists(dest) {
496
- #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:304)
497
- let size: Double = try self.getFileSize(dest)
498
- #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:305)
499
- if try jsLenientNumberEquals(
500
- size, Double(jsUnwrap(data, "length").length))
501
- {
502
- #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:306)
503
- __resolvers1.resolve(true)
474
+ #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:297)
475
+ do {
476
+ #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:298)
477
+ NSData.data(
478
+ withContentsOfFile: src,
479
+ completion: jsEnter { (__b0: Data) -> Void in
480
+ let data: NSData = (__b0 as NSData)
481
+ jsReport {
482
+ try
483
+ ({ (data: NSData?) throws -> Void in
484
+ #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:299)
485
+ if !jsTruthy(data) {
486
+ #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:300)
487
+ try jsCallable(reject, "reject")(JSError("Failed to read file at path '" + src))
488
+ } else {
489
+ #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:302)
490
+ try jsUnwrap(data, "writeToFileAtomicallyCompletion").write(
491
+ toFile: dest, atomically: true,
492
+ completion: jsEnter { () -> Void in
493
+ jsReport {
494
+ try
495
+ ({ () throws -> Void in
496
+ #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:303)
497
+ if try self.fileExists(dest) {
498
+ #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:304)
499
+ let size: Double = try self.getFileSize(dest)
500
+ #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:305)
501
+ if try jsLenientNumberEquals(
502
+ size, Double(jsUnwrap(data, "length").length))
503
+ {
504
+ #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:306)
505
+ try __resolvers1.resolve(true)
506
+ } else {
507
+ #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:308)
508
+ try jsCallable(reject, "reject")(
509
+ JSError("Failed to write file at path '" + dest)
510
+ )
511
+ }
504
512
  } else {
505
- #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:308)
513
+ #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:311)
506
514
  try jsCallable(reject, "reject")(
507
515
  JSError("Failed to write file at path '" + dest))
508
516
  }
509
- } else {
510
- #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:311)
511
- try jsCallable(reject, "reject")(
512
- JSError("Failed to write file at path '" + dest))
513
- }
514
- })()
515
- }
516
- })
517
- }
518
- })(data)
519
- }
520
- })
517
+ })()
518
+ }
519
+ })
520
+ }
521
+ })(data)
522
+ }
523
+ })
524
+ } catch {
525
+ #sourceLocation()
526
+ let ex: Any? = jsCaught(error)
527
+ #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:317)
528
+ try jsCallable(reject, "reject")(ex)
529
+ }
521
530
  }
522
531
  }
523
532
  #sourceLocation()
@@ -680,7 +689,7 @@ open class FileSystemAccess: JSDynamic, JSExpando, JSStaticKeyed {
680
689
  try jsCallable(reject, "reject")(error)
681
690
  } else {
682
691
  #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:414)
683
- __resolvers5.resolve()
692
+ try __resolvers5.resolve()
684
693
  }
685
694
  }))
686
695
  } catch {
@@ -758,7 +767,7 @@ open class FileSystemAccess: JSDynamic, JSExpando, JSStaticKeyed {
758
767
  try jsCallable(reject, "reject")(error)
759
768
  } else {
760
769
  #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:458)
761
- __resolvers6.resolve()
770
+ try __resolvers6.resolve()
762
771
  }
763
772
  #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:460)
764
773
  try jsUnwrap(handle, "closeFile").closeFile()
@@ -815,7 +824,7 @@ open class FileSystemAccess: JSDynamic, JSExpando, JSStaticKeyed {
815
824
  try jsCallable(reject, "reject")(error)
816
825
  } else {
817
826
  #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:491)
818
- __resolvers7.resolve()
827
+ try __resolvers7.resolve()
819
828
  }
820
829
  #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:493)
821
830
  try jsUnwrap(handle, "closeFile").closeFile()
@@ -884,7 +893,7 @@ open class FileSystemAccess: JSDynamic, JSExpando, JSStaticKeyed {
884
893
  try jsCallable(reject, "reject")(error)
885
894
  } else {
886
895
  #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:528)
887
- __resolvers8.resolve()
896
+ try __resolvers8.resolve()
888
897
  }
889
898
  #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:530)
890
899
  try jsUnwrap(handle, "closeFile").closeFile()
@@ -949,7 +958,7 @@ open class FileSystemAccess: JSDynamic, JSExpando, JSStaticKeyed {
949
958
  try
950
959
  ({ () throws -> Void in
951
960
  #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:563)
952
- __resolvers9.resolve()
961
+ try __resolvers9.resolve()
953
962
  })()
954
963
  }
955
964
  })
@@ -993,7 +1002,7 @@ open class FileSystemAccess: JSDynamic, JSExpando, JSStaticKeyed {
993
1002
  "", 0,
994
1003
  { () throws -> Void in
995
1004
  #sourceLocation(file:"@nativescript/core/file-system.file-system-access.ios.ts",line:587)
996
- __resolvers10.resolve()
1005
+ try __resolvers10.resolve()
997
1006
  }))
998
1007
  } catch {
999
1008
  #sourceLocation()
@@ -100,7 +100,7 @@ open class FileSystemEntity: JSDynamic, JSExpando, JSKeysMade, JSStaticKeyed {
100
100
  #sourceLocation(file:"@nativescript/core/file-system.index.ts",line:82)
101
101
  if !hasError {
102
102
  #sourceLocation(file:"@nativescript/core/file-system.index.ts",line:83)
103
- __resolvers1.resolve(true)
103
+ try __resolvers1.resolve(true)
104
104
  }
105
105
  }
106
106
  }
@@ -149,7 +149,7 @@ open class FileSystemEntity: JSDynamic, JSExpando, JSKeysMade, JSStaticKeyed {
149
149
  #sourceLocation(file:"@nativescript/core/file-system.index.ts",line:116)
150
150
  if !hasError {
151
151
  #sourceLocation(file:"@nativescript/core/file-system.index.ts",line:117)
152
- __resolvers2.resolve(true)
152
+ try __resolvers2.resolve(true)
153
153
  }
154
154
  }
155
155
  }
@@ -500,7 +500,7 @@ open class File: FileSystemEntity {
500
500
  "", 0,
501
501
  { () throws -> Void in
502
502
  #sourceLocation(file:"@nativescript/core/file-system.index.ts",line:379)
503
- __resolvers3.resolve()
503
+ try __resolvers3.resolve()
504
504
  #sourceLocation(file:"@nativescript/core/file-system.index.ts",line:380)
505
505
  self._locked = false
506
506
  }),
@@ -573,7 +573,7 @@ open class File: FileSystemEntity {
573
573
  "", 0,
574
574
  { () throws -> Void in
575
575
  #sourceLocation(file:"@nativescript/core/file-system.index.ts",line:426)
576
- __resolvers4.resolve(true)
576
+ try __resolvers4.resolve(true)
577
577
  #sourceLocation(file:"@nativescript/core/file-system.index.ts",line:427)
578
578
  self._locked = false
579
579
  }),
@@ -646,7 +646,7 @@ open class File: FileSystemEntity {
646
646
  "", 1,
647
647
  { (result: Any?) throws -> Void in
648
648
  #sourceLocation(file:"@nativescript/core/file-system.index.ts",line:473)
649
- __resolvers5.resolve(try jsConvertedBool(result))
649
+ try __resolvers5.resolve(try jsConvertedBool(result))
650
650
  #sourceLocation(file:"@nativescript/core/file-system.index.ts",line:474)
651
651
  self._locked = false
652
652
  }),
@@ -712,7 +712,7 @@ open class File: FileSystemEntity {
712
712
  "", 1,
713
713
  { (result: Any?) throws -> Void in
714
714
  #sourceLocation(file:"@nativescript/core/file-system.index.ts",line:520)
715
- __resolvers6.resolve(result)
715
+ try __resolvers6.resolve(result)
716
716
  #sourceLocation(file:"@nativescript/core/file-system.index.ts",line:521)
717
717
  self._locked = false
718
718
  }),
@@ -778,7 +778,7 @@ open class File: FileSystemEntity {
778
778
  "", 0,
779
779
  { () throws -> Void in
780
780
  #sourceLocation(file:"@nativescript/core/file-system.index.ts",line:567)
781
- __resolvers7.resolve()
781
+ try __resolvers7.resolve()
782
782
  #sourceLocation(file:"@nativescript/core/file-system.index.ts",line:568)
783
783
  self._locked = false
784
784
  }),
@@ -850,7 +850,7 @@ open class File: FileSystemEntity {
850
850
  "", 1,
851
851
  { (result: Any?) throws -> Void in
852
852
  #sourceLocation(file:"@nativescript/core/file-system.index.ts",line:614)
853
- __resolvers8.resolve(try jsConvertedString(result))
853
+ try __resolvers8.resolve(try jsConvertedString(result))
854
854
  #sourceLocation(file:"@nativescript/core/file-system.index.ts",line:615)
855
855
  self._locked = false
856
856
  }),
@@ -918,7 +918,7 @@ open class File: FileSystemEntity {
918
918
  "", 0,
919
919
  { () throws -> Void in
920
920
  #sourceLocation(file:"@nativescript/core/file-system.index.ts",line:660)
921
- __resolvers9.resolve(true)
921
+ try __resolvers9.resolve(true)
922
922
  #sourceLocation(file:"@nativescript/core/file-system.index.ts",line:661)
923
923
  self._locked = false
924
924
  }),
@@ -1118,7 +1118,7 @@ open class Folder: FileSystemEntity {
1118
1118
  #sourceLocation(file:"@nativescript/core/file-system.index.ts",line:736)
1119
1119
  if !hasError {
1120
1120
  #sourceLocation(file:"@nativescript/core/file-system.index.ts",line:737)
1121
- __resolvers10.resolve(true)
1121
+ try __resolvers10.resolve(true)
1122
1122
  }
1123
1123
  }
1124
1124
  }
@@ -55,5 +55,23 @@ public enum Core_http_http_request_internal_http_request_internal_common {
55
55
  #sourceLocation(file:"@nativescript/core/http.http-request-internal.http-request-internal-common.ts",line:22)
56
56
  return JSObject([("method", method as Any?)])
57
57
  }
58
+ #sourceLocation()
59
+ public static func getRequestBodyBytes(_ content: Any?) throws -> JSUint8Array? {
60
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.http-request-internal-common.ts",line:26)
61
+ if content is JSArrayBuffer {
62
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.http-request-internal-common.ts",line:27)
63
+ return try JSUint8Array(buffer: (jsCastPresent(content) as JSArrayBuffer))
64
+ }
65
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.http-request-internal-common.ts",line:29)
66
+ if JSArrayBuffer.isView(content) {
67
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.http-request-internal-common.ts",line:30)
68
+ return try JSUint8Array.from(
69
+ jsUnwrap(content as? JSArrayBufferView, "buffer").buffer,
70
+ jsUnwrap(content as? JSArrayBufferView, "byteOffset").byteOffset,
71
+ jsUnwrap(content as? JSArrayBufferView, "byteLength").byteLength)
72
+ }
73
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.http-request-internal-common.ts",line:33)
74
+ return nil
75
+ }
58
76
  }
59
77
  #sourceLocation()
@@ -157,38 +157,53 @@ public enum Core_http_http_request_internal_index {
157
157
  (jsObjectRequired(
158
158
  (NSString(string: jsLenientString(jsCallMethod(jsGet(options, "content"), "toString")))
159
159
  .data(using: 4) as NSData?)) as Data?)
160
- } else if try (jsGet(options, "content") is JSArrayBuffer) {
160
+ } else {
161
161
  #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:91)
162
- let buffer: JSArrayBuffer? = try jsGet(options, "content") as? JSArrayBuffer
162
+ let bytes: JSUint8Array? =
163
+ try Core_http_http_request_internal_http_request_internal_common.getRequestBodyBytes(
164
+ jsGet(options, "content"))
163
165
  #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:92)
164
- try jsUnwrap(urlRequest, setting: "HTTPBody").httpBody =
165
- (NSData(data: jsNativeData(jsObjectRequired(buffer))) as Data?)
166
+ if jsTruthy(bytes) {
167
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:93)
168
+ let __d_1: JSUint8Array = try jsDestructured(bytes, "buffer")
169
+ let buffer: Any? = __d_1.buffer
170
+ let byteOffset: Double = __d_1.byteOffset
171
+ let byteLength: Double = __d_1.byteLength
172
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:94)
173
+ let body: Any? =
174
+ try
175
+ (byteOffset == 0 && jsStrictEquals(byteLength, jsGet(buffer, "byteLength"))
176
+ ? buffer : jsCallMethod(buffer, "slice", byteOffset, byteOffset + byteLength))
177
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:95)
178
+ try jsUnwrap(urlRequest, setting: "HTTPBody").httpBody =
179
+ (NSData(data: jsNativeData(body)) as Data?)
180
+ }
166
181
  }
167
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:95)
182
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:99)
168
183
  if try Core_utils_types.isNumber(jsGet(options, "timeout")) {
169
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:96)
184
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:100)
170
185
  try jsUnwrap(urlRequest, setting: "timeoutInterval").timeoutInterval = jsNativeNumber(
171
186
  jsConvertedNumber(jsGet(options, "timeout")) / 1000)
172
187
  }
173
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:99)
188
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:103)
174
189
  var session: URLSession?
175
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:100)
190
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:104)
176
191
  if try Core_utils_types.isBoolean(jsGet(options, "dontFollowRedirects"))
177
192
  && jsConvertedBool(jsGet(options, "dontFollowRedirects"))
178
193
  {
179
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:101)
194
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:105)
180
195
  try Core_http_http_request_internal_index.ensureSessionNotFollowingRedirects()
181
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:102)
196
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:106)
182
197
  session = Core_http_http_request_internal_index.sessionNotFollowingRedirects
183
198
  } else {
184
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:104)
199
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:108)
185
200
  try Core_http_http_request_internal_index.ensureDefaultSession()
186
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:105)
201
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:109)
187
202
  session = Core_http_http_request_internal_index.defaultSession
188
203
  }
189
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:108)
204
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:112)
190
205
  var timestamp: Double = -1
191
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:109)
206
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:113)
192
207
  let dataTask: URLSessionDataTask? = try jsUnwrap(session, "dataTaskWithRequestCompletionHandler")
193
208
  .dataTask(
194
209
  with: (jsObjectRequired(urlRequest) as URLRequest),
@@ -199,24 +214,24 @@ public enum Core_http_http_request_internal_index {
199
214
  jsReport {
200
215
  try
201
216
  ({ (data: NSData?, response: HTTPURLResponse?, error: NSError?) throws -> Void in
202
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:110)
217
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:114)
203
218
  if jsTruthy(error) {
204
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:111)
219
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:115)
205
220
  try jsCallable(reject, "reject")(
206
221
  JSError(jsUnwrap(error, "localizedDescription").localizedDescription))
207
222
  } else {
208
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:113)
223
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:117)
209
224
  let headers: JSRecord<Any?> = JSRecord<Any?>()
210
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:114)
225
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:118)
211
226
  if try
212
227
  (jsTruthy(response)
213
228
  && jsTruthy(jsUnwrap(response, "allHeaderFields").allHeaderFields))
214
229
  {
215
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:115)
230
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:119)
216
231
  let headerFields: [AnyHashable: Any] = try jsUnwrap(
217
232
  response, "allHeaderFields"
218
233
  ).allHeaderFields
219
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:117)
234
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:121)
220
235
  try
221
236
  (jsUnwrap(headerFields, "enumerateKeysAndObjectsUsingBlock")
222
237
  as NSDictionary).enumerateKeysAndObjects(
@@ -231,7 +246,7 @@ public enum Core_http_http_request_internal_index {
231
246
  ({
232
247
  (key: Any?, value: Any?, stop: Any?) throws
233
248
  -> Void in
234
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:118)
249
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:122)
235
250
  try
236
251
  Core_http_http_request_internal_http_request_internal_common
237
252
  .addHeader(
@@ -241,14 +256,14 @@ public enum Core_http_http_request_internal_index {
241
256
  }
242
257
  })
243
258
  }
244
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:122)
259
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:126)
245
260
  if jsTruthy(debugRequest) {
246
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:123)
261
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:127)
247
262
  try jsSet(
248
263
  debugRequest, "mimeType", jsUnwrap(response, "MIMEType").mimeType)
249
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:124)
264
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:128)
250
265
  try jsSet(debugRequest, "data", data)
251
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:125)
266
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:129)
252
267
  let debugResponse:
253
268
  Object_url_status_statusText_headers_mimeType_fromDiskCache_timing_headersSize =
254
269
  try
@@ -273,12 +288,12 @@ public enum Core_http_http_request_internal_index {
273
288
  headersSize: jsNullishCoalesce(
274
289
  ((headers as JSRecord<Any?>?)?["length"] ?? nil),
275
290
  Double(-1)))
276
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:151)
291
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:155)
277
292
  _ = try jsCallMethod(debugRequest, "responseReceived", debugResponse)
278
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:152)
293
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:156)
279
294
  _ = try jsCallMethod(debugRequest, "loadingFinished")
280
295
  }
281
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:156)
296
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:160)
282
297
  let content: Any? = try JSObject([
283
298
  ("raw", data), ("requestURL", jsGet(options, "url")),
284
299
  (
@@ -286,13 +301,13 @@ public enum Core_http_http_request_internal_index {
286
301
  FunctionCell_none_to_JSPromise_AnyOpt_Opt.scriptOrNil(
287
302
  "", 0,
288
303
  { () -> JSPromise<Any?> in
289
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:160)
304
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:164)
290
305
  return JSPromise<Any?> {
291
306
  (__resolvers2: JSResolvers<Any?>) throws -> Void in
292
307
  let rejectImage: (Any?) -> Void = {
293
308
  __resolvers2.reject($0)
294
309
  }
295
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:161)
310
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:165)
296
311
  UIImage.tns_decode(
297
312
  with: (data as Data?),
298
313
  completion: jsEnter { (__b0: UIImage?) -> Void in
@@ -300,12 +315,12 @@ public enum Core_http_http_request_internal_index {
300
315
  jsReport {
301
316
  try
302
317
  ({ (image: UIImage?) throws -> Void in
303
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:162)
318
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:166)
304
319
  if jsTruthy(image) {
305
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:163)
306
- __resolvers2.resolve(image)
320
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:167)
321
+ try __resolvers2.resolve(image)
307
322
  } else {
308
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:165)
323
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:169)
309
324
  try jsCallable(
310
325
  rejectImage, "rejectImage")(
311
326
  JSError(
@@ -323,22 +338,22 @@ public enum Core_http_http_request_internal_index {
323
338
  FunctionCell_DoubleOpt_to_String.scriptOrNil(
324
339
  "", 1,
325
340
  { (encoding: Double?) throws -> String in
326
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:170)
341
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:174)
327
342
  return
328
343
  try Core_http_http_request_internal_index.NSDataToString(
329
344
  data, encoding)
330
345
  })
331
346
  ),
332
347
  ])
333
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:173)
348
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:177)
334
349
  if try !jsIsNullish(contentHandler)
335
350
  && Core_utils_types.isObject(contentHandler)
336
351
  && !(JSArray<Any?>.isArray(contentHandler))
337
352
  {
338
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:174)
353
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:178)
339
354
  _ = try jsObjectAssign(content, contentHandler)
340
355
  }
341
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:177)
356
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:181)
342
357
  try __resolvers1.resolve(
343
358
  JSObject([
344
359
  ("content", content),
@@ -349,11 +364,11 @@ public enum Core_http_http_request_internal_index {
349
364
  })(data, response, error)
350
365
  }
351
366
  })
352
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:185)
367
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:189)
353
368
  if try (jsTruthy(jsGet(options, "url")) && jsTruthy(debugRequest)) {
354
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:186)
369
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:190)
355
370
  timestamp = JSDate.now() / 1000
356
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:187)
371
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:191)
357
372
  let request: Object_headers_timestamp_headersSize_method_postData_url = try {
358
373
  () throws -> Object_headers_timestamp_headersSize_method_postData_url in
359
374
  let __spread1: Any? =
@@ -371,37 +386,37 @@ public enum Core_http_http_request_internal_index {
371
386
  ? jsLenientString(jsField(__spread1, "url")) : jsLenientString(jsGet(options, "url"))),
372
387
  jsOrder: ["url", "method", "postData", "headers", "timestamp", "headersSize"])
373
388
  }()
374
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:194)
389
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:198)
375
390
  _ = try jsCallMethod(debugRequest, "requestWillBeSent", request)
376
391
  }
377
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:197)
392
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:201)
378
393
  try jsUnwrap(dataTask, "resume").resume()
379
394
  } catch {
380
395
  let ex: Any? = jsCaught(error)
381
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:199)
396
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:203)
382
397
  try jsCallable(reject, "reject")(ex)
383
398
  }
384
399
  }
385
400
  }
386
401
  #sourceLocation()
387
402
  public static func NSDataToString(_ data: Any?, _ encoding: Double? = nil) throws -> String {
388
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:205)
403
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:209)
389
404
  var code: Double = Double(NSUTF8StringEncoding)
390
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:207)
405
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:211)
391
406
  if jsLenientNumberEquals((encoding ?? .nan), HttpResponseEncoding.GBK) {
392
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:208)
407
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:212)
393
408
  code = Double(CFStringEncodings.GB_18030_2000.rawValue)
394
409
  }
395
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:211)
410
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:215)
396
411
  var encodedString: NSString? = NSString(data: jsNativeData(data), encoding: jsNativeInteger(code, UInt.self))
397
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:214)
412
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:218)
398
413
  if !jsTruthy(encodedString) {
399
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:215)
414
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:219)
400
415
  code = Double(NSISOLatin1StringEncoding)
401
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:216)
416
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:220)
402
417
  encodedString = jsImplicit(NSString(data: jsNativeData(data), encoding: jsNativeInteger(code, UInt.self)))
403
418
  }
404
- #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:219)
419
+ #sourceLocation(file:"@nativescript/core/http.http-request-internal.index.ios.ts",line:223)
405
420
  return try jsUnwrap(encodedString, "toString").description
406
421
  }
407
422
  }
@@ -32,7 +32,7 @@ public enum Http {
32
32
  #sourceLocation(file:"@nativescript/core/http.index.ts",line:11)
33
33
  let str: String = try jsLenientString(jsCallMethod(jsGet(r, "content"), "toString"))
34
34
  #sourceLocation(file:"@nativescript/core/http.index.ts",line:12)
35
- __resolvers1.resolve(str)
35
+ try __resolvers1.resolve(str)
36
36
  } catch {
37
37
  let e: Any? = jsCaught(error)
38
38
  #sourceLocation(file:"@nativescript/core/http.index.ts",line:14)
@@ -62,7 +62,7 @@ public enum Http {
62
62
  #sourceLocation(file:"@nativescript/core/http.index.ts",line:27)
63
63
  let json: Any? = try jsCallMethod(jsGet(r, "content"), "toJSON")
64
64
  #sourceLocation(file:"@nativescript/core/http.index.ts",line:28)
65
- __resolvers2.resolve(json)
65
+ try __resolvers2.resolve(json)
66
66
  } catch {
67
67
  let e: Any? = jsCaught(error)
68
68
  #sourceLocation(file:"@nativescript/core/http.index.ts",line:30)
@@ -127,7 +127,7 @@ public enum Http {
127
127
  let file: File? =
128
128
  try jsCallMethod(jsGet(r, "content"), "toFile", (destinationFilePath as Any?)) as? File
129
129
  #sourceLocation(file:"@nativescript/core/http.index.ts",line:61)
130
- __resolvers4.resolve(file)
130
+ try __resolvers4.resolve(file)
131
131
  } catch {
132
132
  let e: Any? = jsCaught(error)
133
133
  #sourceLocation(file:"@nativescript/core/http.index.ts",line:63)