From ba27f9d1ecfa7518019845b84b035d3d4a2a6658 Mon Sep 17 00:00:00 2001 From: Nishan Date: Thu, 15 Dec 2022 16:30:37 -0800 Subject: [PATCH 1/8] fix: remove gap if its last element in line (fix flex gap extra spacing when children determine parents main axis size) (#1188) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Fixes - https://github.com/facebook/react-native/issues/35553 ## Approach We're using `betweenMainDim` to add [gap between](https://github.com/intergalacticspacehighway/yoga/blob/bbeede82d36cd89657faf385aaa704f45443c326/yoga/Yoga.cpp#L2495) items in main axis. This is resulting in increased [main axis](https://github.com/intergalacticspacehighway/yoga/blob/bbeede82d36cd89657faf385aaa704f45443c326/yoga/Yoga.cpp#L2598) dimension of the container as it gets added even for the last element. One solution is to keep using it and subtract the gap when last element is reached. ## Aside Mutating this value feels weird, but I think `betweenMainDim` gets initialized for every line so should be fine? I did some manual tests to verify. I tried running tests but I'll have to downgrade the java version. Let me know if anything fails. Thanks! 🙏 Pull Request resolved: https://github.com/facebook/yoga/pull/1188 Test Plan: Added fixtures which previously failed but now pass. Reviewed By: necolas Differential Revision: D42078162 Pulled By: NickGerleman fbshipit-source-id: 0e535618350422e001141a8786a83fc81651afe9 --- csharp/tests/Facebook.Yoga/YGGapTest.cs | 135 +++++++++++++++++++ gentest/fixtures/YGGapTest.html | 12 ++ java/tests/com/facebook/yoga/YGGapTest.java | 133 ++++++++++++++++++ javascript/tests/Facebook.Yoga/YGGapTest.js | 141 ++++++++++++++++++++ tests/YGGapTest.cpp | 135 +++++++++++++++++++ yoga/Yoga.cpp | 5 + 6 files changed, 561 insertions(+) diff --git a/csharp/tests/Facebook.Yoga/YGGapTest.cs b/csharp/tests/Facebook.Yoga/YGGapTest.cs index fd6ecc84..173e10f0 100644 --- a/csharp/tests/Facebook.Yoga/YGGapTest.cs +++ b/csharp/tests/Facebook.Yoga/YGGapTest.cs @@ -1597,6 +1597,74 @@ namespace Facebook.Yoga Assert.AreEqual(150f, root_child4.LayoutHeight); } + [Test] + public void Test_column_gap_determines_parent_width() + { + YogaConfig config = new YogaConfig(); + + YogaNode root = new YogaNode(config); + root.FlexDirection = YogaFlexDirection.Row; + root.Height = 100; + root.ColumnGap = 10; + + YogaNode root_child0 = new YogaNode(config); + root_child0.Width = 10; + root.Insert(0, root_child0); + + YogaNode root_child1 = new YogaNode(config); + root_child1.Width = 20; + root.Insert(1, root_child1); + + YogaNode root_child2 = new YogaNode(config); + root_child2.Width = 30; + root.Insert(2, root_child2); + root.StyleDirection = YogaDirection.LTR; + root.CalculateLayout(); + + Assert.AreEqual(0f, root.LayoutX); + Assert.AreEqual(0f, root.LayoutY); + Assert.AreEqual(80f, root.LayoutWidth); + Assert.AreEqual(100f, root.LayoutHeight); + + Assert.AreEqual(0f, root_child0.LayoutX); + Assert.AreEqual(0f, root_child0.LayoutY); + Assert.AreEqual(10f, root_child0.LayoutWidth); + Assert.AreEqual(100f, root_child0.LayoutHeight); + + Assert.AreEqual(20f, root_child1.LayoutX); + Assert.AreEqual(0f, root_child1.LayoutY); + Assert.AreEqual(20f, root_child1.LayoutWidth); + Assert.AreEqual(100f, root_child1.LayoutHeight); + + Assert.AreEqual(50f, root_child2.LayoutX); + Assert.AreEqual(0f, root_child2.LayoutY); + Assert.AreEqual(30f, root_child2.LayoutWidth); + Assert.AreEqual(100f, root_child2.LayoutHeight); + + root.StyleDirection = YogaDirection.RTL; + root.CalculateLayout(); + + Assert.AreEqual(0f, root.LayoutX); + Assert.AreEqual(0f, root.LayoutY); + Assert.AreEqual(80f, root.LayoutWidth); + Assert.AreEqual(100f, root.LayoutHeight); + + Assert.AreEqual(70f, root_child0.LayoutX); + Assert.AreEqual(0f, root_child0.LayoutY); + Assert.AreEqual(10f, root_child0.LayoutWidth); + Assert.AreEqual(100f, root_child0.LayoutHeight); + + Assert.AreEqual(40f, root_child1.LayoutX); + Assert.AreEqual(0f, root_child1.LayoutY); + Assert.AreEqual(20f, root_child1.LayoutWidth); + Assert.AreEqual(100f, root_child1.LayoutHeight); + + Assert.AreEqual(0f, root_child2.LayoutX); + Assert.AreEqual(0f, root_child2.LayoutY); + Assert.AreEqual(30f, root_child2.LayoutWidth); + Assert.AreEqual(100f, root_child2.LayoutHeight); + } + [Test] public void Test_row_gap_align_items_stretch() { @@ -1981,5 +2049,72 @@ namespace Facebook.Yoga Assert.AreEqual(0f, root_child2.LayoutHeight); } + [Test] + public void Test_row_gap_determines_parent_height() + { + YogaConfig config = new YogaConfig(); + + YogaNode root = new YogaNode(config); + root.Width = 100; + root.RowGap = 10; + + YogaNode root_child0 = new YogaNode(config); + root_child0.Height = 10; + root.Insert(0, root_child0); + + YogaNode root_child1 = new YogaNode(config); + root_child1.Height = 20; + root.Insert(1, root_child1); + + YogaNode root_child2 = new YogaNode(config); + root_child2.Height = 30; + root.Insert(2, root_child2); + root.StyleDirection = YogaDirection.LTR; + root.CalculateLayout(); + + Assert.AreEqual(0f, root.LayoutX); + Assert.AreEqual(0f, root.LayoutY); + Assert.AreEqual(100f, root.LayoutWidth); + Assert.AreEqual(80f, root.LayoutHeight); + + Assert.AreEqual(0f, root_child0.LayoutX); + Assert.AreEqual(0f, root_child0.LayoutY); + Assert.AreEqual(100f, root_child0.LayoutWidth); + Assert.AreEqual(10f, root_child0.LayoutHeight); + + Assert.AreEqual(0f, root_child1.LayoutX); + Assert.AreEqual(20f, root_child1.LayoutY); + Assert.AreEqual(100f, root_child1.LayoutWidth); + Assert.AreEqual(20f, root_child1.LayoutHeight); + + Assert.AreEqual(0f, root_child2.LayoutX); + Assert.AreEqual(50f, root_child2.LayoutY); + Assert.AreEqual(100f, root_child2.LayoutWidth); + Assert.AreEqual(30f, root_child2.LayoutHeight); + + root.StyleDirection = YogaDirection.RTL; + root.CalculateLayout(); + + Assert.AreEqual(0f, root.LayoutX); + Assert.AreEqual(0f, root.LayoutY); + Assert.AreEqual(100f, root.LayoutWidth); + Assert.AreEqual(80f, root.LayoutHeight); + + Assert.AreEqual(0f, root_child0.LayoutX); + Assert.AreEqual(0f, root_child0.LayoutY); + Assert.AreEqual(100f, root_child0.LayoutWidth); + Assert.AreEqual(10f, root_child0.LayoutHeight); + + Assert.AreEqual(0f, root_child1.LayoutX); + Assert.AreEqual(20f, root_child1.LayoutY); + Assert.AreEqual(100f, root_child1.LayoutWidth); + Assert.AreEqual(20f, root_child1.LayoutHeight); + + Assert.AreEqual(0f, root_child2.LayoutX); + Assert.AreEqual(50f, root_child2.LayoutY); + Assert.AreEqual(100f, root_child2.LayoutWidth); + Assert.AreEqual(30f, root_child2.LayoutHeight); + } + } } diff --git a/gentest/fixtures/YGGapTest.html b/gentest/fixtures/YGGapTest.html index 7b412256..4bfc7753 100644 --- a/gentest/fixtures/YGGapTest.html +++ b/gentest/fixtures/YGGapTest.html @@ -123,6 +123,12 @@
+
+
+
+
+
+
@@ -152,3 +158,9 @@
+ +
+
+
+
+
diff --git a/java/tests/com/facebook/yoga/YGGapTest.java b/java/tests/com/facebook/yoga/YGGapTest.java index b22d5656..29d08d8f 100644 --- a/java/tests/com/facebook/yoga/YGGapTest.java +++ b/java/tests/com/facebook/yoga/YGGapTest.java @@ -1589,6 +1589,73 @@ public class YGGapTest { assertEquals(150f, root_child4.getLayoutHeight(), 0.0f); } + @Test + public void test_column_gap_determines_parent_width() { + YogaConfig config = YogaConfigFactory.create(); + + final YogaNode root = createNode(config); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setHeight(100f); + root.setGap(YogaGutter.COLUMN, 10f); + + final YogaNode root_child0 = createNode(config); + root_child0.setWidth(10f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child1 = createNode(config); + root_child1.setWidth(20f); + root.addChildAt(root_child1, 1); + + final YogaNode root_child2 = createNode(config); + root_child2.setWidth(30f); + root.addChildAt(root_child2, 2); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(80f, root.getLayoutWidth(), 0.0f); + assertEquals(100f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(10f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(20f, root_child1.getLayoutX(), 0.0f); + assertEquals(0f, root_child1.getLayoutY(), 0.0f); + assertEquals(20f, root_child1.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child1.getLayoutHeight(), 0.0f); + + assertEquals(50f, root_child2.getLayoutX(), 0.0f); + assertEquals(0f, root_child2.getLayoutY(), 0.0f); + assertEquals(30f, root_child2.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child2.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(80f, root.getLayoutWidth(), 0.0f); + assertEquals(100f, root.getLayoutHeight(), 0.0f); + + assertEquals(70f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(10f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(40f, root_child1.getLayoutX(), 0.0f); + assertEquals(0f, root_child1.getLayoutY(), 0.0f); + assertEquals(20f, root_child1.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child1.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child2.getLayoutX(), 0.0f); + assertEquals(0f, root_child2.getLayoutY(), 0.0f); + assertEquals(30f, root_child2.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child2.getLayoutHeight(), 0.0f); + } + @Test public void test_row_gap_align_items_stretch() { YogaConfig config = YogaConfigFactory.create(); @@ -1969,6 +2036,72 @@ public class YGGapTest { assertEquals(0f, root_child2.getLayoutHeight(), 0.0f); } + @Test + public void test_row_gap_determines_parent_height() { + YogaConfig config = YogaConfigFactory.create(); + + final YogaNode root = createNode(config); + root.setWidth(100f); + root.setGap(YogaGutter.ROW, 10f); + + final YogaNode root_child0 = createNode(config); + root_child0.setHeight(10f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child1 = createNode(config); + root_child1.setHeight(20f); + root.addChildAt(root_child1, 1); + + final YogaNode root_child2 = createNode(config); + root_child2.setHeight(30f); + root.addChildAt(root_child2, 2); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(100f, root.getLayoutWidth(), 0.0f); + assertEquals(80f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(10f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child1.getLayoutX(), 0.0f); + assertEquals(20f, root_child1.getLayoutY(), 0.0f); + assertEquals(100f, root_child1.getLayoutWidth(), 0.0f); + assertEquals(20f, root_child1.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child2.getLayoutX(), 0.0f); + assertEquals(50f, root_child2.getLayoutY(), 0.0f); + assertEquals(100f, root_child2.getLayoutWidth(), 0.0f); + assertEquals(30f, root_child2.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(100f, root.getLayoutWidth(), 0.0f); + assertEquals(80f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(10f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child1.getLayoutX(), 0.0f); + assertEquals(20f, root_child1.getLayoutY(), 0.0f); + assertEquals(100f, root_child1.getLayoutWidth(), 0.0f); + assertEquals(20f, root_child1.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child2.getLayoutX(), 0.0f); + assertEquals(50f, root_child2.getLayoutY(), 0.0f); + assertEquals(100f, root_child2.getLayoutWidth(), 0.0f); + assertEquals(30f, root_child2.getLayoutHeight(), 0.0f); + } + private YogaNode createNode(YogaConfig config) { return mNodeFactory.create(config); } diff --git a/javascript/tests/Facebook.Yoga/YGGapTest.js b/javascript/tests/Facebook.Yoga/YGGapTest.js index 07175f74..d7e37048 100644 --- a/javascript/tests/Facebook.Yoga/YGGapTest.js +++ b/javascript/tests/Facebook.Yoga/YGGapTest.js @@ -1642,6 +1642,77 @@ it("column_gap_wrap_align_stretch", function () { config.free(); } }); +it("column_gap_determines_parent_width", function () { + var config = Yoga.Config.create(); + + try { + var root = Yoga.Node.create(config); + root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW); + root.setHeight(100); + root.setGap(Yoga.GUTTER_COLUMN, 10); + + var root_child0 = Yoga.Node.create(config); + root_child0.setWidth(10); + root.insertChild(root_child0, 0); + + var root_child1 = Yoga.Node.create(config); + root_child1.setWidth(20); + root.insertChild(root_child1, 1); + + var root_child2 = Yoga.Node.create(config); + root_child2.setWidth(30); + root.insertChild(root_child2, 2); + root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR); + + console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")"); + console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")"); + console.assert(80 === root.getComputedWidth(), "80 === root.getComputedWidth() (" + root.getComputedWidth() + ")"); + console.assert(100 === root.getComputedHeight(), "100 === root.getComputedHeight() (" + root.getComputedHeight() + ")"); + + console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")"); + console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")"); + console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")"); + console.assert(100 === root_child0.getComputedHeight(), "100 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")"); + + console.assert(20 === root_child1.getComputedLeft(), "20 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")"); + console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")"); + console.assert(20 === root_child1.getComputedWidth(), "20 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")"); + console.assert(100 === root_child1.getComputedHeight(), "100 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")"); + + console.assert(50 === root_child2.getComputedLeft(), "50 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")"); + console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")"); + console.assert(30 === root_child2.getComputedWidth(), "30 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")"); + console.assert(100 === root_child2.getComputedHeight(), "100 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")"); + + root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL); + + console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")"); + console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")"); + console.assert(80 === root.getComputedWidth(), "80 === root.getComputedWidth() (" + root.getComputedWidth() + ")"); + console.assert(100 === root.getComputedHeight(), "100 === root.getComputedHeight() (" + root.getComputedHeight() + ")"); + + console.assert(70 === root_child0.getComputedLeft(), "70 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")"); + console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")"); + console.assert(10 === root_child0.getComputedWidth(), "10 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")"); + console.assert(100 === root_child0.getComputedHeight(), "100 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")"); + + console.assert(40 === root_child1.getComputedLeft(), "40 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")"); + console.assert(0 === root_child1.getComputedTop(), "0 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")"); + console.assert(20 === root_child1.getComputedWidth(), "20 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")"); + console.assert(100 === root_child1.getComputedHeight(), "100 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")"); + + console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")"); + console.assert(0 === root_child2.getComputedTop(), "0 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")"); + console.assert(30 === root_child2.getComputedWidth(), "30 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")"); + console.assert(100 === root_child2.getComputedHeight(), "100 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")"); + } finally { + if (typeof root !== "undefined") { + root.freeRecursive(); + } + + config.free(); + } +}); it("row_gap_align_items_stretch", function () { var config = Yoga.Config.create(); @@ -2038,3 +2109,73 @@ it("row_gap_row_wrap_child_margins", function () { config.free(); } }); +it("row_gap_determines_parent_height", function () { + var config = Yoga.Config.create(); + + try { + var root = Yoga.Node.create(config); + root.setWidth(100); + root.setGap(Yoga.GUTTER_ROW, 10); + + var root_child0 = Yoga.Node.create(config); + root_child0.setHeight(10); + root.insertChild(root_child0, 0); + + var root_child1 = Yoga.Node.create(config); + root_child1.setHeight(20); + root.insertChild(root_child1, 1); + + var root_child2 = Yoga.Node.create(config); + root_child2.setHeight(30); + root.insertChild(root_child2, 2); + root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR); + + console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")"); + console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")"); + console.assert(100 === root.getComputedWidth(), "100 === root.getComputedWidth() (" + root.getComputedWidth() + ")"); + console.assert(80 === root.getComputedHeight(), "80 === root.getComputedHeight() (" + root.getComputedHeight() + ")"); + + console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")"); + console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")"); + console.assert(100 === root_child0.getComputedWidth(), "100 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")"); + console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")"); + + console.assert(0 === root_child1.getComputedLeft(), "0 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")"); + console.assert(20 === root_child1.getComputedTop(), "20 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")"); + console.assert(100 === root_child1.getComputedWidth(), "100 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")"); + console.assert(20 === root_child1.getComputedHeight(), "20 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")"); + + console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")"); + console.assert(50 === root_child2.getComputedTop(), "50 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")"); + console.assert(100 === root_child2.getComputedWidth(), "100 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")"); + console.assert(30 === root_child2.getComputedHeight(), "30 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")"); + + root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL); + + console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")"); + console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")"); + console.assert(100 === root.getComputedWidth(), "100 === root.getComputedWidth() (" + root.getComputedWidth() + ")"); + console.assert(80 === root.getComputedHeight(), "80 === root.getComputedHeight() (" + root.getComputedHeight() + ")"); + + console.assert(0 === root_child0.getComputedLeft(), "0 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")"); + console.assert(0 === root_child0.getComputedTop(), "0 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")"); + console.assert(100 === root_child0.getComputedWidth(), "100 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")"); + console.assert(10 === root_child0.getComputedHeight(), "10 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")"); + + console.assert(0 === root_child1.getComputedLeft(), "0 === root_child1.getComputedLeft() (" + root_child1.getComputedLeft() + ")"); + console.assert(20 === root_child1.getComputedTop(), "20 === root_child1.getComputedTop() (" + root_child1.getComputedTop() + ")"); + console.assert(100 === root_child1.getComputedWidth(), "100 === root_child1.getComputedWidth() (" + root_child1.getComputedWidth() + ")"); + console.assert(20 === root_child1.getComputedHeight(), "20 === root_child1.getComputedHeight() (" + root_child1.getComputedHeight() + ")"); + + console.assert(0 === root_child2.getComputedLeft(), "0 === root_child2.getComputedLeft() (" + root_child2.getComputedLeft() + ")"); + console.assert(50 === root_child2.getComputedTop(), "50 === root_child2.getComputedTop() (" + root_child2.getComputedTop() + ")"); + console.assert(100 === root_child2.getComputedWidth(), "100 === root_child2.getComputedWidth() (" + root_child2.getComputedWidth() + ")"); + console.assert(30 === root_child2.getComputedHeight(), "30 === root_child2.getComputedHeight() (" + root_child2.getComputedHeight() + ")"); + } finally { + if (typeof root !== "undefined") { + root.freeRecursive(); + } + + config.free(); + } +}); diff --git a/tests/YGGapTest.cpp b/tests/YGGapTest.cpp index 982721bc..2fd0c70a 100644 --- a/tests/YGGapTest.cpp +++ b/tests/YGGapTest.cpp @@ -1593,6 +1593,74 @@ TEST(YogaTest, column_gap_wrap_align_stretch) { YGConfigFree(config); } +TEST(YogaTest, column_gap_determines_parent_width) { + const YGConfigRef config = YGConfigNew(); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetGap(root, YGGutterColumn, 10); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0, 10); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child1, 20); + YGNodeInsertChild(root, root_child1, 1); + + const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child2, 30); + YGNodeInsertChild(root, root_child2, 2); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(80, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(10, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(20, YGNodeLayoutGetLeft(root_child1)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child1)); + ASSERT_FLOAT_EQ(20, YGNodeLayoutGetWidth(root_child1)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child1)); + + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child2)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child2)); + ASSERT_FLOAT_EQ(30, YGNodeLayoutGetWidth(root_child2)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child2)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(80, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(70, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(10, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(40, YGNodeLayoutGetLeft(root_child1)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child1)); + ASSERT_FLOAT_EQ(20, YGNodeLayoutGetWidth(root_child1)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child1)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child2)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child2)); + ASSERT_FLOAT_EQ(30, YGNodeLayoutGetWidth(root_child2)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child2)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + TEST(YogaTest, row_gap_align_items_stretch) { const YGConfigRef config = YGConfigNew(); @@ -1976,3 +2044,70 @@ TEST(YogaTest, row_gap_row_wrap_child_margins) { YGConfigFree(config); } + +TEST(YogaTest, row_gap_determines_parent_height) { + const YGConfigRef config = YGConfigNew(); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetGap(root, YGGutterRow, 10); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0, 10); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child1, 20); + YGNodeInsertChild(root, root_child1, 1); + + const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child2, 30); + YGNodeInsertChild(root, root_child2, 2); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(80, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(10, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child1)); + ASSERT_FLOAT_EQ(20, YGNodeLayoutGetTop(root_child1)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child1)); + ASSERT_FLOAT_EQ(20, YGNodeLayoutGetHeight(root_child1)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child2)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child2)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child2)); + ASSERT_FLOAT_EQ(30, YGNodeLayoutGetHeight(root_child2)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(80, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(10, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child1)); + ASSERT_FLOAT_EQ(20, YGNodeLayoutGetTop(root_child1)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child1)); + ASSERT_FLOAT_EQ(20, YGNodeLayoutGetHeight(root_child1)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child2)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child2)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child2)); + ASSERT_FLOAT_EQ(30, YGNodeLayoutGetHeight(root_child2)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} diff --git a/yoga/Yoga.cpp b/yoga/Yoga.cpp index 88c77ab8..a66adec1 100644 --- a/yoga/Yoga.cpp +++ b/yoga/Yoga.cpp @@ -2540,6 +2540,11 @@ static void YGJustifyMainAxis( const YGNodeRef child = node->getChild(i); const YGStyle& childStyle = child->getStyle(); const YGLayout childLayout = child->getLayout(); + const bool isLastChild = i == collectedFlexItemsValues.endOfLineIndex - 1; + // remove the gap if it is the last element of the line + if (isLastChild) { + betweenMainDim -= gap; + } if (childStyle.display() == YGDisplayNone) { continue; } From 2f9959da26022acf5f274589e28c894979e74237 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Dec 2022 16:46:52 -0800 Subject: [PATCH 2/8] Bump nokogiri from 1.13.9 to 1.13.10 in /gentest (#1187) Summary: Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.9 to 1.13.10.
Release notes

Sourced from nokogiri's releases.

1.13.10 / 2022-12-07

Security

  • [CRuby] Address CVE-2022-23476, unchecked return value from xmlTextReaderExpand. See GHSA-qv4q-mr5r-qprj for more information.

Improvements

  • [CRuby] XML::Reader#attribute_hash now returns nil on parse errors. This restores the behavior of #attributes from v1.13.7 and earlier. [#2715]

sha256 checksums:

777ce2e80f64772e91459b943e531dfef387e768f2255f9bc7a1655f254bbaa1  nokogiri-1.13.10-aarch64-linux.gem
b432ff47c51386e07f7e275374fe031c1349e37eaef2216759063bc5fa5624aa  nokogiri-1.13.10-arm64-darwin.gem
73ac581ddcb680a912e92da928ffdbac7b36afd3368418f2cee861b96e8c830b  nokogiri-1.13.10-java.gem
916aa17e624611dddbf2976ecce1b4a80633c6378f8465cff0efab022ebc2900  nokogiri-1.13.10-x64-mingw-ucrt.gem
0f85a1ad8c2b02c166a6637237133505b71a05f1bb41b91447005449769bced0  nokogiri-1.13.10-x64-mingw32.gem
91fa3a8724a1ce20fccbd718dafd9acbde099258183ac486992a61b00bb17020  nokogiri-1.13.10-x86-linux.gem
d6663f5900ccd8f72d43660d7f082565b7ffcaade0b9a59a74b3ef8791034168  nokogiri-1.13.10-x86-mingw32.gem
81755fc4b8130ef9678c76a2e5af3db7a0a6664b3cba7d9fe8ef75e7d979e91b  nokogiri-1.13.10-x86_64-darwin.gem
51d5246705dedad0a09b374d09cc193e7383a5dd32136a690a3cd56e95adf0a3  nokogiri-1.13.10-x86_64-linux.gem
d3ee00f26c151763da1691c7fc6871ddd03e532f74f85101f5acedc2d099e958  nokogiri-1.13.10.gem
Changelog

Sourced from nokogiri's changelog.

1.13.10 / 2022-12-07

Security

  • [CRuby] Address CVE-2022-23476, unchecked return value from xmlTextReaderExpand. See GHSA-qv4q-mr5r-qprj for more information.

Improvements

  • [CRuby] XML::Reader#attribute_hash now returns nil on parse errors. This restores the behavior of #attributes from v1.13.7 and earlier. [#2715]
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nokogiri&package-manager=bundler&previous-version=1.13.9&new-version=1.13.10)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `dependabot rebase` will rebase this PR - `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `dependabot merge` will merge this PR after your CI passes on it - `dependabot squash and merge` will squash and merge this PR after your CI passes on it - `dependabot cancel merge` will cancel a previously requested merge and block automerging - `dependabot reopen` will reopen this PR if it is closed - `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/yoga/network/alerts).
Pull Request resolved: https://github.com/facebook/yoga/pull/1187 Reviewed By: mdvacca Differential Revision: D42114059 Pulled By: NickGerleman fbshipit-source-id: 0c12b66ba4283d8dc39547edd97e26765e7e912b --- gentest/Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gentest/Gemfile.lock b/gentest/Gemfile.lock index 57313752..48781c15 100644 --- a/gentest/Gemfile.lock +++ b/gentest/Gemfile.lock @@ -3,10 +3,10 @@ GEM specs: childprocess (4.1.0) mini_portile2 (2.8.0) - nokogiri (1.13.9) + nokogiri (1.13.10) mini_portile2 (~> 2.8.0) racc (~> 1.4) - racc (1.6.0) + racc (1.6.1) regexp_parser (2.6.0) rexml (3.2.5) rubyzip (2.3.2) From 894142d5892cadf1a62b16146793288e3fde14d5 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Mon, 26 Dec 2022 14:57:03 -0800 Subject: [PATCH 3/8] Do not treat "yoga-playground" as package (#1192) Summary: "yoga-playground" contains the code for the playground used on the Yoga website. It lives inside the "website" package, but also has its own separate package.json and lockfile. The package wasn't ever published, and does not share a workspace with the website or other JS packages. We can remove the package.json and related files to remove the lockfile, build steps, etc, while letting it still be used by the website (the only thing using the playground right now). Pull Request resolved: https://github.com/facebook/yoga/pull/1192 Test Plan: GitHub Actions will test that the website build still succeeds. Reviewed By: christophpurrer Differential Revision: D42240825 Pulled By: NickGerleman fbshipit-source-id: fe0de2a25536d4e6b5a8531d0c0a2a51215fa38f --- website/src/components/Playground/.npmignore | 3 - .../src/components/Playground/package.json | 19 - .../components/Playground/webpack.config.js | 70 - website/src/components/Playground/yarn.lock | 2903 ----------------- 4 files changed, 2995 deletions(-) delete mode 100644 website/src/components/Playground/.npmignore delete mode 100644 website/src/components/Playground/package.json delete mode 100644 website/src/components/Playground/webpack.config.js delete mode 100644 website/src/components/Playground/yarn.lock diff --git a/website/src/components/Playground/.npmignore b/website/src/components/Playground/.npmignore deleted file mode 100644 index 3c8a2517..00000000 --- a/website/src/components/Playground/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -webpack.config.js -node_modules diff --git a/website/src/components/Playground/package.json b/website/src/components/Playground/package.json deleted file mode 100644 index eb6acf5f..00000000 --- a/website/src/components/Playground/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "yoga-playground", - "version": "1.0.0", - "main": "dist/index.js", - "author": "Daniel Büchele", - "license": "MIT", - "scripts": { - "build": "webpack && cp ../../../node_modules/antd/dist/antd.min.css dist/antd.min.css" - }, - "devDependencies": { - "@babel/plugin-proposal-class-properties": "^7.5.5", - "@babel/plugin-transform-flow-strip-types": "^7.4.4", - "@babel/preset-react": "^7.0.0", - "babel-loader": "^8.0.6", - "css-loader": "^3.1.0", - "mini-css-extract-plugin": "^0.8.0", - "webpack": "^4.38.0" - } -} diff --git a/website/src/components/Playground/webpack.config.js b/website/src/components/Playground/webpack.config.js deleted file mode 100644 index 1046c374..00000000 --- a/website/src/components/Playground/webpack.config.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const path = require('path'); -const MiniCssExtractPlugin = require('mini-css-extract-plugin'); - -module.exports = { - mode: 'production', - entry: './src/index.js', - output: { - path: path.resolve(__dirname, 'dist'), - filename: 'index.js', - libraryExport: 'default', - libraryTarget: 'commonjs2' - }, - externals: { - // Don't bundle react or react-dom - react: { - commonjs: "react", - commonjs2: "react", - amd: "React", - root: "React" - }, - "react-dom": { - commonjs: "react-dom", - commonjs2: "react-dom", - amd: "ReactDOM", - root: "ReactDOM" - } - }, - plugins: [ - new MiniCssExtractPlugin({ - filename: 'index.css', - }), - ], - module: { - rules: [ - { - test: /\.js$/, - exclude: /node_modules/, - use: { - loader: 'babel-loader', - options: { - "presets": ["@babel/preset-react"], - "plugins": ["@babel/plugin-transform-flow-strip-types", "@babel/plugin-proposal-class-properties"] - } - } - }, - { - test: /\.css$/, - use: [ - { - loader: MiniCssExtractPlugin.loader, - options: { - // you can specify a publicPath here - // by default it uses publicPath in webpackOptions.output - publicPath: '../', - hmr: process.env.NODE_ENV === 'development', - }, - }, - 'css-loader', - ], - } - ] - } -}; diff --git a/website/src/components/Playground/yarn.lock b/website/src/components/Playground/yarn.lock deleted file mode 100644 index 016d9ff6..00000000 --- a/website/src/components/Playground/yarn.lock +++ /dev/null @@ -1,2903 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/code-frame@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" - integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== - dependencies: - "@babel/highlight" "^7.18.6" - -"@babel/generator@^7.19.3": - version "7.19.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.19.3.tgz#d7f4d1300485b4547cb6f94b27d10d237b42bf59" - integrity sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ== - dependencies: - "@babel/types" "^7.19.3" - "@jridgewell/gen-mapping" "^0.3.2" - jsesc "^2.5.1" - -"@babel/helper-annotate-as-pure@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" - integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-create-class-features-plugin@^7.18.6": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.19.0.tgz#bfd6904620df4e46470bae4850d66be1054c404b" - integrity sha512-NRz8DwF4jT3UfrmUoZjd0Uph9HQnP30t7Ash+weACcyNkiYTywpIjDBgReJMKgr+n86sn2nPVVmJ28Dm053Kqw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" - "@babel/helper-member-expression-to-functions" "^7.18.9" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-replace-supers" "^7.18.9" - "@babel/helper-split-export-declaration" "^7.18.6" - -"@babel/helper-environment-visitor@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" - integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== - -"@babel/helper-function-name@^7.19.0": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c" - integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w== - dependencies: - "@babel/template" "^7.18.10" - "@babel/types" "^7.19.0" - -"@babel/helper-hoist-variables@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" - integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-member-expression-to-functions@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz#1531661e8375af843ad37ac692c132841e2fd815" - integrity sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg== - dependencies: - "@babel/types" "^7.18.9" - -"@babel/helper-module-imports@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" - integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-optimise-call-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" - integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.19.0": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz#4796bb14961521f0f8715990bee2fb6e51ce21bf" - integrity sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw== - -"@babel/helper-replace-supers@^7.18.9": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz#e1592a9b4b368aa6bdb8784a711e0bcbf0612b78" - integrity sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-member-expression-to-functions" "^7.18.9" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/traverse" "^7.19.1" - "@babel/types" "^7.19.0" - -"@babel/helper-split-export-declaration@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" - integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-string-parser@^7.18.10": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz#181f22d28ebe1b3857fa575f5c290b1aaf659b56" - integrity sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw== - -"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" - integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== - -"@babel/helper-validator-option@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" - integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== - -"@babel/highlight@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" - integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/parser@^7.18.10", "@babel/parser@^7.19.3": - version "7.19.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.3.tgz#8dd36d17c53ff347f9e55c328710321b49479a9a" - integrity sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ== - -"@babel/plugin-proposal-class-properties@^7.5.5": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" - integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-syntax-flow@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.18.6.tgz#774d825256f2379d06139be0c723c4dd444f3ca1" - integrity sha512-LUbR+KNTBWCUAqRG9ex5Gnzu2IOkt8jRJbHHXFT9q+L9zm7M/QQbEqXyw1n1pohYvOyWC8CjeyjrSaIwiYjK7A== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-syntax-jsx@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz#a8feef63b010150abd97f1649ec296e849943ca0" - integrity sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-flow-strip-types@^7.4.4": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.19.0.tgz#e9e8606633287488216028719638cbbb2f2dde8f" - integrity sha512-sgeMlNaQVbCSpgLSKP4ZZKfsJVnFnNQlUSk6gPYzR/q7tzCgQF2t8RBKAP6cKJeZdveei7Q7Jm527xepI8lNLg== - dependencies: - "@babel/helper-plugin-utils" "^7.19.0" - "@babel/plugin-syntax-flow" "^7.18.6" - -"@babel/plugin-transform-react-display-name@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.18.6.tgz#8b1125f919ef36ebdfff061d664e266c666b9415" - integrity sha512-TV4sQ+T013n61uMoygyMRm+xf04Bd5oqFpv2jAEQwSZ8NwQA7zeRPg1LMVg2PWi3zWBz+CLKD+v5bcpZ/BS0aA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-react-jsx-development@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.18.6.tgz#dbe5c972811e49c7405b630e4d0d2e1380c0ddc5" - integrity sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA== - dependencies: - "@babel/plugin-transform-react-jsx" "^7.18.6" - -"@babel/plugin-transform-react-jsx@^7.18.6": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.19.0.tgz#b3cbb7c3a00b92ec8ae1027910e331ba5c500eb9" - integrity sha512-UVEvX3tXie3Szm3emi1+G63jyw1w5IcMY0FSKM+CRnKRI5Mr1YbCNgsSTwoTwKphQEG9P+QqmuRFneJPZuHNhg== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-plugin-utils" "^7.19.0" - "@babel/plugin-syntax-jsx" "^7.18.6" - "@babel/types" "^7.19.0" - -"@babel/plugin-transform-react-pure-annotations@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.18.6.tgz#561af267f19f3e5d59291f9950fd7b9663d0d844" - integrity sha512-I8VfEPg9r2TRDdvnHgPepTKvuRomzA8+u+nhY7qSI1fR2hRNebasZEETLyM5mAUr0Ku56OkXJ0I7NHJnO6cJiQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/preset-react@^7.0.0": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.18.6.tgz#979f76d6277048dc19094c217b507f3ad517dd2d" - integrity sha512-zXr6atUmyYdiWRVLOZahakYmOBHtWc2WGCkP8PYTgZi0iJXDY2CN180TdrIW4OGOAdLc7TifzDIvtx6izaRIzg== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-validator-option" "^7.18.6" - "@babel/plugin-transform-react-display-name" "^7.18.6" - "@babel/plugin-transform-react-jsx" "^7.18.6" - "@babel/plugin-transform-react-jsx-development" "^7.18.6" - "@babel/plugin-transform-react-pure-annotations" "^7.18.6" - -"@babel/template@^7.18.10": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71" - integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/parser" "^7.18.10" - "@babel/types" "^7.18.10" - -"@babel/traverse@^7.19.1": - version "7.19.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.19.3.tgz#3a3c5348d4988ba60884e8494b0592b2f15a04b4" - integrity sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.19.3" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.19.3" - "@babel/types" "^7.19.3" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.19.3": - version "7.19.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.3.tgz#fc420e6bbe54880bce6779ffaf315f5e43ec9624" - integrity sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw== - dependencies: - "@babel/helper-string-parser" "^7.18.10" - "@babel/helper-validator-identifier" "^7.19.1" - to-fast-properties "^2.0.0" - -"@jridgewell/gen-mapping@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" - integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== - dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/resolve-uri@^3.0.3": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== - -"@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== - -"@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/trace-mapping@^0.3.9": - version "0.3.15" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz#aba35c48a38d3fd84b37e66c9c0423f9744f9774" - integrity sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@types/json-schema@^7.0.5": - version "7.0.11" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" - integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== - -"@webassemblyjs/ast@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" - integrity sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA== - dependencies: - "@webassemblyjs/helper-module-context" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/wast-parser" "1.9.0" - -"@webassemblyjs/floating-point-hex-parser@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz#3c3d3b271bddfc84deb00f71344438311d52ffb4" - integrity sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA== - -"@webassemblyjs/helper-api-error@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz#203f676e333b96c9da2eeab3ccef33c45928b6a2" - integrity sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw== - -"@webassemblyjs/helper-buffer@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz#a1442d269c5feb23fcbc9ef759dac3547f29de00" - integrity sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA== - -"@webassemblyjs/helper-code-frame@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz#647f8892cd2043a82ac0c8c5e75c36f1d9159f27" - integrity sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA== - dependencies: - "@webassemblyjs/wast-printer" "1.9.0" - -"@webassemblyjs/helper-fsm@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz#c05256b71244214671f4b08ec108ad63b70eddb8" - integrity sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw== - -"@webassemblyjs/helper-module-context@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz#25d8884b76839871a08a6c6f806c3979ef712f07" - integrity sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g== - dependencies: - "@webassemblyjs/ast" "1.9.0" - -"@webassemblyjs/helper-wasm-bytecode@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz#4fed8beac9b8c14f8c58b70d124d549dd1fe5790" - integrity sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw== - -"@webassemblyjs/helper-wasm-section@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz#5a4138d5a6292ba18b04c5ae49717e4167965346" - integrity sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-buffer" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/wasm-gen" "1.9.0" - -"@webassemblyjs/ieee754@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz#15c7a0fbaae83fb26143bbacf6d6df1702ad39e4" - integrity sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg== - dependencies: - "@xtuc/ieee754" "^1.2.0" - -"@webassemblyjs/leb128@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.9.0.tgz#f19ca0b76a6dc55623a09cffa769e838fa1e1c95" - integrity sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw== - dependencies: - "@xtuc/long" "4.2.2" - -"@webassemblyjs/utf8@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.9.0.tgz#04d33b636f78e6a6813227e82402f7637b6229ab" - integrity sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w== - -"@webassemblyjs/wasm-edit@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz#3fe6d79d3f0f922183aa86002c42dd256cfee9cf" - integrity sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-buffer" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/helper-wasm-section" "1.9.0" - "@webassemblyjs/wasm-gen" "1.9.0" - "@webassemblyjs/wasm-opt" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" - "@webassemblyjs/wast-printer" "1.9.0" - -"@webassemblyjs/wasm-gen@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz#50bc70ec68ded8e2763b01a1418bf43491a7a49c" - integrity sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/ieee754" "1.9.0" - "@webassemblyjs/leb128" "1.9.0" - "@webassemblyjs/utf8" "1.9.0" - -"@webassemblyjs/wasm-opt@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz#2211181e5b31326443cc8112eb9f0b9028721a61" - integrity sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-buffer" "1.9.0" - "@webassemblyjs/wasm-gen" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" - -"@webassemblyjs/wasm-parser@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz#9d48e44826df4a6598294aa6c87469d642fff65e" - integrity sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-api-error" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/ieee754" "1.9.0" - "@webassemblyjs/leb128" "1.9.0" - "@webassemblyjs/utf8" "1.9.0" - -"@webassemblyjs/wast-parser@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz#3031115d79ac5bd261556cecc3fa90a3ef451914" - integrity sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/floating-point-hex-parser" "1.9.0" - "@webassemblyjs/helper-api-error" "1.9.0" - "@webassemblyjs/helper-code-frame" "1.9.0" - "@webassemblyjs/helper-fsm" "1.9.0" - "@xtuc/long" "4.2.2" - -"@webassemblyjs/wast-printer@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz#4935d54c85fef637b00ce9f52377451d00d47899" - integrity sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/wast-parser" "1.9.0" - "@xtuc/long" "4.2.2" - -"@xtuc/ieee754@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" - integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== - -"@xtuc/long@4.2.2": - version "4.2.2" - resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" - integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== - -acorn@^6.4.1: - version "6.4.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" - integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== - -ajv-errors@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" - integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== - -ajv-keywords@^3.1.0, ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" - integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== - -ajv@^6.1.0, ajv@^6.10.2, ajv@^6.12.4: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -anymatch@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" - integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== - dependencies: - micromatch "^3.1.4" - normalize-path "^2.1.1" - -anymatch@~3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" - integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -aproba@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - integrity sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA== - -arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q== - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ== - -asn1.js@^5.2.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" - integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - safer-buffer "^2.1.0" - -assert@^1.1.1: - version "1.5.0" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb" - integrity sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA== - dependencies: - object-assign "^4.1.1" - util "0.10.3" - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw== - -async-each@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" - integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== - -atob@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - -babel-loader@^8.0.6: - version "8.2.5" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.5.tgz#d45f585e654d5a5d90f5350a779d7647c5ed512e" - integrity sha512-OSiFfH89LrEMiWd4pLNqGz4CwJDtbs2ZVc+iGu2HrkRfPxId9F2anQj38IxWpmRfsUY0aBZYi1EFcd3mhtRMLQ== - dependencies: - find-cache-dir "^3.3.1" - loader-utils "^2.0.0" - make-dir "^3.1.0" - schema-utils "^2.6.5" - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -base64-js@^1.0.2: - version "1.5.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -big.js@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" - integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== - -binary-extensions@^1.0.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" - integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== - -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - -bindings@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" - integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== - dependencies: - file-uri-to-path "1.0.0" - -bluebird@^3.5.5: - version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: - version "4.12.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== - -bn.js@^5.0.0, bn.js@^5.1.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" - integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^2.3.1, braces@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== - dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" - -braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -brorand@^1.0.1, brorand@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== - -browserify-aes@^1.0.0, browserify-aes@^1.0.4: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserify-cipher@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" - integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: - version "4.1.0" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d" - integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== - dependencies: - bn.js "^5.0.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.1.tgz#eaf4add46dd54be3bb3b36c0cf15abbeba7956c3" - integrity sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== - dependencies: - bn.js "^5.1.1" - browserify-rsa "^4.0.1" - create-hash "^1.2.0" - create-hmac "^1.1.7" - elliptic "^6.5.3" - inherits "^2.0.4" - parse-asn1 "^5.1.5" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -browserify-zlib@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" - integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== - dependencies: - pako "~1.0.5" - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== - -buffer@^4.3.0: - version "4.9.2" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" - integrity sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - -builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - integrity sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ== - -cacache@^12.0.2: - version "12.0.4" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c" - integrity sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ== - dependencies: - bluebird "^3.5.5" - chownr "^1.1.1" - figgy-pudding "^3.5.1" - glob "^7.1.4" - graceful-fs "^4.1.15" - infer-owner "^1.0.3" - lru-cache "^5.1.1" - mississippi "^3.0.0" - mkdirp "^0.5.1" - move-concurrently "^1.0.1" - promise-inflight "^1.0.1" - rimraf "^2.6.3" - ssri "^6.0.1" - unique-filename "^1.1.1" - y18n "^4.0.0" - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - -camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -chalk@^2.0.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chokidar@^2.1.8: - version "2.1.8" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" - integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== - dependencies: - anymatch "^2.0.0" - async-each "^1.0.1" - braces "^2.3.2" - glob-parent "^3.1.0" - inherits "^2.0.3" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - normalize-path "^3.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.2.1" - upath "^1.1.1" - optionalDependencies: - fsevents "^1.2.7" - -chokidar@^3.4.1: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -chownr@^1.1.1: - version "1.1.4" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" - integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - -chrome-trace-event@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" - integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== - -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - integrity sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw== - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - -commander@^2.20.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== - -component-emitter@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" - integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -concat-stream@^1.5.0: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -console-browserify@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" - integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== - -constants-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - integrity sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ== - -copy-concurrently@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" - integrity sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A== - dependencies: - aproba "^1.1.1" - fs-write-stream-atomic "^1.0.8" - iferr "^0.1.5" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.0" - -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - integrity sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw== - -core-util-is@~1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" - integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== - -create-ecdh@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" - integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== - dependencies: - bn.js "^4.1.0" - elliptic "^6.5.3" - -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -crypto-browserify@^3.11.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - -css-loader@^3.1.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.6.0.tgz#2e4b2c7e6e2d27f8c8f28f61bffcd2e6c91ef645" - integrity sha512-M5lSukoWi1If8dhQAUCvj4H8vUt3vOnwbQBH9DdTm/s4Ym2B/3dPMtYZeJmq7Q3S3Pa+I94DcZ7pc9bP14cWIQ== - dependencies: - camelcase "^5.3.1" - cssesc "^3.0.0" - icss-utils "^4.1.1" - loader-utils "^1.2.3" - normalize-path "^3.0.0" - postcss "^7.0.32" - postcss-modules-extract-imports "^2.0.0" - postcss-modules-local-by-default "^3.0.2" - postcss-modules-scope "^2.2.0" - postcss-modules-values "^3.0.0" - postcss-value-parser "^4.1.0" - schema-utils "^2.7.0" - semver "^6.3.0" - -cssesc@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" - integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== - -cyclist@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" - integrity sha512-NJGVKPS81XejHcLhaLJS7plab0fK3slPh11mESeeDq2W4ZI5kUKK/LRRdVDvjJseojbPB7ZwjnyOybg3Igea/A== - -debug@^2.2.0, debug@^2.3.3: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@^4.1.0: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og== - -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - integrity sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA== - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - integrity sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA== - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - -des.js@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" - integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - -domain-browser@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" - integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== - -duplexify@^3.4.2, duplexify@^3.6.0: - version "3.7.1" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" - integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== - dependencies: - end-of-stream "^1.0.0" - inherits "^2.0.1" - readable-stream "^2.0.0" - stream-shift "^1.0.0" - -elliptic@^6.5.3: - version "6.5.4" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.1" - -emojis-list@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" - integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== - -end-of-stream@^1.0.0, end-of-stream@^1.1.0: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -enhanced-resolve@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz#2f3cfd84dbe3b487f18f2db2ef1e064a571ca5ec" - integrity sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg== - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.5.0" - tapable "^1.0.0" - -errno@^0.1.3, errno@~0.1.7: - version "0.1.8" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" - integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== - dependencies: - prr "~1.0.1" - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - -eslint-scope@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" - integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - -esrecurse@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -events@^3.0.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" - integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - integrity sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA== - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug== - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - integrity sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q== - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -figgy-pudding@^3.5.1: - version "3.5.2" - resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" - integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== - -file-uri-to-path@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" - integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== - -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - integrity sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ== - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -find-cache-dir@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" - integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== - dependencies: - commondir "^1.0.1" - make-dir "^2.0.0" - pkg-dir "^3.0.0" - -find-cache-dir@^3.3.1: - version "3.3.2" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" - integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== - dependencies: - commondir "^1.0.1" - make-dir "^3.0.2" - pkg-dir "^4.1.0" - -find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - -find-up@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -flush-write-stream@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" - integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== - dependencies: - inherits "^2.0.3" - readable-stream "^2.3.6" - -for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - integrity sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ== - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA== - dependencies: - map-cache "^0.2.2" - -from2@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" - integrity sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g== - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.0" - -fs-write-stream-atomic@^1.0.8: - version "1.0.10" - resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" - integrity sha512-gehEzmPn2nAwr39eay+x3X34Ra+M2QlVUTLhkXPjWdeO8RF9kszk116avgBJM3ZyNHgHXBNx+VmPaFC36k0PzA== - dependencies: - graceful-fs "^4.1.2" - iferr "^0.1.5" - imurmurhash "^0.1.4" - readable-stream "1 || 2" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@^1.2.7: - version "1.2.13" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" - integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== - dependencies: - bindings "^1.5.0" - nan "^2.12.1" - -fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - integrity sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA== - -glob-parent@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" - integrity sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA== - dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" - -glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob@^7.1.3, glob@^7.1.4: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2: - version "4.2.10" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" - integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - integrity sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q== - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - integrity sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw== - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - integrity sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ== - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - integrity sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ== - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - -hmac-drbg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -https-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" - integrity sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg== - -icss-utils@^4.0.0, icss-utils@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-4.1.1.tgz#21170b53789ee27447c2f47dd683081403f9a467" - integrity sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA== - dependencies: - postcss "^7.0.14" - -ieee754@^1.1.4: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -iferr@^0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" - integrity sha512-DUNFN5j7Tln0D+TxzloUjKB+CtVu6myn0JEFak6dG18mNt9YkQ6lzGCdafwofISZ1lLF3xRHJ98VKy9ynkcFaA== - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - -infer-owner@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" - integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -inherits@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" - integrity sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA== - -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== - -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - integrity sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A== - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== - dependencies: - kind-of "^6.0.0" - -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - integrity sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q== - dependencies: - binary-extensions "^1.0.0" - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - integrity sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg== - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== - dependencies: - kind-of "^6.0.0" - -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - integrity sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw== - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^2.1.0, is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" - integrity sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw== - dependencies: - is-extglob "^2.1.0" - -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - integrity sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg== - dependencies: - kind-of "^3.0.2" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-plain-obj@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - integrity sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg== - -is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -is-wsl@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" - integrity sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw== - -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - integrity sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA== - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -json-parse-better-errors@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json5@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" - integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== - dependencies: - minimist "^1.2.0" - -json5@^2.1.2: - version "2.2.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" - integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== - -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - integrity sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw== - dependencies: - is-buffer "^1.1.5" - -kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -loader-runner@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" - integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== - -loader-utils@^1.1.0, loader-utils@^1.2.3: - version "1.4.2" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.2.tgz#29a957f3a63973883eb684f10ffd3d151fec01a3" - integrity sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^1.0.1" - -loader-utils@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.2.tgz#d6e3b4fb81870721ae4e0868ab11dd638368c129" - integrity sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^2.1.2" - -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -make-dir@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" - integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== - dependencies: - pify "^4.0.1" - semver "^5.6.0" - -make-dir@^3.0.2, make-dir@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - integrity sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg== - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - integrity sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w== - dependencies: - object-visit "^1.0.0" - -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -memory-fs@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" - integrity sha512-cda4JKCxReDXFXRqOHPQscuIYg1PvxbE2S2GP45rnwfEK+vZaXC8C1OFvdHIbgw0DLzowXGVoxLaAmlgRy14GQ== - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -memory-fs@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" - integrity sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -micromatch@^3.1.10, micromatch@^3.1.4: - version "3.1.10" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.2" - -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - -mini-css-extract-plugin@^0.8.0: - version "0.8.2" - resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.8.2.tgz#a875e169beb27c88af77dd962771c9eedc3da161" - integrity sha512-a3Y4of27Wz+mqK3qrcd3VhYz6cU0iW5x3Sgvqzbj+XmlrSizmvu8QQMl5oMYJjgHOC4iyt+w7l4umP+dQeW3bw== - dependencies: - loader-utils "^1.1.0" - normalize-url "1.9.1" - schema-utils "^1.0.0" - webpack-sources "^1.1.0" - -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== - -minimatch@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimist@^1.2.0: - version "1.2.7" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" - integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== - -minimist@^1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" - integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== - -mississippi@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" - integrity sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA== - dependencies: - concat-stream "^1.5.0" - duplexify "^3.4.2" - end-of-stream "^1.1.0" - flush-write-stream "^1.0.0" - from2 "^2.1.0" - parallel-transform "^1.1.0" - pump "^3.0.0" - pumpify "^1.3.3" - stream-each "^1.1.0" - through2 "^2.0.0" - -mixin-deep@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" - integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -mkdirp@^0.5.1, mkdirp@^0.5.3: - version "0.5.6" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" - integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== - dependencies: - minimist "^1.2.6" - -move-concurrently@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" - integrity sha512-hdrFxZOycD/g6A6SoI2bB5NA/5NEqD0569+S47WZhPvm46sD50ZHdYaFmnua5lndde9rCHGjmfK7Z8BuCt/PcQ== - dependencies: - aproba "^1.1.1" - copy-concurrently "^1.0.0" - fs-write-stream-atomic "^1.0.8" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.3" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -nan@^2.12.1: - version "2.16.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.16.0.tgz#664f43e45460fb98faf00edca0bb0d7b8dce7916" - integrity sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA== - -nanomatch@^1.2.9: - version "1.2.13" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" - integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -neo-async@^2.5.0, neo-async@^2.6.1: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - -node-libs-browser@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425" - integrity sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q== - dependencies: - assert "^1.1.1" - browserify-zlib "^0.2.0" - buffer "^4.3.0" - console-browserify "^1.1.0" - constants-browserify "^1.0.0" - crypto-browserify "^3.11.0" - domain-browser "^1.1.1" - events "^3.0.0" - https-browserify "^1.0.0" - os-browserify "^0.3.0" - path-browserify "0.0.1" - process "^0.11.10" - punycode "^1.2.4" - querystring-es3 "^0.2.0" - readable-stream "^2.3.3" - stream-browserify "^2.0.1" - stream-http "^2.7.2" - string_decoder "^1.0.0" - timers-browserify "^2.0.4" - tty-browserify "0.0.0" - url "^0.11.0" - util "^0.11.0" - vm-browserify "^1.0.1" - -normalize-path@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - integrity sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w== - dependencies: - remove-trailing-separator "^1.0.1" - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -normalize-url@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c" - integrity sha512-A48My/mtCklowHBlI8Fq2jFWK4tX4lJ5E6ytFsSOq1fzpvT0SQSgKhSg7lN5c2uYFOrUAOQp6zhhJnpp1eMloQ== - dependencies: - object-assign "^4.0.1" - prepend-http "^1.0.0" - query-string "^4.1.0" - sort-keys "^1.0.0" - -object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ== - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA== - dependencies: - isobject "^3.0.0" - -object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ== - dependencies: - isobject "^3.0.1" - -once@^1.3.0, once@^1.3.1, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -os-browserify@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" - integrity sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A== - -p-limit@^2.0.0, p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -pako@~1.0.5: - version "1.0.11" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" - integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== - -parallel-transform@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.2.0.tgz#9049ca37d6cb2182c3b1d2c720be94d14a5814fc" - integrity sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg== - dependencies: - cyclist "^1.0.1" - inherits "^2.0.3" - readable-stream "^2.1.5" - -parse-asn1@^5.0.0, parse-asn1@^5.1.5: - version "5.1.6" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" - integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== - dependencies: - asn1.js "^5.2.0" - browserify-aes "^1.0.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - safe-buffer "^5.1.1" - -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw== - -path-browserify@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" - integrity sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ== - -path-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - integrity sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q== - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -pbkdf2@^3.0.3: - version "3.1.2" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" - integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -picocolors@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-0.2.1.tgz#570670f793646851d1ba135996962abad587859f" - integrity sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA== - -picomatch@^2.0.4, picomatch@^2.2.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pify@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" - integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - -pkg-dir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" - integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== - dependencies: - find-up "^3.0.0" - -pkg-dir@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== - -postcss-modules-extract-imports@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz#818719a1ae1da325f9832446b01136eeb493cd7e" - integrity sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ== - dependencies: - postcss "^7.0.5" - -postcss-modules-local-by-default@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.3.tgz#bb14e0cc78279d504dbdcbfd7e0ca28993ffbbb0" - integrity sha512-e3xDq+LotiGesympRlKNgaJ0PCzoUIdpH0dj47iWAui/kyTgh3CiAr1qP54uodmJhl6p9rN6BoNcdEDVJx9RDw== - dependencies: - icss-utils "^4.1.1" - postcss "^7.0.32" - postcss-selector-parser "^6.0.2" - postcss-value-parser "^4.1.0" - -postcss-modules-scope@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz#385cae013cc7743f5a7d7602d1073a89eaae62ee" - integrity sha512-YyEgsTMRpNd+HmyC7H/mh3y+MeFWevy7V1evVhJWewmMbjDHIbZbOXICC2y+m1xI1UVfIT1HMW/O04Hxyu9oXQ== - dependencies: - postcss "^7.0.6" - postcss-selector-parser "^6.0.0" - -postcss-modules-values@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-3.0.0.tgz#5b5000d6ebae29b4255301b4a3a54574423e7f10" - integrity sha512-1//E5jCBrZ9DmRX+zCtmQtRSV6PV42Ix7Bzj9GbwJceduuf7IqP8MgeTXuRDHOWj2m0VzZD5+roFWDuU8RQjcg== - dependencies: - icss-utils "^4.0.0" - postcss "^7.0.6" - -postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.2: - version "6.0.10" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz#79b61e2c0d1bfc2602d549e11d0876256f8df88d" - integrity sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w== - dependencies: - cssesc "^3.0.0" - util-deprecate "^1.0.2" - -postcss-value-parser@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" - integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== - -postcss@^7.0.14, postcss@^7.0.32, postcss@^7.0.5, postcss@^7.0.6: - version "7.0.39" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.39.tgz#9624375d965630e2e1f2c02a935c82a59cb48309" - integrity sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA== - dependencies: - picocolors "^0.2.1" - source-map "^0.6.1" - -prepend-http@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" - integrity sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg== - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== - -promise-inflight@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" - integrity sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g== - -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - integrity sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw== - -public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" - integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - safe-buffer "^5.1.2" - -pump@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" - integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -pumpify@^1.3.3: - version "1.5.1" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" - integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== - dependencies: - duplexify "^3.6.0" - inherits "^2.0.3" - pump "^2.0.0" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw== - -punycode@^1.2.4: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ== - -punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -query-string@^4.1.0: - version "4.3.4" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb" - integrity sha512-O2XLNDBIg1DnTOa+2XrIwSiXEV8h2KImXUnjhhn2+UsvZ+Es2uyd5CCRTNQlDGbzUQOW3aYCBx9rVA6dzsiY7Q== - dependencies: - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" - -querystring-es3@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - integrity sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA== - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g== - -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readdirp@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" - integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== - dependencies: - graceful-fs "^4.1.11" - micromatch "^3.1.10" - readable-stream "^2.0.2" - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - integrity sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw== - -repeat-element@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9" - integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ== - -repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg== - -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== - -rimraf@^2.5.4, rimraf@^2.6.3: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -run-queue@^1.0.0, run-queue@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" - integrity sha512-ntymy489o0/QQplUDnpYAYUsO50K9SBrIVaKCWDOJzYJts0f9WH9RFJkyagebkw5+y1oi00R7ynNW/d12GBumg== - dependencies: - aproba "^1.1.1" - -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg== - dependencies: - ret "~0.1.10" - -safer-buffer@^2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -schema-utils@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" - integrity sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g== - dependencies: - ajv "^6.1.0" - ajv-errors "^1.0.0" - ajv-keywords "^3.1.0" - -schema-utils@^2.6.5, schema-utils@^2.7.0: - version "2.7.1" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.7.1.tgz#1ca4f32d1b24c590c203b8e7a50bf0ea4cd394d7" - integrity sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg== - dependencies: - "@types/json-schema" "^7.0.5" - ajv "^6.12.4" - ajv-keywords "^3.5.2" - -semver@^5.6.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@^6.0.0, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -serialize-javascript@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" - integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== - dependencies: - randombytes "^2.1.0" - -set-value@^2.0.0, set-value@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" - integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -setimmediate@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== - -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^3.1.0" - -sort-keys@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" - integrity sha512-vzn8aSqKgytVik0iwdBEi+zevbTYZogewTUM6dtpmGwEcdzbub/TX4bCzRhebDCRC3QzXgJsLRKB2V/Oof7HXg== - dependencies: - is-plain-obj "^1.0.0" - -source-list-map@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" - integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== - -source-map-resolve@^0.5.0: - version "0.5.3" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" - integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== - dependencies: - atob "^2.1.2" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-support@~0.5.12: - version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-url@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" - integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== - -source-map@^0.5.6: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== - -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - dependencies: - extend-shallow "^3.0.0" - -ssri@^6.0.1: - version "6.0.2" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5" - integrity sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q== - dependencies: - figgy-pudding "^3.5.1" - -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g== - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -stream-browserify@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" - integrity sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg== - dependencies: - inherits "~2.0.1" - readable-stream "^2.0.2" - -stream-each@^1.1.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" - integrity sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw== - dependencies: - end-of-stream "^1.1.0" - stream-shift "^1.0.0" - -stream-http@^2.7.2: - version "2.8.3" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" - integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw== - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.1" - readable-stream "^2.3.6" - to-arraybuffer "^1.0.0" - xtend "^4.0.0" - -stream-shift@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" - integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== - -strict-uri-encode@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" - integrity sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ== - -string_decoder@^1.0.0, string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -tapable@^1.0.0, tapable@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" - integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== - -terser-webpack-plugin@^1.4.3: - version "1.4.5" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz#a217aefaea330e734ffacb6120ec1fa312d6040b" - integrity sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw== - dependencies: - cacache "^12.0.2" - find-cache-dir "^2.1.0" - is-wsl "^1.1.0" - schema-utils "^1.0.0" - serialize-javascript "^4.0.0" - source-map "^0.6.1" - terser "^4.1.2" - webpack-sources "^1.4.0" - worker-farm "^1.7.0" - -terser@^4.1.2: - version "4.8.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.1.tgz#a00e5634562de2239fd404c649051bf6fc21144f" - integrity sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw== - dependencies: - commander "^2.20.0" - source-map "~0.6.1" - source-map-support "~0.5.12" - -through2@^2.0.0: - version "2.0.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" - integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== - dependencies: - readable-stream "~2.3.6" - xtend "~4.0.1" - -timers-browserify@^2.0.4: - version "2.0.12" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.12.tgz#44a45c11fbf407f34f97bccd1577c652361b00ee" - integrity sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ== - dependencies: - setimmediate "^1.0.4" - -to-arraybuffer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - integrity sha512-okFlQcoGTi4LQBG/PgSYblw9VOyptsz2KJZqc6qtgGdes8VktzUQkj4BI2blit072iS8VODNcMA+tvnS9dnuMA== - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== - -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - integrity sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg== - dependencies: - kind-of "^3.0.2" - -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - integrity sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg== - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -tty-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" - integrity sha512-JVa5ijo+j/sOoHGjw0sxw734b1LhBkQ3bvUGNdxnVXDCX81Yx7TFgnZygxrIIWn23hbfTaMYLwRmAxFyDuFmIw== - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== - -union-value@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" - integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^2.0.1" - -unique-filename@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" - integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== - dependencies: - unique-slug "^2.0.0" - -unique-slug@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" - integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== - dependencies: - imurmurhash "^0.1.4" - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ== - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -upath@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" - integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg== - -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ== - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -use@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - -util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== - -util@0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - integrity sha512-5KiHfsmkqacuKjkRkdV7SsfDJ2EGiPsK92s2MhNSY0craxjTdKTtqKsJaCWp4LW33ZZ0OPUv1WO/TFvNQRiQxQ== - dependencies: - inherits "2.0.1" - -util@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61" - integrity sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ== - dependencies: - inherits "2.0.3" - -vm-browserify@^1.0.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" - integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== - -watchpack-chokidar2@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz#38500072ee6ece66f3769936950ea1771be1c957" - integrity sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww== - dependencies: - chokidar "^2.1.8" - -watchpack@^1.7.4: - version "1.7.5" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.7.5.tgz#1267e6c55e0b9b5be44c2023aed5437a2c26c453" - integrity sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ== - dependencies: - graceful-fs "^4.1.2" - neo-async "^2.5.0" - optionalDependencies: - chokidar "^3.4.1" - watchpack-chokidar2 "^2.0.1" - -webpack-sources@^1.1.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1: - version "1.4.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" - integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== - dependencies: - source-list-map "^2.0.0" - source-map "~0.6.1" - -webpack@^4.38.0: - version "4.46.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.46.0.tgz#bf9b4404ea20a073605e0a011d188d77cb6ad542" - integrity sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-module-context" "1.9.0" - "@webassemblyjs/wasm-edit" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" - acorn "^6.4.1" - ajv "^6.10.2" - ajv-keywords "^3.4.1" - chrome-trace-event "^1.0.2" - enhanced-resolve "^4.5.0" - eslint-scope "^4.0.3" - json-parse-better-errors "^1.0.2" - loader-runner "^2.4.0" - loader-utils "^1.2.3" - memory-fs "^0.4.1" - micromatch "^3.1.10" - mkdirp "^0.5.3" - neo-async "^2.6.1" - node-libs-browser "^2.2.1" - schema-utils "^1.0.0" - tapable "^1.1.3" - terser-webpack-plugin "^1.4.3" - watchpack "^1.7.4" - webpack-sources "^1.4.1" - -worker-farm@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" - integrity sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw== - dependencies: - errno "~0.1.7" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -xtend@^4.0.0, xtend@~4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - -y18n@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" - integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== - -yallist@^3.0.2: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== From 08eaae72238186c34d3ed4e62173335661e5ffd6 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Wed, 28 Dec 2022 01:21:52 -0800 Subject: [PATCH 4/8] Reorgnaize C++ tests Summary: This does some preprataion for the Yoga CMake Build. The main change is removing the dedicated testutil top-level-directory and static library. This contains a method to count nodes using the event functions exposed to C++, along with a Java binding for the test utility (since the events don't have a Java binding). It is only used in a single place in a way that isn't very useful, so it simplifies things to treat is as source in the existing C++ test library. This also separates the hand-written and generated UTs, like we are doing in the JS directory in D42207782. Reviewed By: christophpurrer Differential Revision: D42247762 fbshipit-source-id: f8a270e99d0315ba7fc608f2471333e7a7be9d79 --- gentest/gentest.rb | 2 +- java/build.gradle | 1 - .../tests/com/facebook/yoga/YogaNodeTest.java | 2 - settings.gradle | 3 +- tests/EventsTest.cpp | 7 +-- tests/YGLayoutDiffingTest.cpp | 3 +- tests/YGPersistenceTest.cpp | 3 +- .../YGAbsolutePositionTest.cpp | 0 tests/{ => generated}/YGAlignContentTest.cpp | 0 tests/{ => generated}/YGAlignItemsTest.cpp | 0 tests/{ => generated}/YGAlignSelfTest.cpp | 0 tests/{ => generated}/YGAndroidNewsFeed.cpp | 0 tests/{ => generated}/YGBorderTest.cpp | 0 tests/{ => generated}/YGConfigTest.cpp | 0 tests/{ => generated}/YGDimensionTest.cpp | 0 tests/{ => generated}/YGDisplayTest.cpp | 0 tests/{ => generated}/YGFlexDirectionTest.cpp | 0 tests/{ => generated}/YGFlexTest.cpp | 0 tests/{ => generated}/YGFlexWrapTest.cpp | 0 tests/{ => generated}/YGGapTest.cpp | 0 .../{ => generated}/YGJustifyContentTest.cpp | 0 tests/{ => generated}/YGMarginTest.cpp | 0 .../{ => generated}/YGMinMaxDimensionTest.cpp | 0 tests/{ => generated}/YGPaddingTest.cpp | 0 tests/{ => generated}/YGPercentageTest.cpp | 0 tests/{ => generated}/YGRoundingTest.cpp | 0 tests/{ => generated}/YGSizeOverflowTest.cpp | 0 .../testutil.cpp => tests/util/TestUtil.cpp | 2 +- .../testutil.h => tests/util/TestUtil.h | 0 testutil/build.gradle | 39 ----------------- testutil/src/main/AndroidManifest.xml | 12 ------ testutil/src/main/cpp/CMakeLists.txt | 43 ------------------- testutil/src/main/cpp/jni/jni.cpp | 39 ----------------- .../main/java/com/facebook/yoga/TestUtil.java | 20 --------- 34 files changed, 11 insertions(+), 165 deletions(-) rename tests/{ => generated}/YGAbsolutePositionTest.cpp (100%) rename tests/{ => generated}/YGAlignContentTest.cpp (100%) rename tests/{ => generated}/YGAlignItemsTest.cpp (100%) rename tests/{ => generated}/YGAlignSelfTest.cpp (100%) rename tests/{ => generated}/YGAndroidNewsFeed.cpp (100%) rename tests/{ => generated}/YGBorderTest.cpp (100%) rename tests/{ => generated}/YGConfigTest.cpp (100%) rename tests/{ => generated}/YGDimensionTest.cpp (100%) rename tests/{ => generated}/YGDisplayTest.cpp (100%) rename tests/{ => generated}/YGFlexDirectionTest.cpp (100%) rename tests/{ => generated}/YGFlexTest.cpp (100%) rename tests/{ => generated}/YGFlexWrapTest.cpp (100%) rename tests/{ => generated}/YGGapTest.cpp (100%) rename tests/{ => generated}/YGJustifyContentTest.cpp (100%) rename tests/{ => generated}/YGMarginTest.cpp (100%) rename tests/{ => generated}/YGMinMaxDimensionTest.cpp (100%) rename tests/{ => generated}/YGPaddingTest.cpp (100%) rename tests/{ => generated}/YGPercentageTest.cpp (100%) rename tests/{ => generated}/YGRoundingTest.cpp (100%) rename tests/{ => generated}/YGSizeOverflowTest.cpp (100%) rename testutil/src/main/cpp/testutil/testutil.cpp => tests/util/TestUtil.cpp (97%) rename testutil/src/main/cpp/include/yoga/testutil/testutil.h => tests/util/TestUtil.h (100%) delete mode 100644 testutil/build.gradle delete mode 100644 testutil/src/main/AndroidManifest.xml delete mode 100644 testutil/src/main/cpp/CMakeLists.txt delete mode 100644 testutil/src/main/cpp/jni/jni.cpp delete mode 100644 testutil/src/main/java/com/facebook/yoga/TestUtil.java diff --git a/gentest/gentest.rb b/gentest/gentest.rb index 54481ac3..98b8d77a 100644 --- a/gentest/gentest.rb +++ b/gentest/gentest.rb @@ -42,7 +42,7 @@ Dir['fixtures/*.html'].each do |file| browser.goto('file://' + Dir.pwd + '/test.html') logs = browser.driver.logs.get(:browser) - f = File.open("../tests/#{name}.cpp", 'w') + f = File.open("../tests/generated/#{name}.cpp", 'w') f.write eval(logs[0].message.sub(/^[^"]*/, '')) f.close diff --git a/java/build.gradle b/java/build.gradle index 1672a9ea..0b990b8a 100644 --- a/java/build.gradle +++ b/java/build.gradle @@ -53,7 +53,6 @@ dependencies { implementation project(':yoga:proguard-annotations') implementation 'com.facebook.soloader:soloader:0.10.4' testImplementation 'junit:junit:4.12' - testImplementation project(':testutil') } apply plugin: 'com.vanniktech.maven.publish' diff --git a/java/tests/com/facebook/yoga/YogaNodeTest.java b/java/tests/com/facebook/yoga/YogaNodeTest.java index ffc6fa7f..12c6390a 100644 --- a/java/tests/com/facebook/yoga/YogaNodeTest.java +++ b/java/tests/com/facebook/yoga/YogaNodeTest.java @@ -32,9 +32,7 @@ public class YogaNodeTest { @Test public void testInit() { - TestUtil.startCountingNodes(); final YogaNode node = createNode(); - assertEquals(1, TestUtil.stopCountingNodes()); } @Test diff --git a/settings.gradle b/settings.gradle index a737016a..65579757 100644 --- a/settings.gradle +++ b/settings.gradle @@ -5,9 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -include ':yoga', ':yogacore', ':yoga-layout', ':yoga:proguard-annotations', ':libfb', ':testutil' +include ':yoga', ':yogacore', ':yoga-layout', ':yoga:proguard-annotations', ':libfb' project(':yoga').projectDir = file('java') project(':yoga:proguard-annotations').projectDir = file('java/proguard-annotations') project(':yoga-layout').projectDir = file('android') project(':libfb').projectDir = file('lib/fb') -project(':testutil').projectDir = file('testutil') diff --git a/tests/EventsTest.cpp b/tests/EventsTest.cpp index da7bc107..aa371041 100644 --- a/tests/EventsTest.cpp +++ b/tests/EventsTest.cpp @@ -6,16 +6,17 @@ */ #include -#include #include +#include +#include #include -#include #include #include #include #include -#include + +#include "util/TestUtil.h" namespace facebook { namespace yoga { diff --git a/tests/YGLayoutDiffingTest.cpp b/tests/YGLayoutDiffingTest.cpp index 6f767331..ca76b840 100644 --- a/tests/YGLayoutDiffingTest.cpp +++ b/tests/YGLayoutDiffingTest.cpp @@ -6,10 +6,11 @@ */ #include -#include #include #include +#include "util/TestUtil.h" + using facebook::yoga::test::TestUtil; TEST(YogaTest, assert_layout_trees_are_same) { diff --git a/tests/YGPersistenceTest.cpp b/tests/YGPersistenceTest.cpp index beb39e47..6bf1e7da 100644 --- a/tests/YGPersistenceTest.cpp +++ b/tests/YGPersistenceTest.cpp @@ -6,10 +6,11 @@ */ #include -#include #include #include +#include "util/TestUtil.h" + using facebook::yoga::test::TestUtil; TEST(YogaTest, cloning_shared_root) { diff --git a/tests/YGAbsolutePositionTest.cpp b/tests/generated/YGAbsolutePositionTest.cpp similarity index 100% rename from tests/YGAbsolutePositionTest.cpp rename to tests/generated/YGAbsolutePositionTest.cpp diff --git a/tests/YGAlignContentTest.cpp b/tests/generated/YGAlignContentTest.cpp similarity index 100% rename from tests/YGAlignContentTest.cpp rename to tests/generated/YGAlignContentTest.cpp diff --git a/tests/YGAlignItemsTest.cpp b/tests/generated/YGAlignItemsTest.cpp similarity index 100% rename from tests/YGAlignItemsTest.cpp rename to tests/generated/YGAlignItemsTest.cpp diff --git a/tests/YGAlignSelfTest.cpp b/tests/generated/YGAlignSelfTest.cpp similarity index 100% rename from tests/YGAlignSelfTest.cpp rename to tests/generated/YGAlignSelfTest.cpp diff --git a/tests/YGAndroidNewsFeed.cpp b/tests/generated/YGAndroidNewsFeed.cpp similarity index 100% rename from tests/YGAndroidNewsFeed.cpp rename to tests/generated/YGAndroidNewsFeed.cpp diff --git a/tests/YGBorderTest.cpp b/tests/generated/YGBorderTest.cpp similarity index 100% rename from tests/YGBorderTest.cpp rename to tests/generated/YGBorderTest.cpp diff --git a/tests/YGConfigTest.cpp b/tests/generated/YGConfigTest.cpp similarity index 100% rename from tests/YGConfigTest.cpp rename to tests/generated/YGConfigTest.cpp diff --git a/tests/YGDimensionTest.cpp b/tests/generated/YGDimensionTest.cpp similarity index 100% rename from tests/YGDimensionTest.cpp rename to tests/generated/YGDimensionTest.cpp diff --git a/tests/YGDisplayTest.cpp b/tests/generated/YGDisplayTest.cpp similarity index 100% rename from tests/YGDisplayTest.cpp rename to tests/generated/YGDisplayTest.cpp diff --git a/tests/YGFlexDirectionTest.cpp b/tests/generated/YGFlexDirectionTest.cpp similarity index 100% rename from tests/YGFlexDirectionTest.cpp rename to tests/generated/YGFlexDirectionTest.cpp diff --git a/tests/YGFlexTest.cpp b/tests/generated/YGFlexTest.cpp similarity index 100% rename from tests/YGFlexTest.cpp rename to tests/generated/YGFlexTest.cpp diff --git a/tests/YGFlexWrapTest.cpp b/tests/generated/YGFlexWrapTest.cpp similarity index 100% rename from tests/YGFlexWrapTest.cpp rename to tests/generated/YGFlexWrapTest.cpp diff --git a/tests/YGGapTest.cpp b/tests/generated/YGGapTest.cpp similarity index 100% rename from tests/YGGapTest.cpp rename to tests/generated/YGGapTest.cpp diff --git a/tests/YGJustifyContentTest.cpp b/tests/generated/YGJustifyContentTest.cpp similarity index 100% rename from tests/YGJustifyContentTest.cpp rename to tests/generated/YGJustifyContentTest.cpp diff --git a/tests/YGMarginTest.cpp b/tests/generated/YGMarginTest.cpp similarity index 100% rename from tests/YGMarginTest.cpp rename to tests/generated/YGMarginTest.cpp diff --git a/tests/YGMinMaxDimensionTest.cpp b/tests/generated/YGMinMaxDimensionTest.cpp similarity index 100% rename from tests/YGMinMaxDimensionTest.cpp rename to tests/generated/YGMinMaxDimensionTest.cpp diff --git a/tests/YGPaddingTest.cpp b/tests/generated/YGPaddingTest.cpp similarity index 100% rename from tests/YGPaddingTest.cpp rename to tests/generated/YGPaddingTest.cpp diff --git a/tests/YGPercentageTest.cpp b/tests/generated/YGPercentageTest.cpp similarity index 100% rename from tests/YGPercentageTest.cpp rename to tests/generated/YGPercentageTest.cpp diff --git a/tests/YGRoundingTest.cpp b/tests/generated/YGRoundingTest.cpp similarity index 100% rename from tests/YGRoundingTest.cpp rename to tests/generated/YGRoundingTest.cpp diff --git a/tests/YGSizeOverflowTest.cpp b/tests/generated/YGSizeOverflowTest.cpp similarity index 100% rename from tests/YGSizeOverflowTest.cpp rename to tests/generated/YGSizeOverflowTest.cpp diff --git a/testutil/src/main/cpp/testutil/testutil.cpp b/tests/util/TestUtil.cpp similarity index 97% rename from testutil/src/main/cpp/testutil/testutil.cpp rename to tests/util/TestUtil.cpp index adb88a0d..3b54f07a 100644 --- a/testutil/src/main/cpp/testutil/testutil.cpp +++ b/tests/util/TestUtil.cpp @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -#include +#include "TestUtil.h" #include #include diff --git a/testutil/src/main/cpp/include/yoga/testutil/testutil.h b/tests/util/TestUtil.h similarity index 100% rename from testutil/src/main/cpp/include/yoga/testutil/testutil.h rename to tests/util/TestUtil.h diff --git a/testutil/build.gradle b/testutil/build.gradle deleted file mode 100644 index 40d2ee14..00000000 --- a/testutil/build.gradle +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - -apply plugin: 'com.android.library' - -android { - compileSdkVersion rootProject.compileSdkVersion - buildToolsVersion rootProject.buildToolsVersion - - defaultConfig { - minSdkVersion rootProject.minSdkVersion - targetSdkVersion rootProject.targetSdkVersion - - ndk { - abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' - } - - externalNativeBuild { - cmake { - arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_static' - } - } - } - - externalNativeBuild { - cmake { - path 'src/main/cpp/CMakeLists.txt' - } - } - - dependencies { - implementation 'com.facebook.soloader:soloader:0.10.4' - } -} diff --git a/testutil/src/main/AndroidManifest.xml b/testutil/src/main/AndroidManifest.xml deleted file mode 100644 index 7d6f3e5c..00000000 --- a/testutil/src/main/AndroidManifest.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/testutil/src/main/cpp/CMakeLists.txt b/testutil/src/main/cpp/CMakeLists.txt deleted file mode 100644 index 37fe6062..00000000 --- a/testutil/src/main/cpp/CMakeLists.txt +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -cmake_minimum_required(VERSION 3.4.1) - -set(CMAKE_VERBOSE_MAKEFILE on) - -set(libfb_DIR ${CMAKE_SOURCE_DIR}/../../../../lib/fb/src/main/cpp) -set(yogacore_DIR ${CMAKE_SOURCE_DIR}/../../../..) -set(build_DIR ${CMAKE_SOURCE_DIR}/build) - -set(libfb_build_DIR ${build_DIR}/libfb/${ANDROID_ABI}) -set(yogacore_build_DIR ${build_DIR}/yogacore/${ANDROID_ABI}) - -file(MAKE_DIRECTORY ${build_DIR}) - -add_subdirectory(${libfb_DIR} ${libfb_build_DIR}) -add_subdirectory(${yogacore_DIR} ${yogacore_build_DIR}) - -add_compile_options( - -fno-omit-frame-pointer - -fexceptions - -Wall - -std=c++11 - -DDISABLE_CPUCAP - -DDISABLE_XPLAT) - -file(GLOB testutil_SRC - jni/*.cpp - testutil/*.cpp) - -add_library(testutil SHARED - ${testutil_SRC}) - -target_include_directories(testutil PRIVATE - include) -target_include_directories(testutil PRIVATE - ${libfb_DIR}/include - ${yogacore_DIR}) - -target_link_libraries(testutil yogacore fb) diff --git a/testutil/src/main/cpp/jni/jni.cpp b/testutil/src/main/cpp/jni/jni.cpp deleted file mode 100644 index ab9b6721..00000000 --- a/testutil/src/main/cpp/jni/jni.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#include -#include - -using namespace facebook; - -namespace { - -void startCountingNodes(jni::alias_ref) { - yoga::test::TestUtil::startCountingNodes(); -} - -jint nodeCount(jni::alias_ref) { - return yoga::test::TestUtil::nodeCount(); -} - -jint stopCountingNodes(jni::alias_ref) { - return yoga::test::TestUtil::stopCountingNodes(); -} - -} // namespace - -jint JNI_OnLoad(JavaVM* vm, void*) { - return jni::initialize(vm, [] { - jni::registerNatives( - "com/facebook/yoga/TestUtil", - { - makeNativeMethod("startCountingNodes", startCountingNodes), - makeNativeMethod("nodeCount", nodeCount), - makeNativeMethod("stopCountingNodes", stopCountingNodes), - }); - }); -} diff --git a/testutil/src/main/java/com/facebook/yoga/TestUtil.java b/testutil/src/main/java/com/facebook/yoga/TestUtil.java deleted file mode 100644 index e972c292..00000000 --- a/testutil/src/main/java/com/facebook/yoga/TestUtil.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -package com.facebook.yoga; - -import com.facebook.soloader.SoLoader; - -class TestUtil { - static { - SoLoader.loadLibrary("yoga_testutil_jni"); - } - - static native void startCountingNodes(); - static native int nodeCount(); - static native int stopCountingNodes(); -} From 8035456330ab81b845f682bb3cbe79a7e4d1f83d Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Wed, 28 Dec 2022 01:21:52 -0800 Subject: [PATCH 5/8] Remove fbjni remnants Summary: D42207782 moved Yoga to use vanilla JNI instead of fbjni, but there are some remnants left. One is a source copy being used to build lib/fb. The others are some targets/definitions left in Buck logic. This removes those, to prevent confusion. Reviewed By: christophpurrer Differential Revision: D42247773 fbshipit-source-id: ef9d831957948a183c39aac782ce869011e74fea --- lib/fb/BUCK | 47 -- lib/fb/build.gradle | 40 -- lib/fb/src/main/AndroidManifest.xml | 12 - lib/fb/src/main/cpp/CMakeLists.txt | 32 - lib/fb/src/main/cpp/Doxyfile | 15 - lib/fb/src/main/cpp/include/fb/Doxyfile | 18 - .../src/main/cpp/include/fbjni/ByteBuffer.h | 42 -- lib/fb/src/main/cpp/include/fbjni/Context.h | 32 - lib/fb/src/main/cpp/include/fbjni/File.h | 27 - lib/fb/src/main/cpp/include/fbjni/JThread.h | 56 -- .../main/cpp/include/fbjni/NativeRunnable.h | 42 -- .../cpp/include/fbjni/ReadableByteChannel.h | 22 - .../src/main/cpp/include/fbjni/detail/Boxed.h | 74 -- .../main/cpp/include/fbjni/detail/Common.h | 90 --- .../include/fbjni/detail/CoreClasses-inl.h | 677 ------------------ .../cpp/include/fbjni/detail/CoreClasses.h | 625 ---------------- .../cpp/include/fbjni/detail/Environment.h | 128 ---- .../cpp/include/fbjni/detail/Exceptions.h | 130 ---- .../main/cpp/include/fbjni/detail/Hybrid.h | 285 -------- .../cpp/include/fbjni/detail/Iterator-inl.h | 196 ----- .../main/cpp/include/fbjni/detail/Iterator.h | 143 ---- .../cpp/include/fbjni/detail/JWeakReference.h | 39 - .../src/main/cpp/include/fbjni/detail/Log.h | 67 -- .../cpp/include/fbjni/detail/Meta-forward.h | 33 - .../main/cpp/include/fbjni/detail/Meta-inl.h | 405 ----------- .../src/main/cpp/include/fbjni/detail/Meta.h | 337 --------- .../cpp/include/fbjni/detail/MetaConvert.h | 159 ---- .../fbjni/detail/ReferenceAllocators-inl.h | 120 ---- .../fbjni/detail/ReferenceAllocators.h | 54 -- .../include/fbjni/detail/References-forward.h | 64 -- .../cpp/include/fbjni/detail/References-inl.h | 535 -------------- .../cpp/include/fbjni/detail/References.h | 603 ---------------- .../include/fbjni/detail/Registration-inl.h | 166 ----- .../cpp/include/fbjni/detail/Registration.h | 167 ----- .../cpp/include/fbjni/detail/TypeTraits.h | 176 ----- .../src/main/cpp/include/fbjni/detail/utf8.h | 81 --- lib/fb/src/main/cpp/include/fbjni/fbjni.h | 22 - lib/fb/src/main/cpp/include/lyra/lyra.h | 195 ----- .../main/cpp/include/lyra/lyra_exceptions.h | 84 --- lib/fb/src/main/cpp/jni/ByteBuffer.cpp | 75 -- lib/fb/src/main/cpp/jni/OnLoad.cpp | 18 - .../src/main/cpp/jni/ReadableByteChannel.cpp | 21 - .../src/main/cpp/jni/detail/Environment.cpp | 291 -------- lib/fb/src/main/cpp/jni/detail/Exceptions.cpp | 390 ---------- lib/fb/src/main/cpp/jni/detail/Hybrid.cpp | 32 - lib/fb/src/main/cpp/jni/detail/References.cpp | 79 -- lib/fb/src/main/cpp/jni/detail/utf8.cpp | 278 ------- lib/fb/src/main/cpp/jni/fbjni.cpp | 233 ------ lib/fb/src/main/cpp/lyra/cxa_throw.cpp | 106 --- lib/fb/src/main/cpp/lyra/lyra.cpp | 172 ----- lib/fb/src/main/cpp/lyra/lyra_breakpad.cpp | 22 - lib/fb/src/main/cpp/lyra/lyra_exceptions.cpp | 88 --- lib/fb/src/main/java/com/facebook/jni/BUCK | 20 - .../java/com/facebook/jni/CppException.java | 17 - .../facebook/jni/CppSystemErrorException.java | 24 - .../com/facebook/jni/DestructorThread.java | 138 ---- .../com/facebook/jni/HybridClassBase.java | 12 - .../java/com/facebook/jni/HybridData.java | 77 -- .../java/com/facebook/jni/IteratorHelper.java | 49 -- .../com/facebook/jni/MapIteratorHelper.java | 48 -- .../java/com/facebook/jni/NativeRunnable.java | 22 - .../com/facebook/jni/ThreadScopeSupport.java | 26 - .../com/facebook/jni/UnknownCppException.java | 22 - .../facebook/jni/annotations/DoNotStrip.java | 23 - .../src/main/java/com/facebook/jni/fbjni.pro | 18 - settings.gradle | 3 +- 66 files changed, 1 insertion(+), 8343 deletions(-) delete mode 100644 lib/fb/BUCK delete mode 100644 lib/fb/build.gradle delete mode 100644 lib/fb/src/main/AndroidManifest.xml delete mode 100644 lib/fb/src/main/cpp/CMakeLists.txt delete mode 100644 lib/fb/src/main/cpp/Doxyfile delete mode 100644 lib/fb/src/main/cpp/include/fb/Doxyfile delete mode 100644 lib/fb/src/main/cpp/include/fbjni/ByteBuffer.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/Context.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/File.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/JThread.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/NativeRunnable.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/ReadableByteChannel.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/Boxed.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/Common.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/CoreClasses-inl.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/CoreClasses.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/Environment.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/Exceptions.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/Hybrid.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/Iterator-inl.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/Iterator.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/JWeakReference.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/Log.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/Meta-forward.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/Meta-inl.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/Meta.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/MetaConvert.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/ReferenceAllocators-inl.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/ReferenceAllocators.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/References-forward.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/References-inl.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/References.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/Registration-inl.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/Registration.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/TypeTraits.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/detail/utf8.h delete mode 100644 lib/fb/src/main/cpp/include/fbjni/fbjni.h delete mode 100644 lib/fb/src/main/cpp/include/lyra/lyra.h delete mode 100644 lib/fb/src/main/cpp/include/lyra/lyra_exceptions.h delete mode 100644 lib/fb/src/main/cpp/jni/ByteBuffer.cpp delete mode 100644 lib/fb/src/main/cpp/jni/OnLoad.cpp delete mode 100644 lib/fb/src/main/cpp/jni/ReadableByteChannel.cpp delete mode 100644 lib/fb/src/main/cpp/jni/detail/Environment.cpp delete mode 100644 lib/fb/src/main/cpp/jni/detail/Exceptions.cpp delete mode 100644 lib/fb/src/main/cpp/jni/detail/Hybrid.cpp delete mode 100644 lib/fb/src/main/cpp/jni/detail/References.cpp delete mode 100644 lib/fb/src/main/cpp/jni/detail/utf8.cpp delete mode 100644 lib/fb/src/main/cpp/jni/fbjni.cpp delete mode 100644 lib/fb/src/main/cpp/lyra/cxa_throw.cpp delete mode 100644 lib/fb/src/main/cpp/lyra/lyra.cpp delete mode 100644 lib/fb/src/main/cpp/lyra/lyra_breakpad.cpp delete mode 100644 lib/fb/src/main/cpp/lyra/lyra_exceptions.cpp delete mode 100644 lib/fb/src/main/java/com/facebook/jni/BUCK delete mode 100644 lib/fb/src/main/java/com/facebook/jni/CppException.java delete mode 100644 lib/fb/src/main/java/com/facebook/jni/CppSystemErrorException.java delete mode 100644 lib/fb/src/main/java/com/facebook/jni/DestructorThread.java delete mode 100644 lib/fb/src/main/java/com/facebook/jni/HybridClassBase.java delete mode 100644 lib/fb/src/main/java/com/facebook/jni/HybridData.java delete mode 100644 lib/fb/src/main/java/com/facebook/jni/IteratorHelper.java delete mode 100644 lib/fb/src/main/java/com/facebook/jni/MapIteratorHelper.java delete mode 100644 lib/fb/src/main/java/com/facebook/jni/NativeRunnable.java delete mode 100644 lib/fb/src/main/java/com/facebook/jni/ThreadScopeSupport.java delete mode 100644 lib/fb/src/main/java/com/facebook/jni/UnknownCppException.java delete mode 100644 lib/fb/src/main/java/com/facebook/jni/annotations/DoNotStrip.java delete mode 100644 lib/fb/src/main/java/com/facebook/jni/fbjni.pro diff --git a/lib/fb/BUCK b/lib/fb/BUCK deleted file mode 100644 index f283dca1..00000000 --- a/lib/fb/BUCK +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. -load("@fbsource//tools/build_defs:platform_defs.bzl", "ANDROID", "APPLE", "CXX", "FBCODE", "WINDOWS") -load("//tools/build_defs/oss:yoga_defs.bzl", "JNI_TARGET", "YOGA_ROOTS", "subdir_glob", "yoga_cxx_library", "yoga_prebuilt_cxx_library") - -yoga_prebuilt_cxx_library( - name = "ndklog", - exported_platform_linker_flags = [ - ( - "^android.*", - ["-llog"], - ), - ], - header_only = True, - platforms = (ANDROID, APPLE, CXX, FBCODE, WINDOWS), - visibility = YOGA_ROOTS, -) - -yoga_cxx_library( - name = "fbjni", - srcs = glob(["src/main/cpp/**/*.cpp"]), - header_namespace = "", - exported_headers = subdir_glob([("src/main/cpp/include", "**/*.h")]), - compiler_flags = [ - "-DLOG_TAG=\"libfb\"", - "-DDISABLE_CPUCAP", - "-DDISABLE_XPLAT", - "-DHAVE_POSIX_CLOCKS", - "-fno-omit-frame-pointer", - "-fexceptions", - "-frtti", - "-Wall", - "-Werror", - "-Wno-unused-parameter", - "-Wno-unused-variable", - "-std=c++11", - ], - platforms = (CXX, ANDROID), - soname = "libfbjni.$(ext)", - visibility = ["PUBLIC"], - deps = [ - ":ndklog", - JNI_TARGET, - ], -) diff --git a/lib/fb/build.gradle b/lib/fb/build.gradle deleted file mode 100644 index 8194a2b6..00000000 --- a/lib/fb/build.gradle +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -apply plugin: 'com.android.library' - -android { - compileSdkVersion rootProject.compileSdkVersion - buildToolsVersion rootProject.buildToolsVersion - - defaultConfig { - minSdkVersion rootProject.minSdkVersion - targetSdkVersion rootProject.targetSdkVersion - - ndk { - abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' - } - - externalNativeBuild { - cmake { - arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_static' - } - } - } - - externalNativeBuild { - cmake { - path 'src/main/cpp/CMakeLists.txt' - } - } - - dependencies { - implementation 'com.facebook.soloader:soloader:0.10.4' - implementation 'com.google.code.findbugs:jsr305:3.0.2' - implementation project(':yoga:proguard-annotations') - } -} diff --git a/lib/fb/src/main/AndroidManifest.xml b/lib/fb/src/main/AndroidManifest.xml deleted file mode 100644 index 6d0fd184..00000000 --- a/lib/fb/src/main/AndroidManifest.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/lib/fb/src/main/cpp/CMakeLists.txt b/lib/fb/src/main/cpp/CMakeLists.txt deleted file mode 100644 index 8a6a045c..00000000 --- a/lib/fb/src/main/cpp/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright (c) Facebook, Inc. and its affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. -# - -cmake_minimum_required(VERSION 3.4.1) - -set(CMAKE_VERBOSE_MAKEFILE on) - -add_compile_options( - -fno-omit-frame-pointer - -fexceptions - -Wall - -std=c++11 - -DDISABLE_CPUCAP - -DDISABLE_XPLAT) - -file(GLOB fb_SRC - *.cpp - jni/*.cpp - jni/detail/*.cpp - lyra/*.cpp) - -add_library(fb SHARED - ${fb_SRC}) - -target_include_directories(fb PRIVATE - include) - -target_link_libraries(fb android log) diff --git a/lib/fb/src/main/cpp/Doxyfile b/lib/fb/src/main/cpp/Doxyfile deleted file mode 100644 index b44118dd..00000000 --- a/lib/fb/src/main/cpp/Doxyfile +++ /dev/null @@ -1,15 +0,0 @@ -PROJECT_NAME = "Facebook Android Support" -JAVADOC_AUTOBRIEF = YES -EXTRACT_ALL = YES -RECURSIVE = YES -EXCLUDE = tests -EXCLUDE_PATTERNS = *.cpp -GENERATE_HTML = YES -GENERATE_LATEX = NO -ENABLE_PREPROCESSING = YES -HIDE_UNDOC_MEMBERS = YES -HIDE_SCOPE_NAMES = YES -HIDE_FRIEND_COMPOUNDS = YES -HIDE_UNDOC_CLASSES = YES -SHOW_INCLUDE_FILES = NO -#ENABLED_SECTIONS = INTERNAL diff --git a/lib/fb/src/main/cpp/include/fb/Doxyfile b/lib/fb/src/main/cpp/include/fb/Doxyfile deleted file mode 100644 index 8b4df6a7..00000000 --- a/lib/fb/src/main/cpp/include/fb/Doxyfile +++ /dev/null @@ -1,18 +0,0 @@ -PROJECT_NAME = "Facebook JNI" -PROJECT_BRIEF = "Helper library to provide safe and convenient access to JNI with very low overhead" -JAVADOC_AUTOBRIEF = YES -EXTRACT_ALL = YES -RECURSIVE = YES -EXCLUDE = tests Asserts.h Countable.h GlobalReference.h LocalReference.h LocalString.h Registration.h WeakReference.h jni_helpers.h Environment.h -EXCLUDE_PATTERNS = *-inl.h *.cpp -GENERATE_HTML = YES -GENERATE_LATEX = NO -ENABLE_PREPROCESSING = YES -HIDE_UNDOC_MEMBERS = YES -HIDE_SCOPE_NAMES = YES -HIDE_FRIEND_COMPOUNDS = YES -HIDE_UNDOC_CLASSES = YES -SHOW_INCLUDE_FILES = NO -PREDEFINED = LOG_TAG=fbjni -EXAMPLE_PATH = samples -#ENABLED_SECTIONS = INTERNAL diff --git a/lib/fb/src/main/cpp/include/fbjni/ByteBuffer.h b/lib/fb/src/main/cpp/include/fbjni/ByteBuffer.h deleted file mode 100644 index 55223e46..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/ByteBuffer.h +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -#include - -namespace facebook { -namespace jni { - -class JBuffer : public JavaClass { -public: - static constexpr const char* kJavaDescriptor = "Ljava/nio/Buffer;"; - - void rewind() const; - bool isDirect() const; - void* getDirectAddress() const; - size_t getDirectCapacity() const; -}; - -// JNI's NIO support has some awkward preconditions and error reporting. This -// class provides much more user-friendly access. -class JByteBuffer : public JavaClass { - public: - static constexpr const char* kJavaDescriptor = "Ljava/nio/ByteBuffer;"; - - static local_ref wrapBytes(uint8_t* data, size_t size); - static local_ref allocateDirect(jint size); - - uint8_t* getDirectBytes() const { - return static_cast(getDirectAddress()); - } - - size_t getDirectSize() const { - return getDirectCapacity(); - } -}; - -}} diff --git a/lib/fb/src/main/cpp/include/fbjni/Context.h b/lib/fb/src/main/cpp/include/fbjni/Context.h deleted file mode 100644 index 331de691..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/Context.h +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -#include -#include - -namespace facebook { -namespace jni { - -class AContext : public JavaClass { - public: - static constexpr const char* kJavaDescriptor = "Landroid/content/Context;"; - - // Define a method that calls into the represented Java class - local_ref getCacheDir() { - static const auto method = getClass()->getMethod("getCacheDir"); - return method(self()); - } - - local_ref getFilesDir() { - static const auto method = getClass()->getMethod("getFilesDir"); - return method(self()); - } -}; - -} -} diff --git a/lib/fb/src/main/cpp/include/fbjni/File.h b/lib/fb/src/main/cpp/include/fbjni/File.h deleted file mode 100644 index 852202ba..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/File.h +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -#include - -namespace facebook { -namespace jni { - -class JFile : public JavaClass { - public: - static constexpr const char* kJavaDescriptor = "Ljava/io/File;"; - - // Define a method that calls into the represented Java class - std::string getAbsolutePath() { - static const auto method = getClass()->getMethod("getAbsolutePath"); - return method(self())->toStdString(); - } - -}; - -} -} diff --git a/lib/fb/src/main/cpp/include/fbjni/JThread.h b/lib/fb/src/main/cpp/include/fbjni/JThread.h deleted file mode 100644 index a343e022..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/JThread.h +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -#include -#include - -namespace facebook { -namespace jni { - -class JThread : public JavaClass { - public: - static constexpr const char* kJavaDescriptor = "Ljava/lang/Thread;"; - - void start() { - static const auto method = javaClassStatic()->getMethod("start"); - method(self()); - } - - void join() { - static const auto method = javaClassStatic()->getMethod("join"); - method(self()); - } - - static local_ref create(std::function&& runnable) { - auto jrunnable = JNativeRunnable::newObjectCxxArgs(std::move(runnable)); - return newInstance(static_ref_cast(jrunnable)); - } - - static local_ref create(std::function&& runnable, std::string&& name) { - auto jrunnable = JNativeRunnable::newObjectCxxArgs(std::move(runnable)); - return newInstance(static_ref_cast(jrunnable), make_jstring(std::move(name))); - } - - static local_ref getCurrent() { - static const auto method = javaClassStatic()->getStaticMethod()>("currentThread"); - return method(javaClassStatic()); - } - - int getPriority() { - static const auto method = getClass()->getMethod("getPriority"); - return method(self()); - } - - void setPriority(int priority) { - static const auto method = getClass()->getMethod("setPriority"); - method(self(), priority); - } -}; - -} -} diff --git a/lib/fb/src/main/cpp/include/fbjni/NativeRunnable.h b/lib/fb/src/main/cpp/include/fbjni/NativeRunnable.h deleted file mode 100644 index 7bb915f4..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/NativeRunnable.h +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -#include - -#include - -namespace facebook { -namespace jni { - -struct JRunnable : public JavaClass { - static auto constexpr kJavaDescriptor = "Ljava/lang/Runnable;"; -}; - -struct JNativeRunnable : public HybridClass { - public: - static auto constexpr kJavaDescriptor = "Lcom/facebook/jni/NativeRunnable;"; - - JNativeRunnable(std::function&& runnable) : runnable_(std::move(runnable)) {} - - static void OnLoad() { - registerHybrid({ - makeNativeMethod("run", JNativeRunnable::run), - }); - } - - void run() { - runnable_(); - } - - private: - std::function runnable_; -}; - - -} // namespace jni -} // namespace facebook diff --git a/lib/fb/src/main/cpp/include/fbjni/ReadableByteChannel.h b/lib/fb/src/main/cpp/include/fbjni/ReadableByteChannel.h deleted file mode 100644 index f524d26c..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/ReadableByteChannel.h +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -#include -#include - -namespace facebook { -namespace jni { - -class JReadableByteChannel : public JavaClass { -public: - static constexpr const char* kJavaDescriptor = "Ljava/nio/channels/ReadableByteChannel;"; - - int read(alias_ref dest) const; -}; - -}} diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/Boxed.h b/lib/fb/src/main/cpp/include/fbjni/detail/Boxed.h deleted file mode 100644 index e231b958..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/Boxed.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -#include "CoreClasses.h" - -namespace facebook { -namespace jni { - -namespace detail { -template -struct JPrimitive : JavaClass { - using typename JavaClass::javaobject; - using JavaClass::javaClassStatic; - static local_ref valueOf(jprim val) { - static const auto cls = javaClassStatic(); - static const auto method = - cls->template getStaticMethod("valueOf"); - return method(cls, val); - } - jprim value() const { - static const auto method = - javaClassStatic()->template getMethod(T::kValueMethod); - return method(this->self()); - } -}; - -} // namespace detail - - -#define DEFINE_BOXED_PRIMITIVE(LITTLE, BIG) \ - struct J ## BIG : detail::JPrimitive { \ - static auto constexpr kJavaDescriptor = "Ljava/lang/" #BIG ";"; \ - static auto constexpr kValueMethod = #LITTLE "Value"; \ - j ## LITTLE LITTLE ## Value() const { \ - return value(); \ - } \ - }; \ - inline local_ref autobox(j ## LITTLE val) { \ - return J ## BIG::valueOf(val); \ - } - -DEFINE_BOXED_PRIMITIVE(boolean, Boolean) -DEFINE_BOXED_PRIMITIVE(byte, Byte) -DEFINE_BOXED_PRIMITIVE(char, Character) -DEFINE_BOXED_PRIMITIVE(short, Short) -DEFINE_BOXED_PRIMITIVE(int, Integer) -DEFINE_BOXED_PRIMITIVE(long, Long) -DEFINE_BOXED_PRIMITIVE(float, Float) -DEFINE_BOXED_PRIMITIVE(double, Double) - -#undef DEFINE_BOXED_PRIMITIVE - -template -inline typename std::enable_if< - (std::is_same::value || std::is_same::value) && !std::is_same::value, - local_ref ->::type autobox(T val) { - return JLong::valueOf(val); -} - -struct JVoid : public jni::JavaClass { - static auto constexpr kJavaDescriptor = "Ljava/lang/Void;"; -}; - -inline local_ref autobox(alias_ref val) { - return make_local(val); -} - -}} diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/Common.h b/lib/fb/src/main/cpp/include/fbjni/detail/Common.h deleted file mode 100644 index 573fcc75..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/Common.h +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -/** @file Common.h - * - * Defining the stuff that don't deserve headers of their own... - */ - -#pragma once - -#include - -#include - -#ifdef FBJNI_DEBUG_REFS -# ifdef __ANDROID__ -# include -# else -# include -# endif -#endif - -// If a pending JNI Java exception is found, wraps it in a JniException object and throws it as -// a C++ exception. -#define FACEBOOK_JNI_THROW_PENDING_EXCEPTION() \ - ::facebook::jni::throwPendingJniExceptionAsCppException() - -// If the condition is true, throws a JniException object, which wraps the pending JNI Java -// exception if any. If no pending exception is found, throws a JniException object that wraps a -// RuntimeException throwable.  -#define FACEBOOK_JNI_THROW_EXCEPTION_IF(CONDITION) \ - ::facebook::jni::throwCppExceptionIf(CONDITION) - -/// @cond INTERNAL - -namespace facebook { -namespace jni { - -void throwPendingJniExceptionAsCppException(); -void throwCppExceptionIf(bool condition); - -[[noreturn]] void throwNewJavaException(jthrowable); -[[noreturn]] void throwNewJavaException(const char* throwableName, const char* msg); -template -[[noreturn]] void throwNewJavaException(const char* throwableName, const char* fmt, Args... args); - - -/** - * This needs to be called at library load time, typically in your JNI_OnLoad method. - * - * The intended use is to return the result of initialize() directly - * from JNI_OnLoad and to do nothing else there. Library specific - * initialization code should go in the function passed to initialize - * (which can be, and probably should be, a C++ lambda). This approach - * provides correct error handling and translation errors during - * initialization into Java exceptions when appropriate. - * - * Failure to call this will cause your code to crash in a remarkably - * unhelpful way (typically a segfault) while trying to handle an exception - * which occurs later. - */ -jint initialize(JavaVM*, std::function&&) noexcept; - -namespace internal { - -// Define to get extremely verbose logging of references and to enable reference stats -#ifdef FBJNI_DEBUG_REFS -template -inline void dbglog(const char* msg, Args... args) { -# ifdef __ANDROID__ - __android_log_print(ANDROID_LOG_VERBOSE, "fbjni_dbg", msg, args...); -# else - std::fprintf(stderr, msg, args...); -# endif -} - -#else - -template -inline void dbglog(const char*, Args...) { -} - -#endif - -}}} - -/// @endcond diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/CoreClasses-inl.h b/lib/fb/src/main/cpp/include/fbjni/detail/CoreClasses-inl.h deleted file mode 100644 index d8214fde..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/CoreClasses-inl.h +++ /dev/null @@ -1,677 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -#include -#include -#include - -#include "Common.h" -#include "Exceptions.h" -#include "Meta.h" -#include "MetaConvert.h" - -namespace facebook { -namespace jni { - -// jobject ///////////////////////////////////////////////////////////////////////////////////////// - -inline bool isSameObject(alias_ref lhs, alias_ref rhs) noexcept { - return Environment::current()->IsSameObject(lhs.get(), rhs.get()) != JNI_FALSE; -} - -inline local_ref JObject::getClass() const noexcept { - return adopt_local(Environment::current()->GetObjectClass(self())); -} - -inline bool JObject::isInstanceOf(alias_ref cls) const noexcept { - return Environment::current()->IsInstanceOf(self(), cls.get()) != JNI_FALSE; -} - -template -inline T JObject::getFieldValue(JField field) const noexcept { - return field.get(self()); -} - -template -inline local_ref JObject::getFieldValue(JField field) const noexcept { - return adopt_local(field.get(self())); -} - -template -inline void JObject::setFieldValue(JField field, T value) noexcept { - field.set(self(), value); -} - -template -inline void JObject::setFieldValue(JField field, alias_ref value) noexcept { - setFieldValue(field, value.get()); -} - -inline std::string JObject::toString() const { - static const auto method = findClassLocal("java/lang/Object")->getMethod("toString"); - - return method(self())->toStdString(); -} - - -// Class is here instead of CoreClasses.h because we need -// alias_ref to be complete. -class MonitorLock { - public: - inline MonitorLock() noexcept; - inline MonitorLock(alias_ref object) noexcept; - inline ~MonitorLock() noexcept; - - inline MonitorLock(MonitorLock&& other) noexcept; - inline MonitorLock& operator=(MonitorLock&& other) noexcept; - - inline MonitorLock(const MonitorLock&) = delete; - inline MonitorLock& operator=(const MonitorLock&) = delete; - - private: - inline void reset() noexcept; - alias_ref owned_; -}; - -MonitorLock::MonitorLock() noexcept : owned_(nullptr) {} - -MonitorLock::MonitorLock(alias_ref object) noexcept - : owned_(object) { - Environment::current()->MonitorEnter(object.get()); -} - -void MonitorLock::reset() noexcept { - if (owned_) { - Environment::current()->MonitorExit(owned_.get()); - if (Environment::current()->ExceptionCheck()) { - abort(); // Lock mismatch - } - owned_ = nullptr; - } -} - -MonitorLock::~MonitorLock() noexcept { - reset(); -} - -MonitorLock::MonitorLock(MonitorLock&& other) noexcept - : owned_(other.owned_) -{ - other.owned_ = nullptr; -} - -MonitorLock& MonitorLock::operator=(MonitorLock&& other) noexcept { - reset(); - owned_ = other.owned_; - other.owned_ = nullptr; - return *this; -} - -inline MonitorLock JObject::lock() const noexcept { - return MonitorLock(this_); -} - -inline jobject JObject::self() const noexcept { - return this_; -} - -inline void swap(JObject& a, JObject& b) noexcept { - using std::swap; - swap(a.this_, b.this_); -} - -// JavaClass /////////////////////////////////////////////////////////////////////////////////////// - -namespace detail { -template -static local_ref newInstance(Args... args) { - static auto cls = JC::javaClassStatic(); - static const auto constructor = cls->template getConstructor(); - return cls->newObject(constructor, args...); -} -} - - -template -auto JavaClass::self() const noexcept -> javaobject { - return static_cast(JObject::self()); -} - -// jclass ////////////////////////////////////////////////////////////////////////////////////////// - -namespace detail { - -// This is not a real type. It is used so people won't accidentally -// use a void* to initialize a NativeMethod. -struct NativeMethodWrapper; - -} - -struct NativeMethod { - const char* name; - std::string descriptor; - detail::NativeMethodWrapper* wrapper; -}; - -inline local_ref JClass::getSuperclass() const noexcept { - return adopt_local(Environment::current()->GetSuperclass(self())); -} - -inline void JClass::registerNatives(std::initializer_list methods) { - const auto env = Environment::current(); - - JNINativeMethod jnimethods[methods.size()]; - size_t i = 0; - for (auto it = methods.begin(); it < methods.end(); ++it, ++i) { - // The JNI struct members are unnecessarily non-const. - jnimethods[i].name = const_cast(it->name); - jnimethods[i].signature = const_cast(it->descriptor.c_str()); - jnimethods[i].fnPtr = reinterpret_cast(it->wrapper); - } - - auto result = env->RegisterNatives(self(), jnimethods, methods.size()); - FACEBOOK_JNI_THROW_EXCEPTION_IF(result != JNI_OK); -} - -inline bool JClass::isAssignableFrom(alias_ref other) const noexcept { - const auto env = Environment::current(); - // Ths method has behavior compatible with the - // java.lang.Class#isAssignableFrom method. The order of the - // arguments to the JNI IsAssignableFrom C function is "opposite" - // from what some might expect, which makes this code look a little - // odd, but it is correct. - const auto result = env->IsAssignableFrom(other.get(), self()); - return result; -} - -template -inline JConstructor JClass::getConstructor() const { - return getConstructor(jmethod_traits_from_cxx::constructor_descriptor().c_str()); -} - -template -inline JConstructor JClass::getConstructor(const char* descriptor) const { - constexpr auto constructor_method_name = ""; - return getMethod(constructor_method_name, descriptor); -} - -template -inline JMethod JClass::getMethod(const char* name) const { - return getMethod(name, jmethod_traits_from_cxx::descriptor().c_str()); -} - -template -inline JMethod JClass::getMethod( - const char* name, - const char* descriptor) const { - const auto env = Environment::current(); - const auto method = env->GetMethodID(self(), name, descriptor); - FACEBOOK_JNI_THROW_EXCEPTION_IF(!method); - return JMethod{method}; -} - -template -inline JStaticMethod JClass::getStaticMethod(const char* name) const { - return getStaticMethod(name, jmethod_traits_from_cxx::descriptor().c_str()); -} - -template -inline JStaticMethod JClass::getStaticMethod( - const char* name, - const char* descriptor) const { - const auto env = Environment::current(); - const auto method = env->GetStaticMethodID(self(), name, descriptor); - FACEBOOK_JNI_THROW_EXCEPTION_IF(!method); - return JStaticMethod{method}; -} - -template -inline JNonvirtualMethod JClass::getNonvirtualMethod(const char* name) const { - return getNonvirtualMethod(name, jmethod_traits_from_cxx::descriptor().c_str()); -} - -template -inline JNonvirtualMethod JClass::getNonvirtualMethod( - const char* name, - const char* descriptor) const { - const auto env = Environment::current(); - const auto method = env->GetMethodID(self(), name, descriptor); - FACEBOOK_JNI_THROW_EXCEPTION_IF(!method); - return JNonvirtualMethod{method}; -} - -template -inline JField(), T>> -JClass::getField(const char* name) const { - return getField(name, jtype_traits::descriptor().c_str()); -} - -template -inline JField(), T>> JClass::getField( - const char* name, - const char* descriptor) const { - const auto env = Environment::current(); - auto field = env->GetFieldID(self(), name, descriptor); - FACEBOOK_JNI_THROW_EXCEPTION_IF(!field); - return JField{field}; -} - -template -inline JStaticField(), T>> JClass::getStaticField( - const char* name) const { - return getStaticField(name, jtype_traits::descriptor().c_str()); -} - -template -inline JStaticField(), T>> JClass::getStaticField( - const char* name, - const char* descriptor) const { - const auto env = Environment::current(); - auto field = env->GetStaticFieldID(self(), name, descriptor); - FACEBOOK_JNI_THROW_EXCEPTION_IF(!field); - return JStaticField{field}; -} - -template -inline T JClass::getStaticFieldValue(JStaticField field) const noexcept { - return field.get(self()); -} - -template -inline local_ref JClass::getStaticFieldValue(JStaticField field) noexcept { - return adopt_local(field.get(self())); -} - -template -inline void JClass::setStaticFieldValue(JStaticField field, T value) noexcept { - field.set(self(), value); -} - -template -inline void JClass::setStaticFieldValue(JStaticField field, alias_ref value) noexcept { - setStaticFieldValue(field, value.get()); -} - -template -inline local_ref JClass::newObject( - JConstructor constructor, - Args... args) const { - const auto env = Environment::current(); - auto object = env->NewObject(self(), constructor.getId(), - detail::callToJni( - detail::Convert::type>::toCall(args))...); - FACEBOOK_JNI_THROW_EXCEPTION_IF(!object); - return adopt_local(static_cast(object)); -} - -inline jclass JClass::self() const noexcept { - return static_cast(JObject::self()); -} - -inline void registerNatives(const char* name, std::initializer_list methods) { - findClassLocal(name)->registerNatives(methods); -} - - -// jstring ///////////////////////////////////////////////////////////////////////////////////////// - -inline local_ref make_jstring(const std::string& modifiedUtf8) { - return make_jstring(modifiedUtf8.c_str()); -} - -namespace detail { -// convert to std::string from jstring -template <> -struct Convert { - typedef jstring jniType; - static std::string fromJni(jniType t) { - return wrap_alias(t)->toStdString(); - } - static jniType toJniRet(const std::string& t) { - return make_jstring(t).release(); - } - static local_ref toCall(const std::string& t) { - return make_jstring(t); - } -}; - -// convert return from const char* -template <> -struct Convert { - typedef jstring jniType; - // no automatic synthesis of const char*. (It can't be freed.) - static jniType toJniRet(const char* t) { - return make_jstring(t).release(); - } - static local_ref toCall(const char* t) { - return make_jstring(t); - } -}; -} - -// jtypeArray ////////////////////////////////////////////////////////////////////////////////////// - -namespace detail { -inline size_t JArray::size() const noexcept { - const auto env = Environment::current(); - return env->GetArrayLength(self()); -} -} - -namespace detail { -template -inline ElementProxy::ElementProxy( - Target* target, - size_t idx) - : target_{target}, idx_{idx} {} - -template -inline ElementProxy& ElementProxy::operator=(const T& o) { - target_->setElement(idx_, o); - return *this; -} - -template -inline ElementProxy& ElementProxy::operator=(alias_ref& o) { - target_->setElement(idx_, o.get()); - return *this; -} - -template -inline ElementProxy& ElementProxy::operator=(alias_ref&& o) { - target_->setElement(idx_, o.get()); - return *this; -} - -template -inline ElementProxy& ElementProxy::operator=(const ElementProxy& o) { - auto src = o.target_->getElement(o.idx_); - target_->setElement(idx_, src.get()); - return *this; -} - -template -inline ElementProxy::ElementProxy::operator const local_ref () const { - return target_->getElement(idx_); -} - -template -inline ElementProxy::ElementProxy::operator local_ref () { - return target_->getElement(idx_); -} -} - -template -std::string JArrayClass::get_instantiated_java_descriptor() { - return "[" + jtype_traits::descriptor(); -}; - -template -std::string JArrayClass::get_instantiated_base_name() { - return get_instantiated_java_descriptor(); -}; - -template -auto JArrayClass::newArray(size_t size) -> local_ref { - static const auto elementClass = findClassStatic(jtype_traits::base_name().c_str()); - const auto env = Environment::current(); - auto rawArray = env->NewObjectArray(size, elementClass.get(), nullptr); - FACEBOOK_JNI_THROW_EXCEPTION_IF(!rawArray); - return adopt_local(static_cast(rawArray)); -} - -template -inline void JArrayClass::setElement(size_t idx, const T& value) { - const auto env = Environment::current(); - env->SetObjectArrayElement(this->self(), idx, value); -} - -template -inline local_ref JArrayClass::getElement(size_t idx) { - const auto env = Environment::current(); - auto rawElement = env->GetObjectArrayElement(this->self(), idx); - return adopt_local(static_cast(rawElement)); -} - -template -inline detail::ElementProxy> JArrayClass::operator[](size_t index) { - return detail::ElementProxy>(this, index); -} - -template -local_ref::javaobject> adopt_local_array(jobjectArray ref) { - return adopt_local(static_cast::javaobject>(ref)); -} - -// jarray ///////////////////////////////////////////////////////////////////////////////////////// - -template -auto JPrimitiveArray::getRegion(jsize start, jsize length) - -> std::unique_ptr { - auto buf = std::unique_ptr{new T[length]}; - getRegion(start, length, buf.get()); - return buf; -} - -template -std::string JPrimitiveArray::get_instantiated_java_descriptor() { - return jtype_traits::descriptor(); -} -template -std::string JPrimitiveArray::get_instantiated_base_name() { - return JPrimitiveArray::get_instantiated_java_descriptor(); -} - -template -auto JPrimitiveArray::pin() -> PinnedPrimitiveArray> { - return PinnedPrimitiveArray>{this->self(), 0, 0}; -} - -template -auto JPrimitiveArray::pinRegion(jsize start, jsize length) - -> PinnedPrimitiveArray> { - return PinnedPrimitiveArray>{this->self(), start, length}; -} - -template -auto JPrimitiveArray::pinCritical() - -> PinnedPrimitiveArray> { - return PinnedPrimitiveArray>{this->self(), 0, 0}; -} - -template -class PinnedArrayAlloc { - public: - static void allocate( - alias_ref::array_type> array, - jsize start, - jsize length, - T** elements, - size_t* size, - jboolean* isCopy) { - (void) start; - (void) length; - *elements = array->getElements(isCopy); - *size = array->size(); - } - static void release( - alias_ref::array_type> array, - T* elements, - jint start, - jint size, - jint mode) { - (void) start; - (void) size; - array->releaseElements(elements, mode); - } -}; - -template -class PinnedCriticalAlloc { - public: - static void allocate( - alias_ref::array_type> array, - jsize start, - jsize length, - T** elements, - size_t* size, - jboolean* isCopy) { - (void)start; - (void)length; - const auto env = Environment::current(); - *elements = static_cast(env->GetPrimitiveArrayCritical(array.get(), isCopy)); - FACEBOOK_JNI_THROW_EXCEPTION_IF(!elements); - *size = array->size(); - } - static void release( - alias_ref::array_type> array, - T* elements, - jint start, - jint size, - jint mode) { - (void)start; - (void)size; - const auto env = Environment::current(); - env->ReleasePrimitiveArrayCritical(array.get(), elements, mode); - } -}; - -template -class PinnedRegionAlloc { - public: - static void allocate( - alias_ref::array_type> array, - jsize start, - jsize length, - T** elements, - size_t* size, - jboolean* isCopy) { - auto buf = array->getRegion(start, length); - FACEBOOK_JNI_THROW_EXCEPTION_IF(!buf); - *elements = buf.release(); - *size = length; - *isCopy = true; - } - static void release( - alias_ref::array_type> array, - T* elements, - jint start, - jint size, - jint mode) { - std::unique_ptr holder; - if (mode == 0 || mode == JNI_ABORT) { - holder.reset(elements); - } - if (mode == 0 || mode == JNI_COMMIT) { - array->setRegion(start, size, elements); - } - } -}; - -// PinnedPrimitiveArray /////////////////////////////////////////////////////////////////////////// - -template -PinnedPrimitiveArray::PinnedPrimitiveArray(PinnedPrimitiveArray&& o) { - *this = std::move(o); -} - -template -PinnedPrimitiveArray& -PinnedPrimitiveArray::operator=(PinnedPrimitiveArray&& o) { - if (array_) { - release(); - } - array_ = std::move(o.array_); - elements_ = o.elements_; - isCopy_ = o.isCopy_; - size_ = o.size_; - start_ = o.start_; - o.clear(); - return *this; -} - -template -T* PinnedPrimitiveArray::get() { - return elements_; -} - -template -inline void PinnedPrimitiveArray::release() { - releaseImpl(0); - clear(); -} - -template -inline void PinnedPrimitiveArray::commit() { - releaseImpl(JNI_COMMIT); -} - -template -inline void PinnedPrimitiveArray::abort() { - releaseImpl(JNI_ABORT); - clear(); -} - -template -inline void PinnedPrimitiveArray::releaseImpl(jint mode) { - FACEBOOK_JNI_THROW_EXCEPTION_IF(array_.get() == nullptr); - Alloc::release(array_, elements_, start_, size_, mode); -} - -template -inline void PinnedPrimitiveArray::clear() noexcept { - array_ = nullptr; - elements_ = nullptr; - isCopy_ = false; - start_ = 0; - size_ = 0; -} - -template -inline T& PinnedPrimitiveArray::operator[](size_t index) { - FACEBOOK_JNI_THROW_EXCEPTION_IF(elements_ == nullptr); - return elements_[index]; -} - -template -inline bool PinnedPrimitiveArray::isCopy() const noexcept { - return isCopy_ == JNI_TRUE; -} - -template -inline size_t PinnedPrimitiveArray::size() const noexcept { - return size_; -} - -template -inline PinnedPrimitiveArray::~PinnedPrimitiveArray() noexcept { - if (elements_) { - release(); - } -} - -template -inline PinnedPrimitiveArray::PinnedPrimitiveArray(alias_ref::array_type> array, jint start, jint length) { - array_ = array; - start_ = start; - Alloc::allocate(array, start, length, &elements_, &size_, &isCopy_); -} - -template -inline alias_ref JavaClass::javaClassStatic() { - static auto cls = findClassStatic(jtype_traits::base_name().c_str()); - return cls; -} - -template -inline local_ref JavaClass::javaClassLocal() { - std::string className(jtype_traits::base_name().c_str()); - return findClassLocal(className.c_str()); -} - -}} diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/CoreClasses.h b/lib/fb/src/main/cpp/include/fbjni/detail/CoreClasses.h deleted file mode 100644 index 53b4118b..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/CoreClasses.h +++ /dev/null @@ -1,625 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -/** @file CoreClasses.h - * - * In CoreClasses.h wrappers for the core classes (jobject, jclass, and jstring) is defined - * to provide access to corresponding JNI functions + some conveniance. - */ - -#include "References-forward.h" -#include "Meta-forward.h" -#include "TypeTraits.h" - -#include - -#include - -namespace facebook { -namespace jni { - -class JClass; -class JObject; - -namespace detail { - -/// Lookup a class by name. This should only be used internally. -jclass findClass(JNIEnv* env, const char* name); - -} - -/// Lookup a class by name. Note this functions returns an alias_ref that -/// points to a leaked global reference. This is appropriate for classes -/// that are never unloaded (which is any class in an Android app and most -/// Java programs). -/// -/// The most common use case for this is storing the result -/// in a "static auto" variable, or a static global. -/// -/// @return Returns a leaked global reference to the class -alias_ref findClassStatic(const char* name); - -/// Lookup a class by name. Note this functions returns a local reference, -/// which means that it must not be stored in a static variable. -/// -/// The most common use case for this is one-time initialization -/// (like caching method ids). -/// -/// @return Returns a global reference to the class -local_ref findClassLocal(const char* name); - -/// Check to see if two references refer to the same object. Comparison with nullptr -/// returns true if and only if compared to another nullptr. A weak reference that -/// refers to a reclaimed object count as nullptr. -bool isSameObject(alias_ref lhs, alias_ref rhs) noexcept; - -// Together, these classes allow convenient use of any class with the fbjni -// helpers. To use: -// -// struct MyClass : public JavaClass { -// constexpr static auto kJavaDescriptor = "Lcom/example/package/MyClass;"; -// }; -// -// Then, an alias_ref will be backed by an instance of -// MyClass. JavaClass provides a convenient way to add functionality to these -// smart references. -// -// For example: -// -// struct MyClass : public JavaClass { -// constexpr static auto kJavaDescriptor = "Lcom/example/package/MyClass;"; -// -// void foo() { -// static const auto method = javaClassStatic()->getMethod("foo"); -// method(self()); -// } -// -// static local_ref create(int i) { -// return newInstance(i); -// } -// }; -// -// auto obj = MyClass::create(10); -// obj->foo(); -// -// While users of a JavaClass-type can lookup methods and fields through the -// underlying JClass, those calls can only be checked at runtime. It is recommended -// that the JavaClass-type instead explicitly expose it's methods as in the example -// above. - -namespace detail { -template -static local_ref newInstance(Args... args); -} - -class MonitorLock; - -class JObject : detail::JObjectBase { -public: - static constexpr auto kJavaDescriptor = "Ljava/lang/Object;"; - - static constexpr const char* get_instantiated_java_descriptor() { return nullptr; } - static constexpr const char* get_instantiated_base_name() { return nullptr; } - - /// Get a @ref local_ref of the object's class - local_ref getClass() const noexcept; - - /// Checks if the object is an instance of a class - bool isInstanceOf(alias_ref cls) const noexcept; - - /// Get the primitive value of a field - template - T getFieldValue(JField field) const noexcept; - - /// Get and wrap the value of a field in a @ref local_ref - template - local_ref getFieldValue(JField field) const noexcept; - - /// Set the value of field. Any Java type is accepted. - template - void setFieldValue(JField field, T value) noexcept; - template(), T>::type> - void setFieldValue(JField field, alias_ref value) noexcept; - - /// Convenience method to create a std::string representing the object - std::string toString() const; - - // Take this object's monitor lock - MonitorLock lock() const noexcept; - - typedef _jobject _javaobject; - typedef _javaobject* javaobject; - -protected: - jobject self() const noexcept; -private: - friend void swap(JObject& a, JObject& b) noexcept; - template - friend struct detail::ReprAccess; - template - friend class JavaClass; - - template - friend class JObjectWrapper; -}; - -// This is only to maintain backwards compatibility with things that are -// already providing a specialization of JObjectWrapper. Any such instances -// should be updated to use a JavaClass. -template<> -class JObjectWrapper : public JObject { -}; - - -namespace detail { -template -struct JTypeFor { - static_assert( - std::is_base_of< - std::remove_pointer::type, - typename std::remove_pointer::type - >::value, ""); - using _javaobject = typename std::remove_pointer::type; - using javaobject = JType; -}; - -template -struct JTypeFor { - // JNI pattern for jobject assignable pointer - struct _javaobject : Base::_javaobject { - // This allows us to map back to the defining type (in ReprType, for - // example). - typedef T JniRefRepr; - }; - using javaobject = _javaobject*; -}; -} - -// JavaClass provides a method to inform fbjni about user-defined Java types. -// Given a class: -// struct Foo : JavaClass { -// static constexpr auto kJavaDescriptor = "Lcom/example/package/Foo;"; -// }; -// fbjni can determine the java type/method signatures for Foo::javaobject and -// smart refs (like alias_ref) will hold an instance of Foo -// and provide access to it through the -> and * operators. -// -// The "Base" template argument can be used to specify the JavaClass superclass -// of this type (for instance, JString's Base is JObject). -// -// The "JType" template argument is used to provide a jni type (like jstring, -// jthrowable) to be used as javaobject. This should only be necessary for -// built-in jni types and not user-defined ones. -template -class JavaClass : public Base { - using JObjType = typename detail::JTypeFor; -public: - using _javaobject = typename JObjType::_javaobject; - using javaobject = typename JObjType::javaobject; - - using JavaBase = JavaClass; - - static alias_ref javaClassStatic(); - static local_ref javaClassLocal(); -protected: - /// Allocates a new object and invokes the specified constructor - /// Like JClass's getConstructor, this function can only check at runtime if - /// the class actually has a constructor that accepts the corresponding types. - /// While a JavaClass-type can expose this function directly, it is recommended - /// to instead to use this to explicitly only expose those constructors that - /// the Java class actually has (i.e. with static create() functions). - template - static local_ref newInstance(Args... args) { - return detail::newInstance(args...); - } - - javaobject self() const noexcept; -}; - -/// Wrapper to provide functionality to jclass references -struct NativeMethod; - -class JClass : public JavaClass { - public: - /// Java type descriptor - static constexpr const char* kJavaDescriptor = "Ljava/lang/Class;"; - - /// Get a @local_ref to the super class of this class - local_ref getSuperclass() const noexcept; - - /// Register native methods for the class. Usage looks like this: - /// - /// classRef->registerNatives({ - /// makeNativeMethod("nativeMethodWithAutomaticDescriptor", - /// methodWithAutomaticDescriptor), - /// makeNativeMethod("nativeMethodWithExplicitDescriptor", - /// "(Lcom/facebook/example/MyClass;)V", - /// methodWithExplicitDescriptor), - /// makeCriticalNativeMethod_DO_NOT_USE_OR_YOU_WILL_BE_FIRED("criticalNativeMethodWithAutomaticDescriptor", - /// criticalNativeMethodWithAutomaticDescriptor), - /// makeCriticalNativeMethod_DO_NOT_USE_OR_YOU_WILL_BE_FIRED("criticalNativeMethodWithExplicitDescriptor", - /// "(IIF)Z", - /// criticalNativeMethodWithExplicitDescriptor), - /// }); - /// - /// By default, C++ exceptions raised will be converted to Java exceptions. - /// To avoid this and get the "standard" JNI behavior of a crash when a C++ - /// exception is crashing out of the JNI method, declare the method noexcept. - /// This does NOT apply to critical native methods, where exceptions causes - /// a crash. - void registerNatives(std::initializer_list methods); - - /// Check to see if the class is assignable from another class - /// @pre cls != nullptr - bool isAssignableFrom(alias_ref cls) const noexcept; - - /// Convenience method to lookup the constructor with descriptor as specified by the - /// type arguments - template - JConstructor getConstructor() const; - - /// Convenience method to lookup the constructor with specified descriptor - template - JConstructor getConstructor(const char* descriptor) const; - - /// Look up the method with given name and descriptor as specified with the type arguments - template - JMethod getMethod(const char* name) const; - - /// Look up the method with given name and descriptor - template - JMethod getMethod(const char* name, const char* descriptor) const; - - /// Lookup the field with the given name and deduced descriptor - template - JField(), T>> getField(const char* name) const; - - /// Lookup the field with the given name and descriptor - template - JField(), T>> getField(const char* name, const char* descriptor) const; - - /// Lookup the static field with the given name and deduced descriptor - template - JStaticField(), T>> getStaticField(const char* name) const; - - /// Lookup the static field with the given name and descriptor - template - JStaticField(), T>> getStaticField( - const char* name, - const char* descriptor) const; - - /// Get the primitive value of a static field - template - T getStaticFieldValue(JStaticField field) const noexcept; - - /// Get and wrap the value of a field in a @ref local_ref - template - local_ref getStaticFieldValue(JStaticField field) noexcept; - - /// Set the value of field. Any Java type is accepted. - template - void setStaticFieldValue(JStaticField field, T value) noexcept; - template(), T>::type> - void setStaticFieldValue(JStaticField field, alias_ref value) noexcept; - - /// Allocates a new object and invokes the specified constructor - template - local_ref newObject(JConstructor constructor, Args... args) const; - - /// Look up the static method with given name and descriptor as specified with the type arguments - template - JStaticMethod getStaticMethod(const char* name) const; - - /// Look up the static method with given name and descriptor - template - JStaticMethod getStaticMethod(const char* name, const char* descriptor) const; - - /// Look up the non virtual method with given name and descriptor as specified with the - /// type arguments - template - JNonvirtualMethod getNonvirtualMethod(const char* name) const; - - /// Look up the non virtual method with given name and descriptor - template - JNonvirtualMethod getNonvirtualMethod(const char* name, const char* descriptor) const; - -private: - jclass self() const noexcept; -}; - -// Convenience method to register methods on a class without holding -// onto the class object. -void registerNatives(const char* name, std::initializer_list methods); - -/// Wrapper to provide functionality to jstring references -class JString : public JavaClass { - public: - /// Java type descriptor - static constexpr const char* kJavaDescriptor = "Ljava/lang/String;"; - - /// Convenience method to convert a jstring object to a std::string - std::string toStdString() const; - - /// Convenience method to convert a jstring object to a std::u16string - std::u16string toU16String() const; -}; - -/// Convenience functions to convert a const char*, std::string, or std::u16string -/// into a @ref local_ref to a jstring. -local_ref make_jstring(const char* modifiedUtf8); -local_ref make_jstring(const std::string& modifiedUtf8); -local_ref make_jstring(const std::u16string& utf16); - -namespace detail { -template -class ElementProxy { - private: - Target* target_; - size_t idx_; - - public: - using T = typename Target::javaentry; - ElementProxy(Target* target, size_t idx); - - ElementProxy& operator=(const T& o); - - ElementProxy& operator=(alias_ref& o); - - ElementProxy& operator=(alias_ref&& o); - - ElementProxy& operator=(const ElementProxy& o); - - operator const local_ref () const; - - operator local_ref (); -}; -} - -namespace detail { -class JArray : public JavaClass { - public: - // This cannot be used in a scope that derives a descriptor (like in a method - // signature). Use a more derived type instead (like JArrayInt or - // JArrayClass). - static constexpr const char* kJavaDescriptor = nullptr; - size_t size() const noexcept; -}; - -// This is used so that the JArrayClass javaobject extends jni's -// jobjectArray. This class should not be used directly. A general Object[] -// should use JArrayClass. -class JTypeArray : public JavaClass { - // This cannot be used in a scope that derives a descriptor (like in a method - // signature). - static constexpr const char* kJavaDescriptor = nullptr; -}; -} - -template -class JArrayClass : public JavaClass, detail::JTypeArray> { - public: - static_assert(is_plain_jni_reference(), ""); - // javaentry is the jni type of an entry in the array (i.e. jint). - using javaentry = T; - // javaobject is the jni type of the array. - using javaobject = typename JavaClass, detail::JTypeArray>::javaobject; - static constexpr const char* kJavaDescriptor = nullptr; - static std::string get_instantiated_java_descriptor(); - static std::string get_instantiated_base_name(); - - /// Allocate a new array from Java heap, for passing as a JNI parameter or return value. - /// NOTE: if using as a return value, you want to call release() instead of get() on the - /// smart pointer. - static local_ref newArray(size_t count); - - /// Assign an object to the array. - /// Typically you will use the shorthand (*ref)[idx]=value; - void setElement(size_t idx, const T& value); - - /// Read an object from the array. - /// Typically you will use the shorthand - /// T value = (*ref)[idx]; - /// If you use auto, you'll get an ElementProxy, which may need to be cast. - local_ref getElement(size_t idx); - - /// EXPERIMENTAL SUBSCRIPT SUPPORT - /// This implementation of [] returns a proxy object which then has a bunch of specializations - /// (adopt_local free function, operator= and casting overloads on the ElementProxy) that can - /// make code look like it is dealing with a T rather than an obvious proxy. In particular, the - /// proxy in this iteration does not read a value and therefore does not create a LocalRef - /// until one of these other operators is used. There are certainly holes that you may find - /// by using idioms that haven't been tried yet. Consider yourself warned. On the other hand, - /// it does make for some idiomatic assignment code; see TestBuildStringArray in fbjni_tests - /// for some examples. - detail::ElementProxy operator[](size_t idx); -}; - -template -using jtypeArray = typename JArrayClass::javaobject; - -template -local_ref::javaobject> adopt_local_array(jobjectArray ref); - -template -local_ref adopt_local(detail::ElementProxy elementProxy) { - return static_cast>(elementProxy); -} - -template -class PinnedPrimitiveArray; - -template class PinnedArrayAlloc; -template class PinnedRegionAlloc; -template class PinnedCriticalAlloc; - -/// Wrapper to provide functionality to jarray references. -/// This is an empty holder by itself. Construct a PinnedPrimitiveArray to actually interact with -/// the elements of the array. -template -class JPrimitiveArray : - public JavaClass, detail::JArray, JArrayType> { - static_assert(is_jni_primitive_array(), ""); - public: - static constexpr const char* kJavaDescriptor = nullptr; - static std::string get_instantiated_java_descriptor(); - static std::string get_instantiated_base_name(); - - using T = typename jtype_traits::entry_type; - - static local_ref newArray(size_t count); - - void getRegion(jsize start, jsize length, T* buf); - std::unique_ptr getRegion(jsize start, jsize length); - void setRegion(jsize start, jsize length, const T* buf); - - /// Returns a view of the underlying array. This will either be a "pinned" - /// version of the array (in which case changes to one immediately affect the - /// other) or a copy of the array (in which cases changes to the view will take - /// affect when destroyed or on calls to release()/commit()). - PinnedPrimitiveArray> pin(); - - /// Returns a view of part of the underlying array. A pinned region is always - /// backed by a copy of the region. - PinnedPrimitiveArray> pinRegion(jsize start, jsize length); - - /// Returns a view of the underlying array like pin(). However, while the pin - /// is held, the code is considered within a "critical region". In a critical - /// region, native code must not call JNI functions or make any calls that may - /// block on other Java threads. These restrictions make it more likely that - /// the view will be "pinned" rather than copied (for example, the VM may - /// suspend garbage collection within a critical region). - PinnedPrimitiveArray> pinCritical(); - -private: - friend class PinnedArrayAlloc; - T* getElements(jboolean* isCopy); - void releaseElements(T* elements, jint mode); -}; - -local_ref make_boolean_array(jsize size); -local_ref make_byte_array(jsize size); -local_ref make_char_array(jsize size); -local_ref make_short_array(jsize size); -local_ref make_int_array(jsize size); -local_ref make_long_array(jsize size); -local_ref make_float_array(jsize size); -local_ref make_double_array(jsize size); - -using JArrayBoolean = JPrimitiveArray; -using JArrayByte = JPrimitiveArray; -using JArrayChar = JPrimitiveArray; -using JArrayShort = JPrimitiveArray; -using JArrayInt = JPrimitiveArray; -using JArrayLong = JPrimitiveArray; -using JArrayFloat = JPrimitiveArray; -using JArrayDouble = JPrimitiveArray; - -/// RAII class for pinned primitive arrays -/// This currently only supports read/write access to existing java arrays. You can't create a -/// primitive array this way yet. This class also pins the entire array into memory during the -/// lifetime of the PinnedPrimitiveArray. If you need to unpin the array manually, call the -/// release() or abort() functions. During a long-running block of code, you -/// should unpin the array as soon as you're done with it, to avoid holding up -/// the Java garbage collector. -template -class PinnedPrimitiveArray { - public: - static_assert(is_jni_primitive::value, - "PinnedPrimitiveArray requires primitive jni type."); - - using ArrayType = typename jtype_traits::array_type; - - PinnedPrimitiveArray(PinnedPrimitiveArray&&); - PinnedPrimitiveArray(const PinnedPrimitiveArray&) = delete; - ~PinnedPrimitiveArray() noexcept; - - PinnedPrimitiveArray& operator=(PinnedPrimitiveArray&&); - PinnedPrimitiveArray& operator=(const PinnedPrimitiveArray&) = delete; - - T* get(); - void release(); - /// Unpins the array. If the array is a copy, pending changes are discarded. - void abort(); - /// If the array is a copy, copies pending changes to the underlying java array. - void commit(); - - bool isCopy() const noexcept; - - const T& operator[](size_t index) const; - T& operator[](size_t index); - size_t size() const noexcept; - - private: - alias_ref array_; - size_t start_; - T* elements_; - jboolean isCopy_; - size_t size_; - - void allocate(alias_ref, jint start, jint length); - void releaseImpl(jint mode); - void clear() noexcept; - - PinnedPrimitiveArray(alias_ref, jint start, jint length); - - friend class JPrimitiveArray::array_type>; -}; - -struct JStackTraceElement : JavaClass { - static auto constexpr kJavaDescriptor = "Ljava/lang/StackTraceElement;"; - - static local_ref create(const std::string& declaringClass, const std::string& methodName, const std::string& file, int line); - - std::string getClassName() const; - std::string getMethodName() const; - std::string getFileName() const; - int getLineNumber() const; -}; - -/// Wrapper to provide functionality to jthrowable references -class JThrowable : public JavaClass { - public: - static constexpr const char* kJavaDescriptor = "Ljava/lang/Throwable;"; - - using JStackTrace = JArrayClass; - - local_ref initCause(alias_ref cause); - local_ref getStackTrace(); - void setStackTrace(alias_ref>); -}; - -#pragma push_macro("PlainJniRefMap") -#undef PlainJniRefMap -#define PlainJniRefMap(rtype, jtype) \ -namespace detail { \ -template<> \ -struct RefReprType { \ - using type = rtype; \ -}; \ -} - -PlainJniRefMap(JArrayBoolean, jbooleanArray); -PlainJniRefMap(JArrayByte, jbyteArray); -PlainJniRefMap(JArrayChar, jcharArray); -PlainJniRefMap(JArrayShort, jshortArray); -PlainJniRefMap(JArrayInt, jintArray); -PlainJniRefMap(JArrayLong, jlongArray); -PlainJniRefMap(JArrayFloat, jfloatArray); -PlainJniRefMap(JArrayDouble, jdoubleArray); -PlainJniRefMap(JObject, jobject); -PlainJniRefMap(JClass, jclass); -PlainJniRefMap(JString, jstring); -PlainJniRefMap(JThrowable, jthrowable); - -#pragma pop_macro("PlainJniRefMap") - -}} - -#include "CoreClasses-inl.h" diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/Environment.h b/lib/fb/src/main/cpp/include/fbjni/detail/Environment.h deleted file mode 100644 index 5453e54b..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/Environment.h +++ /dev/null @@ -1,128 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once -#include -#include -#include - - -namespace facebook { -namespace jni { - -// Keeps a thread-local reference to the current thread's JNIEnv. -struct Environment { - // Throws a std::runtime_error if this thread isn't attached to the JVM - // TODO(T6594868) Benchmark against raw JNI access - static JNIEnv* current(); - static void initialize(JavaVM* vm); - - // There are subtle issues with calling the next functions directly. It is - // much better to always use a ThreadScope to manage attaching/detaching for - // you. - static JNIEnv* ensureCurrentThreadIsAttached(); -}; - -namespace detail { - -// This will return null the thread isn't attached to the VM, or if -// fbjni has never been initialized with a VM at all. You probably -// shouldn't be using this. -JNIEnv* currentOrNull(); - -/** - * If there's thread-local data, it's a pointer to one of these. The - * instance is a member of JniEnvCacher or ThreadScope, and lives on - * the stack. - */ -struct TLData { - // This is modified only by JniEnvCacher, and is guaranteed to be - // valid if set, and refer to an env which originated from a JNI - // call into C++. - JNIEnv* env; - // This is modified only by ThreadScope, and is set only if an - // instance of ThreadScope which attached is on the stack. - bool attached; -}; - -/** - * RAII object which manages a cached JNIEnv* value. A Value is only - * cached if it is guaranteed safe, which means when C++ is called - * from a registered fbjni function. - */ -class JniEnvCacher { -public: - JniEnvCacher(JNIEnv* env); - JniEnvCacher(JniEnvCacher&) = delete; - JniEnvCacher(JniEnvCacher&&) = default; - JniEnvCacher& operator=(JniEnvCacher&) = delete; - JniEnvCacher& operator=(JniEnvCacher&&) = delete; - ~JniEnvCacher(); - -private: - // If this flag is set, then, this object needs to clear the cache. - bool thisCached_; - - // The thread local pointer may point here. - detail::TLData data_; -}; - -} - -/** - * RAII Object that attaches a thread to the JVM. Failing to detach from a thread before it - * exits will cause a crash, as will calling Detach an extra time, and this guard class helps - * keep that straight. In addition, it remembers whether it performed the attach or not, so it - * is safe to nest it with itself or with non-fbjni code that manages the attachment correctly. - * - * Potential concerns: - * - Attaching to the JVM is fast (~100us on MotoG), but ideally you would attach while the - * app is not busy. - * - Having a thread detach at arbitrary points is not safe in Dalvik; you need to be sure that - * there is no Java code on the current stack or you run the risk of a crash like: - * ERROR: detaching thread with interp frames (count=18) - * (More detail at https://groups.google.com/forum/#!topic/android-ndk/2H8z5grNqjo) - * ThreadScope won't do a detach if the thread was already attached before the guard is - * instantiated, but there's probably some usage that could trip this up. - * - Newly attached C++ threads only get the bootstrap class loader -- i.e. java language - * classes, not any of our application's classes. This will be different behavior than threads - * that were initiated on the Java side. A workaround is to pass a global reference for a - * class or instance to the new thread; this bypasses the need for the class loader. - * (See http://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/invocation.html#attach_current_thread) - * If you need access to the application's classes, you can use ThreadScope::WithClassLoader. - * - If fbjni has never been initialized, there will be no JavaVM object to attach with. - * In that case, a std::runtime_error will be thrown. This is only likely to happen in a - * standalone C++ application, or if Environment::initialize is not used. - */ -class ThreadScope { - public: - ThreadScope(); - ThreadScope(ThreadScope&) = delete; - ThreadScope(ThreadScope&&) = default; - ThreadScope& operator=(ThreadScope&) = delete; - ThreadScope& operator=(ThreadScope&&) = delete; - ~ThreadScope(); - - /** - * This runs the closure in a scope with fbjni's classloader. This should be - * the same classloader as the rest of the application and thus anything - * running in the closure will have access to the same classes as in a normal - * java-create thread. - */ - static void WithClassLoader(std::function&& runnable); - - static void OnLoad(); - - private: - // If this flag is set, then this object needs to detach. - bool thisAttached_; - - // The thread local pointer may point here. - detail::TLData data_; -}; - -} -} diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/Exceptions.h b/lib/fb/src/main/cpp/include/fbjni/detail/Exceptions.h deleted file mode 100644 index 94b642b9..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/Exceptions.h +++ /dev/null @@ -1,130 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -/** - * @file Exceptions.h - * - * After invoking a JNI function that can throw a Java exception, the macro - * @ref FACEBOOK_JNI_THROW_PENDING_EXCEPTION() or @ref FACEBOOK_JNI_THROW_EXCEPTION_IF() - * should be invoked. - * - * IMPORTANT! IMPORTANT! IMPORTANT! IMPORTANT! IMPORTANT! IMPORTANT! IMPORTANT! IMPORTANT! - * To use these methods you MUST call initExceptionHelpers() when your library is loaded. - */ - -#pragma once - -#include -#include -#include - -#include - -#include "Common.h" -#include "References.h" -#include "CoreClasses.h" - -#if defined(__ANDROID__) && defined(__ARM_ARCH_5TE__) && !defined(FBJNI_NO_EXCEPTION_PTR) -// ARMv5 NDK does not support exception_ptr so we cannot use that when building for it. -#define FBJNI_NO_EXCEPTION_PTR -#endif - -namespace facebook { -namespace jni { - -class JThrowable; - -class JCppException : public JavaClass { - public: - static auto constexpr kJavaDescriptor = "Lcom/facebook/jni/CppException;"; - - static local_ref create(const char* str) { - return newInstance(make_jstring(str)); - } - - static local_ref create(const std::exception& ex) { - return newInstance(make_jstring(ex.what())); - } -}; - -// JniException //////////////////////////////////////////////////////////////////////////////////// - -/** - * This class wraps a Java exception into a C++ exception; if the exception is routed back - * to the Java side, it can be unwrapped and just look like a pure Java interaction. The class - * is resilient to errors while creating the exception, falling back to some pre-allocated - * exceptions if a new one cannot be allocated or populated. - * - * Note: the what() method of this class is not thread-safe (t6900503). - */ -class JniException : public std::exception { - public: - JniException(); - ~JniException() override; - - explicit JniException(alias_ref throwable); - - JniException(JniException &&rhs); - - JniException(const JniException &other); - - local_ref getThrowable() const noexcept; - - const char* what() const noexcept override; - - void setJavaException() const noexcept; - - private: - global_ref throwable_; - mutable std::string what_; - mutable bool isMessageExtracted_; - const static std::string kExceptionMessageFailure_; - - void populateWhat() const noexcept; -}; - -// Exception throwing & translating functions ////////////////////////////////////////////////////// - -// Functions that throw C++ exceptions - -static const int kMaxExceptionMessageBufferSize = 512; - -// These methods are the preferred way to throw a Java exception from -// a C++ function. They create and throw a C++ exception which wraps -// a Java exception, so the C++ flow is interrupted. Then, when -// translatePendingCppExceptionToJavaException is called at the -// topmost level of the native stack, the wrapped Java exception is -// thrown to the java caller. -template -[[noreturn]] void throwNewJavaException(const char* throwableName, const char* fmt, Args... args) { - int msgSize = snprintf(nullptr, 0, fmt, args...); - - char *msg = (char*) alloca(msgSize + 1); - snprintf(msg, kMaxExceptionMessageBufferSize, fmt, args...); - throwNewJavaException(throwableName, msg); -} - -// Identifies any pending C++ exception and throws it as a Java exception. If the exception can't -// be thrown, it aborts the program. -void translatePendingCppExceptionToJavaException(); - -#ifndef FBJNI_NO_EXCEPTION_PTR -local_ref getJavaExceptionForCppException(std::exception_ptr ptr); -#endif - -/*** - * The stack returned may include build ids. It may be beneficial to - * call lyra::setLibraryIdentifierFunction before calling this if - * build ids are desirable. - */ -local_ref getJavaExceptionForCppBackTrace(); - -local_ref getJavaExceptionForCppBackTrace(const char* msg); - -// For convenience, some exception names in java.lang are available here. -const char* const gJavaLangIllegalArgumentException = "java/lang/IllegalArgumentException"; - -}} diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/Hybrid.h b/lib/fb/src/main/cpp/include/fbjni/detail/Hybrid.h deleted file mode 100644 index 430d7ca3..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/Hybrid.h +++ /dev/null @@ -1,285 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -#include -#include - -#include "CoreClasses.h" - -namespace facebook { -namespace jni { - -namespace detail { - -class BaseHybridClass { -public: - virtual ~BaseHybridClass() {} -}; - -struct HybridData : public JavaClass { - constexpr static auto kJavaDescriptor = "Lcom/facebook/jni/HybridData;"; - static local_ref create(); -}; - -class HybridDestructor : public JavaClass { - public: - static auto constexpr kJavaDescriptor = "Lcom/facebook/jni/HybridData$Destructor;"; - - detail::BaseHybridClass* getNativePointer(); - - void setNativePointer(std::unique_ptr new_value); -}; - -template -detail::BaseHybridClass* getNativePointer(T t) { - return getHolder(t)->getNativePointer(); -} - -template -void setNativePointer(T t, std::unique_ptr new_value) { - getHolder(t)->setNativePointer(std::move(new_value)); -} - -template -local_ref getHolder(T t) { - static auto holderField = t->getClass()->template getField("mDestructor"); - return t->getFieldValue(holderField); -} - -// JavaClass for HybridClassBase -struct HybridClassBase : public JavaClass { - constexpr static auto kJavaDescriptor = "Lcom/facebook/jni/HybridClassBase;"; - - static bool isHybridClassBase(alias_ref jclass) { - return HybridClassBase::javaClassStatic()->isAssignableFrom(jclass); - } -}; - -template -struct HybridTraits { - // This static assert should actually always fail if we don't use one of the - // specializations below. - static_assert( - std::is_base_of::value || - std::is_base_of::value, - "The base of a HybridClass must be either another HybridClass or derived from JObject."); -}; - -template <> -struct HybridTraits { - using CxxBase = BaseHybridClass; - using JavaBase = JObject; -}; - -template -struct HybridTraits< - Base, - typename std::enable_if::value>::type> { - using CxxBase = Base; - using JavaBase = typename Base::JavaPart; -}; - -template -struct HybridTraits< - Base, - typename std::enable_if::value>::type> { - using CxxBase = BaseHybridClass; - using JavaBase = Base; -}; - -// convert to HybridClass* from jhybridobject -template -struct Convert< - T, typename std::enable_if< - std::is_base_of::type>::value>::type> { - typedef typename std::remove_pointer::type::jhybridobject jniType; - static T fromJni(jniType t) { - if (t == nullptr) { - return nullptr; - } - return wrap_alias(t)->cthis(); - } - // There is no automatic return conversion for objects. -}; - -template -struct RefReprType::value, void>::type> { - static_assert(std::is_same::value, - "HybridFoo (where HybridFoo derives from HybridClass) is not supported in this context. " - "For an xxx_ref, you may want: xxx_ref or HybridFoo*."); - using Repr = T; -}; - - -} - -template -class HybridClass : public detail::HybridTraits::CxxBase { -public: - struct JavaPart : JavaClass::JavaBase> { - // At this point, T is incomplete, and so we cannot access - // T::kJavaDescriptor directly. jtype_traits support this escape hatch for - // such a case. - static constexpr const char* kJavaDescriptor = nullptr; - static std::string get_instantiated_java_descriptor(); - static std::string get_instantiated_base_name(); - - using HybridType = T; - - // This will reach into the java object and extract the C++ instance from - // the mHybridData and return it. - T* cthis(); - - friend class HybridClass; - friend T; - }; - - using jhybridobject = typename JavaPart::javaobject; - using javaobject = typename JavaPart::javaobject; - typedef detail::HybridData::javaobject jhybriddata; - - static alias_ref javaClassStatic() { - return JavaPart::javaClassStatic(); - } - - static local_ref javaClassLocal() { - std::string className(T::kJavaDescriptor + 1, strlen(T::kJavaDescriptor) - 2); - return findClassLocal(className.c_str()); - } - -protected: - typedef HybridClass HybridBase; - - // This ensures that a C++ hybrid part cannot be created on its own - // by default. If a hybrid wants to enable this, it can provide its - // own public ctor, or change the accessibility of this to public. - using detail::HybridTraits::CxxBase::CxxBase; - - static void registerHybrid(std::initializer_list methods) { - javaClassStatic()->registerNatives(methods); - } - - static local_ref makeHybridData(std::unique_ptr cxxPart) { - auto hybridData = detail::HybridData::create(); - setNativePointer(hybridData, std::move(cxxPart)); - return hybridData; - } - - template - static local_ref makeCxxInstance(Args&&... args) { - return makeHybridData(std::unique_ptr(new T(std::forward(args)...))); - } - - template - static void setCxxInstance(alias_ref o, Args&&... args) { - setNativePointer(o, std::unique_ptr(new T(std::forward(args)...))); - } - -public: - // Factory method for creating a hybrid object where the arguments - // are used to initialize the C++ part directly without passing them - // through java. This method requires the Java part to have a ctor - // which takes a HybridData, and for the C++ part to have a ctor - // compatible with the arguments passed here. For safety, the ctor - // can be private, and the hybrid declared a friend of its base, so - // the hybrid can only be created from here. - // - // Exception behavior: This can throw an exception if creating the - // C++ object fails, or any JNI methods throw. - template - static local_ref newObjectCxxArgs(Args&&... args) { - static bool isHybrid = detail::HybridClassBase::isHybridClassBase(javaClassStatic()); - auto cxxPart = std::unique_ptr(new T(std::forward(args)...)); - - local_ref result; - if (isHybrid) { - result = JavaPart::newInstance(); - setNativePointer(result, std::move(cxxPart)); - } - else { - auto hybridData = makeHybridData(std::move(cxxPart)); - result = JavaPart::newInstance(hybridData); - } - - return result; - } - - // TODO? Create reusable interface for Allocatable classes and use it to - // strengthen type-checking (and possibly provide a default - // implementation of allocate().) - template - static local_ref allocateWithCxxArgs(Args&&... args) { - auto hybridData = makeCxxInstance(std::forward(args)...); - static auto allocateMethod = - javaClassStatic()->template getStaticMethod("allocate"); - return allocateMethod(javaClassStatic(), hybridData.get()); - } - - // Factory method for creating a hybrid object where the arguments - // are passed to the java ctor. - template - static local_ref newObjectJavaArgs(Args&&... args) { - return JavaPart::newInstance(std::move(args)...); - } - - // If a hybrid class throws an exception which derives from - // std::exception, it will be passed to mapException on the hybrid - // class, or nearest ancestor. This allows boilerplate exception - // translation code (for example, calling throwNewJavaException on a - // particular java class) to be hoisted to a common function. If - // mapException returns, then the std::exception will be translated - // to Java. - static void mapException(const std::exception& ex) { - (void)ex; - } -}; - -template -inline T* HybridClass::JavaPart::cthis() { - detail::BaseHybridClass* result = 0; - static bool isHybrid = detail::HybridClassBase::isHybridClassBase(this->getClass()); - if (isHybrid) { - result = getNativePointer(this); - } else { - static auto field = - HybridClass::JavaPart::javaClassStatic()->template getField("mHybridData"); - auto hybridData = this->getFieldValue(field); - if (!hybridData) { - throwNewJavaException("java/lang/NullPointerException", "java.lang.NullPointerException"); - } - - result = getNativePointer(hybridData); - } - - // I'd like to use dynamic_cast here, but -fno-rtti is the default. - return static_cast(result); -}; - -template -/* static */ inline std::string HybridClass::JavaPart::get_instantiated_java_descriptor() { - return T::kJavaDescriptor; -} - -template -/* static */ inline std::string HybridClass::JavaPart::get_instantiated_base_name() { - auto name = get_instantiated_java_descriptor(); - return name.substr(1, name.size() - 2); -} - -// Given a *_ref object which refers to a hybrid class, this will reach inside -// of it, find the mHybridData, extract the C++ instance pointer, cast it to -// the appropriate type, and return it. -template -inline auto cthis(T jthis) -> decltype(jthis->cthis()) { - return jthis->cthis(); -} - -void HybridDataOnLoad(); - -} -} diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/Iterator-inl.h b/lib/fb/src/main/cpp/include/fbjni/detail/Iterator-inl.h deleted file mode 100644 index d0df3455..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/Iterator-inl.h +++ /dev/null @@ -1,196 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -namespace facebook { -namespace jni { - -namespace detail { - -template -struct IteratorHelper : public JavaClass> { - constexpr static auto kJavaDescriptor = "Lcom/facebook/jni/IteratorHelper;"; - - typedef local_ref value_type; - typedef ptrdiff_t difference_type; - typedef value_type* pointer; - typedef value_type& reference; - typedef std::forward_iterator_tag iterator_category; - - typedef JavaClass> JavaBase_; - - bool hasNext() const { - static auto hasNextMethod = - JavaBase_::javaClassStatic()->template getMethod("hasNext"); - return hasNextMethod(JavaBase_::self()); - } - - value_type next() { - static auto elementField = - JavaBase_::javaClassStatic()->template getField("mElement"); - return dynamic_ref_cast>(JavaBase_::getFieldValue(elementField)); - } - - static void reset(value_type& v) { - v.reset(); - } -}; - -template -struct MapIteratorHelper : public JavaClass> { - constexpr static auto kJavaDescriptor = "Lcom/facebook/jni/MapIteratorHelper;"; - - typedef std::pair, local_ref> value_type; - - typedef JavaClass> JavaBase_; - - bool hasNext() const { - static auto hasNextMethod = - JavaBase_::javaClassStatic()->template getMethod("hasNext"); - return hasNextMethod(JavaBase_::self()); - } - - value_type next() { - static auto keyField = JavaBase_::javaClassStatic()->template getField("mKey"); - static auto valueField = JavaBase_::javaClassStatic()->template getField("mValue"); - return std::make_pair(dynamic_ref_cast(JavaBase_::getFieldValue(keyField)), - dynamic_ref_cast(JavaBase_::getFieldValue(valueField))); - } - - static void reset(value_type& v) { - v.first.reset(); - v.second.reset(); - } -}; - -template -class Iterator { - public: - typedef typename T::value_type value_type; - typedef ptrdiff_t difference_type; - typedef value_type* pointer; - typedef value_type& reference; - typedef std::input_iterator_tag iterator_category; - - // begin ctor - Iterator(global_ref&& helper) - : helper_(std::move(helper)) - , i_(-1) { - ++(*this); - } - - // end ctor - Iterator() - : i_(-1) {} - - bool operator==(const Iterator& it) const { return i_ == it.i_; } - bool operator!=(const Iterator& it) const { return !(*this == it); } - const value_type& operator*() const { assert(i_ != -1); return entry_; } - const value_type* operator->() const { assert(i_ != -1); return &entry_; } - Iterator& operator++() { // preincrement - bool hasNext = helper_->hasNext(); - if (hasNext) { - ++i_; - entry_ = helper_->next(); - } else { - i_ = -1; - helper_->reset(entry_); - } - return *this; - } - Iterator operator++(int) { // postincrement - Iterator ret; - ret.i_ = i_; - ret.entry_ = std::move(entry_); - ++(*this); - return ret; - } - - global_ref helper_; - // set to -1 at end - std::ptrdiff_t i_; - value_type entry_; -}; - -} - -template -struct JIterator::Iterator : public detail::Iterator> { - using detail::Iterator>::Iterator; -}; - -template -typename JIterator::Iterator JIterator::begin() const { - static auto ctor = detail::IteratorHelper::javaClassStatic()-> - template getConstructor::javaobject( - typename JIterator::javaobject)>(); - return Iterator( - make_global( - detail::IteratorHelper::javaClassStatic()->newObject(ctor, this->self()))); -} - -template -typename JIterator::Iterator JIterator::end() const { - return Iterator(); -} - -template -struct JIterable::Iterator : public detail::Iterator> { - using detail::Iterator>::Iterator; -}; - -template -typename JIterable::Iterator JIterable::begin() const { - static auto ctor = detail::IteratorHelper::javaClassStatic()-> - template getConstructor::javaobject( - typename JIterable::javaobject)>(); - return Iterator( - make_global( - detail::IteratorHelper::javaClassStatic()->newObject(ctor, this->self()))); -} - -template -typename JIterable::Iterator JIterable::end() const { - return Iterator(); -} - -template -size_t JCollection::size() const { - static auto sizeMethod = - JCollection::javaClassStatic()->template getMethod("size"); - return sizeMethod(this->self()); -} - -template -struct JMap::Iterator : public detail::Iterator> { - using detail::Iterator>::Iterator; -}; - -template -size_t JMap::size() const { - static auto sizeMethod = - JMap::javaClassStatic()->template getMethod("size"); - return sizeMethod(this->self()); -} - -template -typename JMap::Iterator JMap::begin() const { - static auto ctor = detail::MapIteratorHelper::javaClassStatic()-> - template getConstructor::javaobject( - typename JMap::javaobject)>(); - return Iterator( - make_global( - detail::MapIteratorHelper::javaClassStatic()->newObject(ctor, this->self()))); -} - -template -typename JMap::Iterator JMap::end() const { - return Iterator(); -} - -} -} diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/Iterator.h b/lib/fb/src/main/cpp/include/fbjni/detail/Iterator.h deleted file mode 100644 index 18afea6a..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/Iterator.h +++ /dev/null @@ -1,143 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -#include "CoreClasses.h" - -namespace facebook { -namespace jni { - -/** - * JavaClass which represents a reference to a java.util.Iterator instance. It - * provides begin()/end() methods to provide C++-style iteration over the - * underlying collection. The class has a template parameter for the element - * type, which defaults to jobject. For example: - * - * alias_ref::javaobject> my_iter = ...; - * - * In the simplest case, it can be used just as alias_ref::javaobject>, - * for example in a method declaration. - */ -template -struct JIterator : JavaClass> { - constexpr static auto kJavaDescriptor = "Ljava/util/Iterator;"; - - struct Iterator; - - /** - * To iterate: - * - * for (const auto& element : *jiter) { ... } - * - * The JIterator iterator value_type is local_ref, containing a reference - * to an element instance. - * - * If the Iterator returns objects whch are not convertible to the given - * element type, iteration will throw a java ClassCastException. - * - * For example, to convert an iterator over a collection of java strings to - * an std::vector of std::strings: - * - * std::vector vs; - * for (const auto& elem : *jiter) { - * vs.push_back(elem->toStdString()); - * } - * - * Or if you prefer using std algorithms: - * - * std::vector vs; - * std::transform(jiter->begin(), jiter->end(), std::back_inserter(vs), - * [](const local_ref& elem) { return elem->toStdString(); }); - * - * The iterator is a InputIterator. - */ - Iterator begin() const; - Iterator end() const; -}; - -/** - * Similar to JIterator, except this represents any object which implements the - * java.lang.Iterable interface. It will create the Java Iterator as a part of - * begin(). - */ -template -struct JIterable : JavaClass> { - constexpr static auto kJavaDescriptor = "Ljava/lang/Iterable;"; - - struct Iterator; - - Iterator begin() const; - Iterator end() const; -}; - -/** - * JavaClass types which represent Collection, List, and Set are also provided. - * These preserve the Java class heirarchy. - */ -template -struct JCollection : JavaClass, JIterable> { - constexpr static auto kJavaDescriptor = "Ljava/util/Collection;"; - - /** - * Returns the number of elements in the collection. - */ - size_t size() const; -}; - -template -struct JList : JavaClass, JCollection> { - constexpr static auto kJavaDescriptor = "Ljava/util/List;"; -}; - -template -struct JSet : JavaClass, JCollection> { - constexpr static auto kJavaDescriptor = "Ljava/util/Set;"; -}; - -/** - * JavaClass which represents a reference to a java.util.Map instance. It adds - * wrappers around Java methods, including begin()/end() methods to provide - * C++-style iteration over the Java Map. The class has template parameters - * for the key and value types, which default to jobject. For example: - * - * alias_ref::javaobject> my_map = ...; - * - * In the simplest case, it can be used just as alias_ref::javaobject>, - * for example in a method declaration. - */ -template -struct JMap : JavaClass> { - constexpr static auto kJavaDescriptor = "Ljava/util/Map;"; - - struct Iterator; - - /** - * Returns the number of pairs in the map. - */ - size_t size() const; - - /** - * To iterate over the Map: - * - * for (const auto& entry : *jmap) { ... } - * - * The JMap iterator value_type is std::pair, local_ref> - * containing references to key and value instances. - * - * If the Map contains objects whch are not convertible to the given key and - * value types, iteration will throw a java ClassCastException. - * - * The iterator is a InputIterator. - */ - Iterator begin() const; - Iterator end() const; -}; - -} -} - -#include "Iterator-inl.h" diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/JWeakReference.h b/lib/fb/src/main/cpp/include/fbjni/detail/JWeakReference.h deleted file mode 100644 index 4a95fd35..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/JWeakReference.h +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -#include "CoreClasses.h" - -namespace facebook { -namespace jni { - -/** - * Wrap Java's WeakReference instead of using JNI WeakGlobalRefs. - * A WeakGlobalRef can yield a strong reference even after the object has been - * finalized. See comment in the djinni library. - * https://github.com/dropbox/djinni/blob/master/support-lib/jni/djinni_support.hpp - */ -template -class JWeakReference : public JavaClass> { - - typedef JavaClass> JavaBase_; - - public: - static constexpr const char* kJavaDescriptor = "Ljava/lang/ref/WeakReference;"; - - static local_ref> newInstance(alias_ref object) { - return JavaBase_::newInstance(static_ref_cast(object)); - } - - local_ref get() const { - static const auto method = JavaBase_::javaClassStatic()->template getMethod("get"); - return static_ref_cast(method(JavaBase_::self())); - } -}; - -} -} diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/Log.h b/lib/fb/src/main/cpp/include/fbjni/detail/Log.h deleted file mode 100644 index 26b34aa3..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/Log.h +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -/** @file ALog.h - * - * Very simple (android only) logging. Define LOG_TAG to enable the macros. - */ - -#pragma once - -#ifdef __ANDROID__ - -#include - -namespace facebook { -namespace jni { -namespace log_ { -// the weird name of this namespace is to avoid a conflict with the -// function named log. - -inline void loge(const char* tag, const char* msg) noexcept { - __android_log_write(ANDROID_LOG_ERROR, tag, msg); -} - -template -inline void loge(const char* tag, const char* msg, ARGS... args) noexcept { - __android_log_print(ANDROID_LOG_ERROR, tag, msg, args...); -} - -inline void logf(const char* tag, const char* msg) noexcept { - __android_log_write(ANDROID_LOG_FATAL, tag, msg); -} - -template -inline void logf(const char* tag, const char* msg, ARGS... args) noexcept { - __android_log_print(ANDROID_LOG_FATAL, tag, msg, args...); -} - -template -[[noreturn]] -inline void logassert(const char* tag, const char* msg, ARGS... args) noexcept { - __android_log_assert(0, tag, msg, args...); -} - - -#ifdef LOG_TAG -# define FBJNI_LOGE(...) ::facebook::jni::log_::loge(LOG_TAG, __VA_ARGS__) -# define FBJNI_LOGF(...) ::facebook::jni::log_::logf(LOG_TAG, __VA_ARGS__) -# define FBJNI_ASSERT(cond) do { if (!(cond)) ::facebook::jni::log_::logassert(LOG_TAG, "%s", #cond); } while(0) -#else -# define FBJNI_LOGE(...) ::facebook::jni::log_::loge("log", __VA_ARGS__) -# define FBJNI_LOGF(...) ::facebook::jni::log_::logf("log", __VA_ARGS__) -# define FBJNI_ASSERT(cond) do { if (!(cond)) ::facebook::jni::log_::logassert("log", "%s", #cond); } while(0) -#endif - -}}} - -#else -#include - -# define FBJNI_LOGE(...) ((void)0) -# define FBJNI_LOGF(...) (abort()) -# define FBJNI_ASSERT(cond) ((void)0) -#endif diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/Meta-forward.h b/lib/fb/src/main/cpp/include/fbjni/detail/Meta-forward.h deleted file mode 100644 index e975f884..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/Meta-forward.h +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -namespace facebook { -namespace jni { - -template -class JMethod; -template -class JStaticMethod; -template -class JNonvirtualMethod; -template -struct JConstructor; -template -class JField; -template -class JStaticField; - -/// Type traits for Java types (currently providing Java type descriptors) -template -struct jtype_traits; - -/// Type traits for Java methods (currently providing Java type descriptors) -template -struct jmethod_traits; - -}} diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/Meta-inl.h b/lib/fb/src/main/cpp/include/fbjni/detail/Meta-inl.h deleted file mode 100644 index a2754374..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/Meta-inl.h +++ /dev/null @@ -1,405 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -#include - -#include "Common.h" -#include "Exceptions.h" -#include "MetaConvert.h" -#include "References.h" -#include "Boxed.h" - -namespace facebook { -namespace jni { - -// JMethod ///////////////////////////////////////////////////////////////////////////////////////// - -inline JMethodBase::JMethodBase(jmethodID method_id) noexcept - : method_id_{method_id} -{} - -inline JMethodBase::operator bool() const noexcept { - return method_id_ != nullptr; -} - -inline jmethodID JMethodBase::getId() const noexcept { - return method_id_; -} - -namespace { - -template -struct ArgsArraySetter; - -template -struct ArgsArraySetter { - static void set(alias_ref::javaobject> array, Arg arg0, Args... args) { - // TODO(xxxxxxxx): Use Convert... to do conversions like the fast path. - (*array)[idx] = autobox(arg0); - ArgsArraySetter::set(array, args...); - } -}; - -template -struct ArgsArraySetter { - static void set(alias_ref::javaobject> array) { - (void)array; - } -}; - -template -local_ref::javaobject> makeArgsArray(Args... args) { - auto arr = JArrayClass::newArray(sizeof...(args)); - ArgsArraySetter<0, Args...>::set(arr, args...); - return arr; -} - -} - -template -inline void JMethod::operator()(alias_ref self, Args... args) const { - const auto env = Environment::current(); - env->CallVoidMethod( - self.get(), - getId(), - detail::callToJni(detail::Convert::type>::toCall(args))...); - FACEBOOK_JNI_THROW_PENDING_EXCEPTION(); -} - -#pragma push_macro("DEFINE_PRIMITIVE_CALL") -#undef DEFINE_PRIMITIVE_CALL -#define DEFINE_PRIMITIVE_CALL(TYPE, METHOD) \ -template \ -inline TYPE JMethod::operator()(alias_ref self, Args... args) const { \ - const auto env = Environment::current(); \ - auto result = env->Call ## METHOD ## Method( \ - self.get(), \ - getId(), \ - detail::callToJni(detail::Convert::type>::toCall(args))...); \ - FACEBOOK_JNI_THROW_PENDING_EXCEPTION(); \ - return result; \ -} - -DEFINE_PRIMITIVE_CALL(jboolean, Boolean) -DEFINE_PRIMITIVE_CALL(jbyte, Byte) -DEFINE_PRIMITIVE_CALL(jchar, Char) -DEFINE_PRIMITIVE_CALL(jshort, Short) -DEFINE_PRIMITIVE_CALL(jint, Int) -DEFINE_PRIMITIVE_CALL(jlong, Long) -DEFINE_PRIMITIVE_CALL(jfloat, Float) -DEFINE_PRIMITIVE_CALL(jdouble, Double) -#pragma pop_macro("DEFINE_PRIMITIVE_CALL") - -/// JMethod specialization for references that wraps the return value in a @ref local_ref -template -class JMethod : public JMethodBase { - public: - // TODO: static_assert is jobject-derived or local_ref jobject - using JniRet = typename detail::Convert::type>::jniType; - static_assert(IsPlainJniReference(), "JniRet must be a JNI reference"); - using JMethodBase::JMethodBase; - JMethod() noexcept {}; - JMethod(const JMethod& other) noexcept = default; - - /// Invoke a method and return a local reference wrapping the result - local_ref operator()(alias_ref self, Args... args) const; - - friend class JClass; -}; - -template -inline auto JMethod::operator()(alias_ref self, Args... args) const -> local_ref { - const auto env = Environment::current(); - auto result = env->CallObjectMethod( - self.get(), - getId(), - detail::callToJni(detail::Convert::type>::toCall(args))...); - FACEBOOK_JNI_THROW_PENDING_EXCEPTION(); - return adopt_local(static_cast(result)); -} - -template -inline void JStaticMethod::operator()(alias_ref cls, Args... args) const { - const auto env = Environment::current(); - env->CallStaticVoidMethod( - cls.get(), - getId(), - detail::callToJni(detail::Convert::type>::toCall(args))...); - FACEBOOK_JNI_THROW_PENDING_EXCEPTION(); -} - -#pragma push_macro("DEFINE_PRIMITIVE_STATIC_CALL") -#undef DEFINE_PRIMITIVE_STATIC_CALL -#define DEFINE_PRIMITIVE_STATIC_CALL(TYPE, METHOD) \ -template \ -inline TYPE JStaticMethod::operator()(alias_ref cls, Args... args) const { \ - const auto env = Environment::current(); \ - auto result = env->CallStatic ## METHOD ## Method( \ - cls.get(), \ - getId(), \ - detail::callToJni(detail::Convert::type>::toCall(args))...); \ - FACEBOOK_JNI_THROW_PENDING_EXCEPTION(); \ - return result; \ -} - -DEFINE_PRIMITIVE_STATIC_CALL(jboolean, Boolean) -DEFINE_PRIMITIVE_STATIC_CALL(jbyte, Byte) -DEFINE_PRIMITIVE_STATIC_CALL(jchar, Char) -DEFINE_PRIMITIVE_STATIC_CALL(jshort, Short) -DEFINE_PRIMITIVE_STATIC_CALL(jint, Int) -DEFINE_PRIMITIVE_STATIC_CALL(jlong, Long) -DEFINE_PRIMITIVE_STATIC_CALL(jfloat, Float) -DEFINE_PRIMITIVE_STATIC_CALL(jdouble, Double) -#pragma pop_macro("DEFINE_PRIMITIVE_STATIC_CALL") - -/// JStaticMethod specialization for references that wraps the return value in a @ref local_ref -template -class JStaticMethod : public JMethodBase { - - public: - using JniRet = typename detail::Convert::type>::jniType; - static_assert(IsPlainJniReference(), "T* must be a JNI reference"); - using JMethodBase::JMethodBase; - JStaticMethod() noexcept {}; - JStaticMethod(const JStaticMethod& other) noexcept = default; - - /// Invoke a method and return a local reference wrapping the result - local_ref operator()(alias_ref cls, Args... args) const { - const auto env = Environment::current(); - auto result = env->CallStaticObjectMethod( - cls.get(), - getId(), - detail::callToJni(detail::Convert::type>::toCall(args))...); - FACEBOOK_JNI_THROW_PENDING_EXCEPTION(); - return adopt_local(static_cast(result)); - } - - friend class JClass; -}; - -template -inline void -JNonvirtualMethod::operator()(alias_ref self, alias_ref cls, Args... args) const { - const auto env = Environment::current(); - env->CallNonvirtualVoidMethod( - self.get(), - cls.get(), - getId(), - detail::callToJni(detail::Convert::type>::toCall(args))...); - FACEBOOK_JNI_THROW_PENDING_EXCEPTION(); -} - -#pragma push_macro("DEFINE_PRIMITIVE_NON_VIRTUAL_CALL") -#undef DEFINE_PRIMITIVE_NON_VIRTUAL_CALL -#define DEFINE_PRIMITIVE_NON_VIRTUAL_CALL(TYPE, METHOD) \ -template \ -inline TYPE \ -JNonvirtualMethod::operator()(alias_ref self, alias_ref cls, Args... args) const { \ - const auto env = Environment::current(); \ - auto result = env->CallNonvirtual ## METHOD ## Method( \ - self.get(), \ - cls.get(), \ - getId(), \ - detail::callToJni(detail::Convert::type>::toCall(args))...); \ - FACEBOOK_JNI_THROW_PENDING_EXCEPTION(); \ - return result; \ -} - -DEFINE_PRIMITIVE_NON_VIRTUAL_CALL(jboolean, Boolean) -DEFINE_PRIMITIVE_NON_VIRTUAL_CALL(jbyte, Byte) -DEFINE_PRIMITIVE_NON_VIRTUAL_CALL(jchar, Char) -DEFINE_PRIMITIVE_NON_VIRTUAL_CALL(jshort, Short) -DEFINE_PRIMITIVE_NON_VIRTUAL_CALL(jint, Int) -DEFINE_PRIMITIVE_NON_VIRTUAL_CALL(jlong, Long) -DEFINE_PRIMITIVE_NON_VIRTUAL_CALL(jfloat, Float) -DEFINE_PRIMITIVE_NON_VIRTUAL_CALL(jdouble, Double) -#pragma pop_macro("DEFINE_PRIMITIVE_NON_VIRTUAL_CALL") - -/// JNonvirtualMethod specialization for references that wraps the return value in a @ref local_ref -template -class JNonvirtualMethod : public JMethodBase { - public: - using JniRet = typename detail::Convert::type>::jniType; - static_assert(IsPlainJniReference(), "T* must be a JNI reference"); - using JMethodBase::JMethodBase; - JNonvirtualMethod() noexcept {}; - JNonvirtualMethod(const JNonvirtualMethod& other) noexcept = default; - - /// Invoke a method and return a local reference wrapping the result - local_ref operator()(alias_ref self, alias_ref cls, Args... args) const { - const auto env = Environment::current(); - auto result = env->CallNonvirtualObjectMethod( - self.get(), - cls.get(), - getId(), - detail::callToJni(detail::Convert::type>::toCall(args))...); - FACEBOOK_JNI_THROW_PENDING_EXCEPTION(); - return adopt_local(static_cast(result)); - } - - friend class JClass; -}; - -template -local_ref slowCall(jmethodID method_id, alias_ref self, Args... args) { - static auto invoke = findClassStatic("java/lang/reflect/Method") - ->getMethod::javaobject)>("invoke"); - // TODO(xxxxxxx): Provide fbjni interface to ToReflectedMethod. - auto reflected = adopt_local(Environment::current()->ToReflectedMethod(self->getClass().get(), method_id, JNI_FALSE)); - FACEBOOK_JNI_THROW_PENDING_EXCEPTION(); - if (!reflected) throw std::runtime_error("Unable to get reflected java.lang.reflect.Method"); - auto argsArray = makeArgsArray(args...); - // No need to check for exceptions since invoke is itself a JMethod that will do that for us. - return invoke(reflected, self.get(), argsArray.get()); -} - - -// JField /////////////////////////////////////////////////////////////////////////////////////// - -template -inline JField::JField(jfieldID field) noexcept - : field_id_{field} -{} - -template -inline JField::operator bool() const noexcept { - return field_id_ != nullptr; -} - -template -inline jfieldID JField::getId() const noexcept { - return field_id_; -} - -#pragma push_macro("DEFINE_FIELD_PRIMITIVE_GET_SET") -#undef DEFINE_FIELD_PRIMITIVE_GET_SET -#define DEFINE_FIELD_PRIMITIVE_GET_SET(TYPE, METHOD) \ -template<> \ -inline TYPE JField::get(jobject object) const noexcept { \ - const auto env = Environment::current(); \ - return env->Get ## METHOD ## Field(object, field_id_); \ -} \ - \ -template<> \ -inline void JField::set(jobject object, TYPE value) noexcept { \ - const auto env = Environment::current(); \ - env->Set ## METHOD ## Field(object, field_id_, value); \ -} - -DEFINE_FIELD_PRIMITIVE_GET_SET(jboolean, Boolean) -DEFINE_FIELD_PRIMITIVE_GET_SET(jbyte, Byte) -DEFINE_FIELD_PRIMITIVE_GET_SET(jchar, Char) -DEFINE_FIELD_PRIMITIVE_GET_SET(jshort, Short) -DEFINE_FIELD_PRIMITIVE_GET_SET(jint, Int) -DEFINE_FIELD_PRIMITIVE_GET_SET(jlong, Long) -DEFINE_FIELD_PRIMITIVE_GET_SET(jfloat, Float) -DEFINE_FIELD_PRIMITIVE_GET_SET(jdouble, Double) -#pragma pop_macro("DEFINE_FIELD_PRIMITIVE_GET_SET") - -template -inline T JField::get(jobject object) const noexcept { - return static_cast(Environment::current()->GetObjectField(object, field_id_)); -} - -template -inline void JField::set(jobject object, T value) noexcept { - Environment::current()->SetObjectField(object, field_id_, static_cast(value)); -} - -// JStaticField ///////////////////////////////////////////////////////////////////////////////// - -template -inline JStaticField::JStaticField(jfieldID field) noexcept - : field_id_{field} -{} - -template -inline JStaticField::operator bool() const noexcept { - return field_id_ != nullptr; -} - -template -inline jfieldID JStaticField::getId() const noexcept { - return field_id_; -} - -#pragma push_macro("DEFINE_STATIC_FIELD_PRIMITIVE_GET_SET") -#undef DEFINE_STATIC_FIELD_PRIMITIVE_GET_SET -#define DEFINE_STATIC_FIELD_PRIMITIVE_GET_SET(TYPE, METHOD) \ -template<> \ -inline TYPE JStaticField::get(jclass jcls) const noexcept { \ - const auto env = Environment::current(); \ - return env->GetStatic ## METHOD ## Field(jcls, field_id_); \ -} \ - \ -template<> \ -inline void JStaticField::set(jclass jcls, TYPE value) noexcept { \ - const auto env = Environment::current(); \ - env->SetStatic ## METHOD ## Field(jcls, field_id_, value); \ -} - -DEFINE_STATIC_FIELD_PRIMITIVE_GET_SET(jboolean, Boolean) -DEFINE_STATIC_FIELD_PRIMITIVE_GET_SET(jbyte, Byte) -DEFINE_STATIC_FIELD_PRIMITIVE_GET_SET(jchar, Char) -DEFINE_STATIC_FIELD_PRIMITIVE_GET_SET(jshort, Short) -DEFINE_STATIC_FIELD_PRIMITIVE_GET_SET(jint, Int) -DEFINE_STATIC_FIELD_PRIMITIVE_GET_SET(jlong, Long) -DEFINE_STATIC_FIELD_PRIMITIVE_GET_SET(jfloat, Float) -DEFINE_STATIC_FIELD_PRIMITIVE_GET_SET(jdouble, Double) -#pragma pop_macro("DEFINE_STATIC_FIELD_PRIMITIVE_GET_SET") - -template -inline T JStaticField::get(jclass jcls) const noexcept { - const auto env = Environment::current(); - return static_cast(env->GetStaticObjectField(jcls, field_id_)); -} - -template -inline void JStaticField::set(jclass jcls, T value) noexcept { - Environment::current()->SetStaticObjectField(jcls, field_id_, value); -} - - -// jmethod_traits ////////////////////////////////////////////////////////////////////////////////// - -// TODO(T6608405) Adapt this to implement a register natives method that requires no descriptor -namespace internal { - -template -inline std::string JavaDescriptor() { - return jtype_traits::descriptor(); -} - -template -inline std::string JavaDescriptor() { - return JavaDescriptor() + JavaDescriptor(); -} - -template -inline std::string JMethodDescriptor() { - return "(" + JavaDescriptor() + ")" + JavaDescriptor(); -} - -template -inline std::string JMethodDescriptor() { - return "()" + JavaDescriptor(); -} - -} // internal - -template -inline std::string jmethod_traits::descriptor() { - return internal::JMethodDescriptor(); -} - -template -inline std::string jmethod_traits::constructor_descriptor() { - return internal::JMethodDescriptor(); -} - -}} diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/Meta.h b/lib/fb/src/main/cpp/include/fbjni/detail/Meta.h deleted file mode 100644 index b0e95fbe..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/Meta.h +++ /dev/null @@ -1,337 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -/** @file meta.h - * - * Provides wrappers for meta data such as methods and fields. - */ - -#pragma once - -#include -#include - -#include - -#include "References-forward.h" - -#ifdef __ANDROID__ -# include -# define XLOG_TAG "fb-jni" -# define XLOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, XLOG_TAG, __VA_ARGS__) -# define XLOGD(...) __android_log_print(ANDROID_LOG_DEBUG, XLOG_TAG, __VA_ARGS__) -# define XLOGI(...) __android_log_print(ANDROID_LOG_INFO, XLOG_TAG, __VA_ARGS__) -# define XLOGW(...) __android_log_print(ANDROID_LOG_WARN, XLOG_TAG, __VA_ARGS__) -# define XLOGE(...) __android_log_print(ANDROID_LOG_ERROR, XLOG_TAG, __VA_ARGS__) -# define XLOGWTF(...) __android_log_print(ANDROID_LOG_FATAL, XLOG_TAG, __VA_ARGS__) -#endif - -namespace facebook { -namespace jni { - -// This will get the reflected Java Method from the method_id, get it's invoke -// method, and call the method via that. This shouldn't ever be needed, but -// Android 6.0 crashes when calling a method on a java.lang.Proxy via jni. -template -local_ref slowCall(jmethodID method_id, alias_ref self, Args... args); - -class JObject; - - -/// Wrapper of a jmethodID. Provides a common base for JMethod specializations -class JMethodBase { - public: - /// Verify that the method is valid - explicit operator bool() const noexcept; - - /// Access the wrapped id - jmethodID getId() const noexcept; - - protected: - /// Create a wrapper of a method id - explicit JMethodBase(jmethodID method_id = nullptr) noexcept; - - private: - jmethodID method_id_; -}; - - -/// Representation of a jmethodID -template -class JMethod; - -/// @cond INTERNAL -#pragma push_macro("DEFINE_PRIMITIVE_METHOD_CLASS") - -#undef DEFINE_PRIMITIVE_METHOD_CLASS - -// Defining JMethod specializations based on return value -#define DEFINE_PRIMITIVE_METHOD_CLASS(TYPE) \ -template \ -class JMethod : public JMethodBase { \ - public: \ - static_assert(std::is_void::value || IsJniPrimitive(), \ - "TYPE must be primitive or void"); \ - \ - using JMethodBase::JMethodBase; \ - JMethod() noexcept {}; \ - JMethod(const JMethod& other) noexcept = default; \ - \ - TYPE operator()(alias_ref self, Args... args) const; \ - \ - friend class JClass; \ -} - -DEFINE_PRIMITIVE_METHOD_CLASS(void); -DEFINE_PRIMITIVE_METHOD_CLASS(jboolean); -DEFINE_PRIMITIVE_METHOD_CLASS(jbyte); -DEFINE_PRIMITIVE_METHOD_CLASS(jchar); -DEFINE_PRIMITIVE_METHOD_CLASS(jshort); -DEFINE_PRIMITIVE_METHOD_CLASS(jint); -DEFINE_PRIMITIVE_METHOD_CLASS(jlong); -DEFINE_PRIMITIVE_METHOD_CLASS(jfloat); -DEFINE_PRIMITIVE_METHOD_CLASS(jdouble); - -#pragma pop_macro("DEFINE_PRIMITIVE_METHOD_CLASS") -/// @endcond - - -/// Convenience type representing constructors -/// These should only be used with JClass::getConstructor and JClass::newObject. -template -struct JConstructor : private JMethod { - using JMethod::JMethod; - private: - JConstructor(const JMethod& other) : JMethod(other.getId()) {} - friend class JClass; -}; - -/// Representation of a jStaticMethodID -template -class JStaticMethod; - -/// @cond INTERNAL -#pragma push_macro("DEFINE_PRIMITIVE_STATIC_METHOD_CLASS") - -#undef DEFINE_PRIMITIVE_STATIC_METHOD_CLASS - -// Defining JStaticMethod specializations based on return value -#define DEFINE_PRIMITIVE_STATIC_METHOD_CLASS(TYPE) \ -template \ -class JStaticMethod : public JMethodBase { \ - static_assert(std::is_void::value || IsJniPrimitive(), \ - "T must be a JNI primitive or void"); \ - \ - public: \ - using JMethodBase::JMethodBase; \ - JStaticMethod() noexcept {}; \ - JStaticMethod(const JStaticMethod& other) noexcept = default; \ - \ - TYPE operator()(alias_ref cls, Args... args) const; \ - \ - friend class JClass; \ -} - -DEFINE_PRIMITIVE_STATIC_METHOD_CLASS(void); -DEFINE_PRIMITIVE_STATIC_METHOD_CLASS(jboolean); -DEFINE_PRIMITIVE_STATIC_METHOD_CLASS(jbyte); -DEFINE_PRIMITIVE_STATIC_METHOD_CLASS(jchar); -DEFINE_PRIMITIVE_STATIC_METHOD_CLASS(jshort); -DEFINE_PRIMITIVE_STATIC_METHOD_CLASS(jint); -DEFINE_PRIMITIVE_STATIC_METHOD_CLASS(jlong); -DEFINE_PRIMITIVE_STATIC_METHOD_CLASS(jfloat); -DEFINE_PRIMITIVE_STATIC_METHOD_CLASS(jdouble); - -#pragma pop_macro("DEFINE_PRIMITIVE_STATIC_METHOD_CLASS") -/// @endcond - - -/// Representation of a jNonvirtualMethodID -template -class JNonvirtualMethod; - -/// @cond INTERNAL -#pragma push_macro("DEFINE_PRIMITIVE_NON_VIRTUAL_METHOD_CLASS") - -#undef DEFINE_PRIMITIVE_NON_VIRTUAL_METHOD_CLASS - -// Defining JNonvirtualMethod specializations based on return value -#define DEFINE_PRIMITIVE_NON_VIRTUAL_METHOD_CLASS(TYPE) \ -template \ -class JNonvirtualMethod : public JMethodBase { \ - static_assert(std::is_void::value || IsJniPrimitive(), \ - "T must be a JNI primitive or void"); \ - \ - public: \ - using JMethodBase::JMethodBase; \ - JNonvirtualMethod() noexcept {}; \ - JNonvirtualMethod(const JNonvirtualMethod& other) noexcept = default; \ - \ - TYPE operator()(alias_ref self, alias_ref cls, Args... args) const; \ - \ - friend class JClass; \ -} - -DEFINE_PRIMITIVE_NON_VIRTUAL_METHOD_CLASS(void); -DEFINE_PRIMITIVE_NON_VIRTUAL_METHOD_CLASS(jboolean); -DEFINE_PRIMITIVE_NON_VIRTUAL_METHOD_CLASS(jbyte); -DEFINE_PRIMITIVE_NON_VIRTUAL_METHOD_CLASS(jchar); -DEFINE_PRIMITIVE_NON_VIRTUAL_METHOD_CLASS(jshort); -DEFINE_PRIMITIVE_NON_VIRTUAL_METHOD_CLASS(jint); -DEFINE_PRIMITIVE_NON_VIRTUAL_METHOD_CLASS(jlong); -DEFINE_PRIMITIVE_NON_VIRTUAL_METHOD_CLASS(jfloat); -DEFINE_PRIMITIVE_NON_VIRTUAL_METHOD_CLASS(jdouble); - -#pragma pop_macro("DEFINE_PRIMITIVE_NON_VIRTUAL_METHOD_CLASS") -/// @endcond - - -/** - * JField represents typed fields and simplifies their access. Note that object types return - * raw pointers which generally should promptly get a wrap_local treatment. - */ -template -class JField { - static_assert(IsJniScalar(), "T must be a JNI scalar"); - - public: - /// Wraps an existing field id - explicit JField(jfieldID field = nullptr) noexcept; - - /// Verify that the id is valid - explicit operator bool() const noexcept; - - /// Access the wrapped id - jfieldID getId() const noexcept; - - private: - jfieldID field_id_; - - /// Get field value - /// @pre object != nullptr - T get(jobject object) const noexcept; - - /// Set field value - /// @pre object != nullptr - void set(jobject object, T value) noexcept; - - friend class JObject; -}; - - -/** - * JStaticField represents typed fields and simplifies their access. Note that object types - * return raw pointers which generally should promptly get a wrap_local treatment. - */ -template -class JStaticField { - static_assert(IsJniScalar(), "T must be a JNI scalar"); - - public: - /// Wraps an existing field id - explicit JStaticField(jfieldID field = nullptr) noexcept; - - /// Verify that the id is valid - explicit operator bool() const noexcept; - - /// Access the wrapped id - jfieldID getId() const noexcept; - - private: - jfieldID field_id_; - - /// Get field value - /// @pre object != nullptr - T get(jclass jcls) const noexcept; - - /// Set field value - /// @pre object != nullptr - void set(jclass jcls, T value) noexcept; - - friend class JClass; - friend class JObject; -}; - - -/// Template magic to provide @ref jmethod_traits -template -struct jmethod_traits { - static std::string descriptor(); - static std::string constructor_descriptor(); -}; - - -// jtype_traits //////////////////////////////////////////////////////////////////////////////////// - -template -struct jtype_traits { -private: - using Repr = ReprType; -public: - // The jni type signature (described at - // http://docs.oracle.com/javase/1.5.0/docs/guide/jni/spec/types.html). - static std::string descriptor() { - std::string descriptor; - if (Repr::kJavaDescriptor == nullptr) { - descriptor = Repr::get_instantiated_java_descriptor(); - } else { - descriptor = Repr::kJavaDescriptor; - } - return descriptor; - } - - // The signature used for class lookups. See - // http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html#getName(). - static std::string base_name() { - if (Repr::kJavaDescriptor != nullptr) { - std::string base_name = Repr::kJavaDescriptor; - return base_name.substr(1, base_name.size() - 2); - } - return Repr::get_instantiated_base_name(); - } -}; - -#pragma push_macro("DEFINE_FIELD_AND_ARRAY_TRAIT") -#undef DEFINE_FIELD_AND_ARRAY_TRAIT - -#define DEFINE_FIELD_AND_ARRAY_TRAIT(TYPE, DSC) \ -template<> \ -struct jtype_traits { \ - static std::string descriptor() { return std::string{#DSC}; } \ - static std::string base_name() { return descriptor(); } \ - using array_type = TYPE ## Array; \ -}; \ -template<> \ -struct jtype_traits { \ - static std::string descriptor() { return std::string{"[" #DSC}; } \ - static std::string base_name() { return descriptor(); } \ - using entry_type = TYPE; \ -}; - -// There is no voidArray, handle that without the macro. -template<> -struct jtype_traits { - static std::string descriptor() { return std::string{"V"}; }; -}; - -DEFINE_FIELD_AND_ARRAY_TRAIT(jboolean, Z) -DEFINE_FIELD_AND_ARRAY_TRAIT(jbyte, B) -DEFINE_FIELD_AND_ARRAY_TRAIT(jchar, C) -DEFINE_FIELD_AND_ARRAY_TRAIT(jshort, S) -DEFINE_FIELD_AND_ARRAY_TRAIT(jint, I) -DEFINE_FIELD_AND_ARRAY_TRAIT(jlong, J) -DEFINE_FIELD_AND_ARRAY_TRAIT(jfloat, F) -DEFINE_FIELD_AND_ARRAY_TRAIT(jdouble, D) - -#pragma pop_macro("DEFINE_FIELD_AND_ARRAY_TRAIT") - - -template -struct jmethod_traits_from_cxx; - -}} - -#include "Meta-inl.h" diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/MetaConvert.h b/lib/fb/src/main/cpp/include/fbjni/detail/MetaConvert.h deleted file mode 100644 index df15bfba..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/MetaConvert.h +++ /dev/null @@ -1,159 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -#include - -#include "Common.h" -#include "References.h" - -namespace facebook { -namespace jni { - -namespace detail { - -// In order to avoid potentially filling the jni locals table, -// temporary objects (right now, this is just jstrings) need to be -// released. This is done by returning a holder which autoconverts to -// jstring. -template -inline T callToJni(T&& t) { - return t; -} - -template -inline JniType callToJni(local_ref&& sref) { - return sref.get(); -} - -// Normally, pass through types unmolested. -template -struct Convert { - typedef T jniType; - static jniType fromJni(jniType t) { - return t; - } - static jniType toJniRet(jniType t) { - return t; - } - static jniType toCall(jniType t) { - return t; - } -}; - -// This is needed for return conversion -template <> -struct Convert { - typedef void jniType; -}; - -// jboolean is an unsigned char, not a bool. Allow it to work either way. -template<> -struct Convert { - typedef jboolean jniType; - static bool fromJni(jniType t) { - return t; - } - static jniType toJniRet(bool t) { - return t; - } - static jniType toCall(bool t) { - return t; - } -}; - -// Sometimes (64-bit Android) jlong is "long long", but int64_t is "long". -// Allow int64_t to work as jlong. -template -struct Convert::value || std::is_same::value) && !std::is_same::value - >::type> { - typedef jlong jniType; - static T fromJni(jniType t) { - return t; - } - static jniType toJniRet(T t) { - return t; - } - static jniType toCall(T t) { - return t; - } -}; - -// convert to alias_ref from T -template -struct Convert> { - typedef JniType jniType; - static alias_ref fromJni(jniType t) { - return wrap_alias(t); - } - static jniType toJniRet(alias_ref t) { - return t.get(); - } - static jniType toCall(alias_ref t) { - return t.get(); - } -}; - -// convert return from local_ref -template -struct Convert> { - typedef JniType jniType; - // No automatic synthesis of local_ref - static jniType toJniRet(local_ref t) { - return t.release(); - } - static jniType toCall(local_ref t) { - return t.get(); - } -}; - -// convert return from global_ref -template -struct Convert> { - typedef JniType jniType; - // No automatic synthesis of global_ref - static jniType toJniRet(global_ref&& t) { - // If this gets called, ownership the global_ref was passed in here. (It's - // probably a copy of a persistent global_ref made when a function was - // declared to return a global_ref, but it could moved out or otherwise not - // referenced elsewhere. Doesn't matter.) Either way, the only safe way - // to return it is to make a local_ref, release it, and return the - // underlying local jobject. - auto ret = make_local(t); - return ret.release(); - } - static jniType toJniRet(const global_ref& t) { - // If this gets called, the function was declared to return const&. We - // have a ref to a global_ref whose lifetime will exceed this call, so we - // can just get the underlying jobject and return it to java without - // needing to make a local_ref. - return t.get(); - } - static jniType toCall(global_ref t) { - return t.get(); - } -}; - -template struct jni_sig_from_cxx_t; -template -struct jni_sig_from_cxx_t { - using JniRet = typename Convert::type>::jniType; - using JniSig = JniRet(typename Convert::type>::jniType...); -}; - -template -using jni_sig_from_cxx = typename jni_sig_from_cxx_t::JniSig; - -} // namespace detail - -template -struct jmethod_traits_from_cxx : jmethod_traits> { -}; - -}} diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/ReferenceAllocators-inl.h b/lib/fb/src/main/cpp/include/fbjni/detail/ReferenceAllocators-inl.h deleted file mode 100644 index e630a992..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/ReferenceAllocators-inl.h +++ /dev/null @@ -1,120 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -#include -#include -#include - -#include "Environment.h" - -namespace facebook { -namespace jni { - -/// @cond INTERNAL -namespace internal { - -// Statistics mostly provided for test (only updated if FBJNI_DEBUG_REFS is defined) -struct ReferenceStats { - std::atomic_uint locals_created, globals_created, weaks_created, - locals_deleted, globals_deleted, weaks_deleted; - - void reset() noexcept; -}; - -extern ReferenceStats g_reference_stats; -} -/// @endcond - - -// LocalReferenceAllocator ///////////////////////////////////////////////////////////////////////// - -inline jobject LocalReferenceAllocator::newReference(jobject original) const { - internal::dbglog("Local new: %p", original); - #ifdef FBJNI_DEBUG_REFS - ++internal::g_reference_stats.locals_created; - #endif - auto ref = Environment::current()->NewLocalRef(original); - FACEBOOK_JNI_THROW_PENDING_EXCEPTION(); - return ref; -} - -inline void LocalReferenceAllocator::deleteReference(jobject reference) const noexcept { - internal::dbglog("Local release: %p", reference); - - if (reference) { - #ifdef FBJNI_DEBUG_REFS - ++internal::g_reference_stats.locals_deleted; - #endif - assert(verifyReference(reference)); - Environment::current()->DeleteLocalRef(reference); - } -} - -inline bool LocalReferenceAllocator::verifyReference(jobject reference) const noexcept { - return isObjectRefType(reference, JNILocalRefType); -} - - -// GlobalReferenceAllocator //////////////////////////////////////////////////////////////////////// - -inline jobject GlobalReferenceAllocator::newReference(jobject original) const { - internal::dbglog("Global new: %p", original); - #ifdef FBJNI_DEBUG_REFS - ++internal::g_reference_stats.globals_created; - #endif - auto ref = Environment::current()->NewGlobalRef(original); - FACEBOOK_JNI_THROW_PENDING_EXCEPTION(); - return ref; -} - -inline void GlobalReferenceAllocator::deleteReference(jobject reference) const noexcept { - internal::dbglog("Global release: %p", reference); - - if (reference) { - #ifdef FBJNI_DEBUG_REFS - ++internal::g_reference_stats.globals_deleted; - #endif - assert(verifyReference(reference)); - Environment::current()->DeleteGlobalRef(reference); - } -} - -inline bool GlobalReferenceAllocator::verifyReference(jobject reference) const noexcept { - return isObjectRefType(reference, JNIGlobalRefType); -} - - -// WeakGlobalReferenceAllocator //////////////////////////////////////////////////////////////////// - -inline jobject WeakGlobalReferenceAllocator::newReference(jobject original) const { - internal::dbglog("Weak global new: %p", original); - #ifdef FBJNI_DEBUG_REFS - ++internal::g_reference_stats.weaks_created; - #endif - auto ref = Environment::current()->NewWeakGlobalRef(original); - FACEBOOK_JNI_THROW_PENDING_EXCEPTION(); - return ref; -} - -inline void WeakGlobalReferenceAllocator::deleteReference(jobject reference) const noexcept { - internal::dbglog("Weak Global release: %p", reference); - - if (reference) { - #ifdef FBJNI_DEBUG_REFS - ++internal::g_reference_stats.weaks_deleted; - #endif - assert(verifyReference(reference)); - Environment::current()->DeleteWeakGlobalRef(reference); - } -} - -inline bool WeakGlobalReferenceAllocator::verifyReference(jobject reference) const noexcept { - return isObjectRefType(reference, JNIWeakGlobalRefType); -} - -}} diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/ReferenceAllocators.h b/lib/fb/src/main/cpp/include/fbjni/detail/ReferenceAllocators.h deleted file mode 100644 index 55028ecd..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/ReferenceAllocators.h +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -/** - * @file ReferenceAllocators.h - * - * Reference allocators are used to create and delete various classes of JNI references (local, - * global, and weak global). - */ - -#pragma once - -#include "Common.h" - -namespace facebook { namespace jni { - -/// Allocator that handles local references -class LocalReferenceAllocator { - public: - jobject newReference(jobject original) const; - void deleteReference(jobject reference) const noexcept; - bool verifyReference(jobject reference) const noexcept; -}; - -/// Allocator that handles global references -class GlobalReferenceAllocator { - public: - jobject newReference(jobject original) const; - void deleteReference(jobject reference) const noexcept; - bool verifyReference(jobject reference) const noexcept; -}; - -/// Allocator that handles weak global references -class WeakGlobalReferenceAllocator { - public: - jobject newReference(jobject original) const; - void deleteReference(jobject reference) const noexcept; - bool verifyReference(jobject reference) const noexcept; -}; - -/** - * @return Helper based on GetObjectRefType. Since this isn't defined - * on all versions of Java or Android, if the type can't be - * determined, this returns true. If reference is nullptr, returns - * true. - */ -bool isObjectRefType(jobject reference, jobjectRefType refType); - -}} - -#include "ReferenceAllocators-inl.h" diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/References-forward.h b/lib/fb/src/main/cpp/include/fbjni/detail/References-forward.h deleted file mode 100644 index eab78de8..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/References-forward.h +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -#include "ReferenceAllocators.h" - -namespace facebook { -namespace jni { - -template -class JObjectWrapper; - -namespace detail { -struct JObjectBase { - jobject get() const noexcept; - void set(jobject reference) noexcept; - jobject this_; -}; - -// RefReprType maps a type to the representation used by fbjni smart references. -template -struct RefReprType; - -template -struct JavaObjectType; - -template -struct ReprAccess; -} - -// Given T, either a jobject-like type or a JavaClass-derived type, ReprType -// is the corresponding JavaClass-derived type and JniType is the -// jobject-like type. -template -using ReprType = typename detail::RefReprType::type; - -template -using JniType = typename detail::JavaObjectType::type; - -template -class base_owned_ref; - -template -class basic_strong_ref; - -template -class weak_ref; - -template -class alias_ref; - -/// A smart unique reference owning a local JNI reference -template -using local_ref = basic_strong_ref; - -/// A smart unique reference owning a global JNI reference -template -using global_ref = basic_strong_ref; - -}} // namespace facebook::jni diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/References-inl.h b/lib/fb/src/main/cpp/include/fbjni/detail/References-inl.h deleted file mode 100644 index eb2d834e..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/References-inl.h +++ /dev/null @@ -1,535 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -#include -#include "CoreClasses.h" - -namespace facebook { -namespace jni { - -template -inline enable_if_t(), T> getPlainJniReference(T ref) { - return ref; -} - -template -inline JniType getPlainJniReference(alias_ref ref) { - return ref.get(); -} - -template -inline JniType getPlainJniReference(const base_owned_ref& ref) { - return ref.get(); -} - - -namespace detail { -template -struct ReprAccess { - using javaobject = JniType; - static void set(Repr& repr, javaobject obj) noexcept { - repr.JObjectBase::set(obj); - } - static javaobject get(const Repr& repr) { - return static_cast(repr.JObject::get()); - } -}; - -namespace { -template -void StaticAssertValidRepr() noexcept { - static_assert(std::is_base_of::value, - "A smart ref representation must be derived from JObject."); - static_assert(IsPlainJniReference>(), "T must be a JNI reference"); - static_assert(sizeof(Repr) == sizeof(JObjectBase), ""); - static_assert(alignof(Repr) == alignof(JObjectBase), ""); -} -} - -template -ReprStorage::ReprStorage(JniType obj) noexcept { - StaticAssertValidRepr(); - set(obj); -} - -template -void ReprStorage::set(JniType obj) noexcept { - new (&storage_) Repr; - ReprAccess::set(get(), obj); -} - -template -Repr& ReprStorage::get() noexcept { - return *reinterpret_cast(&storage_); -} - -template -const Repr& ReprStorage::get() const noexcept { - return *reinterpret_cast(&storage_); -} - -template -JniType ReprStorage::jobj() const noexcept { - ReprAccess::get(get()); - return ReprAccess::get(get()); -} - -template -void ReprStorage::swap(ReprStorage& other) noexcept { - StaticAssertValidRepr(); - using std::swap; - swap(get(), other.get()); -} - -inline void JObjectBase::set(jobject reference) noexcept { - this_ = reference; -} - -inline jobject JObjectBase::get() const noexcept { - return this_; -} - -template -enable_if_t(), plain_jni_reference_t> make_ref(const T& reference) { - auto old_reference = getPlainJniReference(reference); - if (!old_reference) { - return nullptr; - } - - auto ref = Alloc{}.newReference(old_reference); - if (!ref) { - // Note that we end up here if we pass a weak ref that refers to a collected object. - // Thus, it's hard to come up with a reason why this function should be used with - // weak references. - throw std::bad_alloc{}; - } - - return static_cast>(ref); -} - -} // namespace detail - -template -inline local_ref adopt_local(T ref) noexcept { - static_assert(IsPlainJniReference(), "T must be a plain jni reference"); - return local_ref{ref}; -} - -template -inline global_ref adopt_global(T ref) noexcept { - static_assert(IsPlainJniReference(), "T must be a plain jni reference"); - return global_ref{ref}; -} - -template -inline weak_ref adopt_weak_global(T ref) noexcept { - static_assert(IsPlainJniReference(), "T must be a plain jni reference"); - return weak_ref{ref}; -} - - -template -inline enable_if_t(), alias_ref> wrap_alias(T ref) noexcept { - return alias_ref(ref); -} - - -template -enable_if_t(), alias_ref> wrap_alias(T ref) noexcept; - - -template -enable_if_t(), local_ref>> -make_local(const T& ref) { - return adopt_local(detail::make_ref(ref)); -} - -template -enable_if_t(), global_ref>> -make_global(const T& ref) { - return adopt_global(detail::make_ref(ref)); -} - -template -enable_if_t(), weak_ref>> -make_weak(const T& ref) { - return adopt_weak_global(detail::make_ref(ref)); -} - -template -inline enable_if_t() && IsNonWeakReference(), bool> -operator==(const T1& a, const T2& b) { - return isSameObject(getPlainJniReference(a), getPlainJniReference(b)); -} - -template -inline enable_if_t() && IsNonWeakReference(), bool> -operator!=(const T1& a, const T2& b) { - return !(a == b); -} - -template -inline enable_if_t(), bool> -operator==(const T1& a, std::nullptr_t) { - return getPlainJniReference(a) == nullptr; -} - -template -inline enable_if_t(), bool> -operator==(std::nullptr_t, const T1& a) { - return nullptr == getPlainJniReference(a); -} - -template -inline enable_if_t(), bool> -operator!=(const T1& a, std::nullptr_t) { - return !(a == nullptr); -} - -template -inline enable_if_t(), bool> -operator!=(std::nullptr_t, const T1& a) { - return !(nullptr == getPlainJniReference(a)); -} - -// base_owned_ref /////////////////////////////////////////////////////////////////////// - -template -inline base_owned_ref::base_owned_ref() noexcept - : base_owned_ref(nullptr) -{} - -template -inline base_owned_ref::base_owned_ref(std::nullptr_t t) noexcept - : base_owned_ref(static_cast(nullptr)) -{ - (void)t; -} - -template -inline base_owned_ref::base_owned_ref(const base_owned_ref& other) - : storage_{static_cast(Alloc{}.newReference(other.get()))} -{} - -template -template -inline base_owned_ref::base_owned_ref(const base_owned_ref& other) - : storage_{static_cast(Alloc{}.newReference(other.get()))} -{ - static_assert(std::is_convertible, javaobject>::value, ""); -} - -template -inline facebook::jni::base_owned_ref::base_owned_ref( - javaobject reference) noexcept - : storage_(reference) { - assert(Alloc{}.verifyReference(reference)); - internal::dbglog("New wrapped ref=%p this=%p", get(), this); -} - -template -inline base_owned_ref::base_owned_ref( - base_owned_ref&& other) noexcept - : storage_(other.get()) { - internal::dbglog("New move from ref=%p other=%p", other.get(), &other); - internal::dbglog("New move to ref=%p this=%p", get(), this); - // JObject is a simple type and does not support move semantics so we explicitly - // clear other - other.set(nullptr); -} - -template -template -base_owned_ref::base_owned_ref(base_owned_ref&& other) noexcept - : storage_(other.get()) { - internal::dbglog("New move from ref=%p other=%p", other.get(), &other); - internal::dbglog("New move to ref=%p this=%p", get(), this); - // JObject is a simple type and does not support move semantics so we explicitly - // clear other - other.set(nullptr); -} - -template -inline base_owned_ref::~base_owned_ref() noexcept { - reset(); - internal::dbglog("Ref destruct ref=%p this=%p", get(), this); -} - -template -inline auto base_owned_ref::release() noexcept -> javaobject { - auto value = get(); - internal::dbglog("Ref release ref=%p this=%p", value, this); - set(nullptr); - return value; -} - -template -inline void base_owned_ref::reset() noexcept { - reset(nullptr); -} - -template -inline void base_owned_ref::reset(javaobject reference) noexcept { - if (get()) { - assert(Alloc{}.verifyReference(reference)); - Alloc{}.deleteReference(get()); - } - set(reference); -} - -template -inline auto base_owned_ref::get() const noexcept -> javaobject { - return storage_.jobj(); -} - -template -inline void base_owned_ref::set(javaobject ref) noexcept { - storage_.set(ref); -} - - -// weak_ref /////////////////////////////////////////////////////////////////////// - -template -inline weak_ref& weak_ref::operator=( - const weak_ref& other) { - auto otherCopy = other; - swap(*this, otherCopy); - return *this; -} - -template -inline weak_ref& weak_ref::operator=( - weak_ref&& other) noexcept { - internal::dbglog("Op= move ref=%p this=%p oref=%p other=%p", - get(), this, other.get(), &other); - reset(other.release()); - return *this; -} - -template -local_ref weak_ref::lockLocal() const { - return adopt_local( - static_cast(LocalReferenceAllocator{}.newReference(get()))); -} - -template -global_ref weak_ref::lockGlobal() const { - return adopt_global( - static_cast(GlobalReferenceAllocator{}.newReference(get()))); -} - -template -inline void swap( - weak_ref& a, - weak_ref& b) noexcept { - internal::dbglog("Ref swap a.ref=%p a=%p b.ref=%p b=%p", - a.get(), &a, b.get(), &b); - a.storage_.swap(b.storage_); -} - - -// basic_strong_ref //////////////////////////////////////////////////////////////////////////// - -template -inline basic_strong_ref& basic_strong_ref::operator=( - const basic_strong_ref& other) { - auto otherCopy = other; - swap(*this, otherCopy); - return *this; -} - -template -inline basic_strong_ref& basic_strong_ref::operator=( - basic_strong_ref&& other) noexcept { - internal::dbglog("Op= move ref=%p this=%p oref=%p other=%p", - get(), this, other.get(), &other); - reset(other.release()); - return *this; -} - -template -inline alias_ref basic_strong_ref::releaseAlias() noexcept { - return wrap_alias(release()); -} - -template -inline basic_strong_ref::operator bool() const noexcept { - return get() != nullptr; -} - -template -inline auto basic_strong_ref::operator->() noexcept -> Repr* { - return &storage_.get(); -} - -template -inline auto basic_strong_ref::operator->() const noexcept -> const Repr* { - return &storage_.get(); -} - -template -inline auto basic_strong_ref::operator*() noexcept -> Repr& { - return storage_.get(); -} - -template -inline auto basic_strong_ref::operator*() const noexcept -> const Repr& { - return storage_.get(); -} - -template -inline void swap( - basic_strong_ref& a, - basic_strong_ref& b) noexcept { - internal::dbglog("Ref swap a.ref=%p a=%p b.ref=%p b=%p", - a.get(), &a, b.get(), &b); - using std::swap; - a.storage_.swap(b.storage_); -} - - -// alias_ref ////////////////////////////////////////////////////////////////////////////// - -template -inline alias_ref::alias_ref() noexcept - : storage_{nullptr} -{} - -template -inline alias_ref::alias_ref(std::nullptr_t) noexcept - : storage_{nullptr} -{} - -template -inline alias_ref::alias_ref(const alias_ref& other) noexcept - : storage_{other.get()} -{} - -template -inline alias_ref::alias_ref(javaobject ref) noexcept - : storage_(ref) { - assert( - LocalReferenceAllocator{}.verifyReference(ref) || - GlobalReferenceAllocator{}.verifyReference(ref)); -} - -template -template -inline alias_ref::alias_ref(alias_ref other) noexcept - : storage_{other.get()} -{} - -template -template -inline alias_ref::alias_ref(const basic_strong_ref& other) noexcept - : storage_{other.get()} -{} - -template -inline alias_ref& alias_ref::operator=(alias_ref other) noexcept { - swap(*this, other); - return *this; -} - -template -inline alias_ref::operator bool() const noexcept { - return get() != nullptr; -} - -template -inline auto facebook::jni::alias_ref::get() const noexcept -> javaobject { - return storage_.jobj(); -} - -template -inline auto alias_ref::operator->() noexcept -> Repr* { - return &(**this); -} - -template -inline auto alias_ref::operator->() const noexcept -> const Repr* { - return &(**this); -} - -template -inline auto alias_ref::operator*() noexcept -> Repr& { - return storage_.get(); -} - -template -inline auto alias_ref::operator*() const noexcept -> const Repr& { - return storage_.get(); -} - -template -inline void alias_ref::set(javaobject ref) noexcept { - storage_.set(ref); -} - -template -inline void swap(alias_ref& a, alias_ref& b) noexcept { - a.storage_.swap(b.storage_); -} - -// Could reduce code duplication by using a pointer-to-function -// template argument. I'm not sure whether that would make the code -// more maintainable (DRY), or less (too clever/confusing.). -template -enable_if_t(), local_ref> -static_ref_cast(const local_ref& ref) noexcept -{ - T p = static_cast(ref.get()); - return make_local(p); -} - -template -enable_if_t(), global_ref> -static_ref_cast(const global_ref& ref) noexcept -{ - T p = static_cast(ref.get()); - return make_global(p); -} - -template -enable_if_t(), alias_ref> -static_ref_cast(const alias_ref& ref) noexcept -{ - T p = static_cast(ref.get()); - return wrap_alias(p); -} - -template -auto dynamic_ref_cast(const RefType& ref) -> -enable_if_t(), decltype(static_ref_cast(ref))> -{ - if (!ref) { - return decltype(static_ref_cast(ref))(); - } - - static alias_ref target_class = findClassStatic(jtype_traits::base_name().c_str()); - if (!target_class) { - throwNewJavaException("java/lang/ClassCastException", - "Could not find class %s.", - jtype_traits::base_name().c_str()); - - } - - local_ref source_class = ref->getClass(); - - if (!target_class->isAssignableFrom(source_class)) { - throwNewJavaException("java/lang/ClassCastException", - "Tried to cast from %s to %s.", - source_class->toString().c_str(), - jtype_traits::base_name().c_str()); - } - - return static_ref_cast(ref); -} - -}} diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/References.h b/lib/fb/src/main/cpp/include/fbjni/detail/References.h deleted file mode 100644 index 0984134e..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/References.h +++ /dev/null @@ -1,603 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ - -/** @file References.h - * - * Functionality similar to smart pointers, but for references into the VM. Four main reference - * types are provided: local_ref, global_ref, weak_ref, and alias_ref. All are generic - * templates that and refer to objects in the jobject hierarchy. The type of the referred objects - * are specified using the template parameter. All reference types except alias_ref own their - * underlying reference, just as a std smart pointer owns the underlying raw pointer. In the context - * of std smart pointers, these references behave like unique_ptr, and have basically the same - * interface. Thus, when the reference is destructed, the plain JNI reference, i.e. the underlying - * JNI reference (like the parameters passed directly to JNI functions), is released. The alias - * references provides no ownership and is a simple wrapper for plain JNI references. - * - * All but the weak references provides access to the underlying object using dereferencing, and a - * get() method. It is also possible to convert these references to booleans to test for nullity. - * To access the underlying object of a weak reference, the reference must either be released, or - * the weak reference can be used to create a local or global reference. - * - * An owning reference is created either by moving the reference from an existing owned reference, - * by copying an existing owned reference (which creates a new underlying reference), by using the - * default constructor which initialize the reference to nullptr, or by using a helper function. The - * helper function exist in two flavors: make_XXX or adopt_XXX. - * - * Adopting takes a plain JNI reference and wrap it in an owned reference. It takes ownership of the - * plain JNI reference so be sure that no one else owns the reference when you adopt it, and make - * sure that you know what kind of reference it is. - * - * New owned references can be created from existing plain JNI references, alias references, local - * references, and global references (i.e. non-weak references) using the make_local, make_global, - * and make_weak functions. - * - * Alias references can be implicitly initialized using global, local and plain JNI references using - * the wrap_alias function. Here, we don't assume ownership of the passed-in reference, but rather - * create a separate reference that we do own, leaving the passed-in reference to its fate. - * - * Similar rules apply for assignment. An owned reference can be copy or move assigned using a smart - * reference of the same type. In the case of copy assignment a new reference is created. Alias - * reference can also be assigned new values, but since they are simple wrappers of plain JNI - * references there is no move semantics involved. - * - * Alias references are special in that they do not own the object and can therefore safely be - * converted to and from its corresponding plain JNI reference. They are useful as parameters of - * functions that do not affect the lifetime of a reference. Usage can be compared with using plain - * JNI pointers as parameters where a function does not take ownership of the underlying object. - * - * The local, global, and alias references makes it possible to access methods in the underlying - * objects. A core set of classes are implemented in CoreClasses.h, and user defined wrappers are - * supported (see example below). The wrappers also supports inheritance so a wrapper can inherit - * from another wrapper to gain access to its functionality. As an example the jstring wrapper - * inherits from the jobject wrapper, so does the jclass wrapper. That means that you can for - * example call the toString() method using the jclass wrapper, or any other class that inherits - * from the jobject wrapper. - * - * Note that the wrappers are parameterized on the static type of your (jobject) pointer, thus if - * you have a jobject that refers to a Java String you will need to cast it to jstring to get the - * jstring wrapper. This also mean that if you make a down cast that is invalid there will be no one - * stopping you and the wrappers currently does not detect this which can cause crashes. Thus, cast - * wisely. - * - * @include WrapperSample.cpp - */ - -#pragma once - -#include -#include -#include - -#include - -#include "ReferenceAllocators.h" -#include "TypeTraits.h" -#include "References-forward.h" - -namespace facebook { -namespace jni { - -/// Convenience function to wrap an existing local reference -template -local_ref adopt_local(T ref) noexcept; - -/// Convenience function to wrap an existing global reference -template -global_ref adopt_global(T ref) noexcept; - -/// Convenience function to wrap an existing weak reference -template -weak_ref adopt_weak_global(T ref) noexcept; - - -/// Swaps two owning references of the same type -template -void swap(weak_ref& a, weak_ref& b) noexcept; - -/// Swaps two owning references of the same type -template -void swap(basic_strong_ref& a, basic_strong_ref& b) noexcept; - -/** - * Retrieve the plain reference from a plain reference. - */ -template -enable_if_t(), T> getPlainJniReference(T ref); - -/** - * Retrieve the plain reference from an alias reference. - */ -template -JniType getPlainJniReference(alias_ref ref); - -/** - * Retrieve the plain JNI reference from any reference owned reference. - */ -template -JniType getPlainJniReference(const base_owned_ref& ref); - -class JObject; -class JClass; - -namespace detail { - -template -struct HasJniRefRepr : std::false_type {}; - -template -struct HasJniRefRepr::value, void>::type> : std::true_type { - using type = typename T::JniRefRepr; -}; - -template -struct RefReprType { - using type = typename std::conditional::value, typename HasJniRefRepr::type, JObjectWrapper>::type; - static_assert(std::is_base_of::value, - "Repr type missing JObject base."); - static_assert(std::is_same::type>::value, - "RefReprType not idempotent"); -}; - -template -struct RefReprType::value, void>::type> { - using type = T; - static_assert(std::is_base_of::value, - "Repr type missing JObject base."); - static_assert(std::is_same::type>::value, - "RefReprType not idempotent"); -}; - -template -struct JavaObjectType { - using type = typename RefReprType::type::javaobject; - static_assert(IsPlainJniReference(), - "JavaObjectType not a plain jni reference"); - static_assert(std::is_same::type>::value, - "JavaObjectType not idempotent"); -}; - -template -struct JavaObjectType> { - using type = T; - static_assert(IsPlainJniReference(), - "JavaObjectType not a plain jni reference"); - static_assert(std::is_same::type>::value, - "JavaObjectType not idempotent"); -}; - -template -struct JavaObjectType { - using type = T*; - static_assert(IsPlainJniReference(), - "JavaObjectType not a plain jni reference"); - static_assert(std::is_same::type>::value, - "JavaObjectType not idempotent"); -}; - -template -struct ReprStorage { - explicit ReprStorage(JniType obj) noexcept; - - void set(JniType obj) noexcept; - - Repr& get() noexcept; - const Repr& get() const noexcept; - JniType jobj() const noexcept; - - void swap(ReprStorage& other) noexcept; - private: - ReprStorage() = delete; - ReprStorage(const ReprStorage&) = delete; - ReprStorage(ReprStorage&&) = delete; - ReprStorage& operator=(const ReprStorage&) = delete; - ReprStorage& operator=(ReprStorage&&) = delete; - - using Storage = typename std::aligned_storage::type; - Storage storage_; -}; - -} // namespace detail - -/** - * Create a new local reference from an existing reference - * - * @param ref a plain JNI, alias, or strong reference - * @return an owned local reference (referring to null if the input does) - * @throws std::bad_alloc if the JNI reference could not be created - */ -template -enable_if_t(), local_ref>> -make_local(const T& r); - -/** - * Create a new global reference from an existing reference - * - * @param ref a plain JNI, alias, or strong reference - * @return an owned global reference (referring to null if the input does) - * @throws std::bad_alloc if the JNI reference could not be created - */ -template -enable_if_t(), global_ref>> -make_global(const T& r); - -/** - * Create a new weak global reference from an existing reference - * - * @param ref a plain JNI, alias, or strong reference - * @return an owned weak global reference (referring to null if the input does) - * @throws std::bad_alloc if the returned reference is null - */ -template -enable_if_t(), weak_ref>> -make_weak(const T& r); - -/** - * Compare two references to see if they refer to the same object - */ -template -enable_if_t() && IsNonWeakReference(), bool> -operator==(const T1& a, const T2& b); - -/** - * Compare two references to see if they don't refer to the same object - */ -template -enable_if_t() && IsNonWeakReference(), bool> -operator!=(const T1& a, const T2& b); - -/** - * Compare references against nullptr - */ -template -enable_if_t(), bool> -operator==(const T1& a, std::nullptr_t); - -template -enable_if_t(), bool> -operator==(std::nullptr_t, const T1& a); - -template -enable_if_t(), bool> -operator!=(const T1& a, std::nullptr_t); - -template -enable_if_t(), bool> -operator!=(std::nullptr_t, const T1& a); - - -template -class base_owned_ref { - public: - using javaobject = JniType; - - /** - * Release the ownership and set the reference to null. Thus no deleter is invoked. - * @return Returns the reference - */ - javaobject release() noexcept; - - /** - * Reset the reference to refer to nullptr. - */ - void reset() noexcept; - - protected: - using Repr = ReprType; - detail::ReprStorage storage_; - - javaobject get() const noexcept; - void set(javaobject ref) noexcept; - - /* - * Wrap an existing reference and transfers its ownership to the newly created unique reference. - * NB! Does not create a new reference - */ - explicit base_owned_ref(javaobject reference) noexcept; - - /// Create a null reference - base_owned_ref() noexcept; - - /// Create a null reference - explicit base_owned_ref(std::nullptr_t) noexcept; - - /// Copy constructor (note creates a new reference) - base_owned_ref(const base_owned_ref& other); - template - base_owned_ref(const base_owned_ref& other); - - /// Transfers ownership of an underlying reference from one unique reference to another - base_owned_ref(base_owned_ref&& other) noexcept; - template - base_owned_ref(base_owned_ref&& other) noexcept; - - /// The delete the underlying reference if applicable - ~base_owned_ref() noexcept; - - - /// Assignment operator (note creates a new reference) - base_owned_ref& operator=(const base_owned_ref& other); - - /// Assignment by moving a reference thus not creating a new reference - base_owned_ref& operator=(base_owned_ref&& rhs) noexcept; - - void reset(javaobject reference) noexcept; - - friend javaobject jni::getPlainJniReference<>(const base_owned_ref& ref); - - template - friend class base_owned_ref; -}; - - -/** - * A smart reference that owns its underlying JNI reference. The class provides basic - * functionality to handle a reference but gives no access to it unless the reference is - * released, thus no longer owned. The API is stolen with pride from unique_ptr and the - * semantics should be basically the same. This class should not be used directly, instead use - * @ref weak_ref - */ -template -class weak_ref : public base_owned_ref { - public: - using javaobject = JniType; - - using Allocator = WeakGlobalReferenceAllocator; - - // This inherits non-default, non-copy, non-move ctors. - using base_owned_ref::base_owned_ref; - - /// Create a null reference - weak_ref() noexcept - : base_owned_ref{} {} - - /// Create a null reference - /* implicit */ weak_ref(std::nullptr_t) noexcept - : base_owned_ref{nullptr} {} - - /// Copy constructor (note creates a new reference) - weak_ref(const weak_ref& other) - : base_owned_ref{other} {} - - // This needs to be explicit to change its visibility. - template - weak_ref(const weak_ref& other) - : base_owned_ref{other} {} - - /// Transfers ownership of an underlying reference from one unique reference to another - weak_ref(weak_ref&& other) noexcept - : base_owned_ref{std::move(other)} {} - - - /// Assignment operator (note creates a new reference) - weak_ref& operator=(const weak_ref& other); - - /// Assignment by moving a reference thus not creating a new reference - weak_ref& operator=(weak_ref&& rhs) noexcept; - - // Creates an owned local reference to the referred object or to null if the object is reclaimed - local_ref lockLocal() const; - - // Creates an owned global reference to the referred object or to null if the object is reclaimed - global_ref lockGlobal() const; - - private: - // get/release/reset on weak_ref are not exposed to users. - using base_owned_ref::get; - using base_owned_ref::release; - using base_owned_ref::reset; - /* - * Wrap an existing reference and transfers its ownership to the newly created unique reference. - * NB! Does not create a new reference - */ - explicit weak_ref(javaobject reference) noexcept - : base_owned_ref{reference} {} - - template friend class weak_ref; - friend weak_ref adopt_weak_global(javaobject ref) noexcept; - friend void swap(weak_ref& a, weak_ref& b) noexcept; -}; - - -/** - * A class representing owned strong references to Java objects. This class - * should not be used directly, instead use @ref local_ref, or @ref global_ref. - */ -template -class basic_strong_ref : public base_owned_ref { - using typename base_owned_ref::Repr; - public: - using javaobject = JniType; - - using Allocator = Alloc; - - // This inherits non-default, non-copy, non-move ctors. - using base_owned_ref::base_owned_ref; - using base_owned_ref::release; - using base_owned_ref::reset; - - /// Create a null reference - basic_strong_ref() noexcept - : base_owned_ref{} {} - - /// Create a null reference - /* implicit */ basic_strong_ref(std::nullptr_t) noexcept - : base_owned_ref{nullptr} {} - - /// Copy constructor (note creates a new reference) - basic_strong_ref(const basic_strong_ref& other) - : base_owned_ref{other} {} - - // This needs to be explicit to change its visibility. - template - basic_strong_ref(const basic_strong_ref& other) - : base_owned_ref{other} {} - - /// Transfers ownership of an underlying reference from one unique reference to another - basic_strong_ref(basic_strong_ref&& other) noexcept - : base_owned_ref{std::move(other)} {} - - /// Assignment operator (note creates a new reference) - basic_strong_ref& operator=(const basic_strong_ref& other); - - /// Assignment by moving a reference thus not creating a new reference - basic_strong_ref& operator=(basic_strong_ref&& rhs) noexcept; - - /// Get the plain JNI reference - using base_owned_ref::get; - - /// Release the ownership of the reference and return the wrapped reference in an alias - alias_ref releaseAlias() noexcept; - - /// Checks if the reference points to a non-null object - explicit operator bool() const noexcept; - - /// Access the functionality provided by the object wrappers - Repr* operator->() noexcept; - - /// Access the functionality provided by the object wrappers - const Repr* operator->() const noexcept; - - /// Provide a reference to the underlying wrapper (be sure that it is non-null before invoking) - Repr& operator*() noexcept; - - /// Provide a const reference to the underlying wrapper (be sure that it is non-null - /// before invoking) - const Repr& operator*() const noexcept; - - private: - - using base_owned_ref::storage_; - - /* - * Wrap an existing reference and transfers its ownership to the newly created unique reference. - * NB! Does not create a new reference - */ - explicit basic_strong_ref(javaobject reference) noexcept - : base_owned_ref{reference} {} - - - friend local_ref adopt_local(T ref) noexcept; - friend global_ref adopt_global(T ref) noexcept; - friend void swap(basic_strong_ref& a, basic_strong_ref& b) noexcept; -}; - - -template -enable_if_t(), alias_ref> wrap_alias(T ref) noexcept; - -/// Swaps to alias reference of the same type -template -void swap(alias_ref& a, alias_ref& b) noexcept; - -/** - * A non-owning variant of the smart references (a dumb reference). These references still provide - * access to the functionality of the @ref JObjectWrapper specializations including exception - * handling and ease of use. Use this representation when you don't want to claim ownership of the - * underlying reference (compare to using raw pointers instead of smart pointers.) For symmetry use - * @ref alias_ref instead of this class. - */ -template -class alias_ref { - using Repr = ReprType; - - public: - using javaobject = JniType; - - /// Create a null reference - alias_ref() noexcept; - - /// Create a null reference - /* implicit */ alias_ref(std::nullptr_t) noexcept; - - /// Copy constructor - alias_ref(const alias_ref& other) noexcept; - - /// Wrap an existing plain JNI reference - /* implicit */ alias_ref(javaobject ref) noexcept; - - /// Wrap an existing smart reference of any type convertible to T - template< - typename TOther, - typename = enable_if_t< - IsConvertible, javaobject>(), T> - > - alias_ref(alias_ref other) noexcept; - - /// Wrap an existing alias reference of a type convertible to T - template< - typename TOther, - typename AOther, - typename = enable_if_t< - IsConvertible, javaobject>(), T> - > - alias_ref(const basic_strong_ref& other) noexcept; - - /// Assignment operator - alias_ref& operator=(alias_ref other) noexcept; - - /// Checks if the reference points to a non-null object - explicit operator bool() const noexcept; - - /// Converts back to a plain JNI reference - javaobject get() const noexcept; - - /// Access the functionality provided by the object wrappers - Repr* operator->() noexcept; - - /// Access the functionality provided by the object wrappers - const Repr* operator->() const noexcept; - - /// Provide a guaranteed non-null reference (be sure that it is non-null before invoking) - Repr& operator*() noexcept; - - /// Provide a guaranteed non-null reference (be sure that it is non-null before invoking) - const Repr& operator*() const noexcept; - - private: - void set(javaobject ref) noexcept; - - detail::ReprStorage storage_; - - friend void swap(alias_ref& a, alias_ref& b) noexcept; -}; - - -/** - * RAII object to create a local JNI frame, using PushLocalFrame/PopLocalFrame. - * - * This is useful when you have a call which is initiated from C++-land, and therefore - * doesn't automatically get a local JNI frame managed for you by the JNI framework. - */ -class JniLocalScope { -public: - JniLocalScope(JNIEnv* p_env, jint capacity); - ~JniLocalScope(); - -private: - JNIEnv* env_; - bool hasFrame_; -}; - -template -enable_if_t(), local_ref> -static_ref_cast(const local_ref& ref) noexcept; - -template -enable_if_t(), global_ref> -static_ref_cast(const global_ref& ref) noexcept; - -template -enable_if_t(), alias_ref> -static_ref_cast(const alias_ref& ref) noexcept; - -template -auto dynamic_ref_cast(const RefType& ref) -> -enable_if_t(), decltype(static_ref_cast(ref))> ; - -}} - -#include "References-inl.h" diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/Registration-inl.h b/lib/fb/src/main/cpp/include/fbjni/detail/Registration-inl.h deleted file mode 100644 index d8e2b043..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/Registration-inl.h +++ /dev/null @@ -1,166 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -#include "Exceptions.h" -#include "Hybrid.h" - -namespace facebook { -namespace jni { - -namespace detail { - -#ifdef __i386__ -// X86 ABI forces 16 byte stack allignment on calls. Unfortunately -// sometimes Dalvik chooses not to obey the ABI: -// - https://code.google.com/p/android/issues/detail?id=61012 -// - https://android.googlesource.com/platform/ndk/+/81696d2%5E!/ -// Therefore, we tell the compiler to re-align the stack on entry -// to our JNI functions. -#define JNI_ENTRY_POINT __attribute__((force_align_arg_pointer)) -#else -#define JNI_ENTRY_POINT -#endif - -template -struct CreateDefault { - static R create() { - return R{}; - } -}; - -template <> -struct CreateDefault { - static void create() {} -}; - -template -using Converter = Convert::type>; - -template -struct WrapForVoidReturn { - static typename Converter::jniType call(Args&&... args) { - return Converter::toJniRet(func(std::forward(args)...)); - } -}; - -template -struct WrapForVoidReturn { - static void call(Args&&... args) { - func(std::forward(args)...); - } -}; - -// registration wrapper for legacy JNI-style functions -template -struct BareJniWrapper { - JNI_ENTRY_POINT static R call(JNIEnv* env, jobject obj, Args... args) { - detail::JniEnvCacher jec(env); - try { - return (*func)(env, static_cast>(obj), args...); - } catch (...) { - translatePendingCppExceptionToJavaException(); - return CreateDefault::create(); - } - } -}; - -// registration wrappers for functions, with autoconversion of arguments. -template -struct FunctionWrapper { - using jniRet = typename Converter::jniType; - JNI_ENTRY_POINT static jniRet call(JNIEnv* env, jobject obj, typename Converter::jniType... args) { - detail::JniEnvCacher jec(env); - try { - return WrapForVoidReturn, Args...>::call( - static_cast>(obj), Converter::fromJni(args)...); - } catch (...) { - translatePendingCppExceptionToJavaException(); - return CreateDefault::create(); - } - } -}; - -// registration wrappers for non-static methods, with autoconvertion of arguments. -template -struct MethodWrapper { - using jhybrid = typename C::jhybridobject; - static R dispatch(alias_ref ref, Args&&... args) { - try { - // This is usually a noop, but if the hybrid object is a - // base class of other classes which register JNI methods, - // this will get the right type for the registered method. - auto cobj = static_cast(ref->cthis()); - return (cobj->*method)(std::forward(args)...); - } catch (const std::exception& ex) { - C::mapException(ex); - throw; - } - } - - JNI_ENTRY_POINT static typename Converter::jniType call( - JNIEnv* env, jobject obj, typename Converter::jniType... args) { - return FunctionWrapper, Args&&...), dispatch, jhybrid, R, Args...>::call(env, obj, args...); - } -}; - -template -inline NativeMethodWrapper* exceptionWrapJNIMethod(R (*)(JNIEnv*, C, Args... args)) { - // This intentionally erases the real type; JNI will do it anyway - return reinterpret_cast(&(BareJniWrapper::call)); -} - -template -inline NativeMethodWrapper* exceptionWrapJNIMethod(R (*)(alias_ref, Args... args)) { - // This intentionally erases the real type; JNI will do it anyway - return reinterpret_cast(&(FunctionWrapper::call)); -} - -template -inline NativeMethodWrapper* exceptionWrapJNIMethod(R (C::*method0)(Args... args)) { - (void)method0; - // This intentionally erases the real type; JNI will do it anyway - return reinterpret_cast(&(MethodWrapper::call)); -} - -template -inline std::string makeDescriptor(R (*)(JNIEnv*, C, Args... args)) { - return jmethod_traits::descriptor(); -} - -template -inline std::string makeDescriptor(R (*)(alias_ref, Args... args)) { - return jmethod_traits_from_cxx::descriptor(); -} - -template -inline std::string makeDescriptor(R (C::*)(Args... args)) { - return jmethod_traits_from_cxx::descriptor(); -} - -template -template -JNI_ENTRY_POINT R CriticalMethod::call(alias_ref, Args... args) noexcept { - static_assert( - IsJniPrimitive() || std::is_void(), - "Critical Native Methods may only return primitive JNI types, or void."); - static_assert( - AreJniPrimitives(), - "Critical Native Methods may only use primitive JNI types as parameters"); - - return func(std::forward(args)...); -} - -template -template -inline std::string CriticalMethod::desc() { - return makeDescriptor(call); -} - -} - -}} diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/Registration.h b/lib/fb/src/main/cpp/include/fbjni/detail/Registration.h deleted file mode 100644 index 0808a070..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/Registration.h +++ /dev/null @@ -1,167 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -#include -#include "References.h" - -namespace facebook { -namespace jni { - -namespace detail { - -// This uses the real JNI function as a non-type template parameter to -// cause a (static member) function to exist with the same signature, -// but with try/catch exception translation. -template -NativeMethodWrapper* exceptionWrapJNIMethod(R (*func0)(JNIEnv*, jobject, Args... args)); - -// Automatically wrap object argument, and don't take env explicitly. -template -NativeMethodWrapper* exceptionWrapJNIMethod(R (*func0)(alias_ref, Args... args)); - -// Extract C++ instance from object, and invoke given method on it, -template -NativeMethodWrapper* exceptionWrapJNIMethod(R (C::*method0)(Args... args)); - -// This uses deduction to figure out the descriptor name if the types -// are primitive or have JObjectWrapper specializations. -template -std::string makeDescriptor(R (*func)(JNIEnv*, C, Args... args)); - -// This uses deduction to figure out the descriptor name if the types -// are primitive or have JObjectWrapper specializations. -template -std::string makeDescriptor(R (*func)(alias_ref, Args... args)); - -// This uses deduction to figure out the descriptor name if the types -// are primitive or have JObjectWrapper specializations. -template -std::string makeDescriptor(R (C::*method0)(Args... args)); - -template -struct CriticalMethod; - -template -struct CriticalMethod { - template - static R call(alias_ref, Args... args) noexcept; - - template - inline static std::string desc(); -}; - -} - -// We have to use macros here, because the func needs to be used -// as both a decltype expression argument and as a non-type template -// parameter, since C++ provides no way for translateException -// to deduce the type of its non-type template parameter. -// The empty string in the macros below ensures that name -// is always a string literal (because that syntax is only -// valid when name is a string literal). -#define makeNativeMethod2(name, func) \ - { name "", ::facebook::jni::detail::makeDescriptor(&func), \ - ::facebook::jni::detail::exceptionWrapJNIMethod(&func) } - -#define makeNativeMethod3(name, desc, func) \ - { name "", desc, \ - ::facebook::jni::detail::exceptionWrapJNIMethod(&func) } - -// Variadic template hacks to get macros with different numbers of -// arguments. Usage instructions are in CoreClasses.h. -#define makeNativeMethodN(a, b, c, count, ...) makeNativeMethod ## count -#define makeNativeMethod(...) makeNativeMethodN(__VA_ARGS__, 3, 2)(__VA_ARGS__) - - -// FAST CALLS / CRITICAL CALLS -// Android up to and including v7 supports "fast calls" by prefixing the method -// signature with an exclamation mark. -// Android v8+ supports fast calls by annotating methods: -// https://source.android.com/devices/tech/dalvik/improvements#faster-native-methods -// -// YOU ALMOST CERTAINLY DO NOT NEED THIS AND IT IS DANGEROUS. -// YOU ALMOST CERTAINLY DO NOT NEED THIS AND IT IS DANGEROUS. -// YOU ALMOST CERTAINLY DO NOT NEED THIS AND IT IS DANGEROUS. -// YOU ALMOST CERTAINLY DO NOT NEED THIS AND IT IS DANGEROUS. -// YOU ALMOST CERTAINLY DO NOT NEED THIS AND IT IS DANGEROUS. -// -// "Fast" calls are only on the order of a few dozen NANO-seconds faster than -// regular JNI calls. If your method does almost aaanything of consequence - if -// you loop, if you write to a log, if you call another method, if you even -// simply allocate or deallocate - then the method body will significantly -// outweigh the method overhead. -// -// The difference between a regular JNI method and a "FastJNI" method (as -// they're called inside the runtime) is that a FastJNI method doesn't mark the -// thread as executing native code, and by skipping that avoids the locking and -// thread state check overhead of interacting with the Garbage Collector. -// -// To understand why this is dangerous, you need to understand a bit about the -// GC. In order to perform its work the GC needs to have at least one (usually -// two in modern implementations) "stop the world" checkpoints where it can -// guarantee that all managed-code execution is paused. The VM performs these -// checkpoints at allocations, method boundaries, and each backward branch (ie -// anytime you loop). When the GC wants to run, it will signal to all managed -// threads that they should pause at the next checkpoint, and then it will wait -// for every thread in the system to transition from the "runnable" state into a -// "waiting" state. Once every thread has stopped, the GC thread can perform the -// work it needs to and then it will trigger the execution threads to resume. -// -// JNI methods fit neatly into the above paradigm: They're still methods, so -// they perform GC checkpoints at method entry and method exit. JNI methods also -// perform checkpoints at any JNI boundary crossing - ie, any time you call -// GetObjectField etc. Because access to managed objects from native code is -// tightly controlled, the VM is able to mark threads executing native methods -// into a special "native" state which the GC is able to ignore: It knows they -// can't touch managed objects (without hitting a checkpoint) so it doesn't care -// about them. -// -// JNI critical methods don't perform that "runnable" -> "native" thread state -// transition. Skipping that transition allows them to shave about 20ns off -// their total execution time, but it means that the GC has to wait for them to -// complete before it can move forward. If a critical method begins blocking, -// say on a long loop, or an I/O operation, or on perhaps a mutex, then the GC -// will also block, and because the GC is blocking the entire rest of the VM -// (which is waiting on the GC) will block. If the critical method is blocking -// on a mutex that's already held by the GC - for example, the VM's internal -// weak_globals_lock_ which guards modifications to the weak global reference -// table (and is required in order to create or free a weak_ref<>) - then you -// have a system-wide deadlock. - -// prefixes a JNI method signature as android "fast call". -#if defined(__ANDROID__) && defined(FBJNI_WITH_FAST_CALLS) -#define FBJNI_PREFIX_FAST_CALL(desc) (std::string{"!"} + desc) -#else -#define FBJNI_PREFIX_FAST_CALL(desc) (desc) -#endif - -#define makeCriticalNativeMethod3(name, desc, func) \ - makeNativeMethod3( \ - name, \ - FBJNI_PREFIX_FAST_CALL(desc), \ - ::facebook::jni::detail::CriticalMethod::call<&func>) - -#define makeCriticalNativeMethod2(name, func) \ - makeCriticalNativeMethod3( \ - name, \ - ::facebook::jni::detail::CriticalMethod::desc<&func>(), \ - func) - -#define makeCriticalNativeMethodN(a, b, c, count, ...) makeCriticalNativeMethod ## count - -// YOU ALMOST CERTAINLY DO NOT NEED THIS AND IT IS DANGEROUS. -// YOU ALMOST CERTAINLY DO NOT NEED THIS AND IT IS DANGEROUS. -// YOU ALMOST CERTAINLY DO NOT NEED THIS AND IT IS DANGEROUS. -// YOU ALMOST CERTAINLY DO NOT NEED THIS AND IT IS DANGEROUS. -// YOU ALMOST CERTAINLY DO NOT NEED THIS AND IT IS DANGEROUS. -// See above for an explanation. -#define makeCriticalNativeMethod_DO_NOT_USE_OR_YOU_WILL_BE_FIRED(...) makeCriticalNativeMethodN(__VA_ARGS__, 3, 2)(__VA_ARGS__) - -}} - -#include "Registration-inl.h" diff --git a/lib/fb/src/main/cpp/include/fbjni/detail/TypeTraits.h b/lib/fb/src/main/cpp/include/fbjni/detail/TypeTraits.h deleted file mode 100644 index e5ffaed9..00000000 --- a/lib/fb/src/main/cpp/include/fbjni/detail/TypeTraits.h +++ /dev/null @@ -1,176 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. - */ -#pragma once - -#include - -#include "References-forward.h" - -namespace facebook { -namespace jni { - -/// Generic std::enable_if helper -template -using enable_if_t = typename std::enable_if::type; - -/// Generic std::is_convertible helper -template -constexpr bool IsConvertible() { - return std::is_convertible::value; -} - -template class TT, typename T> -struct is_instantiation_of : std::false_type {}; - -template class TT, typename... Ts> -struct is_instantiation_of> : std::true_type {}; - -template class TT, typename... Ts> -constexpr bool IsInstantiationOf() { - return is_instantiation_of::value; -} - -/// Metafunction to determine whether a type is a JNI reference or not -template -struct is_plain_jni_reference : - std::integral_constant::value && - std::is_base_of< - typename std::remove_pointer::type, - typename std::remove_pointer::type>::value> {}; - -/// Helper to simplify use of is_plain_jni_reference -template -constexpr bool IsPlainJniReference() { - return is_plain_jni_reference::value; -} - -/// Metafunction to determine whether a type is a primitive JNI type or not -template -struct is_jni_primitive : - std::integral_constant::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value> {}; - -/// Helper to simplify use of is_jni_primitive -template -constexpr bool IsJniPrimitive() { - return is_jni_primitive::value; -} - -/// Metafunction to determine whether a series of types are all primitive JNI types. -template -struct are_jni_primitives; - -template -struct are_jni_primitives : - std::integral_constant::value && are_jni_primitives::value> {}; - -template<> -struct are_jni_primitives<> : std::integral_constant {}; - -/// Helper to simplify use of are_jni_primitives -template -constexpr bool AreJniPrimitives() { - return are_jni_primitives::value; -} - - -/// Metafunction to determine whether a type is a JNI array of primitives or not -template -struct is_jni_primitive_array : - std::integral_constant::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value || - std::is_same::value> {}; - -/// Helper to simplify use of is_jni_primitive_array -template -constexpr bool IsJniPrimitiveArray() { - return is_jni_primitive_array::value; -} - -/// Metafunction to determine if a type is a scalar (primitive or reference) JNI type -template -struct is_jni_scalar : - std::integral_constant::value || - is_jni_primitive::value> {}; - -/// Helper to simplify use of is_jni_scalar -template -constexpr bool IsJniScalar() { - return is_jni_scalar::value; -} - -// Metafunction to determine if a type is a JNI type -template -struct is_jni_type : - std::integral_constant::value || - std::is_void::value> {}; - -/// Helper to simplify use of is_jni_type -template -constexpr bool IsJniType() { - return is_jni_type::value; -} - -template -struct is_non_weak_reference : - std::integral_constant() || - IsInstantiationOf() || - IsInstantiationOf()> {}; - -template -constexpr bool IsNonWeakReference() { - return is_non_weak_reference::value; -} - -template -struct is_any_reference : - std::integral_constant() || - IsInstantiationOf() || - IsInstantiationOf() || - IsInstantiationOf()> {}; - -template -constexpr bool IsAnyReference() { - return is_any_reference::value; -} - -template -struct reference_traits { - using plain_jni_reference_t = JniType; - static_assert(IsPlainJniReference(), "Need a plain JNI reference"); -}; - -template